query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
a1fd23a34ba754d527d4dad0b2133ef8
Returns the defs array for this element
[ { "docid": "dd02dd514d9b7f6925901d42c6f2506e", "score": "0.78813744", "text": "protected function getDefs() {\n\t\t\treturn $this->defs;\n\t\t}", "title": "" } ]
[ { "docid": "c0fd2f7324e1b456eb6edffd5a24bb80", "score": "0.7847948", "text": "public function getDefs()\n {\n return $this->defs;\n }", "title": "" }, { "docid": "be55c924ecea19bc3fd4869b83bc49b9", "score": "0.6688473", "text": "public function definition()\n {\n return [];\n }", "title": "" }, { "docid": "2018affdd7b3c4cbe99d7c587afda250", "score": "0.65014243", "text": "public function getContactDefinition(): array\n {\n $this->checkLoaded();\n\n return array_map(\n function ($el) {\n return $el->getData();\n },\n $this->getDb()->table('contact_definition')->where(['contact_id' => $this->id])->fetchAll()\n );\n }", "title": "" }, { "docid": "d868d979527c428268452b7d1893937e", "score": "0.63922536", "text": "function Author_Datas_Defs()\n {\n $defs=$this->ReadPHPArray($this->Author_Datas_File());\n $this->Author_Datas=array_keys($defs);\n\n return $defs;\n }", "title": "" }, { "docid": "9c140fa6cdebb73f51933c6e8943330a", "score": "0.6360502", "text": "private function createCombinedDefsArray(): array {\n $defs = [];\n\n $middlewareSchema = new Schema([\n 'description' => 'Apply middlewares over the node',\n 'type' => 'object',\n 'properties' => []\n ]);\n\n foreach ($this->dataHydrator->getMiddlewares() as $middleware) {\n $middlewareSchema->setField('properties.' . $middleware->getType(), $middleware->getSchema());\n }\n\n // Make sure we have defs for groups of things (included the root group that contains everything).\n foreach ($this->typesByGroup as $group => $types) {\n $defs[$group] = [\n 'oneOf' => array_map([JsonSchemaGenerator::class, 'getDefReference'], $types),\n 'properties' => [\n DataHydrator::KEY_HYDRATE => [\n 'type' => 'string',\n 'enum' => $types,\n ],\n DataHydrator::KEY_MIDDLEWARE => $middlewareSchema,\n ],\n 'required' => [DataHydrator::KEY_HYDRATE]\n ];\n }\n\n // Add the individual items as refs.\n foreach ($this->referencesByType as $ref => $type) {\n $defs[$ref] = $type;\n }\n return $defs;\n }", "title": "" }, { "docid": "7ed8e15083b107a6d846043c5f7ce7ef", "score": "0.6318355", "text": "public function definition(): array;", "title": "" }, { "docid": "2b0466c5c6a2cd644b79de5ffa370927", "score": "0.62375385", "text": "public function definition()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "2b0466c5c6a2cd644b79de5ffa370927", "score": "0.62375385", "text": "public function definition()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "2b0466c5c6a2cd644b79de5ffa370927", "score": "0.62375385", "text": "public function definition()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "2b0466c5c6a2cd644b79de5ffa370927", "score": "0.62375385", "text": "public function definition()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "2b0466c5c6a2cd644b79de5ffa370927", "score": "0.62375385", "text": "public function definition()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "2b0466c5c6a2cd644b79de5ffa370927", "score": "0.62375385", "text": "public function definition()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "2b0466c5c6a2cd644b79de5ffa370927", "score": "0.62375385", "text": "public function definition()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "064ad5cc6920f77af4199ce980c1d675", "score": "0.62343967", "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": "6dfe559c0e7c2f3ac8876894e58a69c5", "score": "0.6203771", "text": "public function definition()\n {\n return [\n \"nom_struct\" =>array_rand([ \n \"DGSI\",\n \"OTE\",\n \"DEET\",\n \"DRH\",\n \"DRC\",\n \"DAM\",\n \"DFC\",\n \"DTG\",\n \"SAG\",\n \"DPEG\"\n ])\n ];\n }", "title": "" }, { "docid": "1cf871f273224c1664964f9a400504ca", "score": "0.61811596", "text": "public function definition()\n {\n return [\n 'site_name' => 'Theratio',\n 'site_logo_dark' => 'app/M331thAdlQuZbLwbJHkb1GEALGSU1Swq3bj2iBTd.svg',\n 'site_logo_light' => 'app/uvK8Y4jaM4JzP8lBsT4QAXF0hoA8Xzo8ks6wFmY5.svg',\n 'site_email' => '[email protected]',\n 'site_location' => '411 University St, Seattle, USA',\n 'site_phone' => '+201018034310',\n ];\n }", "title": "" }, { "docid": "34c36e37364d72d4272b66a3095e859b", "score": "0.61568594", "text": "public function getFieldDefinitions()\n {\n return $this->field_definitions;\n }", "title": "" }, { "docid": "7036e2ea7692791b9fcb765bdf7e987d", "score": "0.6092703", "text": "public function getSettingDefinitions() {\n return array();\n }", "title": "" }, { "docid": "110ce1bfbf22163208e12ac58e91a3bb", "score": "0.6015746", "text": "public function definition()\n {\n return [\n 'character_id' => null,\n 'game_map_id' => null,\n 'name' => 'Sample',\n 'color' => [193, 66, 66, 1],\n 'max_stone' => 2000,\n 'max_wood' => 2000,\n 'max_clay' => 2000,\n 'max_iron' => 2000,\n 'current_stone' => 2000,\n 'current_wood' => 2000,\n 'current_clay' => 2000,\n 'current_iron' => 2000,\n 'current_population' => 2000,\n 'max_population' => 2000,\n 'x_position' => 16,\n 'y_position' => 16,\n 'current_morale' => .50,\n 'max_morale' => 1.0,\n 'treasury' => null,\n 'last_walked' => now()->subWeeks(6),\n ];\n }", "title": "" }, { "docid": "f9c66be6a737243e5813c6408efd14aa", "score": "0.59923184", "text": "public function getDefinitions()\n {\n if (!count($this->definitions)) {\n $this->loadDefinitions();\n }\n\n return $this->definitions;\n }", "title": "" }, { "docid": "6a03619ff05a7f6f340576708e9a7d6a", "score": "0.5934615", "text": "public function getAttributeDefinitions()\n {\n return $this->attributeDefinitions;\n }", "title": "" }, { "docid": "3756bc2609c7a94739452c387e8e305d", "score": "0.58916974", "text": "public function definition(): array\n {\n $name = ucwords(implode(' ', $this->faker->words(3)));\n $variable = strtolower(str_replace(' ', '_', $name));\n\n return [\n 'name' => $name,\n 'form_id' => function () {\n return \\App\\Models\\SquarespaceCustomForm::factory()->create()->id;\n },\n 'name' => $name,\n 'sort_order' => $this->faker->numberBetween(1, 20),\n 'type' => $this->faker->randomElement(['select', 'name', 'address', 'phone', 'email', 'date', 'person', 'text', 'textarea']),\n 'variable_name' => $variable,\n ];\n }", "title": "" }, { "docid": "fe87284c14bc0a61b0c3419b19045610", "score": "0.58893085", "text": "public function getStaticDefinitions();", "title": "" }, { "docid": "71d6b8b896ce21b2e4001a7b64c19ea7", "score": "0.58868307", "text": "protected function baseDefinitions()\n {\n return array(\n new NameDefinition(), // Our qualifier\n new FromDefinition(), // Dependent qualifier\n new InstructionsDefinition(),\n new TokensDefinition(),\n new PathDefinition(), // Our path (value empty if not applicable)\n );\n }", "title": "" }, { "docid": "7a3f889e97a8545206e0baea05f1550d", "score": "0.5871248", "text": "public function definition()\n {\n return [\n 'name' => Str::random(10),\n 'strength' => Str::random(10),\n 'form' => Str::random(10),\n 'package' => Str::random(10),\n 'package_description' => Str::random(10),\n 'substance_id' => Substance::factory()->create()->id,\n 'registration' => Str::random(10),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ];\n }", "title": "" }, { "docid": "0565875ae1735c9669539a6fbae4269e", "score": "0.5856913", "text": "public function definition()\n {\n return [\n 'id_jeu' => Game::factory(),\n 'id_serie' => TestSuite::factory(),\n ];\n }", "title": "" }, { "docid": "3e37041b076d054847d312663f700267", "score": "0.5834783", "text": "public function definition(): array\n {\n $this->faker->addProvider(new FakerEnumProvider($this->faker));\n return [\n 'country_code' => $this->faker->numerify('+##'),\n 'area_code' => $this->faker->numerify('##'),\n 'number' => $this->faker->numerify('#########'),\n 'privacy' => $this->faker->randomEnum(PrivacyEnum::class),\n ];\n }", "title": "" }, { "docid": "07b7fe00b64e6c24339eed5d208fde55", "score": "0.5793199", "text": "public function definition()\n {\n return [\n 'name_id' => Name::factory(),\n 'phone_id' => Phone::factory(),\n 'order_id' => Order::factory(),\n ];\n }", "title": "" }, { "docid": "35b7640e0b8f8d94188b7ff8d0c290d4", "score": "0.5790844", "text": "public function getDefineServicesList()\n {\n $query = $this->createQueryBuilder('ds')\n ->select('ds')\n ->where(\"ds.active = 1\");\n\n $quer = $query->getQuery();\n $result = $quer->getScalarResult();\n\n if (!empty($result) && isset($result[0])) {\n return $result;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "3337bcf7f23db34666f6a8a72bba2f0f", "score": "0.57808816", "text": "public function definition()\n {\n return [\n 'registrar_id' => 2,\n 'student_id' => rand(1, 10),\n 'acad_year_id' => rand(1, 10),\n 'section_id' => rand(1, 10)\n ];\n }", "title": "" }, { "docid": "1b590cc493aaac5692bbf31dcb965d6f", "score": "0.5751971", "text": "function get_layout_defs()\n{\n //TODO add global memory cache support here. If there is an in memory cache, leverage it.\n\tglobal $layout_defs;\n\treturn $layout_defs;\n}", "title": "" }, { "docid": "4a51eb3a2994f3a008ed772e8310a0f4", "score": "0.57364875", "text": "public function definition(): array\n {\n $consignmentFactory = new \\App\\Domain\\Consignment\\Factory\\ConsignmentFactory();\n return $consignmentFactory->fakeConsignment();\n }", "title": "" }, { "docid": "f26d9e00437c7bc0d9f38178cc43d631", "score": "0.57266134", "text": "public function definition()\n {\n return [\n 'class_in_school_id' => 1,\n 'monday' => Arr::random([Subject::all()[rand(0, count(Subject::all()) - 1)]->name]),\n 'tuesday' => Arr::random([Subject::all()[rand(0, count(Subject::all()) - 1)]->name]),\n 'wednesday' => Arr::random([Subject::all()[rand(0, count(Subject::all()) - 1)]->name]),\n 'thursday' => Arr::random([Subject::all()[rand(0, count(Subject::all()) - 1)]->name]),\n 'friday' => Arr::random([Subject::all()[rand(0, count(Subject::all()) - 1)]->name]),\n ];\n }", "title": "" }, { "docid": "2032a522c886c757cbfbc7d23baf1677", "score": "0.57173467", "text": "public function definition()\n {\n return [\n 'games' => $this,\n 'points' => $this,\n 'wins' => $this,\n 'losses' => $this,\n 'draws' => $this,\n 'goals_for' => $this,\n 'goals_against' => $this,\n 'goals_difference' => $this,\n ];\n }", "title": "" }, { "docid": "9887a78844a814d1a52ec5f6b93fc9a1", "score": "0.5707662", "text": "public function definition(): array\n {\n return [\n 'gig_id' => Gig::pluck('id')->random(),\n 'path' => collect(['dummy1', 'dummy2', 'dummy3'])->random() . '.jpg',\n ];\n }", "title": "" }, { "docid": "24ec3209566b1e9d657c447dce515cfe", "score": "0.5663358", "text": "public function getDefinitions()\n {\n return [\n 'abstract' => 'concrete'\n ];\n }", "title": "" }, { "docid": "b0ab2b694306abac68bf1f41a7187aa8", "score": "0.56406546", "text": "public function definition()\n {\n return [\n 'name' => 'Quebra do display',\n 'description' => '',\n 'dificult' => 3,\n 'repair_id' => Repair::factory(),\n ];\n }", "title": "" }, { "docid": "7d654e3eb73e1afa43b2d6b44639c823", "score": "0.56233484", "text": "public function getServiceDefinitions()\n {\n return $this->definitions;\n }", "title": "" }, { "docid": "4b208ced3b310ddcfbc98d0fd1829490", "score": "0.56225353", "text": "public function getModelDefinition(): array\n {\n return [\n 'rmaId' => [ 'model' => null, 'array' => false ],\n 'orderId' => [ 'model' => null, 'array' => false ],\n 'ean' => [ 'model' => null, 'array' => false ],\n 'title' => [ 'model' => null, 'array' => false ],\n 'expectedQuantity' => [ 'model' => null, 'array' => false ],\n 'returnReason' => [ 'model' => ReturnReason::class, 'array' => false ],\n 'trackAndTrace' => [ 'model' => null, 'array' => false ],\n 'transporterName' => [ 'model' => null, 'array' => false ],\n 'handled' => [ 'model' => null, 'array' => false ],\n 'processingResults' => [ 'model' => ReturnProcessingResult::class, 'array' => true ],\n 'customerDetails' => [ 'model' => CustomerDetails::class, 'array' => false ],\n ];\n }", "title": "" }, { "docid": "9f895c1c0867cf562bb235023ffaab0e", "score": "0.56106", "text": "public function definition() {\n return [\n 'name'=> 'safeda',\n 'price'=> rand( 50, 200 ),\n 'stock' => rand( 10, 100 ),\n 'plant_type_id'=> rand( 1, 10 ),\n 'description' => 'Eucalyptus globulus, commonly known as southern blue gum or blue gum or Safeda, is a species of tall, evergreen tree endemic to southeastern Australia',\n ];\n }", "title": "" }, { "docid": "d39caae8102f75ea717017a3e1243060", "score": "0.560998", "text": "public function definition()\n {\n return [\n 'size' => $this->faker->randomElement(['S', 'M', 'L', 'XL', 'XXL', 'XXXL']),\n 'color' => $this->faker->colorName(),\n 'price' => $this->faker->randomNumber(2, false).$this->faker->numerify('#000')\n ];\n }", "title": "" }, { "docid": "0d9096e9167cdbd1eb83e6f80c5e3624", "score": "0.56022197", "text": "public function definition()\n {\n return [\n 'main' => 'mode',\n 'sub' => $this->faker->randomElement(['masculin', 'feminin', 'enfant']),\n 'third' => $this->faker->randomElement(['t-shirt', 'chemise', 'pull', 'jean'])\n ];\n }", "title": "" }, { "docid": "641398518e8fa6e4e136f94ce59cbb2d", "score": "0.5591085", "text": "public function getTableColumnDefs() {\n return $this->table_column_defs;\n }", "title": "" }, { "docid": "440b509cd355cdd7d5628b06e7b6d08a", "score": "0.558197", "text": "public function definition()\n {\n return [\n 'vehicle_id' => Vehicle::factory(),\n 'key_id' => Key::factory(),\n 'technician_id' => Technician::factory()\n ];\n }", "title": "" }, { "docid": "e2dfb438916ad9138c5b29d0968615f5", "score": "0.55763304", "text": "public function definition(): array\n {\n return [\n 'name' => $this->faker->name,\n 'description' => DescriptionValueObject::fromNative($this->faker->text),\n 'availability' => $this->faker->boolean,\n 'price' => MoneyValueObject::fromFullNative($this->faker->randomNumber()),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ];\n }", "title": "" }, { "docid": "d8c524d6189b60c5eebe273c7a3e67cd", "score": "0.5563966", "text": "public function definition(): array\n {\n return [\n 'rfc' => $this->faker->unique()->{'mexicanRfc'}(),\n 'legal_name' => $this->faker->company(),\n 'common_name' => $this->faker->word(),\n 'certificate' => base64_encode(Str::random(1024)),\n 'private_key' => base64_encode(Str::random(1024)),\n 'passphrase' => Str::random(10),\n 'valid_until' => $this->faker->dateTimeInInterval('-6 months', '+1 year'),\n ];\n }", "title": "" }, { "docid": "7c22c7c6239e661ea4c0443b8598a028", "score": "0.5556182", "text": "public function definition(): array\n {\n return [\n 'user_id' => 2,\n 'name' => fake()->word(),\n 'price' => fake()->numberBetween(10, 10000),\n 'transection_date' => fake()->dateTimeBetween($startDate = '-4 month', $endDate = 'now', $timezone = null)\n ];\n }", "title": "" }, { "docid": "201361329de751d03162c7d246f00049", "score": "0.5551115", "text": "public function definition()\n {\n return [\n\t\t\t'group_id'\t\t\t=> 1,\n\t\t\t'group_name'\t\t=> $this->faker->name,\n\t\t\t'decription'\t\t=> $this->faker->text,\n\t\t\t'api_group_name'\t=> $this->faker->name,\n\t\t\t'user_id'\t\t\t=> 1,\n\t\t\t'_lft'\t\t\t\t=> 1,\n\t\t\t'_rgt'\t\t\t\t=> 2,\n\t\t\t'parent_id'\t\t\t=> 0,\n\t\t];\n }", "title": "" }, { "docid": "fb7f3fc6c27990e2ba67af7e55edf500", "score": "0.5549727", "text": "public function definition()\n {\n return [\n 'name' => $this->faker->streetAddress(),\n 'type' => $this->faker->randomElement(RealEstateType::toArray()),\n 'alias' => Str::slug($this->faker->sentence(1)),\n 'project_id' => Project::factory(),\n ];\n }", "title": "" }, { "docid": "0d6b6d67a0559e4d4a48c70f306f1fb1", "score": "0.55471", "text": "public function definition(): array\n {\n return [\n 'code' => $this->faker->unique()->text(9),\n 'usages_left' => $this->faker->numberBetween(0, 100),\n 'bound_to_user' => $this->faker->boolean,\n 'multi_use' => $this->faker->boolean,\n 'details' => [\n 'discount' => $this->faker->randomFloat(2, 0, 100),\n ],\n 'expired_at' => $this->faker->optional()->dateTime('+2 months'),\n ];\n }", "title": "" }, { "docid": "6dc8a8d815e619c7b64d174bde403f9f", "score": "0.5538832", "text": "public function definition()\n {\n return [\n 'dht22_temperature' => $this->faker->randomFloat(),\n 'dht22_humidity' => $this->faker->randomFloat(),\n 'bmp388_temperature' => $this->faker->randomFloat(),\n 'bmp388_pressure' => $this->faker->randomFloat(),\n 'bmp388_altitude' => $this->faker->randomFloat(),\n ];\n }", "title": "" }, { "docid": "6f0307e76acd0049697c1d7b1828784e", "score": "0.553855", "text": "public function definition(): array\n {\n return [\n 'todo_id' => Todo::query()->first()->id,\n 'content' => $this->faker->sentence(5, true),\n 'done_at' => null,\n ];\n }", "title": "" }, { "docid": "f5266d8729497281805bc5e2cca870e7", "score": "0.5529739", "text": "public function getCodeDefinitions()\n {\n return $this->definitions;\n }", "title": "" }, { "docid": "054da1e360447498faa824b255370396", "score": "0.55275524", "text": "public function getDefenses()\n {\n $defenses = array();\n\n $element = $this->documentElement->getElementsByTagName('defenses')->item(0);\n\n // checks if it has any defenses\n if( isset($element) )\n {\n foreach( $element->getElementsByTagName('defense') as $defense)\n {\n $defenses[] = $defense->getAttribute('name');\n }\n }\n\n return $defenses;\n }", "title": "" }, { "docid": "77afca6df08aed2ba9eb3aab2a574777", "score": "0.55255187", "text": "public function getCodeDefinitions() {\n\t\treturn $this->definitions;\n\t}", "title": "" }, { "docid": "65d029c8f1a3d0a20935d459ff37000b", "score": "0.55192786", "text": "public function getDocumentGroupDefinitions()\n {\n return $this->documentGroupDefinitions;\n }", "title": "" }, { "docid": "de3613a10244f7cc453792ab823b48ab", "score": "0.55119455", "text": "public function fieldDefinition(): array\n {\n $props = [\n 'name' => $this->attribute,\n 'label' => $this->name,\n 'type' => $this->type,\n 'hint' => $this->help,\n 'prefix' => $this->prefix,\n 'suffix' => $this->suffix,\n 'attributes' => [\n 'placeholder' => $this->placeholder\n ],\n ];\n\n if (isset($this->props['subfields'])) {\n $this->props['subfields'] = $this->buildSubFields();\n }\n\n if (isset($this->tabName)) {\n $props['tab'] = $this->tabName;\n }\n\n if (isset($this->default)) {\n $props['value'] = $this->default;\n }\n\n if ($this->readonly) {\n $props['attributes']['readonly'] = 'readonly';\n }\n\n if ($this->disabled) {\n $props['attributes']['disabled'] = 'disabled';\n }\n\n $props['wrapper'] = ['class' => 'form-group col-md-' . $this->gridSize];\n\n return array_merge($props, $this->props);\n }", "title": "" }, { "docid": "ebccfdfa5a626def2a913f14b9765055", "score": "0.54949033", "text": "public function definition()\n {\n return [\n 'school_id_no' => $this->faker->buildingNumber(),\n 'school_name' => 'Pili National High School',\n 'school_region' => 'Region V',\n 'school_division' => $this->faker->citySuffix(),\n 'school_address' => $this->faker->address(),\n 'school_logo' => 'pili-national-high-school',\n ];\n }", "title": "" }, { "docid": "8634c269ec06e665b592391689f0f37e", "score": "0.54840434", "text": "public function getPropertyDefinitions() {\n return $this->fieldDefinition->getPropertyDefinitions();\n }", "title": "" }, { "docid": "04e0754f3e093b848a4f5a650e183607", "score": "0.54829746", "text": "public function definition()\n {\n return [\n 'designacao'=> $this -> faker -> company,\n 'morada'=> $this -> faker -> address,\n 'localidade'=> $this -> faker -> city,\n 'codigopostal'=> $this -> faker -> postcode,\n 'telefone'=> $this -> faker -> phoneNumber,\n 'NIF'=> $this -> faker -> randomNumber($nbDigits = 9),\n 'email'=> $this -> faker -> companyEmail,\n 'vendedor1'=> $this -> faker -> name,\n 'telefone1'=> $this -> faker -> phoneNumber,\n 'email1'=> $this -> faker -> companyEmail,\n 'vendedor2'=> $this -> faker -> name,\n 'telefone2'=> $this -> faker -> phoneNumber,\n 'email2'=> $this -> faker -> companyEmail,\n 'condicoes_especiais'=> $this -> faker -> text($maxNbChars = 100),\n 'obs'=> $this -> faker -> text($maxNbChars = 100),\n\n ];\n }", "title": "" }, { "docid": "3ca111a1c6e1d1e7237d33f813e21374", "score": "0.5474264", "text": "public static function getDefReference(string $defKey = self::ROOT_HYDRATE_GROUP): array {\n return [\n '$ref' => '#/$defs/' . $defKey,\n ];\n }", "title": "" }, { "docid": "d6d9144e7dcd0dde596e0fe9704f8502", "score": "0.5473927", "text": "public function definition(): array\n {\n return [\n 'plugin_id' => \\App\\Models\\Plugin::inRandomOrder()->first()->id,\n 'user_id' => \\App\\Models\\User::inRandomOrder()->first()->id,\n 'content' => $this->faker->paragraph,\n ];\n }", "title": "" }, { "docid": "43ae63dc08ed4dd393834f3cebc83989", "score": "0.54394585", "text": "public function definition()\n {\n return [\n 'report_id' => Report::factory(),\n 'consequences' => $this->faker->realText(30),\n 'used_solution' => $this->faker->randomElement(array('used_solution_1', 'used_solution_2', 'used_solution_3'))\n ];\n }", "title": "" }, { "docid": "4859d87736d164404d52270c6ac6ac64", "score": "0.5433845", "text": "public function definition(): array\n {\n return [\n 'amount' => $this->faker->randomNumber(),\n 'currency_code' => $this->faker->randomElement(DebitCardTransaction::CURRENCIES),\n 'debit_card_id' => fn () => DebitCard::factory()->create(),\n ];\n }", "title": "" }, { "docid": "a214b5f9f5c909b947f0dfdfac640799", "score": "0.54279864", "text": "public function definition()\n {\n return [\n 'name' => $this->faker->word(),\n 'caloric_content' => $this->faker->numberBetween(200, 2000),\n 'intensity' => $this->faker->numberBetween(1, 5),\n 'price' => $this->faker->numberBetween(150, 1000),\n ];\n }", "title": "" }, { "docid": "fcddcf33455d504750c482bd0cf20cbb", "score": "0.5427915", "text": "public function getModelDefinition(): array\n {\n return [\n 'offerId' => [ 'model' => null, 'array' => false ],\n 'retailerId' => [ 'model' => null, 'array' => false ],\n 'countryCode' => [ 'model' => null, 'array' => false ],\n 'bestOffer' => [ 'model' => null, 'array' => false ],\n 'price' => [ 'model' => null, 'array' => false ],\n 'fulfilmentMethod' => [ 'model' => null, 'array' => false ],\n 'condition' => [ 'model' => null, 'array' => false ],\n 'ultimateOrderTime' => [ 'model' => null, 'array' => false ],\n 'minDeliveryDate' => [ 'model' => null, 'array' => false ],\n 'maxDeliveryDate' => [ 'model' => null, 'array' => false ],\n ];\n }", "title": "" }, { "docid": "52bfebf9f7609ef17b8185ebebc8fb09", "score": "0.5420502", "text": "public function definition(): array\n {\n return [\n 'periksa_id' => \\App\\Models\\Periksa::factory(),\n 'tujuan_rujuk_id' => \\App\\Models\\TujuanRujuk::factory(),\n 'rumah_sakit_id' => \\App\\Models\\RumahSakit::factory(),\n 'complication' => $this->faker->word,\n 'register_hamil_id' => \\App\\Models\\RegisterHamil::factory(),\n 'image' => $this->faker->word,\n 'time' => $this->faker->word,\n 'age' => $this->faker->word,\n 'comorbidity' => $this->faker->word,\n 'tacc' => $this->faker->randomNumber(),\n 'diagnosa_id' => \\App\\Models\\Diagnosa::factory(),\n 'tenant_id' => \\App\\Models\\Tenant::factory(),\n ];\n }", "title": "" }, { "docid": "b23c75ed238019791311fa6ffe4d591b", "score": "0.5418356", "text": "public function definition(): array\n {\n return [\n 'id' => $this->faker->uuid(),\n 'number' => $this->faker->randomElement([\n $this->faker->regexify('[A-Z]{2}[0-9]{5}'),\n $this->faker->regexify('[A-Z]{3}[0-9]{4}'),\n $this->faker->regexify('[A-Z]{3}[0-9]{5}'),\n ]),\n ];\n }", "title": "" }, { "docid": "58c31290aafd3ffab3382a67eea432fe", "score": "0.5415037", "text": "public function getModelDefinition(): array\n {\n return [\n 'eventCode' => [ 'model' => null, 'array' => false ],\n 'eventDateTime' => [ 'model' => null, 'array' => false ],\n ];\n }", "title": "" }, { "docid": "32ac545211d1b1368355ed7a61e691f8", "score": "0.5406562", "text": "public function definition(): array\n {\n $province = SrcProvince::factory()->create();\n $commodity = SrcCommodity::factory()->create();\n\n return [\n 'user_id' => 1, // first user\n 'src_province_id' => $province->id,\n 'src_commodity_id' => $commodity->id,\n 'conversion_rate' => $this->faker->numberBetween(0,100) / 100,\n 'crop_data_filename' => $this->faker->sentence,\n 'pop_data_filename' => $this->faker->sentence,\n 'per_capita_consumption_kg_year' => $this->faker->numberBetween(0,100),\n 'per_capita_year' => $this->faker->numberBetween(1987,2020),\n 'remarks' => $this->faker->paragraph,\n ];\n }", "title": "" }, { "docid": "3b7eb016bb6b992b2b817156616789b5", "score": "0.53938884", "text": "public function definition(): array\n {\n $membershipTypes = ['Silver', 'Gold', 'Platinum'];\n\n return [\n 'first_name' => $this->faker->firstName,\n 'last_name' => $this->faker->lastName,\n 'phone_number' => $this->faker->phoneNumber,\n 'membership_type' => $membershipTypes[rand(0, 2)],\n 'membership_expiry_date' => $this->faker->date('Y-m-d', '2030-12-31'),\n 'address' => $this->faker->address,\n 'mailing_address' => $this->faker->address\n ];\n }", "title": "" }, { "docid": "5e8b8c08cc432b69ba6f23d4a6c4cca0", "score": "0.5390457", "text": "public function definition(): array\n {\n $faker = Faker::create();\n\n $posts = Post::all()\n ->pluck('id')\n ->toArray();\n $users = User::all()\n ->pluck('id')\n ->toArray();\n\n return [\n 'id' => null,\n 'body' => $faker->realText(1000),\n 'post_id' => $faker->randomElement($posts),\n 'user_id' => $faker->randomElement($users),\n 'created_at' => time(),\n 'updated_at' => time(),\n ];\n }", "title": "" }, { "docid": "d32ab2c352c577bd735bc76c0a533748", "score": "0.53845245", "text": "protected function getFieldDefs($module)\n {\n return BeanFactory::newBean($module)->field_defs;\n }", "title": "" }, { "docid": "7a066d79a15dd024141fcc52a0f46d4c", "score": "0.5383432", "text": "public function definition()\n {\n return [\n 'empresa_id' => Empresa::factory(), \n 'titulo' => $this->faker->randomElement(['Itaú']), // TODO: Implementar outros bancos após os testes iniciais.\n 'agencia' => $this->faker->numerify('####'), \n 'conta' => $this->faker->numerify('######'), \n 'carteira' => 109, // TODO: Deixar dinâmico dependendo do banco (usar constantes das classes)\n ];\n }", "title": "" }, { "docid": "bf9c843806748e0c2c7f68f644a62e06", "score": "0.5382193", "text": "public function definition(): array\n {\n return [\n 'akun_bank_id' => \\App\\Models\\AkunBank::factory(),\n 'tanggal' => $this->faker->dateTime(),\n 'deskripsi' => $this->faker->text,\n 'nilai' => $this->faker->randomFloat(),\n 'saldo_akhir' => $this->faker->randomFloat(),\n 'debet' => $this->faker->boolean,\n 'pembayaran_asuransi_id' => \\App\\Models\\PembayaranAsuransi::factory(),\n 'kode_transaksi' => $this->faker->word,\n 'tenant_id' => \\App\\Models\\Tenant::factory(),\n ];\n }", "title": "" }, { "docid": "50ff485f4ec62ba356072d211691bd83", "score": "0.5376792", "text": "public function definition()\n {\n return [\n 'company_id' => Company::factory(),\n 'department_id' => Department::factory(),\n 'office_id' => Office::factory(),\n 'host_id' => Host::factory(),\n 'dateTime' => $this->faker->date(),\n 'host_message' => $this->faker->name()\n ];\n }", "title": "" }, { "docid": "d163ab2f14c4528b77bf96ebf21ad1ef", "score": "0.5373128", "text": "public function definition()\n {\n return [\n 'object_guid' => $this->faker->id(),\n 'common_name' => $this->faker->name(),\n 'surname' => $this->faker->name(),\n 'given_name' => $this->faker->name(),\n 'sam_account_name' => $this->faker->name(),\n 'physical_delivery_office_name' => $this->faker->name(),\n 'telephone_number',\n 'email_addresses' =>$this->faker->unique()->safeEmail(),\n 'department',\n 'obj_dist_name' => $this->faker->name(),\n 'last_logon',\n 'logon_count' => 1,\n 'user_principal_name',\n 'is_enabled' => true,\n ];\n }", "title": "" }, { "docid": "326b06da23c61a0f08db9afc704e7119", "score": "0.5371875", "text": "protected function setDefs($defs = array()) {\n\t\t\t$this->defs = $defs;\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "414384eed6d86436c10002493748f298", "score": "0.5369893", "text": "public function definition()\n {\n return [\n 'schoolwork_id'=>schoolworks::inRandomOrder()->first()->getKey(),\n 'course_student_id' => (CourseStudents::inRandomOrder()->get('student_id')->first())->student_id\n ];\n }", "title": "" }, { "docid": "df8a3057bc8fffca82189960edfe60c8", "score": "0.5367477", "text": "public function definition(): array\n {\n $key = Key::query()->inRandomOrder()->first();\n\n return [\n 'name' => $this->faker->streetName(),\n 'mp3_url' => null,\n 'agreement_url' => null,\n 'length' => $this->faker->numberBetween(1, 500),\n 'is_live' => $this->faker->boolean,\n 'notes' => $this->faker->sentence(),\n 'bpm' => $this->faker->numberBetween(40, 250),\n 'key_id' => $key->id,\n 'created_at' => $this->faker->dateTime(),\n 'updated_at' => now(),\n ];\n }", "title": "" }, { "docid": "694d0db3f4951d7bf0effa1564141b56", "score": "0.53672373", "text": "public function getRegionDefinitions(){\n\t\tif($this->regionDefinitions->isEmpty() && count($this->regions)){\n\t\t\t$this->loadRegionDefinitions();\n\t\t}\n\n\t\treturn $this->regionDefinitions;\n\t}", "title": "" }, { "docid": "4a10a3c79a2e6f0e73215bb37415b01c", "score": "0.5352976", "text": "public function definition(): array\n {\n return [\n 'id' => $this->faker->uuid(),\n 'user_id' => null,\n 'type' => 'image',\n 'image_type' => 'marker',\n 'name' => Str::random(32),\n 'extension' => $this->faker->randomElement(['png', 'jpeg', 'jpg', 'webp']),\n ];\n }", "title": "" }, { "docid": "eb78cf0fdb224313e6a853ea2b916288", "score": "0.534991", "text": "public function definition()\n {\n return [\n 'item_code' => 'IC-1000'.rand(10, 500),\n 'description' => 'Name of Product'.rand(10, 500),\n 'unit_price' => mt_rand(100, 1000)\n ];\n }", "title": "" }, { "docid": "da19842fb035940bac35904990fbf4a4", "score": "0.5347695", "text": "public function definition()\n {\n return [\n 'name' => $this->faker->word(),\n 'description' => $this->faker->text(),\n 'cubic_feet' => $this->faker->randomFloat(2, 1, 1000),\n 'packing_qty' => $this->faker->randomNumber(2),\n 'cubic_feet' => $this->faker->randomFloat(2, 1, 1000),\n 'tag' => $this->faker->randomElement(['ocean']),\n 'active' => $this->faker->randomElement([1]),\n ];\n }", "title": "" }, { "docid": "f02d0fbf06ce1096d5143f01e5ebc723", "score": "0.5346744", "text": "public function definition()\n {\n // randomizes the part name\n $random_part_name = self::PARTS_NAMES[random_int(0, count(self::PARTS_NAMES) - 1)];\n\n // randomizes the auto_model id\n $auto_models_ids = DB::table('auto_models')->select('id')->pluck('id');\n $random_id_model = $auto_models_ids[random_int(0, count($auto_models_ids) - 1)];\n\n return [\n 'part_name' => $random_part_name,\n 'auto_model_id' => $random_id_model,\n 'price' => '299.99'\n ];\n }", "title": "" }, { "docid": "08f1283076d39fbdec08ba8cc5bb147e", "score": "0.53461254", "text": "public function definition()\n {\n return [\n 'slug' => fake()->slug(2),\n 'attributes' => [\n 'title' => fake()->text(40),\n 'excerpt' => fake()->text(200),\n 'text' => fake()->text(800),\n 'location' => fake()->address(),\n ],\n 'starts_at' => fake()->dateTimeBetween('-4 months', '+4 months'),\n 'ends_at' => fake()->boolean() ? fake()->dateTimeBetween('-4 months', '+4 months') : null,\n ];\n }", "title": "" }, { "docid": "de45b0b04bfbacd1b66d2a521bf7efd1", "score": "0.5345737", "text": "public function definition()\n {\n return [\n 'global_tr_departamentos_id' => GlobalTrDepartamentos::factory(),\n 'descripcion' => $this->faker->name,\n 'sigla' => $this->faker->asciify('*****'),\n 'codigo' => $this->faker->numerify('####'),\n ];\n }", "title": "" }, { "docid": "b828a1517ea17b69d5d42fe5be21887e", "score": "0.53447604", "text": "public function definition(): array\n {\n return [\n 'name' => $this->faker->name(),\n 'count' => 0,\n 'is_active' => $this->faker->boolean,\n 'description' => $this->faker->text,\n 'hotel_id' => \\App\\Models\\Hotel::factory(),\n ];\n }", "title": "" }, { "docid": "a96c58cde2aade983ee261bbd22e9fb9", "score": "0.53384787", "text": "public function definition()\n {\n return [\n 'name'=>'Fight Club',\n 'author'=>'Chuck Palahniuk',\n 'descr'=>'Fight Club is a 1996 novel by Chuck Palahniuk. It follows the experiences of an unnamed protagonist struggling with insomnia. Inspired by his doctor\\'s\n exasperated remark that insomnia is not suffering, the protagonist finds relief by impersonating a seriously ill person in several support groups',\n 'pdf_link'=>'public/FightClub.pdf',\n 'image'=>'book.png'\n //\n ];\n }", "title": "" }, { "docid": "c3e033443de5e5fcabcf6bf263635bba", "score": "0.5338157", "text": "public function definition(): array\n {\n $subTotal = $this->faker->randomFloat(2);\n\n $shippingAmount = $this->faker->randomFloat(2);\n \n $taxAmount = $this->faker->randomFloat(2);\n\n if (! isset($attributes['order_id'])) {\n $attributes['order_id'] = Order::factory();\n }\n\n if (! isset($attributes['order_address_id'])) {\n $attributes['order_address_id'] = OrderAddress::factory();\n }\n\n return [\n 'email_sent' => 0,\n 'total_qty' => $this->faker->randomNumber(),\n 'base_currency_code' => 'EUR',\n 'channel_currency_code' => 'EUR',\n 'order_currency_code' => 'EUR',\n 'sub_total' => $subTotal,\n 'base_sub_total' => $subTotal,\n 'grand_total' => $subTotal,\n 'base_grand_total' => $subTotal,\n 'shipping_amount' => $shippingAmount,\n 'base_shipping_amount' => $shippingAmount,\n 'tax_amount' => $taxAmount,\n 'base_tax_amount' => $taxAmount,\n 'discount_amount' => 0,\n 'base_discount_amount' => 0,\n 'order_id' => $attributes['order_id'],\n 'order_address_id' => $attributes['order_address_id'],\n ];\n }", "title": "" }, { "docid": "f76c07e7e782ae133aeaebf63fd251a9", "score": "0.53358495", "text": "protected function _getDomMap()\n {\n return [\n 'billedMsisdnsPack' => [\n 'billDate' => 'billDate',\n 'status' => 'status',\n 'subscriptionId' => 'subscriptionId',\n 'operator' => 'operator',\n 'serviceName' => 'serviceName',\n 'billed' => 'billed',\n ]\n ];\n\n }", "title": "" }, { "docid": "286f23cc7ae2568091eed179920af2b2", "score": "0.53332806", "text": "function getArrayDatas(){\n\t\t\t\n\t\t\t$this->setArrayData('types_name',$this->getName());\n\t\t\t$this->setArrayData('types_desc',$this->getDesc());\n\t\t\n\t\t\treturn $this->getArrayData();\n\t\t\t\n }", "title": "" }, { "docid": "330a8e157876b009d98c31f34cb12773", "score": "0.5324676", "text": "public function getFieldDefinition()\n\t{\n\t\tif(strlen($this->get('defaultValue')) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$arrReturn = array\n\t\t(\n\t\t\t'label'\t\t\t=> array( $this->get('title'),$this->get('description') ),\n\t\t\t'sql'\t\t\t=> $this->get('defaultValue'),\n\t\t);\n\t\t\n\t\treturn $arrReturn;\n\t}", "title": "" }, { "docid": "110e5481a22ac7f3cd4826e3bb09b04e", "score": "0.53192866", "text": "public function definition()\n {\n return [\n 'bust' => $this->faker->randomNumber(2, false),\n 'thorax' => $this->faker->randomNumber(2, false),\n 'waist'=> $this->faker->randomNumber(2, false),\n 'hip'=> $this->faker->randomNumber(2, false),\n 'thigh'=> $this->faker->randomNumber(2, false),\n 'calf'=> $this->faker->randomNumber(2, false),\n ];\n }", "title": "" }, { "docid": "f6e0258a44447e098a8bc846c2663503", "score": "0.53191", "text": "public function getProcessDefinitions();", "title": "" }, { "docid": "557bfa8aa378388ddaae2fc28ea51f67", "score": "0.531295", "text": "public function definition()\n {\n return [\n 'user_id' => User::factory()->create()->id,\n 'trip_id' => Trip::factory()->create()->id,\n 'path_order_start' => 1,\n 'path_order_end' => 2,\n 'seat_number' => $this->faker->randomElement(SeatNumbers::getValues()),\n ];\n }", "title": "" }, { "docid": "cdc65546074c6c4e64f68cdafba373b2", "score": "0.53124243", "text": "public function definition(): array\n {\n return [\n 'tax' => mt_rand(10, 100),\n 'name' => $this->faker->company(),\n 'price' => mt_rand(10, 100),\n 'quantity' => mt_rand(1, 10),\n ];\n }", "title": "" }, { "docid": "274fbbd1e72c46b468ac75ab2148e1ae", "score": "0.53108966", "text": "protected function getPluginDefinitions() {\n $definitions = [\n 'apple' => [\n 'id' => 'apple',\n 'label' => 'Apple',\n 'color' => 'green',\n 'class' => 'Drupal\\plugin_test\\Plugin\\plugin_test\\fruit\\Apple',\n 'provider' => 'plugin_test',\n ],\n 'banana' => [\n 'id' => 'banana',\n 'label' => 'Banana',\n 'color' => 'yellow',\n 'uses' => [\n 'bread' => 'Banana bread',\n ],\n 'class' => 'Drupal\\plugin_test\\Plugin\\plugin_test\\fruit\\Banana',\n 'provider' => 'plugin_test',\n ],\n 'cherry' => [\n 'id' => 'cherry',\n 'label' => 'Cherry',\n 'color' => 'red',\n 'class' => 'Drupal\\plugin_test\\Plugin\\plugin_test\\fruit\\Cherry',\n 'provider' => 'plugin_test',\n ],\n ];\n return $definitions;\n }", "title": "" }, { "docid": "33b0a518236d8f0e37cfaea459aea366", "score": "0.53051674", "text": "public function definition()\n {\n return [\n 'network_start' => 42540488161975842760550356425300246528,\n 'network_end' => 42540488241204005274814694018844196863,\n 'location' => Location::class,\n 'cidr' => '2001::/32',\n ];\n }", "title": "" }, { "docid": "d0615de06232ee0addf5249352f0d136", "score": "0.53039503", "text": "function FormatList()\n {\n $FList = array();\n foreach ($this->FormatDescrs as $FormatName => $FormatDescr)\n {\n $FList[$FormatDescr[\"FormatId\"]] = $FormatName;\n }\n return $FList;\n }", "title": "" } ]
80fb6733d7e76cd40ecbd8109fcf53b7
Get the url parameter
[ { "docid": "cc0f0bc24d29dd1e75034fba0329cafd", "score": "0.0", "text": "public function getUrl()\n {\n return $this->url;\n }", "title": "" } ]
[ { "docid": "877f7dfe4c87cbca340ee37aa3da1f7e", "score": "0.72998637", "text": "public function getUrlArg(){\n\t\treturn $this->url_arg;\n\t}", "title": "" }, { "docid": "beb7fa0b4caada6a10b0ec3fb33a8c37", "score": "0.71885514", "text": "protected function getInquiryUrlParam() {\n\t\ttry {\n\t\t\tforeach ($this->getUrlParamsArray() as $param) {\n\t\t\t\tif ($this->isUrlParamPaging($param)) continue;\n\t\t\t\treturn $param;\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "0c060bf4d38b363136cc3dcd219c6557", "score": "0.71091276", "text": "public function getUrlParam($param){\r\n \t\t\r\n \t\t/**\r\n \t\t * check the parameter\r\n \t\t */\r\n \t\tif (empty($param))\r\n \t\t\tsetErrMsg($this->file_name.\" Line : \".__LINE__.\"<br /> Method: \".__METHOD__.\" Msg: param name is empty\");\r\n \t\t\r\n \t\treturn $this->params_array[$param];\r\n \t\t\r\n \t}", "title": "" }, { "docid": "621299f9b41611a14cf92f1607ac8875", "score": "0.7084545", "text": "public function getParam($index = null)\n {\n $value = null;\n\n // Get the global value defined in the router class\n if (isset($index)) {\n if (isset(Render::$urlParam[$index])) {\n $value = Render::$urlParam[$index];\n }\n } else {\n $value = Render::$urlParam;\n }\n\n // Return value\n return $value;\n }", "title": "" }, { "docid": "b542a70d12ea9ef0ad0c4fec1256bab6", "score": "0.70726466", "text": "public function getParameter()\n {\n return $this->pageParameter;\n }", "title": "" }, { "docid": "96061a5082aa44df16ef8eb7b752ff94", "score": "0.70271033", "text": "public function get($param_name){\r\n\t\treturn $_GET[$param_name];\r\n\t}", "title": "" }, { "docid": "7aa5fa38e8baf4eec497f58c07d0eb44", "score": "0.69897324", "text": "public function getParameter();", "title": "" }, { "docid": "7aa5fa38e8baf4eec497f58c07d0eb44", "score": "0.69897324", "text": "public function getParameter();", "title": "" }, { "docid": "1b7c4d29addd16e730a786c1e75f4b69", "score": "0.69628847", "text": "public function param($key = null) {\n\t\treturn Hash::get($this->_route, $key);\n\t}", "title": "" }, { "docid": "5fb63d75c058d4bee8d4ce31f63fd2c4", "score": "0.69201726", "text": "public function _getParam($param){\n $uri = $_SERVER['REQUEST_URI'];\n $explode = explode('/', $uri);\n\n foreach($explode as $k=>$v){\n if($v == $param){\n if(isset($explode[$k+1])) {\n return $explode[$k + 1];\n }\n }\n }\n return null;\n }", "title": "" }, { "docid": "0e3004183570ac6f44ea0ed18219d208", "score": "0.6907684", "text": "function get_param($in) {\n\treturn (isset($in) ? $_GET[$in] : false);\n}", "title": "" }, { "docid": "54bd0ce7c3f6380d872f999acacb8558", "score": "0.6894326", "text": "public function getGetParam()\n {\n return $this->formModel->mp_forms_getParam ?: 'step';\n }", "title": "" }, { "docid": "d80f69f048b2cd28f1b49fd217a72463", "score": "0.68545115", "text": "public function getUriQueryParameter()\n {\n return $this->uri_query_parameter;\n }", "title": "" }, { "docid": "5d2264139e44033a7dcee86e2060700b", "score": "0.68269944", "text": "function getParam($param) {\n\t\treturn $this->params->get ( $param );\n\t\t// bookpro_orders\n\t}", "title": "" }, { "docid": "15ded8ae90af2b0e8f330e37689c1ae0", "score": "0.67966074", "text": "public function getParam()\n {\n return $this->param;\n }", "title": "" }, { "docid": "9af176fafef2d00e7099a4fe03163832", "score": "0.66590345", "text": "public function getRequestParam()\n {\n return $this->requestParam;\n }", "title": "" }, { "docid": "df45662f1a4691621940a609c10cef32", "score": "0.66390467", "text": "public function getParam($param) {\n\t\tif (count($this->params) >= $param)\n\t\t\treturn $this->params[$param-1];\n\t}", "title": "" }, { "docid": "f554b96f11e2e9a46ac6c95ebc57fec6", "score": "0.66294146", "text": "public function getParam(string $key) {\r\n\t\treturn array_key_exists($key, $this->params) ? $this->params[$key] : null;\r\n\t}", "title": "" }, { "docid": "bb947763093a8281210529a80a0e9513", "score": "0.6615747", "text": "public function getParameter($name);", "title": "" }, { "docid": "bb947763093a8281210529a80a0e9513", "score": "0.6615747", "text": "public function getParameter($name);", "title": "" }, { "docid": "ccfc2ae1cac5e9b50fb589f9447eb033", "score": "0.66040385", "text": "public function getParam(string $key = null);", "title": "" }, { "docid": "ae9703a72f882f22a9c1034188e28871", "score": "0.65882295", "text": "protected function _fetchParamFromGet($key){\r\n\t\t$value\t=\t'';\r\n\t\tif(array_key_exists($key, $_GET)){\r\n\t\t\t$value = urldecode($_GET[$key]);\r\n\t\t}\r\n\t\treturn $value;\r\n\t}", "title": "" }, { "docid": "8715f89620e0e9e4f43c00139fc322ab", "score": "0.65879107", "text": "function getURLVar($str) {\n\treturn isset($_GET[$str]) ? $_GET[$str] : null;\n}", "title": "" }, { "docid": "bd86b1215790470b8e3928819f91bc32", "score": "0.65838206", "text": "public static function getParam($name){\n if(isset(self::$__routerParams[$name]))\n return self::$__routerParams[$name];\n else\n return Null;\n }", "title": "" }, { "docid": "3c78100fc8df69747ba2192137eef6ab", "score": "0.6575429", "text": "public static function getParameterKeyPage()\n\t{\n\t\treturn config('consts.REQUEST_PARAMETER_PAGE');\n\t}", "title": "" }, { "docid": "a9638f30f306f45da6718e49e82d002d", "score": "0.65338767", "text": "public function get_url_params() {\n\t\treturn $this->params['URL'];\n\t}", "title": "" }, { "docid": "5384bacaa407b5313d8ca6420334121e", "score": "0.6527723", "text": "function BKM_get_param( $param, $default = null ) {\n\t\treturn isset( $_GET[ $param ] ) ? $_GET[ $param ] : $default;\n\t}", "title": "" }, { "docid": "409bc3a65642e090f029ee7d5593bf3d", "score": "0.6510183", "text": "public function getParam($param){\n return Container::getParam($param);\n }", "title": "" }, { "docid": "5df468be22663cd50c3c9cbbc469421d", "score": "0.65019417", "text": "function get_query_parameter(string $key): ?string {\n $params = parse_query();\n if (isset($params[$key])) {\n return $params[$key];\n }\n return null;\n}", "title": "" }, { "docid": "252617451463bda333d8e8638f0e4d8a", "score": "0.64876384", "text": "function getParam($component,$default=\"\") {\r\n if (isset($_GET[\"$component\"]))\r\n\t return ($_GET[\"$component\"]);\r\n\t else\r\n\t return ($default);\r\n }", "title": "" }, { "docid": "8e3ed86ce6573c433f56f68ffcc74799", "score": "0.6479704", "text": "function get_param($key){\n if($key && $params[$key]){\n return $params[$key];\n }\n else{\n return NULL;\n }\n }", "title": "" }, { "docid": "501dfc9a0767787025539d08ef6d9d80", "score": "0.6476218", "text": "public function param($key) {\n if ($this->hasParam($key)) {\n $params = $this->getParams();\n $param = $params->get($key);\n return $param;\n }\n else {\n return null;\n }\n\n }", "title": "" }, { "docid": "1b20edc27035222d0d679f7e880c733b", "score": "0.6474953", "text": "function xhprof_get_param_helper($param) {\n $val = null;\n if (isset($_GET[$param]))\n $val = $_GET[$param];\n else if (isset($_POST[$param])) {\n $val = $_POST[$param];\n }\n return $val;\n}", "title": "" }, { "docid": "b135bf2ed1dc3bdc9b9846b535635370", "score": "0.6474103", "text": "public function getParam($name);", "title": "" }, { "docid": "b135bf2ed1dc3bdc9b9846b535635370", "score": "0.6474103", "text": "public function getParam($name);", "title": "" }, { "docid": "50eab2457c9e4cbc544ee35e8bf5094b", "score": "0.6461141", "text": "public function getParam($param)\n {\n if (array_key_exists($param, $this->params)) {\n return $this->params[$param];\n }\n }", "title": "" }, { "docid": "04dc7e5e5ba3eb5ffceb4259b3ec9b30", "score": "0.6437006", "text": "public function getParameter()\n\t{\n\t\treturn $this->params;\n\t}", "title": "" }, { "docid": "e7e2ee2b6b99404e8d7372f76d161fca", "score": "0.64360917", "text": "public function getParameter($key);", "title": "" }, { "docid": "3f8bcb8606c3f77d804645afbfea49fc", "score": "0.642999", "text": "public function get_query_param($param) {\n return $this->get_query()->getParam($param);\n }", "title": "" }, { "docid": "e93a0be36f943f9fb95c67cc5245705f", "score": "0.64226735", "text": "public function getParam($name) {\r\n\t\t$result = null;\r\n\t\t$res = $this->model [self::REQUEST_PARAMS];\r\n\t\tif (isset($res) && count($res)>0){\r\n\t\t\t$result = array_key_exists($name, $res) ? $res[$name] : null; \r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "e4925d21c494f419d67da1babb0fdf2c", "score": "0.64206094", "text": "public function param($name) {\n return $this->params[$name];\n }", "title": "" }, { "docid": "1a94d7ed0c15bab09cb93f03945616e7", "score": "0.6417704", "text": "protected function getParam($key = '')\n {\n if ($key === '') {\n $key = $this->pointer++;\n }\n\n return $this->params[$key];\n }", "title": "" }, { "docid": "0e89926a07d06ffa9d3b0875f39b57d5", "score": "0.64161175", "text": "function getParam($name, $regexp = '/(.*)/') {\n\treturn parseParam(INPUT_GET, $name, $regexp);\n}", "title": "" }, { "docid": "836da468309c73ece40b65cb3cc5828f", "score": "0.63851744", "text": "function getParameter($name)\n{\n\tif (@$_GET[$name])\n\t{\n\t\tif (is_numeric($_GET[$name]))\n\t\t{\n\t\t\treturn $_GET[$name];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn FALSE;\n\t}\n}", "title": "" }, { "docid": "883a1c1fcbbd31682c2ee1bd16ebe82e", "score": "0.63803643", "text": "final public function getParam($param_name) {}", "title": "" }, { "docid": "f44407eb8b736c271ebf03d7d03068c0", "score": "0.6375474", "text": "public function getParam($param)\n {\n return isset(Yii::$app->params[$param]) ? Yii::$app->params[$param] : null;\n }", "title": "" }, { "docid": "0b93eeeeffe9d5d2ef52ba67cc9164c3", "score": "0.63694495", "text": "public function getParam(string $key)\n {\n if (isset($this->params[$key])) {\n return $this->params[$key];\n }\n\n return null;\n }", "title": "" }, { "docid": "1c82354bda5c8eddd90b4ed94b8944cf", "score": "0.63693273", "text": "function get_query_string($key)\n{\n $val = null;\n if (!empty($_GET[$key])) {\n $val = $_GET[$key];\n }\n\n return $val;\n}", "title": "" }, { "docid": "38b8cb90be2cedd0be44643028707489", "score": "0.6366225", "text": "public function get($param);", "title": "" }, { "docid": "aef28e37a34f8672101d3738428e06de", "score": "0.63641036", "text": "public static function getReqParam ($p_iKey) {\n\t\t$aParams = array();\n\t\t$sReturn = false;\n\t\t$aParams = explode('/', $_SERVER['REQUEST_URI']);\n\t\tif (array_key_exists($p_iKey, $aParams) && '' != $aParams[$p_iKey]) {\n\t\t\t$sReturn = $aParams[$p_iKey];\n\t\t}\n\n\t\treturn $sReturn;\n\t}", "title": "" }, { "docid": "271b33fb02e31b3b0e3dec358ff7c555", "score": "0.63433707", "text": "public static function getURLParameter($key, $default = null)\n {\n if (!isset(self::$page)) {\n return;\n }\n\n $params = self::getUriParams();\n\n if (isset($params[$key])) {\n $value = $params[$key];\n\n if ($value == null) {\n $msg = 'FormPrefillerPlugin: Warning: the function getURLParameter returned the default value \"';\n if ($default == null) {\n $msg .= 'null';\n }\n else {\n $msg .= $default;\n }\n $msg .= '\" for the URL parameter \"' . $key . '\"';\n Grav::instance()['debugger']->addMessage($msg);\n return $default;\n } else {\n return $value;\n }\n\n } else {\n $msg = 'FormPrefillerPlugin: Warning: the function getURLParameter returned \"null\" since the URL parameter \"' . $key . '\" was not found';\n Grav::instance()['debugger']->addMessage($msg);\n return null;\n }\n }", "title": "" }, { "docid": "57d57c7f1b58a2599166148bbca9825f", "score": "0.6336882", "text": "public function getParam($param)\n {\n if(array_key_exists($param, $this->_params))\n return $this->_params[$param];\n\n return false;\n }", "title": "" }, { "docid": "dc50c0f6eece79611fdc4e1535c52d66", "score": "0.6335112", "text": "function get_param($param) {\n if (array_key_exists($param, $_REQUEST)) {\n return $_REQUEST[$param];\n } else {\n return NULL;\n }\n}", "title": "" }, { "docid": "fa1bc114fb5e59782c87bfcde0f68b93", "score": "0.63322294", "text": "final public function get($param_name) {}", "title": "" }, { "docid": "624a75babd6f5fd6b9ec4901b547d9bc", "score": "0.63232183", "text": "public static function get($param) {\n\t\treturn isset($_GET[$param]) ? $_GET[$param] : null;\n\t}", "title": "" }, { "docid": "01888ec877a180da8583f5ff864ea796", "score": "0.6318228", "text": "private function getParam($param) {\r\n $request = new Request;\r\n return $request->getParam($param)\r\n\t\t\t?: (array_key_exists($param,$this->twigAtts) ? $this->twigAtts[$param] : $this->settings[$param]);\r\n\t}", "title": "" }, { "docid": "5a6d7833e7041a1c8107bcb2c3711f9b", "score": "0.6312133", "text": "public function getUrlParams();", "title": "" }, { "docid": "9709deda3805dc7bceaac1419a822929", "score": "0.6311336", "text": "public function getKey($key) //Returns $_GET with the value from key\n {\n return $_GET[$key];\n }", "title": "" }, { "docid": "5a551cbe469fd9dec2aa7ba23e6b16a0", "score": "0.629651", "text": "function get_val($name)\n{\n return get_query_str_value($name);\n}", "title": "" }, { "docid": "9fc23ebccf65347171118752164b58bf", "score": "0.628658", "text": "public function getParameter($key)\n {\n return isset($this->params[$key]) ? $this->params[$key] : null;\n }", "title": "" }, { "docid": "a28b06293ece4a006e10aea80d69389f", "score": "0.62729853", "text": "public function getRouteParameterName(): string;", "title": "" }, { "docid": "89b8f6034450c17542063111645f183b", "score": "0.6257604", "text": "public function param(){\n $queryString = filter_input(INPUT_SERVER, 'QUERY_STRING');\n\n /**\n * Realizamos o parse da string\n * \n * Passamos a query string como primeiro parâmetro. \n * Como segundo parâmetro informamos a variável que desejamos\n * inserir o resultado.\n */\n parse_str($queryString, $parseQueryString);\n\n // Resultado da query string\n // var_dump($queryString);\n\n // Resultado do parse da query string\n echo '<pre>';\n // var_dump($parseQueryString);\n echo '</pre>'; \n }", "title": "" }, { "docid": "da060017814af5c271f9fab3dbb7dbbe", "score": "0.6256939", "text": "public static function get($name) {\r\n\t\tif (isset($_GET[$name])) return $_GET[$name];\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "9743688904b8303c9ce44785bed76cdd", "score": "0.62529725", "text": "public function getParam(){ return $this->param; }", "title": "" }, { "docid": "9a7a46ed96fe73312e04366eb7d325ca", "score": "0.62529534", "text": "public function param($param)\n\t{\n\t\tif ( ! isset($this->request->named_params[$param]))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $this->request->named_params[$param];\n\t}", "title": "" }, { "docid": "dac104e7f4397ac50f619c9e4f7ec019", "score": "0.624654", "text": "private function getParam($p_name)\n {\n if (true == isset($_GET[$p_name]))\n $l_value = $_GET[$p_name];\n else if (true == isset($_POST[$p_name]))\n $l_value = $_POST[$p_name];\n else if (true == isset($_FILES[$p_name]))\n $l_value = $_FILES[$p_name];\n else\n return false;\n return $l_value;\n }", "title": "" }, { "docid": "36e06b9a987ce38aac7a911630f881fd", "score": "0.6243693", "text": "private function get_path_param(string $name): string\n {\n /**\n * @var string $registeredRequestPath\n */\n $registeredRequestPath = preg_replace(\"/\\//\", \"\\\\/\", $this->requestPath);\n\n /**\n * @var Request $request\n */\n $request = $this->di->get_service(Request::class);\n\n preg_match(\"/^$registeredRequestPath$/\", $request->requestPath, $matches);\n\n $match = $matches[$name];\n\n error_log(\"Found parameter '$name' to be '$match' in '$request->requestPath' against path '$registeredRequestPath'\");\n\n return $match;\n }", "title": "" }, { "docid": "66f2f4ebc41fd505b6364161c8fc2853", "score": "0.6234773", "text": "public function getParam($name){\r\n \t\t\r\n \t\tif ($this->post){\r\n \t\t\t\r\n \t\t\tif (isset($this->post[$name]))\r\n \t\t\t\treturn $this->post[$name];\r\n \t\t\telse \r\n \t\t\t\treturn false;\r\n \t\t\t\r\n \t\t}\r\n \t}", "title": "" }, { "docid": "c07c90b3ba9961ef1c33b8a48f9e7631", "score": "0.6234067", "text": "public function getParameter($key)\n {\n return isset($this->_params[$key]) ? $this->_params[$key] : null;\n }", "title": "" }, { "docid": "4b616a26440e7108535a314c95ad8d7a", "score": "0.6229187", "text": "public function getParam(string $name){\n\t\treturn $this->params[$name] ?? null;\n\t}", "title": "" }, { "docid": "f13c40f92ede05f27579e0a9897780d6", "score": "0.62193185", "text": "function get_query_str_value($name)\n{\n return (array_key_exists($name, $_GET) ? $_GET[$name] : null);\n}", "title": "" }, { "docid": "b006ee0468355129a332ee74c8227de5", "score": "0.62124777", "text": "private function get_request_parameters() {\n\t\t$uri = $_SERVER[ 'REQUEST_URI' ];\n\t\t$uri = preg_replace( '/^[^?]*(\\?.*$)/', '$1', $uri, 1, $count );\n\t\tif ( $count != 1 )\n\t\t\treturn '';\n\t\treturn $uri;\n\t}", "title": "" }, { "docid": "57630af0bc18c29633aa5a0fb0bb294a", "score": "0.62025696", "text": "public function getParameter($position);", "title": "" }, { "docid": "4aaad94d52209f520dea49cb88bc6f4e", "score": "0.6196994", "text": "function param($name) {\n return Yii::app()->params[$name];\n}", "title": "" }, { "docid": "ec5834790d66912ca5bf688a88361c6a", "score": "0.6191181", "text": "function retrieve_from_get($param, $mandatory = true) {\n\tif (isset($_GET[$param])) {\n\t\treturn urldecode($_GET[$param]);\n\t} else {\n\t\tif ($mandatory) {\n\t\t\tdie_nice(\"Value of $param is expected but not found\");\t\t\t\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ab99c8022bb056a1e1b5e454779f1891", "score": "0.6188987", "text": "final function request($key=false) {\r\n if($_SERVER['QUERY_STRING']) {\r\n parse_str($_SERVER['QUERY_STRING'], $parameters);\r\n if(false !== $key) {\r\n if(!empty($parameters[$key])) { \r\n if($key == 'id') {\r\n return (int)$parameters[$key];\r\n } else {\r\n return $parameters[$key];\r\n }\r\n } else {\r\n return false; \r\n } \r\n } else { \r\n return ($parameters) ? $parameters : false; \r\n } \r\n } \r\n }", "title": "" }, { "docid": "82304c214ac6af9f812ba8c2d0f96ca0", "score": "0.61794883", "text": "public function getParam($key)\n {\n return $this->parameterArray[$key];\n }", "title": "" }, { "docid": "5d070578cb1f31b5c04fa76d887d0c26", "score": "0.6178523", "text": "function get_param($param_name)\r\n{\r\n global $_POST;\r\n global $_GET;\r\n\r\n $param_value = \"\";\r\n if(isset($_POST[$param_name]))\r\n $param_value = $_POST[$param_name];\r\n else if(isset($_GET[$param_name]))\r\n $param_value = $_GET[$param_name];\r\n\r\n return $param_value;\r\n}", "title": "" }, { "docid": "b9bfbc6c96a0219639842dc92c1cc5ed", "score": "0.616353", "text": "public function getPaginatorUrlPage(){\n if(array_key_exists(\"page\",$this->request->getQueryString())){\n $page=$this->request->getQueryString()['page'];\n }\n else{\n $page=1;\n }\n\n return $page;\n }", "title": "" }, { "docid": "bc24ea52cb25337b809ffb31b54839c4", "score": "0.61532676", "text": "private function get($name)\n\t{\n\t\treturn isset($_GET[$name]) ? $_GET[$name] : null;\n\t}", "title": "" }, { "docid": "3ade4442519421b88cb389aab6cbec32", "score": "0.6146227", "text": "public function getValue(Request $request): string\n {\n return $request->get($this->getUrlParameterName()) ?? '';\n }", "title": "" }, { "docid": "448158a3706cf6bf8534a249ca0d4039", "score": "0.61355793", "text": "private function getUriParams() {\n $params = $this->router->getParams();\n if (isset($params) && !empty($params)) {\n return $params;\n }\n return null;\n }", "title": "" }, { "docid": "5951a69cf24334866a13b2f64fd78654", "score": "0.6135143", "text": "public function getAdditionalUrlParam($key)\n\t{\n\t\t$result = isset($this->_additionalUrlParams[$key]) ? $this->_additionalUrlParams[$key] : null;\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "99a28a1812bf1f772483ecd4f0f05498", "score": "0.6134237", "text": "public function get($key)\r\n {\r\n return isset($this->params[$key]) ? $this->params[$key] : null;\r\n }", "title": "" }, { "docid": "a45b8a30da6ebae3786b0f8b072ef6cd", "score": "0.6133745", "text": "function getNumParamUrl($url) {\n\n // Normalizamos la url\n $url = normalizeUrl($url);\n\n // Creamos un array\n $urlArray = explode('/',$_SERVER['REQUEST_URI']);\n\n // Contamos el numero de elementos\n $numParam = count($urlArray);\n\n // Comprobamos si el ultimo elemento esta vacio\n if ( $urlArray[$numParam-1] == \"\" )\n $numParam = $numParam - 1;\n \n return $numParam; \n}", "title": "" }, { "docid": "73a1ba436add04c23d93428d863eac70", "score": "0.6130109", "text": "protected function getQueryStringParameters()\n {\n $parts = parse_url($this->url);\n\n if(\\array_key_exists('query', $parts))\n {\n return Parameter\\Parameter::fromQueryString($parts['query']);\n }\n\n return null;\n }", "title": "" }, { "docid": "fbc665471ed8209f590b5c52b1a5ff99", "score": "0.6128541", "text": "function getValueFromGET(string $key) {\n if (isset($_GET[$key])) {\n return $_GET[$key];\n } else {\n return NULL;\n }\n}", "title": "" }, { "docid": "0c8ab25281c03bf7d5cf820559d36d12", "score": "0.61264443", "text": "function getParam( $name ) {\n\t\t$db = JFactory::getDbo();\n\t\t$db->setQuery('SELECT manifest_cache FROM #__extensions WHERE name = \"com_ticketmaster\"');\n\t\t$manifest = json_decode( $db->loadResult(), true );\n\t\treturn $manifest[ $name ];\n\t}", "title": "" }, { "docid": "5e8e9a7716d9da94adeb58940d6516e4", "score": "0.6123693", "text": "static public function getParameterFromQueryString( $urlQuery, $parameter)\n\t{\n\t\t$nameToValue = self::getArrayFromQueryString($urlQuery);\n\t\tif(isset($nameToValue[$parameter]))\n\t\t{\n\t\t\treturn $nameToValue[$parameter];\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "eb22e6f87e4f9042567e47f9b5f43729", "score": "0.6110669", "text": "public function get_trip_url_data(){\n // process the url parameter \n $parameter = $_SERVER['REQUEST_URI'];\n $query = parse_url($parameter, PHP_URL_QUERY);\n parse_str($query, $params);\n $trip_post_id = false;\n if(!empty($params)){ //ok??\n $trip_post_id = $params['tid'];\n }\n return $params;\n }", "title": "" }, { "docid": "fe27f54211f14f9e002ab5d56187a18e", "score": "0.6109553", "text": "public abstract function getParameter($key);", "title": "" }, { "docid": "dc7ac4913e762b7d972055aabc4cd2f3", "score": "0.6108189", "text": "public function getPageVar()\n {\n return sanitize_key( $_GET['page'] );\n }", "title": "" }, { "docid": "5f8464a24db75670cf19d8b496b797ec", "score": "0.61058813", "text": "public function getParam($name) {\r\n\t\treturn $this->_param->getItem($name);\r\n\t}", "title": "" }, { "docid": "3afbcd9e965f8bae4d19632b39940784", "score": "0.6099381", "text": "function getParam( $name ) {\n\t\t$db = JFactory::getDbo();\n\t\t$db->setQuery('SELECT manifest_cache FROM #__extensions WHERE name = \"com_jhacks\"');\n\t\t$manifest = json_decode( $db->loadResult(), true );\n\t\treturn $manifest[ $name ];\n\t}", "title": "" }, { "docid": "1442e979c7a49efaf30058d464dc5a6b", "score": "0.6090261", "text": "static public function get($key)\n {\n if (!isset($_GET[$key]))\n {\n return null;\n }\n\n return $_GET[$key];\n }", "title": "" }, { "docid": "71796c8abf289a61d38914570bc237cd", "score": "0.6088195", "text": "function getVar($item){\r\n\treturn isset($_GET[$item]) ? $_GET[$item] : '';\r\n}", "title": "" }, { "docid": "ffee7f03d08037f8c58e879124455b4a", "score": "0.6086519", "text": "function get($key) {\n if (isset($_GET[$key])) {\n return $_GET[$key];\n }\n return null;\n}", "title": "" }, { "docid": "b730730abce7cb1d275cabfd8035515f", "score": "0.60788786", "text": "function get_route_param($request, $cnt, $callback)\n {\n foreach(preg_split('/\\//', $request) as $param)\n {\n $param_name = str_replace(':', '', $param);\n if(preg_match('/:'.$param_name.'*/', $param))\n {\n foreach(preg_split('/\\//', $_SERVER['REQUEST_URI']) as $key => $value)\n {\n $req = preg_replace('/:'.$param_name.'/', $value, $request);\n if($_SERVER['REQUEST_URI'] === $req)\n {\n if($key === $cnt)\n {\n call_user_func($callback, $value);\n exit;\n }\n }\n }\n }\n $cnt++;\n }\n }", "title": "" }, { "docid": "915613e6de52ec7b451831e514fbff4d", "score": "0.6076775", "text": "function get_server_parameter($uri, $parameter)\n{\n $server = get_primary_server($uri);\n $command = new Command(['getParameter' => 1, $parameter => 1]);\n $cursor = $server->executeCommand('admin', $command);\n\n return current($cursor->toArray())->$parameter;\n}", "title": "" }, { "docid": "87e51ce678993728e9f9ff43f53d1727", "score": "0.6072431", "text": "public function getParam($name){\n return (isset($this->_params[$name])) ? $this->_params[$name] : false;\n }", "title": "" }, { "docid": "9ac2745c73b22430404faecc7369bc69", "score": "0.6066777", "text": "public function getParam($index) {\n if (!isset($this->params[$index])) {\n throw new \\InvalidArgumentException('Route parameter does not exist at specified index');\n }\n\n return $this->params[$index];\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "c21aff0371874e30c29e85d360a3e1f6", "score": "0.0", "text": "public function index()\n {\n $transaction = Transaction::latest();\n return $this->sendResponse(TransactionResource::collection($transaction->take(5)->get()), 'Total records: '. $transaction->count());\n }", "title": "" } ]
[ { "docid": "1d384f4e78f98647387c1b7298b0696a", "score": "0.7473819", "text": "public function index ()\n {\n $this->list();\n }", "title": "" }, { "docid": "4bed8c9cfd05d9666f1acd8791970421", "score": "0.7459576", "text": "public function index()\n {\n /** @var \\Colibri\\Database\\ModelCollection $items */\n $items = new $this->listClass();\n $this->applyListFilters($items);\n $items->load();\n\n $this->template->vars[$this->listTplVar] = $items;\n if ($this->pagedList) {\n $this->template->vars['pagination'] = [\n 'page' => (int)(isset($_GET['page']) ? $_GET['page'] : 0),\n 'recordsPerPage' => $items->recordsPerPage,\n 'recordsCount' => $items->recordsCount,\n 'pagesCount' => $items->pagesCount,\n 'base_url' => '/' . $this->division . '/' . $this->module,\n ];\n }\n }", "title": "" }, { "docid": "fd728130e464c7ca0e936873b067ad9b", "score": "0.74560034", "text": "public function index()\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n\n $select = ['id'];\n $eagerLoad = [];\n foreach($resource->fields as $field)\n {\n if($field->list) $select[] = $field->slug;\n\n if($field->type == 'relational')\n {\n $eagerLoad[] = $field->data('method');\n }\n }\n\n $model = $this->getModel($resource);\n $entities = $model::with($eagerLoad)->select($select)->get();\n\n $hasObjects = false;\n if(method_exists($model, 'objects')) $hasObjects = true;\n\n return view('laramanager::resource.index', compact('resource', 'entities', 'hasObjects'));\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.74244565", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "53e8cdd7001e03b480caa697d00c6da2", "score": "0.7394859", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "c66f120116ada3a42cc9932c701e6a9d", "score": "0.73434174", "text": "public function listAction()\n {\n $bookRepository = new BookRepository();\n $books = $bookRepository->getAll();\n\n $argsArray = [\n 'books' => $books\n ];\n $templateName = 'list';\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "title": "" }, { "docid": "f89eac18f2fecb9e12a4e0696258300d", "score": "0.7321191", "text": "public function listing()\n {\n return $this->render(\"listing.html.twig\");\n }", "title": "" }, { "docid": "27e6e4cef6757eab4dd656d684b1f18f", "score": "0.7299876", "text": "public function index()\n {\n if (Input::get('ajax')) {\n return $this->_resourcePersistence->getAll($this->_getListOrder(), $this->_getQueryConditions());\n }\n\n return view('admin.' . $this->resource . '.index')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72476006", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eb8bf6d357654d40e9f3c6be964ff840", "score": "0.72381365", "text": "public function index()\n {\n $data = $this->model->all();\n return view('admin::resource.index', [\n 'items' => $data,\n 'model_name' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "1a9358d5e70acc9743aa95c2f18698aa", "score": "0.72165006", "text": "public function listAction()\n {\n $this->View()->assign(\n $this->getList(\n $this->Request()->getParam('start', 0),\n $this->Request()->getParam('limit', 20),\n $this->Request()->getParam('sort', []),\n $this->Request()->getParam('filter', []),\n $this->Request()->getParams()\n )\n );\n }", "title": "" }, { "docid": "09297f1ea9fe181abebbfadcb8142222", "score": "0.7187013", "text": "public function index(){\n $this->listItems();\n }", "title": "" }, { "docid": "ecc2dbc48848a139f5406206edda7fd6", "score": "0.70593333", "text": "function seeAll() {\n $results = array();\n $data = Resource::getList();\n $results['resources'] = $data['results'];\n $results['totalRows'] = $data['totalRows'];\n $results['pageTitle'] = \"Resource Archive | Couch To Code\";\n require( $TEMPLATE_PATH . \"/archive.php\" );\n}", "title": "" }, { "docid": "1e170838915eaf18af92a3ce754576f4", "score": "0.70547915", "text": "public function index()\n {\n $this->setResources();\n\n $modelResource = new $this->Model;\n\n $filter = Input::get('filter');\n\n $perPage = Input::get('per_page');\n\n $sort = Input::get('sort');\n\n if ($perPage) $modelResource->setPerPage($perPage);\n\n $filterBy = $modelResource->getFilterBy();\n\n $sortBy = $modelResource->getSortBy() ?: $filterBy;\n\n $sort = $sort ? explode('|', $sort) : [$sortBy, 'asc'];\n\n if (!$filter) {\n return new $this->ResourceCollection(\n $modelResource::orderBy($sort[0], $sort[1])->paginate()\n );\n }\n\n return new $this->ResourceCollection(\n $modelResource::where(\"$filterBy\", 'like', \"%$filter%\")\n ->orderBy($sort[0], $sort[1])\n ->paginate()\n );\n }", "title": "" }, { "docid": "1bc9d0eeecbb5965922934931cecd66c", "score": "0.7042833", "text": "public function index()\n { \n //Get entries\n $entries = Entry::paginate(10);\n \n //Return collection of entries as a resource\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "d64ddf4f7bf215d8ac46dc7bbfb1a5eb", "score": "0.7027666", "text": "public function listAction()\n {\n $this->_useAdditionalContent = true;\n \t\n \t$dataType = $this->_request->getParam('dataType');\n if($dataType == 'data'){\n \t// Abstract route\n \tthrow new Lib_Exception(\"dataType 'data' not allowed for listAction\");\n }\n $page = $this->_getParam('page', 1);\n $result = Data_Utils::getList($this->_user, $this->_acl, $dataType, $page);\n $items = $this->_paginateData($result['select'], $page, $result['itemsPerPage']);\n\n if(count($items)){\n \t$item = $items->getIterator()->current();\n } else {\n \t$table = ucfirst($dataType);\n \t$table = new $table();\n \t$item = $table->fetchNew();\n }\n Zend_Registry::set('Category', $item->getCategory());\n Zend_Registry::set('SubCategory', $item->getSubCategory());\n\n $this->_helper->layout->setLayout($item->getLayout(Data::ACTION_LIST));\n\n $this->view->items = $items;\n $this->view->dataType = $dataType;\n $this->view->separateFirstContentCardHeader = true;\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.6991144", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "42bf79f7c36bcd7921da4ede6d5056e2", "score": "0.6954485", "text": "public function lists()\n\t{\n\t\t$pics = Picture::all();\n\t\treturn view('default.rc.resources.lists')->with('pics', $pics);\n\t}", "title": "" }, { "docid": "673459c7290880615c394e798a3f1a65", "score": "0.69081354", "text": "public function index()\n {\n return ReadingListResource::collection(ReadingList::all());\n }", "title": "" }, { "docid": "11b3547fc126f6093eb0a2e7e0aef2eb", "score": "0.68980336", "text": "public function listAction()\n {\n $pages = \\Page\\Model\\Page::find();\n $filter = new \\Api\\Filter\\PagesList();\n $payload = new \\Api\\Model\\Payload($filter->filter($pages));\n\n return $this->render($payload);\n }", "title": "" }, { "docid": "76af57d44f9f03d2c164c16d1a203b35", "score": "0.6875141", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "d5424d838a7b9b5f2347c4e6d78a4dae", "score": "0.68668294", "text": "public function indexAction()\n\t{\n\t\t$page = $this->getRequest()->getParam('page');\n\n\t\t$resources = Application_Model_Document_Resource::all();\n\t\t// Store the resources in the view so it can render them with partials\n\t\t$this->view->resources = $resources;\n\t\tforeach($resources as $resource) {\n\t\t\t$array[] = $resource;\n\t\t}\n\t\t$paginator = Zend_Paginator::factory($array);\n\t\t$paginator->setCurrentPageNumber(intval($page));\n\t\t$paginator->setItemCountPerPage(8);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "1a97cf3e4d924e503cce423b0ca0da55", "score": "0.6864631", "text": "public function listAction()\n\t{\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\t\t\t\t\n\t\t\n\t\t$paginator = $this->_getPagedData();\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\t\t\n\t\t$this->_model->setRelationships($records);\t\t\n\n\t\t$html = new Fgsl_Html();\t\t\n\t\t$this->_table = $html->createTable($records);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->view->render('list.phtml');\n\t}", "title": "" }, { "docid": "ae4b114ffb14ab57ea0164b2b2a1e2a9", "score": "0.685581", "text": "public function listing()\n {\n $mode = Input::get('mode') ?: \"search\";\n\n switch ($mode) {\n case 'roots':\n $roots = $this->listRootNodes();\n return response()->json(['data' => $roots]);\n case 'search':\n $page = Input::get('page')?: 1;\n $pageInfoArray = $this->listPage($page);\n return response()->json($pageInfoArray);\n default:\n return response()->json(['message' => 'Invalid search mode', 'errors' => array()])\n ->setStatusCode(400, '');\n }\n }", "title": "" }, { "docid": "b446e47526e7914ef4bdc3737ae4f077", "score": "0.6844303", "text": "public function list(){\n\t\t$this->load->view('listing');\n\t}", "title": "" }, { "docid": "761494348df8b3750a8a88c51e0b7195", "score": "0.68384546", "text": "public function actionList()\n {\n if(!in_array('list',$this->crudActions))\n throw new CHttpException('404 Not Found');\n\n $this->render(Yii::app()->request->isAjaxRequest ? $this->listPartial : $this->listView);\n }", "title": "" }, { "docid": "87f5741441fb47fe705676a54aca43a4", "score": "0.683181", "text": "public function actionList()\n {\n $loansearch= new LoanSearch();\n $dataProvider = $loansearch->search(Yii::$app->request->get());\n \n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'searchmodel' => $loansearch\n ]);\n }", "title": "" }, { "docid": "87bb478103dde18bab9318d72db00152", "score": "0.68226445", "text": "public function index()\n\t{\n\t\t$items = Item::all();\n\t\treturn \\View::make('Item/list_item',compact('items'));\n\t}", "title": "" }, { "docid": "d6f559efcd790aae0721cec604c5738a", "score": "0.6776144", "text": "public function listAction()\n {\n $frontEndDiscountsService = $this->container->get('dft_foapi.front_end_discounts');\n\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $frontEndDiscountsService->fetchAll($this->getAuthenticatedUserIdAndSubAccountIds())\n ));\n }", "title": "" }, { "docid": "d1b243aa3b9ada5174dcd3dee5386a71", "score": "0.67758155", "text": "public function actionList() {\n\t\t$searchModel = DynamicSearchRecord::forModel ( $this->modelClassname );\n\t\t$dataProvider = $searchModel->search ( \\Yii::$app->request->queryParams );\n\t\t\n\t\treturn $this->owner->render ( 'list.json', [ \n\t\t\t\t'searchModel' => $searchModel,\n\t\t\t\t'dataProvider' => $dataProvider \n\t\t] );\n\t}", "title": "" }, { "docid": "48bfc0bd9a7b31cd041cca86fc310bff", "score": "0.67650235", "text": "public function listing() {\n\n $this->getMapper()->tableExists();\n\n // process any paging params\n $offset = 0;\n $limit = 10;\n $order = $this->getMapper()->getKey();\n $asc = TRUE;\n\n // process any offset requirements\n if ($this->request->getQueryParam('offset') !== NULL && is_numeric($this->request->getQueryParam('offset'))) {\n $offset = $this->request->getQueryParam('offset');\n }\n\n // process any limit requirements\n if ($this->request->getQueryParam('limit') !== NULL && is_numeric($this->request->getQueryParam('limit'))) {\n $limit = $this->request->getQueryParam('limit');\n }\n\n // process any order parameters\n if ($this->request->getQueryParam('order') !== NULL) {\n if (property_exists($this->mapper->getModel(), $this->request->getQueryParam('order'))) {\n $order = $this->request->getQueryParam('order');\n }\n }\n\n // process any asccending/decending requirements\r\n if ($this->request->getQueryParam('desc') !== NULL) {\r\n $asc = FALSE;\r\n }\n\n // ensure we arent passing in keys in query params ?keys=1,2,3,4 etc\n if ($this->request->getQueryParam('keys') !== NULL) {\n // List by id\r\n $result = $this->getMapper()->load_multiple(explode(',', $this->request->getQueryParam('keys')), $offset, $limit, $order, $asc);\n $data = $result['list'];\n $total = $result['total'];\n }\n else {\n // List all\n $result = $this->getMapper()->listing(NULL, $offset, $limit, $order, $asc);\n $data = $result['list'];\r\n $total = $result['total'];\n }\n\n // set the data\n $this->response->setMeta(array(\n 'order' => $order,\n 'offset' => $offset,\n 'limit' => $limit,\n 'direction' => ($asc == TRUE) ? 'ASC' : 'DESC',\n 'count' => count($data),\n 'total' => $total\n ));\n $this->response->setData($data);\n\n // Set response\n if (!empty($data)) {\n $this->response->setHeader('__OK', Http::Response(Http::OK));\n return TRUE;\n }\n $this->response->setHeader('__NOT_FOUND', Http::Response(Http::NOT_FOUND));\n return TRUE;\n }", "title": "" }, { "docid": "d711cb52a8e6005890b369293af69e7b", "score": "0.67593193", "text": "public function index()\n {\n $Recipes = Recipe::with('ingredients')->orderBy('name', 'asc')->paginate(15);\n return RecipeResource::collection($Recipes);\n }", "title": "" }, { "docid": "4af89c443382295cf45d3e2622ace5f2", "score": "0.6759307", "text": "public function show_list(){\n\t\t$fields\t\t\t = $this->get_fields();\n\t\t$display_fields\t = $fields;\n\t\t$db_fields\t\t = array_keys($fields);\n\t\t$this->set_fields($db_fields);\n\t\t$this->set_filters($this->get_filters_filter());\n\t\t$count\t\t\t = $this->get_count($this->get_filters());\n\t\t$this->set_row_count($count);\n\t\t$rows\t\t\t = $this->get_all($this->get_filters(), true);\n\t\t$this->un_set_fields();\n\t\tif($count == 1){\n\t\t\t$id\t\t\t\t = $rows[0][$this->get_primary_id_col()];\n\t\t\t$params\t\t\t = array();\n\t\t\t$params['id']\t = $id;\n\t\t\tif($this->needs_sub_table()){\n\t\t\t\t$params['sub_id'] = $rows[0][$this->get_sub_id_col()];\n\t\t\t}\n\t\t\t$params['action'] = 'edit';\n\t\t\t$this->redirect('', $params);\n\t\t}\n\t\t$col_count\t = count($fields);\n\t\t$filter_url\t = $this->get_ctrl_url();\n\t\t$this\n\t\t\t\t->assign('rows', $rows)\n\t\t\t\t->assign('fields', $display_fields)\n\t\t\t\t->assign('filter_url', $filter_url)\n\t\t\t\t->assign('col_count', $col_count)\n\t\t\t\t->view('list');\n\t}", "title": "" }, { "docid": "ff7b9b0b2610bec017a23bdf07c0fadc", "score": "0.6750291", "text": "public function index()\n {\n\n // SECURITY:\n // if view_table_permission is false, abort\n if (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n abort(403, 'Not allowed.');\n }\n\n // get all results for that entity\n $model = $this->crud['model'];\n\n if (isset($this->crud['is_translate']) && $this->crud['is_translate'] == true) {\n $this->data['entries'] = $model::orderby('id', 'ASC')->get();\n } else {\n $this->data['entries'] = $model::all();\n }\n\n // add the fake fields for each entry\n //dd($this->data['entries']);\n //foreach ($this->data['entries'] as $key => $entry) {\n // $entry->addFakes($this->getFakeColumnsAsArray());\n //}\n\n $this->prepareColumns();\n $this->data['crud'] = $this->crud;\n\n // load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\n return $this->firstViewThatExists('vendor.infinety.crud.list', 'crud::list', $this->data);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6741554", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "d68899c3dabc0c21b0b2be7724f8030d", "score": "0.6738529", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Part Subtitute - '.APP_NAME;\n $this->global['pageMenu'] = 'List Part Subtitute';\n $this->global['contentHeader'] = 'List Part Subtitute';\n $this->global['contentTitle'] = 'List Part Subtitute';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "06f27ec9bf146b469adbf2e6705aabe8", "score": "0.6732749", "text": "public function index()\n {\n $pagination = new Pagination();\n $options = array();\n $pagination->setTotal(call_user_func_array([$this->_modelName, 'count'], array($options)));\n $options['limit'] = $pagination->rowsPerPage;\n $options['page'] = $pagination->offset;\n $records = call_user_func_array([$this->_modelName, 'all'], array($options));\n $this->set(compact('records', 'pagination'));\n }", "title": "" }, { "docid": "c71795f30a5bb75ebbd3e292fb5e8a4b", "score": "0.6732653", "text": "public function index()\n {\n return ProspectListResource::collection(Prospect::paginate());\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67259544", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "652313a0e1da74ef567bfde3163208da", "score": "0.6711489", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->get());\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "09d6b29a7dfc37d687e4be6b37813ff1", "score": "0.66844803", "text": "private function listing()\n {\n //List partners\n $PartnersLib = new PartnersLib($this->DB);\n $this->responseSetContent($PartnersLib->listing());\n }", "title": "" }, { "docid": "66b2855c608ff83c2186cf3c1df31163", "score": "0.66809165", "text": "public function Index()\n\t{\n\t\t$data = parent::_ListData($this->_getPageTitle($this->method), 1000, \"parent_id = \".$this->db->escape_str($this->parent_id), \"\", $this->parent_id.\"/\", \"sort\", \"asc\");\n\n\t\t$data['tpl_page'] = $this->_getController().'/list';\n\t\tparent::_OnOutput($data);\n\t}", "title": "" }, { "docid": "69c11dee847c7c0490ac6622948612f7", "score": "0.66787595", "text": "public function index()\n {\n return view('resource-collections.index', ['resourceCollections' => ResourceCollection::orderBy('title')->get()]);\n }", "title": "" }, { "docid": "79017f87f771247f39999d976e80538f", "score": "0.66767514", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getViews();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "d6bd209eea7a909ec1bbf56afae413a6", "score": "0.6675973", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Search')->findAll();\n\n return $this->render('AppBundle:Search:list.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "8f532ae29d0271e5352287d73bdf275b", "score": "0.6675399", "text": "public function index()\n\t\t{\n\t\t\t// Consolidate data\n\t\t\t$data = array('hello' => 'world');\n\n\t\t\t// Handle request\n\t\t\tswitch (\\Request::format())\n\t\t\t{\n\t\t\t\tcase 'json':\n\t\t\t\t\treturn Response::json($data); // API\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->layout->content = \\View::make('scores::admin.listing', $data); // HTML\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5b2bfe4741f53980dfae4fe18136b3f9", "score": "0.6667397", "text": "public function consolesListingPage() {\n Auth::redirectToLoginIfNotLoggedIn();\n\n $data['title'] = 'Consoles';\n $data['message'] = 'Here is the entire listing of available consoles.';\n $data['no-consoles'] = \"Sorry, there aren't any consoles available yet.\";\n $data['consoles'] = \\services\\Console::createConsoleObjectArray();\n\n View::rendertemplate('header', $data);\n View::render('consoles/consoles', $data);\n View::rendertemplate('footer', $data);\n }", "title": "" }, { "docid": "26b71fb578321a0935c2ecdff45d3b80", "score": "0.6665426", "text": "public function listAction()\n {\n return $this->render(\n 'AppBundle:employee:list.html.twig',\n [\n 'employees' => $this->get('employee')->loadEmployees(),\n ]\n );\n }", "title": "" }, { "docid": "02a808be513bd750788350c882906a0c", "score": "0.66600233", "text": "public function index() {\n // Get pagination parameters\n $fields = \\Core\\App::getInstance()->request->get(\"fields\");\n $fields = explode(\",\", $fields);\n\n $limit = \\Core\\App::getInstance()->request->get(\"limit\");\n $offset = \\Core\\App::getInstance()->request->get(\"offset\");\n $sort = \\Core\\App::getInstance()->request->get(\"sort\");\n $order = \\Core\\App::getInstance()->request->get(\"order\");\n $search = \\Core\\App::getInstance()->request->get(\"search\");\n $where = \\Core\\App::getInstance()->request->get(\"where\");\n $filter = json_decode(\\Core\\App::getInstance()->request->get(\"filter\"), true);\n\n // Get the data\n $data = \\Helpers\\Database::getObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $offset, $limit, $sort, $order, $filter);\n $count = \\Helpers\\Database::countObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $filter);\n\n // Send response\n \\Helpers\\Response::success([\n 'total' => $count,\n 'rows' => $data\n ]);\n }", "title": "" }, { "docid": "a3406c7ff6face6ebd5912a2a062298a", "score": "0.66531575", "text": "public function listAction()\n\t{\n\t\t$list = $this->db->select();// recuperation les infomations relatif a la function Select du fichier Database.php.\n\t\techo $this->twig->render('listPost.html',\n\t\t\t[\n\t\t\t\t\"list\" => $list\n\t\t\t]\n\t\t);\n\n\t}", "title": "" }, { "docid": "79f5369358653dfc5bbd4ed88772cc37", "score": "0.66478455", "text": "public function index()\n {\n //method show all Tags\n return TagResource::collection(Tag::paginate());\n }", "title": "" }, { "docid": "3e2f78b81b111995e32d53c1e5113d60", "score": "0.66314673", "text": "public function index()\n {\n return view('resource.row',\n [\n 'resources' => Resources::with('category', 'reservation')\n ->get()\n ]);\n }", "title": "" }, { "docid": "4eecf023369060252d00f8bf4fee5c2b", "score": "0.6629757", "text": "public function index()\n {\n return $this->show(\"All\");\n }", "title": "" }, { "docid": "28aaefde81bffe6c35ee93653410bbe4", "score": "0.6615564", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MInformations::getInstance()->getListSelect($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "0ce098c670548596cee63a4f7a02e6d6", "score": "0.66105694", "text": "public function list() { \n try {\n $list = $this->listModel->getList($_POST['pageNo']);\n if($list) {\n $this->response($list,200,'Success');\n } else {\n $this->response('',204,'No content');\n } \n } catch(Exception $ex) {\n $this->response('',500,'Error');\n } \n }", "title": "" }, { "docid": "01f5c196228688f47955dc605b965462", "score": "0.6608302", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Engineers - '.APP_NAME;\n $this->global['pageMenu'] = 'List Engineers';\n $this->global['contentHeader'] = 'List Engineers';\n $this->global['contentTitle'] = 'List Engineers';\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['readonly'] = $this->readonly;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "7f1c8a5ab63c01e02fb3ba65a1e27120", "score": "0.6605376", "text": "public function index()\n {\n return StudentResource::collection($this->studentRepository->list());\n }", "title": "" }, { "docid": "09ff54f3ae80db26f6fde9cf6871ccdc", "score": "0.65956867", "text": "public function index()\n {\n // Get all Intents\n $intents = Intent::paginate(50);\n\n return IntentResource::collection($intents);\n }", "title": "" }, { "docid": "38d10de11fa88686187f73576fe11a7c", "score": "0.65757704", "text": "public function index()\n {\n View::share('resourceUrl', $this->resourceUrl);\n \n $photos = PhotoModel::all()->toArray();\n $babys = \\BabyModel::all()->lists('name', 'id');\n \n $this->layout->with('title', '列表');\n $this->layout->content = View::make( $this->resourceUrl . 'index' )->with(compact('photos', 'babys'));\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65741694", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "f9a0a7fc5de7f0a8c0c42ac168169d27", "score": "0.65737057", "text": "public function index()\n {\n $books = Book::all();\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "643e2e525a9956d4f3d154800f2706fb", "score": "0.6567787", "text": "public function index()\n {\n // Get all the resources list.\n\n $contacts = Contact::orderBy('id', 'asc')->paginate(10);\n \n // Check if there is no resource.\n if(is_null($contacts)) {\n return response()->json([\"message\"=>\"No Contact found.\", \"data\"=>[], \"errors\"=>[], \"success\"=>true], 204);\n }\n // Return the list of resources.\n return response()->json([\"message\"=>\"Contacts list.\", \"data\"=>$contacts, \"errors\"=>[], \"success\"=>true], 200);\n }", "title": "" }, { "docid": "c4b3a61da5b12f663884b5e9ad36c7d1", "score": "0.6566602", "text": "public function index()\n {\n $products = Product::paginate(12);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "2e6cf3266883ceb02caa28803bff3287", "score": "0.65662384", "text": "public function indexAction()\n {\n return $this->forward()\n ->dispatch(\n $this->params()\n ->fromRoute( 'controller', get_called_class() ),\n array(\n 'action' => 'list',\n 'locale' => (string) $this->locale(),\n )\n );\n }", "title": "" }, { "docid": "98b6312310ec07ad4be1841adb403ce3", "score": "0.6565894", "text": "public function actionList() {\n $data = Yii::app()->db->createCommand('SELECT * from products')->queryAll();\n // or $data = Products::model()->findAll();\n $dataProvider = new CArrayDataProvider($data, array(\n 'pagination' => array('pagesize' => 10),\n ));\n $this->render('list', array(\n 'dataProvider' => $dataProvider,\n ));\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.6564687", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\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->getListView(), $this->data);\n }", "title": "" }, { "docid": "131cc08b0e6134cac1d6af3250da5d11", "score": "0.6564497", "text": "public function list()\n {\n //\n return view('admin.onepage.list');\n }", "title": "" }, { "docid": "54d7b491cb48bf1dc5aa48e4b70243e8", "score": "0.65609133", "text": "public function index()\n {\n //Get Suppliers\n $suppliers = Supplier::paginate(100);\n\n //Return collection of suppliers as resource\n return SupplierResource::collection($suppliers);\n }", "title": "" }, { "docid": "eab040e429e9d0ed7c49740991e16b6a", "score": "0.6554028", "text": "public function actionList()\r\n {\r\n //All Sites\r\n $allSites = new Site('search');\r\n $allSites->unsetAttributes();\r\n if (isset($_GET['Site']))\r\n $allSites->attributes = $_GET['Site'];\r\n\r\n $this->render('list', array(\r\n 'allSites' => $allSites,\r\n 'gridViewSettings' => Site::gridViewSettings(),\r\n ));\r\n }", "title": "" }, { "docid": "b5dabee7628f504a4f1332387216fe1b", "score": "0.6541034", "text": "public function index()\n\t{\n\n\t\t$this->set(strtolower($this->modelNamePlural), $this->model->getAll());\n\n\t\t$this->render('index');\n\t}", "title": "" }, { "docid": "bce9b2084302b70f248236ecc9038792", "score": "0.65380895", "text": "public function index()\n {\n try {\n $keywords = $this->request->query('keywords');\n $where = $this->request->query('where');\n $category_id = $this->request->query('category_id');\n\n $listings = $this->service\n ->search($keywords, $where, $category_id)\n ->sortByDesc('created_at');\n\n if ($this->paginate !== null) {\n $listings = $listings->paginate($this->paginate);\n }\n\n return new ListingResourceCollection($listings);\n } catch (Exception $ex) {\n return parent::handleException($ex);\n }\n }", "title": "" }, { "docid": "4f95d8e48aed5748b1d47771a5c780ff", "score": "0.65324086", "text": "public function index()\n {\n // Get divisions\n $divisions = Division::latest()->paginate(5);\n\n // Return collection of divisions as a resource\n return DivisionResource::collection($divisions);\n }", "title": "" }, { "docid": "bdc3df82aa2775b984746ad43f1f270d", "score": "0.6528513", "text": "public function listAction() {\n //Render the list twig\n return $this->render('MesdReportDemoBundle:Report:list.html.twig');\n }", "title": "" }, { "docid": "b3239f030ba6e204500bc8512083d8dd", "score": "0.6527421", "text": "public function index()\n {\n return ProgramsResource::collection(Program::paginate(15));\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.6525558", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "a590bbd0ca49f8f16ccf69ff4c577785", "score": "0.65194494", "text": "public function index()\n {\n $sortieDetails = SortieDetails::all();\n\n // Return collection of sortie_details as a resource\n return SortieDetailsResource::collection($sortieDetails);\n }", "title": "" }, { "docid": "d88f7c52ab4450961acca7bf2dca42d7", "score": "0.6513779", "text": "public function displayList()\n\t{\n\n\t\t$this->lAdmin->DisplayList();\n\t}", "title": "" }, { "docid": "339c0962f54b7e532fa1290f675bd8c4", "score": "0.65043586", "text": "public function action_listing()\n\t{\n\t\t// populate data array\n\t\t$data = Table::get_all_data();\n\n\t\tif ($submit = \\Input::post('submit'))\n\t\t{\n\t\t\t// update table data via post and redirect\n\t\t\tTable::update_data(\\Input::post(null));\n\n\t\t\t// choose redirect action\n\t\t\tif ($submit == 'Back')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'prev');\n\t\t\t}\n\n\t\t\tif ($submit == 'Next')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'next');\n\t\t\t}\n\n\t\t\t\\Response::redirect($action);\n\t\t}\n\n\t\t// set common template vars\n\t\tself::_set_template_vars($this->template);\n\t}", "title": "" }, { "docid": "e2c39459334902c7d856712c054793ec", "score": "0.65042305", "text": "public function index()\n {\n return $this->resourceCollection($this->model->with('teams')->get());\n }", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.65033627", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "b7bae9c804826cdd9b0c94669ad36536", "score": "0.65027165", "text": "public function index()\n {\n $request = $this->makeRequest('index');\n $result = $this->service->getAll();\n\n return $this->maybeMakeResource('collection', $result);\n }", "title": "" }, { "docid": "56cb1332aceddef95a5e1453e37d8832", "score": "0.65020365", "text": "public function listAction()\n {\n try {\n $this->collectParameters();\n $this->findAirports();\n \n return $this->listActionResponse();\n } catch (\\Exception $e) { // Log exception and return an error response\n return $this->buildErrorResponse($e);\n }\n }", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6498298", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "97eab9d51e99c2a53b12711e284a2665", "score": "0.6498256", "text": "function display() {\n\t\t$this->getDefaultView()->setListingId(KRequest::getInt('listing_id'))->display();\n\t}", "title": "" }, { "docid": "b806629cb8d4f33084d6c8e3071e3f35", "score": "0.6497256", "text": "public function listAction()\n {\n $params = $this->params();\n $request = $this->getRequest();\n $bodyOnly = $request->isXmlHttpRequest();\n $page = $params->fromRoute( 'page',\n $request->getPost( 'page',\n $request->getQuery( 'page', 1 )\n )\n );\n\n $view = new ViewModel( array(\n 'paginator' => $this->getPaginator(),\n 'page' => ( (int) $page ) ?: 1,\n 'format' => $bodyOnly,\n ) );\n\n if ( $bodyOnly )\n {\n $view->setTerminal( true );\n }\n\n return $view;\n }", "title": "" }, { "docid": "47edbc785ea53823a4f3981e16262e11", "score": "0.6496637", "text": "public function index()\n {\n // Get all clubs\n $clubs = Club::all();\n\n // Return club as a collection of resources\n return ClubResource::collection($clubs);\n }", "title": "" }, { "docid": "50b30c3618e535c4e58fcbcaa800b3f9", "score": "0.6494524", "text": "public function index()\n {\n // Get items from CACHE if exists else get items from database and add them CACHE\n $items = Cache::remember(request()->fullUrl(), 60, function() {\n return Item::paginate(10);\n });\n\n return ResourcesItem::collection($items);\n }", "title": "" }, { "docid": "a3105ba14523f4d28c0c61f1ae3a4126", "score": "0.64938986", "text": "public function index()\n {\n $doctor = Doctor::paginate(15);\n // Return collection of articles as a resource\n return DoctorResource::collection($doctor);\n }", "title": "" }, { "docid": "fb449ee6d59076f97a7b455cd49a361a", "score": "0.64936894", "text": "public function index()\n {\n $cate = Category::paginate();\n return CategoryResource::collection($cate);\n }", "title": "" }, { "docid": "2f893b7055407e4ba0e047d0d86b3713", "score": "0.6490903", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_room->get_all();\n\t\t$this->template->set('title', 'Room List');\n\t\t$this->template->load('template', 'contents', 'room/room_list', $data);\n\t}", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.6485916", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.6485916", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "bcb5195ddfb190dcd7d1cb464966fa39", "score": "0.6483209", "text": "protected function indexAction()\n {\n /* Select all rows request */\n $this->crudHelper->get($this->mapper);\n }", "title": "" }, { "docid": "0db1519c1fe132e8fd9ea16de60ae674", "score": "0.6480794", "text": "public function index()\n {\n return Resource::collection(User::paginate(10));\n }", "title": "" }, { "docid": "bee92afbf5f5543a8639ff7712cc6521", "score": "0.6480578", "text": "public function list()\n\t{\n\t\t$chechPermission = get_controller_and_action();\n\t\tif($chechPermission == FALSE)\n\t\t{\n\t\t\tredirect(base_url('access'));\n\t\t}\n\t\t$data['title'] = 'Po List';\n\t\t$this->load->view('admin/includes/_header', $data);\n\t\t$this->load->view('po/po_list');\n\t\t$this->load->view('admin/includes/_footer');\t\n\t}", "title": "" }, { "docid": "a8c3b4396d681ea7d1b2f1cd417a6d26", "score": "0.64798003", "text": "abstract public function view_list();", "title": "" }, { "docid": "8867deb779456d5ddb47aa51a4b25985", "score": "0.64763224", "text": "public function index() {\n $this->all();\n }", "title": "" }, { "docid": "f71ee6e727b6e6ce48d431df89e195db", "score": "0.6474286", "text": "public function index()\r\n {\r\n $this->retrieve();\r\n }", "title": "" } ]
96d383959f6c5b7e7fd5e5dbb3eca171
Stores frontend user data with values from the given array
[ { "docid": "b8d8e12941df94069639318a94c58f2d", "score": "0.57571614", "text": "public function storeUserData($dataArray) {\n \n \ttx_pttools_assert::isInstanceOf($GLOBALS['TSFE'], 'tslib_fe', array('message' => 'No TSFE found!'));\n \n\t\ttrace('[CMD] '.__METHOD__);\n\n // query preparation\n\t\t$uid = intval($dataArray['feuid']);\n $table = 'fe_users';\n $where = 'uid = '.$uid;\n $updateFieldsArr = array(\n\t\t\t'pid' => $dataArray['pid'],\n\t\t\t'tx_ptgsauserreg_gsa_adresse_id' => intval($dataArray['gsauid']),\n\t\t\t'tx_ptgsauserreg_isprivileged' => $dataArray['isPrivileged'],\n\t\t\t'tx_ptgsauserreg_isrestricted' => $dataArray['isRestricted'],\n\t\t\t'username' => $dataArray['username'],\n\t\t\t'password' => $dataArray['password'],\n\t\t\t'usergroup' => $dataArray['usergroup'],\n\t\t\t'tx_ptgsauserreg_firstname' => $dataArray['firstname'],\n\t\t\t'tx_ptgsauserreg_lastname' => $dataArray['lastname'],\n\t\t\t'tx_ptgsauserreg_salutation' => $dataArray['salutation'],\n\t\t\t'title' => $dataArray['title'],\n\t\t\t'address' => $dataArray['streetAndNo'],\n\t\t\t'zip' => $dataArray['zip'],\n\t\t\t'city' => $dataArray['city'],\n\t\t\t'city' => $dataArray['city'],\n\t\t\t'tx_ptgsauserreg_state' => $dataArray['state'],\n\t\t\t'tx_ptgsauserreg_country' => $dataArray['country'],\n\t\t\t'telephone' => $dataArray['phone1'],\n\t\t\t'tx_ptgsauserreg_mobile' => $dataArray['mobile1'],\n\t\t\t'fax' => $dataArray['fax1'],\n\t\t\t'email' => $dataArray['email1'],\n\t\t\t'www' => $dataArray['url'],\n\t\t\t'company' => $dataArray['company'],\n\t\t\t'tx_ptgsauserreg_department' => $dataArray['department'],\n\t\t\t'tx_ptgsauserreg_defbilladdr_uid' => intval($dataArray['defBillAddr']),\n\t\t\t'tx_ptgsauserreg_defshipaddr_uid' => intval($dataArray['defShipAddr']),\n\t\t\t'name' => trim($dataArray['firstname'].' '.$dataArray['lastname']),\n\t\t\t'country' => tx_ptgsauserreg_countrySpecifics::getCountryName($dataArray['country'], is_array($GLOBALS['TSFE']->config['config']) ? $GLOBALS['TSFE']->config['config']['language'] : ''),\n\t\t);\n \n // exec query using TYPO3 DB API\n\t\tif ($uid == 0) {\n\t\t\t// insert new fe_user record\n \tif ($GLOBALS['TSFE']->loginUser == 1) {\n\t\t\t\t$updateFieldsArr['fe_cruser_id'] = intval($GLOBALS['TSFE']->fe_user->user['uid']);\n\t\t\t}\n\t\t\t$updateFieldsArr = tx_pttools_div::expandFieldValuesForQuery($updateFieldsArr, true);\n \t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery($table, $updateFieldsArr);\n \ttrace(tx_pttools_div::returnLastBuiltInsertQuery($GLOBALS['TYPO3_DB'], $table, $updateFieldsArr));\n\t\t\tif ($res) {\n\t\t\t\t$uid = intval($GLOBALS['TYPO3_DB']->sql_insert_id());\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// update existing fe_user record\n\t\t\t$updateFieldsArr = tx_pttools_div::expandFieldValuesForQuery($updateFieldsArr);\n \t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, $where, $updateFieldsArr);\n \ttrace(tx_pttools_div::returnLastBuiltUpdateQuery($GLOBALS['TYPO3_DB'], $table, $where, $updateFieldsArr));\n\t\t}\n if ($res == false) {\n throw new tx_pttools_exception('StoreUserData() failed', 1, $GLOBALS['TYPO3_DB']->sql_error());\n }\n \n trace($uid); \n return $uid;\n \n }", "title": "" } ]
[ { "docid": "29f5e63dc85affcc94c86765781212d3", "score": "0.6649511", "text": "public function store(array $data);", "title": "" }, { "docid": "29f5e63dc85affcc94c86765781212d3", "score": "0.6649511", "text": "public function store(array $data);", "title": "" }, { "docid": "29f5e63dc85affcc94c86765781212d3", "score": "0.6649511", "text": "public function store(array $data);", "title": "" }, { "docid": "29f5e63dc85affcc94c86765781212d3", "score": "0.6649511", "text": "public function store(array $data);", "title": "" }, { "docid": "9b8c14512e55388ddda8fb948cb6c80a", "score": "0.65751565", "text": "public function user_store($data)\r\n\t{\r\n\t\tif ($this->hasVar(\"USERS\"))\r\n\t\t{\r\n\t\t\t$cache = $this->getVar(\"USERS\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$cache = array ();\r\n\t\t}\r\n\t\t$cache[\"BY_ID\"][$data[\"id\"]] = $data;\r\n\t\t$cache[\"BY_SN\"][strtoupper($data[\"screen_name\"])] = $data[\"id\"];\r\n\t\t$this->setVar(\"USERS\", $cache);\r\n\t}", "title": "" }, { "docid": "d0634a16217eda913e09b32af3729a9c", "score": "0.6409145", "text": "public function storeVariables($array){\r\n $this->broker->updateVarsById($this->id, json_encode($array));\r\n }", "title": "" }, { "docid": "51285c69ca3bb4a1c6a4bfe425f855a8", "score": "0.64078313", "text": "public function store(array $data) {\n\n\t}", "title": "" }, { "docid": "2af16efcd36462a1e94b9a8c9920d720", "score": "0.63975096", "text": "protected function putData(array $data)\n {\n if (empty($data)) {\n $secret = '';\n $data = null;\n } else {\n $secret = base64_encode(serialize($data));\n }\n\n $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);\n $connection = $connectionPool->getConnectionForTable($this->user->user_table);\n $connection->update(\n $this->user->user_table,\n ['tx_authenticator_secret' => $secret],\n [$this->user->userid_column => $this->userData[$this->user->userid_column]]\n );\n\n // update the value directly in userData for later use\n $this->userData['tx_authenticator_secret'] = $secret;\n }", "title": "" }, { "docid": "6a282d996e5586dc9e0cdbf2ba205bef", "score": "0.6391692", "text": "public function store() {\n $db = Db::getInstance();\n $data = serialize($this->data);\n $user_id = $this->data['userId'];\n $data = $db->qt($data);\n $sql = 'INSERT INTO `' . static::_table() . '`\n SET `user_id` = ' . $db->qt($user_id) . ',\n `data` = ' . $data . '\n ON DUPLICATE KEY UPDATE\n `data` = ' . $data;\n $db->query($sql);\n }", "title": "" }, { "docid": "23a345cf2c2213290d153fc0126e303e", "score": "0.63225895", "text": "public function storeSessionData()\n\t{\n\t\t$data = array();\n\t\tforeach ($this->_loggedInInstances as $id => $instance)\n\t\t{\n\t\t\t$data[$id] = array(\n\t\t\t\t'data' => $instance->toArray(),\n\t\t\t\t'isDefault' => $id == $this->_defaultUserId ? true : false\n\t\t\t);\n\t\t}\n\t\t$this->session()->set('loggedInData', $data);\n\t}", "title": "" }, { "docid": "eb3229aadcc0092cc8c025cc8ff2313c", "score": "0.6279141", "text": "function uploadDataUser() {\n\t\t\t\tglobal $RGWeb, $arrayNew, $idLogged;\n\t\t\t\t// Render new json converter\n\t\t\t\t$json = json_encode($arrayNew);\n\t\t\t\t$query = $RGWeb->runQueryMysql(\"UPDATE `webinterface_login` SET `data` = '{$json}' WHERE `webinterface_login`.`ID` ={$idLogged};\");\n\t\t\t}", "title": "" }, { "docid": "8428f187d735d6c6a4fb2df223553560", "score": "0.6204471", "text": "public function setUserIds(?array $value): void {\n $this->getBackingStore()->set('userIds', $value);\n }", "title": "" }, { "docid": "76dd01f08a0e677185000b35df515787", "score": "0.61854905", "text": "public function setUserData(array $userData)\n {\n parent::setUserData($userData);\n }", "title": "" }, { "docid": "2c5e1ba669be9e8eb1a50b494337158f", "score": "0.6144237", "text": "public function setSingleUserData() {\n $user_instance = $this->settings_model->getSingleUser();\n #$this->input->post can not be iterated on, so we use $_POST directly\n foreach($_POST as $key => $value) {\n #do not store emtpy values or hidden fields\n if (!in_array($key, array('na-current_password', 'na-new_password',\n 'na-new_password_confirm', 'passwordBoxShown',\n 'form_source', 'submitForm'))) {\n $explodedKey = explode('-', $key);\n #remove user_instance from start of key\n # we do this so the rest of the code is simular to how Domain works\n $explodedKey = array_slice($explodedKey, 1);\n $user_instance->setField($explodedKey, $value);\n }\n }\n $_SESSION['singleUser'] = serialize($user_instance);\n }", "title": "" }, { "docid": "1810e48816c5893eeb09575d66b22ab0", "score": "0.6143489", "text": "public function store(array $data)\n {\n return $this->save(new User(), $data);\n }", "title": "" }, { "docid": "44aadae6622c821c0adfcf53a57608a2", "score": "0.61057276", "text": "private function setUserData($data){\n\t \n\t $this->setValue('user_id', $data['user_id']);\n\t $this->setValue('user_name', $data['user_name']);\n\t $this->setValue('user_email', $data['user_email']);\n\t $this->setValue('date_created', $data['date_created']);\n\t \n\t}", "title": "" }, { "docid": "54f224973db0af66b42c756381db6f0d", "score": "0.59665567", "text": "public function setUsers(?array $value): void {\n $this->getBackingStore()->set('users', $value);\n }", "title": "" }, { "docid": "3206b4f38d911dc76faf85d5e110b4ce", "score": "0.59613854", "text": "public function store(array $input);", "title": "" }, { "docid": "6dffdd88c4e4b29c74c02a18a0b79ca2", "score": "0.5956361", "text": "public static function store(array $data): array\n {\n return Core::store(\"users/accounts\", $data);\n }", "title": "" }, { "docid": "26c9129e0654466924f33338dd0664a4", "score": "0.5931193", "text": "public function save(array $data);", "title": "" }, { "docid": "a132f49f89e861f956dd24005f5428bd", "score": "0.5930032", "text": "function rememberUserData($user) {\n $_SESSION[\"user\"] = [\n \"id\" => $user[\"id\"],\n \"first_name\" => $user[\"first_name\"],\n \"last_name\" => $user[\"last_name\"],\n \"group\" => $user[\"group_name\"]\n ];\n }", "title": "" }, { "docid": "5b072cb3dc4366b5f1e61089d8fb8c84", "score": "0.5894195", "text": "public function setFromArray(array $data): void\n {\n // Iterate through the data and set them to the object\n $this->_id = isset($data['user_id']) ? $data['user_id'] : null;\n $this->_email = isset($data['user_email']) ? $data['user_email'] : null;\n $this->_name = isset($data['user_name']) ? $data['user_name'] : null;\n $this->_created_on = isset($data['user_created_on']) ? $data['user_created_on'] : null;\n $this->_is_admin = isset($data['user_is_admin']) ? $data['user_is_admin'] : null;\n $this->_status = isset($data['user_status']) ? $data['user_status'] : null;\n }", "title": "" }, { "docid": "2203f5f460692ab23e82c10fd5074df5", "score": "0.5893696", "text": "public function storeDataProvider()\n {\n $user = new User();\n $user->username = 'Username';\n $user->password_hash = 'Hash';\n\n return array(\n array(\n $user,\n array(array('username' => 'Username', 0 => 'Username', 'password_hash' => 'Hash', 1 => 'Hash')),\n )\n );\n }", "title": "" }, { "docid": "e3f637d70dd0ee2aad0a666860b665c4", "score": "0.5891335", "text": "function oa_social_login_store_extended_data ($user_data, $identity)\n {\n // $user_data is an object that represents the newly added user\n // The format is similar to the data returned by $user_data = get_userdata ($user_id);\n \n // $identity is an object that contains the full social network profile\n \n //Example to store the gender\n update_user_meta ($user_data->ID, 'gender', $identity->gender);\n }", "title": "" }, { "docid": "ef4a0ae5df8e955f200d3bcb10003cdd", "score": "0.58824664", "text": "public function userSetData($data)\n {\n if (array_key_exists(\"fullname\",$data))\n {\n $this->fullname = $data[\"fullname\"];\n }\n if (array_key_exists(\"amount\",$data))\n {\n $this->amount = $data[\"amount\"];\n }\n if (array_key_exists(\"pnumber\",$data))\n {\n $this->pnumber = $data[\"pnumber\"];\n }\n if (array_key_exists(\"transaction\",$data))\n {\n $this->transaction = $data[\"transaction\"];\n }\n if (array_key_exists(\"reference\",$data))\n {\n $this->reference = $data[\"reference\"];\n }\n if (array_key_exists(\"email\",$data))\n {\n $this->email = $data[\"email\"];\n }\n if (array_key_exists(\"date\",$data))\n {\n $this->date = $data[\"date\"];\n }\n }", "title": "" }, { "docid": "553a2961390bc32f7096113ebc856485", "score": "0.5871183", "text": "protected static function setCartUserData()\n {\n self::$cart['user_data'] = [\n 'b_country' => isset(self::$location['country']) ? self::$location['country'] : '',\n 'b_state' => isset(self::$location['state']) ? self::$location['state'] : '',\n 'b_city' => isset(self::$location['city']) ? self::$location['city'] : '',\n 's_country' => isset(self::$location['country']) ? self::$location['country'] : '',\n 's_state' => isset(self::$location['state']) ? self::$location['state'] : '',\n 's_city' => isset(self::$location['city']) ? self::$location['city'] : '',\n 'zipcode' => isset(self::$location['zipcode']) ? self::$location['zipcode'] : '',\n ];\n }", "title": "" }, { "docid": "6ba6f4647a8cb5d5d1cb404000d06e1a", "score": "0.5859343", "text": "private function person_setData($array){\n\t\tif(!empty($array) && is_array($array)){\n\t\t\tforeach($array as $key => $value){\n\t\t\t\tif(array_key_exists($key, $this->info)){\n\t\t\t\t\t$this->info[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5809704", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "ff036773e8875041f3a1346db2199777", "score": "0.57847697", "text": "public function set(array $data);", "title": "" }, { "docid": "2f99dc9acadd966e46743a3274fea686", "score": "0.5780558", "text": "private function setData()\n\t{\n\t\t$this->setUsername();\n\t\t$this->setEmail();\n\t\t$this->setPassword();\n $this->setActivationKey();\n\t}", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.5769901", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.5769901", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.5769901", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.5769901", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.5769901", "text": "public function setData(array $data);", "title": "" }, { "docid": "4ea32c2151133483bb4115e8ca02dc04", "score": "0.57681054", "text": "public function assignUsers($data) {\n $this->db->insert('users_stores', $data);\n}", "title": "" }, { "docid": "8b96329bca49a3271645fbb374144dd9", "score": "0.57611674", "text": "function write_user_data($users_array){\n\tif(file_exists(\"./conf/users/users.inc.php\")){\n\t\t$filename=\"./conf/users/users.inc.php\";\n\t}else if(file_exists(\"../conf/users/users.inc.php\")){\n\t\t$filename=\"../conf/users/users.inc.php\";\n\t}\n\t\n\t$pf=fopen($filename, 'w+');\n\t \n\tflock($pf, LOCK_EX); \n\tfwrite($pf, \"<?php\\n\");\n\tfwrite($pf, \"\\$users_array=\".var_export($users_array, TRUE).\";\\n\");\n\tfwrite($pf, \"?>\\n\"); \n\tflock($pf, LOCK_UN);\n\tfclose($pf);\n}", "title": "" }, { "docid": "61a780375ae150d63f04853790cc2cd5", "score": "0.57570475", "text": "public function save() {\n\t\tupdate_user_meta( $this->user_id, $this->name, $this->items );\n\t}", "title": "" }, { "docid": "8ad4597c752cb39db4219e1cad9547fb", "score": "0.5748051", "text": "public static function storeData()\n {\n\n if (!Auth::check() || !count(static::$data)) {\n return false;\n }\n\n $user = Auth::user();\n // get the collection of all the data by user_id and keys\n\n $items = new Collection(\n static::objects(\n '*',\n null,\n null,\n array(\n 'user_id' => $user->id,\n static::$db->i('name') . ' IN (\"' . implode('\", \"', array_keys(static::$data)) . '\")'\n )\n )\n );\n\n try {\n static::$db->pdo->beginTransaction();\n\n foreach (static::$data as $name => $value) {\n $item = $items->findBy('name', $name);\n if (!$item) {\n $item = new static;\n $item->set(array('user_id' => $user->id, 'name' => $name));\n }\n\n $item->set(array('value' => base64_encode(serialize($value))));\n $item->save();\n }\n\n static::$db->pdo->commit();\n\n return true;\n\n } catch (\\Exception $e) {\n static::$db->pdo->rollBack();\n Error::exception($e);\n }\n\n return false;\n }", "title": "" }, { "docid": "d8ae69eacf5d7a0634e2f5d4aca7c48a", "score": "0.57161325", "text": "function store_array( &$data, $table, $mysqli )\n\t{\n\t\t$cols = implode( ',', array_keys( $data ) );\n\t\t\n\t\tforeach( array_values( $data ) as $value )\n\t\t{\n\t\t\tisset( $vals ) ? $vals .= ',' : $vals = '';\n\t\t\t$vals .= '\\'' . mysqli_real_escape_string( $mysqli, $value ) . '\\'';\n\t\t}\n\t\t\n\t\tif( !mysqli_query( $mysqli,\n\t\t\t'INSERT INTO ' . $table . ' (' . $cols . ') VALUES (' . $vals . ')' ) )\n\t\t{\n\t\t\tdie( \"Couldn't add entries to the database\" );\n\t\t}\n\t}", "title": "" }, { "docid": "77f5d7cfc4ba58e7ef4dd1308f057bf9", "score": "0.5712292", "text": "function set($array)\n\t\t{\n\t\tif(isset($array['password']))\n\t\t\t{\n\t\t\t$array['hashpass'] = $array['password'];\n\t\t\tunset($array['password']);\n\t\t\t}\n\t\tparent::set($array);\n\t\t}", "title": "" }, { "docid": "eab62adb5106be70c98e89b45ee4c987", "score": "0.5693184", "text": "protected function _setFromArray($array){\n\t\t/* setFromArray method content */\n\t\tif(isset($array[self::FIELD_ID])){\n\t\t\t$this->id = (integer) $array[self::FIELD_ID];\n\t\t}\n\t\tif(isset($array[self::FIELD_USERNAME])){\n\t\t\t$this->username = (string) $array[self::FIELD_USERNAME];\n\t\t}\n\t\tif(isset($array[self::FIELD_PASSWORD])){\n\t\t\t$this->password = (string) $array[self::FIELD_PASSWORD];\n\t\t}\n\t\tif(isset($array[self::FIELD_EMAIL])){\n\t\t\t$this->email = (string) $array[self::FIELD_EMAIL];\n\t\t}\n\t\tif(isset($array[self::FIELD_ACTIVATED])){\n\t\t\t$this->activated = (bool) $array[self::FIELD_ACTIVATED];\n\t\t}\n\t\tif(isset($array[self::FIELD_ACTIVATION_STRING])){\n\t\t\t$this->activation_string = (string) $array[self::FIELD_ACTIVATION_STRING];\n\t\t}\n\t\tif(isset($array[self::FIELD_DELETED])){\n\t\t\t$this->deleted = (bool) $array[self::FIELD_DELETED];\n\t\t}\n\t\tif(isset($array[self::FIELD_CREATE_TIMESTAMP])){\n\t\t\t$this->create_timestamp = (integer) $array[self::FIELD_CREATE_TIMESTAMP];\n\t\t}\n\t\tif(isset($array[self::FIELD_LAST_TIMESTAMP])){\n\t\t\t$this->last_timestamp = (integer) $array[self::FIELD_LAST_TIMESTAMP];\n\t\t}\n\t\t/* setFromArray method content end */\n\t}", "title": "" }, { "docid": "eb6dde1202c62af0fc7db55f59b0364a", "score": "0.5692443", "text": "public function save( array $data );", "title": "" }, { "docid": "173ca47f9b3c7e76b36ef60551ff37bb", "score": "0.5685632", "text": "function setData( array $data );", "title": "" }, { "docid": "789964e445ebc5fd29e9af6513acc288", "score": "0.5685451", "text": "public function exchangeArray(array $data)\n {\n $this->username = (isset($data['username'])) ? $data['username'] : null;\n $this->prename = (isset($data['prename'])) ? $data['prename'] : null;\n $this->lastname = (isset($data['lastname'])) ? $data['lastname'] : null;\n $this->email = (isset($data['email'])) ? $data['email'] : null;\n $this->password = (isset($data['password'])) ? $data['password'] : null; \n $this->confirmation_key = (isset($data['confirmation_key'])) ? $data['confirmation_key'] : null; \n }", "title": "" }, { "docid": "0077034461dfc79a4c3a7f8d9d06f498", "score": "0.5673398", "text": "public function insertData(array $data){\n foreach($this->fillable as $value){\n if(array_key_exists($value,$data)){\n $this->$value=$data[$value];\n }\n }\n return $this->save();\n\n }", "title": "" }, { "docid": "8759c02901b696f9d21db66b23a6ef1a", "score": "0.56481075", "text": "public function store_data() {\n\t\t$groups = Groups_Group::get_groups();\n\n\t\t$data = array();\n\t\tif ( ! empty( $groups ) ) {\n\t\t\tforeach ( $groups as $group ) {\n\t\t\t\t$data[ $group->group_id ] = $group;\n\t\t\t}\n\t\t}\n\t\t$this->set_data( $data );\n\t}", "title": "" }, { "docid": "1d13642e95728eeec2ef58adbe1b1e76", "score": "0.56452674", "text": "public function exchangeArray(array $array)\n {\n\t\t$this->User_ID\t\t\t= $array['User_ID'];\n\t\t$this->Username\t\t\t= $array['Username'];\n\t\t$this->Email_Address\t= $array['Email_Address'];\n\t\t$this->Password\t\t\t= $array['Password'];\n }", "title": "" }, { "docid": "22950e0d6412a9c49dea43ab4fbd2af8", "score": "0.5642218", "text": "public function setData($data)\n {\n if(!empty($data) && is_array($data))\n {\n Session\\Manager::Start();\n $_SESSION[$this->name] = array_merge($_SESSION[$this->name], $data);\n } else\n trigger_error('Expecting first argument to be array with value', E_USER_WARNING);\n }", "title": "" }, { "docid": "22be29cb0c23aaadba3915e477d15089", "score": "0.5620426", "text": "private function updateUsersFile(array $array) {\n\n $userPathAbsolute = $this->getUsersPathAbsolute();\n\n $output = [];\n\n foreach ($array as $user) {\n $output[] = [\n \"username\" => $user->getUsername(),\n \"password\" => $user->getPassword()\n ];\n\n }\n\n\n // convertiamo users in array, da un array di oggetti\n file_put_contents($userPathAbsolute, json_encode($output));\n}", "title": "" }, { "docid": "20df9e0218c6701ace675b921975e58d", "score": "0.56136286", "text": "public static function setUserData($data) {\n $_SESSION[\"user_data\"] = $data;\n }", "title": "" }, { "docid": "82472b844e629c092df1241f0aef986d", "score": "0.5609961", "text": "private function readyForStore($userData = array(), $secret= array()){\n return array(\n \"firstname\" =>$userData['firstname'],\n \"lastname\" =>$userData['lastname'],\n \"password\" =>$secret['encodedPassword'],\n \"salt\" =>$secret['salt'],\n \"email\" =>$userData['email'],\n \"agreement\" =>$userData['agreement'],\n \"avatarUrl\" =>\"\"\n );\n }", "title": "" }, { "docid": "ce8ff8b7c1a2e94f9f07d246a88f7cc5", "score": "0.56023324", "text": "function set_userdata($name, $value){\r\n if ($this->userdata === false)\r\n $this->userdata = array();\r\n\r\n $this->userdata[$name]=$value;\r\n }", "title": "" }, { "docid": "b3b258692bb67a9c8556877881278cab", "score": "0.5600441", "text": "protected function setTempstoreValues(array $values) {\n $this->sharedTempstore->set($this->sharedTempstoreKey, $values);\n }", "title": "" }, { "docid": "a927d3bfd3a396883d9a6f35b81c245c", "score": "0.5588914", "text": "function helper_userdata($data){\n\t$user_data = array();\n\t//--\n\t$user_data['accion'] = pg_escape_string($data->accion);\n\t$user_data['checkbox'] = $data->checkbox;\n\t$user_data['id'] = $data->id;\n\t//--\n\treturn $user_data;\n}", "title": "" }, { "docid": "fc85419ae46ee49d249492ea2cf285bb", "score": "0.5588202", "text": "public function initUserData(){\n\t\t$user = UserModel::model()->with('AuthPermissions','AuthGroups','AuthRoles')->findByPk($this->getUid());\n\t\tif ( $user !== null ){\n\t\t\t$separator = 'u'.$this->getUid();\n\t\t\t$this->storeData('userRoles',$separator,$user->AuthRoles);\n\t\t\t$this->storeData('userGroups',$separator,$user->AuthGroups);\n\t\t\t$this->storeData('userPermissions',$separator,$user->AuthPermissions);\n\t\t}\n\t}", "title": "" }, { "docid": "0155000129669b2263a98f58d7370a8e", "score": "0.5572805", "text": "public function store()\n\t{\n\t\t$id = Input::get('id');\n\t\t\n\t\tAuth::user()->storages_id = $id;\n\t\tAuth::user()->save();\n\t}", "title": "" }, { "docid": "c29728d038f94c0ca9d720a9651177b9", "score": "0.5563753", "text": "public function set($user_data=array()) {\n\t\tif(array_key_exists('email', $user_data)) {\n\t\t\t$this->get($user_data['email']);\n\t\t\t\n\t\t\tif($user_data['email'] != $this->email) {\n\t\t\t\tforeach ($user_data as $campo=>$valor) {\n\t\t\t\t\t$$campo = $valor;\n \t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->query = \"INSERT INTO usuarios\n\t\t\t\t\t\t\t\t(nombre, apellidos, email, clave)\n\t\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t\t(:nombre, :apellidos, :email, :clave)\";\n\t\t\t\t$this->parametros['nombre']= $nombre;\n\t\t\t\t$this->parametros['apellidos']= $apellidos;\n\t\t\t\t$this->parametros['email']=$email;\n\t\t\t\t$this->parametros['clave']=$clave;\n\t\t $this->get_results_from_query();\n\t\t\t\t//$this->execute_single_query();\n\t\t\t\t$this->mensaje = 'Usuario agregado exitosamente';\n\t\t\t\t} else {\n\t\t\t\t$this->mensaje = 'El usuario ya existe';\n\t}\n} else {\n$this->mensaje = 'No se ha agregado al usuario';\n}\n}", "title": "" }, { "docid": "aca6ad280b56090e05a39438e591463e", "score": "0.5560553", "text": "function setValueByArray($a_values)\n\t{\n\t\tglobal $ilUser;\n\t\t\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t}", "title": "" }, { "docid": "536ba701eaec2a46f911f896ba5a0412", "score": "0.55558777", "text": "public function saveData (array $data) {\n if ($this->isValid()) {\n return $this->updateVars($data);\n }\n return $this->createWithVars($data);\n }", "title": "" }, { "docid": "55ddb17bde98394d5d57e65c1622baa5", "score": "0.5544225", "text": "public function store(array $data)\n {\n try {\n $user = session()->get('user'); \n $user->fill($data);\n $user->password = env('PW_CRYPT') ? bcrypt($user->password) : $user->password;\n if(isset($user->photo))\n {\n $paths = explode('/', $user->photo);\n $filename = end($paths);\n Storage::disk('public')->move($user->photo, 'users/'.$user->username.'/'.$filename);\n $user->photo = Storage::url('users/'.$user->username.'/'.$filename);\n }\n else\n {\n $user->photo = asset('img/default-avatar.png');\n }\n\n $user->save();\n\n session()->forget('user');\n\n return [\n 'success' => true,\n 'message' => 'Usuário criado com sucesso',\n 'data' => $user\n ];\n } catch (Exception $ex) {\n return Response::handle($ex);\n }\n }", "title": "" }, { "docid": "494c879b0f16457013cf6cb8f3d29758", "score": "0.5532552", "text": "public function save_user_field_values_custom_form()\n {\n // User fields already processed\n if (did_action('user_register') || did_action('profile_update')) {\n return;\n }\n\n // User not logged in\n if (!is_user_logged_in()) {\n return;\n }\n\n // Load customer\n $user_id = get_current_user_id();\n $item = RightPress_Help::wc_get_customer($user_id);\n\n // Store field values\n WCCF_Field_Controller::store_field_values($item, 'user_field', true, false, 'user_profile');\n\n // Save customer if needed\n if (is_object($item)) {\n $item->save();\n }\n }", "title": "" }, { "docid": "d4dd6d546bf6b9f8ae404d8c4b67be8e", "score": "0.5520863", "text": "public function setData( Array $data )\n\t{\n\t\t$this->data = $data;\n\t}", "title": "" }, { "docid": "b471a63d458ebefc12402de292e3c531", "score": "0.5515925", "text": "public function data_save() {\n $data = base64_encode(serialize($this->get_data()));\n $this->set_data($data);\n }", "title": "" }, { "docid": "b4dcb7dad93bb7592b9c7292e215f211", "score": "0.55060136", "text": "public function setUserStates(?array $value): void {\n $this->getBackingStore()->set('userStates', $value);\n }", "title": "" }, { "docid": "7df39beec41e1a887e2ddfd713b79026", "score": "0.5504971", "text": "public function setData($array) {\n if (isset($array['id'])) {\n $this->setId($array['id']);\n } else {\n $this->data['id'] = null;\n }\n\n $this->setName($array['name'] ?? null);\n $this->setPrice($array['price'] ?? null);\n $this->setImage($array['image'] ?? null);\n $this->setDiscount($array['discount'] ?? null);\n $this->setInStock($array['in_stock'] ?? null);\n\n\n }", "title": "" }, { "docid": "5cbb2da9e131622a15f8caaf5c13ed7e", "score": "0.5501956", "text": "public function store($data)\n {\n $this->utente = $data['utente'];\n $this->costo = $data['costo'];\n $this->costospedizione = $data['costospedizione'];\n $this->sconto = $data['sconto'];\n $this->tipo_pagamento = $data['tipopagamento'];\n\n self::save();\n }", "title": "" }, { "docid": "295ede8b14b28e322b57b1de190bef51", "score": "0.5499457", "text": "public function setData($array = [])\n {\n foreach ($array as $name => $var) {\n $this->data[\"$name\"] = $var;\n }\n }", "title": "" }, { "docid": "f88445a57ecfe835ba184f94fbbdf359", "score": "0.5495568", "text": "function prepare_value_input()\n{\n $id_data = array(id_wise_query());\n $email_str = \"\";\n $username_str = \"\";\n $password_str = \"\";\n\n foreach ($id_data as $value) {\n $email = $value[0][\"email\"];\n $email_str .= \"value=\" . $email;\n $username = $value[0][\"username\"];\n $username_str .= \"value=\" . $username;\n $password = $value[0][\"password\"];\n $password_str .= \"value=\" . $password;\n }\n\n $login_info = [\n \"username\" => $username_str,\n \"email\" => $email_str,\n \"password\" => $password_str\n ];\n\n return $login_info;\n}", "title": "" }, { "docid": "e512c1067b3b566ad6ad2e8b2a1d6680", "score": "0.549314", "text": "public function saveUserCoords()\n {\n $this->checkLoggedIn();\n if ($this->vEmpty->validate($_POST['userCoords'])) {\n header(\"HTTP/1.1 500 userCoords empty\");\n echo \"userCoords ist leer\";\n exit;\n }\n $userCoords = json_decode($_POST['userCoords']);\n \n //http://stackoverflow.com/questions/7746720/inserting-a-multi-dimensional-php-array-into-a-mysql-database\n $data = array();\n foreach ($userCoords as $row) {\n $data[] = array($row->lat, $row->lng);\n }\n \n $this->conn->delete(\"user_coords\");\n $this->conn->rawQuery(\"ALTER TABLE user_coords AUTO_INCREMENT = 1;\");\n $this->conn->insertMulti(\"user_coords\", $data, array(\"lat_user\", \"lon_user\"));\n }", "title": "" }, { "docid": "0b6d6b20b941ddeb08d8caa0ee283a6c", "score": "0.54902804", "text": "public function setData(array $data) {\n\t\tforeach ($data as $item) {\n\t\t\tforeach ($item as $key=>$value) {\n\t\t\t\tswitch ($key) {\n\t\t\t\tcase ($key == 'variable'):\n\t\t\t\t\t$this->variable = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ($key == 'value'):\n\t\t\t\t\t$this->value = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ($key == 'is_encrypted'):\n\t\t\t\t\t$this->is_encrypted = $value;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4f8681940fa1e96ef547853a85f010d1", "score": "0.5480335", "text": "function setValues($array) {\n foreach ($array as $key => $value) {\n $this->setValue($key, $value);\n }\n }", "title": "" }, { "docid": "f7809e2c1236150b05eb269089e41a86", "score": "0.54791206", "text": "public function store(array $data){\n $creator_id = $data['creator_id'];\n $updateQuery = [\n 'user_id'=> Auth()->user()->id,\n 'creator_id'=> $creator_id,\n ];\n\n SubscribersList::updateOrCreate($updateQuery, $data);\n //Make Fan when you subscribe\n $fanData = [\n 'user_id' =>$data['user_id'],\n 'creator_id' => $data['creator_id'],\n ];\n $fanDataUpdate = [\n 'user_id' =>$data['user_id'],\n 'creator_id' => $data['creator_id'],\n 'is_active' => 1,\n ];\n $followerData = [\n 'user_id' =>$data['user_id'],\n 'following_userId' => $data['creator_id'],\n ];\n Fan::updateOrCreate($fanData, $fanDataUpdate);\n Follower::firstOrCreate($followerData);\n\n // Send Notification for subscription\n $this->notify(Auth()->user()->username, $creator_id, 'subscribed');\n }", "title": "" }, { "docid": "0b3bbd3b0f65d88d1589b860444bceee", "score": "0.54770243", "text": "public function user_data_method($user_data){\n\t\t\t$sess_array = array( \n\t\t\t\t\t\t\t\t'id' => $user_data['id'],\n\t\t\t\t\t\t\t\t'username' => $user_data['username'],\n\t\t\t\t\t\t\t\t'firstname' => $user_data['firstname'],\n\t\t\t\t\t\t\t\t'email' => $user_data['email'],\n\t\t\t\t\t\t\t\t'mobile' => $user_data['mobile'], \n\t\t\t\t\t\t\t\t'last_login' => $user_data['last_login']\t\n\t\t\t\t\t\t\t\t);\n\t\t\t$this->session->set_userdata($sess_array);\n\t\t\t\n\t\t\t//$this->session->set_userdata('les_user_data', $sess_array);\n\t\t\t//$this->synchronize_user_cart();\t\n\t}", "title": "" }, { "docid": "46d04f5dc4358e617be91df379251bbc", "score": "0.54627776", "text": "public function user_store(){\n\t\t$storeID=$this->m_home->user_store($this->session->userdata('user_id'));\n\t\t$count = count($storeID);\n\t\t\n\t\tif($count){\n\t\t\tforeach($storeID as $store){\n\t\t\t\t$data['store_id']=$store->store_id;\n\t\t\t\t$data['name']=$store->name;\n\t\t\t}\n\t\t}else{\n\t\t\t$data = array(\n\t\t\t\t\t'store_id'=>null,\n\t\t\t\t\t'name'=>null\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "5b4f3bd46b8acf1630d5d73c99163831", "score": "0.5460849", "text": "public function store(array $arr)\n {\n }", "title": "" }, { "docid": "9e52a054d745545b7b4bc57133059f9b", "score": "0.54570824", "text": "protected function _Store_Fields() {\n\t\tglobal $wpdb; \n // Retrieve the entry data\n $entry_data = $this->store_entry;\n // Submission table name (including wp prefix)\n $entry_fields_table = $this->Get_Entry_Field_Table(); \n // Retrieve the storage data\n $store_fields = $this->store_fields;\n // If there are no store fields, return out\n if (!$store_fields || !is_array($store_fields)) { return array(); }\n // Loop through each field to store\n foreach ($store_fields as $machine_code => $field_data) {\n // Determine if the value will be encoded\n $is_encoded = is_array($field_data['field_value']) || is_object($field_data['field_value']) ? true : false;\n // Calculate the store value\n $store_value = $is_encoded ? base64_encode(json_encode($field_data['field_value'])) : $field_data['field_value'] ;\n // If there is no value, continue on\n if ($store_value == '') { continue; }\n // Attempt to store the entry data\n $result = $wpdb->insert($entry_fields_table,array(\n 'entry_uuid' => $entry_data['uuid'],\n 'form_uuid' => $entry_data['form_uuid'],\n 'is_encoded' => $is_encoded ? 'y' : '',\n 'field_machine_code' => $machine_code,\n 'field_label' => $field_data['field_label'],\n 'field_value' => $store_value,\n 'field_value_html' => $field_data['field_value_html'],\n 'field_value_text' => $field_data['field_value_text'],\n ));\n // If the insert failed\n if ($result === false) { die('Field value failed to insert'); }\n }\n }", "title": "" }, { "docid": "7019e436ddefbecfd4804c6022284f43", "score": "0.5452065", "text": "private function setSessionData()\n {\n $session = Session::getInstance();\n\t\t// Regenerate the session\n $session->regenerate();\n // Add the user id to the session\n $session->set( 'user_id', $this->user->get('id') );\n }", "title": "" }, { "docid": "21ee8ccaff28e55c5b0c3ee0d5bf6252", "score": "0.5450105", "text": "public function create(array $data)\n {\n //add users who have enrolled\n \n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "e3ec6010de8c757e39838fe2736c0459", "score": "0.0", "text": "public function edit(Payment $payment)\n {\n $suppliers = Supplier::all();\n return view('payment.edit', ['suppliers'=>$suppliers], compact('payment'))->with('success','transactions is edited successfully');\n }", "title": "" } ]
[ { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.789207", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.78099495", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4bdbe4ff8aec98fee963bdf4dbf6da91", "score": "0.7512742", "text": "public function edit(FormBuilder $formBuilder, $course, Resource $resource)\n {\n //\n $edit = $formBuilder->create(\\App\\Forms\\Resource::class, [\n 'method' => 'PATCH',\n 'url' => route('resource.update', [$course, $resource->id]),\n 'model' => $resource,\n ]);\n //\n $delete = $formBuilder->create(\\App\\Forms\\DeleteForm::class, [\n 'method' => 'DELETE',\n 'url' => route('resource.destroy', [$course, $resource->id]),\n ]);\n $pageTitle = 'Edit Resource';\n return view('resources.formEdit', compact('edit','delete', 'pageTitle'));\n\n }", "title": "" }, { "docid": "93f7e624d9e32a9fbf006f4f83dae8a8", "score": "0.7485166", "text": "public function edit($id)\n {\n /*show edit form*/\n }", "title": "" }, { "docid": "1404e57fbb5774c03bfe25411f8fe287", "score": "0.7329009", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n \n $data = [\n 'resource' => $resource,\n ];\n\n return view('resources.edit-resource')->with($data);\n }", "title": "" }, { "docid": "ed0028dbd1fbb47ee337d77b8a651d9a", "score": "0.7300998", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/edit', compact('resource'));\n\t}", "title": "" }, { "docid": "4753e80c2af19bb37f8b9df0bf10829e", "score": "0.72601366", "text": "public function edit( )\n\t{\n\t\t// show\n\t}", "title": "" }, { "docid": "2d0354bc64da2d977cfd60754017882b", "score": "0.7256488", "text": "public function edit($id)\n {\n $userdata = Resources::findOrFail($id);\n return view('admin.resource.edit', compact('userdata'));\n }", "title": "" }, { "docid": "8c5ec66a768a8406204fdc19e3dec141", "score": "0.7236764", "text": "public function edit($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Edit');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getFillableLabels());\n\t}", "title": "" }, { "docid": "f486aa2dad1b98a29b575e9dba22938d", "score": "0.7131576", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.edit')->with(compact('resource'));\n }", "title": "" }, { "docid": "654b96e5d414d66677bf1e3d1695b1d8", "score": "0.7118867", "text": "public function edit_form()\n {\n return View::make(\"app.edit\");\n }", "title": "" }, { "docid": "ecbdcecae7d17f5fd47a1b3471865b07", "score": "0.71140355", "text": "public function edit($resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n return view('laramanager::resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "8640b0c244bf00ab3b420106f09d5eb1", "score": "0.71136826", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $form = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "ab1c5f00384bd443c0312a8cedd635d9", "score": "0.709417", "text": "function edit() {\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$productId = KRequest::getInt('productId');\n\t\t$matrixId = KRequest::getInt('id');\n\n\t\t$view = $this->getDefaultViewForm();\n\t\t$view->setProductId($productId);\n\t\t$view->setMatrixId($matrixId);\n\t\t$view->display();\n\n\t}", "title": "" }, { "docid": "5df52742ed05bd924198604d4236743d", "score": "0.7058229", "text": "public function edit($id)\n {\n //$resource = Resource::findOrFail($id);\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n SyncService::SyncResourcesTable();\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "6c1e231bfb659c518730d45c158fa402", "score": "0.7040291", "text": "public function edit($id)\n\t{\n\t\t$resource = $this->repository->getResource($id);\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.edit', compact(['resource', 'menuTab']));\n\t}", "title": "" }, { "docid": "9c8836b3e3aa143dfa78083f839f6e60", "score": "0.7036434", "text": "public function editAction()\n {\n $request = $this->getRequest();\n\t\t$id = $request->getParam(\"id\");\n\n $form = new Application_Form_Book();\n $book = new Application_Model_Book();\n\t\t$mapper = new Application_Model_BookMapper();\n $mapper->find($id, $book);\n\t\t\n\t\t$form->populate($book);\n\t\t\n\t\t$this->view->form=$form;\n\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70006657", "text": "function edit()\n {\n $this->_view_edit('edit');\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": "0aee08a6c8d208457326de0c63ab1d93", "score": "0.69405466", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->revision->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['revision' => $this->revision]);\n\t}", "title": "" }, { "docid": "13550b89e98e00015a895299bc148377", "score": "0.69336295", "text": "public function editAction()\n {\n $assign_id = $this->_getParam('assign');\n $this->_includeForm($assign_id);\n }", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69331795", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "6acf67aab48fd2b396026c0eeb096874", "score": "0.69115764", "text": "public function edit()\n {\n return view('prappo::edit');\n }", "title": "" }, { "docid": "291ee83a27f023635ff2c99d1e9ea7a6", "score": "0.69041586", "text": "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'em' => $this->getDoctrine()->getManager(),\n 'action' => $this->generateUrl('resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Update',\n 'attr' => array(\n 'class' => 'btn btn-primary',\n ),\n ));\n\n return $form;\n }", "title": "" }, { "docid": "53a8dd3945e8d394e8af0378fcb0759a", "score": "0.68744934", "text": "public function edit($id)\n\t{\n // get\n $resident = Resident::find($id);\n\n // show the edit form and pass\n return View::make('residents.edit')\n ->with('resident', $resident);\n\t}", "title": "" }, { "docid": "b1f8a3dd503a02e69fbec578be1ee9d1", "score": "0.686333", "text": "public function editForm($id)\n\t{\n\t\t$job = Job::find($id);\n\t\tif(!$job)\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\treturn View::make('admin.jobs.edit')->with(array(\n\t\t\t'title' => 'Edition de '.$job->name,\n\t\t\t'job' => $job\n\t\t));\n\t}", "title": "" }, { "docid": "6fe32e6f0c7ebd96d516ccbe60770da8", "score": "0.686321", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'field');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "766ad0e46f9488ff1bb3e99bffd9b013", "score": "0.68585783", "text": "public function edit($id)\n {\n return view('formbuilder::edit');\n }", "title": "" }, { "docid": "3adf6e4a4db6770a78d161ea39e0d09a", "score": "0.68573624", "text": "public function editAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n $form = $model->getForm();\n $params = $request->getParams();\n\n $model->load($request->getParam('id'));\n\n $form->injectDependencies($model, $params);\n\n if (! $model->id) {\n $message = sprintf(self::MSG_LOAD_FAILURE, $this->_modelName);\n $this->flashAndRedirect($message, 'error', array(\n 'module' => $request->getModuleName(),\n 'controller' => $request->getControllerName(),\n 'action' => 'index',\n ));\n }\n\n if ($request->isPost()) {\n try {\n $this->_edit($model, $request);\n } catch (Zend_Exception $exception) {\n $get = $this->_getGetRequest();\n $this->flashAndRedirect($exception->getMessage(), 'error', $get);\n }\n }\n\n $this->view->form = $form;\n $this->view->model = $model;\n\n }", "title": "" }, { "docid": "d56e1574f0c5378fe3811673b7df8b42", "score": "0.6851044", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit Associate';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "489dd9e64fb4a5c656aedbd3e14c8922", "score": "0.6848005", "text": "public function edit($id)\n\t{\n\t\t$question = Question::findOrFail($id);\n return view('admin.question.form', compact('question'));\n\t}", "title": "" }, { "docid": "9f631e40538fb44577d89db78f7348d8", "score": "0.684799", "text": "public function edit($id)\n {\n\t\t$user = $this->repository->findOneById($id);\n\n return view($this->base . 'form',compact('user'));\n }", "title": "" }, { "docid": "ebdfabd30fdb198a4595764f3e45e18f", "score": "0.6832047", "text": "public function actionEdit()\n {\n $this->view->article = Article::findById((int)$_GET['id']);\n $this->view->display(__DIR__ . '/../../../templates/admin/edit.php');\n }", "title": "" }, { "docid": "8f4207c19a0c7a6f7e5ad8a14497a90f", "score": "0.6824207", "text": "public function edit($id)\n\t{\n\t\treturn \"Shows a form for editing a specific post\";\n\t}", "title": "" }, { "docid": "3968d721d2d6a0540f1d6feba20cef0c", "score": "0.68226755", "text": "public function edit($id)\n {\n return view('controllers.resource-controllers.edit', compact('id'));\n }", "title": "" }, { "docid": "43a06ccc90a0e604ffd06cacb786b0ff", "score": "0.6820547", "text": "public function edit($id)\n\t{\n\t\t$student = $this->students->findById($id);\n return View::make('students._form', array('student' => $student, 'exists' => true));\n\n\t}", "title": "" }, { "docid": "dd6567bb75ad8b2f5dcd4461b639f0e6", "score": "0.6819833", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view('formbuilder::form.edit',compact('form'));\n }", "title": "" }, { "docid": "ca5f52bec4884c7fcd8605fda797f2e0", "score": "0.681206", "text": "public function edit($id)\n {\n $form =\\App\\Form::find($id);\n return view('form.edit',compact('form'));\n }", "title": "" }, { "docid": "07993cef1b04896170dffd4d46ed96aa", "score": "0.68106216", "text": "public function edit($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "42fefa0bb00f6a35ff461a006d5fb4fe", "score": "0.6809563", "text": "public function editForm()\n {\n $data = [\n 'question' => App::get('database')->select('questions', 'id', $_GET['id']),\n 'answers' => App::get('database')->select('answers', 'answer_id', $_GET['id'])\n ];\n\n return view('questions.edit', compact('data'));\n }", "title": "" }, { "docid": "5dbf6a424144f5f1ea70f7e2584cb814", "score": "0.68048286", "text": "public function edit()\r\n {\r\n return view('admin::edit');\r\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68022823", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "62c2bf22604789e0fe0631318bc4da7e", "score": "0.6793394", "text": "public function edit() {\n\t\t/* CHANGED - switched to url(\"id\") as $this->param(\"id\") is deprecated */\n\t $this->id = WaxUrl::get(\"id\");\n\t\tif(!$this->id) $this->id = $this->route_array[0];\n $this->model = new $this->model_class($this->id);\n \n\t\t$this->form = $this->render_partial(\"form\");\n\t\tif($_POST['cancel']) $this->redirect_to(Session::get(\"list_refer\"));\n\t\tif($_POST['save']) $this->save($this->model, \"edit\");\n\t\telse $this->save($this->model, Session::get(\"list_refer\"));\n\t}", "title": "" }, { "docid": "4d4b5c8d6ba885d863626bf0f1e99725", "score": "0.67909837", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('car' => $this->resource,\n \t\t\t\t\t\t\t\t 'categories' => Category::ClassListSelectInput(),\n \t\t\t\t\t\t\t\t 'carList' => Car::carListSelectOptions()\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "86d596efe1714c0e50410fc7134cd9e3", "score": "0.67899823", "text": "public function edit()\n {\n return view('berating::edit');\n }", "title": "" }, { "docid": "2147ded57d317abac917ded7bf4c5589", "score": "0.678895", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'user.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "b475fc8e937568a510257d6507f3a6e2", "score": "0.67683", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('admin.product.form',[ 'product' => $product ]);\n }", "title": "" }, { "docid": "cadf80168cda3fc14631174ff8ec05e6", "score": "0.6767456", "text": "public function editAction()\n {\n $model = $this->_initModel();\n\n // make sure that the model exists before continuing\n if ($this->_getRequestedId() && !$model && !$model->getId()) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('This ' . $this->_getObjectLabel() . ' no longer exist or is corrupt.'));\n $this->_redirect('*/*/');\n } else {\n $this->_initAction()->renderLayout();\n }\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.67593914", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "ac62d8f04a855af96ee81ddcc7f43f6a", "score": "0.674935", "text": "public function edit(): void\n {\n $this->showEditPage($this->getItem());\n }", "title": "" }, { "docid": "e87e608ddadfa3687caa6cc9477425cf", "score": "0.6745892", "text": "public function edit($id)\n {\n $is_edit = true;\n $product = Product::find($id);\n\n return view('products.form', compact('product', 'is_edit'));\n }", "title": "" }, { "docid": "f317696c87c55af5bdb2c774e7855698", "score": "0.67415434", "text": "public function edit(Resource $resource)\n {\n //\n // $this->authorize('update',Resource::class);\n // $page=Page::all();\n // return view('resource.edit',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "2a0de8686ce09f7bacd45838296d3aac", "score": "0.6740148", "text": "public function edit($id)\n {\n if(Gate::denies('familia-edit')){\n abort(403,\"Não autorizado!\");\n }\n\n $familia = Familia::find($id);\n\n return view('familias.form',compact('familia'));\n }", "title": "" }, { "docid": "6d0cd677e592e2179223532437971edd", "score": "0.67277086", "text": "public function edit($id)\n\t{\n return view($this->path . 'edit', ['record' => Record::find($id)] );\n\t}", "title": "" }, { "docid": "8ecab6633b0244e83acc1262c8f70524", "score": "0.6724784", "text": "public function edit($id)\n\t{\n\t\t$famoso = Famoso::find($id);\n\n\t\t// show the edit form and pass the object\n\t\treturn View::make('famoso.edit')\n\t\t\t->with('famoso', $famoso);\n\t}", "title": "" }, { "docid": "5e95479074ff3a4269a77c41326ace59", "score": "0.67221993", "text": "public function editing(){\n\t\t/// Send the user to this view\n\t\t$this->render(\"editing\");\n\t}", "title": "" }, { "docid": "e9232910411eba7ae6c98603663c9453", "score": "0.6719594", "text": "public function edit($id)\n {\n $company = Company::find($id);\n $company->form_action = $this->getRoute() . '.update';\n $company->page_title = 'Company Edit Page';\n // Add page type here to indicate that the form.blade.php is in 'edit' mode\n $company->page_type = 'edit';\n return view('backend.companies.form', [\n 'company' => $company\n ]);\n }", "title": "" }, { "docid": "73c3c8ef8ccb5ebffbd7c9d1617e5de2", "score": "0.6716718", "text": "public function editForm() {\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey.'form' : $layout.'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_'.$layout; //BmDebug::log($layout, __method__);\n\t\t$view = $this->getView($this->default_view,\n\t\t\tJFactory::getDocument()->getType(), '', array('layout' => $layout));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "1d24319a1462677632ee7717aa20a61d", "score": "0.6715344", "text": "public function edit($id)\n { \n \treturn view(\"gestion.formularios.edit\",[\"formulario\"=>Formulario::findOrFail($id)]); \n }", "title": "" }, { "docid": "2a667f76d35f0224dbbf223e12e110af", "score": "0.6706635", "text": "public function actionEdit($id)\n\t{\n\t\t$form = $this->getComponent('rightResourceForm');\n\t\t/* @var $form Form */\n\n\t\t$submit = $form->addSubmit(FormBuilder::SUBMIT_EDIT, 'upravit zdroj oprávnění');\n\t\t$submit->onClick[] = callback($this,'edit');\n\n\t\t$form->addSubmit('stortno', \"storno\")->setValidationScope(false)->onClick[] = callback($this,'formStorno');\n\t}", "title": "" }, { "docid": "a7dded643ee65e6b9cf08ef89ee539b6", "score": "0.6699572", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->presentation->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['presentation' => $this->presentation]);\n\t}", "title": "" }, { "docid": "4e3f60120231c9e9fb4516dda6cad799", "score": "0.6698769", "text": "public function edit($id)\n {\n $entity = Entity::query()->find($id);\n return view('crudgenerator::entities.edit', compact('entity'));\n }", "title": "" }, { "docid": "b3e1f1e6d5549bd781053c989eb1e847", "score": "0.66949964", "text": "public function edit($id)\n {\n $author = Author::find($id);\n return view('admin.author.form',['author' => $author]); \n }", "title": "" }, { "docid": "fe08627e9afbe6ed7f13f71f273030a1", "score": "0.6693402", "text": "public function edit($id)\n\t{\n $employee = Employee::find($id);\n return View::make('system.Employee.edit',compact(\"employee\"));\n\t}", "title": "" }, { "docid": "b8547be61d1a0bb98b26ec7de01610cd", "score": "0.668619", "text": "public function edit($id, FormBuilder $form_builder): Renderable\n {\n $existing_product = $this->product_repository->getById($id);\n\n $form = $form_builder->create('App\\Forms\\Product\\EditForm', [\n 'method' => 'PUT',\n 'url' => route('product.update'),\n 'model' => $existing_product\n ]);\n\n return view('product.modify', compact('form'));\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": "6c0376e096733d3b0fa90503eef2434b", "score": "0.6677822", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "44ff363bc16fe7311c23454456531dbc", "score": "0.66771793", "text": "public function edit_item()\n {\n $this->check_authorization();\n \n $id = $this->get_arg('id', 0);\n $item = Item::find($id); \n $data['item'] = $item;\n $data['breadcrumbs'] = $this->generate_breadcrumbs(\n $item->category_id,\n array('/show_item?id='.$item->id => $item->name)\n );\n\n return new View('item_form', $data); \n }", "title": "" }, { "docid": "41567083a127c71ff96104505b7b5dec", "score": "0.66739434", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6665287", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "adb01bd13a4dfbf550016516570e7b60", "score": "0.6664392", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('station' => $this->resource\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "5fa4968110c48bd9bdcff5495b19f29a", "score": "0.66524285", "text": "public function edit()\n {\n return view('task::edit');\n }", "title": "" }, { "docid": "c13dfacb9aed13d70a670ff15ea907b6", "score": "0.664798", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmpleadoBundle:Empleado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Empleado entity.');\n }\n\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n \n\n return $this->render('PanelBundle:Empleado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "58f55c0117c1a36e605cb5c2aabc68e3", "score": "0.66402805", "text": "public function edit() {\n\t\t$author = pick_arg(Author::class) ?: new Author;\n\t\treturn $this->viewEdit(compact('author'));\n\t}", "title": "" }, { "docid": "221efc99f3dd40c0f971d42862c5b218", "score": "0.66357946", "text": "public function edit($id)\n\t{\n\t\tif(!$this->autorizado) return Redirect::to('/login');\n\t\t$modelo = Modelo::find($id);\n\t\tif (is_null ($modelo))\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\t\treturn View::make('models.form')->with('modelo', $modelo);\n\t}", "title": "" }, { "docid": "b912d383bf373377209a233f3ceefe90", "score": "0.66283524", "text": "public function editAction($id) {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $entity = $em->getRepository('MedicinaKernelBundle:Oficina')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('No se ha encontrado la oficina solicitada');\r\n }\r\n\r\n $editForm = $this->createForm(new OficinaType(), $entity);\r\n\r\n return $this->render('BackendBundle:Oficina:edit.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $editForm->createView(),\r\n ));\r\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "e69682a60ea811251468072e63bf80cb", "score": "0.6626088", "text": "public function showEditForm($id)\n\t{\n\t\t$post = Post::where('id', $id)->first();\n\t\treturn view('admin.post.edit', ['post' => $post]);\n\t}", "title": "" }, { "docid": "bb154b1db81c97b24dc305b03e48e156", "score": "0.6624101", "text": "function edit() {\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "4ba7055b2304ab3f588267e488d1cfb9", "score": "0.6620297", "text": "function viewedit(){\n $id=Request::read('id');\n \n $nota = $this->getModel()->getNota($id);\n $this->getModel()->addData('titulo', $nota->getTitulo());\n $this->getModel()->addData('contenido', $nota->getContenido());\n $this->getModel()->addData('favorito', $nota->getFavorito());\n $this->getModel()->addData('idNotas', $nota->getId());\n $this->getModel()->addData('idUsuario', $nota->getIdUsuario());\n $this->getModel()->addFile('form', 'sections/nota/formEdit.html');\n }", "title": "" }, { "docid": "c9ce59f5b770500a9924cc8e0f97bf72", "score": "0.66186434", "text": "public function edit($id)\n {\n $resident = Resident::where('id','=',$id)->with('relatives')->first();\n return view('survey.family-member-form.edit', compact('resident'));\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.66183454", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "63720603ef56686d63e3133a9a3ec385", "score": "0.6612739", "text": "public function edit()\n {\n return view('mgdestino::edit');\n }", "title": "" }, { "docid": "09ca9097e9f59afd7ab61c2fa4368b57", "score": "0.66118366", "text": "public function showEditForm($id)\r\r\n {\r\r\n $userinfo = User::findOrFail($id);\r\r\n return view('/auth/edituser', compact('userinfo'));\r\r\n }", "title": "" }, { "docid": "f77eec10d5891a2545e2b33ab8d59228", "score": "0.66089296", "text": "public function edit()\n {\n $company = Company::first();\n return view('company.edit',compact('company'));\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "9ec66c39b4a9570023bc9493ee748e0e", "score": "0.66041213", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->setOwnerAccess($this)\n ->execute($this, UserEntity::class, UserActionEvent::class, NULL, __METHOD__, [], ['user_id' => $this->thisRouteID()])\n ->render()\n ->with(\n [\n 'user' => $this->toArray($this->findOr404()),\n 'check_icon' => '<li><ion-icon name=\"checkmark-outline\"></ion-icon></li>',\n 'close_icon' => '<ion-icon name=\"close-outline\"></ion-icon>'\n ]\n )\n ->form($this->formUser)\n ->end();\n }", "title": "" }, { "docid": "f1396c5dcd191e30f534693231be69da", "score": "0.66018045", "text": "public function edit()\n {\n return view('usersupplier::edit');\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "5f22addb2b8cf9ad635b7e8fa77bb71c", "score": "0.6594983", "text": "public function edit()\n {\n return view('mgcatalogos::edit');\n }", "title": "" }, { "docid": "751bc10498bcb4f6f6569034693a7061", "score": "0.6590733", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = SPM::find($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "bdaf931446dd96d9ab719a5b26c06691", "score": "0.65898085", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $form = $formBuilder->create(\\App\\Forms\\BookForm::class, [\n 'method' => 'PUT',\n 'url' => route('book.update',$id),\n ]);\n $books = Book::find($id);\n return view($this->folder.'.edit',compact('books','form'));\n }", "title": "" }, { "docid": "fbf7adc2631fd986ff97047f975f7733", "score": "0.6589644", "text": "public function formEdit($id)\n {\n //data poli berdasarkan id poli\n $poli = Poli::find($id);\n\n return view('poli.edit', compact('poli'));\n }", "title": "" }, { "docid": "300b72dd1771af8bcd33044e19ed0e2d", "score": "0.6585872", "text": "public function edit($id)\n\t{\n\t\t// get the nerd\n\t\t$user = Cliente::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('preinscrito.editar')\n\t\t\t->with('user', $user);\n\t}", "title": "" }, { "docid": "f39615b9da8997b13628876a6e82ad26", "score": "0.65829885", "text": "public function edit()\n {\n return view('bill::edit');\n }", "title": "" }, { "docid": "48a8ca09ce387a26578ef11260681196", "score": "0.65802926", "text": "public function editform($id){\n $cultivo = Cultivo::findOrFail($id);\n\n return view(\"editform\", compact(\"cultivo\"));\n }", "title": "" } ]
09a723e2032c2545b597e83c22472739
Method for getting browser language
[ { "docid": "c14f3b0f985bff49aa2c9efafbcb29a6", "score": "0.0", "text": "public static function asArray () {\n //include_once \"Zend/Locale.php\";\n\n $zend_locale = new Zend_Locale(Zend_Locale::BROWSER);\n $browser = array();\n $browser['language'] = $zend_locale->getLanguage();\n $browser['language_long'] = $zend_locale->toString();\n return $browser;\n }", "title": "" } ]
[ { "docid": "27bdbcada0475a0a21676daf347552a5", "score": "0.85292953", "text": "function getLanguage();", "title": "" }, { "docid": "a7d138a140b548cd7792375f48c82e7e", "score": "0.8422929", "text": "public static function getBrowserLanguage()\n\t{\n\t\t$server = FilterServer::getInstance();\n\n\t if ( $lang = $server->getString( 'HTTP_ACCEPT_LANGUAGE' ) )\n\t return self::parseDefaultLanguage( $lang );\n\t else\n\t return self::parseDefaultLanguage(NULL);\n\t}", "title": "" }, { "docid": "037578e3144b0894f8e951afea4f75fd", "score": "0.8366037", "text": "public function getLanguage();", "title": "" }, { "docid": "788baf1555d6ac5db37215ab1b1a4158", "score": "0.8226977", "text": "function get_browser_lang()\n{\n $aLang = explode(',' ,@$_SERVER['HTTP_ACCEPT_LANGUAGE']);\n return escape(strtolower(substr(chop($aLang[0]), 0, 2)));\n}", "title": "" }, { "docid": "6bb78d52f552d9bc32149638421e6d0c", "score": "0.8015374", "text": "public function getLanguage(): string;", "title": "" }, { "docid": "5cbb70397ccc5ae175a6e8831abf23a4", "score": "0.80150276", "text": "function language() {\n if (conf('i18n_enabled')) {\n global $colibri;\n\n $router = $colibri->get_router();\n\n return $router->language();\n }\n else {\n return NULL;\n }\n}", "title": "" }, { "docid": "5c774d7f6ea70338591ee58ba7a30c71", "score": "0.7996911", "text": "public function get_language ( ) {\n\t\treturn $this->get_option('et_language');\n\t}", "title": "" }, { "docid": "7e67ba92c06add3e1e1adca3ae80633f", "score": "0.79666966", "text": "public function computeBrowserLang()\n {\n if ($this->browserLang === null) {\n // cookie lang\n if (isset($this->env['HTTP_COOKIE'])) {\n $cookie = $this->env['HTTP_COOKIE'];\n } else {\n $cookie = '';\n }\n preg_match('/wovn_selected_lang\\s*=\\s*(?P<lang>[^;\\s]+)/', $cookie, $match);\n if (isset($match['lang']) && isset(Lang::$lang[$match['lang']])) {\n $this->browserLang = $match['lang'];\n } else {\n # IS THIS RIGHT?\n $this->browserLang = '';\n if (isset($this->env['HTTP_ACCEPT_LANGUAGE'])) {\n $httpAcceptLang = $this->env['HTTP_ACCEPT_LANGUAGE'];\n } else {\n $httpAcceptLang = '';\n }\n $acceptLangs = preg_split('/[,;]/', $httpAcceptLang);\n foreach ($acceptLangs as $l) {\n if (isset(Lang::$lang[$l])) {\n $this->browserLang = $l;\n break;\n }\n }\n }\n }\n return $this->browserLang;\n }", "title": "" }, { "docid": "ce0781ccb57ea2feb8236d95c6ffba5a", "score": "0.79278666", "text": "public function get_language()\r\n\t{\r\n\t\treturn $this->get_attr('language');\r\n\t}", "title": "" }, { "docid": "8741d7ae06b834998c84d9b4477a02d9", "score": "0.78976977", "text": "public function getLanguage () : string\n\t{\n\t\treturn $this->data[\"lang\"];\n\t}", "title": "" }, { "docid": "496ce4a649126d9d8658382846e3630f", "score": "0.7875238", "text": "public static function lang()\n\t{\n\t\treturn Router::$language;\n\t}", "title": "" }, { "docid": "e6a7537604d187e7b8c173126917c5dd", "score": "0.78617555", "text": "public static function get_language()\n {\n self::$language=\"de\";\n return self::$language;\n }", "title": "" }, { "docid": "db416a2d4f2b0c319772b1087772be83", "score": "0.7825651", "text": "public static function getLanguage()\n {\n return self::$language;\n }", "title": "" }, { "docid": "ccc0488f2846ac52f1e0b96a116c8adb", "score": "0.78255516", "text": "public static function lblanguage() \n\t{\n\t\tglobal $lblang;\n\t\tif (isset(LBSystem::$lang)) { \n\t\t\t// error_log(\"Language \" . LBSystem::$lang . \" is already set.\");\n\t\t\treturn LBSystem::$lang; }\n\t\t\n\t\t// error_log(\"Will detect language\");\n\t\tif (isset($_GET[\"lang\"])) {\n\t\t\tLBSystem::$lang = substr($_GET[\"lang\"], 0, 2);\n\t\t\t// error_log(\"Language \" . LBSystem::$lang . \" detected from Query string\");\n\t\t\treturn LBSystem::$lang;\n\t\t}\n\t\tif (isset($_POST[\"lang\"])) {\n\t\t\tLBSystem::$lang = substr($_GET[\"lang\"], 0, 2);\n\t\t\t// error_log(\"Language \" . LBSystem::$lang . \" detected from post data\");\n\t\t\treturn LBSystem::$lang;\n\t\t}\n\t\tLBSystem::read_generaljson();\n\t\tif (isset($lblang)) {\n\t\t\tLBSystem::$lang = $lblang;\n\t\t\t// error_log(\"Language \" . LBSystem::$lang . \" used from general.json\");\n\t\t\treturn LBSystem::$lang;\n\t\t}\n\t\t// Finally we default to en\n\t\treturn \"en\";\n\t}", "title": "" }, { "docid": "fb176cf6ba69717c2b84a412558e8e11", "score": "0.78096765", "text": "public static function getLanguage(): string\n {\n return self::$language;\n }", "title": "" }, { "docid": "bd9cd547eb9a1070947f28a8cd0362f0", "score": "0.7796024", "text": "protected function getLanguage()\n\t{\n\t\treturn $this->getView()->getLanguage();\n\t}", "title": "" }, { "docid": "98e4b932ff2a3069e8fa3b134fd7c698", "score": "0.7791779", "text": "function get_lang_browser()\n{\n // In browser?\n $http_lang = cms_srv('HTTP_ACCEPT_LANGUAGE');\n if (strlen($http_lang) > 0) {\n $http_langs = explode(',', $http_lang);\n foreach ($http_langs as $lang) {\n // Clean up\n $lang = strtoupper(trim($lang));\n $pos = strpos($lang, ';');\n if ($pos !== false) {\n $lang = substr($lang, 0, $pos);\n }\n $pos = strpos($lang, '-');\n if ($pos !== false) {\n $lang = substr($lang, 0, $pos);\n }\n\n if (does_lang_exist($lang)) {\n return $lang;\n }\n }\n }\n\n return null;\n}", "title": "" }, { "docid": "4a7c00ca66735240ba4eafdaa529ba4e", "score": "0.77730536", "text": "public function GetLang ();", "title": "" }, { "docid": "8fbb6b37d626173ba99e10e5800a959c", "score": "0.7769886", "text": "public function getDisplayLanguage();", "title": "" }, { "docid": "bded3d3d28efd5befb4d897145fc3153", "score": "0.773099", "text": "function get_browserlang() {\n if (!isset($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"])) return \"\"; // prevent notice\n $langs = explode(\",\",$_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]);\n $lc = count($langs);\n for ($i=0;$i<$lc;++$i) { // check if we have a suitable file\n $want = substr($langs[$i],0,2);\n if (in_array($want,$this->avail)) {\n $this->browserpref = $want;\n return $want;\n }\n }\n return \"\";\n }", "title": "" }, { "docid": "897257046a9ebdc19654d60f9c23f8d6", "score": "0.77176005", "text": "public static function getLanguage()\r\n\t\t{\r\n\t\t\tself::init();\r\n\t\t\treturn self::$language;\r\n\t\t}", "title": "" }, { "docid": "c4764b20bf82a23220b76146f0b4d363", "score": "0.77129614", "text": "public function getCurrentLanguage(){\n $utils = Utils::getInstance();\n $language = $utils->getCookie(\"language\");\n return $language;\n }", "title": "" }, { "docid": "a5f407fd37aa33ad1b61d6906566a42b", "score": "0.7708362", "text": "public static function lang ( ) { return static::getInstance( )->get( 'usr.lang' ); }", "title": "" }, { "docid": "1962549b19cc11df854ba31c45735409", "score": "0.7705122", "text": "public function getLanguage()\n {\n return $this->responseContent->lang;\n }", "title": "" }, { "docid": "9a45ab8948832d0417c567353371d2ea", "score": "0.76852834", "text": "function get_language()\n{\n\tglobal $_COOKIE;\n\t\t\n\tif (!isset($_COOKIE['lang']) or !in_array($_COOKIE['lang'], avalaible_languages())) {\n\t\tif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))\n\t\t\t$browser_lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n\t\telse\n\t\t\t$browser_lang = 'en';\n\n\t\tif (in_array($browser_lang, avalaible_languages())) {\n\t\t\tsetcookie('lang', $browser_lang);\n\t\t\t$_COOKIE['lang'] = $browser_lang;\n\t\t}\n\t\telse {\n\t\t\tsetcookie('lang','en');\n\t\t\t$_COOKIE['lang'] = 'en';\n\t\t}\n\t}\n\t\t\n\treturn $_COOKIE['lang'];\n}", "title": "" }, { "docid": "ae52f9414541a804a9a285a80f135c37", "score": "0.7681981", "text": "public static function lang()\n {\n return \\Config::get('application.language');\n }", "title": "" }, { "docid": "ba15ee82afdac9e63df2687fc0807f35", "score": "0.7680889", "text": "private function getLanguageHeader()\n {\n //set default language, if language could not be determined\n $language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n return empty($language) ? $this->config->get(Config::DEFAULT_LANGUAGE) : $language;\n }", "title": "" }, { "docid": "1908a3c4088feb0ce333440ff278c3af", "score": "0.76756585", "text": "public function get_language() {\n return $this->language;\n }", "title": "" }, { "docid": "5dd0225d026f8a01af3af96113ff9a2c", "score": "0.76738566", "text": "public function getLanguage(): string\n {\n return $this->language;\n }", "title": "" }, { "docid": "5dd0225d026f8a01af3af96113ff9a2c", "score": "0.76738566", "text": "public function getLanguage(): string\n {\n return $this->language;\n }", "title": "" }, { "docid": "7a014b068ed7d2a664ebc28df6f998ec", "score": "0.7671599", "text": "public static function getLang()\n\t {\n if(!isset(self::$_current_lang) || self::$_current_lang === NULL)\n {\n if(defined('LANGUAGE'))\n return LANGUAGE;\n $langs = self::getBrowserLangs();\n return $langs[1];\n }\n\t return self::$_current_lang;\n\t }", "title": "" }, { "docid": "65aaadbac7954875dad738512a1c5fa0", "score": "0.76667476", "text": "public function currentLanguage();", "title": "" }, { "docid": "3708f4a78d0699f26ae1b1a2c2f9f961", "score": "0.7648083", "text": "public function getLang(){\r\n\t\t$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();\n\t\treturn $this->tr;\r\n\t}", "title": "" }, { "docid": "fb8b6ce70db01f2dcfe909aa967a2f57", "score": "0.76442504", "text": "function getLanguage()\n\t{\n\t\t$available = $this->getContentLanaguages();\n\n\t\t// If 'lang' has been set via GET\n\t\tif(isset($_GET['lang']) and in_array($_GET['lang'], $available))\n\t\t{\n\t\t\tsetcookie('lang', $_GET['lang']);\n\n\t\t\treturn $_GET['lang'];\n\t\t}\n\n\t\t// Has the language been set in a cookie?\n\t\tif(isset($_COOKIE['lang']) and in_array($_COOKIE['lang'], $available))\n\t\t{\n\t\t\treturn $_COOKIE['lang'];\n\t\t}\n\n\t\t// Try and sniff the user agent langauge\n\t\tif ( isset( $_SERVER[\"HTTP_ACCEPT_LANGUAGE\"] ) )\n\t\t{\n\t\t\t// example: ' fr-ch;q=0.3, da, en-us;q=0.8, en;q=0.5, fr;q=0.3' or 'en-US,en;q=0.8'\n\t\t\tforeach(explode(',', strtolower( $_SERVER[\"HTTP_ACCEPT_LANGUAGE\"] )) as $code)\n\t\t\t{\n\t\t\t\t$lang = substr( trim($code), 0, 2 ); // take just the 1st two char's\n\n\t\t\t\tif(in_array($lang, $available))\n\t\t\t\t{\n\t\t\t\t\treturn $lang;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Is there a default set?\n\t\tif(DEFAULT_LANGUAGE)\n\t\t{\n\t\t\treturn DEFAULT_LANGUAGE;\n\t\t}\n\n\t\t// No idea so just choose the last one available\n\t\treturn end($available);\n\t}", "title": "" }, { "docid": "8a5e771a174d16932398e82d40253ff6", "score": "0.7621006", "text": "public function getLang()\n\t{\t\t\n\t\treturn $this->_aLanguage;\n\t}", "title": "" }, { "docid": "f0a2e3d701c391747e989475d16ffd23", "score": "0.7608725", "text": "public function getLanguage()\r\n {\r\n return AlloHelper::language();\r\n }", "title": "" }, { "docid": "44bdb8840a9a95ee3f6d8c8a161cc9b9", "score": "0.75949335", "text": "private function getLanguage() {\r\n $lang = substr(get_bloginfo('language'), 0, 2);\r\n if ($lang == 'ru' || $lang == 'en' || $lang == 'uk') {\r\n return $lang;\r\n } else {\r\n return 'en';\r\n }\r\n }", "title": "" }, { "docid": "c0842f22f43b819f465fe0bd24e7c3c9", "score": "0.758146", "text": "public function Get(){\r\n \treturn self::$_language;\r\n }", "title": "" }, { "docid": "667240c7d34e9d46c9ae99cc0497309a", "score": "0.7566551", "text": "function ssc_lang(){\n\treturn ssc_var_get('lang', 'en');\n}", "title": "" }, { "docid": "d0eb252ad1289d43eeb8c2e02e70c095", "score": "0.7561904", "text": "function _lang()\n{\n return TranslateHelper::getLanguage();\n}", "title": "" }, { "docid": "0c8773b5faacc2019cf2239cb41233d7", "score": "0.7537969", "text": "public function getLanguage()\r\n\t{\r\n\t\treturn $this->language; \r\n\t}", "title": "" }, { "docid": "979514bda5ba6127985cee281ef7566e", "score": "0.7534571", "text": "public static function getLanguage(){\n return strtoupper(str_replace(\"_\",\"\",self::$language));\n }", "title": "" }, { "docid": "645bed2abd400a906103504d3d39ef6c", "score": "0.7522108", "text": "function getHeaderLang()\n {\n !empty(request()->server('HTTP_ACCEPT_LANGUAGE')) ? $lang = request()->server('HTTP_ACCEPT_LANGUAGE') : $lang = 'en';\n return $lang;\n }", "title": "" }, { "docid": "3cf553361804747a2883014f0c16b80f", "score": "0.75085795", "text": "public function getLang() {\n\t\treturn $this->i18n->getLang();\n\t}", "title": "" }, { "docid": "ce21a7d199932976ea0ae666e27edfbd", "score": "0.75024706", "text": "public function language();", "title": "" }, { "docid": "5f3afdf396a7cee035e10b1b568785ea", "score": "0.74977547", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f3d2a651d85ae34e287fbb3efb750b09", "score": "0.7494484", "text": "public function getLang()\n {\n return $this->lang;\n }", "title": "" }, { "docid": "f3d2a651d85ae34e287fbb3efb750b09", "score": "0.7494484", "text": "public function getLang()\n {\n return $this->lang;\n }", "title": "" }, { "docid": "1ad3cc969ae4a80df02c6f72d77aca37", "score": "0.74907154", "text": "function get_language() {\n $language = null;\n\t\tif( function_exists( 'pll_current_language' ) ) {\n\t\t //get language from polylang plugin https://wordpress.org/plugins/polylang/\n\t\t\t$language = pll_current_language();\n } elseif( defined( 'ICL_LANGUAGE_CODE' ) ) {\n\t\t //get language from wpml plugin https://wpml.org\n\t\t\t$language = ICL_LANGUAGE_CODE;\n } else {\n\t\t //return wp get_locale() - first 2 chars (en, fi, ...)\n\t\t\t$language = substr(get_locale(),0,2);\n }\n\t\treturn $language;\n }", "title": "" }, { "docid": "4aebae30b808db49bc72567987b36901", "score": "0.74839634", "text": "public function get_lang()\r\n\t{\r\n\t\treturn $this->get_attr('lang');\r\n\t}", "title": "" }, { "docid": "1ad152401380ccd3574e1bcdbe5c69cc", "score": "0.7476003", "text": "static function get_language() {\n\t\t// WPML\n\t\tif (defined('ICL_LANGUAGE_CODE'))\n\t\t\t$lang = ICL_LANGUAGE_CODE;\n\n\t\t// qTranslate\n\t\telse if (function_exists('qtrans_getLanguage'))\n\t\t\t$lang = qtrans_getLanguage();\n\n\t\telse\n\t\t\t$lang = self::$options->language;\n\n\t\treturn ($lang) ? $lang : null;\n\t}", "title": "" }, { "docid": "e29e71bded17bfbc7e2fcdd7a28f13cc", "score": "0.74759096", "text": "public function getLanguage()\n {\n return 'en';\n }", "title": "" }, { "docid": "e25971f1b01a85f5aa5fe46aba60d76b", "score": "0.7466175", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "f345a2d718251397ed9fd8a83b9198d1", "score": "0.7458685", "text": "public function getLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "d06c63dc43c6207cf4b42f345a366c57", "score": "0.74343604", "text": "public function getLang() {\n return $this->lang;\n }", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.74289435", "text": "public function getLocale();", "title": "" }, { "docid": "a10e10d81b25a5f71eedb36e424a9515", "score": "0.7428081", "text": "public function requestLang()\n {\n $urlLang = $this->urlLanguage();\n\n return ($urlLang && strlen($urlLang) > 0)\n ? $urlLang\n : $this->store->settings['default_lang'];\n }", "title": "" }, { "docid": "cdb6ac6fb3ebfd5f326d2d999c9bc571", "score": "0.7426458", "text": "public function getLang(){\r\n\t\treturn $this->lang;\r\n\t}", "title": "" }, { "docid": "e8d84b866751a02ce3157f0381b744c6", "score": "0.7414017", "text": "public function getLanguage()\r\n\t{\r\n\t\treturn $this->_language;\r\n\t}", "title": "" }, { "docid": "2e0551506b84c1cc7cd503bae9061ed8", "score": "0.7412793", "text": "public function getLanguage()\n {\n return $this->_language;\n }", "title": "" }, { "docid": "1dbc5f2afd27ae2e846ac60e624441a5", "score": "0.7404287", "text": "function getLocale();", "title": "" }, { "docid": "b5d4d90b76ca9c8a121d2601befbf588", "score": "0.740345", "text": "public function language() {}", "title": "" }, { "docid": "9b180efbcbfab43510f2a5ad59cf4454", "score": "0.7402732", "text": "public function getPreferredLanguage(){\r\n\r\n $result = '';\r\n\r\n if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){\r\n\r\n $result = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n $result = strtolower(substr(trim($result[0]), 0, 2));\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "ddc13979aade8acbea99567dcfb0987e", "score": "0.7389941", "text": "public function getLanguage() : string {\n if ($this->getDocumentRoot()->hasAttribute('lang')) {\n return $this->getDocumentRoot()->getAttributeValue('lang');\n }\n\n return '';\n }", "title": "" }, { "docid": "620cad832fe258d045bb98f33dcc9922", "score": "0.7383197", "text": "public function getLanguage()\n\t{\n\t\treturn $this->language;\n\t}", "title": "" }, { "docid": "9b83c95ab16d72d98bd321b342e47b82", "score": "0.73676133", "text": "function getLanguage(){\n return config(\"site.language\",\"vn\");\n}", "title": "" }, { "docid": "9d5f17cb860f6e320723c25cb2cb8b91", "score": "0.7365001", "text": "public function getLocale() {}", "title": "" }, { "docid": "34cb542793760fb46ac263268463191d", "score": "0.7363578", "text": "public function lang()\n\t{\n\t\treturn _l();\n\t}", "title": "" }, { "docid": "0ee137afc26c0adf8e560b865b39a97d", "score": "0.7356837", "text": "private function langFromBrowser ( )\n\t{\n\t\tif ( !array_key_exists( 'HTTP_ACCEPT_LANGUAGE', $_SERVER ) )\n\t\t\treturn;\n\t\t\n\t\t/*\n\t\t * Browser preferrence (Accept-Language header). This is only very simple\n\t\t * solution. For best fit also quality fragment and full normalized language\n\t\t * codes should be checked.\n\t\t */\n\t\t$languages = explode( ',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] );\n\t\tif ( is_array( $languages ) )\n\t\t{\n\t\t\tforeach ( $languages as $lang )\n\t\t\t{\n\t\t\t\t$frags = explode( ';', $lang );\n\n\t\t\t\tif ( is_array( $frags ) )\n\t\t\t\t{\n\t\t\t\t\t$code = strtolower( substr( $frags[0], 0, 2 ) );\n\n\t\t\t\t\tif ( array_key_exists( $code, $this->storage['languages'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->storage['usr.lang'] = $code;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0bfaa6843f847e9a99f9f904647be741", "score": "0.7356704", "text": "public function getCurrentLanguage()\n {\n $this->getRidOfGET();\n\n $currentLang = $this->getLanguageComponent();\n\n return $currentLang;\n }", "title": "" }, { "docid": "7a7b67efbd5f51450521e2a05a8432b2", "score": "0.7355759", "text": "public function getLanguage() {\n return $this->_language;\n }", "title": "" }, { "docid": "45d6173666548befd4ee6b739320fb70", "score": "0.735549", "text": "public function getCurrentLang()\n {\n if ($this->use_slim_middleware) {\n if (!empty($this->current_lang)) {\n return $this->current_lang;\n }\n //return default\n return self::getLocaleFromLabel(SiteConfig::getInstance()->get(\"defaultLocaleLabel\"));\n }\n $current_lang = \"\";\n //try getting default language from cookie\n if (isset($_COOKIE[SiteConfig::getInstance()->get(\"locale_cookie_name\")])) {\n $current_lang = $_COOKIE[SiteConfig::getInstance()->get(\"locale_cookie_name\")];\n }\n\n if (empty($current_lang)) {\n //try getting default language from browser\n $defaultLocaleLabel = null;\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $labelFromHTTP = strtoupper(substr(locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']), 0, 2));\n foreach (SiteConfig::getInstance()->get(\"locales\") as $locale) {\n if ($labelFromHTTP == $locale[\"label\"]) {\n $defaultLocaleLabel = $labelFromHTTP;\n }\n }\n }\n if ($defaultLocaleLabel == null) {\n //fallback to default locale on config\n $defaultLocaleLabel = SiteConfig::getInstance()->get(\"defaultLocaleLabel\");\n }\n $current_lang = self::getLocaleFromLabel($defaultLocaleLabel);\n }\n return $current_lang;\n }", "title": "" }, { "docid": "f1915e391d575bd325770dbed22e9355", "score": "0.7342503", "text": "private function getUserLanguage()\n {\n switch ($this->config->get(Config::LANGUAGE_DETECTION)) {\n case \"header\":\n $detectedLanguage = self::getLanguageHeader();\n break;\n case \"cookie\":\n $detectedLanguage = self::getLanguageCookie();\n break;\n case \"rewrite\":\n $detectedLanguage = self::getLanguageRewrite();\n break;\n default:\n //if nothing is set, return default language\n $detectedLanguage = $this->config->get(Config::DEFAULT_LANGUAGE);\n }\n return $detectedLanguage;\n }", "title": "" }, { "docid": "8fbec034b6846a3a6f343c0129dbd413", "score": "0.7341352", "text": "public function getLanguage() {\n return $this->language;\n }", "title": "" }, { "docid": "a7409284748945169a1ea809f313541e", "score": "0.7338012", "text": "public function getClientAcceptLanguage()\n {\n return self::getInfoValue(self::INFO_HTTP_ACCEPT_LANGUAGE);\n \n }", "title": "" }, { "docid": "7964d44c6975858995e736e76c8ccaf9", "score": "0.73256326", "text": "public function getLanguage()\n\t{\n\t\treturn $this->_language;\n\t}", "title": "" }, { "docid": "514f36e680784e5b4e72668d78cb41fc", "score": "0.7325219", "text": "public function getLanguage()\n {\n if (array_key_exists(\"language\", $this->_propDict)) {\n return $this->_propDict[\"language\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "514f36e680784e5b4e72668d78cb41fc", "score": "0.7325219", "text": "public function getLanguage()\n {\n if (array_key_exists(\"language\", $this->_propDict)) {\n return $this->_propDict[\"language\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "a226b740d32eba6df874212efc6d311a", "score": "0.73174196", "text": "public function getSourceLanguage();", "title": "" }, { "docid": "a226b740d32eba6df874212efc6d311a", "score": "0.73174196", "text": "public function getSourceLanguage();", "title": "" }, { "docid": "0cc407733bafeb584653e69d5bd755c8", "score": "0.73117554", "text": "public static function get_language() {\n static $map;\n\n if (empty($map)) {\n // Create mapping for \"converting\" language codes.\n $map = array(\n 'no' => 'nb'\n );\n }\n\n // Get current language in Moodle.\n $language = str_replace('_', '-', strtolower(\\current_language()));\n\n // Try to map.\n return $map[$language] ?? $language;\n }", "title": "" }, { "docid": "7f25e441b54140f18eebfce694659a9c", "score": "0.730633", "text": "public function language() { }", "title": "" }, { "docid": "d14a2f23d83759b2f1f68478de4e62a3", "score": "0.72963715", "text": "public function getLanguage()\n\t\t{\n\t\t\treturn $this->_language;\n\t\t}", "title": "" }, { "docid": "ebb0af6bb547f82fe915c1d8ed602b35", "score": "0.7287505", "text": "public function getLanguage() {\n return $this->_language;\n }", "title": "" }, { "docid": "bb84f5e19f33156ecacb694d195a9541", "score": "0.7277249", "text": "public function getLocale() {\n foreach(explode(\"\\n\", $this->langs) as $item) {\n $item = explode(\"=\", $item);\n $name = $item[0];\n $locale = $item[1];\n if(!$this->user->language) return;\n if($name == $this->user->language->name) return $locale;\n }\n }", "title": "" }, { "docid": "1032264a27a78724217d0629fd03e7c9", "score": "0.727561", "text": "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "title": "" }, { "docid": "1032264a27a78724217d0629fd03e7c9", "score": "0.727561", "text": "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "title": "" }, { "docid": "1032264a27a78724217d0629fd03e7c9", "score": "0.727561", "text": "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "title": "" }, { "docid": "15770e8d75a488c6a32d6c8ffed2dcb8", "score": "0.7252351", "text": "abstract public function getLanguages();", "title": "" } ]
ad72b662397dea83bbfaa58afe0c7826
This function is used to compare the user given password to the password stored in the DB Along with this, the role is gotten in order to properly redirect the user on successful login Used in the loginfunctions file
[ { "docid": "e8d21ab38b86b5bacd801ea3ab3a93e6", "score": "0.6607391", "text": "function getUserAuth($username)\n {\n try\n {\n $dbObj = new Database();\n $db = $dbObj->getConnection();\n $query = \"Select Password, UserRole From UserAccount \"\n . \"Where Username= :uname\";\n $statement = $db->prepare($query);\n $statement->bindValue(':uname', $username, PDO::PARAM_STR);\n $statement->execute();\n $userPass = $statement->fetch();\n $statement->closeCursor();\n\n return $userPass;\n } catch (PDOException $e)\n {\n //$error_message = $e->getMessage();\n //error_log($error_message, (int)0,\"./error.txt\");\n return \"Could not retrieve user password\";\n }\n }", "title": "" } ]
[ { "docid": "c9f07eb230615c70bf69c9b53d0e9e15", "score": "0.7486189", "text": "public function check_login_credentials() {\n if (empty($_POST)) {\n return FALSE;\n }\n $this->db->where('email', $_POST['loginUserEmail']);\n $this->db->where('password_hash', sha1('admin' . (md5('admin' . $_POST['loginPassword']))));\n $db_result = $this->db->get('fejiro_users');\n\n if ($db_result && $db_result->num_rows() == 1) {\n #login credentials matched\n\n $row = $db_result->row();\n #setting up the session variables\n $this->session->set_userdata(array(\n 'userID' => $row->user_id,\n 'userEmail' => $row->email,\n 'loggedIN' => 1,\n 'userName' => $row->firstname,\n 'role' => $row->role,\n ));\n return $row->role;\n } else {\n #query failed or no matching values found\n return FALSE;\n }\n }", "title": "" }, { "docid": "3b2836ea21a75ee9d7034f7f0f26710c", "score": "0.7216779", "text": "public function authenticate()\n\t{\n\t\t$user = Authorize::model()->find(\n\t\t\t\tarray(\n\t\t\t\t\t'select'=>'username, role_code', // add ONLY the columns you need\n\t\t\t\t\t'condition'=>'username=:uname AND password = PASSWORD(:up)',\n\t\t\t\t\t'params'=>array(':uname'=>$this->username, ':up'=>$this->password)\n\t\t\t\t));\n\t\t\n\t\tif ($user == null) {\n\t\t\t// No user found or invliad password\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t$this->errorCode=self::ERROR_NONE;\n\t\t\t// Store the role in a session:\n\t\t\t$this->setState('role', $user->role_code);\n\t\t\t\n\t\t\t// Is retail?\n\t\t\t$role = Role::model()->findByPk($user->role_code);\n\t\t\t$this->setState('is_retail', $role->is_retail == Role::IS_REATIL_YES? true : false);\n\t\t\t\n\t\t\t// Allow to view internal product?\n\t\t\t$this->setState('is_allow_internal', $role->is_allow_internal == Role::IS_ALLOW_INTERNAL_YES? true : false);\n\t\t\t\n\t\t\t// Retrieve column permission\n\t\t\t$tempRoleColumnMatrix = RoleColumnMatrix::model()->findAllByAttributes(array('role_code'=>$user->role_code));\n\t\t\t\n\t\t\t$prevTableName = '';\n\t\t\t$roleMatrix = array();\n\t\t\tforeach ($tempRoleColumnMatrix as $item) {\n\t\t\t\tif ($item->table_name != $prevTableName) {\n\t\t\t\t\t$roleMatrix[$item->table_name] = array();\n\t\t\t\t\t$prevTableName = $item->table_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$roleMatrix[$item->table_name][] = $item->column_name;\n\t\t\t}\n\t\t\t\n\t\t\t$this->setState('role_matrix', $roleMatrix);\n\t\t\t\n\t\t\t// Retrieve corresponding supplier\n\t\t\tif ($user->role_code == GlobalConstants::ROLE_SUPPLIER) {\n\t\t\t\t$userSupplier = UserSupplier::model()->findByPk($this->username);\n\t\t\t\t$this->setState('supplier', $userSupplier->supplier);\n\t\t\t}\n\t\t\t\n\t\t\t// Retrieve page permission\n\t\t\t$tempRolePageMatrixes = RolePageMatrix::model()->findAllByAttributes(array('role_code'=>$user->role_code));\n\t\t\t$rolePageMatrixes = array();\n\t\t\tforeach ($tempRolePageMatrixes as $rolePageMatrix) {\n\t\t\t\t$rolePageMatrixes[$rolePageMatrix->page] = $rolePageMatrix->permission;\n\t\t\t}\n\t\t\t$this->setState('role_page_matrix', $rolePageMatrixes);\n\t\t\t\n\t\t\t// Update country\n\t\t\ttry {\n\t\t\t\t$ip = $this->getIP();\n\t\t\t\t//http://ip-api.com/json/208.80.152.201\n\t\t\t\t//$url='http://getcitydetails.geobytes.com/GetCityDetails?fqcn='.$ip;\n\t\t\t\t$url='http://ip-api.com/json/'.$ip;\n\t\t\t\t$ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\t\t\tcurl_setopt($ch,CURLOPT_TIMEOUT,5);\n $str = curl_exec($ch);\n curl_close($ch);\n\t\t\t\t\t\t\n\t\t\t\t//$str= file_get_contents($url,false,$ctx);\n\t\t\t\t$tags = json_decode($str, true);\n\t\t\t\t//$user->country = $tags['geobytescountry'];\n\t\t\t\t$user->country = $tags['country'];\n\t\t\t\t$user->ip = $ip;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tYii::log($e->getMessage(), 'error', 'pm.components.UserIdentity');\n\t\t\t\t$user->country = '';\n\t\t\t\t$user->ip = '';\n\t\t\t}\n\t\t\t\n\t\t\t// Update last login date\n\t\t\t$user->last_login = new CDbExpression('NOW()');\n\t\t\t$user->save(true, array('last_login', 'country', 'ip'));\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "adb36e55e233952fe3d9aae75d25fa8d", "score": "0.71145046", "text": "function verifyLogin($user, $pwd){\n $servername = \"localhost\";\n $username = \"dbAdmin\";\n $password = \"L0g1n2db!\";\n $dbname = \"travelexperts\";\n \n // Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n } \n//check user against database info\n $checkLogin = \"SELECT password FROM agents WHERE username = '$user';\";\n $verified = $conn -> query($checkLogin);\n\n if($verified == false){\n return false;\n } else {\n $row = $verified -> fetch_row();\n return password_verify($pwd,$row[0]);\n }\n $conn->close();\n}", "title": "" }, { "docid": "a9c0e30db1d16fff1e8de0cde678c5ef", "score": "0.7110869", "text": "function doUserAndPasswordMatch($user,$password)\r\n{\r\n\tglobal $db;\r\n\t$LangID = ReplaceEmpty(\"langid\",\"1\");\r\n\t$decode = base64_encode($password);\r\n\t$SQL = \"select * from member where Email = '$user' and password = '$decode'\";\r\n\t$rsUser = @mysql_query($SQL,$db->cnn) or die(mysql_error());//get the line with the user details\r\n\r\n\tif ($rwUser = mysql_fetch_array($rsUser))//make array for user details\r\n\t{\r\n\t\t$_SESSION['SAWMemberID'] = $rwUser['MemberID'];\r\n\t\t$_SESSION['CheckoutEmail'] = $rwUser['Email'];\r\n\t\treturn true;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "b758797c906ba9c6c6a2aed63b1d2619", "score": "0.7086948", "text": "function verifyLogin ($role)\n{\n\trequire_once 'db.php';\n\tsession_start();\n\t// Perhaps the user is already logged in\n\tif (isset($_SESSION['role']))\n\t{\n\t\t// Does the user belong to the appropriate role?\n\t\tif ($role == $_SESSION['role'])\n\t\t{\n\t\t\treturn;\t\t// Logged in, right role\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire 'Views/badRole.php';\t\t// Logged in, wrong role\n\t\t\texit();\n\t\t}\n\t}\n\t\n\t// Empty error message\n\t$message = \"\";\n\n\t// User is attempting to log in. Verify credentials.\n\tif (isset($_REQUEST['temp_log_email']) && isset($_REQUEST['temp_log_pass']))\n\t{\n\t\t$email = $_REQUEST['log_email'];\n\t\t$pass = $_REQUEST['log_pass'];\n\t\ttry\n\t\t{\n\t\t\t$db = openDBConn();\n\t\t\t$stmt = $db->prepare(\"SELECT user_id, first_name, role FROM Users WHERE email='$email' and user_password='$pass'\");\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\tif ($row = $stmt->fetch())\n\t\t\t{\n\t\t\t\t$_SESSION['user_id'] = $row['user_id'];\n\t\t\t\t$_SESSION['first_name'] = $row['first_name'];\n\t\t\t\t$_SESSION['last_name'] = $row['last_name'];\n\t\t\t\t$_SESSION['email'] = $email;\n\t\t\t\t$_SESSION['role'] = $row['role'];\n\t\t\t\t$stmt->closeCursor();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$message = \"Incorrect username or password\";\n\t\t\t\trequire 'login.php';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $exception)\n\t\t{\n\t\t\trequire \"Views/error.php\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\tif ($role == $_SESSION['role'])\n\t\t{\n\t\t\treturn;\t\t\t\t\t\t\t\t// Right role\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire 'Views/badRole.php';\t\t// Wrong role\n\t\t\texit();\n\t\t}\n\t}\n\telse\n\t{\n\t\trequire 'login.php';\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "70435dc0bc0036c2564a915ace3d5d04", "score": "0.7029574", "text": "function verifyLogin ($login , $pw) \n{\n\ttry {\n\t\t\t$DBH = openDBConnection();\n\t\t\t$DBH->beginTransaction();\n\t\t\t\n\t\t\t// Get the information about the user. This includes the\n\t\t\t// hashed password, which will be prefixed with the salt.\n\t\t\t$stmt = $DBH->prepare(\"select Real_Name, User_Role, PW from User_Role where loginName = ?\");\n\t\t\t$stmt->bindValue(1, $login);\n\t\t\t$stmt->execute();\n\n\t\t\t// Was this a real user?\n\t\t\tif ($row = $stmt->fetch())\n\t\t\t {\t\t\t\t\n\t\t\t\t// Validate the password\n\t\t\t\t$hashedPassword = $row['PW'];\n\n\t\t\t\t//the password was correct \n\t\t\t\tif (computeHash($pw, $hashedPassword) === $hashedPassword)\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['real'] = htmlspecialchars($row['Real_Name']);\n\t\t\t\t\t$_SESSION['login'] = $login;\t\t\t\n\t\t\t\t\t$_SESSION['authenticated'] = $row['User_Role'];\n\n\t\t\t\t\treturn true; \n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$message = \"<div class='alert alert-error'>Username or password was wrong</div>\";\n\t\t\t\t\t$_SESSION['error'] = $message; \n\t\t\t\t\treturn false; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$message = \"<div class='alert alert-error'>Username or password was wrong</div>\";\n\t\t\t\t$_SESSION['error'] = $message; \n\n\t\t\t\treturn false; \n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $exception) \n\t\t{\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\t// We're logged in, so change session ID. If the session ID was\n\t\t// stolen before we switched to HTTPS, it will do no good now.\n\t\tchangeSessionID();\n\n\n}", "title": "" }, { "docid": "90c1c3a9e32a3f57730a772023e65981", "score": "0.6964356", "text": "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n }", "title": "" }, { "docid": "27f58b36313a2a4e54ae44cdc85c6e41", "score": "0.69564515", "text": "public function checkLogin($role) {\n if($role == 1) {\n $diffrole = 0;\n } else if ($role == 0) {\n $diffrole = 1;\n } else {\n $diffrole = -1;\n }\n if ($_SESSION['loggedin'] == false) {\n header('location:index.php');\n die;\n } else if ($_SESSION['rol'] == $diffrole) {\n if ($role == 0) {\n header('location:dashboard.php');\n die;\n } else {\n header('location:student.php');\n die;\n }\n }\n }", "title": "" }, { "docid": "c246dfb51a23e521e3a9cd04777c89b6", "score": "0.6930293", "text": "function login_user($username,$password){\n \n \n global $connection;\n \n $username = trim($username);\n $password = trim($password);\n \n //===================================== cleaning the data \n $username = mysqli_real_escape_string($connection,$username);\n $password = mysqli_real_escape_string($connection,$password);\n \n \n \n $query = \"SELECT * FROM users WHERE username = '{$username}' \";\n $select_query = mysqli_query($connection,$query);\n \n if(!$select_query){\n die('Query error'. mysqli_error($connection));\n }\n \n while($row = mysqli_fetch_array($select_query)){\n \n $db_user_id = $row['user_id'];\n $db_username = $row['username'];\n $db_user_password = $row['user_password'];\n $db_user_firstname = $row['user_firstname'];\n $db_user_lastname = $row['user_lastname'];\n $db_user_role = $row['user_role'];\n \n \n \n \n \n if(password_verify($password,$db_user_password)){\n $_SESSION['user_id'] = $db_user_id;\n $_SESSION['username'] = $db_username;\n $_SESSION['firstname'] = $db_user_firstname;\n $_SESSION['lastname'] = $db_user_lastname;\n $_SESSION['user_role'] = $db_user_role;\n\n if(!empty($_SESSION['username'] && !empty($_SESSION['user_role']))){\n if(is_admin()){\n\n header(\"Location: /cms/admin\");\n \n }else{\n header(\"Location: /cms/admin/dashboard.php\");\n }\n \n }else{\n header(\"Location: index.php\");\n }\n \n \n \n }else{\n \n return false;\n \n }\n \n \n \n \n }\n \n return true;\n \n }", "title": "" }, { "docid": "3dee3b8c20f48ac6a4d61790babcab62", "score": "0.69132614", "text": "public function compare_password()\n\t{\n\t\t$mysql = new mysql_class();\n\t\t$mysql = $mysql->get_status();\n\t\t$this->login = mysqli_real_escape_string($mysql, $this->login);\n\t\t$this->password = mysqli_real_escape_string($mysql, $this->password);\n\n\t\t$query = \"SELECT Login, Heslo FROM Osoba WHERE Osoba.Login='$this->login'\";\n\t\t$result = mysqli_query($mysql, $query);\n\n\t\tif ($result->num_rows === 1) {\n\t\t\t$this->password = base64_encode(hash(\"sha256\", $this->password, true));\n\t\t\t$passwd = $result->fetch_assoc();\n\t\t\tif ($this->password === $passwd['Heslo']) {\n\t\t\t\t$_SESSION['login'] = $this->login;\n\t\t\t\tif (!isset($_SESSION['start_time'])) {\n\t\t\t\t\t$str_time = time();\n\t\t\t\t\t$_SESSION['timestamp'] = $str_time;\n\t\t\t\t\t$_SESSION['logged_in'] = true;\n\t\t\t\t}\n\t\t\t\tmysqli_close($mysql);\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tmysqli_close($mysql);\n\t\t\treturn 1;\n\t\t}\n\t\tmysqli_close($mysql);\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "e14b33a1a073943dc2e19a8769b1a95b", "score": "0.6910317", "text": "function validateAdmin($connection, $username, $password)\r\n{\r\n $sql = \"SELECT * FROM admin WHERE username = '$username'\";\r\n $result = $connection->query($sql);\r\n if (!$result) die($connection->error);\r\n elseif ($result->num_rows) {\r\n $row = $result->fetch_array(MYSQLI_NUM);\r\n $result->close();\r\n $salt1 = \"jau&2js\"; $salt2 = \"aow@ues\";\r\n $token = hash('ripemd128', \"$salt1$password$salt2\");\r\n echo $token;\r\n if($token == $row[2]){\r\n //intializing the session to session_start\r\n session_start();\r\n $_SESSION['username'] = $row[1];\r\n // Redirect the admin to page where they want to be\r\n\r\n\r\n\r\n\r\n }\r\n else{\r\n echo '<p> Credentials not valid </p>';\r\n }\r\n }\r\n else die(\"Invalid username/password combination\");\r\n}", "title": "" }, { "docid": "7eddf129fc8435717a645c56cba70ec9", "score": "0.68656313", "text": "public function authenticate()\n\t{\n //debug($this->password, true);\n //$role = 0;\n $user = null;\n if(Yii::app()->controller->module->id == 'admin'){\n //$role = 1;\n $user = Users::model()->findByAttributes(array('username'=>$this->username, 'password' => md5($this->password)));\n }\n \t\n\t\tif($user == null)\n\t\t\t$this->errorCode = self::ERROR_USERNAME_INVALID;\n\t\telse if($user->password !== md5($this->password) )\n\t\t\t$this->errorCode = self::ERROR_PASSWORD_INVALID;\n\t\telse if($user->status == 0){\n $this->errorCode = self::ERROR_STATUS_NOTACTIV;\n\t\t} else {\n $this->_email = $user->email;\n $this->_id = $user->id;\n $this->setState('role', $user->role_id);\n $this->setState('user_type', $user->user_type);\n $this->setState('customer_code', $user->customer_code);\n $this->errorCode = self::ERROR_NONE;\n\t\t}\n\t\treturn !$this->errorCode;\n\t}", "title": "" }, { "docid": "fb94f6297f4ea09efa87a7036f2625b2", "score": "0.68515867", "text": "function check_login($username, $password){\n $quoted_username = $this->database->quote($username);\n $query = \"SELECT password, class_id FROM students WHERE id = $quoted_username\";\n $user = $this->database->query($query)->fetchAll(PDO::FETCH_ASSOC)[0];\n return hash_equals($user['password'], crypt($password, $user['password']));\n }", "title": "" }, { "docid": "5a008dc2167cc684d93f09f5dce0196d", "score": "0.6846221", "text": "function password_check($oldpassword, $profile_id, $encryptflag)\n{\n\tglobal $db_user_id, $db_group_id, $db_user_name, $db_user_email, $db_user_password, $db_table_user_name, $db_user_salt;\n\tglobal $db_table_group_name, $auth_user_class, $table_prefix, $db_raid, $phpraid_config;\n\n\t$sql_passchk = sprintf(\t\"SELECT `\" . $db_user_password . \"`, `\" . $db_user_salt . \"` FROM \" . $table_prefix . $db_table_user_name .\n\t\" WHERE `\" . $db_user_id . \"` = %s\", quote_smart($profile_id));\n\t\n\t$result_passchk = $db_raid->sql_query($sql_passchk) or print_error($sql_passchk, $db_raid->sql_error(), 1);\n\n\tif ($db_raid->sql_numrows($result_passchk) != 1)\n\t{\n\t\t//user not found in CMS DB, Fail\n\t\treturn 2;\n\t}\n\n\t$data_passchk = $db_raid->sql_fetchrow($result_passchk, true);\n\t$db_pass = $data_passchk[$db_user_password];\n\t\n\tif ($encryptflag) {\n\t\t\n\t}\n\telse {\n\t\t$oldpassword = md5(md5($oldpassword).$data_passchk[$db_user_salt]);\n\t}\n\t\n\tif ($oldpassword == $db_pass) {\n\t\treturn $db_pass;\n\t}\n\telse {\n\t\treturn FALSE;\n\t}\n}", "title": "" }, { "docid": "8983cb9c138ee7d652c956b6513fc73e", "score": "0.6829517", "text": "function check_credentials($result, $password) {\n switch ($result->num_rows) {\n case 0:\n global $errorMessage;\n $errorMessage = \"Incorrect email adress.\";\n break;\n case 1:\n $row = $result->fetch_assoc();\n // check password\n if (password_verify($password, $row[\"password\"])) {\n set_session($row);\n } else {\n global $errorMessage;\n $errorMessage = \"Incorrect password.\";\n }\n break;\n case 2:// (admin and user)\n $matches = false;\n while ($row = $result->fetch_assoc()) {\n // check password\n if (password_verify($password, $row[\"password\"])) {\n $matches = true;\n set_session($row);\n }\n }\n if (! $matches) {\n global $errorMessage;\n $errorMessage = \"Incorrect password.\";\n }\n break;\n }\n }", "title": "" }, { "docid": "8d38fecf21814d6d00acbc53d1ed20e3", "score": "0.68039495", "text": "public function verifyPassword($password) {\n \n /* Lets verify the password */\n $query = $this->db->query(\"SELECT value FROM confy_admin_settings WHERE setting='admin_password'\");\n $login_data = mysqli_fetch_array($query);\n \n \n /* Check if the password is correct */\n if ($login_data[\"value\"] == MD5($password)) {\n return true;\n } else {\n return false;\n } \n \n }", "title": "" }, { "docid": "e9cec17aff3d77c3fcd8ce57ff3ef4c4", "score": "0.67947876", "text": "function verify_login($login, $password)\n{\n $query= \"SELECT * FROM residents where login = '\".u2q($login).\"'\";\n\n $result= mysql_query($query) or die(\"unable to check login information\");\n \n if (mysql_num_rows($result)!=1)\n {\n return null;\n }\n\n // check the password\n $row=mysql_fetch_array($result);\n\n if (hash_password($row[\"password\"])==$password)\n return $row;\n\n // password is wrong!\n return null;\n}", "title": "" }, { "docid": "6d5d0936f5f324482220f49a446cbc17", "score": "0.6788627", "text": "function compareLogin($conn,$compUsername,$compPass){\n $DBquery = \" SELECT * FROM `users`\n WHERE \n `username` = ? \";\n $statement = mysqli_prepare($conn,$DBquery);\n mysqli_stmt_bind_param($statement,'s',$compUsername);\n mysqli_stmt_execute($statement);\n $resultat = mysqli_stmt_get_result($statement);\n if(mysqli_num_rows($resultat) > 0){\n $userdata = mysqli_fetch_assoc($resultat);\n $userPass = $userdata['password'];\n $passCheck = password_verify($compPass,$userPass);\n if($passCheck == true){\n $userId = $userdata['id'];\n return $userId; \n }\n }\n}", "title": "" }, { "docid": "39b67c4cf59bc48f16875e1019c16fe9", "score": "0.67679363", "text": "function checkPassword($id, $password) {\r\n global $connect;\r\n $hashed_password = hash('sha256',getUserSalt($id).$password);\r\n $stored_password = $connect->query(\"SELECT password FROM `users` WHERE id='$id'\")->fetchColumn();\r\n return ($stored_password and $hashed_password==$stored_password);\r\n}", "title": "" }, { "docid": "cf4a92dbbdb379fa7050da06ec9cc1bd", "score": "0.67592657", "text": "function checkpassword() {\n if (DAOFactory::getTblUserDAO()->load(Session::getSession('userid'))->password != $_POST['oldpassword']) {\n echo true;\n }\n }", "title": "" }, { "docid": "72600e3b68e3c18d318732af03400dd6", "score": "0.67586124", "text": "function authenticate($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user['id'];\n }\n }\n return false;\n }", "title": "" }, { "docid": "37eb94b7a0b237b275921276a4886b3d", "score": "0.6755386", "text": "public function password_check($str){\n \n if($this->user_model->exist_row_check('username', $this->username_temp) > 0){\n $user_detail = $this->user_model->getUserDetailByUsername($this->username_temp);\n if($user_detail->password == crypt($str,$user_detail->password)){\n return TRUE;\n }\n else{\n $this->form_validation->set_message('password_check','Password yang dimasukkan tidak sesuai');\n return FALSE;\n }\n }else{\n $this->form_validation->set_message('password_check','Username yang dimasukkan tidak sesuai');\n return FALSE;\n }\n \n }", "title": "" }, { "docid": "f58821a3c63e4ac9da3cc2f2fcd46a9a", "score": "0.67292196", "text": "function login()\n{\n\n\t$username = $_POST['username'];\n\t$password = $_POST['password'];\n\n\t$result = admin()->get(\"username='$username' and password = '\".sha1($password).\"' and level='hr'\");\n\n\tif ($result){\n\t\t$_SESSION['hr_session'] = $username;\n\t\tif (sha1($password) == sha1('temppassword')){\n\t\t\t$_SESSION['temp_session'] = $username;\n\t\t\theader('Location: index.php?view=changepassword');\n\t\t}else{\n\t\theader('Location: index.php');\n\t\t}\n\t}\n\telse {\n\t\t\theader('Location: index.php?error=User not found in the Database');\n\t}\n}", "title": "" }, { "docid": "bd3f457f0ee8989dfb52f6fd353709c9", "score": "0.67139614", "text": "function admin_signin()\n{\n \n echo $email = $_POST[\"email\"];\n echo $password = $_POST[\"password\"];\n //$salt = \"encrypt_it\";\n //$password = md5($password.$salt);\n $con=mysqli_connect('localhost','root','Jigyasha#$') or die(\"Failed to connect to SQL DB: \");\n $db=mysqli_select_db($con,'pixlr') or die(\"Failed to connect to SQL DB: \");\n $query = mysqli_query($con,\"SELECT * FROM admin WHERE admin_mail = '$email'\");\n $row = mysqli_fetch_array($query);\n echo $row['admin_mail'];\n echo $row['admin_password'];\n if(!empty($row))\n{\n \t//$row = mysqli_fetch_array($query);\n \tif($row['admin_password'] == $password)\n {\n \techo \"equal\";\n \theader(\"location:admint.php\");\n }\n}\n \t//header(\"location: admin.php?v=false\");\n}", "title": "" }, { "docid": "b71fc93994bfd007f3c3038693d2d80c", "score": "0.6710525", "text": "public function role_update($_id){\n global $db;\n $user_id=$_SESSION[\"id\"];\n $role_id=$_SESSION[\"role_id\"];\n $result=$db->query(\"select u.id,u.password from users u where u.id='$user_id'\");\n list($_user_id,$_password)=$result->fetch_row();\n\n if($_password==$this->password){\n\n $db->query(\"update role set name='$this->name',user_id='$user_id',Ucreate='$this->create',Uselect='$this->select',Uupdate='$this->update',Udelete='$this->delete',Ualter='$this->alter' where id='$_id'\");\n echo \"successfull update\";\n\n }else{\n echo \"your password is wrong\";\n }\n}", "title": "" }, { "docid": "9deeecf66b86fda222b222762d5be7f6", "score": "0.6702726", "text": "function authenticate($username = '', $password = '')\n{\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if ($db->num_rows($result)) {\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if ($password_request === $user['password']) {\n return $user['id'];\n }\n }\n return false;\n}", "title": "" }, { "docid": "5a8ba473b51d3db217453029b796fbd0", "score": "0.6702453", "text": "public function matchPassword($password){\n\t \tif(Auth::guard('admin')->attempt(['email' => Auth::guard('admin')->user()->email, 'password' => $password])){\n\t\t\treturn false;\n\t \t}else{\n\t\t \treturn true;\n\t \t}\n\t}", "title": "" }, { "docid": "71a9b356afa6c70ebfdb31925fc5a005", "score": "0.66823643", "text": "function password_check($oldpassword, $profile_id, $encryptflag)\n{\n\tglobal $db_raid, $phpraid_config, $stdoutfptr;\n\t$sql = sprintf(\t\"SELECT password \".\n\t\t\t\t\t\" FROM \" . $phpraid_config['db_prefix'] . \"profile \".\n\t\t\t\t\t\" WHERE profile_id = %s\", quote_smart($profile_id)\n\t\t\t);\n\t$result = $db_raid->sql_query($sql) or print_error($sql, $db_raid->sql_error(), 1);\n\t$data = $db_raid->sql_fetchrow($result, true);\n\t\n\tif ($encryptflag)\n\t{ // Encrypted Password Sent In.\n\t\tif (defined('DEBUG') && DEBUG)\n\t\t{\n\t\t\tfwrite($stdoutfptr, \" Encrypted Password Sent In.\\n\");\n\t\t\tfwrite($stdoutfptr, \" Password If Check (Equals) :\\n\");\n\t\t\tfwrite($stdoutfptr, \" -> Input Password: '\" . $oldpassword . \"'\\n\");\n\t\t\tfwrite($stdoutfptr, \" -> Database Password: '\" . $data['password'] . \"'\\n\");\n\t\t}\n\t\tif ($oldpassword == $data['password'])\n\t\t\treturn $data['password'];\n\t\telse\n\t\t\treturn FALSE;\n\t}\n\telse \n\t{ // Plain text password sent in.\n\t\tif (defined('DEBUG') && DEBUG)\n\t\t{\n\t\t\tfwrite($stdoutfptr, \" Encrypted Password NOT Sent In.\\n\");\n\t\t\tfwrite($stdoutfptr, \" Password If Check (Equals) :\\n\");\n\t\t\tfwrite($stdoutfptr, \" -> Input Password: '\" . md5($oldpassword) . \"'\\n\");\n\t\t\tfwrite($stdoutfptr, \" -> Database Password: '\" . $data['password'] . \"'\\n\");\n\t\t}\n\t\t\n\t\tif (md5($oldpassword) == $data['password'])\n\t\t\treturn $data['password'];\n\t\telse\n\t\t\treturn FALSE;\n\t}\n}", "title": "" }, { "docid": "19f19ac86f3925b1eceb894f07210f62", "score": "0.6671238", "text": "public function login(){\n\t\t$login = mysqli_real_escape_string($this->db, $_POST['login']); \n\t\t$password = $_POST['password']; \n\t\t$user = Helper::select($this->db, \"SELECT id, login, password FROM user WHERE '$login' = login LIMIT 1\", 1);\n\t\t\t\n\t\tif(crypt($password, $user['password']) == $user['password']){\n\t\t\t$this->setUser($login);\n\t \t\tSession::set(['login-status' => \"default\"]);\n\t\t}\n\t\telse{ \n\t\t\tSession::set(['login-status' => \"fail\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "6c8e3250f545e917b1a6cb5418f3ef48", "score": "0.66666263", "text": "public function login($user,$password)\n {\n $sql = \"SELECT acronym, name FROM User WHERE acronym = ? AND password = md5(concat(?, salt))\";\n $params = array(htmlentities($user), htmlentities($password));\n $res=$this->db->ExecuteSelectQueryAndFetchAll($sql, $params);\n if(isset($res[0])) {\n $_SESSION['user'] = $res[0];\n return true;\n }\n else{ \n return false;\n }\n }", "title": "" }, { "docid": "72b0889dd59f05cf99aded93f9a213ff", "score": "0.66617054", "text": "function validatelogin($username,$password) {\n\t$db_query = \"SELECT password FROM \"._DB_PREF_.\"_tblUser WHERE username='$username'\";\n\t$db_result = dba_query($db_query);\n\t$db_row = dba_fetch_array($db_result);\n\t$res_password = trim($db_row['password']);\n\tif ($password && $res_password && ($password==$res_password)) {\n\t\t$ticket = md5(mktime().$username);\n\t\treturn $ticket;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "ab210fec904e915f6c30dc277a675e13", "score": "0.6655422", "text": "function authenticate($user, $password){\n \n $loginresult = $this->db->select(\"SELECT * FROM \".DB_PREFIX.\"user WHERE username = :username AND password = :password\", [\"username\" => $user, \"password\" => md5($password)]);\n if (!empty($loginresult)){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7417f64bbdafb75e30d4f9ddba8284f5", "score": "0.6630509", "text": "function userAuthorised($dbConnected,$username,$password){\n \n $md5password=md5($password);\n \n $sql_query= \"SELECT ID,password,accesslevel FROM tuser where username='$username'\";\n \n \n $sql_selectQuery= mysqli_query($dbConnected, $sql_query);\n echo mysqli_error($dbConnected);\n while($row= mysqli_fetch_array($sql_selectQuery,MYSQLI_ASSOC)){\n $ID = $row['ID'];\n $passwordretrieved = $row['password'];\n $accesslevel = $row['accesslevel']; \n }\n mysqli_free_result($sql_selectQuery);\n $returncode=false;\n if(!empty($passwordretrieved) AND ($passwordretrieved==$md5password)) {\n \n $_SESSION['user'] = $accesslevel;\n setcookie('userID', $ID, time()+7200);\n $returncode=true;\n }\n return $returncode;\n \n }", "title": "" }, { "docid": "0a633dca80f2c39c3f935e59f42e32ae", "score": "0.66272295", "text": "function getLogin($csl, $password)\n{\n if ($csl == \"admin\" && $password == \"123456\") {\n return true;\n } else {\n return false;\n }\n\n}", "title": "" }, { "docid": "3211e68884b23400d8a13e565c4b727f", "score": "0.66106474", "text": "function check_login($username,$password)\n\t\t{\n\t\t\t\tif(empty($username) || empty($password))\n\t\t\t\t{\n\t\t\t\t\treturn 'Parameters missing';\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t\t\t\t$log=sql_query(\" select * from adminLogin where username = '$username' \");\n\t\t\t\t\t\n\t\t\t\t\tif(mysqli_num_rows($log)>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($row = mysqli_fetch_array($log))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($row['password'] == $password)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\treturn 'true';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\treturn 'Please enter correct username or password';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn 'Please enter correct username or password';\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\treturn 'Please enter valid credentials';\t\t\t\t\n\t\t\t\t}\t\n\t\t}", "title": "" }, { "docid": "677f199e339783b7f461947957a84c92", "score": "0.659995", "text": "public function login() {\n\t\t$name = filter_var(Helper::post('name'), FILTER_SANITIZE_STRING);\n\t\t$password = filter_var(Helper::post('password'), FILTER_SANITIZE_STRING);\n\n\t\t/*** now we can encrypt the password ***/\n\t\t$password = sha1($password);\n\n\t\ttry {\n\t\t\t//$dbh = $db->base;\n\t\t\t//$stmt= $dbh->base->query(\"SELECT id, name, password FROM users WHERE name = '$name' AND password = '$password'\");\n\t\t\t$stmt = $this -> db -> prepare(\"SELECT id, name, email, password FROM \".DBPREFIX.\"users WHERE (name = ? OR email = ?) AND password = ?\");\n\t\t\t$stmt -> execute(array($name, $name, $password));\n\n\t\t\t/*** check for a result ***/\n\t\t\t$user_id = $stmt -> fetchColumn();\n\n\t\t\t/*** if we have no result then fail boat ***/\n\t\t\tif ($user_id == FALSE) {\n\t\t\t\treturn 101;\n\t\t\t} else {\n\t\t\t\tHelper::session_set('id', $user_id);\n\t\t\t\t//Helper::session_set('user_name', $row['name']);\n\t\t\t\t//Helper::session_set('user_email', $row['email']);\n\t\t\t\t//$search = \"%$search%\";\n\t\t\t\t$user_data = $this -> db -> prepare(\"SELECT * FROM \".DBPREFIX.\"users WHERE name = ? OR email = ?\");\n\t\t\t\t$user_data -> execute(array($name, $name));\n\t\t\t\t$data = $user_data -> fetchAll();\n\t\t\t\tHelper::session_set('user_name', $data[0]['name']);\n\t\t\t\tHelper::session_set('user_email', $data[0]['email']);\n\t\t\t\tHelper::session_set('user_role', $data[0]['role']);\n\t\t\t\tHelper::session_set('user_access', $data[0]['role_id']);\n\t\t\t\t//var_dump($data[0]);\n\t\t\t\t//while ($row = $stmt -> fetch()) {\n\n\t\t\t\t//}\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t} catch(Exception $e) {\n\t\t\t/*** if we are here, something has gone wrong with the database ***/\n\t\t\treturn 102;\n\t\t}\n\t}", "title": "" }, { "docid": "4475f600ecc096bee814ac2154a86579", "score": "0.65833825", "text": "public function checkUserLogin() {\n $fetchedUser = $this->getClientByUsername();\n print_r($fetchedUser);\n print_r(\"<br>\");\n print_r($this->password);\n $trueHash = $fetchedUser['password'];\n $this->id = $fetchedUser['id'];\n return password_verify($this->password, $trueHash);\n }", "title": "" }, { "docid": "dc7c7ea5b5b7db03e0c207d38e910c05", "score": "0.6583187", "text": "function verifyLogInRole(string $role): bool {\n return verifyLogIn() && $_SESSION['role'] == $role;\n}", "title": "" }, { "docid": "98141c6611c9411b4125fb03a8dcfa10", "score": "0.6582429", "text": "function validateUser($connection,$username,$password )\r\n{\r\n $sql_username = mysql_entities_fix_string($connection, $username);\r\n $sql_password = mysql_entities_fix_string($connection, $password);\r\n $sql = \"SELECT * FROM user WHERE username = '$sql_username'\";\r\n $result = $connection->query($sql);\r\n if (!$result) die($connection->error);\r\n elseif ($result->num_rows) {\r\n $row = $result->fetch_array(MYSQLI_NUM);\r\n $result->close();\r\n $salt1 = \"l&hga@1\"; $salt2 = \"pg!@\";\r\n $token = hash('ripemd128', \"$salt1$sql_password$salt2\");\r\n if($token == $row[2]) {\r\n echo 'Logged In';\r\n session_start();\r\n $_SESSION['username'] = $username;\r\n $_SESSION['password']=$token;\r\n // Redirect to the specified page\r\n\r\n\r\n\r\n }\r\n else die(\"Invalid username/password combination\");\r\n }\r\n else die(\"Invalid username/password combination\");\r\n}", "title": "" }, { "docid": "feb1d683443d34bf5038374e843378da", "score": "0.6581836", "text": "function loginAdmin($username,$password){\n\t\t\t//fetching values from database\n\t\t\t$admin_info = $this->manageContent->getValueWhere(\"admin_info\",\"*\",\"id\",1);\n\t\t\t//checking values with database\n\t\t\tif($username == $admin_info[0]['username'] && $password == $admin_info[0]['password'])\n\t\t\t{\n\t\t\t\treturn 'success';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 'failed';\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "71f8933aabf1b004198afc08f2120989", "score": "0.65763825", "text": "function checkwithdatabase($admin_user_name,$admin_password){\n\t\t$sql = \"SELECT `admin_email`, `admin_password` FROM `admin` WHERE admin_user_name = '$admin_user_name'\";\n\t\t$result = $GLOBALS['connection']->query($sql);\n\t\tif ($result->num_rows==1) {\n\t\t\t//data found\n\t\t\t//check with session\n\t\t\t$row = $result->fetch_assoc();//convert to array\n\t\t\tif($admin_password==$row['admin_password']){\n\t\t\t\t//jump to admin panel\n\t\t\t\t//save session\n\t\t\t\t$_SESSION[\"admin_user_name\"] = $admin_user_name;\n\t\t\t\t$_SESSION[\"admin_password\"] = $admin_password;\n\t\t\t\tjumpto(\"admin.php\");\n\t\t\t}else{\n\t\t\t\t//data found but password not match\n\t\t\t\t//todo\n\t\t\t}\n\t\t}else{\n\t\t\t//data not found \n\t\t\t//user name not match\n\t\t\t//todo\n\t\t\t//jumpto(\"admin.php\");\n\t\t}\n\t}", "title": "" }, { "docid": "b266bf9f616b22dba2835af105a2a746", "score": "0.6576102", "text": "function isLoginCorrect($username, $password) {\n $db = Database::instance()->db();\n \n $stmt = $db->prepare('SELECT * FROM user WHERE username = ?');\n $stmt->execute(array($username));\n\n $user = $stmt->fetch();\n return $user !== false && password_verify($password, $user['password']);\n}", "title": "" }, { "docid": "9f4b45dc5321adefe22cc461f284b2c1", "score": "0.65711915", "text": "public function login($data){\n $this->db->query('SELECT * FROM users WHERE user_email = :email');\n $this->db->bind(':email', $data['email']);\n\n $row = $this->db->single();\n $password = crypt($data['password'], $row->user_password);\n if($password === $row->user_password){\n return $row;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "82fe85b91b3f66f7f6c8bb93ab911eb6", "score": "0.6569791", "text": "function login_check($mysqli) {\n if(isset($_SESSION['user_id'], $_SESSION['username'], $_SESSION['login_string'], $_SESSION['type'])) {\n $user_id = $_SESSION['user_id'];\n $login_string = $_SESSION['login_string'];\n $username = $_SESSION['username']; \n $type = $_SESSION['type'];\n $user_browser = $_SERVER['HTTP_USER_AGENT']; // reperisce la stringa 'user-agent' dell'utente.\n\n if($type == 0 || $type == 1) {\n $sql = \"SELECT password FROM Admin WHERE id = ? LIMIT 1\";\n }else{\n echo \"Invalid type\";\n return false;\n }\n\n if ($stmt = $mysqli->prepare($sql)) { \n $stmt->bind_param('i', $user_id); // esegue il bind del parametro '$user_id'.\n $stmt->execute(); // Esegue la query creata.\n $stmt->store_result();\n \n if($stmt->num_rows == 1) { // se l'utente esiste\n $stmt->bind_result($password); // recupera le variabili dal risultato ottenuto.\n $stmt->fetch();\n $login_check = hash('sha512', $password.$user_browser);\n if($login_check == $login_string) {\n // Login eseguito!!!!\n return true;\n } else {\n // Login non eseguito\n return false;\n }\n } else {\n // Login non eseguito\n return false;\n }\n } else {\n // Login non eseguito\n return false;\n }\n } else {\n // Login non eseguito\n return false;\n }\n }", "title": "" }, { "docid": "6d9678aaa0ff291ec2c3c1529c7e1ed7", "score": "0.65591866", "text": "function checkUserCredentals($inputUsername, $inputPassword)\n {\n\t \n// create connection\n$mysqli = new mysqli(\"localhost\", \"VEDB01\", \"04051991\", \"VEDB01mysql1\");\nif ($mysqli->connect_errno) {\n echo \"Failed to connect to MySQL: (\" . $mysqli->connect_errno . \") \" . $mysqli->connect_error;\n}\n\t\t\n\t // query the users table for name and surname \n\t $sql = \"SELECT UserName, Password, Status FROM Users Where UserName ='\".$inputUsername.\"' AND Password ='\".$inputPassword.\"' AND Status='Available'\";\n\t \n\t // perform the query\n\t \n\t $rs = $mysqli->query($sql);\n\t // execute SQL statement and get results \nif (!$rs) {\n echo \"SQL operation failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n} \n//else{\n\t//echo \"Login is Successful !\";\n//}\n\t \n\t \n\t //Count the record number\n\t $counter = 0;\n\t while ($row = $rs->fetch_assoc())\n\t {\n\t\t $counter++;\n\t }\n \n\t if ($counter>0)\n\t {\n\t\t //authentication succeeded\n\t\t return (true);\n\t\t \n\t }\n\t else\n\t {\n\t\t //authentication failed\n\t\t return (false);\t\n\t }\n }", "title": "" }, { "docid": "28515b9cdc49c517f98c5bdada583c20", "score": "0.65547657", "text": "function login_by_password($params) {\n// return header(\"Status: 404 Not Found\");\n// if (!empty($this->validation_text($user_name, \"\", 2, 15, 'userName')))\n// return header(\"Status: 404 Not Found\");\n return $this->user_service->login_by_password($params);\n }", "title": "" }, { "docid": "c41adc8e418f6f4560908f688f27171d", "score": "0.6554088", "text": "function canLogin($email, $password){\n $conn = new mysqli(\"localhost\", \"root\", \"root\", \"phpProject\");\n $email = $conn->real_escape_string($email);\n $query = \"SELECT `user_id`,`email`, `password` FROM `user` WHERE email = '$email'\";\n $result = $conn->query($query);\n $user = $result->fetch_assoc();\n if(password_verify($password, $user['password'])){\n return true;\n }else{\n return false;\n }\n return $user;\n}", "title": "" }, { "docid": "8cf7da6901be882e447098efd9f2d353", "score": "0.65507984", "text": "function admin_validate($uname,$pass){\r\n\r\n $sql = \"SELECT * FROM admins WHERE name = ? AND password = ? AND privilege = 3\";\r\n $query=$this->db->query($sql, array($uname, make_hash($pass)));\r\n\r\n if( $query->num_rows()>0){\r\n\r\n $this->session->set_userdata('is_login',1);\r\n return true;\r\n }\r\n return false;\r\n\r\n }", "title": "" }, { "docid": "6dcc06d89ffba3b6e815f7183bef848c", "score": "0.6548386", "text": "function login_admin($user,$pass)\n {\n\t $md5 = $user.$pass;\n $pass1 = md5($md5); \n $cek=$this->CI->db->where('username',$user)\n ->where('password',$pass1)\n ->get('tm_user')\n ->row();\n $row=$this->CI->db->where('username',$user)\n ->where('password',$pass1)\n ->get('tm_user')\n ->num_rows();\n if ($row==1) {\n return $cek;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d6198a37ae215d6896db8aacb283771f", "score": "0.654475", "text": "function check_old_password($link,$user,$password)\n{\n\t$sql='select * from user where id=\\''.$user.'\\' ';\n\t//echo $sql;\n\tif(!$result=mysqli_query($link,$sql))\n\t{\n\t\t//echo mysql_error();\n\t\treturn FALSE;\n\t}\n\tif(mysqli_num_rows($result)<=0)\n\t{\n\t\t//echo 'No such user';\n\t\techo '<h3>wrong username/password</h3>';\n\t\treturn false;\n\t}\n\t$array=mysqli_fetch_assoc($result);\n\t\n\tif(password_verify($password,$array['epassword']))\n // if(MD5($password)==$array['password'])\n\t{\n\t \t//echo 'You have supplied correct username and password';\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\t//echo 'You have suppled wrong password for correct user';\n echo '<h3>wrong username/password</h3>';\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "a88fe7817d788b40e0fbf838fc23cbf2", "score": "0.65447384", "text": "function password_check($password, $pwHash)\n\t{\n\t\tglobal $db;\n\t\t\t$hashCheck = password_verify($password, $pwHash);\n\n\t\tif( $hashCheck === true)\n\t\t{\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$_SESSION['error_message']='You entered an invalid Trail Name or Password.';\n $action = 'login';\n include('views/login.php');\n\t\t}\n\n\t}", "title": "" }, { "docid": "52462c821e1a623b8cc2183e849816cd", "score": "0.65423346", "text": "function isValidLogin($username, $password){\n// return true;\n return ($username == 'Greg' && $password == 'letMeIn');\n}", "title": "" }, { "docid": "d88ac6c9752c2797dbcc1339ad0842dd", "score": "0.6541881", "text": "function isLoginCorrect($userEmailAddress, $userPsw){\n $result = false;\n\n $strSeparator = '\\'';\n $loginQuery = 'SELECT userHashPsw FROM users WHERE userEmailAddress = '. $strSeparator . $userEmailAddress . $strSeparator;\n\n require_once 'model/dbConnector.php';\n $queryResult = executeQuerySelect($loginQuery);\n\n if (count($queryResult) == 1)\n {\n $userHashPsw = $queryResult[0]['userHashPsw'];\n $result = password_verify($userPsw, $userHashPsw);\n }\n return $result;\n}", "title": "" }, { "docid": "3ab51f99eabbe0ad29e80468485187be", "score": "0.6539496", "text": "public function checkLogin() {\n\t\t$this->db = new DatabaseAlt();\n\t\t$this->db->setQuery(\"Select * from login Where user_name='\".$this->userName.\"'\");\n\t\t$resultArray = $this->db->executeQuery();\n\t\t\n\t\tif (sizeof ( $resultArray ) == 0) {\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\tif ($resultArray [0] ['password'] != $this->password) {\n\t\t\t\treturn FALSE;\n\t\t\t} else {\n\t\t\t\techo $resultArray [0] ['id'];\n\t\t\t\t$this->userId = $resultArray [0] ['id'];\n\t\t\t\treturn $this->db;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fe218907054934b22f72420dcc351a43", "score": "0.6537211", "text": "function wc_db_check_login($user_name, $password) {\n\n global $WCDB, $WC;\n\n $user_name = $WCDB->escape($user_name);\n $password = md5($password).sha1($password);\n\n $sql = \"select user_id from {$WC['users_table']} where user_name='$user_name' and password='$password'\";\n\n return (int)$WCDB->query_fetch($sql, WC_DB_FETCH_VALUE, \"user_id\");\n\n}", "title": "" }, { "docid": "f7500af0ea8d0631539536555ab8fa84", "score": "0.6530115", "text": "function authenticate($login, $password){\r\n // update >> encodePassword will encode a previous encoded one !\r\n // mysql_real_escape_string and htmlentities\r\n $password = mysql_real_escape_string(htmlentities($password));\r\n $res = mysql_query(\"SELECT count(*) as res FROM users WHERE login='\".$login.\"' AND password='\".$password.\"'\");\r\n $fetch = mysql_fetch_array($res);\r\n $resultat = intval($fetch[\"res\"]);\r\n return $resultat == 1;\r\n}", "title": "" }, { "docid": "d9be02b7650108398561c8acc66295d4", "score": "0.6529356", "text": "function userLogin($email, $password){\n\n $stmt = $this->con->prepare(\"SELECT email FROM users WHERE email = ? \");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n // echo $email;\n // echo $password;\n //return $stmt->num_rows > 0;\n \n # code...\n //$hashed_pass=password_hash($password, PASSWORD_DEFAULT)\n $hashed_password=$this->getUsersPasswordByEmail($email);\n // echo $hashed_password;\n\n if (password_verify($password, $hashed_password)) {\n # code...\n return USER_AUTHENTICATED;\n }\n else\n {\n return USER_PASSWORD_DONOT_MATCH;\n }\n\n }", "title": "" }, { "docid": "42bab3f14bdc418493df298caaf9676f", "score": "0.6525785", "text": "public function login($database){\n $find_password=$database->query(\"SELECT password FROM users WHERE username='$this->username'\");\n if($find_password->num_rows==0){\n return 0;\n }\n else{\n if(password_verify($this->password,$find_password->fetch_assoc()[\"password\"])){\n return 1;\n }\n else{\n return 0;\n }\n }\n }", "title": "" }, { "docid": "89920ab509da5a5a20c2852bc22189a7", "score": "0.6522014", "text": "function checkPasswordMatch() {\n $login = $this->Login_model->get($this->session->userdata('logged_in')['Username']);\n\n if ($this->bcrypt->check_password($this->input->post('current_password'), $login->Password)) {\n return true;\n } else {\n $this->form_validation->set_message('checkPasswordMatch', $this->lang->line(\"current_password_doesnt_match\"));\n return false;\n }\n }", "title": "" }, { "docid": "b6ad38409115f119f1fab29c86332767", "score": "0.65175754", "text": "public static function check_login(&$db) {\n assert('is_object($db)');\n $passwd_hash = \"aicml\";\n $access_level = 0;\n\n if (!isset($_SESSION['user'])) return $access_level;\n\n // remember, $_SESSION['password'] will be encrypted.\n if(!get_magic_quotes_gpc()) {\n $_SESSION['user']->login = addslashes($_SESSION['user']->login);\n }\n\n // addslashes to session login before using in a query.\n $q = $db->selectRow('user', 'password',\n array('login' => $_SESSION['user']->login));\n\n // make sure user exists\n if ($q === false) return $access_level;\n\n // now we have encrypted pass from DB in $q->password,\n // stripslashes() just incase:\n\n $q->password = stripslashes($q->password);\n\n //compare:\n if ($q->password == $_SESSION['user']->password) {\n // valid password for login\n // they have correct info in session variables.\n\n if ($_SESSION['user']->verified == 1) {\n // user is valid\n $access_level = $_SESSION['user']->access_level;\n }\n }\n else {\n unset($_SESSION['user']); // kill incorrect session variables.\n }\n \n return $access_level;\n }", "title": "" }, { "docid": "0d2cb3490116d0248e97120c61b2faa7", "score": "0.65137064", "text": "function login() {\n if($this->loglevel<=LEVEL_TRACE) {\n $this->trace(LEVEL_TRACE, \"Entering login\");\n }\n if( isset($this->comm['username']) && isset($this->comm['passwd']) ) {\n $username = $this->comm['username'];\n $passwd = $this->comm['passwd'];\n\n $sql = $this->mysql->query(\"SELECT password FROM user WHERE name='$username'\");\n if (!$sql) {\n $this->trace(LEVEL_ERROR,\"Could not successfully run query ($sql) from DB: \" . $this->mysql->error);\n return false;\n }\n\n $nbrows = $sql->num_rows;\n $valid = false;\n if($nbrows==1){\n $rec = $sql->fetch_assoc();\n if($rec['password']==$passwd) {\n $valid = true;\n } else {\n if($this->loglevel<=LEVEL_INFO) $this->trace(LEVEL_INFO, \"Invalid login with username $username\");\n }\n }\n\n if($sql) $sql->free();\n\n if($this->loglevel<=LEVEL_TRACE) {\n if($valid)\n $this->trace(LEVEL_TRACE, \" -- success\");\n else\n $this->trace(LEVEL_TRACE, \" -- FAILED\");\n }\n\n return $valid;\n } else {\n $this->trace(LEVEL_ERROR, \"no username and/or password supplied\");\n return false;\n }\n }", "title": "" }, { "docid": "529bc4cca86b52e2d06f8f25b1d3a39d", "score": "0.65090066", "text": "function adminLogin()\n{\n\tif(checkAuthorisation() == true)\n\t{\n\t\techo \"success\";\n\t}\n\telseif(isset($_GET['username']) && isset($_GET['password']))\n\t{\n\t\t$username = $_GET['username'];\n\t\t$password = $_GET['password'];\n\t\t\n\t\t$query = \"SELECT * FROM user WHERE username = '$username' AND password = SHA('$password');\";\n\t\t$result = @mysql_query($query); // Run the query.\n\t\tif($result)\n\t\t{\n\t\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\n\t\t\tif($row)\n\t\t\t{\n\t\t\t\t$_SESSION['authorisation'] = true;\n\t\t\t\t$_SESSION['username'] = $row['username'];\n\t\t\t\t$_SESSION['forename'] = $row['forename'];\n\t\t\t\t$_SESSION['surname'] = $row['surname'];\n\t\t\t\t$_SESSION['user_level'] = $row['user_level'];\n\t\t\t\t\n\t\t\t\techo \"success\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"fail\";\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\techo \"fail\";\n\t}\n}", "title": "" }, { "docid": "bf87ac9d16d73e41265835b83365ebe1", "score": "0.6505455", "text": "function verify_user($username, $password)\n{\n $conn = get_db_connection();\n $userEmail = mysqli_real_escape_string($conn, $username); // These will prevent users from using or inserting queries\n $userPass = mysqli_real_escape_string($conn, $password); // to our db through he fields\n //var_dump($userEmail.$userPass);\n $sqlUser = \"SELECT * FROM Users WHERE Email='$userEmail'; \"; //Query\n $resultUser = $conn->query($sqlUser); //This will extract the user info\n $passwordEn = $resultUser->fetch_assoc(); //Conver it to a readable array\n if (password_verify($password, $passwordEn[\"Password\"]) or $userPass == $passwordEn[\"Password\"]) { //veryfies password both encrypted or plain text\n //var_dump($passwordEn);\n return true; //return true if the user with the specified email has a matching password\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "b34b7167f8737c1e72917481605c6ff6", "score": "0.64940846", "text": "public function doLogin(){\n $username = Post::get('username');\n $password = Post::get('password');\n\n $login = User::find_by_username_and_password($username, $password);\n //Debug::barDump($login);\n\n if(!is_null($login)){\n $authmgr = new AuthManager();\n $authmgr->setLogin($login);\n\n $role = AuthManager::getRole();\n\n switch ($role){\n case 'admin':\n Redirect::toRoute('user/index');\n break;\n\n case 'passageiro':\n Redirect::toRoute('passageiro/voos');\n break;\n\n case 'opcheckin':\n Redirect::toRoute('opcheckin/index');\n break;\n\n case 'gestorvoo':\n Redirect::toRoute('flights/index');\n break;\n\n default:\n Redirect::toRoute('login.loginForm');\n break;\n }\n }\n else{\n Redirect::toRoute('login/loginForm');\n }\n }", "title": "" }, { "docid": "cae82e3310e9220fb06fa0d96c7f60b4", "score": "0.64937186", "text": "function login_check($conn) {\n //echo \"YYYY\";\n if (isset($_SESSION['user_id'],$_SESSION['login_string'])) {\n //echo \"*********************************************************************\";\n $email = $_SESSION['user_id'];\n //echo $email;\n $login_string = $_SESSION['login_string'];\n //$username = $_SESSION['username'];\n\n // Get the user-agent string of the user.\n $user_browser = $_SERVER['HTTP_USER_AGENT'];\n //echo $user_browser;\n $stmt = mysqli_prepare($conn, \"SELECT password FROM administrators WHERE email = ? LIMIT 1\");\n\n // Bind \"$user_id\" to parameter. \n mysqli_stmt_bind_param($stmt,'s', $email);\n mysqli_stmt_execute($stmt);\n\n //$stmt->store_result();\n mysqli_stmt_store_result($stmt);\n mysqli_stmt_bind_result($stmt, $password);\n mysqli_stmt_fetch($stmt);\n\n if (mysqli_stmt_num_rows($stmt) == 1) {\n // If the user exists get variables from result.\n \n //echo $password;\n $login_check = hash('sha512', $password . $user_browser);\n //echo $login_check;\n //echo $login_string;\n if ($login_check == $login_string) {\n // Logged In!!!!\n //echo \"YOOOOHOOO\"; \n return true;\n } else {\n // Not logged in \n return false;\n }\n } else {\n // Not logged in \n return false;\n }\n } else {\n // Not logged in \n return false;\n }\n}", "title": "" }, { "docid": "7afeadf1986a6898ae57faf4ba4f499a", "score": "0.6492622", "text": "function login($bdd,$username,$password)\n{\n $query = $bdd->prepare(\"SELECT UserID,UserName,Password,Salt,userLvl FROM user WHERE UserName=:user\"); // select salt and pass from db. :user is a placeholder to input variable. This way of querying checks for SQL injections\n $query->execute(array('user' => $username )); //variable with username\n \n if($query->rowCount() == 0) // if no rows are returned, user doesn't exist.\n return false;\n \n $userData = $query->fetch(PDO::FETCH_ASSOC); // creates associative array from row\n \n $hash = hash('sha256', $userData['Salt'] . hash('sha256', $password)); //hashing input pw to compare with hash in db\n \n if(strcmp($hash,$userData['Password']) != 0 || strcmp($username,$userData['UserName'])) // Incorrect password. Redirect to login form.\n\t return array(false);\n\telse\n\t return array(true,$userData['userLvl'],$userData['UserID']);\n \n}", "title": "" }, { "docid": "3c47f73560bcfe0833a3bb6664c0d679", "score": "0.64923173", "text": "public function test_login_userExistsButPasswordMatch_returnCorrectUserResult()\n {\n $this->configureUserQueryDAOStub();\n $result = $this->sut->login('username', 'password');\n $this->assertEquals(\"user:username,roles:PAGE_3,password:5f4dcc3b5aa765d61d8327deb882cf99\", $result->toString());\n }", "title": "" }, { "docid": "5d6dd0103adb68e80a7e3d0738694343", "score": "0.64870226", "text": "function login_check($conn) {\n if(isset($_SESSION['user_id'], $_SESSION['username'], $_SESSION['login_string'])) {\n $user_id = $_SESSION['user_id'];\n $login_string = $_SESSION['login_string'];\n $username = $_SESSION['username'];\n $user_browser = $_SERVER['HTTP_USER_AGENT']; // reperisce la stringa 'user-agent' dell'utente.\n if ($stmt = $conn->prepare(\"SELECT password FROM members WHERE id = ? LIMIT 1\")) {\n $stmt->bind_param('i', $user_id); // esegue il bind del parametro '$user_id'.\n $stmt->execute(); // Esegue la query creata.\n $stmt->store_result();\n\n if($stmt->num_rows == 1) { // se l'utente esiste\n $stmt->bind_result($password); // recupera le variabili dal risultato ottenuto.\n $stmt->fetch();\n $login_check = hash('sha512', $password.$user_browser);\n if($login_check == $login_string) {\n //echo \"Login eseguito!\";\n // Login eseguito!!!!\n return true;\n } else {\n // echo \"Login non eseguito\";\n // Login non eseguito\n return false;\n }\n } else {\n // echo \"Login non eseguito\";\n // Login non eseguito\n return false;\n }\n } else {\n // echo \"Login non eseguito\";\n // Login non eseguito\n return false;\n }\n } else {\n // echo \"Login non eseguito\";\n // Login non eseguito\n return false;\n }\n }", "title": "" }, { "docid": "53a782c9aa528e77bee3ff83f9bd1de6", "score": "0.64806443", "text": "public function loginLand(){\n\n if(Auth::check()){\n //authenticated successfully, now cheeck for roles and activity\n //return redirect()->route('reg_home'); //route for dashboard\n if(Auth::user()->active == 0){// for deactivated user\n // return Auth::user();\n return redirect()->route('login')->with('error', 'Your account is not active, please contact the Admin');\n }\n if(Auth::user()->active == 2){// for deactivated user\n // return Auth::user();\n return redirect()->route('login')->with('error', 'Your account has been blacklisted, please contact the Admin');\n }\n if(Auth::user()->role == 1 && Auth::user()->active == 1){// for normal user\n // return Auth::user();\n return redirect()->route('showMemberDashboard');\n }\n if(Auth::user()->role == 2 && Auth::user()->active == 1){//for admin\n // return Auth::user();\n return redirect()->route('showAdminDashboard');\n }\n else{\n return redirect()->route('login')->with('error', 'Not a user.');\n }\n }\n\n return redirect()->route('login')->with('info', 'Please enter your username and password');\n }", "title": "" }, { "docid": "1a8189d9373e293c5f372107356d590f", "score": "0.6476172", "text": "public function checkPassword()\n {\n $password = $this->getPassword();\n $userId = 20; //test\n // $email = $_SESSION[\"user\"];\n\n $conn = Db::getInstance();\n $statement = $conn->prepare(\"select * from users where id = :id\");\n $statement->bindValue(\":id\", $userId);\n $statement->execute();\n $user = $statement->fetch();\n $hash = $user[\"password\"];\n\n if (password_verify($password, $hash)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "6232757e917064e4d0e21f57bef02b84", "score": "0.6474539", "text": "function check_password($password){\n\t\t$db_user = new db_query(\"SELECT use_password,use_security\n\t\t\t\t\t\t\t\t\t\t FROM users, user_group\n\t\t\t\t\t\t\t\t\t\t WHERE use_active=1 AND use_email = '\" . $this->removequote($this->login_name) . \"'\");\n\t\tif ($row=mysqli_fetch_array($db_user->result)){\n\t\t\t$password=md5($password . $row[\"use_security\"]);\n\t\t\tif($password==$row[\"use_password\"]) return 1;\n\t\t}\n\t\tunset($db_user);\n\t}", "title": "" }, { "docid": "85af04c7e936f0953652d988f95cfe0f", "score": "0.6472857", "text": "function loginme($username, $password)\n {\n $converter = new Encryption;\n $pwd = $converter->encode($password);\n\t\t//$abc = $converter->decode($pwd);\n $sql =\"SELECT user_id, user_name, full_name, pwd, sys_users.roles_id, sys_roles.roles_name, id_kecamatan, id_kelurahan FROM sys_users \n INNER JOIN sys_roles ON sys_roles.roles_id = sys_users.roles_id WHERE (user_name ='$username' or email ='$username') AND pwd = '$pwd' \";\n $query = $this->db->query($sql);\n $user = $query->result();\n if(!empty($user)){\n return $user;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "76c2feb22c2edb19c4296a744bd8672b", "score": "0.6472511", "text": "function login_check($mysqli) {\n \n if(isset($_SESSION['employeeusername'], $_SESSION['username'], $_SESSION['login_string'])) {\n\t \n $empcode = $_SESSION['employeeusername'];\n $login_string = $_SESSION['login_string'];\n $userid = $_SESSION['username'];\n $ip_address = $_SERVER['REMOTE_ADDR']; // Get the IP address of the user. \n $user_browser = $_SERVER['HTTP_USER_AGENT']; // Get the user-agent string of the user.\n \n if ($stmt = $mysqli->prepare(\"SELECT password FROM usercreation WHERE userid = ? LIMIT 1\")) { \n $stmt->bind_param('i', $userid); // Bind \"$user_id\" to parameter.\n $stmt->execute(); // Execute the prepared query.\n $stmt->store_result();\n \n if($stmt->num_rows == 1) { // If the user exists\n $stmt->bind_result($password); // get variables from result.\n $stmt->fetch();\n return true;\n } else {\n // Not logged in\n return false;\n }\n } else {\n // Not logged in\n return false;\n }\n } else {\n // Not logged in\n return false;\n }\n}", "title": "" }, { "docid": "c89fd0df670dc5f0df59cfb257ccde1a", "score": "0.6472314", "text": "public function login($username, $password){\n $where = array(\n 'user_email' => $username,\n 'pwd' => SHA1($password),\n 'approved' => '1',\n 'deleted' => '0'\n \n );\n $res = parent::select_row('admin',$where);\n //print_r($res);\n\t\tif (!empty($res)) {return $res;}\n\t\telse{ return false;}\n\t}", "title": "" }, { "docid": "d7d35f30c9ca28b793274ad8be47bf24", "score": "0.64663166", "text": "function aclValidatePass($passwd){\n\t\t$user=$_SESSION['username'];\n\t\t$query=\"SELECT ACL_PASSWORD FROM ACL WHERE ACL_USERNAME='$user'\";\n\t\tif(!($recordSet=$this->db->doQuery($query))){\n\t\t\t$text=\"Error Num AVP01-01<br>\";\n\t\t\t$this->flashText($text);\n\t\t\texit;\n\t\t}\n\t\t$line=$recordSet->FetchRow();\n\t\t//echo $line['ACL_PASSWORD'].\" -$passwd- \".md5($passwd);\n\t\tif($line['ACL_PASSWORD']==md5($passwd))\treturn true;\n\t\telse return false;\n\t}", "title": "" }, { "docid": "401f7dd12ca918d6123057081e0a01fe", "score": "0.6464908", "text": "public function loginUser() {\n\t\t$statement = $this->db->prepare(\"SELECT rol_Naam, user_Id, user_Name FROM User, Rol WHERE user_Name = :username AND user_Pass = :password AND Rol.rol_Id = User.Rol_rol_Id AND actief <> 0 \");\n\t\t$statement->bindParam('username', $_POST['username']);\n\t\t$statement->bindParam('password', $_POST['password']);\n\t\t$statement->execute();\n\t\t$results = $statement->fetch(\\PDO::FETCH_ASSOC);\n\t\tif($results > 0) {\n\t\t\tswitch($results['rol_Naam']) {\n\t\t\t\tcase 'student':\n\t\t\t\tupdateUserOnlineTime($results['user_Id']);\n\t\t\t\t\n\t\t\t\t$this->slim->redirect(BASE . '/student/' . $results['user_Id']);\n\t\t\t\tbreak;\n\t\t\t\tcase 'docent':\n\t\t\t\tupdateUserOnlineTime($results['user_Id']);\n\t\t\t\t\n\t\t\t\t$this->slim->redirect(BASE . '/docent/' . $results['user_Id']);\n\t\t\t\tbreak;\n\t\t\t\tcase 'slc':\n\t\t\t\tupdateUserOnlineTime($results['user_Id']);\n\t\t\t\t\n\t\t\t\t$this->slim->redirect(BASE . '/slc/' . $results['user_Id']);\n\t\t\t}\n\t\t}else{\n\t\t\techo $this->twigRenderer->renderTemplate('noaccess.twig');\n\t\t}\n\t}", "title": "" }, { "docid": "6ebbab6ef78be62befb6b4dd90ddf428", "score": "0.64590496", "text": "public function authenticate()\n {\n $this -> validate(request(), User::$sessionrules);\n\n if(\\Auth::attempt(request(['email','password'])))\n {\n if(\\Auth::user()->role == \"salon\")\n {\n return redirect('/salon');\n }\n else if(\\Auth::User()->role == \"normal\")\n {\n return redirect()->home();\n }\n }\n else\n {\n return back()->withErrors([\n 'message'=>'login failed, check credentials and try again'\n ]);\n }\n }", "title": "" }, { "docid": "b7eae27ff5aa0785c9fd2689ca47b035", "score": "0.6457568", "text": "public function loginAction()\n {\n if ($this->isLogged() || $this->isRegistering()) {\n $role = $this->getRole();\n if (!$role) {\n //this most definitely should not happen\n $this->destroy('/');\n }\n $this->redirect('/'.Session::$roleNamespaces[$role]);\n }\n /** @var Session $session */\n $session = Module::getService('Session');\n\n //Verify if persistent token cookie exists\n if (isset($_COOKIE['token'])) {\n //Get the cookie\n $crypt = new Crypt();\n $token = $crypt->decrypt(base64_decode($_COOKIE['token']), $this->getConfig('token'));\n //attempt to login\n $roleType = $session->attemptLoginByPersistentToken($token);\n if ($roleType) {\n $this->redirect('/'.Session::$roleNamespaces[$roleType]);\n } else {\n //invalidate token\n setcookie('token', '', time() - 3600);\n $this->destroy('/');\n }\n }\n if ($this->request->isPost()) {\n if (!$this->security->checkToken()) {\n $this->destroy('/');\n }\n $post = $this->getPost();\n if (!isset($post['email'])) {\n $this->view->setVar('messages', ['Invalid email/password.']);\n\n return;\n }\n $validation = new Validation();\n $validation->add(\n 'email',\n new EmailValidator(\n [\n 'message' => 'The email is not valid'\n ]\n )\n );\n $validationMessages = $validation->validate($post);\n if ($validationMessages->count()) {\n $this->view->setVar('messages', $validationMessages);\n\n return;\n }\n if (!isset($post['password']) || !strlen($post['password'])) {\n $this->error(Translate::_('The password is not valid'));\n\n return;\n }\n //now actually check that the password is real\n $authenticate\n = \"SELECT f.id, fa.passhash, fa.confirmed_at, r.name role FROM Entities\\Factor f\n JOIN Entities\\FactorAuth fa ON f.id = fa.id_factor\n JOIN Entities\\Role r ON r.id = fa.id_role\n WHERE f.email = '{$post['email']}' LIMIT 1\";\n /** @var \\Phalcon\\Mvc\\Model\\Resultset\\Simple $result */\n $factor = $this->getManager()->executeQuery($authenticate)->getFirst();\n if (!$factor) {\n $this->error(Translate::_('Invalid email/password'));\n\n return;\n }\n /**\n * There are 3 ways to authenticate by a password:\n * 1. check to see if password hash is valid and if so log straight in\n * 2. check to see if password is a valid legacy hash and if so update to more secure format, then login\n * 3. check to see if password is an admin generated single-sign-on hash generated\n */\n\n //1.\n if (!$this->security->checkHash($post['password'], $factor->passhash)) {\n //2.\n $sha256Hash = hash('sha256', $this->getConfig('security')->legacy_hash.$post['password']);\n if ($sha256Hash == $factor->passhash) {\n //We have verified that the password is an older format, so now we need to update it\n /** @var FactorAuth $factorAuth */\n $factorAuth = FactorAuth::findFirst('id = '.$factor->id);\n $factorAuth\n ->setLastPasshash($factor->passhash)\n ->setPasshash(\n $this->security->hash($post['password'])\n )->update();\n } else {\n //3.\n $adminAuths = FactorAdminAuth::find(\n 'is_usable = 1 AND created_at > \"'.date('Y-m-d H:i:s', strtotime('-2 MINUTE')).'\" AND id_factor_accessed IS NULL'\n );\n $adminAuthFound = false;\n /** @var FactorAdminAuth $adminAuth */\n foreach ($adminAuths as $adminAuth) {\n if ($this->security->checkHash($post['password'], $adminAuth->getPasshash())) {\n //We found a matching and valid single sign on passhash, now invalidate to prevent future use\n $adminAuth\n ->setIsUsable(0)\n ->setIdFactorAccessed($factor['id'])\n ->setUpdatedAt(date('Y-m-d H:i:s'))\n ->update();\n $adminAuthFound = true;\n break;\n }\n }\n if (!$adminAuthFound) {\n $this->warning(Translate::_('Forgot your password?'));\n\n return;\n }\n }\n }\n //force user to confirm account\n if (is_null($factor['confirmed_at'])) {\n $this->view->setVars(\n [\n 'messages' => [\"You need to confirm your account first\"],\n 'confirm_account' => true\n ]\n );\n\n return;\n }\n $session->login($factor->id);\n $this->session->remove('registration'); //just in case user had began registration and then decided to login\n if (isset($post['remember'])) { //If user has checked remember me create cookie\n //$this->cookies->set('token', $session->createNewPersistentToken($factor->id), time() + $this->getConfig('persistent_cookie_life'));\n\n $crypt = new Crypt(); //Take note that we also encrypt the token as an extra precaution in the actual cookie\n $encrypted = $crypt->encrypt($session->createNewPersistentToken($factor->id), $this->getConfig()->token);\n setcookie('token', base64_encode($encrypted), time() + $this->getConfig('persistent_cookie_life'));\n } else {\n $session->destroyPersistentToken($factor->id);\n }\n $this->redirect('/'.Session::$roleNamespaces[$factor->role]);\n }\n }", "title": "" }, { "docid": "4a0fe41050562119514bdf9b07c1cbf9", "score": "0.6454167", "text": "public function checklogin($login = \"\", $password = \"\"){\n\n\t\t// select db_password from the email\n\t\t// return db_password | false\n\t\t$user = current($this->select([\n\t\t\t'table' \t=> 'user',\n\t\t\t'where'\t\t=> array('login' => $login),\n\t\t\t'fetchMode' => PDO::FETCH_ASSOC\n\t\t]));\n\n\t\t//check email and password pair \n\t\tif (!empty($user)) {\n\t\t\tif (crypt($password, $user['password']) == $user['password']){\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "de5a097a86c8d380513b598f70f0a321", "score": "0.6451303", "text": "public function authenticate_user($username, $password){ $cols = array(\n \"username\" =>$username,\n \"password\" =>$password,\n );\n // $admins = $this->where($cols);\n $oneAdmin = $this->rawQuery('SELECT * from admin where username = ? and password= ?', $cols);\n if(count($oneAdmin) > 0){\n //Admin record found!\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "e01a5e6d6765d0e6db7801486b4314b7", "score": "0.64436984", "text": "public function checkLogin() {\n\t\t//$resultArray = array();\n\t\t$connect = $this->db->connect();\n\t\tif($connect) {\n\t\t\t$resultArray = $this->db->select($this->tableName,$this->columnArray,$this->whereColumn,null,$this->userId);\n\t\t\t}\n\t\tif(sizeof($resultArray)==0) {\n\t\t\treturn FALSE;\n\t\t}\n\t\telse {\n\t\t\tif ($resultArray[0]['password'] != $this->password){\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn TRUE;\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b1456e786c35793f04f5dae51d54251a", "score": "0.64356035", "text": "public function check_passW(){\n\t\t\tglobal $db;\n\t\t\t$sQl = \"SELECT password FROM cms_admin WHERE id = '\".$_SESSION['adminId'].\"'\";\n\t\t\t$result = $db->get_row($sQl);\n\t\t\tif($result){\n\t\t\t\treturn $result;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ef594f83b9f0aaf87577c8849fe19035", "score": "0.6433879", "text": "function isLogin() {\n if (isset($_SESSION['sid'])) {\n switch ($_SESSION['user_role']) {\n case 'admin':\n $str = './admin';\n redirect($str);\n break;\n\n case 'user':\n $str = './user';\n redirect($str);\n break;\n }\n }\n}", "title": "" }, { "docid": "0c30566f7c75847018a183036602048b", "score": "0.64244163", "text": "function check_user_login($p)\n\t{\n\t\t$login = $p['login'];\n\t\t$login = strtolower($login);\n\t\t$password_dig = $p['password'];\n\n\t\t$alg = PW_ALGORITHM;\n\t\t$password = hash($alg, $password_dig);\n\n\t\t$this->load->database();\n\n\t\t$q1 = \"SELECT * FROM users WHERE login='\" . $login . \"'\";\n\t\t$query = $this->db->query($q1);\n\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t $lg = $row->login;\n\t\t $pw = $row->password;\n\t\t $uid = $row->id;\n\t\t}\n\n\t\tif (isset($pw))\n\t\t{\n\t\t\tif ($password == $pw)\n\t\t\t{\n\t\t\t\t// $q0 = \"SELECT * FROM users_levels WHERE users_id='\" . $uid . \"'\";\n\t\t\t\t// $query0 = $this->db->query($q0);\n\n\t\t\t\t$q0 = \"SELECT * FROM users_levels WHERE users_id = ?\";\n\t\t\t\t$query0 = $this->db->query($q0, array($uid));\n\n\t\t\t\t$the_l_row = $query0->row_array();\n\n\t\t\t\tif ($the_l_row['level'] >= 1) \n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\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": "6b11753c819f98f305fdd8a00b1f7179", "score": "0.6423435", "text": "function pass_check($data) {\r\n \t$retval = TRUE;\r\n \t$user = $data['user'];\r\n \t$pass = $data['pass'];\r\n \t$this->db->where('username', $user);\r\n \t$query = $this->db->get('login');\r\n \tif($query->num_rows() > 0) {\r\n \t\t$row = $query->row();\r\n \t\t//echo \"hashed pass: \" . $row->password;\r\n \t\treturn password_verify($pass, $row->pwd);\r\n \t}\r\n \telse {\r\n \t\t$retval = FALSE;\r\n \t} \t\r\n \t\r\n \treturn $retval;\r\n }", "title": "" }, { "docid": "06c0f4ddcd726764a0c09640b7bad44c", "score": "0.6422318", "text": "function validatePassword_Hashed_s($user_id,$pwd){\n$pwd_hashed_DB_Returned = hash_pwd(\"Cat\"); // To get this value from Database\n//$pwd_hashed_DB_Returned = '$2y$10$qGuutjmJVJesFwycHhru1.6BexWR5FPUcycV/EURI.2Z8hvPiiRc2';\n\n\t\tif (password_verify($pwd, $pwd_hashed_DB_Returned)) {\n\t\t \n\t\t $return_str = \"Password is valid!\";\n\n\t\t} else {\n\t\t \n\t\t $return_str = \"Invalid password.\";\n\n\t\t}\n\nreturn $return_str;\n\n}", "title": "" }, { "docid": "f9fb24d06252170b6f123b7751ed2497", "score": "0.6421341", "text": "private function checkPasswordCorrectnessAndLogin()\n {\n // remember: the user can log in with username or email address\n $sql = 'SELECT user_name, user_email, user_password_hash\n FROM users\n WHERE user_name = :user_name OR user_email = :user_name\n LIMIT 1';\n $query = $this->db_connection->prepare($sql);\n $query->bindValue(':user_name', $_POST['user_name']);\n $query->execute();\n\n // Btw that's the weird way to get num_rows in PDO with SQLite:\n // if (count($query->fetchAll(PDO::FETCH_NUM)) == 1) {\n // Holy! But that's how it is. $result->numRows() works with SQLite pure, but not with SQLite PDO.\n // This is so crappy, but that's how PDO works.\n // As there is no numRows() in SQLite/PDO (!!) we have to do it this way:\n // If you meet the inventor of PDO, punch him. Seriously.\n $result_row = $query->fetchObject();\n if ($result_row) {\n // using PHP 5.5's password_verify() function to check password\n if (password_verify($_POST['user_password'], $result_row->user_password_hash)) {\n // write user data into PHP SESSION [a file on your server]\n $_SESSION['user_name'] = $result_row->user_name;\n $_SESSION['user_email'] = $result_row->user_email;\n $_SESSION['user_is_logged_in'] = true;\n $this->user_is_logged_in = true;\n return true;\n } else {\n $this->feedback = \"Wrong password.\";\n }\n } else {\n $this->feedback = \"This user does not exist.\";\n }\n // default return\n return false;\n }", "title": "" }, { "docid": "975ab1a3acfa9184e6fef6c3abfdfaea", "score": "0.6421053", "text": "public function loginWithPostData($email, $app_password) {\n #$dbprefix = $this->db =PSM_DB_PREFIX;\n $dbprefix = PSM_DB_PREFIX;\n $users = 'users';\n $result = pg_query($this->db, \"SELECT * from $dbprefix$users WHERE email = '$email'\");\n if ($result = pg_fetch_array($result)) {\n $hash_password = $result['password'];\n if(password_verify($app_password, $hash_password)) {\n return $result;\n }else{\n return false;\n }\n } else {\n // user not Found\n return false;\n }\n}", "title": "" }, { "docid": "940fade45dc0202c882c79692dba3675", "score": "0.6420258", "text": "function login_user(){\n if(isset($_POST['login'])){\n $username = escape_string($_POST['username']);\n $user_password = escape_string($_POST['user_password']);\n\n $query = query(\"SELECT * FROM users WHERE username = '{$username}' AND user_password = '{$user_password}' \");\n confirm($query);\n\n if(mysqli_num_rows($query) == 0){\n set_message(\"Invalid Username/Password\");\n redirect(\"login.php\");\n }else{\n $_SESSION['username'] = $username;\n redirect(\"admin\");\n }\n }\n}", "title": "" }, { "docid": "13319eb17c390cdea1bb296e721bd3f1", "score": "0.64163136", "text": "function check_previous_password_correct($username, $password){\r\n\t\r\n\t\tglobal $connection;\r\n\t\t$cur_password = AppModel::grab_db_function_class()->return_single_result_from_mysql_resource(AppModel::grab_db_function_class()->execute_query(\"SELECT password FROM pahro__user WHERE username = '{$username}'\"), 0);\t\r\n\t\treturn ($cur_password == $password)\t? true : false;\r\n\t}", "title": "" }, { "docid": "22cf728f4ed01fd1acb5c9d27955a1fc", "score": "0.6416205", "text": "public function validateLogin(){\n\t\tif($this->validateFormsLogin(Input::all()) === true){\n\t\t\t$userdata = array(\n\t\t\t\t'username' =>Input::get('username'),\n\t\t\t\t'password' =>Input::get('password')\n\t\t\t\t);\n\n\t\t\tif(Auth::attempt($userdata)){\n\t\t\t\tif(Auth::user()->role_id == 1){\n\t\t\t\t\treturn Redirect::to('blog');\n\t\t\t\t}else{\n\t\t\t\t\treturn Redirect::to('administrador');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tSession::flash('message', 'Error al iniciar session');\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t}else{\n\t\t\treturn Redirect::to('login')->withErrors($this->validateFormsLogin(Input::all()))->withInput();\t\t\n\t\t}\t\t\t\t\n\t}", "title": "" }, { "docid": "30c8447a78ce5661e18dbb3206f295cc", "score": "0.64140695", "text": "function check_user_pass($connection, $user, $pass){\n\t$result = mysqli_query($connection, \"SELECT username, password from \".DBTABLE.\" WHERE username='$user'\");\n\t$row = mysqli_fetch_assoc($result);\n $chkPwd = $row['password'];\n\tdb_disconnect($connection, $result);\n\tif ($row && $pass == $chkPwd) {\n\t\treturn TRUE;\n\t}\n\treturn FALSE;\n}", "title": "" }, { "docid": "469b1253faa382a5c72d88fbd3161748", "score": "0.64138293", "text": "function getUserRole(): bool|string {\n if(verifyLogIn())\n return $_SESSION['role'];\n else\n return false;\n}", "title": "" }, { "docid": "7d12937c35fe781ab876c326605fb40c", "score": "0.6411888", "text": "private function isPasswordCorrect(){\n \n $request = $this->_connexion->prepare(\"SELECT user_password FROM Users WHERE user_email=?\");\n $request->execute( array($this->_login) );\n $result = $request->fetch();\n\n $password = $result['user_password'];\n\n if(password_verify($this->_password, $password))\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "94d8f1e69d230a4d8624eca5652a4f2e", "score": "0.63994426", "text": "function testUserPassword($login, $password) {\n $result = false;\n list($dbc,$error) = connect_to_database();\n $sql = 'CALL `stu_user_auth_s`(\"'.$login.'\",\"'.$password.'\", \"'.SALT.'\");';\n if ($dbc) {\n $queryResult = mysqli_query($dbc, $sql);\n while ($record = mysqli_fetch_array($queryResult,MYSQLI_ASSOC)):\n if (intval($record['AUTHENTICATED']) == 1) {\n $result = true;\n }\n endwhile;\n }\n return $result;\n}", "title": "" }, { "docid": "86277c6158a286986b91ff041f268272", "score": "0.63951904", "text": "public function admincheck($username,$password) {\n $this->where('username', $username);\n $query = $this->get();\n $row = $query->getRow();\n if($row) {\n if(password_verify($password,$row->password)) {\n return $row->username;\n }\n }\n return null;\n }", "title": "" }, { "docid": "91b7252d356f725ea55a05aea43e09e3", "score": "0.6393914", "text": "private function checkPasswordCorrectnessAndLogin()\n {\n $sql = 'SELECT user_name, user_email, user_password_hash\n FROM users\n WHERE user_name = :user_name OR user_email = :user_name\n LIMIT 1';\n $query = $this->db_connection->prepare($sql);\n $query->bindValue(':user_name', $_POST['user_name']);\n $query->execute();\n // Btw that's the weird way to get num_rows in PDO with SQLite:\n // if (count($query->fetchAll(PDO::FETCH_NUM)) == 1) {\n // Holy! But that's how it is. $result->numRows() works with SQLite pure, but not with SQLite PDO.\n // This is so crappy, but that's how PDO works.\n // As there is no numRows() in SQLite/PDO (!!) we have to do it this way:\n // If you meet the inventor of PDO, punch him. Seriously.\n $result_row = $query->fetchObject();\n if ($result_row) {\n // using PHP 5.5's password_verify() function to check password\n if (password_verify($_POST['user_password'], $result_row->user_password_hash)) {\n // write user data into PHP SESSION [a file on your server]\n $_SESSION['user_name'] = $result_row->user_name;\n $_SESSION['user_email'] = $result_row->user_email;\n $_SESSION['user_is_logged_in'] = true;\n $this->user_is_logged_in = true;\n return true;\n } else {\n $this->feedback = \"Wrong password.\";\n }\n } else {\n $this->feedback = \"This user does not exist.\";\n }\n // default return\n return false;\n\n }", "title": "" }, { "docid": "653da537c684cd538118b9be8b96204c", "score": "0.63870645", "text": "public function login_check($user_name,$password){\n\t\t$query = $this->db->prepare(\"SELECT id, user_name, password FROM admin_tbl WHERE user_name=?\");\n\t\t$query -> execute(array($user_name));\n\t\tif ($query->rowCount()==1){\n\t\t\twhile($row=$query->fetch(PDO::FETCH_ASSOC)){ \n\t\t\t $db_password = $row[\"password\"];\n\t\t\t $user_name = $row[\"user_name\"];\n\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t$verify = password_verify($password,$db_password);\n\t\t\tif ($verify){\n\t\t\t\t $_SESSION['user_name']=$user_name; // setting session\n \t\theader('location:index1.php');\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\techo '<div class=\"alert alert-danger alert-dismissible fade in\" role=\"alert\">\n\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n\t\t\t\t\t <span aria-hidden=\"true\">×</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<strong>Error!</strong> Incorrect user name/password combination.\n\t\t\t\t </div>';\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t\techo '<div class=\"alert alert-danger alert-dismissible fade in\" role=\"alert\">\n\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n\t\t\t\t\t <span aria-hidden=\"true\">×</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<strong>Error!</strong> Incorrect user name/password combination.\n\t\t\t\t </div>';\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "1b85e0ef60bf425d21987391f3ce4996", "score": "0.63854676", "text": "public function doAuth ($username, $password) {\n\n $db = new Database ('tgregone_atxcc', 'tgregone_atxcc', 'tgregone_atxcc$', 'localhost');\n\n $hashpwd = sha1 ($password . $this->salt);\n\n $query = \"SELECT acval FROM ac_data WHERE actype='user' AND ackey=?\";\n $row = $db->doQueryRow ($query, $username);\n\n $acval = $row ['acval'];\n $userData = json_decode ($acval, true);\n $hashpwdStored = $userData ['hpassword'];\n //$hashpwdStored = preg_replace ('/.*hpassword\":\"(\\w+).*/', '$1', $acval);\n\n $authenticate = ($hashpwd === $hashpwdStored);\n \n return $authenticate;\n\n}", "title": "" }, { "docid": "9dafec2d988c3b777fe0d96c20149035", "score": "0.637388", "text": "function check_credentials($uname, $pwd)\n {\n\n //echo session var\n //echo \"uname is \" . $_SESSION[\"uname\"] . \".<br>\";\n //echo \"pwd is \" . $_SESSION[\"pwd\"] . \".\";\n\n\n //$query=\"SELECT emp_id FROM receptionist WHERE (emp_id='$uname' OR email='$uname') AND password='$pwd'\";\n $result = $this->select('emp_id', 'receptionist', \"WHERE (emp_id='$uname' OR email='$uname') AND password='$pwd';\");\n\n //get a count of rows returning\n $count = mysqli_fetch_array($result);\n //print_r($count);\n\n //if array is not empty that means credentials are correct\n if ($count) {\n //echo(\"go to view\");\n return True;\n }\n }", "title": "" } ]
c3813a6a4fa13d8be9566734913bd010
/ fonctions raccourcies allinone pour query / prepare Execute and return all value of a query Use PDO::query for exectute the query and PDOStatement::fetchAll() to return and array with all result
[ { "docid": "043353be8d96c7ec0b6a2416f170a0a9", "score": "0.0", "text": "public function queryAll($query)\n {\n\treturn $this->query($query)->fetchAll();\n }", "title": "" } ]
[ { "docid": "198b6e1f109b179ff70642665fb4de05", "score": "0.8037993", "text": "public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}", "title": "" }, { "docid": "e3e5be9da0fd30a0ab21accd97ecebf6", "score": "0.76613027", "text": "public function consultarDatos($consultaSQL){\n $conexionBD=$this->conectarBD();\n\n //2.Preparar la consulta que se va a realizar\n $consultaBuscarDatos= $conexionBD->prepare($consultaSQL);\n\n //3. Definir la forma en la que vmos a traer los datos\n // setFetchMode\n $consultaBuscarDatos->setFetchMode(PDO::FETCH_ASSOC);\n\n //4.Ejecutar la consulta\n $consultaBuscarDatos->execute();\n\n //5. Retornar los datos consultados\n return($consultaBuscarDatos->fetchAll());\n\n\n\n}", "title": "" }, { "docid": "916f524fdb4fff852221641966ac4b4b", "score": "0.7632098", "text": "function query($consulta, $parametros){\n global $conn, $msgError;\n $resultado = array();\n $msgError = '';\n try\n {\n $sql = $conn->prepare($consulta, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n if (count($parametros)>0)\n {\n $sql->execute($parametros);\n $resultado = $sql->fetchAll();\n }else{\n $sql->execute();\n $resultado = $sql->fetchAll();\n }\n $sql->closeCursor();\n }\n catch(PDOException $PDOError)\n {\n $msgError = sprintf(error_consulta_no_realizada, $PDOError->getMessage(), $consulta, json_encode($parametros));\n }\n return $resultado;\n }", "title": "" }, { "docid": "4cc06807bd1cea82f572767ede645257", "score": "0.75129026", "text": "public function fetchAll(){\n try{\n $this->array = $this->resultado->fetchAll();\n } catch (PDOException $e){\n $this->errors[] = 'error: function fetchAll<br/>'.$e->getMessage();\n $this->array = NULL;\n }\n return $this->array;\n }", "title": "" }, { "docid": "90510ab0830cb12a953591204c38be15", "score": "0.75025475", "text": "public function resultAll()\n {\n if ($this->PDO == null) {\n return [];\n } // return null jika db belum siap\n $this->PDO->query($this->originQuery());\n\n // binding from filter\n foreach ($this->mergeFilters() as $filters) {\n foreach ($filters['filters'] as $key => $val) {\n if (isset($val['value']) && $val['value'] != '') {\n $param = $val['param'] ?? $key;\n $type = $val['type'] ?? null;\n $this->PDO->bind(':' . $param, $val['value'], $type);\n }\n }\n }\n\n // binding from costume where\n $bindWhere = array_values(array_column($this->_COSTUME_WHERE, 'bind'));\n foreach ($bindWhere as $binds) {\n foreach ($binds as $bind) {\n $this->PDO->bind($bind[0], $bind[1]);\n }\n }\n\n return $this->PDO->resultset();\n }", "title": "" }, { "docid": "31b229627762b8afd7da374ac9cba19a", "score": "0.74451005", "text": "private function getQueryResult()\n\t{\n\t\t$this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "c599b23c76249e3697f3dcc56e25bc8f", "score": "0.743696", "text": "function execute_fetch_all($stmt)\n{\n\t$stmt->execute();\n\treturn $stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "b57ebd567c0f28efe7c1ef048b26c803", "score": "0.7414431", "text": "public function fetchAll(){\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "8f05c00d61b3332ea4ff138039f888f8", "score": "0.7409115", "text": "public function getAll($query,$array){\n $statement = $this->conn->prepare($query);\n $statement->execute($array);\n return $statement->fetchAll();\n }", "title": "" }, { "docid": "78b18e167c803c49ca56bd93e5693d05", "score": "0.7319005", "text": "function fetchAll($pdo, $resultado)\n{\n try {\n $sql_query = 'SELECT * FROM names_app';\n $gsent = $pdo->prepare($sql_query);\n $gsent->execute();\n $resultado = $gsent->fetchAll();\n } catch (PDOException $e) {\n print \"¡Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n}", "title": "" }, { "docid": "7d4af165072e68a2f09d1faba6780f71", "score": "0.72614837", "text": "public function execute(): array\n {\n if (!$this->table) {\n return Array();\n }\n $where = $this->getWhere();\n\n $this->statement($where);\n $this->statement($this->order);\n $this->statement($this->limit);\n \n $query = $this->prepare();\n \n if ($query) {\n try {\n $query->execute();\n\n return $query->fetchAll();\n } catch (\\PDOException $e) {\n $this->mydatabase->handleError($e, \"SELECT-EXECUTE\", $this->statement);\n }\n }\n \n return Array();\n }", "title": "" }, { "docid": "4af70f53969f063c8379a5ffb786df1c", "score": "0.7247553", "text": "public function executeQuery($query) {\n\t\t$stmt = $this->PDO_Connection->prepare($query); \n\t\t$stmt->execute();\n\t\t\n\t\t$result = $stmt->fetchAll();\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6fca04959b115c2aafb332ffacca6edf", "score": "0.7224608", "text": "public function resultset(){\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "59dd4ffe21578603f977ae612c229071", "score": "0.72173005", "text": "public function findAll() {\r\n$sql = \"SELECT * FROM $this->tabela\";\r\n$stm = DB::prepare($sql);\r\n$stm->execute();\r\nreturn $stm->fetchAll();\r\n}", "title": "" }, { "docid": "4bbfea311dfaadd9f516e850bfd3dfb9", "score": "0.721614", "text": "function query( string $tableName, PDO $db ){\n try{\n // Consulta a realizar\n $query = \"SELECT * FROM \".$tableName; \n // Preparamos la consulta\n $stmt = $db->prepare($query);\n // Ejecutamos\n $stmt->execute();\n //return $stmt->fetchAll( PDO::FETCH_OBJ);\n return $stmt->fetchAll( PDO::FETCH_ASSOC);\n\n }\n catch( Exception $exception ){\n echo \"<br>\";\n echo \"Error inesperado al consultar: \". $exception->getMessage();\n }\n}", "title": "" }, { "docid": "7d6a6ee10a416528854fb500b8cdbb05", "score": "0.72124785", "text": "public function resultArraySet(){\r\n $this->execute();\r\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "664ad925b34b2cb86fe5fa23fccbb836", "score": "0.71996045", "text": "private function getData($query){\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n\n if(!$result){\n $this->result = [];\n }\n $this->result = $result;\n }", "title": "" }, { "docid": "078a107910fda42d2bf8f753aaa944f9", "score": "0.7189142", "text": "public static function queryAll($query,$params){\n $result = self::$connection->prepare($query);\n $result->execute($params);\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "1e2c9824e1f445b351e1f7a48a3220d9", "score": "0.7185907", "text": "public function all(){ \n $arraytoret = array();\n $query='select *\n from Titulacion';\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}", "title": "" }, { "docid": "aaf6ebe5164e4503078ac7e8f1e99364", "score": "0.7163604", "text": "function getProducts(){ \n //1.Abro la conexión.\n $db=connect();\n //2.Enviar la consulta (2 sub pasos: prepare and execute\n $query= $db->prepare('SELECT * FROM product');\n $query->execute();\n $products = $query->fetchAll(PDO::FETCH_OBJ); //arreglo de prductos.\n\n //3. Obtengo la respuesta con un fetchAll(porque son muchos).\n\n return $products;\n}", "title": "" }, { "docid": "d0804dbb8f059ce914b00e86e64a3f54", "score": "0.7139272", "text": "function selectAllProduct()\n{\n static $ps = null;\n $sql = \"SELECT idProduit,Nom, produit.Image, Marque, Prix, produit.Type FROM produit\";\n\n $answer = false;\n try {\n if ($ps == null) {\n $ps = dbData()->prepare($sql);\n }\n $ps->execute();\n\n $answer = $ps->fetchAll(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $answer = array();\n echo $e->getMessage();\n }\n return $answer;\n}", "title": "" }, { "docid": "442d7a5c7753a8de1c4fe5bccda406e1", "score": "0.7132703", "text": "function get_all(){\n\t\tglobal $conn;\n\t\t//$sql = 'SELECT * FROM user';\n\t\t//$r = $conn->prepare($sql);\n\t//\t\treturn $r;\n\t//\treturn $r;\n\n\t\t$stmt = $conn->prepare('SELECT *FROM user');\n\t// Ejecutamos el Statement.\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\n\t}", "title": "" }, { "docid": "23ccb5d62b3f9b6b3a36fd47316ce246", "score": "0.7115708", "text": "function getResult($select){\n // Connexion à la base de données\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n\n try {\n $conn = new PDO(\"mysql:host=$servername;dbname=base_etudiants\", $username, $password);\n // set the PDO error mode to exception\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n }\n catch (PDOException $e) {\n echo \"Connexion à la base impossible ! \" . $e->getMessage();\n }\n\n // Selection en base de données\n $sql = $conn->query($select);\n $reponse = $sql->fetchAll();\n\n return $reponse;\n}", "title": "" }, { "docid": "31808de18cefb274fa3aa53627d168ac", "score": "0.7104626", "text": "public function retrieveAll(){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // Add your codes here\r\n\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "5d09e6379ddf586e37d1a65e54e9c120", "score": "0.7100625", "text": "public function fetchAll()\n\t{\n\t\t$this->exec();\n\t\t$return = $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$this->cleanup();\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "251710885f90dab7f170c91eb45df5fc", "score": "0.7073532", "text": "public function getAll($sql, $params=[]){\n try \n {\n $stmt = $this->dbh->prepare($sql);\n $stmt->execute($params);\n return $stmt->fetchAll();\n \n } catch (PDOException $e) \n {\n throw new Exception($e->getMessage());\n }\n\n }", "title": "" }, { "docid": "71d66e8eec9b96f42fc901639fb7ccae", "score": "0.7063054", "text": "public function resultSet(){\r\n $this->execute();\r\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "9eb30c0e12bfcf323a2b1f9135bdd465", "score": "0.70163184", "text": "function Query($query)\n{\n global $Cn;\n try{\n $result =$Cn->query($query);\n $resultado = $result->fetchAll(PDO::FETCH_ASSOC);\n $result->closeCursor();\n return $resultado;\n }catch(Exception $e){\n die(\"Error en la LIN: \" . $e->getLine() . \", MSG: \" . $e->GetMessage());\n }\n}", "title": "" }, { "docid": "d47f48774165b5e67ccc80656c7d2295", "score": "0.7005801", "text": "function query($sql, $arr){\n\t\ttry {\n\t\t\tif($statement = $this->conexion->prepare($sql)){\n\t\t\t\tif(count($arr) > 0){\n\t\t\t\t\tif (!$statement->execute($arr)) { //si no se ejecuta la consulta...\n\t\t\t print_r($statement->errorInfo()); //imprimir errores\n\t\t\t }\t\n\t\t\t\t}else{\n\t\t\t\t\tif (!$statement->execute()) { //si no se ejecuta la consulta...\n\t\t print_r($statement->errorInfo()); //imprimir errores\n\t\t }\n\t\t\t\t}\n\t \n\t $resultado = $statement->fetchAll(PDO::FETCH_ASSOC);\n\t return $resultado;\n\t\t\t}\n } catch(PDOException $ex) {\n echo \"An Error occured!\"; //handle me.\n }\n\t}", "title": "" }, { "docid": "bf1fd9e0634b330d79356194294126f6", "score": "0.6997529", "text": "function pdoQuery(String $query) : array {\n \n try {\n // Connect to database\n $pdo = pdoDbConnection();\n\n // Execute query\n $st = $pdo->query($query);\n \n // Get result\n if ($st !== false ) { \n $data = $st->fetchAll(); \n $data[\"error\"] = false;\n } else {\n $data[\"error\"] = true;\n }\n\n // Disconnect from database\n $pdo = null;\n \n // Return dataset\n return $data;\n \n \n } catch (PDOException $e) {\n \n // Prepare full error message\n $errorMsg = '<p>\n Error while executing query : <br />\n query : ' .htmlspecialchars($query) .'<br /> \n error : ' .htmlspecialchars($e->getMessage()) .' \n </p>';\n \n // Write error into db\n writeError(ERROR_CODE_PDO, $errorMsg);\n \n return array(\"error\" => true);\n }\n \n}", "title": "" }, { "docid": "090644c60ed1f7ed33167797b65e2979", "score": "0.69871175", "text": "public function all()\n {\n // ============================================================================================\n // Criação da sentença SQL.\n // ============================================================================================\n $sql = \"SELECT * FROM {$this->table}\";\n\n // ============================================================================================\n // O método prepare() do objeto connection, que é a conexão PDO, retorna um objeto do tipo\n // PDOStatement, por esse motivo é bem comum declararem a variável $stmt ao invés de $list,\n // como feito neste exemplo.\n // O método query() também retorna um PDOStatement, com algumas diferenças.\n // O método prepare() prepara uma sentença SQL permitindo a utilização de um placeholder que\n // depois será trocado por um valor real. O método query() não permite isso.\n // O método prepare() já nos previne contra ataques do tipo SQL Injection, ou seja, é mais\n // seguro do que utilizar o método query().\n //\n // Ex.:\n // $sql = \"SELECT * FROM {$this->table} WHERE id = :placeholder\";\n //\n // O placeholder será substituído quando ocorrer a chamada ao método bindValue() do objeto\n // $stmt, neste exemplo o $list. O primeiro parâmetro passado é o nome do placeholder a ser\n // substituído, o segundo parâmetro é o valor real ou variável com o valor.\n // No exemplo estamos trocando o placeholder pelo valor 2\n //\n // Ex.:\n // $list->bindValue(':placeholder', 2)\n // ============================================================================================\n $list = $this->connection->prepare($sql);\n //$list->bindValue(':id', 1);\n $list->execute();\n\n // ============================================================================================\n // Retorna um array multidimensional em que cada índice aponta para outro array que contém\n // os dados de um registro da tabela.\n // Ou seja, se a consulta retornar 3 registros, no array multidimensional haveram mais 3 arrays\n // sendo que cada um é um registro (linha) da tabela.\n //\n // O método fetchAll() do objeto PDOStatement retorna todos os registros encontrados no banco\n // de dados quando o critério de busca, dado, é genérico.\n //\n // O método fetch() do objeto PDOSstatement retorna apenas 1 registro.\n // ============================================================================================\n return $list->fetchAll();\n }", "title": "" }, { "docid": "7e22fc4ab13c293e41e5eadc7781be41", "score": "0.69851285", "text": "function FetchAllData($bdd){\n $sth = $bdd->prepare(\"SELECT * FROM article\");\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n}", "title": "" }, { "docid": "17fecdb835e6f3c53d7ea5fa434ba698", "score": "0.69802797", "text": "public function all(){\n $result = $this->connection->query(\"SELECT * FROM $this->table\");\n if($result->rowCount() > 1){\n $result = $result->fetchAll(\\PDO::FETCH_OBJ);\n }else{\n $result = $result->fetch(\\PDO::FETCH_OBJ);\n }\n \n return $result;\n }", "title": "" }, { "docid": "284dcf1b4a4947853def60a5b0008c11", "score": "0.6972741", "text": "function queryDB($sql,$values,$mode=3){\n global $pdo;\n $stmt = $pdo->prepare($sql);\n foreach($values as $value){\n if(is_array($value)){\n $stmt->bindValue($value[0],$value[1]);}\n else{\n $stmt->bindValue($values[0],$values[1]);\n }\n }\n \n $stmt->execute();\n if($mode==1){\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n return $result;\n }\n elseif($mode==2){\n $result = $stmt->fetchall(PDO::FETCH_ASSOC);\n return $result;\n }\n }", "title": "" }, { "docid": "16bf7f9a728c1d009275064e6e942d8a", "score": "0.69693804", "text": "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "title": "" }, { "docid": "16bf7f9a728c1d009275064e6e942d8a", "score": "0.69693804", "text": "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "title": "" }, { "docid": "1ab0b7f877da196909eca02948214a0b", "score": "0.6968421", "text": "public function fetchAll(){\r\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "6e5916164b903782c01480dc04a717ed", "score": "0.69538146", "text": "protected function fetch_all()\n\t{\n\t\t// Check if there's connection defined on the models\n\t\tif (not_filled(static::$connection)) {\n\t\t\techo '<pre>No Connection, Please check your connection again!</pre>';\n\t\t\texit();\n\t\t} else {\n\t\t\t$stmt = static::$connection->prepare(static::$query);\n\t\t\t// if vars null, execute queries without vars, else execute it with defined on the models\n\t\t\tif (not_filled(static::$variables)) {\n\t\t\t\t$executed = $stmt->execute();\n\t\t\t} else {\n\t\t\t\tif (not_filled(static::$bind)) {\n\t\t\t\t\t$executed = $stmt->execute(static::$variables);\n\t\t\t\t} else {\n\t\t\t\t\tif (static::$bind == 'BINDVALUE') {\n\t\t\t\t\t\tif (is_array(static::$variables) || is_object(static::$variables)) {\n\t\t\t\t\t\t\tforeach (static::$variables as $key => &$res) {\n\t\t\t\t\t\t\t\tif (not_filled($res[1]) || not_filled($res[0])) {\n\t\t\t\t\t\t\t\t\t$var_msg = 'BindValue parameter type undefined, for example use PAR_INT or PAR_STR in the <strong>null</strong> variable.<br><br>[' . $key . ' => [' . $res[0] . ', <strong>null</strong>] ]';\n\t\t\t\t\t\t\t\t\tNSY_Desk::static_error_handler($var_msg);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$stmt->bindValue($key, $res[0], $res[1]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$executed = $stmt->execute();\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif (self::$bind == 'BINDPARAM') {\n\t\t\t\t\t\tif (is_array(static::$variables) || is_object(static::$variables)) {\n\t\t\t\t\t\t\tforeach (static::$variables as $key => &$res) {\n\t\t\t\t\t\t\t\tif (not_filled($res[1]) || not_filled($res[0])) {\n\t\t\t\t\t\t\t\t\t$var_msg = 'BindParam parameter type undefined, for example use PAR_INT or PAR_STR in the <strong>null</strong> variable.<br><br>[' . $key . ' => [' . $res[0] . ', <strong>null</strong>] ]';\n\t\t\t\t\t\t\t\t\tNSY_Desk::static_error_handler($var_msg);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$stmt->bindParam($key, $res[0], $res[1]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$executed = $stmt->execute();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$var_msg = \"The value that binds in the <mark>bind(<strong>value</strong>)</mark> is empty, undefined, or unknown parameter\";\n\t\t\t\t\t\tNSY_Desk::static_error_handler($var_msg);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check the errors, if no errors then return the results\n\t\t\tif ($executed || $stmt->errorCode() == 0) {\n\t\t\t\t$show_result = $stmt->fetchAll(static::$fetch_style ?? '');\n\n\t\t\t\treturn $show_result;\n\t\t\t} else {\n\t\t\t\t$var_msg = \"Syntax error or access violation! \\nYou have an error in your SQL syntax, \\nPlease check your query again!\";\n\t\t\t\tNSY_Desk::static_error_handler($var_msg);\n\t\t\t}\n\t\t}\n\n\t\t// Close the statement & connection\n\t\t$stmt = null;\n\t\tstatic::$connection = null;\n\t}", "title": "" }, { "docid": "e002e2f742b0794cd6fb1d129bb7d8fd", "score": "0.69429535", "text": "function consulta(){\n\t\t$result = $this->base_datos->query(\"\");\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1cfcf4675e8c9259b2995e8715f58557", "score": "0.69401413", "text": "public function findAll() : array {\r\n\r\n // méthode query car pas besoin de préparation ( liée à une variable) \r\n\r\n $resultat = $this->pdo->query(\"SELECT * FROM {$this->table}\");\r\n \r\n // fetchAll pour fouiller le résultat et en extraire les données réelles\r\n\r\n $items = $resultat->fetchAll();\r\n\r\n return $items;\r\n}", "title": "" }, { "docid": "d2ba6b16cdf835155897a283381dbfc2", "score": "0.6934425", "text": "function getAllTestData(){\n $db = dbconnect();\n \n $stmt = $db->prepare(\"SELECT * FROM test\");\n\n $results = array();\n if ($stmt->execute() && $stmt->rowCount() > 0) {\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n return $results;\n}", "title": "" }, { "docid": "a7268c5472530c8bbd28262a65cffb0c", "score": "0.69334275", "text": "public function execute($query){\n $consulta = mysqli_query($this->conection,$query); \n $resultado=array();\n while($row = mysqli_fetch_array($consulta)){\n array_push($resultado, $row);\n }\n return $resultado; \n }", "title": "" }, { "docid": "6704339781398c4247055451f1051649", "score": "0.69230664", "text": "function consulta($consulta)\n {\n include '../scripts/conexion.php';\n $stmt = $con->prepare($consulta);\n $stmt->execute();\n $resultado = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n }", "title": "" }, { "docid": "d16b574ca8ca969262248908fab07642", "score": "0.6921881", "text": "public function getAll(){\n try{\n $sql = \"SELECT * FROM {$this->tabela}\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $dados = $stm->fetchAll(PDO::FETCH_OBJ);\n return $dados;\n }catch(PDOException $erro){\n echo \"<script>alert('Erro na linha: {$erro->getLine()}')</script>\";\n }\n }", "title": "" }, { "docid": "c80de62d48ba9f0471e962e565ee1195", "score": "0.69130725", "text": "public function executeAll($query, array $param=array())\n {\n\treturn $this->execute($query, $param)->fetchAll();\n }", "title": "" }, { "docid": "f782b34e357efc6073546a1f3e507f3b", "score": "0.69122696", "text": "public function result()\n {\n if ($this->PDO == null) {\n return [];\n } // return null jika db belum siap\n $this->PDO->query($this->query());\n $this->bindingFilters();\n\n return $this->PDO->resultset();\n }", "title": "" }, { "docid": "dca8a08383a23ff46a6d5cf85a10b86b", "score": "0.6910315", "text": "function fetchAll()\n {\n //select all data\n $query = \"SELECT\n id, tag\n FROM\n \" . $this->table_name . \"\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\n\n return $result;\n }", "title": "" }, { "docid": "e92316029be9796ca01f630ce0788d6c", "score": "0.69066787", "text": "public function query()\n\t\t{\n\t\t\t\n\t\t\t$this->prep = $this->pdo->prepare($this->query);\n\n\t\t\tif($this->prep){\n\t\t\t\t$this->prep->execute();\n\n\t\t\t\treturn $this->prep->fetchall(PDO::FETCH_ASSOC);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "5d0807d8bdbc84637499e9be8a0774f6", "score": "0.6901747", "text": "function getAll($table){\n global $con;\n $query=\"SELECT * from {$table}\";\n //prepare the query\n $stmt=$con->prepare($query);\n //execute the query\n $stmt->execute();\n //fetch all data\n $fetch=$stmt->fetchAll();\n\n //return the data\n return $fetch;\n }", "title": "" }, { "docid": "7ada18a517b8e253c09285e127cc07cd", "score": "0.689633", "text": "function SelektoDatabasen(){\n global $db;\n $SqlStmt=$db->prepare(\"select * from p149pm_roombook\");\n try{ $SqlStmt->execute(); } catch (PDOException $e) { die(); }\n while($row = $SqlStmt->fetch(PDO::FETCH_ASSOC)) { $smartRs[] = $row; }\n if ($SqlStmt->rowCount() > 0) {return $smartRs; }\n\n}", "title": "" }, { "docid": "9b5ddbcf653f43472b7b6d6fc8bcf0e3", "score": "0.68833125", "text": "public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "2696d93840996f3441a9f25d61bef1c6", "score": "0.68828744", "text": "function executeQuery($sqlQuery, $getAll = false){\n $conn = getConnect();\n $stmt = $conn->prepare($sqlQuery);\n $stmt->execute();\n if($getAll){\n $result = $stmt->fetchAll();\n }else{\n $result = $stmt->fetch();\n }\n\n return $result;\n}", "title": "" }, { "docid": "6f3eb63f73fe8663bbb92e0880e87959", "score": "0.68823594", "text": "function selectAll($db, $query, $pagina) {\n $stmt = $db->prepare($query);\n $stmt->bindValue(':pagina', $pagina, PDO::PARAM_INT);\n $stmt->execute();\n\n // Recupera o resultado\n $result = $stmt->fetchAll();\n\n return getMessage($result ? $result : []);\n}", "title": "" }, { "docid": "3cea46bc820963828dc106a11a6184d3", "score": "0.6880904", "text": "public function resultSet(){\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "9ce70e11e137084620ee1a014fb46b7c", "score": "0.68715394", "text": "function db_fetch_array () {\n\ttry {\n\t\tlist ($stmt, $args) = Database::prepare (func_get_args ());\n\t\t$stmt->execute ($args);\n\t\treturn $stmt->fetchAll ();\n\t} catch (Exception $e) {\n\t\tDatabase::$error = $e->getMessage ();\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "a96383e574f13719d5625495732d850b", "score": "0.6869986", "text": "public function all(){\n\t\t$class_name = self::className();\n\t\tif(isset($this->data)){\n\t\t\t$query = $this->data;\n\t\t}else{\n\t\t\t$query = \"select * from $this->name order by $this->pk_field\";\n\t\t}\n\t\t\t\n\t\t$sentencia = $this->db->prepare($query);\t\n\n\t\tif(isset($this->condicion) and isset($this->valor)){\n\t\t\t$condicion = $this->condicion;\n\t\t\t$valor = $this->valor;\n\n\t\t\t$sentencia->bindParam(\":\".$this->condicion,$this->valor);\n\t\t}else{\n\t\t\t$condicion = \"\";\n\t\t\t$valor = \"\";\n\t\t}\n\n\t\t\t\n\t\t\t$sentencia->execute();\n\t\t\t$registros = $sentencia->fetchall(PDO::FETCH_ASSOC);\n\n\t\tif($registros){\n\t\t\t\n\t\t\treturn $registros;\n\n\t\t}else{\n\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "135b1a3f86249912c4831a0aa8b7e091", "score": "0.68697447", "text": "public function get_results_from_query() {\n $this->open_connection();\n $result = $this->conn->query($this->query);\n while ($this->rows[] = $result->fetchArray(\\PDO::FETCH_OBJ));\n $result->finalize();\n $this->close_connection();\n array_pop($this->rows);\n }", "title": "" }, { "docid": "757e5594c049e378e7d4354728628050", "score": "0.68674785", "text": "protected function fetchAll():array\r\n {\r\n return $this->sth->fetchAll(\\PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "c6dcc4ef3a4b3f6b9d4bc36bd0f98479", "score": "0.68605745", "text": "public function queryFetchAll($statement) {\n try{\n return $this->connection->query($statement)->fetchAll();\n }catch(PDOException $e){\n echo 'Connection failed: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "5fe2668d60970bca960b09b403c5905d", "score": "0.6842601", "text": "private function fetch_results() {\n return $this->stmt->fetchAll(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "a3a116d1107b0bae801ca705ce0b1277", "score": "0.6841927", "text": "public function consultar(){\n\t\t\t$conexao = $this->conectar();\n\t\t\t$result = $conexao->query($this->sql, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\t//termina a conexao com banco de dados\n\t\t\t$conexao = null;\n\n\t\t\treturn $result;\n\t\t\t}", "title": "" }, { "docid": "adff836e116c6f9051715abff581164d", "score": "0.6833", "text": "public function resultSet(){\r\n $this->execute();\r\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "6447b0b0ed0bc96162f2be0addc40abf", "score": "0.6832896", "text": "public function getAll(){\n $sqlQuery = \"SELECT * FROM \".$this->t_name.\"\";\n //prepate stamt;\n $stmt = $this->conn->prepare($sqlQuery);\n $stmt->execute();\n //kembalikan nilai stmt\n return $stmt;\n }", "title": "" }, { "docid": "5c3267845352cdcc2acae9d19491ea0a", "score": "0.6829458", "text": "function find_all_secretaria($pdo) {\r\n $sql = \"select * FROM secretaria WHERE ativo = 0 order by id_secretaria\";\r\n $query = $pdo->prepare($sql);\r\n $query->execute();\r\n return $query;\r\n}", "title": "" }, { "docid": "f9da6c4325f24cb137f654699b7f1b31", "score": "0.68194413", "text": "public function executeGetRows($result) {\n try { \n if ($result->execute()) return $result->fetchAll(PDO::FETCH_ASSOC);\n else return 0;\n }\n catch (PDOException $e){ $this->reportDBError($e->getMessage().\"<hr>\".$e->getTraceAsString()); } \n }", "title": "" }, { "docid": "ea7911f7226dd8ab0424a994c7d8291c", "score": "0.6818468", "text": "public function fetch(){\n try{\n $this->array = $this->resultado->fetch();\n } catch (PDOException $e){\n $this->errors[] = 'error: function fetch<br/>'.$e->getMessage();\n $this->array = NULL;\n }\n return $this->array;\n }", "title": "" }, { "docid": "58f2930df20c7b88f152ac93d0ba0191", "score": "0.6814769", "text": "public function searchAll()\n {\n try\n {\n $newConnect = new BddConnect();\n $db = $newConnect->connexion();\n\n $query = 'SELECT * FROM pays';\n $stmt = $db->prepare($query);\n $stmt->execute();\n $pays = $stmt->fetchAll(PDO::FETCH_CLASS,'Pays');\n \n return $pays;\n }\n catch (PDOException $e){\n throw new DAOException($e->getMessage(),$e->getCode());\n } \n finally{\n $db = null;\n $stmt = null; \n }\n }", "title": "" }, { "docid": "322a7e55fd339abacfb31a002cbf3fc1", "score": "0.6808697", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "ddd37df1835f258d29f97f50c21da3e3", "score": "0.68052506", "text": "public function fetchAll(): array\n {\n $st = $this->run();\n try {\n return $st->fetchAll(\\PDO::FETCH_ASSOC);\n } finally {\n $st->close();\n }\n }", "title": "" }, { "docid": "d3522ecd227cda1f523b6ad9477757c6", "score": "0.6799638", "text": "function dameMotivos(){\n\t\n\t$resultado = false;\n\t$consulta = \"SELECT *\n\t\t\t\t\tFROM\n\t\t\t\t\t\tmedico_motivos_de_consulta\";\n\t\t\t\t\t\t\n\t$conexion = conectaBaseDatos();\n\t$sentencia = $conexion->prepare($consulta);\n\t\n\ttry {\n\t\tif(!$sentencia->execute()){\n\t\t\tprint_r($sentencia->errorInfo());\n\t\t}\n\t\t$resultado = $sentencia->fetchAll();\n\t\t//$resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n\t\t$sentencia->closeCursor();\n\t}\n\tcatch(PDOException $e){\n\t\techo \"Error al ejecutar la sentencia: \\n\";\n\t\t\tprint_r($e->getMessage());\n\t}\n\treturn $resultado;\t\t\n}", "title": "" }, { "docid": "c2ef4cc52e3cc9328892d6c0817267c8", "score": "0.67955655", "text": "function rechercheAvisParIdProduit($id)\n{\n static $ps = null;\n $sql = \"SELECT idAvis, titreAvis, commentaireAvis FROM avis WHERE idProduit = :idProduit\";\n\n $answer = false;\n try {\n if ($ps == null) {\n $ps = dbData()->prepare($sql);\n }\n $ps->bindParam(':idProduit', $id, PDO::PARAM_INT);\n $ps->execute();\n\n $answer = $ps->fetchAll(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $answer = array();\n echo $e->getMessage();\n }\n return $answer;\n}", "title": "" }, { "docid": "e32f04ce433d95e3f909b743f9851bc3", "score": "0.6790414", "text": "public function get_qry_rows(){\n\t\treturn $this->qry->fetchAll();\n\t}", "title": "" }, { "docid": "9e90667183e739a1c77fb83d5eaf003f", "score": "0.6788274", "text": "public function all()\n {\n try {\n if($this->visible) {\n $visibleStatement = implode(\",\", $this->visible);\n $this->sqlStatement = str_replace(\"*\", $visibleStatement, $this->sqlStatement);\n }\n $statement = $this->db->prepare($this->sqlStatement);\n\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n\n $results = $statement->fetchAll();\n\n return $results;\n\n } catch(PDOException $e) {\n return $e;\n }\n }", "title": "" }, { "docid": "5452156e575ac4b2d8a9d6d1c70a6b62", "score": "0.6785749", "text": "function consultar($sql)\r\n {\r\n return $this->db->query($sql)->result_array();\r\n }", "title": "" }, { "docid": "8d3dd4a3d2d4ea5cf9c96ffc5549fe9b", "score": "0.67838746", "text": "function getLocalData($sql){\r\n include_once(\"config.php\"); \r\n $con = new Conexion();\r\n $db = $con->getConexion();\r\n if(is_null($db))\r\n echo \"error\";\r\n $result = $db->query($sql);\r\n if(!$result)\r\n echo \"error\";\r\n else \r\n return $rows = $result->fetchAll(PDO::FETCH_ASSOC);\r\n}", "title": "" }, { "docid": "71c9ce116d9153577c7ddd0e6964126f", "score": "0.67814946", "text": "function sql_fetch_array($res)\n {\n $results = array();\n if ($res)\n $results = $res->fetch(PDO::FETCH_BOTH);\n return $results;\n }", "title": "" }, { "docid": "869a71fa54cf8f2a3f8c81f6228df07a", "score": "0.677202", "text": "function selectAll($table)\r\n{\r\n $pdo = getPDO();\r\n $sql = \"select * from $table\";\r\n $result = $pdo->query($sql);\r\n $array = $result->fetchall();\r\n return $array;\r\n}", "title": "" }, { "docid": "3ebb7a0dce7bb92d8991a52c903f7842", "score": "0.67546743", "text": "function getAllCorpData(){\r\n $db = dbconnect();\r\n \r\n // prepare the SQL statement\r\n $stmt = $db->prepare(\"SELECT * FROM corps\");\r\n\r\n $results = array();\r\n // execute the statement (Returns BOOL), \r\n // if TRUE check the row count\r\n if ($stmt->execute() && $stmt->rowCount() > 0) {\r\n // fetches all rows for the conditions of SQL statement as an Associative Array\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n \r\n \r\n return $results;\r\n}", "title": "" }, { "docid": "ce698448feb9f8559c65d5486dabfa29", "score": "0.67511064", "text": "private function getResult() {\r\n\t\t// Return the data set\r\n\t\t$result = $this->PDOStatement->fetchAll ( PDO::FETCH_ASSOC );\r\n\t\t$this->numRows = count ( $result );\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "b83f7ebddeffe0f6a86ebb2e209c56f8", "score": "0.6750955", "text": "public function selectAllClasse(){\n\n\t\tif($this->unPdo!=null)\n\t\t{\n\t\t\t$requete=\"select * from classe ;\";\n\t\t\t//preparation de la requete avant execution\n\t\t\t$select= $this->unPdo->prepare($requete);\n\t\t\t//execution de la requete\n\t\t\t$select->execute();\n\t\t\t//extraction des données\n\t\t\t$resultats = $select->fetchAll();\n\t\t\treturn $resultats;\n\t\t}\n\t}", "title": "" }, { "docid": "0a0816b4e235fce58636b6b91627ddeb", "score": "0.67468035", "text": "function pdoPrepareQuery(String $query, array $arguments) :array {\n \n try {\n \n // Connect to database\n $pdo = pdoDbConnection();\n \n // Prepare statement with query and params given in arguments\n $st = $pdo->prepare($query);\n \n foreach ($arguments as $param) {\n $st->bindParam($param[PDO_PARAM_ORDER_CODE], $param[PDO_PARAM_ORDER_VALUE], $param[PDO_PARAM_ORDER_TYPE]);\n }\n \n // execute prepared statement & return data\n $result = $st->execute();\n \n if ($result) {\n $return = $st->fetchAll();\n $return[\"error\"] = false;\n } else {\n $return = array(\"error\" => true);\n }\n \n // Disconnect from database\n $pdo = null;\n \n return $return;\n \n } catch (PDOException $e) {\n \n // Prepare full error message\n $errorMsg = '<p>\n Error while executing query : <br />\n query : ' .htmlspecialchars($query) .'<br />\n arguments : ' . htmlspecialchars(implode(' | ', $arguments)) .'<br />\n error : ' .htmlspecialchars($e->getMessage()) .' \n </p>';\n \n // Write error into db\n writeError(ERROR_CODE_PDO, $errorMsg);\n \n return array(\"error\" => true);\n }\n}", "title": "" }, { "docid": "fea2df29c991770e4e08f98cbf0fb2db", "score": "0.6746395", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "2bb5797e0630b6454a2eb79fc5431be1", "score": "0.67404896", "text": "public function getSqlResults() \n\t{\n\t\t$array = $this->getSqlStatments();\n\t\tfor ($i=0; $i < count($array); $i++) {\n\t\t\t$q = $this->connection->prepare($array[$i]);\n\t\t\t$q->execute();\n\t\t\t$r = $q->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$this->sql_query_results[] = $r;\n\t\t}\n\t\treturn $this->sql_query_results;\n\t}", "title": "" }, { "docid": "08eb0f8fae67b834521a0bdfe845f391", "score": "0.67391044", "text": "public function GetAll($sql) \n {\n $this->connect();\n \n //connect to database\n if (!empty($sql)) \n {\n try\n {\n $q = $this->db->prepare($sql);\n $q->execute();\n $q->setFetchMode(PDO::FETCH_ASSOC);\n $data = $q->fetchAll();\n \n return $data;\n \n //echo json_encode($data);\n \n \n }\n catch(PDOException $e) \n {\n return $e->getMessage();\n }\n } else\n {\n return 'No query provided';\n die;\n }\n \n $this->disconnect();\n \n //disconnect from database\n \n \n }", "title": "" }, { "docid": "97ced6f1bff82c8f23795e4afbf454ac", "score": "0.6730821", "text": "public function fetchAll(){\r\n$table=$this->getTable();\r\nreturn $this->fetch_array($this->query(\"SELECT * FROM {$table}\"));\r\n}", "title": "" }, { "docid": "2853088e14cc8ffa88045c29376c9b56", "score": "0.6727436", "text": "function get_products()\n{\n $pdo = pdo_db();\n $stmt = $pdo->prepare(\"SELECT * FROM `products`\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n//var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));\n}", "title": "" }, { "docid": "e03896f405b203672158c6ddc9507d17", "score": "0.6724681", "text": "function resultSet()\n{\n $allData = array();\n $stmt = $conn->prepare(\"SELECT * FROM users\");\n $stmt->execute();\n while ($userRow = $stmt->fetchAll()) {\n $allData[] = $userRow;\n }\n return $allData;\n}", "title": "" }, { "docid": "3ab5091684b1aa3e700032c7a233e897", "score": "0.6714726", "text": "public function querySingle($query){\n $q = self::$db -> prepare($query);\n $q -> execute();\n return $q->fetchAll();\n }", "title": "" }, { "docid": "3acc63811fed7109186271a89fd51599", "score": "0.67142034", "text": "public function all()\n\t{\n\t\t$statement = $this->query();\n\t\t$args = $this->resolve_fetch_mode();\n\n\t\treturn call_user_func_array([ $statement, 'fetchAll' ], $args);\n\t}", "title": "" }, { "docid": "e17ea09b04a71351e86229d868141b30", "score": "0.67135227", "text": "function consultar($sql)\n { \n $result = $this->db->query($sql)->result_array();\n return $result; \n \n }", "title": "" }, { "docid": "c9d416ecf60510049d1c004321c74039", "score": "0.6705819", "text": "function getAll() {\n\n // 2. Enviar la consulta (2 sub-pasos: prepare y execute)\n $query = $this->db->prepare('SELECT * FROM rubro');\n $query->execute();\n\n // 3. Obtengo la respuesta con un fetchAll (porque son muchos)\n $rubros = $query->fetchAll(PDO::FETCH_OBJ); // arreglo de herramientas\n // var_dump($rubros);\n // die;\n return $rubros;\n }", "title": "" }, { "docid": "8f84c76c2f12f7ab3dfa7e3c588363ed", "score": "0.67013407", "text": "public function fetchAll($sql, $bind){\n $sth = $this->db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n /* example:\n $bind = array(':calories' => 150, ':colour' => 'red');\n */\n $sth->execute($bind);\n return $sth->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "185441bca5859007f5373afb02b6939a", "score": "0.6697014", "text": "function query($query, $params) {\n try {\n// connectie maken\n $pdo = new PDO(\"mysql:host=localhost;dbname=databasekps01;port=3307\", \"root\", \"usbw\");\n//$pdo = new PDO(\"mysql:host=localhost;dbname=dirvan2_schilderijen;port=3306\", \"dirvan2_admin\", \"hEwhBPLqGv6kbkF\");\n $q = $pdo->prepare($query);\n $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n// uitvoeren\n $q->execute($params);\n//get results\n $result = $q->fetchAll(PDO::FETCH_ASSOC);\n $pdo = null; // drop connection\n return $result;\n } catch (PDOException $e) {\n return null;\n }\n}", "title": "" }, { "docid": "b6d9e86eed181e9994c630f822e7dce9", "score": "0.6694296", "text": "function getAllRows($query, $params = [])\r\n{\r\n $statement = performQuery($query, $params);\r\n\r\n if ($statement === false) {\r\n return [];\r\n }\r\n\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n}", "title": "" }, { "docid": "74b856e486dfa39c0bd3d778d2af8d8d", "score": "0.6686607", "text": "function dameDiagnosticos(){\n\t\n\t$resultado = false;\n\t$consulta = \"SELECT *\n\t\t\t\t\tFROM\n\t\t\t\t\t\tmedico_diagnostico\";\n\t\t\t\t\t\t\n\t$conexion = conectaBaseDatos();\n\t$sentencia = $conexion->prepare($consulta);\n\t\n\ttry {\n\t\tif(!$sentencia->execute()){\n\t\t\tprint_r($sentencia->errorInfo());\n\t\t}\n\t\t$resultado = $sentencia->fetchAll();\n\t\t//$resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n\t\t$sentencia->closeCursor();\n\t}\n\tcatch(PDOException $e){\n\t\techo \"Error al ejecutar la sentencia: \\n\";\n\t\t\tprint_r($e->getMessage());\n\t}\n\treturn $resultado;\t\t\n}", "title": "" }, { "docid": "5d45a182215c38c952a43e4ae203341d", "score": "0.66736287", "text": "public function mySelect($query)\n { \n \t\t$myResult = array();\n\t\t$stmt = $this->DBH->query($query);\n\t\tif($stmt == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC)) \n\t {\n \t\t array_push($myResult, $row);\n \t }\n\t\treturn $myResult;\n\n }", "title": "" }, { "docid": "98f78016ec381eecf23bcd8bab6140ce", "score": "0.66665804", "text": "function fetchAll()\n {\n $rows=array();\n if ($this->consulta)\n {\n //la funcion oci_fetch_array devuelve cada fila de la consulta en forma de array\n while($row = oci_fetch_array($this->consulta, OCI_BOTH))\n { //luego cada fila (como un array) se agrega a otro array... creando un array de 2 dimsnesiones\n $rows[]=$row;\n }\n }\n return $rows;\n }", "title": "" }, { "docid": "7b675457bc0ab526a0aac8b2797d0226", "score": "0.6649757", "text": "protected function get_results_from_query() {\n\t\t//para vaciar posibles resultados previos\n\t\t$this->rows = array();\n\t\t\n\t\t$this->crear_conexion();\n\t\t$this->set_charset();\n\t\t$result = $this->conn->query($this->query);\n\t\twhile ($row = $result->fetch_assoc())\n\t\t\t$this->rows[] = $row;\n\t\t$result->close();\n\t\t$this->cerrar_conexion();\n\t\t//array_pop($this->rows);\t//trae uno de más por el while\n\t\t//return $this->rows;\n\t}", "title": "" }, { "docid": "23c4b214df022cd89b595b9c724f1d03", "score": "0.6645154", "text": "public function selectAllRegiuniData(){\n $sql = \"SELECT * FROM regiune ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "41e20fbabd2492253c47ebc6f087c790", "score": "0.6637792", "text": "private function prepare(){\n $stm = $this->pdo->prepare($this->query);\n $this->query = null;\n try {\n $stm->execute();\n } catch (PDOException $e) {\n $this->response->internalError();\n }\n \n return $stm;\n }", "title": "" }, { "docid": "550864a8bc95e3a65db30a101ed2099b", "score": "0.66336846", "text": "function SQL($query,$table)\n{\n\t$DB=DB()->prepare($query);\n\n $DB->execute([]);\n\n $varibles=array();\n\n While($col=$DB->fetch(PDO::FETCH_ASSOC))\n {\n array_push($varibles,$col[$table]);\n }\n\n return $varibles;\n}", "title": "" } ]
9676962e1097064c7b145dcbda46cad6
=========insert CSV file value======//
[ { "docid": "bbf5922c868753310c5b70edd84cbaa9", "score": "0.638829", "text": "function insert_csv($table, $data)\n\t{\n\t\t$this->db->where('type', $data['type']);\n\t\t$query = $this->db->get('industry_type');\n\t\t\n\t\tif($query->num_rows == 0)\n\t\t{\n\t\t\t$insrt = $this->db->insert($table, $data);\n\t\t\treturn '1';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn '0';\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "22ad75edbf88172d9d23cc2e6cd1d44a", "score": "0.7172326", "text": "function insertCSVData($file,$campaignID,$csvID)\n\t{\n\t\t$file = fopen($file,'r');\n\t\twhile(!feof($file))\n\t\t{\n\t\t\t//print_r(fgetcsv($file));\n\t\t\t$data = fgetcsv($file);\n\t\t\t\n\t\t\t$name = $data[0];\n\t\t\t$email = $data[1];\n\t\t\t\n\t\t\t$voterFields['name'] = $name;\n\t\t\t$voterFields['email'] = $email;\n\t\t\t$voterFields['CSV'] = $csvID;\n\t\t\t\n\t\t\tif($voterFields!=NULL){\n\t\t\t$res = $this->c3model->c3crud(\"insert\",'voters',$voterFields,'');\n\t\t\t\n\t\t\t//MAX VOTER ID\n\t\t\t$sql\t\t= \"SELECT max(id) as max_id FROM voters\";\n\t\t\t$lastID \t= $this->c3model->c3crud(\"select\",'','','',$sql);\n\t\t\t$voterID = $lastID[0]['max_id'];\n\t\t\t\n\t\t\t$campaignVotersXrefFields['campaignID'] = $campaignID; \n\t\t\t$campaignVotersXrefFields['voterID'] = $voterID; \n\t\t\t$res = $this->c3model->c3crud(\"insert\",'campaignVotersXref',$campaignVotersXrefFields,'');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tfclose($file);\n\t}", "title": "" }, { "docid": "269a214398ccb6b311d7fdb707ce4f1c", "score": "0.67147416", "text": "public function reestructuraCsv()\n\t\t{\n\t\t\t$csv = explode(\";\",$this->csv);\n\t\t\t\n\t\t\t$csv[intval($this->pos)] = $this->cOri;\n\t\t\t\n\t\t\t$this->csv = implode(\";\", $csv);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "d5a609d4b64f223adef21cc2b1594765", "score": "0.65831363", "text": "function escapeCsvValue($value)\n { \n $valueModified = stripslashes($value); \n $valueModified = preg_replace('/\\r\\n/', \" \", $valueModified); \n $valueModified = str_replace('\"', '\"\"', $valueModified); \n\n if ($valueModified != $value || preg_match('/['.$this->csvSeparator.'\\n]+/', $value)) {\n $value = '\"'.$valueModified.'\"';\n } \n \n return $value;\n }", "title": "" }, { "docid": "9060fe3dbcea6fbdbcd2b01b513dab1d", "score": "0.6493992", "text": "public function importCSVToDatabase($file_location){\n\t\t\t$headerLine = [];\t\t\n\t\t\t$headerData = [];\n\t\t\tif (($handle = fopen($file_location, \"r\")) !== FALSE) {\n\t\t\t\t$this->db->exec('BEGIN');\n\t\t\t\t\t\n\t\t\t\twhile(($data = fgetcsv($handle,2500,\",\"))!== FALSE){\n\t\t\t\t\t/*\n\t\t\t\t\t*\t0 SKU\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t*\t1 Category\n\t\t\t\t\t*\t2\tBrand \n\t\t\t\t\t*\t3\tModel\n\t\t\t\t\t*\t4\tYear\n\t\t\t\t\t*\t5\tSurface Finish\t\n\t\t\t\t\t*\t6\tTitle\n\t\t\t\t\t*\t7\tAccounts\n\t\t\t\t\t*\t\n\t\t\t\t\t*\t4,6 IN Products\n\t\t\t\t\t*/\n\t\t\t\t\tif(count($headerLine)===0){\n\t\t\t\t\t\tfor($i=0;$i<count($data);$i++){\n\t\t\t\t\t\t\t$headerLine[strtolower(trim($data[$i]))] = $i;\n\t\t\t\t\t\t\t$headerData[$i] = strtolower(trim($data[$i]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tprint_r($headerData);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t/*Process CSV data for import to table Product */\n\t\t\t\t\t\t$sku = strtolower($data[$headerLine['sku']]);\n\t\t\t\t\t\t$year_arr = str_split(trim($data[$headerLine['year']]),3); \n\t\t\t\t\t\t$category = trim($data[$headerLine['category']]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(intval($year_arr[0])<20){ $start_year = intval('20'.$year_arr[0]) ;}\n\t\t\t\t\t\telse{$start_year = intval('19'.$year_arr[0]);}\n\t\t\t\t\t\tif(intval($year_arr[count($year_arr)-1])<20){ $end_year = intval('20'.$year_arr[count($year_arr)-1]); }\n\t\t\t\t\t\telse{$end_year = intval('19'.$year_arr[count($year_arr)-1]);}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->importProduct($sku,$category,$start_year,$end_year);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*Process CSV data for import to table Tag */\n\t\t\t\t\t\tfor($i=0;$i<count($headerLine);$i++){\n\t\t\t\t\t\t\tif(($i!=0)&&($i!=1)&&($i!=4)&&($i!=6)){\n\t\t\t\t\t\t\t\tif ($i == 3){\n\t\t\t\t\t\t\t\t\tif(preg_match(\"/[,]/\",$data[$i])){\n\t\t\t\t\t\t\t\t\t\t$temp = explode(',',$data[$i]);\n\t\t\t\t\t\t\t\t\t\t$models = array_map('trim',$temp);\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfor($f=0;$f<count($models);$f++){\n\t\t\t\t\t\t\t\t\t\t\t$this->importTag($models[$f],$headerData[$i],$sku);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\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\telse if($i==7){\n\t\t\t\t\t\t\t\t\tif(preg_match(\"/[,]/\",$data[$i])){\n\t\t\t\t\t\t\t\t\t\t$temp = explode(',',$data[$i]);\n\t\t\t\t\t\t\t\t\t\t$accounts = array_map('trim',$temp);\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfor($f=0;$f<count($accounts);$f++){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\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\telse {$this->importTag($data[$i],$headerData[$i],$sku);}\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\t$this->db->exec('COMMIT');\n\t\t\t}\t\t\t\n\t\t}", "title": "" }, { "docid": "f2418bcf8b74f22fd7e0588776305d79", "score": "0.64683604", "text": "function importUploadedFile() {\n if (!isset($_FILES[\"fileUpload\"][\"tmp_name\"]) || empty($_FILES[\"fileUpload\"][\"tmp_name\"]))\n {\n throw new Exception('Please select a csv file to upload.');\n }\n $dao = new DataAccessObject(INI_FILE_PATH);\n $uploadFile = fopen($_FILES[\"fileUpload\"][\"tmp_name\"], \"r\") or die(\"Unable to open file!\");\n $headers = parseHeader($uploadFile);\n //While not the end of the file\n while(!feof($uploadFile)) {\n $row = parseRow($headers, $uploadFile);\n if(empty($row)){ break; }\n saveRow($dao, $row);\n }\n fclose($uploadFile);\n}", "title": "" }, { "docid": "ecae544197e6c569a4cfc3b5900357c4", "score": "0.6426099", "text": "function CSV() {}", "title": "" }, { "docid": "8639e26f7b7d80e2fd353a75dd45f9a2", "score": "0.6297831", "text": "function orderfeed_csv () {\n\t\trequire_once (dirname (dirname (dirname (dirname (__FILE__)))) . \"/catalog/includes/classes/order.php\");\n\t\t$this->readPassedValues ();\n\t}", "title": "" }, { "docid": "49c32db3946f6560be33e090c7416ac4", "score": "0.6219924", "text": "function setFullfillmentInformationsCSV($csvPath, $url, $shopid, $accessToken){\n\t\t$file = fopen($csvPath, 'r');\n\t\t\n\t\t//Cycle throught all lines of csv file\n\t\t//CSV structure: IdealoOrderId; CarrierName; TrackingCode\n\t\twhile (($line = fgetcsv($file, 0, \";\")) !== FALSE) {\n\t\t\tsetFullfillmentInformation($line[0], $line[1], $line[2], $url, $shopid, $accessToken);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "d5fb943ef39d19ca7810f5b684c4cea8", "score": "0.6205887", "text": "function write_line_csv($filedir,$line){\n\t\t$file = fopen($filedir,\"a+\");\n\t\treturn fputcsv($file,$line); //return false if have error\n\t}", "title": "" }, { "docid": "bae803adc5de13cdb766bbe15cd96ab0", "score": "0.6178702", "text": "function ReadCSVFileDB($l, $f) {\n/* read file and push into Extraits, .csv format\necho (\"<br/\");\ntypical file name \n611-9437808-69 EUR.csv\n1234567890123456789\n\nfield name csv column name csv colum num\nNumero_de_compte ,0 // extract from full path file name\nNom_du_compte ,1 // 'DB'\nCompte_partie_adverse ,2 //\nNumero_de_mouvement ,3 //convert date col0 to yyyymmdd\nDate_comptable , 4 //format is 12/10/2016 d/m/y 0\nDate_valeur,5 //\nMontant ,6 // Montant 2\nDevise ,7 // Devise 3\nLibelles ,8 //Description 1\nDetails_du_mouvement ,9\nMessage , 10\n\nNumero_de_compte extract from file name : MUST SAVE FILE WITH COMPTE AS NAME ! : \n*/\n$row = 0;\n$sNotDef=\"\";//empty \nif (($handle=fopen($f, \"r\"))!=FALSE) {\n //echo ($f.\"<br/>\");\n //echo 'compte >' . $f .\"<br/>\" ;\n $d0=basename($f,'.csv' );\n //$d0= substr ( $d0 ,0 , 18 ) ;\n\n echo 'Fichier: ' . $f ; //.\"<br/>\" ;\n echo ', compte (extrait du nom de fichier): '.$d0.\"<br/>\" ;\n $d1='DB';\n while (($data = fgetcsv($handle, 0, \"|\")) !== FALSE) {\n $num = count($data);\n\t$row++;\n//echo \"num col=\".$num .\"<br/>\" ;\t\n\t//if (trim($data[0])=='Extrait') { //msg(\"Data '\".$data[1] .\"' on row \" .$row.\" not valid, skipping...\");\t\t\n\tif (FALSE) { //msg(\"Data '\".$data[1] .\"' on row \" .$row.\" not valid, skipping...\");\t\t\n\t\t}\n\telse \t{\n\t\t//$mv=date('Ymd',date_create_from_format('d/m/Y', trim( $data[0])) ) ;\n\t\t//Create unique mv with date and amount .. why not ?\n\t\t$mo= str_replace(\",\",\".\",$data[2])+0;\n\t\t$mv=date_format(date_create_from_format('d/m/Y', trim( $data[0])) ,'Ymd'). $mo;\necho \"mv=\".$mv .\"<br/>\" ;\t\t\n\t\tif ($mv !== $sNotDef) { //read 1 line too much ...?\n\t\t$d3=\"\";\n\t\t//if (empty($data[1])) {$data[1]='01/01/1900';} else {}\n\t\t//if (empty($data[2])) {$data[2]='01/01/1900';} else {}\n//echo $data[1].\"<br/>\" ;\n\t\t$Dc=date_create_from_format('d/m/Y', $data[0]);\n\t\t$Dv=$Dc; //date_create_from_format('d.m.Y', $data[2]);\n\n\t\t$Dc=date_format($Dc, 'Y-m-d');\n\t\t$Dv=date_format($Dv, 'Y-m-d');\n\t\t\n\n\t\t$d8 = mysqli_real_escape_string($l, trim($data[1]));\n\t\t$d9 = '';\n\t\t$d10 = '';\n\t\t//$d9 = mysqli_real_escape_string($l, trim($data[9]));\n\t\t//$d10 = mysqli_real_escape_string($l, trim( $data[10]));\n\t\t$s=\"INSERT IGNORE INTO Extraits (Numero_de_compte,Nom_du_compte,Compte_partie_adverse,\n\t\tNumero_de_mouvement ,Date_comptable,Date_valeur,\n\t\tMontant,Devise,Libelles,\n\t\tDetails_du_mouvement,Message) SELECT '\".$d0.\"','\".$d1.\"','\".$d3.\n\t\t\"','\".$mv.\"','\".$Dc . \"','\".$Dv .\n\t\t\"',\".$mo . \",'\".$data[4] . \"','\".$d8 .\n\t\t\"','\".$d9.\"','\".$d10 . \"';\";\n\t\t//echo 'Row :' .$row .\"<br/>\";\t\t\n\t\tMsg ($s) .\"<br/>\";\n\t\t//sExecSQL($l,$s, True);\n\t\t\n\t\t{//fill comptes name table\n\t\tif (trim($data[3])==$sNotDef ){//if 'Compte_partie_adverse' is empty do nothing\n\t\t }\n\t\t else{ //insert num and 'detail' value\n\t\t $s=\"INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n\t\t\t'\".trim($data[3]).\"', '';\n\t\t\t\";\n\t\t }\n\t\t//echo $s.\"<br/>\";\n\t\t//sExecSQL($l,$s, True);\n\t\t}\n\t\t}\n\t\t} // mv not empty, avoid to read an last empty line ?? ?\n\t }\n\t } // EOF\n\telse\n\t{ Msg(print_r(error_get_last()));\n\treturn -1;\n\t}\n fclose($handle);\n //msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "2fd1161836d73137f3b5df5bcbe0af33", "score": "0.61700386", "text": "function wpdm_import_category_csv_file()\n{\n global $wpdb;\n if (!isset($_GET['task']) || $_GET['task'] != 'wpdm-import-category-csv') return;\n $max_line_length = 10000;\n $source_file = $_FILES['csv']['tmp_name'];\n if (($handle = fopen(\"$source_file\", \"r\")) !== FALSE) {\n $columns = fgetcsv($handle, $max_line_length, \",\");\n foreach ($columns as &$column) {\n $column = str_replace(\".\", \"\", $column);\n }\n\n while (($data = fgetcsv($handle, $max_line_length, \",\")) !== FALSE) {\n while (count($data) < count($columns))\n array_push($data, NULL);\n //$query = \"$insert_query_prefix (\".join(\",\",quote_all_array($data)).\");\"; \n $values = quote_all_array($data);\n $drow = array_combine($columns, $values);\n $category_id = $drow['category_id'];\n unset($drow['category_id']);\n $drow['access'] = serialize(explode(\",\", $drow['access']));\n $cats[$category_id] = $drow;\n }\n fclose($handle);\n\n\n $categories = maybe_unserialize(get_option(\"_fm_categories\"));\n if (is_array($cats)) {\n $categories = array_merge($categories, $cats);\n update_option(\"_fm_categories\", $categories);\n }\n @unlink($source_file);\n }\n header(\"location: admin.php?page=file-manager/categories\");\n die();\n}", "title": "" }, { "docid": "390d176a7090d61c39933b27ba854405", "score": "0.6164021", "text": "private function csvField(string $value): string\n {\n if (str_contains($value, '\"'))\n $value = str_replace('\"', '\"\"', $value);\n if (str_contains($value, '\"') || str_contains($value, ','))\n $value = '\"' . $value . '\"';\n return $value;\n }", "title": "" }, { "docid": "55f21e5372f5ca60253d18a77d7049b3", "score": "0.6133552", "text": "function pushCsv($filename) {\n global $CSV;\n\t$string = implode(';', $CSV);\n\t$file = dirname(__FILE__) .'/' . $filename;\n\tif (!file_exists($file)) {\n $fp = fopen($file, \"w\");\n fclose($fp);\n }\n\tfile_put_contents($file, trim($string).PHP_EOL, FILE_APPEND);\n\t$CSV = array();\n}", "title": "" }, { "docid": "c4a41d941e90fdda6cd5d1078c5f374b", "score": "0.6116195", "text": "function update_csv(){\n $signals = fetch_csv();\n $csv = fopen(\"codes.csv\", \"w\") or die(\"Unable to open file!\");\n foreach ($signals as $key => $signal) {\n if ($signal['name'] == $_POST['name']) {\n $signal['name'] = $_POST['name'];\n $signal['on_code'] = $_POST['on_code'];\n $signal['off_code'] = $_POST['off_code'];\n $signal['place'] = $_POST['place'];\n $signal['on_time'] = $_POST['on_time'];\n $signal['off_time'] = $_POST['off_time'];\n $signal['status'] = $signal['status'];\n }\n $row = combined_string($signal);\n fwrite($csv, $row);\n }\n fclose($csv);\n }", "title": "" }, { "docid": "1bb3ce537a80f8edc54ba3673624e097", "score": "0.60988677", "text": "public function writeToCSV(&$csv,$delimiter = ';');", "title": "" }, { "docid": "d48d241ad421da5cf52e46a0d623a400", "score": "0.6078569", "text": "function fputcsv($filePointer,$dataArray,$delimiter=\",\",$enclosure=\"\\\"\"){\n // $filePointer = the file resource to write to\n // $dataArray = the data to write out\n // $delimeter = the field separator\n \n // Build the string\n $string = \"\";\n \n // for each array element, which represents a line in the csv file...\n// foreach($dataArray as $line){\n $line = $dataArray;\n \n // No leading delimiter\n $writeDelimiter = FALSE;\n \n foreach($line as $dataElement){\n // Replaces a double quote with two double quotes\n $dataElement=str_replace(\"\\\"\", \"\\\"\\\"\", $dataElement);\n \n // Adds a delimiter before each field (except the first)\n if($writeDelimiter) $string .= $delimiter;\n \n // Encloses each field with $enclosure and adds it to the string\n $string .= $enclosure . $dataElement . $enclosure;\n \n // Delimiters are used every time except the first.\n $writeDelimiter = TRUE;\n }\n // Append new line\n $string .= \"\\n\";\n \n// } // end foreach($dataArray as $line)\n \n // Write the string to the file\n fwrite($filePointer,$string);\n }", "title": "" }, { "docid": "ef7ade80ea8cd00ff4041a2645299ed7", "score": "0.60431856", "text": "function csv_insert_table($table_name,$tab,$dane,$from=1,$pk='',$__jrtrack='',$__jruser=1) {\r\n global $__pola,$__normalized_fields;\r\n if (!$__jrtrack) $__jrtrack=date(\"YmdHis\");\r\n\t$w=array();$wk=array(); #$w wartości $wk klucze\r\n\tforeach ($dane as $l=>$r) if ($l>=$from) {\r\n array_push($r,$__jrtrack);\r\n array_push($r,$__jruser?$__jruser:1);\r\n $wupt=array();\r\n\t\tforeach ($r as $k=>$v) {\r\n #print_r($__normalized_fields);die();\r\n #print_r($__pola);die();\r\n if ($pk) $pkn=array_search($pk,$__pola);\r\n #print_r($r);die(\"$pk==$pkn;\");\r\n \r\n if ($v==\"ND\") {\r\n \r\n }\r\n\t\t\tif (!in_array($v,array(\"NULL\",\"TRUE\",\"FALSE\"))) $r[$k]=\"'\".str_replace(\"'\",\"''\",trim($v)).\"'\";\r\n\t\t\t$wk[$k]='\"'.$__pola[$k].'\"';\r\n\t\t\t$wupt[$k]=$wk[$k].\"=\".$r[$k];\r\n\t\t}\r\n\t\tif ($pk) {\r\n array_push($w,\"UPDATE ipm.$table_name SET \".join(\",\",$wupt).\" WHERE \\\"$pk\\\"=\".$r[$pkn].\";\");\r\n\t\t}\r\n\t\tarray_push($w,\"INSERT INTO ipm.$table_name (\".join(\",\",$wk).\") VALUES (\".join(\",\",$r).\");\");\r\n\t}\r\n\treturn csv_sql_header(\"INSERT $table_name\").join(\"\\n\",$w);\r\n}", "title": "" }, { "docid": "93d757581c4cd5d15ac4bb6d88089738", "score": "0.6041296", "text": "static public function modifyCSV($file,$data,$lineIndex,$itemIndex){\n\t$input=readCSV($file);\n\t$input[0][$lineIndex][$itemIndex]=$data;\n\twriteCSV($file,$input);\n}", "title": "" }, { "docid": "4782c8801db88bb4508bc6ebeb194e28", "score": "0.60288024", "text": "function ReadCSVFileKEYTRADE($l, $f) {\n//read file and push into Extraits, .csv format\n//echo (\"<br/\");\n$row = 0;\n$sNotDef=\"\";//empty \nif (($handle=fopen($f, \"r\"))!=FALSE) {\n //echo ($f.\"<br/>\");\n //echo 'compte >' . $f .\"<br/>\" ;\n $d0=basename($f,'.csv' );\n //echo 'compte >' . $d0 .\"<br/>\" ;\n $d0= substr ( $d0 ,0 , 16 ) ;\n echo 'Fichier : ' . $f ; //.\"<br/>\" ;\n echo ', compte (extrait du nom de fichier): ' . $d0 .\"<br/>\" ;\n $d1='Keytrade';\n while (($data = fgetcsv($handle, 0, \";\")) !== FALSE) {\n $num = count($data);\n\t$row++;\n/*field name csv column name csv colum num\nNumero_de_compte ,0 // extract from full path file name\nNom_du_compte ,1 // 'keytrade'\nCompte_partie_adverse ,2 //compte 3\nNumero_de_mouvement ,3 //Extrait 0\nDate_comptable , 4 //format is 12.10.2016 d/m/y 1\nDate_valeur,5 //format is 12.10.2016 d/m/y 2\nMontant ,6 // Montant 5\nDevise ,7 // Devise 6\nLibelles ,8 //Description 4\nDetails_du_mouvement ,9\nMessage , 10\n\nNumero_de_compte extract from file name : MUST SAVE FILE WITH COMPTE AS NAME ! : \nBE87651156809394.CSV\n1234567890123456 16 LEFT CHAR\n*/\n\n\tif (trim($data[0])=='Extrait') { //msg(\"Data '\".$data[1] .\"' on row \" .$row.\" not valid, skipping...\");\t\t\n\t\t}\n\telse \t{\n\t\t$mv= trim($data[0]);\n//echo $mv .\"<br/>\" ;\t\t\n\t\tif ($mv !== $sNotDef) { //read 1 line too much ...?\n\t\t$d3=trim($data[3]);\n\t\tif (empty($data[1])) {$data[1]='01/01/1900';} else {}\n\t\tif (empty($data[2])) {$data[2]='01/01/1900';} else {}\n//echo $data[1].\"<br/>\" ;\n\t\t$Dc=date_create_from_format('d.m.Y', $data[1]);\n\t\t$Dv=date_create_from_format('d.m.Y', $data[2]);\n\n\t\t$Dc=date_format($Dc, 'Y-m-d');\n\t\t$Dv=date_format($Dv, 'Y-m-d');\n\necho $data[5].\"<br/>\" ;\t\t\n$mo= str_replace(\".\",\"\",$data[5]); // + 5.000,00 -> 5000,00\necho $mo.\"<br/>\" ;\n$mo= str_replace(\",\",\".\",$mo)+0; // + 5000,00 -> 5000.00\necho $mo.\"<br/>\" ;\n\n\t\t$d8 = mysqli_real_escape_string($l, trim($data[4]));\n\t\t$d9 = '';\n\t\t$d10 = '';\n\t\t//$d9 = mysqli_real_escape_string($l, trim($data[9]));\n\t\t//$d10 = mysqli_real_escape_string($l, trim( $data[10]));\n\t\t$s=\"INSERT IGNORE INTO Extraits (Numero_de_compte,Nom_du_compte,Compte_partie_adverse,\n\t\tNumero_de_mouvement ,Date_comptable,Date_valeur,\n\t\tMontant,Devise,Libelles,\n\t\tDetails_du_mouvement,Message) SELECT '\".$d0.\"','\".$d1.\"','\".$d3.\n\t\t\"','\".$mv.\"','\".$Dc . \"','\".$Dv .\n\t\t\"',\".$mo . \",'\".$data[6] . \"','\".$d8 .\n\t\t\"','\".$d9.\"','\".$d10 . \"';\";\n\t\t//echo 'Row :' .$row .\"<br/>\";\t\t\n\t\t//Msg ($s) .\"<br/>\";\n\t\tsExecSQL($l,$s, True);\n\t\t\n\t\t{//fill comptes name table\n\t\tif (trim($data[3])==$sNotDef ){//if 'Compte_partie_adverse' is empty do nothing\n\t\t }\n\t\t else{ //insert num and 'detail' value\n\t\t $s=\"INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n\t\t\t'\".trim($data[3]).\"', '';\n\t\t\t\";\n\t\t }\n\t\t//echo $s.\"<br/>\";\n\t\tsExecSQL($l,$s, True);\n\t\t}\n\t\t}\n\t\t} // mv not empty, avoid to read an last empty line ?? ?\n\t }\n\t } // EOF\n\telse\n\t{ Msg(print_r(error_get_last()));\n\treturn -1;\n\t}\n fclose($handle);\n //msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "a1d0e28f7b1d16e3032833fddfe08706", "score": "0.60137707", "text": "public function csv_push($file_name, $entry)\n {\n $row = array();\n foreach ($entry as $column) {\n if (is_object($column) && get_class($column) == \"DOMNodeList\")\n $column = $this->list_to_string($column);\n else if (is_array($column))\n $column = implode($this->info['list-separator'], $column);\n $row[] = $column;\n }\n $this->input[$file_name][] = implode($this->info[$file_name]['separator'], $row);\n }", "title": "" }, { "docid": "7e4558a0b90a9f3dcbc1c04c523b5cba", "score": "0.5984263", "text": "public function import_csv(){\r\n $update_records = $this->input->post('update_records');\r\n $filename\t\t= $_FILES[\"csv\"][\"tmp_name\"];\r\n\r\n if($_FILES[\"csv\"][\"size\"] > 0)\r\n {\r\n $file = fopen($filename, \"r\");\r\n\r\n for ($lines = 0; $data = fgetcsv($file,1000,\",\",'\"'); $lines++)\r\n {\r\n\r\n\r\n if ($lines == 0){\r\n \tif(sizeof($data)!=13){\r\n\t\t\t\t\t\tif(sizeof($data)<13){\r\n\t\t\t\t\t\t\tfclose($file);\r\n\t \t\t\t\t$this->session->set_flashdata('fail', 'Few columns are missing in uploaded file.');\r\n\t\t\t\t\t\t\tredirect(\"pieces/import\",'refresh');\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tfclose($file);\r\n\t \t\t\t\t$this->session->set_flashdata('fail', 'There are few extra columns are available in uploaded file.');\r\n\t\t\t\t\t\t\tredirect(\"pieces/import\",'refresh');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}else if(\r\n\t\t\t\t\t\t\t\t($data[0] != \"Code\") ||\r\n\t\t\t\t\t\t\t\t($data[1] != \"Name\") ||\r\n\t\t\t\t\t\t\t\t($data[2] != \"Hsn Sac Code\") ||\r\n\t\t\t\t\t\t\t\t($data[3] != \"Unit\") ||\r\n\t\t\t\t\t\t\t\t($data[4] != \"Size\") ||\r\n\t\t\t\t\t\t\t\t($data[5] != \"Cost\") ||\r\n\t\t\t\t\t\t\t\t($data[6] != \"Price\") ||\r\n\t\t\t\t\t\t\t\t($data[7] != \"Opening Qty\") ||\r\n\t\t\t\t\t\t\t\t($data[8] != \"Alert Quantity\") ||\r\n\t\t\t\t\t\t\t\t($data[9] != \"Details\") ||\r\n\t\t\t\t\t\t\t\t($data[10] != \"IGST\") ||\r\n\t\t\t\t\t\t\t\t($data[11] != \"CGST\") ||\r\n\t\t\t\t\t\t\t\t($data[12] != \"SGST\")\r\n\t\t\t\t\t\t\t){\r\n\r\n \t\t\t\tfclose($file);\r\n \t\t\t\t$this->session->set_flashdata('fail', 'File is not having proper format as per sample piece file.');\r\n\t\t\t\t\t\tredirect(\"pieces/import\",'refresh');\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n }\r\n\r\n if($data[10] == null || $data[10] == \"\"){\r\n \t$igst = 0;\r\n }else{\r\n \t$igst = $data[10];\r\n }\r\n\r\n\r\n if($data[11] == null || $data[11] == \"\"){\r\n \t$cgst = 0;\r\n }else{\r\n \t$cgst = $data[11];\r\n }\r\n\r\n\r\n if($data[12] == null || $data[12] == \"\"){\r\n \t$sgst = 0;\r\n }else{\r\n \t$sgst = $data[12];\r\n }\r\n\r\n\r\n $sql = \"INSERT INTO `pieces`(\r\n \t\t\t\t\t\t`code`,\r\n \t\t\t\t\t\t`name`,\r\n \t\t\t\t\t\t`hsn_sac_code`,\r\n \t\t\t\t\t\t`unit`,\r\n \t\t\t\t\t\t`size`,\r\n \t\t\t\t\t\t`cost`,\r\n \t\t\t\t\t\t`price`,\r\n \t\t\t\t\t\t`quantity`,\r\n \t\t\t\t\t\t`opening_stock`,\r\n \t\t\t\t\t\t`alert_quantity`,\r\n \t\t\t\t\t\t`details`,\r\n \t\t\t\t\t\t`igst`,\r\n \t\t\t\t\t\t`cgst`,\r\n \t\t\t\t\t\t`sgst`\r\n \t\t\t\t\t\t)\r\n \t\t\t\t\tVALUES (\r\n \t\t\t\t\t\t'\".\r\n \t\t\t\t\t\ttrim($data[0]).\"','\".\r\n \t\t\t\t\t\ttrim($data[1]).\"','\".\r\n \t\t\t\t\t\ttrim($data[2]).\"','\".\r\n \t\t\t\t\t\ttrim($data[3]).\"','\".\r\n \t\t\t\t\t\ttrim($data[4]).\"','\".\r\n \t\t\t\t\t\ttrim($data[5]).\"','\".\r\n \t\t\t\t\t\ttrim($data[6]).\"','\".\r\n \t\t\t\t\t\ttrim($data[7]).\"','\".\r\n \t\t\t\t\t\ttrim($data[7]).\"','\".\r\n \t\t\t\t\t\ttrim($data[8]).\"','\".\r\n \t\t\t\t\t\ttrim($data[9]).\"','\".\r\n \t\t\t\t\t\ttrim($igst).\"','\".\r\n \t\t\t\t\t\ttrim($cgst).\"','\".\r\n \t\t\t\t\t\ttrim($sgst).\"')\";\r\n $this->db->query($sql);\r\n if($id = $this->db->insert_id()){\r\n \t$this->pieces_model->insertOpeningStock($id,$data[7]);\r\n }else{\r\n \t$error = $this->db->error();\r\n\r\n\t\t\t\t\tif ($error['code'] == 1062) {\r\n\t\t\t\t\t\tif($update_records==\"yes\"){\r\n\t\t\t\t\t\t\t$piece = $this->pieces_model->getRecordByCode(trim($data[0]));\r\n\t\t\t\t\t\t\t$this->pieces_model->updateOpeningStock($piece->piece_id,trim($data[7]),$piece->quantity);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n }\r\n }\r\n fclose($file);\r\n $this->session->set_flashdata('success', 'Piecess are imported successfully.');\r\n\t\t\tredirect(\"pieces\",'refresh');\r\n\r\n\r\n }\r\n else{\r\n redirect(\"pieces/import\",'refresh');\r\n }\r\n redirect('pieces','refresh');\r\n\t}", "title": "" }, { "docid": "3d219bab80699cccf2eb998feda986b7", "score": "0.59714746", "text": "Function csv_bv($file, $seperator = ',', $enclose = '\"', $escape = '')\r\n\t{\r\n\r\n\t\t$this->mFldSeperator = $seperator;\r\n\t\t$this->mFldEnclosure = $enclose;\r\n\t\t$this->mFldEscapor = $escape;\r\n\r\n\t\t$this->mSkipEmptyRows = TRUE;\r\n\t\t$this->mTrimFields = TRUE;\r\n\t\t$this->htmlentity = true;\r\n\t\t$this->mRowCount = 0;\r\n\t\t$this->mSkippedRowCount = 0;\r\n\r\n\t\t$this->mRowSize = 4096;\r\n\r\n\t\t// Open file\r\n\t\t$this->mHandle = @fopen($file, \"r\") or trigger_error('Unable to open csv file', E_USER_ERROR);\r\n\t}", "title": "" }, { "docid": "540648950ce3901d117211a940c561ae", "score": "0.5970509", "text": "function csvupload() {\n //print_r($_POST); die; \n $this->data['welcome'] = $this;\n $per = $this->checkpermission($this->role_id, 'add');\n if ($per) {\n $content_title = $_POST['content_title'];\n $category = $_POST['category'];\n $keywords = $_POST['keyword'];\n $url = str_replace(\" \", \"%20\", $_POST['url']);\n $description = $_POST['description'];\n $rowID = $_POST['rowId'];\n if ($this->remoteFileExists($url)) {\n $videoFileSrcPath = $url;\n $videoFileExt = $this->_getFileExtensionUrl($videoFileSrcPath);\n $videoFileUniqName = uniqid() . \".\" . $videoFileExt;\n $post['source_url'] = $videoFileUniqName;\n $post['content_provider'] = 'selfvideo';\n $post['uid'] = $this->uid;\n $post['created'] = date('Y-m-d');\n $catId = $this->category_model->getCatId($category, $this->uid);\n if (in_array($videoFileExt, $this->allowedVideoExt)) {\n $fieDestPath = REAL_PATH . serverVideoRelPath . $videoFileUniqName;\n $videoresult = $this->_uploadFileCurl($videoFileSrcPath, $fieDestPath, $videoFileUniqName);\n if ($videoresult == '1') {\n $contentData = array();\n $contentData['content_title'] = isset($content_title) && $content_title != '' ? $content_title : 'content_title';\n $contentData['description'] = isset($description) && $description != '' ? $description : 'description';\n $contentData['type'] = 'CSV';\n $contentData['category'] = $catId;\n $contentData['uid'] = $this->uid;\n $contentData['filename'] = $videoFileUniqName;\n $contentData['relative_path'] = serverurl . $videoFileUniqName;\n $contentData['absolute_path'] = REAL_PATH . serverVideoRelPath . $videoFileUniqName;\n $contentData['minetype'] = \"video/\" . $videoFileExt;\n $contentData['type'] = $videoFileExt;\n $contentData['status'] = '1';\n $contentData['info'] = base64_encode($videoFileUniqName);\n $lastId = $this->videos_model->_saveVideo($contentData);\n\n //Insert keywords\n if (isset($keywords) && $keywords != '') {\n $this->videos_model->_setKeyword(str_replace(\"|\", \",\", $keywords), $lastId);\n }\n if ($lastId != '') {\n $message = $this->loadPo($this->config->item('success_file_upload'));\n $this->log($this->user, $message);\n //$data['message'] = $this->_successmsg($message);\n $data['message'] = 'success';\n $data['rowId'] = $rowID;\n }\n } else {\n $message = $this->loadPo($this->config->item('error_file_upload'));\n $this->log($this->user, $message);\n //$data['message'] = $this->_errormsg($message);\n $data['message'] = 'error';\n $data['rowId'] = $rowID;\n }\n } else {\n $message = $this->loadPo($this->config->item('error_file_format'));\n $this->log($this->user, $message);\n //$data['message'] = $this->_errormsg($message);\n $data['message'] = 'error';\n $data['rowId'] = $rowID;\n }\n } else {\n //$data['message'] = $this->_errormsg($this->loadPo($row['url'].$this->config->item('error_file_found')));\n $data['message'] = 'error';\n $data['rowId'] = $rowID;\n }\n echo json_encode($data);\n //$this->show_view('bulkupload', $this->data);\n } else {\n $this->session->set_flashdata('message', $this->_errormsg($this->loadPo($this->config->item('error_permission'))));\n redirect(base_url() . 'video');\n }\n }", "title": "" }, { "docid": "a07b4e269d4c47f756752fac825956c4", "score": "0.5967671", "text": "abstract protected function csvcolumns();", "title": "" }, { "docid": "045cd7949a4117abef67dd3ad9835661", "score": "0.5964585", "text": "function makeTableFromCSV()\r\n\t{\r\n\t\treturn $this->insertData();\r\n\t}", "title": "" }, { "docid": "43eef495f8e0cb7343fb86a01bd2d781", "score": "0.5962454", "text": "protected function __construct($path)\n {\n $this->csv = new \\stdClass;\n $this->csv->path = $path;\n // create de CSV pointer\n $fp = @fopen($this->csv->path, 'r') or die('The file cannot be opened');\n $i=0;// this is added to give IDs to the list that are not include, we will use it as PRIMARY key to fecht correct \n // data in case of duplicated items \n while (($row = fgetcsv($fp, 4096, ',', '\"')) !== false)\n {\n array_push($row,\"$i\"); // add the id to the data\n //$row = array_map(\"addslashes\", $row);\n $row = array_map(\"utf8_encode\", $row);\n // http://stackoverflow.com/questions/8882090/utf-8-problems-while-reading-csv-file-with-fgetcsv\n $this->csv->contact[] = array_combine(array(\"name\",\"telephone\",\"address\",\"id\"), $row);\n $i++;\n }\n // close file pointer\n fclose($fp);\n }", "title": "" }, { "docid": "54798fed4f927e1739e75ea4de6d96c0", "score": "0.596221", "text": "public function importCsv()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$csv = $app->input->get('csv', array(), 'array');\n\t\t$files = $app->input->files->get('csv', array(), 'array');\n\t\t$del = isset($csv['delimiter']) ? $csv['delimiter'] : ',';\n\t\t$model = $this->getModel('Items', 'ReditemModel');\n\n\t\tif ($model->importCsv($files['import'], $del))\n\t\t{\n\t\t\t$msg = JText::_('COM_REDITEM_ITEMS_CSV_IMPORT_SUCCESS');\n\t\t\t$type = 'message';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = JText::_('COM_REDITEM_ITEMS_CSV_IMPORT_FAIL');\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_reditem&view=items', false), $msg, $type);\n\t\t$this->redirect();\n\t}", "title": "" }, { "docid": "939c360af0fcae44c78caddc88102a2b", "score": "0.5958111", "text": "static function upload_and_analyses_csv($csv_file,$nb_rows_begin = 0,$nb_cols_begin = 0){\n $extension = file::file_infos($csv_file)->extension;\n if($extension != 'csv')\n throw new \\PersonalizeException(2110);\n if(!file::upload(TEMP_PATH,$csv_file,null,Log::get_id().'.csv'))\n throw new \\PersonalizeException(1110);\n $file_path = TEMP_PATH.Log::get_id().'.csv';\n $csv_object = new parseCSV($file_path);\n $datas = array();\n foreach(array_slice($csv_object->get_datas(),0,6) as $key=>$content)\n if($key >= $nb_rows_begin)\n foreach($content as $key2=>$content2)\n if($key2 >= $nb_cols_begin)\n $datas[$key][] = utf8_encode($content2);\n return $datas;\n }", "title": "" }, { "docid": "a62b51b691fcd372b90c51a5a9f275f3", "score": "0.5923411", "text": "function ReadCSVFileBELFIUS ($l, $f) {\n// read file and push into Extraits, .csv format\n$row = 0;\n$b_loop=TRUE; \n$sNotDef=\"nd\";\nif (($handle=fopen($f, \"r\"))!=FALSE) {\n echo ($f.\"<br/>\");\n while (($data = fgetcsv($handle, 0, \";\")) !== FALSE) {\n $num = count($data);//amt of columns, $data[x] where x = 0 -> $num\n\t/*Field REFNAME BELFIUS field desc ( col 0..13 )\n------------------------------------------------------------------------------------------------------\nNumero_de_compte ,0 Compte (0)\nNom_du_compte ,1\nCompte_partie_adverse ,2 Compte contrepartie (4) ! VOIR 'Nom contrepartie contient' (5)\nNumero_de_mouvement ,3 Numéro d'extrait (2)-Numéro de transaction (3) pad with 0 for sort ?\nDate_comptable , 4 // format is 13/03/2015 d/ m/ y Date de comptabilisation (1)\nDate_valeur,5 Date valeur (9)\nMontant ,6 Montant (10)\nDevise ,7 Devise (11)\nSEARCH Libelles ,8 Transaction (8)\nSEARCH Details_du_mouvement ,9 'Nom contrepartie contient'(5)+Rue et numéro(6)+Code postal et localité (7)\nSEARCH Message 10 'BIC' (12) et 'code pays' (13)\n\nNOTES --\n'Compte contrepartie' (4) et 'Nom contrepartie contient' (5) can be used to fill comptenames table\nNOT USED : */\n $row++;\n\t//echo \"<br> count data ==> \".$num;\n\t//echo \"<br>=> \".$row.\" \".$data[1].\" \".$data[2].\" \".$data[3].\" \".$data[4];\n if ($row<14) { // data starts a line 15\n //msg(\"row \". $row.\", data '\".$data[0].\" not valid, skipping...\");\n //msg(\"-\");\n }\n else {\n $b_loop=FALSE;\n //fill to get 00000_00000 as 'Mvmt' \n\t // if no data in Numéro d'extrait (2)-Numéro de transaction (3) , skip\n\t if ($data[2]=='') { \n\t //echo $data[2].\"<br/>\" ;\n\t echo \"<br> skipped ==> \".$data[2].$data[3];\n\t }\n\t else {\n\t\t\t\t// sept 2019 : mv=YEAR $Dc - Numéro d'extrait (2)-Numéro de transaction (3) !\n\t\t\t\t// ex.: 2019_00011_00014\n\t\t\t\t$Dc=date_create_from_format('j/m/Y', $data[1]);//d compta\n $Dv=date_create_from_format('j/m/Y', $data[9]);//d valeur\n $dc_dt= date_format($Dc, 'Y');\n $Dc=date_format($Dc, 'Y-m-d');\n $Dv=date_format($Dv, 'Y-m-d');\n\t\t\t\t$mv=$dc_dt.'_'.str_pad($data[2], 5, \"0\", STR_PAD_LEFT).'_'.str_pad($data[3], 5, \"0\", STR_PAD_LEFT); \n // OLD $mv\n //$mv= str_pad($data[2], 5, \"0\", STR_PAD_LEFT).'_'.str_pad($data[3], 5, \"0\", STR_PAD_LEFT); \n\t //echo \"<br> a==> \".$mv;\t\n\t // INSERT data \n if (empty($data[4])) {$data[4]=$sNotDef;} else {} //Compte contrepartie \n if (empty($data[5])) {$data[5]=$sNotDef;} else {} //Nom contrepartie contient\n\n $mo= str_replace(\",\",\".\",$data[10])+0; //montant\n //echo \"<br> ==> \".$Dv;\n $d8 = mysqli_real_escape_string($l, trim($data[8]));\n $d9 = mysqli_real_escape_string($l, trim($data[5]).trim($data[6]).trim($data[7]) );\n $d10 = mysqli_real_escape_string($l, trim( $data[12]).trim($data[13]));\n $s=\"INSERT IGNORE INTO Extraits\n (Numero_de_compte,Nom_du_compte,Compte_partie_adverse,Numero_de_mouvement ,Date_comptable,Date_valeur,Montant,Devise,Libelles,Details_du_mouvement,Message) SELECT\n '\".$data[0].\"', '\".$data[0].\"','\".$data[4].\"','\" .$mv.\"','\". $Dc . \"','\".$Dv . \"',\".$mo . \",'\".$data[11] . \"','\".$d8 . \"','\".$d9.\"','\".$d10 . \"';\";\n\n //echo \"<br> b==> \".$s; echo \"<br/>\"; echo \"<br/>\";\n sExecSQL($l,$s, True);\n\n \n if ($data[4]==$sNotDef) {\n }\n else{ \n $s=\"INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n '\".$data[4].\"', '\" . mysqli_real_escape_string($l,trim($data[5])) . \"';\n \";\n\t\t //echo $s;\n\t\t sExecSQL($l,$s, True);\n\t\t }\n }\n\t } //else\n } //while (($data = fgetcsv($handle, 0, \";\")) !== FALSE\n } //handle\n else { Msg(print_r(error_get_last()));\n return -1;\n }\nfclose($handle);\n//msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "cc380440181924374292f41f771303d8", "score": "0.5912092", "text": "function ReadCSVFileArgenta($l, $f) {\n// link, file , RABO .csv format\n// read file and push into Extraits\n/*\ndb Extraits fields names N Argenta FIELDSname \t\tcol.\n------------------------------------------------------------------------\nNumero_de_compte , 0\t PICK IN FIRST LINE, Col 1 ! na\nNom_du_compte , 1\t PICK IN FIRST LINE, col2 \tna\nCompte_partie_adverse ,2 Compte de contrepartie\t\t6\n\nNumero_de_mouvement , 3\tRéférence de l'opération 1\t \nDate_comptable , 4 \tDate d'opération\t\t5 \t\t\nDate_valeur, 5 Date valeur \t\t0\t \n\nMontant , 6\t Montant de l'opération\t\t3 \t\t\t3 \nDevise , 7\t Devise \t\t\t4\t \nLibelles , 8\t Description\t\t\t2 \t\n\nDetails_du_mouvement , 9\t Communication 1\t\t7\nMessage 10 Communication 2\t\t8 + 9\n\n\nUsed to populate Compte_Name:\n Compte de contrepartie 6\n Nom de la contrepartie 7\n */\necho \" > Reading \".$f ;\n$row = 0;\n$sNotDef=\"\";\nif (($handle=fopen($f, \"r\")) !== FALSE) { \n //echo ($f.\"<br/>\");\n while (($data = fgetcsv($handle, 0, \",\")) !== FALSE) {\n $num = count($data);\n\t$row++;\n\t/////////////////////////////////////////////////\n\t// dump data\n\t/////////////////////////////////////////////////\n\t{//dump data;\n\t\n\techo '<table id=\"t01\">';\n\t\n\t/*\n\tforeach ($data as $key => $value) {\n\t echo \"<tr>\";\n\t echo \"<td>\";\n\t echo $key;\n\t echo \"</td>\";\n\t echo \"<td>\";\n\t echo $value;\n\t echo \"</td>\";\n\t echo \"</tr>\";\n\t }\n\t echo '</table>';\n\t//end dump data;\n\t*/\n\t}\n\t//num compte on first line\n\tif ($row==1) {\n\t //echo \"line 1\";\n\t //echo (\"wrk with compte >\".$Numero_de_compte.\"<, >\".$Nom_du_compte.\"<\");\n\t }\n\t else\n\t { \n\t //echo \"read\" ;\n\t //if (substr($data[0],0,4)=='Date')\n\t //($row==2) {//data start on line 3}\n\t $Numero_de_compte=trim($data[0]);\n\t $Nom_du_compte=\"Argenta\"; // trim($data[1]); \n\t \n\t $Compte_partie_adverse=trim($data[8]);\n\t $Nom_partie_adverse= mysqli_real_escape_string($l,trim($data[9])); //trim($data[9]);\n\t \n\t //else { //read and insert data\n\t //echo (\"row \".$row.\"<br/>\");\n\t $Numero_de_mouvement= trim($data[3]);\n\t $Date_comptable=date_create_from_format('j-m-Y', trim($data[1]));\n\t $Date_valeur=date_create_from_format('j-m-Y', trim($data[2]));\n \n\t $Date_comptable=date_format($Date_comptable, 'Y-m-d');\n\t $Date_valeur=date_format($Date_valeur, 'Y-m-d');\n\t $Montant= str_replace(\".\",\"\",$data[5]);//MONTANT\n\t $Montant= str_replace(\",\",\".\",$Montant);//MONTANT\n\t\n\t $Devise=trim($data[6]);\n\t $Libelles=trim($data[7]); //'date de la transaction'\n\t \n\t $Details_du_mouvement=$Nom_partie_adverse;//\" \" ;// trim($data[10]);//nom de la contrepartie\n\t \n\t $Message = mysqli_real_escape_string($l, trim($data[10]));\n\t //echo $Message ;\n\t $Message= str_replace(\"'\",\" \",$Message);\n\t //echo $Message ;\n\t //$Message= str_replace(\"/\",\" \",$Message);\n\t //echo \" >>>>\" . $Message ;\n\n\t $s=\"INSERT IGNORE INTO Extraits (Numero_de_compte ,Nom_du_compte,Compte_partie_adverse ,\n\t Numero_de_mouvement ,Date_comptable ,Date_valeur,Montant ,\n\t Devise, Libelles ,Details_du_mouvement ,Message) \n\t SELECT \n\t '\".$Numero_de_compte.\"','$Nom_du_compte','$Compte_partie_adverse',\n\t '\".$Numero_de_mouvement.\"','\".$Date_comptable.\"','\".$Date_valeur.\"',\".$Montant.\",\n\t '\".$Devise.\"','\".$Libelles.\"','\".$Details_du_mouvement.\"','\".$Message.\"';\n\t \";\n\t //echo ($s);\n\t sExecSQL($l,$s, True);\n\t /////////////////////////////////////////////////\n\t // INTO CompteNames (Numero_de_compte,Compte_Name)\n\t /////////////////////////////////////////////////\n\n\t if (trim($data[8])==$sNotDef){ \n\t //echo \"skipped, no data Compte_partie_adverse\" ;\n\t }\n\t else {//compte adverse \n\t $s=\"\n\t DELETE FROM `CompteNames` WHERE \n\t Numero_de_compte LIKE '%\".$Compte_partie_adverse.\"%';\n\t \";\n\t //echo $s;\n\t //sExecSQL($l,$s, True);\n\t $s=\"\n\t INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n\t '\".$Compte_partie_adverse.\"', '\". $Nom_partie_adverse. \"';\n\t \";\n\t //echo $s;\n\t sExecSQL($l,$s, True);\n\t } //($data[4]==$sNotDef)\n\t \n\t \n\t //end else read and insert data\n\n\t}//end else row1 \n }//while read\n\t}//if (($handle=fopen($f, \"r\")) !== FALSE\nelse { Msg (\"File open fails\");\n Msg(print_r(error_get_last()));\n return -1;\n }\nfclose($handle);\n//msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "de2b5dbb92f20b58df251c51d12c34b0", "score": "0.58953786", "text": "public function import_from_csv($obj)\r\n {\r\n\r\n if(is_uploaded_file($_FILES[\"import_file\"][\"tmp_name\"])!=false)\r\n {\r\n $uri = $_FILES[\"import_file\"][\"tmp_name\"];\r\n }\r\n else\r\n {\r\n // nepovedl se uplolad\r\n die(\"Repository::import_from_csv(\\$obj): Import souboru \".$_FILES[\"import_file\"][\"tmp_name\"].\" se nezdaril!\");\r\n }\r\n\r\n\r\n if(!is_file($uri))die(\"Repository::import_from_csv(\\$obj): Soubor \\$uri=\\\"$uri\\\" neexistuje.\");\r\n if(!$soubor_link = fopen($uri,\"r\"))die(\"Repository::import_from_csv(\\$obj): Soubor \\$uri=\\\"$uri\\\" nelze otevrit pro cteni.\");\r\n $nacteno = fread($soubor_link,filesize($uri));\r\n fclose($soubor_link); \r\n $radky = explode(\"\\n\",$nacteno);\r\n $prvni = true;\r\n $pole = array(); \r\n $count = 0;\r\n foreach($radky as $radek)\r\n { \r\n if($radek==\"\") break;\r\n $pole = explode(\";\",str_replace(\"\\\"\",\"\",$radek));\r\n \r\n /*\r\n foreach($pole as $key => $value)\r\n {\r\n echo \"[$key] = $value <br>\";\r\n }\r\n */\r\n\r\n if(!$prvni)\r\n {\r\n //echo \"test, \";\r\n $obj->load($pole);\r\n $this->add_obj($obj);\r\n $count++;\r\n //echo $obj->to_html_string(); \r\n }\r\n else\r\n {\r\n $prvni = false;\r\n }\r\n }\r\n return $count;\r\n }", "title": "" }, { "docid": "c6d25fa87da2f1db9c23a5367e552bbd", "score": "0.5886483", "text": "function ReadCSVFileRabo($l, $f) {\n// link, file , RABO .csv format\n// read file and push into Extraits\n/*\nExtraits fields names N Rabo FIELDSname \t\tcol.\n------------------------------------------------------------------------\nNumero_de_compte , 0\t PICK IN FIRST LINE, Col 1 ! na\nNom_du_compte , 1\t\t\"RaboBank\" ?\nCompte_partie_adverse ,2 Compte de contrepartie\t\t6\n\nNumero_de_mouvement , 3\t* Nombre \t\t\t0\t \nDate_comptable , 4 \t* Date de la transaction\t1 \t\t\nDate_valeur, 5 Date valeur \t\t5\t \n\nMontant , 6\t Montant \t\t\t3 \nDevise , 7\t Devise \t\t\t4\t \nLibelles , 8\t Type de transaction \t\t2 \t\n\nDetails_du_mouvement , 9\t Communication partie 1\t\t8\nMessage 10 Communication partie 2 \t9\n \n \n Nom de la contrepartie 7 to be used to populate Compte_Name\n \n */\n//echo \" > Reading \".$f ;\n$row = 0;\n$sNotDef=\"\";\nif (($handle=fopen($f, \"r\")) !== FALSE) { \n //echo ($f.\"<br/>\");\n while (($data = fgetcsv($handle, 0, \";\")) !== FALSE) {\n $num = count($data);\n\t$row++;\n\t/////////////////////////////////////////////$d8////\n\t// dump data\n\t/////////////////////////////////////////////////\n\t{//dump data;\n\t/*\n\techo '<table id=\"t00\">';\n\tforeach ($data as $key => $value) {\n\t echo \"<tr>\";\n\t echo \"<td>\";\n\t echo $key;\n\t echo \"</td>\";\n\t echo \"<td>\";\n\t echo $value;\n\t echo \"</td>\";\n\t echo \"</tr>\";\n\t }\n\t echo '</table>';\n\t//end dump data;\n\t*/\n\t}\n\t//num compte on first line\n\tif ($row==1) {\n\t $NumCompte=$data[1];\n\t $NomDuCompte=\"Rabo \".$NumCompte; \n\t //echo (\"wrk with compte >\".$NumCompte.\"<, >\".$NomDuCompte.\"<\");\n\t }\n\t else\n\t {\n\t if (($data[0])=='Nombre'){ //($row==2) {//data start on line 3\n\t }\n\t else { //read and insert data\n\t //echo (\"row \".$row.\"<br/>\");\n\t $mv= $data[0];\n\t $Dc=date_create_from_format('j/m/Y', $data[1]);\n\t $Dv=date_create_from_format('j/m/Y', $data[5]);\n \n\t $Dc=date_format($Dc, 'Y-m-d');\n\t $Dv=date_format($Dv, 'Y-m-d');\n\t $mo= str_replace(\".\",\"\",$data[3]);//MONTANT\n\t $mo= str_replace(\",\",\".\",$mo);//MONTANT\n \n\t $d8 = mysqli_real_escape_string($l, trim($data[2]));\n\t $d9 = mysqli_real_escape_string($l, trim($data[8]));\n\t $d10 =\"_Rabo_\".mysqli_real_escape_string($l, trim($data[9]));\n \n\t $s=\"INSERT IGNORE INTO Extraits (Numero_de_compte ,Nom_du_compte,Compte_partie_adverse ,Numero_de_mouvement ,\n\t Date_comptable ,Date_valeur,Montant ,\n\t Devise, Libelles ,Details_du_mouvement ,Message) \n\t SELECT \n\t '\".$NumCompte.\"','\".$NomDuCompte.\"','\".$data[6] .\"','\".$mv.\"',\n\t '\".$Dc . \"','\".$Dv . \"',\".$mo . \",\n\t '\".$data[4].\"', '\".$d8.\"', '\".$d9.\"', '\".$d10.\"';\n\t \";\n\t //echo ($s);\n\t sExecSQL($l,$s, True);\n\t\n\t /////////////////////////////////////////////////\n\t // INTO CompteNames (Numero_de_compte,Compte_Name)\n\t /////////////////////////////////////////////////\n\t if (trim($data[6])==$sNotDef){ \n\t }\n\t else {//compte adverse \n\t $s=\"\n\t DELETE FROM `CompteNames` WHERE \n\t Numero_de_compte LIKE '%\".mysqli_real_escape_string($l,trim($data[6])).\"%';\n\t \";\n\t //echo $s;\n\t sExecSQL($l,$s, True);\n\t $s=\"\n\t INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n\t '\".mysqli_real_escape_string($l,trim($data[6])).\"', '\" . mysqli_real_escape_string($l,trim($data[7])) . \"';\n\t \";\n\t //echo $s;\n\t sExecSQL($l,$s, True);\n\t } //($data[4]==$sNotDef)\n\t } //end else read and insert data\n\n\t}//end else row1 \n }//while read\n\t}//if (($handle=fopen($f, \"r\")) !== FALSE\nelse { Msg (\"File open fails\");\n Msg(print_r(error_get_last()));\n return -1;\n }\nfclose($handle);\n//msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "812b143ef3ca381064c075e5b0fa2101", "score": "0.5869803", "text": "private function content_setCSV()\n {\n // #33336, 130529, dwildt, 3+\n $arr_return = $this->subpart_setSearchboxFilter();\n //$this->pObj->dev_var_dump( $arr_return );\n unset( $arr_return );\n // #33336, 130529, dwildt, 3+\n // Get the label of the subpart marker for the csv content\n $str_marker = $this->conf[ 'flexform.' ][ 'viewList.' ][ 'csvexport.' ][ 'template.' ][ 'marker' ];\n\n // DRS\n if ( $this->pObj->b_drs_templating || $this->pObj->b_drs_export )\n {\n $prompt = $str_marker . ' is used as template marker.';\n t3lib_div::devlog( '[INFO/TEMPLATING+EXPORT] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n // Get the csv content file\n $template_path = $this->conf[ 'flexform.' ][ 'viewList.' ][ 'csvexport.' ][ 'template.' ][ 'file' ];\n // Set the csv content\n // #42738, 121106, dwildt, 1-\n// $this->content = $this->pObj->cObj->fileResource( $template_path );\n // #42738, 121106, dwildt, 2+\n $template = $this->pObj->cObj->fileResource( $template_path );\n $this->content = $this->pObj->cObj->getSubpart( $template, $str_marker );\n\n\n // Die, if content is empty\n $this->content_dieIfEmpty( $str_marker );\n }", "title": "" }, { "docid": "b7827ad779bac2f51be3c9b938c6ceac", "score": "0.58686143", "text": "function generate_bulk_teacher_csv()\n {\n if ($this->session->userdata('principal_login') != 1)\n redirect(site_url('login'), 'refresh'); \n\n $file = fopen(\"uploads/bulk_teachers.csv\", \"w\");\n $line = array('Teacher Name', 'Tsc Number', 'Phone', 'Email', 'Address', 'Full / Part Time', 'Sex', 'Date Of Birth', 'Role');\n fputcsv($file, $line, ',');\n echo $file_path = base_url() . 'uploads/bulk_teachers.csv';\n }", "title": "" }, { "docid": "82454e9ef6f8801abf153d630d94e90c", "score": "0.5862639", "text": "private function importData()\n {\n // : Import Data\n $_file = dirname(__FILE__) . self::DS . $this->_datadir . self::DS . $this->_file;\n \n if (file_exists($_file)) {\n $_csvFile = new FileParser($_file);\n $_csvData = $_csvFile->parseFile();\n if ($_csvData) {\n foreach ($_csvData as $key => $value) {\n if ($key !== 0) {\n foreach ($value as $childKey => $childValue) {\n $this->_data[$key][$_csvData[0][$childKey]] = str_ireplace(\"'\", \"\", $childValue);\n }\n }\n }\n }\n if ($_csvData) {\n return $_csvData;\n }\n } else {\n $_errmsg = preg_replace(\"/%s/\", $_file, self::FILE_NOT_FOUND);\n throw new Exception(\"$_errmsg\\n\");\n }\n // : End\n }", "title": "" }, { "docid": "34e62d6a047fecae44b94cff98ad07f3", "score": "0.58579147", "text": "function write()\n {\n $fp = @fopen($this->csv->path, 'w') or die('The file cannot be opened');\n foreach($this->csv->contact as $contact)\n {\n array_pop($contact); // here we remove the added ID from the liste to keep the Original version \n $contact = array_map(\"utf8_decode\", $contact);\n fputcsv($fp, $contact);\n }\n fclose($fp);\n }", "title": "" }, { "docid": "bfb975d1a08df2e108c9922f5094fa79", "score": "0.5853852", "text": "function generate_bulk_student_csv($class_id = '', $section_id = '')\n {\n if ($this->session->userdata('principal_login') != 1)\n redirect(site_url('login'), 'refresh');\n\n $data['class_id'] = $class_id;\n $data['section_id'] = $section_id;\n $data['year'] = $this->db->get_where('settings', array('type'=>'running_year'))->row()->description;\n\n $file = fopen(\"uploads/bulk_student.csv\", \"w\");\n $line = array('NEMIS No.', 'Admission Number', 'Student Name', 'Parent Name', 'Parent Phone', 'Parent Email');\n fputcsv($file, $line, ',');\n echo $file_path = base_url() . 'uploads/bulk_student.csv';\n }", "title": "" }, { "docid": "e3881afd4e37bc534d1225d778929691", "score": "0.5847845", "text": "private function processCsv($fileLocation) {\n \n // parse the csv\n $csv = new parseCSV();\n $csv->auto($fileLocation);\n \n // check we have data\n if (count($csv->data) > 0) {\n $i = 1;\n foreach ($csv->data as $row) {\n // try processing the row\n try {\n // ignore the header\n if($i > 1) {\n // process the header\n if ($this->processRow($row)) {\n // successfully added event\n $this->successes[] = \"successfully added Event \".$row['Event Name'].\" (row \" . $i.\")\"; \n } else {\n // something went wrong\n $this->errors[] = \"row \" . $i . \" could not save event\";\n } \n } else {\n // somethings a bit wonky with the CSV parser..\n $i++;\n } \n } catch (Exception $e) {\n // add to the error array\n $this->errors[] = \"row \" . $i . \" skipped, because \" . $e->getMessage();\n }\n // bump counter\n $i++;\n }\n }\n }", "title": "" }, { "docid": "8190e3d6673388298ede59fa989e262b", "score": "0.58388764", "text": "public function addToFile($arr){\n $fp = fopen(\"Model/add.csv\",\"a\");\n\n fputcsv($fp,$arr);\n\n fclose($fp);\n }", "title": "" }, { "docid": "f251d880d3e929b7b9bba447a7e7bf2c", "score": "0.5837311", "text": "function csvToArray($filename = '', $delimiter = ',')\n {\n if (!file_exists($filename) || !is_readable($filename)) {\n return false;\n }\n\n $header = null;\n $data = array();\n\n if (($handle = fopen($filename, 'r')) !== false)\n {\n\n {\n\n while (($row = fgetcsv($handle, 1000, $delimiter)) !== false)\n {\n DB::table('csv_chart')->insert(\n array(\n 'LocalDate' => date('Y-m-d',strtotime($row[0])),\n 'LocalTime' => $row[1],\n 'MWAIT_BR_001_ACT' => $row[2],\n 'MWAIT_DS_001_ACT' => $row[3],\n 'MWCT_BR_001_ACT' => $row[4],\n 'MWCT_BR_002_ACT' => $row[5],\n 'MWCT_BR_003_ACT' => $row[6],\n 'MWCT_PR_001_ACT' => $row[7],\n 'MWCT_DS_001_ACT' => $row[8],\n 'MWCT_DS_002_ACT' => $row[9],\n 'MWCT_DS_003_ACT' => $row[10],\n 'MWCT_DS_004_ACT' => $row[11],\n 'MWCT_DS_005_ACT' => $row[12],\n 'MWCT_DS_006_ACT' => $row[13],\n 'MWFIT_BR_001_ACT' => $row[14],\n 'MWFIT_BR_002_ACT' => $row[15],\n 'MWFIT_BR_003_ACT' => $row[16],\n 'MWFIT_DS_001_ACT' => $row[17],\n 'MWFIT_DS_003_ACT' => $row[18],\n 'MWFIT_DS_004_ACT' => $row[19],\n 'MWFIT_DS_005_ACT' => $row[20],\n 'MWFIT_DS_006_ACT' => $row[21],\n 'MWFIT_DS_007_ACT' => $row[22],\n 'MWFIT_PR_001_ACT' => $row[23],\n 'MWPT_BR_001_ACT' => $row[24],\n 'MWPIT_BR_002_ACT' => $row[25],\n 'MWPT_DS_001_ACT' => $row[26],\n 'MWPIT_DS_002_ACT' => $row[27],\n 'MWPT_DS_003_ACT' => $row[28],\n 'MWPT_DS_004_ACT' => $row[29],\n 'MWPT_DS_005_ACT' => $row[30],\n 'MWPIT_DS_006_ACT' => $row[31],\n 'MWPT_DS_007_ACT' => $row[32],\n 'MWPT_DS_008_ACT' => $row[33],\n 'MWTT_BR_001_ACT' => $row[34],\n 'MWTT_DS_001_ACT' => $row[35],\n 'MWTT_DS_002_ACT' => $row[36],\n 'MWPMP_BR_002_ACT' => $row[37],\n 'MWPMP_DS_002_ACT' => $row[38],\n 'MWPMP_DS_004_ACT' => $row[39],\n 'MWOARO1_Recovery' => $row[40],\n 'MWOARO1_DrawDP' => $row[41],\n 'MWOARO1_FeedDP' => $row[42],\n 'MWOARO1_TMPRESS' => $row[43],\n 'MWOARO2_Recovery' => $row[44],\n 'MWOARO2_DrawDP' => $row[45],\n 'MWOARO2_FeedDP' => $row[46],\n 'MWOARO2_TMPRESS' => $row[47],\n 'MWRO_Recovery' => $row[48],\n 'MWRO_DP' => $row[49],\n )\n );\n\n if (!$header){\n $header = $row;\n\n\n }\n else{\n $data[] = array_combine($header, $row);\n }\n }\n\n\n }\n fclose($handle);\n }\n\n return $data;\n }", "title": "" }, { "docid": "da789a2b2a52049d36663328a66c0e7a", "score": "0.58141327", "text": "function setCSVFile($fileName){\r\n\t\t$this->CSVFileName = $fileName;\r\n\t}", "title": "" }, { "docid": "2e60cd6a4331df9aa05ca9b9333f9ae5", "score": "0.5798546", "text": "function writeCsv($csv){\n\trequire(\"config.php\");\n\techo $csv;\n \n\t$fp = fopen($csvPath, 'w');\n\tfwrite($fp, $csv);\n\tfclose($fp);\n}", "title": "" }, { "docid": "7a216880e1bb2fda2524f54aa7cdddc9", "score": "0.5798541", "text": "function addCsv($data_item) {\n global $CSV;\n if (is_array($data_item) === true) {\n foreach($data_item as $item) {\n array_push($CSV, $item);\n }\n }\n else {\n\t array_push($CSV, $data_item);\n }\n}", "title": "" }, { "docid": "6934d3b426d4891e03c31dcc9142f821", "score": "0.5795078", "text": "function getcsv($no_of_field_names)\r\n {\r\n $separate = '';\r\n\r\n\r\n // do the action for all field names as field name\r\n foreach ($no_of_field_names as $field_name)\r\n {\r\n\r\n echo strtoupper($separate . $field_name);\r\n\r\n //sepearte with the comma\r\n $separate = ',';\r\n }\r\n\r\n //make new row and line\r\n echo \"\\r\\n\";\r\n }", "title": "" }, { "docid": "d04e0840f17562c0da62c746e925e4bd", "score": "0.5789051", "text": "private function startImport(){\n while (($data = fgetcsv($this->fileHandle, 0, \",\")) !== FALSE) {\n \n // Save Headers in the first row\n if($this->currentImportingRow==0 && $this->useHeaderAsFieldNames){\n $this->headerArray = $data;\n }else{\n // Process data rows\n for($n=0;$n<count($data);$n++){\n $sql = 'INSERT INTO '.$this->tableName.' ';\n $sql .= $this->insertSQLHeaderNames();\n $sql .= 'VALUES ';\n $sql .= $this->insertSQLDataValues($data);\n \n $status = $this->mysqlConnection->query($sql);\n if(!$status){\n echo \"Failed On: \".$sql.\"\\n\";\n if($this->stopOnError)\n exit;\n }\n }\n \n }\n \n $this->currentImportingRow++;\n }\n }", "title": "" }, { "docid": "1f033c30fcb37e53c78fea2639b3a53a", "score": "0.57830197", "text": "function str_putcsv($input, $delimiter = ',', $enclosure = '\"'){\n $fp = fopen('php://temp', 'r+');\n // ... write the $input array to the \"file\" using fputcsv()...\n fputcsv($fp, $input, $delimiter, $enclosure);\n // ... rewind the \"file\" so we can read what we just wrote...\n rewind($fp);\n // ... read the entire line into a variable...\n $data1 = fread($fp, 1048576);\n // ... close the \"file\"...\n fclose($fp);\n // ... and return the $data to the caller, with the trailing newline from fgets() removed.\n return rtrim($data1, '\\n');\n }", "title": "" }, { "docid": "42d1fb9f15d53fb875ec94c1a403ac35", "score": "0.5782732", "text": "public function importCsv($csv_path, $options = array()){\n extract($options);\n $pdo = $this->db;\n if (($csv_handle = fopen($csv_path, \"r\")) === FALSE)\n throw new Exception('Cannot open CSV file');\n\n if(!$delimiter)\n $delimiter = \"\\t\";\n\n if(!$table)\n $table = preg_replace(\"/[^A-Z0-9]/i\", '', basename($csv_path));\n\n if(!$fields){\n $fields = array_map(function ($field){\n return strtolower(preg_replace(\"/[^A-Z0-9]/i\", '', $field));\n }, fgetcsv($csv_handle, 0, $delimiter));\n }\n\n $create_fields_str = join(', ', array_map(function ($field){\n return \"$field TEXT NULL\";\n }, $fields));\n\n $pdo->beginTransaction();\n\n $create_table_sql = \"CREATE TABLE IF NOT EXISTS $table ($create_fields_str)\";\n $pdo->exec($create_table_sql);\n\n $insert_fields_str = join(', ', $fields);\n $insert_values_str = join(', ', array_fill(0, count($fields), '?'));\n $insert_sql = \"INSERT INTO $table ($insert_fields_str) VALUES ($insert_values_str)\";\n $insert_sth = $pdo->prepare($insert_sql);\n\n $inserted_rows = 0;\n while (($data = fgetcsv($csv_handle, 0, $delimiter)) !== FALSE) {\n $insert_sth->execute($data);\n $inserted_rows++;\n }\n\n $pdo->commit();\n\n fclose($csv_handle);\n $this->log(\"imported $dbTable finished.\".count($db[$dbTable]). \"lines created\");\n return array(\n 'table' => $table,\n 'fields' => $fields,\n 'insert' => $insert_sth,\n 'inserted_rows' => $inserted_rows\n );\n }", "title": "" }, { "docid": "06b5b27a969f941d40f1d76ba3d3dac4", "score": "0.57767594", "text": "function upload_from_csv( string $file_path, string $import_group ) : string\n{\n // Read in the CSV as an associative array.\n $csv = array_map( 'str_getcsv', file( $file_path, FILE_SKIP_EMPTY_LINES ) );\n $keys = array_shift( $csv );\n $results = '';\n\n foreach ( $csv as $i => $row ) {\n $csv[$i] = array_combine( $keys, $row );\n }\n\n $current_row = 0;\n\n foreach ( $csv as $row ) {\n $current_row ++;\n // Checks to make sure every email address is valid.\n if ( !is_email( $row['OPERATOR_EMAIL'] ) ) {\n $results .= \"Line \" . $current_row . \" \" . $row['OPERATOR_EMAIL'] . \" email not vaild\" . \"\\n\";\n continue;\n }\n\n // Checks to make sure the user does not already exist in WordPress\n if ( get_user_by('email', $row['OPERATOR_EMAIL'] ) ) {\n $results .= \"Line \". $current_row . \" This user already exist with the email: \" . $row['OPERATOR_EMAIL'] . \"\\n\";\n continue;\n }\n\n //Gets BE Brand Abbreviation\n $be_brand_abbr = find_be_brand_abbr( $row['SUB_SEGMENT'] );\n\n // any user without valid operator title can not be uploaded\n if ( !$be_brand_abbr ) {\n $results .= \"User has invalid sub segment and no Brand Abbr. was added\" . $current_row . \"\\n\";\n continue;\n }\n\n //Checks to make sure all operator titles are valid\n $valid_operator_title = confirm_operator_title( $row['OPERATOR_TITLE']);\n\n // any user without valid operator title can not be uploaded\n if ( !$valid_operator_title ) {\n $results .= \"Line \". $current_row . \" This user's operator title is not valid \\n\";\n continue;\n }\n\n // Insert the user account\n $user_id = insert_user(\n $row['OPERATOR_FIRST_NAME'],\n $row['OPERATOR_LAST_NAME'],\n $row['OPERATOR_EMAIL'],\n );\n\n if ( !$user_id ) {\n $results .= \"User unable to be added on line\" . $current_row . \"\\n\";\n continue;\n }\n\n add_user_meta(\n $user_id,\n \"operator_business_name\",\n $row['OPERATOR_BUSINESS_NAME'],\n false\n );\n add_user_meta(\n $user_id,\n \"operator_address_street\",\n $row['OPERATOR_ADDRESS_STREET'],\n false\n );\n add_user_meta(\n $user_id,\n \"operator_address_city\",\n $row['OPERATOR_ADDRESS_CITY'],\n false\n );\n add_user_meta(\n $user_id,\n \"operator_address_state\",\n $row['OPERATOR_ADDRESS_STATE'],\n false\n );\n add_user_meta(\n $user_id,\n \"operator_address_postalcode\",\n $row['OPERATOR_ADDRESS_POSTALCODE'],\n false\n );\n add_user_meta(\n $user_id,\n \"operator_phone\",\n $row['OPERATOR_PHONE'],\n false\n );\n add_user_meta(\n $user_id,\n \"date_operator_self_qualified\",\n $row['DATE_OPERATOR_SELF_QUALIFIED'],\n false\n );\n add_user_meta(\n $user_id,\n \"date_fsr_verified\",\n $row['DATE_FSR_VERIFIED'],\n false\n );\n add_user_meta(\n $user_id,\n \"activation_code\",\n generate_activation_code( ),\n false\n );\n add_user_meta(\n $user_id,\n \"import_group\",\n $import_group,\n false\n );\n add_user_meta(\n $user_id,\n \"operator_fsr_id\",\n $row['OPERATOR_FSR_ID'],\n false\n );\n add_user_meta(\n $user_id,\n \"segment\",\n $row['SEGMENT'],\n false\n );\n add_user_meta(\n $user_id,\n \"sub_segment\",\n $row['SUB_SEGMENT'],\n false\n );\n add_user_meta(\n $user_id,\n \"operator_title\",\n $row['OPERATOR_TITLE'],\n false\n );\n add_user_meta(\n $user_id,\n \"be_brand_abbr\",\n $be_brand_abbr,\n false\n );\n }\n\n $results = \"Processed \" . $current_row . \" rows.\\n\" . $results;\n\n return $results;\n}", "title": "" }, { "docid": "52b4164e349b11f9b84e66444f7f6a36", "score": "0.57738495", "text": "public function setCsvLineNo($lineNo);", "title": "" }, { "docid": "4d587c5b13b7b9b1fab8deb661820723", "score": "0.57691205", "text": "private function saveInDB(array $csvValue)\n {\n CustomerInformation::insert($csvValue);\n }", "title": "" }, { "docid": "756b0e84ab0d6f644c48d76583ddd2c3", "score": "0.57686603", "text": "public function setColumns(){\n\t\tmb_convert_variables(\"SJIS-WIN\",\"utf-8\",$this->columns);\n\t\tif(!file_exists($this->targetCSV)){\n\t\t\t$results=implode(\",\",$this->columns).\"\\n\";\n\t\t\t$fh=fopen($this->targetCSV,\"w\");\n\t\t\tflock($fh,LOCK_EX);\n\t\t\tfputs($fh,$results);\n\t\t\tflock($fh,LOCK_UN);\n\t\t\tfclose($fh);\n\t\t}\n\t}", "title": "" }, { "docid": "9ca032e640668f1a004f6aa811c32957", "score": "0.5751893", "text": "private function importCsv()\n {\n if(($handle = fopen($this->config->filepath, \"r\")) !== false) {\n\n while (($data = fgetcsv($handle, \",\")) !== false) {\n array_push($this->arr, $data);\n }\n fclose($handle);\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1c7b648fea094218208106c03a0c533f", "score": "0.5745466", "text": "function addProductsToDatabase()\n{\n\n /*$dir=\"finalReadyProducts\";\n if (is_dir($dir)){\n if ($dh = opendir($dir)){\n while (($file = readdir($dh)) !== false){\n $info = pathinfo($file);\n if($info[\"extension\"]==\"csv\")\n {\n echo \"<h1>filename:\" . $file . \"<br></h1>\";\n fillData($dir.\"//\".$file);\n\n }\n }\n closedir($dh);\n }\n }*/\n fillData(\"productReadyNewToday.csv\");\n}", "title": "" }, { "docid": "7a59c52eba851932a2376ca46decf31f", "score": "0.5739489", "text": "function ReadCSVFileING($l, $f) {//reference csv for this applic !\n//read file and push into Extraits, ING .csv format\n//echo (\"<br/\");\n\n\n//date is text, left aligned dd/mm/yyyy : 03/07/2017\n//dc $data[4]\n//dv $data[5]\n// DateTime date_create_from_format ( string $format , string $time [, DateTimeZone $timezone ] )\n\n\n$row = 0;\n$sNotDef=\"\";//empty \nif (($handle=fopen($f, \"r\"))!=FALSE) {\n echo ($f.\"<br/>\");\n while (($data = fgetcsv($handle, 0, \";\")) !== FALSE) {\n $num = count($data);\n\t$row++;\n /*\nNumero_de_compte ,0 //compte Source\nNom_du_compte ,1 //Nom\nCompte_partie_adverse ,2 //compte Cible\nNumero_de_mouvement ,3 //Mvmt\nDate_comptable , 4 //format is 13/03/2015 d/ m/ y\nDate_valeur,5\nMontant ,6\nDevise ,7\nLibelles ,8\nDetails_du_mouvement ,9\nMessage , 10\n */\n\tif ($data[1]=='Nom du compte') \t{ //msg(\"Data '\".$data[1] .\"' on row \" .$row.\" not valid, skipping...\");\t\t\n\t\t}\n\telse \t{\n\t\tif (empty($data[4])) {$data[4]='01/01/1900';} else {}\n\t\t//if (empty($data[5])) {$data[5]='01/01/1900';} else {}\n\t\tif (empty($data[5])) {$data[5]=$data[4];} else {} //if not set, use Dv\n\t\t\n\t\t$Dc=date_create_from_format('j/m/Y', $data[4]); // from str be format, return datetime object\n\t\t$Dv=date_create_from_format('j/m/Y', $data[5]);\n\t\t\n\t\t//Numero_de_mouvement= concat(EXTRACT(YEAR FROM Date_comptable) , LPAD (Numero_de_mouvement,4,'0') )\n\t\t//create mvmy YYYYmmm where mmm is left padded movement\n\t\t// was $mv= $data[3]+0;\n\t\t\n\t\t//$mv=date(\"Y\",strtotime($data[4])).str_pad($data[3],4,'0',STR_PAD_LEFT ) ;\n\t\t//return object : date_create_from_format (\"d/m/Y\", $data[4] ) \n\t\t// strtotime read ONLY mm-dd-yyyy !!\n\n\t$dc_dt= date_create_from_format ( 'j/m/Y', $data[4] );\n\t// create mvt = 'année numero de mouvement' : YYYYnnnn\n\t$mv=date(\"Y\", date_timestamp_get($dc_dt) ).str_pad($data[3],4,'0',STR_PAD_LEFT ) ;\n\t$Dc=date_format($Dc, 'Y-m-d'); //output str US fmt from datetime object \n\t$Dv=date_format($Dv, 'Y-m-d');\n\n// ING send msg as only Dc, empty value, no currency\nif ( IsNullOrEmptyString($data[6]) )\n{\t$mo=0;\n}\nelse\n{\t$mo= str_replace(\",\",\".\",$data[6])+0;\n}\n\n\t\t$d8 = mysqli_real_escape_string($l, trim($data[8]));\n\t\t$d9 = mysqli_real_escape_string($l, trim($data[9]));\n\t\t$d10 = mysqli_real_escape_string($l, trim( $data[10]));\n\t\t$s=\"INSERT IGNORE INTO Extraits (Numero_de_compte,Nom_du_compte,Compte_partie_adverse,Numero_de_mouvement ,Date_comptable,Date_valeur,Montant,Devise,Libelles,Details_du_mouvement,Message) SELECT '\".$data[0].\"','\".$data[1].\"','\".$data[2].\"',\".$mv.\",'\".$Dc . \"','\".$Dv . \"',\".$mo . \",'\".$data[7] . \"','\".$d8 . \"','\".$d9.\"','\".$d10 . \"';\";\n\t\t//Msg ($s);\n\t\tsExecSQL($l,$s, True);\n\t\t//fill comptes name table\n\t\tif (trim($data[2])==$sNotDef ){//if 'Compte_partie_adverse' is empty do nothing\n\t\t }\n\t\t else{ //insert num and 'detail' value\n\t\t $s=\"INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n\t\t\t'\".$data[2].\"', '\" . mysqli_real_escape_string($l,$d9).\"';\n\t\t\t\";\n\t\t }\n\t\t//echo $s.\"<br/>\";\n\t\tsExecSQL($l,$s, True);\n\t\t}\n\t }\n\t }\n\telse\n\t{Msg(print_r(error_get_last()));\n\treturn -1;\n\t}\n fclose($handle);\n //msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "c07cf644241efbc1631d7718c7189e48", "score": "0.57380897", "text": "public function addRow($data, $delimiter = \",\", $enclosure = '\"') {\n\t\tif ($this->autoSave == TRUE) {\n\t\t\tif (fputcsv($this->handle, $data, $delimiter, $enclosure) or die ('Error writing to file: '. $this->file_name));\t\t\n\t\t} else {\n\t\t\tforeach ($data AS $string) {\n\t\t\t\t$this->fileString .= $string;\n\t\t\t}\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "40fea7ef144d4911add36eb1b63bbe86", "score": "0.573803", "text": "public function actionFile()\n\t{\n\n\t\t$uploadedFile = CUploadedFile::getInstanceByName(\"import_file\");\n\t\tif (isset($uploadedFile)) {\n\t\t\techo \"Configure the date and IP\";\n\t\t\t$csvFile = fopen($uploadedFile->tempName, \"r\");\n\t\t\t$headers = fgetcsv($csvFile);\n\t\t\t$isFirstRow = true;\n\t\t\twhile (!feof($csvFile)) {\n\t\t\t\tif ($isFirstRow) {\n\t\t\t\t\t$isFirstRow = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}else{\n\t\t\t\t\t/*get out if empty!*/\n\t\t\t\t\t$curRow = fgetcsv($csvFile);\n\t\t\t\t\t$curRow = preg_replace(\"/\\r(?!\\n)/\", '', $curRow);\n\t\t\t\t\tif (empty($curRow)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$processData = array_flip($headers);\n\t\t\t\t\t$counter = 0;\n\t\t\t\t\tforeach ($processData as $key => $value) {\n\t\t\t\t\t\t$processData[$key] = $curRow[$value];\n\t\t\t\t\t}\n\t\t\t\t\t$processData = array_map('utf8_encode', $processData);\n\t\t\t\t\t$newRecord = new Records(\"old_file\");\n\t\t\t\t\t$newRecord->account_id = intval($uploadedFile->getName());\n\t\t\t\t\t$newRecord->claimData = json_encode($processData);\n\t\t\t\t\t$newRecord->ip_address = $curRow[2];//for now\n\t\t\t\t\t$dt = date_create_from_format(\"m/d/Y H:i\",$curRow[1]);\n\t\t\t\t\t// $newRecord->date_created = $dt->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t// $newRecord->date_updated = $dt->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t$newRecord->date_created = $dt->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t$newRecord->date_updated = $dt->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t$newRecord->other_information = \"none\";\n\t\t\t\t\tif (!$newRecord->save()) {\n\t\t\t\t\t\tYii::app()->user->setFlash('error', CHtml::errorSummary($newRecord));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tYii::app()->user->setFlash('success', '<strong>Well done!</strong> Data imported.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t$this->render(\"import\");\n\t}", "title": "" }, { "docid": "d842b1d56a58b40027b24bfcaa16573a", "score": "0.5737649", "text": "public function read_csv()\n\t\t{\n\t\t\t$row = 1;\n\t\t\t/*\n\t\t\t * \t\t\tif (($handle = fopen(\"collegenames.csv\", \"r\")) !== FALSE) \n\t\t\t * \n\t\t\t * \t\t\tif (($handle = fopen(\"students2010.csv\", \"r\")) !== FALSE) \n\t\t\t * \n\t\t\t * \t\t\tif (($handle = fopen(\"students2011.csv\", \"r\")) !== FALSE) \n\t\t\t * \n\t\t\t * \t\t\tif (($handle = fopen(\"finances2010.csv\", \"r\")) !== FALSE) \n\t\t\t * \n\t\t\t * \t\t\tif (($handle = fopen(\"finances2011.csv\", \"r\")) !== FALSE) \n\t\t\t * \n\t\t\t */\n\t\t\tif (($handle = fopen(\"enrollment_2010.csv\", \"r\")) !== FALSE) \n\t\t\t{\n\t\t\t while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) \n\t\t\t {\n\t\t\t $num = count($data);\n\t\t\t \n\t\t\t if($row == 1) \n\t\t\t\t\t{\n\t\t\t\t\t\t$field_names = $this->create_field_names($data);\n\t\t\t\t\t\t\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$records[] = $this->create_record($data, $field_names);\t\n\t\t\t\t\t}\n\t\t\t $row++;\n\t\t\t /*for ($c=0; $c < $num; $c++) {\n\t\t\t echo $data[$c] . \"<br />\\n\";\n\t\t\t }*/\n\t\t\t }\n\t\t\t fclose($handle);\n\t\t\t\tdatabase::loadIntoTable($records);\n\t\t\t\t//print_r($records);\n\t\t\t\t/*foreach($records as $record)\n\t\t\t\t{\n\t\t\t\t\tforeach($records as $label => $value) \n\t\t\t\t\t{\n\t\t\t\t\t\techo $label . ': ' . $value . '</br>';\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t\t$this->writeCSV($records);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "24cbd36875a32e31bad72bb118154e10", "score": "0.57340986", "text": "private function importData()\n {\n $return = true;\n $fileData = array_map('str_getcsv', file(_PS_MODULE_DIR_ . 'dashnews/backup/backup.csv'));\n\n $count = (int)$fileData[0][0];\n $currentLine = 1;\n\n $db = Db::getInstance();\n for ($counter = 0; $counter < $count; $counter++) {\n $tableName = $fileData[$currentLine][0];\n $currentLine++;\n $numberOfRows = $fileData[$currentLine][0];\n\n $currentLine++;\n $fields = $fileData[$currentLine];\n $currentLine++;\n\n for ($j = 0; $j < $numberOfRows; $j++) {\n $data = array();\n for ($r = 0; $r < count($fields); $r++) {\n $data[$fields[$r]] = $fileData[$currentLine][$r];\n }\n $currentLine++;\n $return &= $db->insert($tableName, $data);\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "154894ce24909794ae5c7089147ffe68", "score": "0.5704122", "text": "public static function csvImportImportLine($line, &$context) {\n\n $context['results']['rows_imported']++;\n $line = array_map('base64_decode', $line);\n\n $context['message'] = t('Importing row !c', ['!c' => $context['results']['rows_imported']]);\n\n $context['message'] = t('Importing %title', ['%title' => $line[2]]);\n\n if ($context['results']['rows_imported'] > 1) {\n\n \\Drupal::database()->insert('myusers')\n ->fields(['name'])\n ->values(['name' => $line[0]])\n ->execute();\n\n }\n\n if ($line[1] == 'ROW' && $line[2] == 'FAILS') {\n $context['results']['failed_rows'][] = $line;\n }\n }", "title": "" }, { "docid": "99eb4f978af561fd09df626511bea0b0", "score": "0.57016075", "text": "function writeCSVLine(SplFileObject $file, string ...$cols)\n{\n $cleanWQuotes = array_map(function ($col) {\n return str_replace([\"\\n\",'\\\\','\"'], ['\\\\n','\\\\\\\\','\\\\\"'], $col);\n }, $cols);\n $line = '\"' . implode('\",\"', $cleanWQuotes) . '\"' . \"\\n\";\n $file->fwrite($line);\n}", "title": "" }, { "docid": "2be57bf99bbf55e611bdedf19eee712d", "score": "0.5684917", "text": "function ReadCSVFileBNP($l, $f) {\n\n$DODEBUG=FALSE;\n//$DODEBUG=TRUE;\nif ($DODEBUG) { echo \"debug \"; }\n// link, file , BNP .csv format\n// read file and push into Extraits\n/* UPDATED 29 03 2017 réapparition de 'CONTREPARTIE DE LA TRANSACTION'\n/* UPDATED 04 12 2017 montant est un vrai chiffre\n\nExtraits fields names table BNP FIELDSname col number from 0 ( in Calc)\n\nNumero_de_compte ,0\t\tNUMERO DE COMPTE 7 (H)\nNom_du_compte ,1 -\nCompte_partie_adverse ,2 CONTREPARTIE DE LA TRANSACTION 5 (F)\nNumero_de_mouvement ,3\t\tNuméro de séquence 0 (A)\nDate_comptable , 4 \t\tDate d'exécution 1 (B) // 13/03/2015 d/ m/ y\t\t\n \nDate_valeur,5\t\t\tDATE VALEUR 2 (C)\nMontant ,6\t\t MONTANT 3 (D) 1.216,72 !\nDevise ,7\t\t\tDEVISE DU COMPTE 4 (E)\nLibelles ,8\t\t \tDétails 6 (G) // can be num compte OR msg as \"FRAIS MENSUELS D'EQUIPEMENT\" \nDetails_du_mouvement ,9\t\t \nMessage 10 -\n */\n//echo \" > Reading \".$f ;\n$row = 0;\n$sNotDef=\"\";\nif (($handle=fopen($f, \"r\")) !== FALSE) { \n // echo 'File: ' . ($f.\"<br/>\");\n while (($data = fgetcsv($handle, 0, \";\")) !== FALSE) {\n $num = count($data);\n // alert if change of nbr of rcolumns!\n $ColCount=8;\n if ($num!=$ColCount) { Msg (\"CSV: Column count has changed: was \".$ColCount.\", is \".$num); return -1;\n }\n else {\n\t$row++; //echo \"<br> count data ==> \".$num;\n\t\n\t{ // show READ LINE\n\tif ($DODEBUG) { echo \"<br>READ LINE =======: <br>=> \".$row.\" / \".$data[0].\" / \".$data[1].\" / \".$data[2].\" / \".$data[3].\" / \".$data[4].\" / \".$data[5];\t}\n\t}\n\tif (strlen(trim($data[0]))>9) { // skip column header 'Nº de séquence' msg(\"Data >\".$data[0] .\"< on row \" .$row.\" not valid, skipping...\");\n\tif ($DODEBUG) { echo \" ## SKIPPED\";echo \"=======\"; }\n\t}\n\telse { \n\tif ($DODEBUG) { echo \" ## READ\";echo \"=======\"; }\n\t if (trim($data[6])==''){echo ' empty line '.$Numero_de_mouvement; //do nothing if no data on Numero_de_compte:last empty line \n\t }\n\t else { //read and insert data\n\t $Numero_de_mouvement= $data[0];//Numéro de séquence\n\t if (strlen($Numero_de_mouvement)<6) {// skip if no seq nbr : 'YYYY-' \n\t //echo ' skipped '.$Numero_de_mouvement. \"<br/>\"; \n\t } \n\t else {\n\t { /* echo line \n\t echo 'row '. $row . \"<br/>\";\n\t echo $data[1] . \"<br/>\";\n\t echo '>>'. $data[0] . \"<br/>\";\n\t echo $data[1] . \"<br/>\";\n\t echo $data[2] . \"<br/>\";\n\t */ }\n\t $Date_comptable=date_create_from_format('j/m/Y', $data[2]);//DATE VALEUR\n\t $Date_valeur=date_create_from_format('j/m/Y', $data[1]);//Date d'exécution\n\t $Nom_du_compte=''; //$data[7]\n\n\t $Date_comptable=date_format($Date_comptable, 'Y-m-d');//date_format($Date_comptable, 'Y-m-d');\n\t $Date_valeur=date_format($Date_valeur, 'Y-m-d');\n\t\n\t $Montant= $data[3];//MONTANT 1.216,72 \n\t /*\n\t $Montant= str_replace(\".\",\"\",$data[3]);//MONTANT 1.216,72 \n\t $Montant= str_replace(\",\",\".\",$Montant);//MONTANT 1.216,72 \n\t */\n\t\n\t //echo $Numero_de_mouvement . \"<br/>\";\t \n\t $Devise=$data[4];\n\t $Compte_partie_adverse = mysqli_real_escape_string($l, trim($data[5]));\n\t $Details_du_mouvement = mysqli_real_escape_string($l, trim($data[6]));\n\n\t $Numero_de_compte=preg_replace('/\\s+/', '', $data[7]);// http://stackoverflow.com/a/1279798/54964\n\t //$Numero_de_compte=$data[6];\n\t $Message = ''; // mysqli_real_escape_string($l, trim($data[5]));\n\t $Libelles=\"_BNP_\";\n\t \n\t $s=\"INSERT IGNORE INTO Extraits (Numero_de_compte ,Nom_du_compte,Compte_partie_adverse ,\n\t Numero_de_mouvement ,Date_comptable ,Date_valeur,Montant ,\n\t Devise, Libelles ,Details_du_mouvement ,Message) \n\t SELECT \n\t '\".$Numero_de_compte.\"','.$Nom_du_compte.','$Compte_partie_adverse',\n\t '\".$Numero_de_mouvement.\"','\".$Date_comptable.\"','\".$Date_valeur.\"',\".$Montant.\",\n\t '\".$Devise.\"','\".$Libelles.\"','\".$Details_du_mouvement.\"','\".$Message.\"';\n\t \";\n\t //echo $s.\"<br/>\";\n\t sExecSQL($l,$s, True);\n\t /////////////////////////////////////////////////\n\t // INTO CompteNames (Numero_de_compte,Compte_Name)\n\t /////////////////////////////////////////////////\n\t { //if (trim($data[5])==$sNotDef){ //compte adverse //delete then insert \n\t $s=\"\n\t DELETE FROM `CompteNames` WHERE \n\t Numero_de_compte LIKE '%\".$Compte_partie_adverse.\"%';\n\t \";\n\t //echo $s;\n\t //sExecSQL($l,$s, True);\n\t $s=\"\n\t INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n\t '\".$Compte_partie_adverse.\"', '\" . $Details_du_mouvement . \"';\n\t \";\n\t //echo $s;\n\t sExecSQL($l,$s, True);\n\t //\n\t } //($data[4]==$sNotDef)\n\t \n\t } //end else skip no seq \n\t } //end else read and insert data\n\t } //end else skip first line\n }//while read\n\t} //change col count\n\t}//if (($handle=fopen($f, \"r\")) !== FALSE\nelse { Msg (\"File open fails\");\n Msg(print_r(error_get_last()));\n return -1;\n }\nfclose($handle);\n//msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "e140888406ea8364f3b547a8391edeb1", "score": "0.5683624", "text": "function upload(){\n\t\n \n if($this->input->post('upload_portfolios')){ \n \n $this->form_validation->set_rules('file_ref2', 'Ref', 'required');\n if(empty($_FILES['upload_p']['name'])){\n $this->form_validation->set_rules('upload_p', 'File', 'required');\n } \n \n $this->form_validation->set_error_delimiters( '<em class=\"error_text\">','</em>' );\n \n if($this->form_validation->run()){\n \n $csvData = file_get_contents($_FILES['upload_p']['tmp_name']);\n $lines = explode(PHP_EOL, $csvData);\n\n\n $head = str_getcsv(array_shift($lines));\n\n //remove empty line\n foreach($lines as $key=>$line){\t\t\t\n if(empty($line)){\t\t\t\n unset($lines[$key]);\n }\n }\n\n //create a multidimentional array\n $content_array = array();\n foreach ($lines as $line) {\n $content_array[] = array_combine($head, str_getcsv($line));\n }\n\t\n //use the multi-dimentioanl to create insert\n if(!empty($content_array)){\n\n // prepare for batch insert\n $batchInsert= array();\n\n foreach ($content_array as $key=>$val){ \n\n //stop upload is any record already exist\n $content['portfolioAddedByUserID'] = $this->current_userID;\n $content['portfolioReference'] = $reference= $val['reference'];\n $content['portfolioName'] = $val['name']; \t\t \n $content['portfolioDateAdded'] = changeDateFormat('now', \"Y-m-d\");\n $content['portfolioURL'] = $portfolioURL = $this->generateElementURL('portfolio');\n\n $batchInsert[] = $content; \n\n\n // test if this portfolio is unique\n $isUnique = $this->portfolio_accessor->checkIsUnique(array('portfolioReference'=>$reference));\n\n if(intval($isUnique)>0){\n $this->errorMessage[] = \"Portfolio reference $reference already exist\";\t\t\t \n }\n }// end foreach ($content_array as $key=>$val)\n\t\t \n if(empty($this->errorMessage) && (!empty($batchInsert))){\n\n $this->portfolio_accessor->addInBatch($batchInsert);\n\n $this->session->set_flashdata('message', 'file processed Successfully');\n $this->session->set_flashdata('type', 'flash_success');\n redirect(base_url('unitisation/portfolio/upload'));\n\n }//#insert\n \n }// end if $content_array\n } // end if run\n \n }// end if posted\n \n \n $this->addNewPortfolio();\n\n }", "title": "" }, { "docid": "78ffe44791bb0ff8ffc8dbd12bce12d5", "score": "0.5678232", "text": "function getDataFile($conexion,$sql){\r\n\t\r\n\t$filename = 'C:/wamp/www/wpcalc/wp-content/uploads/data/datafile.csv'; \r\n \r\n\tif(!$result = mysqli_query($conexion, $sql)) die();\r\n\t$fp = fopen($filename, 'w');\r\n\t\r\n $header = true;\r\n while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\r\n if ($header) {\r\n \r\n\t\t\t$hdr = array_keys($row);\r\n\t\t\tforeach ($hdr as $k => $val) {\r\n\t\t\t\t$hdr[$k] = $val.\"#@ @#\";\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//fputcsv($fp, array_keys($row));\r\n\t\t\tfputcsv($fp, $hdr);\r\n $header = false;\r\n }\r\n\t\t\r\n\t\t \r\n\r\n\t\tforeach ($row as $key => $value) {\r\n\t\t\t$row[$key] = $value.\"#@ @#\";\r\n\t\t}\r\n\t\t\r\n fputcsv($fp, $row);\r\n }\r\n fclose($fp);\r\n\t$contents = file_get_contents($filename);\r\n\t$contents = str_replace(\"#@ @#\", \"\", $contents);\r\n\tfile_put_contents($filename, $contents);\r\n}", "title": "" }, { "docid": "cf478d8b4f34ee5c448b2fee1a03c559", "score": "0.5673936", "text": "private function setNewCsvImportEntity(){\n // Search if any existing csvReport fort the concerned scriptName\n $oldEntities = self::$context->entityManager->getRepository(\"CoreCsvImport\")->findBy(array(\n \"sessionId\" => session_id(),\n \"contact\" => self::$context->security->contact,\n \"scriptName\" => $this->scriptName\n )); \n \n if($oldEntities != null) {\n foreach ($oldEntities as$oldEntity) {\n self::$context->entityManager->remove($oldEntity);\n self::$context->entityManager->flush();\n }\n }\n\n $this->csvFileEntity = new \\CoreCsvImport($this->scriptName, self::$context->security->contact); \n \n // Drop all old columns and add the new ones ...\n $this->csvFileEntity->eraseColumns();\n foreach ($this->columnsList as $columnName => $currentColumn) {\n if($currentColumn['columnNumber'] !== null) {\n // The column has been found in the passed csv file, add it to the csv to populate DB\n $csvColumn = new \\CoreCsvImportColumns($columnName, $currentColumn['columnNumber'], $currentColumn['entity']);\n $this->csvFileEntity->addColumn($csvColumn);\n self::$context->entityManager->persist($csvColumn);\n self::$context->entityManager->flush();\n $this->columEntities[$currentColumn['columnNumber']] = $csvColumn;\n }\n }\n }", "title": "" }, { "docid": "43e7cb2c2cf338c152982657941d24ba", "score": "0.5671891", "text": "private function uploadCsvAction() {\n $csv_mimetypes = array(\n 'text/csv',\n 'text/plain',\n 'application/csv',\n 'text/comma-separated-values',\n 'application/excel',\n 'application/vnd.ms-excel',\n 'application/vnd.msexcel',\n 'text/anytext',\n 'application/octet-stream',\n 'application/txt',\n );\n\n if ($this->request->hasFiles() && $this->request->isPost()) {\n $getUploadFile = $this->request->getUploadedFiles()[0];\n $mimeTypeCsv = $getUploadFile->getRealType();\n $csvFileName = preg_replace('/\\s+/', '_', $getUploadFile->getName());\n if($getUploadFile->getSize() > 1048576){\n $this->flash->output(\"File Size is bigger than 1MB\");\n return $this->response->redirect(\"pro/projects/list?task=\".uniqid('xLmR'));\n }\n elseif(!in_array($mimeTypeCsv, $csv_mimetypes)){\n $this->flash->output(\"File Uploaded not an extension of CSV\");\n return $this->response->redirect(\"pro/projects/list?task=\".uniqid('cSv'));\n }\n else{\n $timeChecked = time();\n $uploadPathRow = \"../public/uploads/csvs/\";\n return [\n $timeChecked.\"_\".$csvFileName,\n $getUploadFile->moveTo($uploadPathRow.$timeChecked.\"_\".$csvFileName)\n ];\n }\n }\n }", "title": "" }, { "docid": "1ac926755827af6dc577c57141713a6a", "score": "0.56677735", "text": "protected function initCSV()\n {\n $this->addHeaderRowToCSV();\n }", "title": "" }, { "docid": "10735f757566a775469607bed7973726", "score": "0.5667275", "text": "public function store(fundfileRequest $request)\n {\n\n\n print_r( $request->all() );\n\n $file = $request->file('filename');\n $path = 'fileuploads/csv';\n $fullName = $file->getClientOriginalName();\n\n $onlyName = explode('.',$fullName);\n $newfilename=$request->input('idimp').'_'.date('dmY_Hmmss').'.'.$onlyName[1];\n $file->move($path,$newfilename);\n\n $item = new tbimp_csvfile;\n $item -> idfile= $request->input('idfile');\n $item -> filename = $newfilename;\n $item -> vday= date('Y-m-d');\n $item -> countrec= $request->input('countrec');\n $item -> idoffice= $request->input('idoffice');\n $item -> idimp= $request->input('idimp');\n $item -> keydata= $request->input('keydata');\n $item->save();\n\n $filecsv =$path.'/'.$newfilename;\n $excels = Excel::load($filecsv,'UTF-8') ;\n\n if( !$excels ) return false;\n \t\t$worksheet \t= $excels->setActiveSheetIndex(0);\n $lastColumn = $worksheet->getHighestColumn();\n $rows = $worksheet->getHighestRow();\n $excel = $excels->getActiveSheet();\n $row = 1;\n //echo 'lastColumn ' . $lastColumn;\n $lastColumn++;\n $a=0;\n $b=0;\n $c=0;\n $d=0;\n $e=0;\n $f=0;\n $g=0;\n $h=0;\n $i=0;\n $j=0;\n $k=0;\n $l=0;\n $m=0;\n $n=0;\n $o=0;\n $p=0;\n $q=0;\n $r=0;\n $s=0;\n $t=0;\n $u=0;\n $v=0;\n $w=0;\n $x=0;\n $y=0;\n $z=0;\n $aa=0;\n $ab=0;\n $ac=0;\n $ad=0;\n $ae=0;\n $af=0;\n $ag=0;\n $ah=0;\n $ai=0;\n $aj=0;\n $ak=0;\n $al=0;\n $am=0;\n $an=0;\n $ao=0;\n $ap=0;\n $aq=0;\n $ar=0;\n $as=0;\n $at=0;\n $au=0;\n $av=0;\n $aw=0;\n $ax=0;\n $ay=0;\n $az=0;\n $ba=0;\n $bb=0;\n $bc=0;\n $bd=0;\n $be=0;\n $bf=0;\n $bg=0;\n $bh=0;\n $bi=0;\n $bj=0;\n $bk=0;\n $bl=0;\n $bm=0;\n $bn=0;\n $bo=0;\n $bp=0;\n $bq=0;\n $br=0;\n $bs=0;\n $bt=0;\n $bu=0;\n $bv=0;\n $bw=0;\n $bx=0;\n $by=0;\n $bz=0;\n $ca=0;\n $cb=0;\n $cc=0;\n $cd=0;\n $ce=0;\n $cf=0;\n $cg=0;\n $ch=0;\n $ci=0;\n $cj=0;\n $ck=0;\n $cl=0;\n $cm=0;\n $cn=0;\n $co=0;\n $cp=0;\n $cq=0;\n $cr=0;\n $cs=0;\n $ct=0;\n $cu=0;\n $cv=0;\n $cw=0;\n $cx=0;\n $cy=0;\n $cz=0;\n $lineid=0;\n $idoffice=0;\n $idimp=0;\n $keydata=0;\n $mbid=0;\n $rela=0;\n\n for($rx = 1; $rx <= $rows; $rx++){\n $item = New Tbimp_temp;\n $a=$excel->getCell(\"a$rx\")->getValue()?$excel->getCell(\"a$rx\")->getValue():$a;\n $b=$excel->getCell(\"b$rx\")->getValue()?$excel->getCell(\"b$rx\")->getValue():$b;\n $c=$excel->getCell(\"c$rx\")->getValue()?$excel->getCell(\"c$rx\")->getValue():$c;\n $d=$excel->getCell(\"d$rx\")->getValue()?$excel->getCell(\"d$rx\")->getValue():$d;\n $e=$excel->getCell(\"e$rx\")->getValue()?$excel->getCell(\"e$rx\")->getValue():$e;\n $f=$excel->getCell(\"f$rx\")->getValue()?$excel->getCell(\"f$rx\")->getValue():$f;\n $g=$excel->getCell(\"g$rx\")->getValue()?$excel->getCell(\"g$rx\")->getValue():$g;\n $h=$excel->getCell(\"h$rx\")->getValue()?$excel->getCell(\"h$rx\")->getValue():$h;\n $i=$excel->getCell(\"i$rx\")->getValue()?$excel->getCell(\"i$rx\")->getValue():$i;\n $j=$excel->getCell(\"j$rx\")->getValue()?$excel->getCell(\"j$rx\")->getValue():$j;\n $k=$excel->getCell(\"k$rx\")->getValue()?$excel->getCell(\"k$rx\")->getValue():$k;\n $l=$excel->getCell(\"l$rx\")->getValue()?$excel->getCell(\"l$rx\")->getValue():$l;\n $m=$excel->getCell(\"m$rx\")->getValue()?$excel->getCell(\"m$rx\")->getValue():$m;\n $n=$excel->getCell(\"n$rx\")->getValue()?$excel->getCell(\"n$rx\")->getValue():$n;\n $o=$excel->getCell(\"o$rx\")->getValue()?$excel->getCell(\"o$rx\")->getValue():$o;\n $p=$excel->getCell(\"p$rx\")->getValue()?$excel->getCell(\"p$rx\")->getValue():$p;\n $q=$excel->getCell(\"q$rx\")->getValue()?$excel->getCell(\"q$rx\")->getValue():$q;\n $r=$excel->getCell(\"r$rx\")->getValue()?$excel->getCell(\"r$rx\")->getValue():$r;\n $s=$excel->getCell(\"s$rx\")->getValue()?$excel->getCell(\"s$rx\")->getValue():$s;\n $t=$excel->getCell(\"t$rx\")->getValue()?$excel->getCell(\"t$rx\")->getValue():$t;\n $u=$excel->getCell(\"u$rx\")->getValue()?$excel->getCell(\"u$rx\")->getValue():$u;\n $v=$excel->getCell(\"v$rx\")->getValue()?$excel->getCell(\"v$rx\")->getValue():$v;\n $w=$excel->getCell(\"w$rx\")->getValue()?$excel->getCell(\"w$rx\")->getValue():$w;\n $x=$excel->getCell(\"x$rx\")->getValue()?$excel->getCell(\"x$rx\")->getValue():$x;\n $y=$excel->getCell(\"y$rx\")->getValue()?$excel->getCell(\"y$rx\")->getValue():$y;\n $z=$excel->getCell(\"z$rx\")->getValue()?$excel->getCell(\"z$rx\")->getValue():$z;\n $aa=$excel->getCell(\"aa$rx\")->getValue()?$excel->getCell(\"aa$rx\")->getValue():$aa;\n $ab=$excel->getCell(\"ab$rx\")->getValue()?$excel->getCell(\"ab$rx\")->getValue():$ab;\n $ac=$excel->getCell(\"ac$rx\")->getValue()?$excel->getCell(\"ac$rx\")->getValue():$ac;\n $ad=$excel->getCell(\"ad$rx\")->getValue()?$excel->getCell(\"ad$rx\")->getValue():$ad;\n $ae=$excel->getCell(\"ae$rx\")->getValue()?$excel->getCell(\"ae$rx\")->getValue():$ae;\n $af=$excel->getCell(\"af$rx\")->getValue()?$excel->getCell(\"af$rx\")->getValue():$af;\n $ag=$excel->getCell(\"ag$rx\")->getValue()?$excel->getCell(\"ag$rx\")->getValue():$ag;\n $ah=$excel->getCell(\"ah$rx\")->getValue()?$excel->getCell(\"ah$rx\")->getValue():$ah;\n $ai=$excel->getCell(\"ai$rx\")->getValue()?$excel->getCell(\"ai$rx\")->getValue():$ai;\n $aj=$excel->getCell(\"aj$rx\")->getValue()?$excel->getCell(\"aj$rx\")->getValue():$aj;\n $ak=$excel->getCell(\"ak$rx\")->getValue()?$excel->getCell(\"ak$rx\")->getValue():$ak;\n $al=$excel->getCell(\"al$rx\")->getValue()?$excel->getCell(\"al$rx\")->getValue():$al;\n $am=$excel->getCell(\"am$rx\")->getValue()?$excel->getCell(\"am$rx\")->getValue():$am;\n $an=$excel->getCell(\"an$rx\")->getValue()?$excel->getCell(\"an$rx\")->getValue():$an;\n $ao=$excel->getCell(\"ao$rx\")->getValue()?$excel->getCell(\"ao$rx\")->getValue():$ao;\n $ap=$excel->getCell(\"ap$rx\")->getValue()?$excel->getCell(\"ap$rx\")->getValue():$ap;\n $aq=$excel->getCell(\"aq$rx\")->getValue()?$excel->getCell(\"aq$rx\")->getValue():$aq;\n $ar=$excel->getCell(\"ar$rx\")->getValue()?$excel->getCell(\"ar$rx\")->getValue():$ar;\n $as=$excel->getCell(\"as$rx\")->getValue()?$excel->getCell(\"as$rx\")->getValue():$as;\n $at=$excel->getCell(\"at$rx\")->getValue()?$excel->getCell(\"at$rx\")->getValue():$at;\n $au=$excel->getCell(\"au$rx\")->getValue()?$excel->getCell(\"au$rx\")->getValue():$au;\n $av=$excel->getCell(\"av$rx\")->getValue()?$excel->getCell(\"av$rx\")->getValue():$av;\n $aw=$excel->getCell(\"aw$rx\")->getValue()?$excel->getCell(\"aw$rx\")->getValue():$aw;\n $ax=$excel->getCell(\"ax$rx\")->getValue()?$excel->getCell(\"ax$rx\")->getValue():$ax;\n $ay=$excel->getCell(\"ay$rx\")->getValue()?$excel->getCell(\"ay$rx\")->getValue():$ay;\n $az=$excel->getCell(\"az$rx\")->getValue()?$excel->getCell(\"az$rx\")->getValue():$az;\n $ba=$excel->getCell(\"ba$rx\")->getValue()?$excel->getCell(\"ba$rx\")->getValue():$ba;\n $bb=$excel->getCell(\"bb$rx\")->getValue()?$excel->getCell(\"bb$rx\")->getValue():$bb;\n $bc=$excel->getCell(\"bc$rx\")->getValue()?$excel->getCell(\"bc$rx\")->getValue():$bc;\n $bd=$excel->getCell(\"bd$rx\")->getValue()?$excel->getCell(\"bd$rx\")->getValue():$bd;\n $be=$excel->getCell(\"be$rx\")->getValue()?$excel->getCell(\"be$rx\")->getValue():$be;\n $bf=$excel->getCell(\"bf$rx\")->getValue()?$excel->getCell(\"bf$rx\")->getValue():$bf;\n $bg=$excel->getCell(\"bg$rx\")->getValue()?$excel->getCell(\"bg$rx\")->getValue():$bg;\n $bh=$excel->getCell(\"bh$rx\")->getValue()?$excel->getCell(\"bh$rx\")->getValue():$bh;\n $bi=$excel->getCell(\"bi$rx\")->getValue()?$excel->getCell(\"bi$rx\")->getValue():$bi;\n $bj=$excel->getCell(\"bj$rx\")->getValue()?$excel->getCell(\"bj$rx\")->getValue():$bj;\n $bk=$excel->getCell(\"bk$rx\")->getValue()?$excel->getCell(\"bk$rx\")->getValue():$bk;\n $bl=$excel->getCell(\"bl$rx\")->getValue()?$excel->getCell(\"bl$rx\")->getValue():$bl;\n $bm=$excel->getCell(\"bm$rx\")->getValue()?$excel->getCell(\"bm$rx\")->getValue():$bm;\n $bn=$excel->getCell(\"bn$rx\")->getValue()?$excel->getCell(\"bn$rx\")->getValue():$bn;\n $bo=$excel->getCell(\"bo$rx\")->getValue()?$excel->getCell(\"bo$rx\")->getValue():$bo;\n $bp=$excel->getCell(\"bp$rx\")->getValue()?$excel->getCell(\"bp$rx\")->getValue():$bp;\n $bq=$excel->getCell(\"bq$rx\")->getValue()?$excel->getCell(\"bq$rx\")->getValue():$bq;\n $br=$excel->getCell(\"br$rx\")->getValue()?$excel->getCell(\"br$rx\")->getValue():$br;\n $bs=$excel->getCell(\"bs$rx\")->getValue()?$excel->getCell(\"bs$rx\")->getValue():$bs;\n $bt=$excel->getCell(\"bt$rx\")->getValue()?$excel->getCell(\"bt$rx\")->getValue():$bt;\n $bu=$excel->getCell(\"bu$rx\")->getValue()?$excel->getCell(\"bu$rx\")->getValue():$bu;\n $bv=$excel->getCell(\"bv$rx\")->getValue()?$excel->getCell(\"bv$rx\")->getValue():$bv;\n $bw=$excel->getCell(\"bw$rx\")->getValue()?$excel->getCell(\"bw$rx\")->getValue():$bw;\n $bx=$excel->getCell(\"bx$rx\")->getValue()?$excel->getCell(\"bx$rx\")->getValue():$bx;\n $by=$excel->getCell(\"by$rx\")->getValue()?$excel->getCell(\"by$rx\")->getValue():$by;\n $bz=$excel->getCell(\"bz$rx\")->getValue()?$excel->getCell(\"bz$rx\")->getValue():$bz;\n $ca=$excel->getCell(\"ca$rx\")->getValue()?$excel->getCell(\"ca$rx\")->getValue():$ca;\n $cb=$excel->getCell(\"cb$rx\")->getValue()?$excel->getCell(\"cb$rx\")->getValue():$cb;\n $cc=$excel->getCell(\"cc$rx\")->getValue()?$excel->getCell(\"cc$rx\")->getValue():$cc;\n $cd=$excel->getCell(\"cd$rx\")->getValue()?$excel->getCell(\"cd$rx\")->getValue():$cd;\n $ce=$excel->getCell(\"ce$rx\")->getValue()?$excel->getCell(\"ce$rx\")->getValue():$ce;\n $cf=$excel->getCell(\"cf$rx\")->getValue()?$excel->getCell(\"cf$rx\")->getValue():$cf;\n $cg=$excel->getCell(\"cg$rx\")->getValue()?$excel->getCell(\"cg$rx\")->getValue():$cg;\n $ch=$excel->getCell(\"ch$rx\")->getValue()?$excel->getCell(\"ch$rx\")->getValue():$ch;\n $ci=$excel->getCell(\"ci$rx\")->getValue()?$excel->getCell(\"ci$rx\")->getValue():$ci;\n $cj=$excel->getCell(\"cj$rx\")->getValue()?$excel->getCell(\"cj$rx\")->getValue():$cj;\n $ck=$excel->getCell(\"ck$rx\")->getValue()?$excel->getCell(\"ck$rx\")->getValue():$ck;\n $cl=$excel->getCell(\"cl$rx\")->getValue()?$excel->getCell(\"cl$rx\")->getValue():$cl;\n $cm=$excel->getCell(\"cm$rx\")->getValue()?$excel->getCell(\"cm$rx\")->getValue():$cm;\n $cn=$excel->getCell(\"cn$rx\")->getValue()?$excel->getCell(\"cn$rx\")->getValue():$cn;\n $co=$excel->getCell(\"co$rx\")->getValue()?$excel->getCell(\"co$rx\")->getValue():$co;\n $cp=$excel->getCell(\"cp$rx\")->getValue()?$excel->getCell(\"cp$rx\")->getValue():$cp;\n $cq=$excel->getCell(\"cq$rx\")->getValue()?$excel->getCell(\"cq$rx\")->getValue():$cq;\n $cr=$excel->getCell(\"cr$rx\")->getValue()?$excel->getCell(\"cr$rx\")->getValue():$cr;\n $cs=$excel->getCell(\"cs$rx\")->getValue()?$excel->getCell(\"cs$rx\")->getValue():$cs;\n $ct=$excel->getCell(\"ct$rx\")->getValue()?$excel->getCell(\"ct$rx\")->getValue():$ct;\n $cu=$excel->getCell(\"cu$rx\")->getValue()?$excel->getCell(\"cu$rx\")->getValue():$cu;\n $cv=$excel->getCell(\"cv$rx\")->getValue()?$excel->getCell(\"cv$rx\")->getValue():$cv;\n $cw=$excel->getCell(\"cw$rx\")->getValue()?$excel->getCell(\"cw$rx\")->getValue():$cw;\n $cx=$excel->getCell(\"cx$rx\")->getValue()?$excel->getCell(\"cx$rx\")->getValue():$cx;\n $cy=$excel->getCell(\"cy$rx\")->getValue()?$excel->getCell(\"cy$rx\")->getValue():$cy;\n $cz=$excel->getCell(\"cz$rx\")->getValue()?$excel->getCell(\"cz$rx\")->getValue():$cz;\n\n $item->a=$a;\n $item->b=$b;\n $item->c=$c;\n $item->d=$d;\n $item->e=$e;\n $item->f=$f;\n $item->g=$g;\n $item->h=$h;\n $item->i=$i;\n $item->j=$j;\n $item->k=$k;\n $item->l=$l;\n $item->m=$m;\n $item->n=$n;\n $item->o=$o;\n $item->p=$p;\n $item->q=$q;\n $item->r=$r;\n $item->s=$s;\n $item->t=$t;\n $item->u=$u;\n $item->v=$v;\n $item->w=$w;\n $item->x=$x;\n $item->y=$y;\n $item->z=$z;\n $item->aa=$aa;\n $item->ab=$ab;\n $item->ac=$ac;\n $item->ad=$ad;\n $item->ae=$ae;\n $item->af=$af;\n $item->ag=$ag;\n $item->ah=$ah;\n $item->ai=$ai;\n $item->aj=$aj;\n $item->ak=$ak;\n $item->al=$al;\n $item->am=$am;\n $item->an=$an;\n $item->ao=$ao;\n $item->ap=$ap;\n $item->aq=$aq;\n $item->ar=$ar;\n $item->as=$as;\n $item->at=$at;\n $item->au=$au;\n $item->av=$av;\n $item->aw=$aw;\n $item->ax=$ax;\n $item->ay=$ay;\n $item->az=$az;\n $item->ba=$ba;\n $item->bb=$bb;\n $item->bc=$bc;\n $item->bd=$bd;\n $item->be=$be;\n $item->bf=$bf;\n $item->bg=$bg;\n $item->bh=$bh;\n $item->bi=$bi;\n $item->bj=$bj;\n $item->bk=$bk;\n $item->bl=$bl;\n $item->bm=$bm;\n $item->bn=$bn;\n $item->bo=$bo;\n $item->bp=$bp;\n $item->bq=$bq;\n $item->br=$br;\n $item->bs=$bs;\n $item->bt=$bt;\n $item->bu=$bu;\n $item->bv=$bv;\n $item->bw=$bw;\n $item->bx=$bx;\n $item->by=$by;\n $item->bz=$bz;\n $item->ca=$ca;\n $item->cb=$cb;\n $item->cc=$cc;\n $item->cd=$cd;\n $item->ce=$ce;\n $item->cf=$cf;\n $item->cg=$cg;\n $item->ch=$ch;\n $item->ci=$ci;\n $item->cj=$cj;\n $item->ck=$ck;\n $item->cl=$cl;\n $item->cm=$cm;\n $item->cn=$cn;\n $item->co=$co;\n $item->cp=$cp;\n $item->cq=$cq;\n $item->cr=$cr;\n $item->cs=$cs;\n $item->ct=$ct;\n $item->cu=$cu;\n $item->cv=$cv;\n $item->cw=$cw;\n $item->cx=$cx;\n $item->cy=$cy;\n $item->cz=$cz;\n\n $item->idimp= $request->input('idimp');\n $item->idoffice= $request->input('idoffice');\n\n $item->save();\n }\n // File::delete( $this->tmpPath . '/import-fund.xlsx');\n //echo '<br/>';\n\n $request->session()->flash('status','บันทึก');\n\n //?mbid=22178&samano=68827&fundid=3&mbmember=02208&keywords=\n return redirect('import/'.$request->input('mbid').'?samano='.$request->input('samano').'&fundid='.$request->input('fundid').'&mbmember='.$request->input('mbmember').'&keywords='.$request->input('keywords'));\n }", "title": "" }, { "docid": "ca7a992f29304cd982a648c6b1230783", "score": "0.5645333", "text": "public static function prepare_contact_entry_import() {\r\r\n $file_id = absint( $_REQUEST['file_id'] );\r\r\n $delimiter = ',';\r\r\n if( isset( $_REQUEST['import_delimiter'] ) ) {\r\r\n $delimiter = $_REQUEST['import_delimiter'];\r\r\n }\r\r\n $enclosure = '\"';\r\r\n if( isset( $_REQUEST['import_enclosure'] ) ) {\r\r\n $enclosure = stripslashes($_REQUEST['import_enclosure']);\r\r\n }\r\r\n $file = get_attached_file($file_id);\r\r\n $columns = array();\r\r\n if( $file ) {\r\r\n $row = 1;\r\r\n if (($handle = fopen($file, \"r\")) !== FALSE) {\r\r\n while (($data = fgetcsv($handle, 0, $delimiter, $enclosure)) !== FALSE) {\r\r\n $data = array_map( \"utf8_encode\", $data );\r\r\n $num = count($data);\r\r\n $row++;\r\r\n $value = 'undefined';\r\r\n $title = 'undefined';\r\r\n for ( $c=0; $c < $num; $c++ ) {\r\r\n $columns[] = $data[$c];\r\r\n }\r\r\n break;\r\r\n }\r\r\n fclose($handle);\r\r\n }\r\r\n }\r\r\n echo json_encode($columns);\r\r\n die();\r\r\n }", "title": "" }, { "docid": "d4e0de64cdb88e5f384ed64e41f779a4", "score": "0.56331325", "text": "public function testBulkDataEntry(){\n $pathToSampleCSVFile=__DIR__.\"/../public/downloads/sample.csv\";\n $parsedData= array_map('str_getcsv', file($pathToSampleCSVFile));\n $resource= $this->visit('/bulkUpload')\n ->attach($pathToSampleCSVFile,'csvFileName')\n ->press('Upload');\n foreach($parsedData as $value){\n $resource=$resource->see($value[0])->see($value[1]);\n }\n }", "title": "" }, { "docid": "744b5fb61edbd936b5b2b65e07f26d0f", "score": "0.56253225", "text": "function writeCSVFile($data,$fileLocation){\n if (key_exists('iniPropertiesFile', $GLOBALS)) {\n if (key_exists('userData', $GLOBALS['iniPropertiesFile']))\n $file = fopen($GLOBALS['iniPropertiesFile']['userData'], \"a\");\n \n // see if we could create the file, if not create in current dir\n if (! $file)\n $file = fopen(getcwd() . '\\userData.csv', \"a\");\n if ($file) {\n fwrite($file, $data);\n fclose($file);\n }\n }\n \n}", "title": "" }, { "docid": "573fc254f0092017dc18033794566249", "score": "0.5623584", "text": "public function importCSVStudents()\n {\n\n if ($_FILES[\"fileToUpload\"][\"tmp_name\"] == null) {\n $viewData['success'] = 'missing';\n $this->render('Add New User', 'adduser.view', $viewData);\n die();\n }\n $target_dir = \"/home/Admin\";\n\n // Removes all files in the folder currently\n system(\"sudo rm $target_dir/*\");\n\n // Sets the target file\n $target_file = $target_dir . \"/import.csv\";\n\n move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file);\n chmod($target_file, 0777);\n\n /* Open CSV and create users */\n $csv = array_map('str_getcsv', file('/home/Admin/import.csv'));\n\n foreach ($csv as $line) {\n if (!isset($line[0]) || !isset($line[1]) || !isset($line[2])) {\n $viewData['success'] = false;\n break;\n }\n // Convert first char to upper case concat add student id\n $pass = strtoupper($line[1][0]) . $line[0];\n\n $this->createUser($line[0], $line[1], $line[2], $pass);\n }\n if (!isset($viewData['success'])) {\n $viewData['success'] = true;\n }\n $this->render('Add New User', 'adduser.view', $viewData);\n }", "title": "" }, { "docid": "ec5a7d3ee6505af89b9edbab40124093", "score": "0.56030107", "text": "function store_data($data) {\n $filename = \"payment.csv\";\n #Check to ensure the file is available and able to be written to\n if (file_exists($filename) && is_writable($filename)){\n $fp = fopen($filename, \"a\"); #file handler set to append\n unset($data['register_page']);\n fputcsv($fp, $data);\n fclose($fp);\n }\n }", "title": "" }, { "docid": "9b27ba54de143993627d3cd5fe1e9bd8", "score": "0.56007904", "text": "function createLog($dataCSV, $items, $tableName, $firstLineHeader, $dataEdit = '') {\n $logField = array();\n $sPath = 'SELECT PATH_FILE FROM PMT_LISTE_OPER GROUP BY PATH_FILE';\n $rPath = executeQuery($sPath);\n $file = $_SESSION['CSV_FILE_NAME'];\n (array) $ftemp = explode('.', $file);\n if (!empty($rPath))\n $path = $rPath[1]['PATH_FILE'] . '/LOG/' . $ftemp[0] . '_' . date(\"YmdHis\") . '_log.txt';\n else\n $path = '/var/tmp/' . $ftemp[0] . '_' . date(\"YmdHis\") . '_log.txt';\n $Log = 'Le fichier ' . $file . ' a été intégré le ' . date(\"d/m/Y à H:i:s\") . \".\\r\\n\\n\\n\";\n $nbcurrentLine = $nbAnomalie = $nbCreate = $nbModif = 0;\n foreach ($dataCSV as $row)\n {\n $checkLog = array();\n $logLine = array();\n $whereUpdate = array();\n $nbcurrentLine++;\n foreach ($items as $field)\n {\n $param = array();\n $param['LENGTH'] = 0;\n //$param['REQUIRED'] = 'no'; // à implémenter\n if (!empty($field['REQUIRED_COLUMN']))\n {\n $param['REQUIRED'] = 'yes';\n }\n else\n {\n $param['REQUIRED'] = 'no';\n }\n if (!empty($field['COLUMN_TYPE']))\n {\n $param['AS400_TYPE'] = $field['COLUMN_TYPE'];\n }\n else\n {\n $param['AS400_TYPE'] = 'defaut';\n }\n $param['FIELD_NAME'] = $field['FIELD_NAME'];\n if ($firstLineHeader == 'on')\n {\n if (isset($row[$field['COLUMN_CSV']])) // le nom de la colonne est présent dans le csv\n {\n $param['FIELD_DESCRIPTION'] = $field['COLUMN_CSV'];\n //if ($row[$field['COLUMN_CSV']])\n $value = _convert($row[$field['COLUMN_CSV']]);\n }\n else // sinon c'est une constante\n {\n //if ($field['COLUMN_CSV'])\n $value = _convert($field['COLUMN_CSV']);\n }\n }\n else\n {\n $aCol = explode(' ', trim($field['COLUMN_CSV']));\n if ((isset($aCol[0]) && trim($aCol[0]) == 'Column' ) && ( isset($aCol[1]) && isset($row[$aCol[1]]) ))\n {// le num colonne exite dans row\n $value = _convert($row[$aCol[1]]);\n }\n elseif (( isset($aCol[0]) && trim($aCol[0]) != 'Column'))\n { // c'est une constante\n $value = _convert($field['COLUMN_CSV']);\n }\n }\n $checkLog = convergence_checkFieldLog($value, $param, 'csv');\n if ($checkLog != 1)\n {\n $logLine[] = implode(\",\\r\\n\\t\", $checkLog);\n }\n elseif ($dataEdit != '')\n {\n foreach ($dataEdit as $array)\n {\n $fieldNameEditDelete = htmlspecialchars_decode($array['CSV_FIELD_NAME']);\n if ($fieldNameEditDelete == htmlspecialchars_decode($field['FIELD_NAME']))\n {\n $whereUpdate[] = \"$fieldNameEditDelete = '\".mysql_escape_string($value).\"' \";\n }\n } \n }\n }\n if (!empty($logLine))\n {\n $logField[$nbcurrentLine] = implode(\",\\r\\n\\t\", $logLine);\n unset($dataCSV[$nbcurrentLine - 1]); // on n'importe pas les lignes pourries\n $nbAnomalie++;\n }\n elseif ($dataEdit != '')\n {\n $where = implode(' AND ', $whereUpdate);\n $sql = 'SELECT * FROM ' . $tableName . ' WHERE ' . $where;\n $rSql = executeQuery($sql);\n if (!empty($rSql))\n {\n $nbModif++;\n }\n else\n {\n $nbCreate++;\n }\n }\n else\n {\n $nbCreate++;\n }\n }\n unset($row);\n unset($field);\n if (!empty($logField))\n {\n $Log .= \"Liste des erreurs survenues lors de l’intégration :\\r\\n\";\n foreach ($logField as $k => $v)\n {\n $Log .= \"Ligne N° $k : $v.\\r\\n\"; \n }\n }\n else\n {\n $Log .= \"Aucune erreur survenue lors de l'intégration\\r\\n\";\n }\n $Log .= \"\\nNombre création : $nbCreate\\r\\nNombre de modification : $nbModif\\r\\nNombre d'anomalie : $nbAnomalie\\r\\nTotal de lignes : $nbcurrentLine\\r\\n\";\n $handle = fopen($path, 'x+');\n fwrite($handle, $Log);\n fclose($handle);\n $dataCSV = array_merge((array) $dataCSV); // on ré-indexe le tableau\n return $dataCSV;\n}", "title": "" }, { "docid": "063dc6ac2f2d5752be6378a9246156ed", "score": "0.5597412", "text": "public function insertData()\r\n\t{\r\n\t\t$user = JFactory::getUser();\r\n\t\t$jform = JRequest::getVar('jform');\r\n\t\t$dropData = (int)JArrayHelper::getValue($jform, 'drop_data', 0);\r\n\t\t$overWrite = (int)JArrayHelper::getValue($jform, 'overwrite', 0);\r\n\t\t$model = $this->getlistModel();\r\n\t\t$model->_importingCSV = true;\r\n\t\t$item = $model->getTable();\r\n\t\t$formModel = $model->getFormModel();\r\n\r\n\t\tif ($dropData) {\r\n\t\t\t$model->truncate();\r\n\t\t}\r\n\r\n\t\t$item = $model->getTable();\r\n\t\t$tableParams = $model->getParams();\r\n\t\t$csvFullName = $tableParams->get('csvfullname', 0);\r\n\r\n\t\t$key = FabrikString::shortColName($item->db_primary_key);\r\n\r\n\t\t//get a list of exisitng primary key vals\r\n\t\t$db = $model->getDb();\r\n\t\t$query = $db->getQuery(true);\r\n\t\t$query->select($item->db_primary_key)->from($item->db_table_name);\r\n\t\t$db->setQuery($query);\r\n\t\t$aExistingKeys = $db->loadColumn();\r\n\r\n\t\t$this->addedCount = 0;\r\n\t\t$updatedCount = 0;\r\n\t\t$joins = $this->getJoins();\r\n\t\t// $$$ rob we are no longer removing the element joins from $joins\r\n\t\t// so lets see if any of $joins are table joins.\r\n\t\t$tableJoinsFound = false;\r\n\t\tfor ($x = 0; $x < count($joins); $x++) {\r\n\t\t\tif ((int)$joins[$x]->list_id !== 0) {\r\n\t\t\t\t$tableJoinsFound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$joindata = array();\r\n\r\n\t\t$defaultsToAdd = $this->defaultsToAdd();\r\n\t\tforeach ($this->data as $data) {\r\n\t\t\t$aRow = array();\r\n\t\t\t$pkVal = null;\r\n\t\t\t$i = 0;\r\n\t\t\tforeach ($this->matchedHeadings as $headingKey => $heading) {\r\n\r\n\t\t\t\tswitch ($csvFullName) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t$heading = array_pop(explode(\".\", $heading));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//test _raw key and use that\r\n\r\n\t\t\t\tif (substr($heading, strlen($heading)-4, strlen($heading)) == \"_raw\") {\r\n\t\t\t\t\t$pktestHeading = substr($heading, 0, strlen($heading)-4);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$pktestHeading = $heading;\r\n\t\t\t\t}\r\n\t\t\t\t//$$$rob isset($pkVal) because: It could be that you have two elements (short names) with the\r\n\t\t\t // same name (if trying to import joined data, in this case I'm\r\n\t\t\t //presuming that the master table's pkval is the first one you come to\r\n\r\n\t\t\t\tif ($pktestHeading == $key && !isset($pkVal)) {\r\n\t\t\t\t\t$pkVal = $data[$i];\r\n\t\t\t\t}\r\n\t\t\t\t// $$$ hugh - removed 'else', as we need to include the PK val, in case it's not auto-inc\r\n\t\t\t\t// and import needs to preserve PK provided in CSV data\r\n\t\t\t\t//else {\r\n\t\t\t\t$aRow[str_replace('.', '___', $headingKey)] = $data[$i];\r\n\t\t\t\t//}\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\r\n\t\t\t// $$$ rob add in per row default values for missing elements\r\n\t\t\tforeach ($defaultsToAdd as $k => $elementModel) {\r\n\t\t\t\t$aRow[$k] = $elementModel->getDefaultValue($aRow);\r\n\t\t\t\t$aRow[$k.'_raw'] = $aRow[$k];\r\n\t\t\t}\r\n\r\n\t\t\t$model->getFormGroupElementData();\r\n\t\t\t//take any _raw values and replace their real elements with their data\r\n\t\t\tforeach ($aRow as $k=>$val) {\r\n\t\t\t\tif (substr($k, strlen($k)-4, strlen($k)) == \"_raw\") {\r\n\t\t\t\t\t$noneraw = substr($k, 0, strlen($k)-4);\r\n\t\t\t\t\tif (array_key_exists($noneraw, $aRow)) {\r\n\t\t\t\t\t\t$aRow[$noneraw] = $val;\r\n\t\t\t\t\t\tunset($aRow[$k]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($overWrite && in_array($pkVal, $aExistingKeys)) {\r\n\t\t\t\t$formModel->_rowId = $pkVal;\r\n\t\t\t\t$updatedCount ++;\r\n\t\t\t} else {\r\n\t\t\t\t$formModel->_rowId = 0;\r\n\t\t\t\t$this->addedCount ++;\r\n\t\t\t}\r\n\r\n\t\t\t// $$$ rob - if raw and none raw or just raw found then insert the raw data\r\n\t\t\t// into the none raw key. Otherwise if just importing raw data no data stored\r\n\r\n\t\t\tforeach ($aRow as $k=>$val) {\r\n\t\t\t\tif (substr($k, strlen($k)-4, strlen($k)) == \"_raw\") {\r\n\t\t\t\t\t$noneraw = substr($k, 0, strlen($k)-4);\r\n\t\t\t\t\t$aRow[$noneraw] = $val;\r\n\t\t\t\t\tunset($aRow[$k]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!$tableJoinsFound) {\r\n\t\t\t\t$formModel->_formData = $aRow;\r\n\t\t\t\tFabrikWorker::getPluginManager()->runPlugins('onImportCSVRow', $model, 'list');\r\n\t\t\t\t$formModel->processToDB();\r\n\t\t\t} else {\r\n\t\t\t\t//merge multi line csv into one entry & defer till we've passed everything\r\n\t\t\t\t$joindata = $this->_fakeJoinData($joindata, $aRow, $pkVal, $formModel);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($tableJoinsFound) {\r\n\t\t\t$this->insertJoinedData($joindata);\r\n\t\t}\r\n\t\t$this->removeCSVFile();\r\n\t\t$elementsCreated = count($this->newHeadings);\r\n\t\t$this->updatedCount = $updatedCount;\r\n\t\tif ($elementsCreated == 0) {\r\n\t\t\t$msg = JText::sprintf(\"%s CSV records added and %s records updated\", $this->addedCount, $updatedCount);\r\n\t\t} else {\r\n\t\t\t$msg = JText::sprintf(\"%s new elements added, %s CSV records added and %s records updated\", $elementsCreated, $this->addedCount, $updatedCount);\r\n\t\t}\r\n\t\treturn $msg;\r\n\t}", "title": "" }, { "docid": "87c0d5213915ca1a844a39ed2bdd6207", "score": "0.5595843", "text": "function readCSV($userfile_name)\r\n\t{\r\n\t\t$baseDir = $this->getBaseDir();\r\n\t\t$this->headings = array();\r\n\t\t$this->data = array();\r\n\t\t$data = $this->getFormData();\r\n\t\t$field_delimiter = $this->getFieldDelimiter();\r\n\t\t$text_delimiter = stripslashes(JArrayHelper::getValue($data, 'text_delimiter', '\"'));\r\n\t\t$csv = new csv_bv($baseDir . '/' . $userfile_name, $field_delimiter, $text_delimiter, '\\\\');\r\n\t\t$csv->inPutFormat = JArrayHelper::getValue($data, 'inPutFormat', 'csv');\r\n\t\t$csv->SkipEmptyRows(TRUE); // Will skip empty rows. TRUE by default. (Shown here for example only).\r\n\t\t$csv->TrimFields(TRUE); // Remove leading and trailing \\s and \\t. TRUE by default.\r\n\r\n\t\t$model = $this->getlistModel();\r\n\t\t$tableParams = $model->getParams();\r\n\t\t$mode = $tableParams->get('csvfullname');\r\n\r\n\t\t\r\n\t\twhile ($arr_data = $csv->NextLine()) {\r\n\t\t\tif (empty($this->headings)) {\r\n\t\t\t\tforeach ($arr_data as &$heading) {\r\n\t\t\t\t\t// remove UFT8 Byte-Order-Mark if present\r\n\t\t\t\t\tif (substr($heading, 0, 3) == pack( \"CCC\",0xef,0xbb,0xbf)) {\r\n\t\t\t\t\t\t$heading = substr($heading, 3);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($mode != 2) {\r\n\t\t\t\t\t\t// $$$ rob don't bother cleaning at all as dots (.) are replaced with \"_\"\r\n\t\t\t\t\t\t//$heading = FabrikString::clean($heading);\r\n\t\t\t\t\t\t// $$$ rob replacing with this as per thread - http://fabrikar.com/forums/showthread.php?p=83304\r\n\t\t\t\t\t\t$heading = str_replace(' ', '_', $heading);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!$this->getSelectKey()) {\r\n\t\t\t\t\t//if no table loaded and the user asked to automaticall add a key then put id at the beginning of the new headings\r\n\t\t\t\t\t$idheading = 'id';\r\n\t\t\t\t\tif (in_array($idheading, $arr_data)) {\r\n\t\t\t\t\t\t$idheading .= rand(0, 9);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarray_unshift($arr_data, $idheading);\r\n\t\t\t\t}\r\n\t\t\t\t$this->headings = $arr_data;\r\n\t\t\t} else {\r\n\t\t\t\tif (function_exists('iconv')) {\r\n\t\t\t\t\tforeach ($arr_data as &$d) {\r\n\t\t\t\t\t\t//strip any none uft-8 characters from the import data\r\n\t\t\t\t\t\t//if we don't do this then the site's session is destroyed and you are logged out\r\n\t\t\t\t\t\t$d = iconv(\"utf-8\", \"utf-8//IGNORE\", $d);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!$this->getSelectKey()) {\r\n\t\t\t\t\tarray_unshift($arr_data, '');\r\n\t\t\t\t}\r\n\t\t\t\tif (count($arr_data) == 1 && $arr_data[0] == '') {\r\n\t\t\t\t\t//csv import from excel saved as unicode has blank record @ end\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->data[] = $arr_data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($csv->mHandle);\r\n\t\t// $$$ hugh - remove the temp file, but don't clear session\r\n\t\t// $$$ rob 07/11/2011 - NO!!! as import in admin reads the file twice.\r\n\t\t// once for getting the headings and a second time for importing/\r\n\t\t// $this->removeCSVFile(false);\r\n\t}", "title": "" }, { "docid": "cae1dcff4b0e72456a34d16ac9208850", "score": "0.5592067", "text": "function tablePopulate($csvFilename){\r\n $tableArray=intranetFile($csvFilename);//open the file and return array of it\r\n echo '<table>'.PHP_EOL;\r\n foreach ($tableArray as $key => $value) {\r\n $tempData= explode(',', $tableArray[$key]);\r\n echo \"<tr>\";\r\n foreach ($tempData as $dataKey => $dataValue) {\r\n if ($key==0) {\r\n echo \"<th scope='col'>$dataValue</th>\".PHP_EOL;\r\n }else {\r\n if ($dataKey==0) {\r\n echo \"<th scope='row'>$dataValue</th>\".PHP_EOL;\r\n }else {\r\n echo \"<td>$dataValue</td>\".PHP_EOL;\r\n }\r\n }\r\n }\r\n echo \"</tr>\";\r\n }\r\n echo '</table>'.PHP_EOL;\r\n }", "title": "" }, { "docid": "3855e607a8a94d0c2dbc280f980653ef", "score": "0.55851364", "text": "function write_csv($array) {\n $this->handle = fopen($this->filename, 'w');\n\n foreach ($array as $row) {\n fputcsv($this->handle, $row . PHP_EOL);\n \n }\n\n fclose($this->handle);\n\n }", "title": "" }, { "docid": "0a6cfea70eb99c4f8e0a114a3d37da79", "score": "0.5571207", "text": "protected function openCsvFile() {\n if(!is_file($this->filename) && !is_readable($this->filename)) {\n throw new \\Exception(_(\"The csv file does not exists or is not readable\"));\n }\n \n try {\n $this->csvFilePointer = fopen($this->filename, \"r\");\n $headerLine = $this->getNextLine();\n //\\Igestis\\Utils\\Dump::show($headerLine); exit;\n } catch (\\Exception $exc) {\n throw $exc;\n }\n \n $foundColumns = array();\n $wrongColumns = array();\n foreach ($headerLine as $key => $column) {\n $foundColumns[] = $column;\n if(!isset($this->columnsList[$column])) {\n $wrongColumns[] = \"'\" .$column . \"'\";\n }\n $this->columnsList[$column]['columnNumber'] = $key;\n }\n \n if(count($wrongColumns)) {\n throw new \\Exception(_(sprintf(\"The column(s) %s is/are not allowed in this import section\", implode(\",\", $wrongColumns))));\n }\n \n $missedColumns = array();\n foreach ($this->columnsList as $key =>$column) {\n if($column['required'] == true && !in_array($key, $foundColumns)) {\n $missedColumns[] = \"'\" . $key . \"'\";\n }\n }\n \n if(count($missedColumns)) {\n throw new \\Exception(_(sprintf(\"The column(s) %s is/are required but missing\", implode(\",\", $missedColumns))));\n }\n \n // Create the new entity and clean up old datas \n $this->setNewCsvImportEntity();\n \n }", "title": "" }, { "docid": "33374267c0c3151b230f3a6357ce0ea1", "score": "0.55701023", "text": "function getCsv()\n {\n return $this->csv;\n }", "title": "" }, { "docid": "4998e65f4940f7c581a0c9cc66a2498d", "score": "0.5566943", "text": "public function fillCsvFormFile($filename)\n {\n $this->_rootElement->find($this->filecsv)->setValue(\n getcwd() . DIRECTORY_SEPARATOR . $filename\n );\n }", "title": "" }, { "docid": "a423276469142dc96d637fffdd20ae69", "score": "0.55545574", "text": "public function getCsvFile(): string\n {\n return $this->csvFile;\n }", "title": "" }, { "docid": "ea601f6a2e8abff3a06e5dfeaefc2594", "score": "0.55318713", "text": "function str_putcsv($input, $delimiter = ',', $enclosure = '\"') {\n $fp = fopen('php://temp', 'r+');\n // ... write the $input array to the \"file\" using fputcsv()...\n fputcsv($fp, $input, $delimiter, $enclosure);\n // ... rewind the \"file\" so we can read what we just wrote...\n rewind($fp);\n // ... read the entire line into a variable...\n $data = fread($fp, 1048576); // [changed]\n // ... close the \"file\"...\n fclose($fp);\n // ... and return the $data to the caller, with the trailing newline from fgets() removed.\n return rtrim($data, \"\\n\");\n}", "title": "" }, { "docid": "94348b7ade797df6031ee61eaea2e35f", "score": "0.5528001", "text": "public function outputCSV();", "title": "" }, { "docid": "fb60efac746bb7644786b3e60ae658b4", "score": "0.5524299", "text": "public static function import_contact_entries() {\r\r\n $file_id = absint( $_REQUEST['file_id'] );\r\r\n $column_connections = $_REQUEST['column_connections'];\r\r\n $skip_first = $_REQUEST['skip_first'];\r\r\n $delimiter = ',';\r\r\n if( isset( $_REQUEST['import_delimiter'] ) ) {\r\r\n $delimiter = $_REQUEST['import_delimiter'];\r\r\n }\r\r\n $enclosure = '\"';\r\r\n if( isset( $_REQUEST['import_enclosure'] ) ) {\r\r\n $enclosure = stripslashes($_REQUEST['import_enclosure']);\r\r\n }\r\r\n $file = get_attached_file($file_id);\r\r\n $columns = array();\r\r\n $entries = array();\r\r\n if( $file ) {\r\r\n $row = 0;\r\r\n if (($handle = fopen($file, \"r\")) !== FALSE) {\r\r\n while (($data = fgetcsv($handle, 0, $delimiter, $enclosure)) !== FALSE) {\r\r\n $data = array_map( \"utf8_encode\", $data );\r\r\n if( ( $skip_first=='true' ) && ( $row==0 ) ) {\r\r\n $row++;\r\r\n continue;\r\r\n }\r\r\n $num = count($data);\r\r\n $row++;\r\r\n foreach( $data as $k => $v ) {\r\r\n $column_type = $column_connections[$k]['column'];\r\r\n $column_name = $column_connections[$k]['name'];\r\r\n $column_label = $column_connections[$k]['label'];\r\r\n if( $column_type=='form_id' ) {\r\r\n $column_name = 'hidden_form_id';\r\r\n $entries[$row]['data'][$column_name] = array(\r\r\n 'name' => $column_name,\r\r\n 'value' => $v,\r\r\n 'type' => $column_type\r\r\n );\r\r\n continue;\r\r\n }\r\r\n if( $column_type=='var' ) {\r\r\n $entries[$row]['data'][$column_name] = array(\r\r\n 'name' => $column_name,\r\r\n 'label' => $column_label,\r\r\n 'value' => $v,\r\r\n 'type' => $column_type\r\r\n );\r\r\n continue;\r\r\n }\r\r\n if( $column_type=='text' ) {\r\r\n $entries[$row]['data'][$column_name] = array(\r\r\n 'name' => $column_name,\r\r\n 'label' => $column_label,\r\r\n 'value' => $v,\r\r\n 'type' => $column_type\r\r\n );\r\r\n continue;\r\r\n }\r\r\n if( $column_type=='file' ) {\r\r\n $files = explode( \",\", $v ); \r\r\n $entries[$row]['data'][$column_name] = array(\r\r\n 'name' => $column_name,\r\r\n 'label' => $column_label,\r\r\n 'type' => 'files',\r\r\n 'files' => array()\r\r\n );\r\r\n foreach( $files as $k => $v ) {\r\r\n $entries[$row]['data'][$column_name]['files'][$k] = array(\r\r\n 'name' => $column_name,\r\r\n 'label' => $column_label,\r\r\n 'value' => $v,\r\r\n );\r\r\n }\r\r\n continue;\r\r\n }\r\r\n $entries[$row][$column_type] = $v;\r\r\n }\r\r\n }\r\r\n fclose($handle);\r\r\n }\r\r\n }\r\r\n\r\r\n /*\r\r\n $json = '';\r\r\n foreach( $entries as $k => $v ) {\r\r\n $json .= '{';\r\r\n $json .= '\"field\":\"source\",';\r\r\n $json .= '\"logic\":\"not_equal\",';\r\r\n $json .= '\"value\":\"English\",';\r\r\n $json .= '\"and_method\":\"and\",';\r\r\n $json .= '\"field_and\":\"target\",';\r\r\n $json .= '\"logic_and\":\"equal\",';\r\r\n $json .= '\"value_and\":\"'.$v['post_title'].'\",';\r\r\n $json .= '\"new_value\":\"'.str_replace(',', '.', $v['post_date']).'\"';\r\r\n $json .= '},';\r\r\n $json .= '{';\r\r\n $json .= '\"field\":\"source\",';\r\r\n $json .= '\"logic\":\"equal\",';\r\r\n $json .= '\"value\":\"'.$v['post_title'].'\",';\r\r\n $json .= '\"and_method\":\"and\",';\r\r\n $json .= '\"field_and\":\"target\",';\r\r\n $json .= '\"logic_and\":\"equal\",';\r\r\n $json .= '\"value_and\":\"'.$v['post_author'].'\",';\r\r\n $json .= '\"new_value\":\"'.str_replace(',', '.', $v['post_date']).'\"';\r\r\n $json .= '},';\r\r\n }\r\r\n echo $json;\r\r\n exit;\r\r\n */\r\r\n\r\r\n $settings = get_option( 'super_settings' );\r\r\n foreach( $entries as $k => $v ) {\r\r\n $data = $v['data'];\r\r\n $post_author = 0;\r\r\n if( isset( $v['post_author'] ) ) {\r\r\n $post_author = absint( $v['post_author'] );\r\r\n }\r\r\n $post_date = 0;\r\r\n if( isset( $v['post_date'] ) ) {\r\r\n $post_date = $v['post_date'];\r\r\n }\r\r\n $ip_address = '';\r\r\n if( isset( $v['ip_address'] ) ) {\r\r\n $ip_address = $v['ip_address'];\r\r\n }\r\r\n $post = array(\r\r\n 'post_status' => 'super_unread',\r\r\n 'post_type' => 'super_contact_entry',\r\r\n 'post_author' => $post_author,\r\r\n 'post_date' => $post_date\r\r\n ); \r\r\n $contact_entry_id = wp_insert_post($post);\r\r\n if( $contact_entry_id!=0 ) {\r\r\n add_post_meta( $contact_entry_id, '_super_contact_entry_data', $data);\r\r\n add_post_meta( $contact_entry_id, '_super_contact_entry_ip', $ip_address );\r\r\n if( isset( $v['post_title'] ) ) {\r\r\n $contact_entry_title = $v['post_title'];\r\r\n }else{\r\r\n $contact_entry_title = __( 'Contact entry', 'super-forms' );\r\r\n }\r\r\n if( $settings['contact_entry_add_id']=='true' ) {\r\r\n $contact_entry_title = $contact_entry_title . ' ' . $contact_entry_id;\r\r\n }\r\r\n $contact_entry = array(\r\r\n 'ID' => $contact_entry_id,\r\r\n 'post_title' => $contact_entry_title,\r\r\n );\r\r\n wp_update_post( $contact_entry );\r\r\n $imported++;\r\r\n }\r\r\n }\r\r\n\r\r\n echo '<div class=\"message success\">';\r\r\n echo sprintf( __( '%d of %d contact entries imported!', 'super-forms' ), $imported, count($entries) );\r\r\n echo '</div>';\r\r\n die();\r\r\n\r\r\n }", "title": "" }, { "docid": "d414752058c151801d33027821219d0d", "score": "0.55228376", "text": "public function uploadSaleCSV($validated)\n {\n $fileName = $validated['csv_file']->getClientOriginalName();\n Storage::putFileAs(config('path.csv').\n config('path.separator'), $validated['csv_file'], $fileName);\n return $this->saleDao->uploadSaleCSV($validated);\n }", "title": "" }, { "docid": "c5f8f430662a360393b8f14661cb3869", "score": "0.5514012", "text": "public function upload_csv(Request $request){\n if($request->hasFile('import_file')) {\n $data = Excel::toArray(new ImportSchool, $request->file('import_file'))[0];\n foreach ($data as $datum){\n $value = [\n \"school_name\" => @$datum[2],\n \"district\" => @$datum[1],\n \"address\" => @$datum[3],\n ];\n Ref_school::create($value);\n }\n }\n }", "title": "" }, { "docid": "a00190080a6aa1908fe4a340218e14d0", "score": "0.55127984", "text": "function upload_file()\n {\n $errmsg = '';\n if (($filehandle = PageControlFunctionsAndConsts::openUploadedCSVFile(\n self::FILE_POSTVAR,\n PageControlFunctionsAndConsts::BASE_UPLOAD_DIR . self::UPLOAD_SUBDIR,\n $errmsg)) == null) {\n PageControlFunctionsAndConsts::redirectDueToError($errmsg);\n return;\n }\n\n $db_conn = $this->db_conn;\n $restricted = ($_POST[self::PUBLISH_RADIO_ID] == self::YES_VALUE) ? 0 : 1;\n $date = date(\"m/d/y\");\n $userid = $_SESSION[PageControlFunctionsAndConsts::USERID_SESSVAR];\n $description = \"Not Available\";\n $count = 0;\n\n $line = fgets($filehandle);\n if ($line != false) {\n list ($prob_id, $exp_name, $catg, $spec, $subj, $reg_val, $open, $hour) =\n explode(\",\", trim($line));\n if ($exp_name && !DBFunctionsAndConsts::isExperimentInDB($db_conn, $exp_name)) {\n\n // Insert into EXPERIMENT table\n while ($line != false) {\n if (substr_count($line, \",\") != 7) {\n PageControlFunctionsAndConsts::redirectDueToError(\"There must be 8 columns in each line of the input file. The following line does not: \\n'{$line}'' \");\n return;\n }\n list ($prob_id, $exp_name, $catg, $spec, $subj, $reg_val, $open, $hour) =\n explode(\",\", trim($line));\n DBFunctionsAndConsts::insertIntoExpTbl($db_conn, $prob_id, $exp_name, $catg, $spec, $subj, $reg_val, $open, $userid, $date, $restricted, $hour);\n $count++;\n $line = fgets($filehandle);\n }\n\n // insert into EXPERIMENT_MASTER table\n if ($count) {\n DBFunctionsAndConsts::insertIntoExpMasterTbl($db_conn, $exp_name, $description, $userid, $date, $restricted, $count);\n }\n }\n }\n }", "title": "" }, { "docid": "c27e94d6ce86048a63001348430ad1b8", "score": "0.55104", "text": "function toCsv($data, $cols, $titles, $filename, $addDate = true)\n {\n \n $this->sessionState(0); // turn off sessions - no locking..\n\n $fh = fopen($filename,'w');\n \n \n foreach($data as $x) {\n //echo \"<PRE>\"; print_r(array($_REQUEST['csvCols'], $x->toArray())); exit;\n $line = array();\n if ($titles== '*') {\n $titles = $cols== '*' ? array_keys($x) : $cols;\n }\n if ($cols== '*') {\n $cols= array_keys($x);\n }\n if ($titles !== false) {\n fputcsv($fh,$titles);\n \n \n //fputcsv($fh, $titles);\n $titles = false;\n }\n $ar = array();\n foreach($cols as $c) {\n $ar[] = $x[$c];\n }\n fputcsv($fh,$ar);\n \n \n }\n \n fclose($fh);\n $this->jok(\"Wrote file : \" . $filename);\n exit;\n \n \n \n }", "title": "" }, { "docid": "360816c6006ee1ec389f3d78a2d5cd52", "score": "0.55033666", "text": "function processItemsCsv($itemsFileName) {\n $itemsHandle = fopen($itemsFileName, \"r\");\n if (!$itemsHandle) {\n print(\"Cannot access file $itemsFileName\\n\");\n return false;\n }\n\n $items = array();\n while (($item = fgetcsv($itemsHandle, 0, ',')) !== FALSE) {\n if (count($item) !== 4) {\n print(\"$itemsFileName: wrong file format\\n\");\n return false;\n }\n\n $item = array(\n 'item' => $item[0], \n 'amount' => $item[1], \n 'unit' => $item[2], \n 'useby' => $item[3]\n );\n\n //convert time format from '1/1/1970' to '1-1-1970' for function strtotime\n $item['useby'] = str_replace('/', '-', $item['useby']);\n array_push($items, $item);\n }\n\n if (count($items) === 0) {\n print(\"$itemsFileName is empty\\n\");\n return false;\n }\n\n return $items;\n}", "title": "" }, { "docid": "f577d1ce1c26889a67a5972b3852e0e4", "score": "0.54996514", "text": "function attendance_bulkupload() {\n $count = 0;\n $fp = fopen($_FILES['upload_csv_file']['tmp_name'], 'r') or die(\"can't open file\");\n if (($handle = fopen($_FILES['upload_csv_file']['tmp_name'], 'r')) !== FALSE) {\n while ($csv_line = fgetcsv($fp, 1024)) {\n //keep this if condition if you want to remove the first row\n for ($i = 0, $j = count($csv_line);$i < $j;$i++) {\n $insert_csv = array();\n $insert_csv['employee_id'] = (!empty($csv_line[0]) ? $csv_line[0] : null);\n $insert_csv['date'] = (!empty($csv_line[1]) ? $csv_line[1] : null);\n $insert_csv['sign_in'] = (!empty($csv_line[2]) ? $csv_line[2] : null);\n $insert_csv['sign_out'] = (!empty($csv_line[3]) ? $csv_line[3] : null);\n $insert_csv['staytime'] = (!empty($csv_line[4]) ? $csv_line[4] : null);\n }\n $date = date(\"Y-m-d\", strtotime($insert_csv['date']));\n $sign_out = date(\"h:i:s a\", strtotime($insert_csv['sign_out']));\n $sign_in = date(\"h:i:s a\", strtotime($insert_csv['sign_in']));\n $in = new DateTime($sign_in);\n $Out = new DateTime($sign_out);\n $interval = $in->diff($Out);\n $stay = $interval->format('%H:%I:%S');\n $attendancedata = array('employee_id' => $insert_csv['employee_id'], 'date' => $date, 'sign_in' => $sign_in, 'sign_out' => $sign_out, 'staytime' => $stay,);\n if ($count > 0) {\n $this->db->insert('attendance', $attendancedata);\n }\n $count++;\n }\n }\n $this->session->set_userdata(array('message' => display('successfully_added')));\n redirect(base_url('Cattendance/manage_attendance'));\n }", "title": "" }, { "docid": "fc381b38b21fb17c1c14eb4454dc44da", "score": "0.5496371", "text": "public function saveCsvFile(string $path)\n {\n $this->validationService->validateCsvFields($path, self::CONTACTS_COLUMN_MAP);\n $data = array_map('str_getcsv', file($path));\n\n $this->validationService->validateColumns($data, self::MINIMUM_CSV_ROWS);\n $csvValues = $this->prepareCsvDataForSaving($data, self::CONTACTS_COLUMN_MAP);\n\n $this->saveInDB($csvValues);\n }", "title": "" }, { "docid": "bce1e6627dae12c733a352d4c31a01fd", "score": "0.5491257", "text": "public static function escape_csv( $value ) {\n\t\tif ( '=' === $value[0] ) {\n\t\t\t// escape the = to prevent vulnerability\n\t\t\t$value = \"'\" . $value;\n\t\t}\n\t\t$value = str_replace( '\"', '\"\"', $value );\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "4c9ba5cc8428544c84bef060a447b69f", "score": "0.54883057", "text": "function ReadCSVFilefortuneofr($l, $f) {\n//read file and push into Extraits, fortuneoFR .csv format\n//echo (\"<br/\");\n// not enough data to have a full key ...\n$row = 0;\n$sNotDef=\"\";//empty \n$CptSRC=\"Fortuneo_P.Calderon\"; // ??????????\nif (($handle=fopen($f, \"r\"))!=FALSE) {\n echo ($f.\"<br/>\");\n while (($data = fgetcsv($handle, 0, \";\")) !== FALSE) {\n \t{//dump data;\n\t/*\n\techo '<table id=\"t00\">';\n\tforeach ($data as $key => $value) {\n\t echo \"<tr>\";\n\t echo \"<td>\";\n\t echo $key;\n\t echo \"</td>\";\n\t echo \"<td>\";\n\t echo $value;\n\t echo \"</td>\";\n\t echo \"</tr>\";\n\t }\n\t echo '</table>';\n\t//end dump data;\n\t*/\n\t}\n \n $num = count($data);\n\t$row++;\n /*\n \t\t\tCr�dit\nNumero_de_compte ,0 \t// MANUAL !\nNom_du_compte ,1 \t//\nCompte_partie_adverse ,2 \t//\nNumero_de_mouvement ,3 \t//\nDate_comptable , 4 \t//(0) Date op�ration format is dd/mm/yyyy\nDate_valeur,5\t\t\t//(1) Date valeur\nMontant ,6\t\t\t//(3) D�bit + (4) Cr�dit\nDevise ,7\t\t\t// 'EUR'\nLibelles ,8\t\t\t//(2) libell�\nDetails_du_mouvement ,9\nMessage , 10\n */\n\tif (substr($data[1],0,4)=='Date') { //msg(\"Data '\".$data[1] .\"' on row \" .$row.\" not valid, skipping...\");\t\t\n\t\t}\n\telse \t{\n\t\t$mv= '';\n\t\tif (empty($data[0])) {$data[0]='01/01/1900';} else {}\n\t\tif (empty($data[1])) {$data[1]='01/01/1900';} else {}\necho $data[0];\necho $data[1];\n\t\t$Dc=date_create_from_format('j/m/Y', $data[0]);\n\t\t$Dv=date_create_from_format('j/m/Y', $data[1]);\n\n\n\t\t$Dc=date_format($Dc, 'Y-m-d');\n\t\t$Dv=date_format($Dv, 'Y-m-d');\n\t\tif (is_null($data[3])){$data[3]=0;}\n\t\tif (is_null($data[4])){$data[4]=0;}\n\t\t$data[3]= str_replace(\".\",\"\",$data[3]);\n\t\t$data[3]= str_replace(\",\",\".\",$data[3]);\n\t\t$data[4]= str_replace(\".\",\"\",$data[4]);\n\t\t$data[4]= str_replace(\",\",\".\",$data[4]);\n\t\t\n\t\t$mo=$data[3]+$data[4];\n\n\t\t$d8 = mysqli_real_escape_string($l, trim($data[2]));\n\n\t\t$s=\"INSERT IGNORE INTO Extraits (Numero_de_compte, Nom_du_compte, Compte_partie_adverse, Numero_de_mouvement ,Date_comptable,Date_valeur,Montant,Devise,\n\t\tLibelles,Details_du_mouvement,Message) SELECT \n\t\t'\".$CptSRC.\"','Phil','nd','\".time().\"',\n\t\t'\".$Dc.\"','\".$Dv.\"',\".$mo.\",'EUR',\n\t\t'\".$d8.\"','','';\";\n\t\techo ($s);\n\t\tsExecSQL($l,$s, True);\n\t\t//fill comptes name table\n\t\t/*\n\t\tif (trim($data[2])==$sNotDef ){//if 'Compte_partie_adverse' is empty do nothing\n\t\t }\n\t\t else{ //insert num and 'detail' value\n\t\t $s=\"INSERT IGNORE INTO CompteNames (Numero_de_compte,Compte_Name) SELECT\n\t\t\t'\".$data[2].\"', '\" . mysqli_real_escape_string($l,$d9).\"';\n\t\t\t\";\n\t\t }\n\t\t//echo $s.\"<br/>\";\n\t\tsExecSQL($l,$s, True);\n\t\t*/\n\t\t}\n\t }\n\t }\n\telse\n\t{Msg(print_r(error_get_last()));\n\treturn -1;\n\t}\n fclose($handle);\n //msg (\"Read \".$row.\" lines\");\nreturn $row ;\n}", "title": "" }, { "docid": "fe1a1d023e16278002f2b7d40bf9ee94", "score": "0.5482528", "text": "static function save_csv_datas($temp_attr_response,$nb_rows_begin = 0,$nb_cols_begin = 0){\n\n for($i=0; $i<count($temp_attr_response)+$nb_cols_begin;$i++){\n if($i<$nb_cols_begin) $attr_response[$i] = \"\"; else $attr_response[$i] = $temp_attr_response[$i-$nb_cols_begin];\n }\n\n //Vérification de la forme (Si étudiant email tuteurs presents)\n if(preg_grep ('/^student\\/(\\w+)/i', $attr_response))\n if(!preg_grep ('/^ti\\/email/i', $attr_response) || !preg_grep ('/^te\\/email/i', $attr_response) || !(preg_grep ('/^student\\/name/i', $attr_response) && preg_grep ('/^student\\/fname/i', $attr_response)))\n throw new \\PersonalizeException(1090);\n\n $te_datas = array();\n $ti_datas = array();\n $students_datas = array();\n $file_path = TEMP_PATH.Log::get_id().'.csv';\n\n //Vérification de l'existence du fichier\n if(!is_file($file_path))\n throw new \\PersonalizeException(2001);\n\n $csv_object = new parseCSV($file_path);\n\n //On récupérer les correspondances\n foreach($attr_response as $key=>$content)\n {\n if($content == 'te/email')\n $id_cols_te_mail = $key;\n if($content == 'ti/email')\n $id_cols_ti_mail = $key;\n }\n\n //On sépare les données\n foreach($csv_object->get_datas() as $id_rows=>$rows){\n if($id_rows >= $nb_rows_begin)\n {\n foreach($rows as $id_cols=>$cols){\n $cols = utf8_encode($cols);\n if($id_cols >= $nb_cols_begin)\n {\n if(preg_match('/^te\\/(\\w+)/i',$attr_response[$id_cols]))\n $te_datas[$rows[$id_cols_te_mail]][str_replace('te/','',$attr_response[$id_cols])] = $cols;\n if(preg_match('/^ti\\/(\\w+)/i',$attr_response[$id_cols]))\n $ti_datas[$rows[$id_cols_ti_mail]][str_replace('ti/','',$attr_response[$id_cols])] = $cols;\n if(preg_match('/^student\\/(\\w+)/i',$attr_response[$id_cols]))\n $students_datas[$id_rows][str_replace('student/','',$attr_response[$id_cols])] = $cols;\n\n }\n }\n $students_datas[$id_rows]['te_email'] = $rows[$id_cols_te_mail];\n $students_datas[$id_rows]['ti_email'] = $rows[$id_cols_ti_mail];\n }\n }\n\n $exceptions = array();\n\n //Requetes pour les Tuteurs Entreprises\n foreach($te_datas as $key=>$content){\n if(!(($te_datas[$key]['id'] = PDOQueries::get_UserID_with_email($key)) > 0))\n try{\n if(self::registration_by_admin($content['email'],2,false,$content['name'],$content['fname'],$content['phone']))\n if(($te_datas[$key]['id'] = PDOQueries::get_UserID_with_email($key)) == 0)\n $exceptions['te'][] = \"Erreur lors de l'ajout ({$key})\";\n }catch(\\Exception $e){\n $exceptions['te'][] = $e->getMessage().\" ({$key})\";\n }\n }\n\n //Requetes pour les Tuteurs IUT\n foreach($ti_datas as $key=>$content){\n if(!(($ti_datas[$key]['id'] = PDOQueries::get_UserID_with_email($key)) > 0))\n try{\n if(self::registration_by_admin($content['email'],3,false,$content['name'],$content['fname'],$content['phone']))\n if(($ti_datas[$key]['id'] = PDOQueries::get_UserID_with_email($key)) == 0)\n $exceptions['ti'][] = \"Erreur lors de l'ajout ({$key})\";\n }catch(\\Exception $e){\n $exceptions['ti'][] = $e->getMessage().\" ({$key})\";\n }\n }\n\n //Aménagement des données pour les étudiant + Ajout des données\n foreach($students_datas as $key=>$content){\n if(isset($content['name'],$content['fname'])){\n $id_te = $te_datas[$content['te_email']]['id'];\n $id_ti = $ti_datas[$content['ti_email']]['id'];\n $name = $content['name'];\n $fname = $content['fname'];\n $email = is_null($content['email']) ? \"\" : $content['email'];\n $group = is_null($content['group']) ? \"\" : $content['group'];\n $phone = is_null($content['phone']) ? \"\" : $content['phone'];\n if(!self::add_student($id_te,$id_ti,$name,$fname,$group,$email,$phone))\n $exceptions['student'][] = \"Erreur lors de l'ajout ({$fname} {$name})\";\n }\n }\n\n //Suppression du fichier temporaire\n file::delete($file_path);\n\n if(count($exceptions['student']) == 0 && count($exceptions['ti']) == 0 && count($exceptions['te']) == 0)\n return true;\n if(count($exceptions['student']) == count($students_datas) && count($exceptions['ti']) == count($ti_datas) && count($exceptions['te']) == count($te_datas))\n throw new AddCSVDataException('Aucune données n\\'a put être enregistré !',2);\n else\n throw new AddCSVDataException('Certaines données n\\'ont pas put être enregistré !',1,$exceptions);\n }", "title": "" }, { "docid": "50a16703ffaae8d458461d95d49c46be", "score": "0.547978", "text": "function add_row(&$file_handle, $data, $row_count, $field_titles);", "title": "" }, { "docid": "326073bb6a85905d030fb5d50e46c642", "score": "0.54769975", "text": "function import_phonebook()\n\t{\n\t\t$this->load->library('csvreader');\n\t\t$filePath = $_FILES[\"csvfile\"][\"tmp_name\"];\n\t\t$csvData = $this->csvreader->parse_file($filePath, true);\t\n\t\t\n\t\t$n=0;\n\t\tforeach($csvData as $field):\n\t\t\t$pbk['Name'] = $field[\"Name\"];\n\t\t\t$pbk['Number'] = $field[\"Number\"];\n\t\t\t$pbk['GroupID'] = $this->input->post('importgroupvalue');\n\t\t\t$pbk['id_user'] = $this->input->post('pbk_id_user');\t\t\t\n\t\t\t$this->Phonebook_model->add_contact($pbk);\n\t\t\t$n++;\n\t\tendforeach;\n\t\t\n\t\t$this->session->set_flashdata('notif', $n.' contacts successfully imported');\n\t\tredirect('phonebook');\t\t \n\t}", "title": "" }, { "docid": "f987ce0d7d9311e45126854fd03c24d2", "score": "0.547672", "text": "function csvimport() {\n\t\tJTable::addIncludePath ( JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_freestroke' . DIRECTORY_SEPARATOR . 'tables' );\n\t\t$object = & JTable::getInstance ( 'swimstyle', 'FreestrokeTable' );\n\t\t$object_fields = get_object_vars ( $object );\n\t\t\n\t\t$msg = '';\n\t\tif ($file = JRequest::getVar ( 'importfile', null, 'files', 'array' )) {\n\t\t\t$handle = fopen ( $file ['tmp_name'], 'r' );\n\t\t\tif (! $handle) {\n\t\t\t\t$msg = JText::_ ( 'Cannot open uploaded file.' );\n\t\t\t\t$this->setRedirect ( 'index.php?option=com_freestroke&view=swimstyles', $msg, 'error' );\n\t\t\t}\n\t\t\t\n\t\t\t// get fields, on first row of the file\n\t\t\t$fields = array ();\n\t\t\tif (($data = fgetcsv ( $handle, 1000, ';', '\"' )) !== FALSE) {\n\t\t\t\t$numfields = count ( $data );\n\t\t\t\tfor($c = 0; $c < $numfields; $c ++) {\n\t\t\t\t\t// here, we make sure that the field match one of the fields of freestroke_members table or special fields,\n\t\t\t\t\t// otherwise, we don't add it\n\t\t\t\t\tif (array_key_exists ( strtolower ( $data [$c] ), $object_fields )) {\n\t\t\t\t\t\t$fields [$c] = strtolower ( $data [$c] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If there is no validated fields, there is a problem...\n\t\t\tif (! count ( $fields )) {\n\t\t\t\t$msg .= \"<p>Error parsing column names. Are you sure this is a proper csv export ?<br />try to export first to get an example of formatting</p>\\n\";\n\t\t\t\t$this->setRedirect ( 'index.php?option=com_freestroke&view=swimstyles', $msg, 'error' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t$msg .= \"<p>\" . $numfields . \" fields found in first row</p>\\n\";\n\t\t\t\t$msg .= \"<p>\" . count ( $fields ) . \" fields were kept</p>\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t// Now get the records, meaning the rest of the rows.\n\t\t\t$records = array ();\n\t\t\t$row = 1;\n\t\t\twhile ( ($data = fgetcsv ( $handle, 10000, ';', '\"' )) !== FALSE ) {\n\t\t\t\t$num = count ( $data );\n\t\t\t\tif ($numfields != $num) {\n\t\t\t\t\t$msg .= \"<p>Wrong number of fields ($num) record $row<br /></p>\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$r = array ();\n\t\t\t\t\t// only extract columns with validated header, from previous step.\n\t\t\t\t\tforeach ( $fields as $k => $v ) {\n\t\t\t\t\t\t$r [] = $data [$k];\n\t\t\t\t\t}\n\t\t\t\t\t$records [] = $r;\n\t\t\t\t}\n\t\t\t\t$row ++;\n\t\t\t}\n\t\t\tfclose ( $handle );\n\t\t\t$msg .= \"<p>total records found: \" . count ( $records ) . \"<br /></p>\\n\";\n\t\t\t\n\t\t\t// database update\n\t\t\tif (count ( $records )) {\n\t\t\t\t$model = $this->getModel ( 'swimstyles' );\n\t\t\t\t$result = $model->import ( $fields, $records, $replace );\n\t\t\t\t$msg .= \"<p>total added records: \" . $result ['added'] . \"<br /></p>\\n\";\n\t\t\t\t$msg .= \"<p>total updated records: \" . $result ['updated'] . \"<br /></p>\\n\";\n\t\t\t}\n\t\t\t$this->setRedirect ( 'index.php?option=com_freestroke&view=swimstyles', $msg );\n\t\t} else {\n\t\t\tparent::display ();\n\t\t}\n\t}", "title": "" }, { "docid": "cd5e00c0830d6c555ff538ea8ad7ba9b", "score": "0.5461156", "text": "function str_putcsv($data) {\n $fh = fopen('php://temp', 'rw'); # don't create a file, attempt\n # to use memory instead\n\n # write out the headers\n fputcsv($fh, array_keys(current($data)));\n\n # write out the data\n foreach ( $data as $row ) {\n fputcsv($fh, $row);\n }\n rewind($fh);\n $csv = stream_get_contents($fh);\n fclose($fh);\n\n return $csv;\n\t}", "title": "" }, { "docid": "0b7e3a514946e82f09189d4dcbc7b844", "score": "0.5460708", "text": "function set_data_set_student($file_in) {\n $lines = file($file_in);\n $this->student_csv_raw = $lines;\n foreach ($lines as $key => $val) {\n if (!empty($val)) { // only add non-empty lines\n if ($key == 0) { // put headers into their own array\n $this->student_header_arr = explode(',', $val);\n } else { // put everything else into another array\n $tmp_array = explode(',', $val);\n foreach ($tmp_array as $value) {\n rtrim($value); // clean array elements of unwanted char\n }\n $this->student_data_arr[] = $tmp_array;\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7f6b03324f0b6b8aff286086be02d70a", "score": "0.5452018", "text": "private function prepareerrorcsv($newCsvData,$company_id,$company_client_number){\n\n\n\t\t$session = \\Yii::$app->session;\n\t\t\n\t\tif (\\Yii::$app->SessionCheck->isclientLogged () == true) { // checking logged session\n\t\t\n\t\t/**\n\t\t * Declaring session variables***\n\t\t */\n\t\t$logged_user_id = $session ['client_user_id'];\n\t\t$logged_email = $session ['client_email']; \n\t\t\n\t\t$webroot = getcwd ();\n\t\t$time = time();\n\t\t$template = (new TblAcaPlanCoverageType ())->plancheck ( $company_id );\n\t\t$model_companies = new TblAcaCompanies();\n\t\t\n\t\t\t\t\n\t\t\t\t// create folder\n\t\tif (!file_exists(getcwd().'/files/csv/error_csv/'.$company_client_number)) {\n\t\t\tmkdir(getcwd().'/files/csv/error_csv/'.$company_client_number, 0777, true);\n\t\t}\n\t\t\n\t\t\n\t\tif (! empty ( $template )) {//PayrollTemplate_no.csv\n\t\t\n\t\t\t$name = 'payroll_no_'.$time.'.csv';\n\t\t\n\t\t\t$file_error_payrolldata = $webroot . DIRECTORY_SEPARATOR . 'files' .DIRECTORY_SEPARATOR . 'csv' .DIRECTORY_SEPARATOR . 'error_csv' .DIRECTORY_SEPARATOR .$company_client_number .DIRECTORY_SEPARATOR .$name;\n\t\t\t\n\t\t\t$fp1 = fopen ( $file_error_payrolldata, 'w' );\n\t\t\t\n\t\t\t\n\t\t\t$header = array('Legal First Name','M.I.','Legal Last Name','Suffix','SSN','Address 1','Apt #, Suite','City or Town','Two Letter State','zip(5 digits)','Date of Birth','Notes','Hire Date 1','Termination Date 1','Medical Plan Class Name 1' ,'FT/PT Status 1','Don t Apply Waiting Period (Yes or No) 1','Hire Date 2','Termination Date 2','Medical Plan Class Name 2','FT/PT Status 2','Don t Apply Waiting Period (Yes or No) 2','Hire Date 3','Termination Date 3','Medical Plan Class Name 3','FT/PT Status 3','Don t Apply Waiting Period (Yes or No) 3','Hire Date 4','Termination Date 4','Medical Plan Class Name 4','FT/PT Status 4','Dont Apply Waiting Period (Yes or No) 4','Hire Date 5','Termination Date 5','Medical Plan Class Name 5','FT/PT Status 5','Don t Apply Waiting Period (Yes or No) 5','Hire Date 6','Termination Date 6','Medical Plan Class Name 6','FT/PT Status 6','Don t Apply Waiting Period (Yes or No) 6','Hire Date 7','Termination Date 7','Medical Plan Class Name 7','FT/PT Status 7','Dont Apply Waiting Period (Yes or No) 7','Hire Date 8','Termination Date 8','Medical Plan Class Name 8','FT/PT Status 8','Dont Apply Waiting Period (Yes or No) 8','Hire Date 9','Termination Date 9','Medical Plan Class Name 9','FT/PT Status 9','Don t Apply Waiting Period (Yes or No) 9','Hire Date 10','Termination Date 10','Medical Plan Class Name 10','FT/PT Status 10','Don t Apply Waiting Period (Yes or No) 10','Hire Date 11','Termination Date 11','Medical Plan Class Name 11','FT/PT Status 11','Don t Apply Waiting Period (Yes or No) 11','Hire Date 12','Termination Date 12','Medical Plan Class Name 12','FT/PT Status 12','Don t Apply Waiting Period (Yes or No) 12','Employee Contribution for january','Employee Contribution for February','Employee Contribution for March','Employee Contribution for April','Employee Contribution for May','Employee Contribution for June','Employee Contribution for July','Employee Contribution for Aug','Employee Contribution for September','Employee Contribution for October','Employee Contribution for November','Employee Contribution for December'\n\t\t\t\t\t);\n\t\t\tfputcsv($fp1,$header);\n\t\t\t\n\t\t} else {//PayrollTemplate_Yes.csv\n\t\t\n\t\t\t$name = 'payroll_yes_'.$time.'.csv';\n\t\t\t\n\t\t\t$file_error_payrolldata = $webroot . DIRECTORY_SEPARATOR . 'files' .DIRECTORY_SEPARATOR . 'csv' .DIRECTORY_SEPARATOR . 'error_csv' .DIRECTORY_SEPARATOR .$company_client_number .DIRECTORY_SEPARATOR .$name;\n\n\t\t\t$fp1 = fopen ( $file_error_payrolldata, 'w' );\n\t\t\t\t\n\t\t\t$header = array('Legal First Name','M.I.','Legal Last Name','Suffix','SSN','Address 1','Apt # ,Suite','City or Town','Two Letter State','zip (5 digit)','Date of Birth','Notes','Hire Date 1','Termination Date 1','Medical Plan Class Name 1 ','FT/PT Status 1','Dont Apply Waiting Period (Yes or No) 1','Hire Date 2','Termination Date 2','Medical Plan Class Name 2','FT/PT Status 2','Dont Apply Waiting Period (Yes or No) 2','Hire Date 3','Termination Date 3','Medical Plan Class Name 3','FT/PT Status 3','Dont Apply Waiting Period (Yes or No) 3','Hire Date 4','Termination Date 4','Medical Plan Class Name 4','FT/PT Status 4','Dont Apply Waiting Period (Yes or No) 4','Hire Date 5','Termination Date 5','Medical Plan Class Name 5','FT/PT Status 5','Dont Apply Waiting Period (Yes or No) 5','Hire Date 6','Termination Date 6','Medical Plan Class Name 6','FT/PT Status 6','Dont Apply Waiting Period (Yes or No) 6','Hire Date 7','Termination Date 7','Medical Plan Class Name 7','FT/PT Status 7','Dont Apply Waiting Period (Yes or No) 7','Hire Date 8','Termination Date 8','Medical Plan Class Name 8','FT/PT Status 8','Dont Apply Waiting Period (Yes or No) 8','Hire Date 9','Termination Date 9','Medical Plan Class Name 9','FT/PT Status 9','Dont Apply Waiting Period (Yes or No) 9','Hire Date 10','Termination Date 10','Medical Plan Class Name 10','FT/PT Status 10','Dont Apply Waiting Period (Yes or No) 10','Hire Date 11','Termination Date 11','Medical Plan Class Name 11','FT/PT Status 11','Dont Apply Waiting Period (Yes or No) 11','Hire Date 12','Termination Date 12','Medical Plan Class Name 12','FT/PT Status 12','Dont Apply Waiting Period (Yes or No) 12'\n\t\t\t);\n\t\t\tfputcsv($fp1,$header);\n\t\t}\n\t\t\n\t\t\n\t\tforeach ($newCsvData as $line) {\n\t\t\n\t\t\t$v=implode(\", \",$line);\n\t\t\t$array_v = array($v);\n\t\t\t\t\n\t\t\tforeach ($array_v as $l)\n\t\t\t{\n\t\t\t\tfputcsv($fp1,explode(',',$l));\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tfclose($fp1);\n\t\t//print_r('nok');\n\t\t\n\t\t\n\t\t\n\t\t/**\n\t\t * **** upload the document into sharefile *******\n\t\t */\n\t\t\n\t\t/**\n\t\t * ***** getting the sharefile credentials *****\n\t\t */\n\t\t$share_file = json_decode ( file_get_contents ( getcwd () . '/config/sharefile-credentials.json' ) );\n\t\t\n\t\t/*$hostname = \\Yii::$app->params['shareFileHostname'];\n\t\t$client_api_id = \\Yii::$app->params['shareFileClientApiId'];\n\t\t$client_secret = \\Yii::$app->params['shareFileClientSecret'];*/\n\t\t\n\t\t$hostname = $share_file->hostname;\n\t\t$client_api_id = $share_file->client_api_id;\n\t\t$client_secret = $share_file->client_secret;\n\n\t\t\n\t\t/**\n\t\t * ***** getting the sharefile folder details based on comapny id *****\n\t\t */\n\t\t$folder_details = TblAcaSharefileFolders::find ()->where ( [ \n\t\t\t\t'company_id' => $company_id \n\t\t] )->One ();\n\t\tif (! empty ( $folder_details )) {\n\t\t\t$sharefile_folder_id = $folder_details->sharefile_folder_id;\n\t\t}\n\t\t\n\t\t$attachment = '';\n\t\t$attachment = $local_path = getcwd().'/files/csv/error_csv/'.$company_client_number.'/'.$name;\t\t\n\t\t\n\n\t\t/**\n\t\t * ***** getting the sharefile login details based on logged id *****\n\t\t */\n\t\t$sharefile_details = TblAcaSharefileEmployees::find ()->where ( [ \n\t\t\t\t'user_id' => $logged_user_id \n\t\t] )->One ();\n\t\tif (! empty ( $sharefile_details )) {\n\t\t\t$new_username = $sharefile_details->username;\n\t\t\t$enc_password = $sharefile_details->password;\n\t\t\t$new_password = \\Yii::$app->EncryptDecrypt->decryptUser ( $enc_password );\n\t\t\t$client_logged_id = $sharefile_details->user_id;\n\t\t\t\n\t\t\t//$local_path = getcwd().'/files/csv/error_csv/'.$company_client_number.'/'.$name;\n\t\t\t// print_r($local_path);die();\n\t\t\t$result = \\Yii::$app->Sharefile->upload_file ( $hostname, $client_api_id, $client_secret, $new_username, $new_password, $sharefile_folder_id, $local_path );\n\t\t}\n\t\t/**\n\t\t* ** removing files **\n\t\t*/\n\t\t/*if($result){\n\t\t\n\t\t\t\t\t\texec ( 'rm ' . getcwd () . '/files/csv/error_csv/'.$company_client_number.'/'.$name);\t\n\t\t}*/\n\t\t\n\t\t\n\t\t//send error mail\n\t\t//get company detail\n\t\t$check_company_details = $model_companies->Companyuniquedetails ( $company_id ); // Company detail\n\t\t$client_details = TblAcaClients::Clientuniquedetails($check_company_details->client_id);\n\t\t\n\t\t$model_brands = TblAcaBrands::Branduniquedetails ( $client_details->brand_id );\n\t\t$brand_emailid=$model_brands->support_email;\n\t\t$brand_phonenumber=$model_brands->support_number;\n\t\tif(!empty($model_brands->brand_logo)){\n\t\t\t$picture = 'profile_image/brand_logo/'.$model_brands->brand_logo;\n\t\t}else{\n\t\t\t$picture = 'ACA-Reporting-Logo.png';\n\t\t}\n\t\t$brand_name = $model_brands->brand_name;\n\t\t$link_brandimage = \\Yii::$app->urlManager->createAbsoluteUrl ( '/Images' ).'/'. $picture;\n\t\t\n\t\t//recepients \n\t\tif(!empty($client_details->account_manager)){\n\t\t\n\t\t$manager_details = TblAcaUsers::find()->select('useremail')->where(['user_id'=>$client_details->account_manager])->One();\n\t\t$manager_name_details = TblAcaStaffUsers::find()->select('first_name, last_name')->where(['user_id'=>$client_details->account_manager])->One();\n\t\t$recepients[0]['name'] = '';\n\t\t$recepients[0]['email'] = $manager_details->useremail;\n\t\t\n\t\tif(!empty($manager_name_details)){\n\t\t$recepients[0]['name'] = $manager_name_details->first_name.' '. $manager_name_details->last_name;\n\t\t}\n\t\t\n\t\t\n\t\t}\n\t\t\n\t\tif($client_details->package_type == 14)\n\t\t{\n\t\t\t\n\t\t$recepients[1]['email'] = '[email protected]';\n\t\t$recepients[1]['name'] = '[email protected]';\n\t\t\n\t\t}\n\t\t\n\t\t$created_by_user_detail = TblAcaUsers::find()->select('useremail')->where(['user_id'=>$logged_user_id])->One();\n\t\t$created_by_name_details = TblAcaCompanyUsers::find()->select('first_name, last_name')->where(['user_id'=>$logged_user_id,'client_id'=>$check_company_details->client_id])->One();\n\t\t$recepients[2]['name'] = '';\n\t\t$recepients[2]['email'] = $created_by_user_detail->useremail;\n\t\t\n\t\tif(!empty($created_by_name_details)){\n\t\t$recepients[2]['name'] = $created_by_name_details->first_name.' '.$created_by_name_details->last_name;\n\t\t}\n\t\t\n\t\t\t\n\t\t\\Yii::$app->CustomMail->Senderrorreport($recepients,$brand_emailid,$brand_phonenumber,$link_brandimage,$attachment,$check_company_details->company_name,$check_company_details->company_client_number); \n\t\t\n\t\t/**\n\t\t\t* ** removing files **\n\t\t\t*/\n\t\t\tif (file_exists ( $attachment ))\n\t\t\t{\n\t\t\t\tunlink ( $attachment );\n\t\t\t}\n\t\t\n\t\n\t\t\n\t\t} else {\n\t\t\t\\Yii::$app->SessionCheck->clientlogout ();\n\t\t\t\n\t\t\treturn $this->goHome ();\n\t\t}\n\n\t\t\n\t\t\t\n\t}", "title": "" } ]
997b2a1e9a77a0a0daa149cafa7fc34c
Creates data provider instance with search query applied
[ { "docid": "c27511d0f3a855ec13caceef5eda6c44", "score": "0.0", "text": "public function search($params)\n {\n $query = DataCatin::find();\n\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n // grid filtering conditions\n $query->andFilterWhere([\n 'id' => $this->id,\n 'user_id' => $this->user_id,\n 'status_data' => $this->status_data,\n 'status_perkawinan' => $this->status_perkawinan,\n 'pernikahan_ke' => $this->pernikahan_ke,\n ]);\n\n $query->andFilterWhere(['like', 'nama_lengkap', $this->nama_lengkap])\n ->andFilterWhere(['like', 'tempat_tgl_lahir', $this->tempat_tgl_lahir])\n ->andFilterWhere(['like', 'no_ktp', $this->no_ktp])\n ->andFilterWhere(['like', 'kewarganearaan', $this->kewarganearaan])\n ->andFilterWhere(['like', 'pekerjaan', $this->pekerjaan])\n ->andFilterWhere(['like', 'agama', $this->agama])\n ->andFilterWhere(['like', 'alamat', $this->alamat])\n ->andFilterWhere(['like', 'foto', $this->foto])\n ->andFilterWhere(['like', 'nasab_a', $this->nasab_a])\n ->andFilterWhere(['like', 'nasab_b', $this->nasab_b])\n ->andFilterWhere(['like', 'nasab_c', $this->nasab_c])\n ->andFilterWhere(['like', 'nama_pejabat_pemberi_izin', $this->nama_pejabat_pemberi_izin])\n ->andFilterWhere(['like', 'nomor_izin_pejabat', $this->nomor_izin_pejabat])\n ->andFilterWhere(['like', 'tgl_izin_surat', $this->tgl_izin_surat])\n ->andFilterWhere(['like', 'wna_instansi', $this->wna_instansi])\n ->andFilterWhere(['like', 'wna_no_izin', $this->wna_no_izin])\n ->andFilterWhere(['like', 'wna_tgl_surat', $this->wna_tgl_surat])\n ->andFilterWhere(['like', 'izin_pengadilan_belum_umur', $this->izin_pengadilan_belum_umur])\n ->andFilterWhere(['like', 'no_izin_pengadilan_belum_umur', $this->no_izin_pengadilan_belum_umur])\n ->andFilterWhere(['like', 'tgl_izin_pengadilan_belum_umur', $this->tgl_izin_pengadilan_belum_umur])\n ->andFilterWhere(['like', 'nama_pemeberi_izin', $this->nama_pemeberi_izin])\n ->andFilterWhere(['like', 'hubungan_keluarga', $this->hubungan_keluarga])\n ->andFilterWhere(['like', 'tgl_surat', $this->tgl_surat])\n ->andFilterWhere(['like', 'tempat_lahir', $this->tempat_lahir])\n ->andFilterWhere(['like', 'nama_pasangan_sebelumnya', $this->nama_pasangan_sebelumnya])\n ->andFilterWhere(['like', 'bukti_carai_instansi', $this->bukti_carai_instansi])\n ->andFilterWhere(['like', 'bukti_cerai_no', $this->bukti_cerai_no])\n ->andFilterWhere(['like', 'tanggal_cerai', $this->tanggal_cerai]);\n\n return $dataProvider;\n }", "title": "" } ]
[ { "docid": "2216a09ea2a298cb2a498017dbe896ef", "score": "0.71117353", "text": "public function search() {\n if (!$this->validate()) {\n // dummy answer instance of BaseDataProvider. Bad practice\n return new ArrayDataProvider([\n 'allModels' => []\n ]);\n }\n\n $query = $this->generateQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $query\n ]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "49378df15145a2342f7f477426b883bd", "score": "0.69636744", "text": "public function createSearch($query);", "title": "" }, { "docid": "3f36ba7040ddacff05266dbf7986ad9c", "score": "0.6650883", "text": "public function search(): Search\n {\n return new Search($this->_provider);\n }", "title": "" }, { "docid": "e12f0c168b1410da1c83723e238b5d00", "score": "0.65538245", "text": "public function search() {\n return new CActiveDataProvider($this, array(\n 'criteria' => $this->getSearchCriteria(),\n ));\n }", "title": "" }, { "docid": "1c36bab65301492b9fbaa1481f2a4c87", "score": "0.6499719", "text": "public function search()\n {\n\n $criteria = $this->createDbCriteria();\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "eed6806859d47a52e7d6066ebfb8d0ef", "score": "0.6481215", "text": "protected function prepareDataProvider()\n {\n /* @var $modelClass OActiveRecord */\n $modelClass = $this->modelClass;\n\n if (isset(class_implements($modelClass)['app\\models\\ISearchable'])) {\n\n $queryParams = Yii::$app->request->queryParams;\n\n if ($this->controlOwner() || !isset($queryParams['all'])) {\n $queryParams[$this->nameUserIdAttr] = $this->getUserId();\n }\n\n $dataProvider = $modelClass::search($queryParams);\n } else {\n\n $query = $modelClass::find();\n\n if ($this->controlOwner() || !isset($queryParams['all'])) {\n $query->andWhere([$this->nameUserIdAttr => $this->getUserId()]);\n }\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n }\n\n // set pagination options\n $dataProvider->pagination = $this->pagination;\n\n return $dataProvider;\n }", "title": "" }, { "docid": "9d2af95611575c348de76dfed0532b44", "score": "0.6411805", "text": "protected function applySearch()\n {\n $this->meta(['search' => $this->config('search')]);\n if ($this->searchStrategy && $this->config('search')) {\n $this->queryBuilder = call_user_func($this->searchStrategy, $this->queryBuilder, $this->config('search'));\n }\n \n return $this;\n }", "title": "" }, { "docid": "892886d7633fd05798fe7bba636bc563", "score": "0.63783693", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('marketingResearchId', $this->marketingResearchId, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('isEnabled', $this->isEnabled);\n $criteria->compare('isPushed', $this->isPushed);\n $criteria->compare('dateCreated', strtotime($this->dateCreated.' midnigth'));\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort'=>array(\n 'defaultOrder'=>'dateCreated DESC',\n )\n ));\n }", "title": "" }, { "docid": "681f15cb1d963ae0efb148244d8a514f", "score": "0.63505363", "text": "public function search()\n {\n $this->StateProcess(get_class($this) . '_' . Y::app()->params['cfgName']);\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('descr', $this->descr, true);\n $criteria->compare('create_time', $this->create_time);\n $criteria->compare('published', $this->published);\n $criteria->compare('finished', $this->finished);\n $criteria->compare('position', $this->position);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array('defaultOrder' => 'create_time DESC'),\n 'pagination' => array('pageSize' => Config::$data['base']->pageSize)\n ));\n }", "title": "" }, { "docid": "43d41c72bb3dcdcd05a69ebe41abaedb", "score": "0.6300644", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "d371bcb349c63b4002f2cf967cfcd1a4", "score": "0.62964475", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('dbview', $this->dbview, true);\n $criteria->compare('name', $this->name, true);\n $dataProvider = new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n\n return $dataProvider;\n }", "title": "" }, { "docid": "89f947b22f8e13a346616923f96a2f6a", "score": "0.6283419", "text": "static public function newSearch($clientId = null)\n {\n $currentAdapter = self::getAdapter();\n $className = self::PROVIDER_CLASS_PATH_PRE . $currentAdapter . '_Search';\n\n $newOne = new $className($clientId);\n if ($newOne instanceof Core_Model_Dataprovider_Interface_Search) {\n return $newOne;\n }\n \n throw new Core_Model_DataProvider_Exception(\n 'The data provider: ' . $currentAdapter . ' doesn\\'t have a valid search implementation.'\n );\n }", "title": "" }, { "docid": "371d502f6b98fdbf7a07a547feede2b9", "score": "0.628282", "text": "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('abbrev', $this->abbrev, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "bacba042087ab49940d4e6b26bb51eda", "score": "0.6275571", "text": "protected function _getSearchData() {}", "title": "" }, { "docid": "bcab6db38a78a027beb340eeb2beeb9a", "score": "0.6241064", "text": "public function search() {\n\t\t$criteria = new CDbCriteria ();\n\t\t$criteria->compare ( 'name', $this->name );\n\t\tif (isset ( $_GET ['pageSize'] ))\n\t\t\tYii::app ()->user->setState ( 'pageSize', $_GET ['pageSize'] );\n\t\treturn new CActiveDataProvider ( $this, array ('criteria' => $criteria, 'pagination' => array ('pageSize' => Yii::app ()->user->getState ( 'pageSize', Yii::app ()->params ['defaultPageSize'] ) ), 'sort' => array ('defaultOrder' => 'id DESC' ) \t\t\n\t\t));\n\t}", "title": "" }, { "docid": "38832a0db205f02d9512f160030b1bb3", "score": "0.62103873", "text": "public function GetSearchProvider() {\n return $this;\n }", "title": "" }, { "docid": "1a0f476c7dee5a04babad3c8f7c0a849", "score": "0.6207413", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(isset($this->searchText) && !empty($this->searchText))\n\t\t{\n\t\t\t$this->districtId = $this->searchText;\n\t\t\t$this->districtCode = $this->searchText;\n\t\t\t$this->districtName = $this->searchText;\n\t\t\t$this->amphurId = $this->searchText;\n\t\t\t$this->provinceId = $this->searchText;\n\t\t\t$this->geographyId = $this->searchText;\n\t\t}\n\n\t\t$criteria->compare('districtId',$this->districtId,true, 'OR');\n\t\t$criteria->compare('districtCode',$this->districtCode,true, 'OR');\n\t\t$criteria->compare('districtName',$this->districtName,true, 'OR');\n\t\t$criteria->compare('amphurId',$this->amphurId);\n\t\t$criteria->compare('provinceId',$this->provinceId);\n\t\t$criteria->compare('geographyId',$this->geographyId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "a52ab0868b05987d0ac2de3f8b71c224", "score": "0.61804265", "text": "public function prepareDataProvider()\r\n {\r\n $model = new Seo();\r\n $res = $model->search(\\Yii::$app->request->queryParams);\r\n\r\n\r\n return $res;\r\n }", "title": "" }, { "docid": "f1be7956c516115062a63e9e93e67f0b", "score": "0.6180289", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "0c21a553762b4b996a25b0b7e6fb1ec4", "score": "0.6130993", "text": "public function search(){\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=$this->getDbCriteria();\n\t\t\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name, true);\n//\t\t$criteria->compare('start_date',$this->start_date,true);\n//\t\t$criteria->compare('end_date',$this->end_date,true);\n\t\t$criteria->compare('organiser_type_id',$this->organiser_type_id);\n\t\t$criteria->compare('organiser_name',$this->organiser_name,true);\n\t\t\n\t\t// Add date filters\n\t\t$this->dateRangeCriteria($criteria,'start_date');\n\t\t$this->dateRangeCriteria($criteria,'end_date');\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\t\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>30,\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "9c1a69081d6101925a3b9d9a4b2ca12e", "score": "0.61106324", "text": "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('updated', $this->updated, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('published', $this->published);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "af5c8572317dee6d1bd0e2d109d0eaeb", "score": "0.61086875", "text": "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('slug', $this->slug, true);\n\t\t$criteria->compare('subject', $this->subject, true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => $this->paginationOptions->getPageSize(),\n\t\t\t\t'pageVar' => 'page',\n\t\t\t),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => array(\n\t\t\t\t\t'template_id' => CSort::SORT_DESC,\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "cf09f64f0d0d1fb0cf58ab47fce4d551", "score": "0.61082375", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria\n ));\n }", "title": "" }, { "docid": "fe9d082fc18443aeaa820d3bd679aa64", "score": "0.61031777", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->compare('LOWER(documentId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(workflowStateId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(employeeId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(groupId)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(createDateTime)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('LOWER(remarks)',strtolower($this->searchText),true, 'OR');\n\t\t$criteria->compare('estimateHour',$this->estimateHour);\n\t\t$criteria->compare('numHour',$this->numHour);\n\t\t$criteria->compare('isOverEstimate',$this->isOverEstimate);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "1b330217146b3802ef8258a0de899c95", "score": "0.60990644", "text": "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('cat_id', $this->cat_id);\n $criteria->compare('title', $this->title, true);\n\n $pagination = array('pageSize' => Yii::app()->params['pageSize']);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => $pagination\n ));\n }", "title": "" }, { "docid": "06230a5c1f00f16281ad29cbed0ba457", "score": "0.6070529", "text": "private function newSearch()\n {\n return $this->ad->buildLdapQuery();\n }", "title": "" }, { "docid": "fb2959ede26453bc0072793c8dc6b312", "score": "0.60705096", "text": "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id);\n $criteria->compare('type', $this->type, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "62bda78cbfe831400599cfc17f8fa4cb", "score": "0.6060343", "text": "public function search()\n\t{\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$this->AdvancedSearch(),\n\t\t));\n\t}", "title": "" }, { "docid": "531ec13acbe6ceabafc09f82ec4e5431", "score": "0.6058855", "text": "public function searchDataProvider()\n {\n return $this->getApiRequestsData(\n __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'requests'\n );\n }", "title": "" }, { "docid": "cd7984b0b35c631126c6b57fa5f3431d", "score": "0.60524184", "text": "public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new CDbCriteria ();\n\t\t\n\t\t$criteria->compare ( 'id', $this->id, true );\n\t\t$criteria->compare ( 'userId', $this->userId, true );\n\t\t$criteria->compare ( 'restaurantId', $this->restaurantId );\n\t\t$criteria->compare ( 'createDate', $this->createDate, true );\n\t\t\n\t\treturn new CActiveDataProvider ( $this, array (\n\t\t\t\t'criteria' => $criteria \n\t\t) );\n\t}", "title": "" }, { "docid": "ebcd1645addc59d1d9c2de394ce36ae1", "score": "0.6016998", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->compare('NAME', $this->NAME, true, 'OR');\n\t \t$criteria->with = array('CUSTOMER');\n\t\t$criteria->compare('CUSTOMER.COMPANY', $this->customer_search, true, 'OR');\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t\t\t\t'pageSize'=>25,\n\t\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "1aa64c0b3a0616e7db7a8aa23624db02", "score": "0.59881836", "text": "public static function newSearch($type, $data=null) {\n return self::newObject($type, $data);\n }", "title": "" }, { "docid": "d1aa5b2d2303cce6883d4cf6a96ae2ac", "score": "0.5985869", "text": "public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('t.id',$this->id);\n $criteria->compare('t.title',$this->title,true);\n $criteria->compare('t.country_id',$this->country_id);\n $criteria->compare('t.department',$this->department,true);\n $date = DateHelper::toDbDateFormat_tuan($this->posted);\n if (!empty($date)) {\n $criteria->addCondition('DATE(t.posted) = \"'.$date.'\"'); \n }\n $criteria->order = 't.id desc';\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>array(\n 'pageSize'=> Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']),\n ),\n ));\n }", "title": "" }, { "docid": "ffdc32b176c92be65dad745b97a074ce", "score": "0.59798646", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider(get_class($this),\n array('criteria' => $criteria,));\n }", "title": "" }, { "docid": "c62cb6cf507aa77bb2f5c49da7a208b7", "score": "0.5973341", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "4b743b93813bc0abc0dddf319d4edc23", "score": "0.59648526", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('name',$this->fullNameFilter,true,'OR');\n\t\t$criteria->compare('family',$this->fullNameFilter,true,'OR');\n\t\t$criteria->compare('post',$this->post,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('tell',$this->tell,true);\n\t\t$criteria->order = 'id DESC';\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "50ec1361f791e414d7f3e273837496b1", "score": "0.5932146", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('create_at',$this->create_at);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "df74ea22f3d83b5345fe88aa917d5857", "score": "0.59311146", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('clinic_id', $this->clinic_id);\n\t\t$criteria->compare('user_id', $this->user_id, true);\n\t\tif(is_array($this->post))\n\t\t\t$criteria->addInCondition('post', $this->post);\n\t\telse\n\t\t\t$criteria->compare('post', $this->post);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "1aa6beb7a0f6fe7c5060ffd6568560d0", "score": "0.59126", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $session = new CHttpSession;\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('tenant', $this->tenant, true);\n $criteria->compare('tenant_agent', $this->tenant_agent, true);\n $criteria->compare('is_default_value', $this->is_default_value, true);\n $criteria->compare('module', $this->module, true);\n\n if(isset($session['tenant']))\n {\n $criteria->addCondition(\"t.tenant =\" . $session['tenant']);\n }\n\n // Allow Admin to View and Manage his own created Types\n //if( Yii::app()->user->role == Roles::ROLE_ADMIN )\n // $criteria->addCondition(\"created_by =\" . Yii::app()->user->id . \"'\");\n\n\n\n $data = new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n\n ));\n\n $data->setTotalItemCount(count($data->getData()));\n $data->pagination->setItemCount(count($data->getData()));\n\n return $data;\n\n }", "title": "" }, { "docid": "1d4aafe397f1d9b05545564f839702a5", "score": "0.5910488", "text": "protected function build() {\n $this->query = new Query();\n $offset = (empty($this->query_options['offset'])) ? 0 : $this->query_options['offset'];\n $limit = (empty($this->query_options['limit'])) ? 10 : $this->query_options['limit'];\n\n $keys = $this->search_api_query->getKeys();\n if (!empty($keys)) {\n if (is_string($keys)) {\n $keys = array($keys);\n }\n\n $full_text_fields = $this->search_api_query->getFields();\n $string = $this->flattenKeys($keys, $this->query_options['parse mode']);\n\n if (!empty($string)) {\n $query_string = new QueryString($string);\n $query_string->setFields(array_values($full_text_fields));\n }\n }\n\n $sort = $this->getSortQuery();\n $parsed_filters = $this->parseFilter($this->search_api_query->getFilter());\n if (!empty($parsed_filters)) {\n $search_filter = $parsed_filters[0];\n }\n\n $this->query->setFrom($offset);\n $this->query->setSize($limit);\n\n if (isset($query_string) && isset($search_filter)) {\n $bool_query = new BoolQuery();\n $bool_query->addMust($query_string);\n $bool_query->addFilter($search_filter);\n $this->query->setQuery($bool_query);\n }\n elseif (isset($query_string)) {\n $this->query->setQuery($query_string);\n }\n elseif (isset($search_filter)) {\n $this->query->setPostFilter($search_filter);\n }\n\n if (!empty($sort)) {\n $this->query->setSort($sort);\n }\n\n $this->addAggregations();\n }", "title": "" }, { "docid": "6763e7b2027f426cba8dccce92f22f12", "score": "0.59104294", "text": "public function indexProvider(): ActiveDataProvider\n {\n return new ActiveDataProvider(['query' => $this->indexQuery()]);\n }", "title": "" }, { "docid": "8de2125eff693765135d75438b53648b", "score": "0.590509", "text": "public function search() {\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('user_id', $this->user_id);\n $criteria->compare('firstname', $this->firstname,true);\n $criteria->compare('lastname', $this->lastname,true);\n $criteria->compare('city', $this->city,true);\n $criteria->compare('zip_code', $this->zip_code,true);\n $criteria->compare('state_id', $this->state,true);\n $criteria->compare('country_iso', $this->country,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "8d92d42f34926de2ad3be0fc73d85030", "score": "0.5896803", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('license_no', $this->license_no, true);\n $criteria->compare('engine_no', $this->engine_no, true);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "title": "" }, { "docid": "0fc82050f52cb90c544005ee561f93a6", "score": "0.5887897", "text": "public function search() {\n\t\t$criteria=new CDbCriteria;\n\t\tforeach($this->getMetaData()->columns as $name => $column) {\n\t\t\tif ($column->type == \"string\" && !stristr($column->dbType,\"unsigned\")) {\n\t\t\t\t$criteria->compare($name,$this->{$name},true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$criteria->compare($name,$this->{$name});\n\t\t\t}\n\t\t}\n\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "551273ff8e0f9cb780d5735390715bb4", "score": "0.58871645", "text": "public function search()\r\n {\r\n $criteria=new CDbCriteria;\r\n\n if (!Yii::app()->user->isAdmin()) {\n $criteria->compare('id_user', Yii::app()->user->id);\n }\n\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, [\r\n 'criteria'=>$criteria,\r\n ]);\r\n }", "title": "" }, { "docid": "61546db3d15e7e8c403b13ff51480e3d", "score": "0.58801484", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('service_id', $this->service_id);\n $criteria->compare('appoint', $this->appoint, true);\n $criteria->compare('branch', $this->branch);\n $criteria->compare('create_date', $this->create_date, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "16e986619971c53113fa58f85b183c5c", "score": "0.58738464", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('name', $this->name, true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t\t'criteria' => $criteria,\n\t\t\t));\n\t}", "title": "" }, { "docid": "16e986619971c53113fa58f85b183c5c", "score": "0.58738464", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('name', $this->name, true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t\t'criteria' => $criteria,\n\t\t\t));\n\t}", "title": "" }, { "docid": "e3f878d0e15ec532aa6b3ccdde139b21", "score": "0.5866547", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('keyword',$this->keyword,true);\n\t\t$criteria->compare('match_mode',$this->match_mode);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('ghid',gh()->ghid,true);\n\t\t$criteria->addCondition(\"ghid='public'\",'OR');\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>15,\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "50001ff13c6cbedd7dbd3ccec21e79ef", "score": "0.58664185", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('shop_id', $this->shop_id);\n $criteria->compare('supplier_id', $this->supplier_id);\n $criteria->compare('stage', $this->stage);\n $criteria->compare('status', $this->status);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'create_date desc'\n ),\n 'pagination' => array(\n 'pageSize' => 25\n )\n ));\n }", "title": "" }, { "docid": "d688b41b8d31ba1c924bb5750cc3c2d5", "score": "0.5857845", "text": "public function search() {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('company', $this->company);\r\n $criteria->compare('charity', $this->charity);\r\n $criteria->compare('rotation', $this->rotation);\r\n $criteria->compare('common', $this->common);\r\n $criteria->compare('fee', $this->fee);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "title": "" }, { "docid": "0c98e3fdd78717f3b8f8e66417a7082e", "score": "0.58575165", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('t.name', $this->name, true);\n $criteria->compare('t.category_id', $this->category_id);\n \n if (!empty($this->customer_id)) {\n if (is_numeric($this->customer_id)) {\n $criteria->compare('t.customer_id', $this->customer_id);\n } else {\n $criteria->with['customer'] = array(\n 'condition' => 'customer.email LIKE :name OR customer.first_name LIKE :name OR customer.last_name LIKE :name',\n 'params' => array(':name' => '%' . $this->customer_id . '%')\n );\n }\n } elseif ($this->customer_id === null) {\n $criteria->addCondition('t.customer_id IS NULL');\n }\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => (int)Yii::app()->request->getQuery('pageSize', 20),\n 'pageVar' => 'page',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'last_updated' => CSort::SORT_DESC,\n ),\n ),\n ));\n }", "title": "" }, { "docid": "4c9ceaf8a316e90f05b6d8107671921a", "score": "0.5856256", "text": "public function search()\r\n\t{\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$criteria->compare('id_blog',$this->id_blog,true);\r\n\t\t$criteria->compare('lang',$this->lang,true);\r\n\t\t$criteria->compare('name',$this->name,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "fe7a9a9d3e17328e571093a812c9f523", "score": "0.58513397", "text": "public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('disabled', $this->disabled);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('sector_id', $this->sector_id);\n\t\t$criteria->compare('specialization_id', $this->specialization_id);\n\t\t$criteria->compare('service_id', $this->service_id);\n\t\t$criteria->compare('meta_keywords', $this->meta_keywords, true);\n\t\t$criteria->compare('meta_description', $this->meta_description, true);\n\t\t$criteria->compare('page', $this->page);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => 50,\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "e0c718fb1e1e893a81bd49b64ab27710", "score": "0.5850333", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('LOWER(name)', strtolower($this->name), true);\n $criteria->compare('holiday_group', $this->holiday_group);\n $criteria->compare('city_id', $this->city_id);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('key_points', $this->key_points, true);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('last_updated', $this->last_updated, true);\n $criteria->compare('status', $this->status, true);\n $criteria->compare('meta_keywords', $this->meta_keywords, true);\n $criteria->compare('meta_description', $this->meta_description, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "e0c00524e56ad10680025a30811476ac", "score": "0.5850119", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('input_type',$this->input_type,true);\n\t\t$criteria->compare('purchase_id',$this->purchase_id);\n\t\t$criteria->compare('input_date',$this->input_date);\n\t\t$criteria->compare('warehouse_id',$this->warehouse_id);\n\t\t$criteria->compare('input_company',$this->input_company);\n\t\t$criteria->compare('input_status',$this->input_status);\n\t\t$criteria->compare('owner_company',$this->owner_company);\n\t\t$criteria->compare('ship_no',$this->ship_no,true);\n\t\t$criteria->compare('form_sn',$this->form_sn,true);\n\t\t$criteria->compare('input_time',$this->input_time);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "334e63f47cab2ff44bb9d4f6056813e3", "score": "0.58456206", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('dependencia_id',$this->dependencia_id);\n\t\t$criteria->compare('persona_id',$this->persona_id);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "91e608c017efd06a497bfa9479aabc0d", "score": "0.58314383", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n\n $criteria = new CDbCriteria();\n\n $criteria->compare('id', $this->id);\n $criteria->compare('position', $this->position);\n $criteria->compare('countryId', $this->countryId);\n $criteria->compare('code', $this->code, true);\n $criteria->compare('localRu', $this->localRu, true);\n $criteria->compare('localEn', $this->localEn, true);\n $criteria->compare('countAirports', $this->countAirports);\n $criteria->compare('metaphoneRu', $this->metaphoneRu, true);\n $criteria->compare('metaphoneRu', $this->stateCode, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "title": "" }, { "docid": "d471d27d2b7758883aec1fa48e8b4ea7", "score": "0.58204985", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('id', $this->id, true);\n $criteria->compare('open_id', $this->open_id, true);\n $criteria->compare('content', $this->content, true);\n $criteria->compare('created', $this->created, true);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }", "title": "" }, { "docid": "98fdc4c7223c965fff3a0d0471a96a58", "score": "0.58170366", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('first_name',$this->first_name,true);\n\t\t$criteria->compare('last_name',$this->last_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "2aa085daa229291be389c87ffedc929c", "score": "0.58148897", "text": "public function getDataProvider()\n {\n $condition = new ModelCondition(['model' => __CLASS__]);\n\n foreach ([\"id\", \"author_id\", \"category_id\", \"time_written\", \"time_published\", \"status\", \"edited_by\", \"edit_time\", \"edit_number\", \"url\", \"allow_comments\", \"visibility\"] as $column) {\n if ($this->$column) {\n $condition->compareColumn($column, $this->$column, true);\n }\n }\n return new DataProvider([\n 'modelCondition' => $condition\n ]);\n }", "title": "" }, { "docid": "eba0417cdde741f5a94c17c0cb9ef500", "score": "0.58127224", "text": "public function search($query);", "title": "" }, { "docid": "eba0417cdde741f5a94c17c0cb9ef500", "score": "0.58127224", "text": "public function search($query);", "title": "" }, { "docid": "990c9289212e3425bce2de1cc1e9ca82", "score": "0.581271", "text": "public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "7801df5d6a200930ea32688d54a93b18", "score": "0.58112115", "text": "public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('designation_type_id', $this->designation_type_id);\n\t\t$criteria->compare('level_type_id', $this->level_type_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t'criteria' => $criteria,\n\t\t\t));\n\t}", "title": "" }, { "docid": "db01f7b305ffc74820969282d11781e5", "score": "0.58065706", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('tags', $this->tags, true);\n $criteria->compare('shareable', $this->shareable);\n $criteria->compare('created_dt', $this->created_dt, true);\n $criteria->scopes = 'mine';\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "ea7bf7b3fd67642bd14b2f61a8c2aed3", "score": "0.580516", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('title', $this->title, true);\n $criteria->compare('status', $this->status);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => $this->paginationOptions->getPageSize(),\n 'pageVar' => 'page',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'page_id' => CSort::SORT_DESC,\n ),\n ),\n ));\n }", "title": "" }, { "docid": "a5988b3b72afb2f7e132c04acc72493a", "score": "0.5803858", "text": "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('domain_id', $this->domain_id, true);\n\t\t$criteria->compare('hash', $this->hash, true);\n\t\t$criteria->compare('date', $this->hash, true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "0716f27382410abb5f1695cab358b8d7", "score": "0.57996804", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('widget_id',$this->widget_id);\n\t\t$criteria->compare('layout_id',$this->layout_id);\n\t\t$criteria->compare('position',$this->position);\n\t\t$criteria->compare('sort',$this->sort);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "e7689a7fe14fc3206485187bf3758799", "score": "0.57876706", "text": "protected function init()\n {\n $this->getDataProvider()->setParam('xml', 'true');\n $this->getDataProvider()->setType('Search.ff');\n }", "title": "" }, { "docid": "1652d68ab6ebdca3fb782a20ba28e7fb", "score": "0.57869035", "text": "public function search()\n {\n $criteria=new CDbCriteria;\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name);\n $criteria->compare('password', $this->password);\n $criteria->compare('role', $this->role);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "571ddd61437aa2e2404a30e0cbb727a7", "score": "0.57862836", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('keyword_id',$this->keyword_id,true);\n\t\t$criteria->compare('type',$this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "acb3b269621ca0214dc86b2cdec74878", "score": "0.57795125", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('author', $this->author);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('url', $this->url, true);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('updated', $this->updated, true);\n $criteria->compare('content', $this->content, true);\n $criteria->compare('status', $this->status);\n $criteria->compare('meta_title', $this->meta_title, true);\n $criteria->compare('meta_description', $this->meta_description, true);\n $criteria->compare('meta_keywords', $this->meta_keywords, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "7b292217814067e3815eea1aa005a955", "score": "0.5779347", "text": "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('film_festival_id', $this->film_festival_id);\n $criteria->compare('cinema_id', $this->cinema_id);\n $criteria->compare('city_id', $this->city_id);\n $criteria->compare('cinema_name', $this->cinema_name, true);\n $criteria->compare('sort_num', $this->sort_num);\n $criteria->compare('created', $this->created);\n $criteria->compare('updated', $this->updated);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "75c20ad5401afcef18b109bae2e7a318", "score": "0.57787204", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('año_inicio', $this->año_inicio, true);\n $criteria->compare('año_fin', $this->año_fin, true);\n $criteria->compare('mes_inicio', $this->mes_inicio, true);\n $criteria->compare('mes_fin', $this->mes_fin, true);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "323b431193d09e65a068abf3ad07daa3", "score": "0.57784975", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('onset_time', $this->onset_time);\n\t\t$criteria->compare('first_attender_time', $this->first_attender_time);\n\t\t$criteria->compare('reading1_id', $this->reading1_id);\n\t\t$criteria->compare('lbbb', $this->lbbb);\n\t\t$criteria->compare('rbbb', $this->rbbb);\n\t\t$criteria->compare('hospital_arrival_time', $this->hospital_arrival_time);\n\t\t\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "8452f14d3344cbf027c52718f5bd32cb", "score": "0.577616", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('runtime_per_day', $this->runtime_per_day);\n $criteria->compare('runtime_per_hour', $this->runtime_per_hour);\n $criteria->compare('runtime_per_hour_spot', $this->runtime_per_hour_spot);\n $criteria->compare('abbreviation', $this->abbreviation);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "d1b603fce2d5757524b38008d74061b3", "score": "0.57676184", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('day',$this->day);\n\t\t$criteria->compare('start',$this->start);\n\t\t$criteria->compare('end',$this->end);\n\t\t$criteria->compare('serviceproviders_id',$this->serviceproviders_id);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "6d252f2d223be80c95ca2d0fabc01b4a", "score": "0.57631034", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('full_name',$this->full_name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n $criteria->compare('skype',$this->skype,true);\n\t\t$criteria->compare('city',$this->city,true);\n $criteria->compare('examples',$this->examples,true);\n $criteria->compare('known_computer',$this->known_computer,true);\n\t\t$criteria->compare('more',$this->more,true);\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "8468e1b619cfbccb718af0abaa98a0a2", "score": "0.57580006", "text": "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('created', $this->created, true);\n $criteria->compare('updated', $this->updated, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('parentId', $this->updated);\n $criteria->compare('type', $this->type);\n $criteria->compare('published', $this->published);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination'=>array(\n 'pageSize'=>50, //could put 1, 2, 3, 10, 20, 30, etc. however many you want to display per page.\n ),\n ));\n }", "title": "" }, { "docid": "c3ee968dd5441e2b2f4b849b2a9c8ccf", "score": "0.57541496", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('customer_custom_field_id', $this->customer_custom_field_id);\n $criteria->compare('user_id', $this->branch_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "4b3e70a8501d7e424cfda592748f1c36", "score": "0.5752667", "text": "public function search($params) {\r\n $query = GiftSearch::find();\r\n $dataProvider = new ActiveDataProvider([\r\n 'query' => $query,\r\n ]);\r\n\r\n if (!($this->load($params) && $this->validate())) {\r\n return $dataProvider;\r\n }\r\n return $dataProvider;\r\n }", "title": "" }, { "docid": "89d605b7a88b9acef3e76318ac28661b", "score": "0.5751324", "text": "public function search($params) {\n\n $query = PollsResult::find()\n ->select('answer_id, count(`answer_id`) as `res`')\n ->joinWith('idAnswer')\n ->groupBy(['answer_id'])\n ->where(['polls-result.poll_id'=>$params['poll_id']]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "d6eb02d18889401288af26ec49153522", "score": "0.5749266", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\t$sort=new CSort;\n\t\t$sort->defaultOrder = $this->getTableAlias().'.position ASC';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>$sort\n\t\t));\n\t}", "title": "" }, { "docid": "de5cd3c637f892baac1b4b747886ca4b", "score": "0.5747142", "text": "public function getSearch($data)\n {\n }", "title": "" }, { "docid": "8b72a771dbc5193455a1f61ee93f3055", "score": "0.5746296", "text": "public function search()\r\n {\r\n // Warning: Please modify the following code to remove attributes that\r\n // should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id_city', $this->id_city);\r\n $criteria->compare('ishide', $this->ishide);\r\n $criteria->compare('name', $this->name, true);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n 'pagination' => array('pageSize' => 20,),\r\n ));\r\n }", "title": "" }, { "docid": "ebf53b2b8293b1f363d3b7f1c27213d7", "score": "0.57454836", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('age',$this->age,true);\n $criteria->compare('wanted_course',$this->wanted_course,true);\n $criteria->compare('wanted_mentor',$this->wanted_mentor,true);\n $criteria->compare('months_count',$this->months_count,true);\n $criteria->compare('extra_info',$this->extra_info,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "73f80edfb1565ff812dbdbcef313ddab", "score": "0.57439595", "text": "public function search()\r\n\t{\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('name',$this->name,true);\r\n\t\t$criteria->compare('verbiage',$this->verbiage,true);\r\n\t\t$criteria->compare('category',$this->category, true);\r\n\t\t$criteria->compare('text',$this->text,true);\r\n $criteria->compare('title',$this->title,true);\r\n $criteria->compare('clinic_card',$this->clinic_card,true);\r\n $criteria->compare('keywords',$this->keywords,true);\r\n $criteria->compare('description',$this->description,true);\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "ee9f21451878dc5e45f57f89f5ca09a3", "score": "0.5743877", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('year_id', $this->year_id);\n $criteria->compare('rank', $this->rank);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "84500ee348c94821435b8feddd6d76fb", "score": "0.5736332", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sizes_id', $this->sizes_id);\n $criteria->compare('loop_type_id', $this->loop_type_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "db9f482e8f79ad7f548d817e71c3e613", "score": "0.57324564", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('review_questions_id',$this->review_questions_id);\n\t\t$criteria->compare('suppliers_has_references_id',$this->suppliers_has_references_id);\n\t\t$criteria->compare('answers',$this->answers,true);\n\t\t$criteria->compare('rating',$this->rating,true);\n\t\t$criteria->compare('add_date',$this->add_date,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "2ad919f7e26c311e20e408b8faaffe8f", "score": "0.57317257", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('web_name', $this->web_name, true);\n $criteria->compare('web_value', $this->web_value, true);\n $criteria->compare('dos_usernames_username', $this->dos_usernames_username, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "00ee48ac9f5c044199d546f774d4840f", "score": "0.5730588", "text": "public function search($params)\n {\n $query = WidgetDataSearch::find();\n\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => ['defaultOrder' => ['id' => SORT_DESC]],\n ]);\n $this->searchSort($dataProvider);\n // load処理\n if (!$this->load($params) || !$this->validate()) {\n $query->where('0=1');\n return $dataProvider;\n }\n\n $this->searchWhere($query, $params);\n return $dataProvider;\n }", "title": "" }, { "docid": "4fb1fcf9c2a8fa1a5a5c90b1fc77e38b", "score": "0.57302547", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t//$criteria->compare('desc',$this->desc,true);\n\t\t//$criteria->compare('create_user_id',$this->create_user_id,true);\n\t\t//$criteria->compare('create_date',$this->create_date,true);\n\t\t//$criteria->compare('last_update_user_id',$this->last_update_user_id,true);\n\t\t//$criteria->compare('last_update_date',$this->last_update_date,true);\n\t\t$criteria->compare('state', $this->state);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "4ca47a8b2241f8850cc5198601abbfcc", "score": "0.57296354", "text": "public function searchdatas()\r\n\t{\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t\r\n\t\t$sort=new CSort();\r\n \t$sort->attributes=array();\r\n \t$sort->defaultOrder=\"t.id DESC\";\r\n \t$sort->params=$page_params;\r\n \t\r\n \t\r\n\t\treturn new CActiveDataProvider(get_class($this), array(\r\n\t\t\t'criteria'=>array(\r\n\t\t\t 'condition'=>'',\r\n\t\t\t 'params'=>array(),\r\n\t\t\t 'with'=>array(\"User\"),\r\n\r\n\t\t\t),\r\n\t\t\t'pagination'=>array(\r\n 'pageSize'=>'20',\r\n 'params'=>$page_params,\r\n ),\r\n 'sort'=>$sort,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "f4d258f472b0ea39605b572444eaa088", "score": "0.5727025", "text": "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('campaignId',$this->campaignId,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('lastUpdated',$this->lastUpdated,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "3472ce946e91ee612a7c2a125f1ca8a5", "score": "0.5726968", "text": "public function newSearch($attributes = array())\n\t{\n\t\t$model = new Search();\n\t\t\n\t\tif(isset($attributes['params'])) {\n\t\t\t$attributes['params'] = json_encode($attributes['params']);\n\t\t}\n\n\t\t$model->setAttributes($attributes);\n\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "96236c515dc7c725e41646030d7b4f2c", "score": "0.57218933", "text": "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('category_id', $this->category_id);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('contact', $this->contact, true);\n $employee = Employee::model()->findByPk(Yii::app()->user->id);\n //选择的组织架构ID\n if (!empty($this->branch))\n $criteria->addInCondition('branch_id', $this->branch->getChildrenIdsAndSelf());\n else //自己的组织架构的ID\n $criteria->addInCondition('branch_id', $employee->getBranchIds());\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "bb73e1de8863f1c6d9c8ec204d791bca", "score": "0.57193196", "text": "public function search()\n {\n $query = Participant::find()->with('company');\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n $query->andFilterWhere(['like', 'name', $this->name])\n ->andFilterWhere(['like', 'shortName', $this->shortName])\n ->andFilterWhere(['companyId' => $this->companyId])\n ->andFilterWhere(['like', 'dialString', $this->dialString])\n ->andFilterWhere(['like', 'note', $this->note]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "47d2e26b212a4680810fb8cc4a97d2dd", "score": "0.57128894", "text": "function customsearch() {\r\n $this->dbClass();\r\n }", "title": "" }, { "docid": "4bf701018b39b918f81666dde85e76b8", "score": "0.571158", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('oth_descrip', $this->oth_descrip);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" } ]
f6b65fec16cecac7177a3888b449db38
Lee el catalogo de las plazas
[ { "docid": "4cfe71b2c2193defb8ccbe55bcf1d918", "score": "0.60476774", "text": "public function read() {\n $oConexion = $this->getConexion();\n\n // obtiene todas las plazas\n $sQuery = \"SELECT * \" .\n \"FROM plaza\";\n $aPlazas = $oConexion->query($sQuery);\n\n return $this->asJson(array(\n \"success\" => true,\n \"message\" => \"Catalogo de plazas\",\n \"records\" => $aPlazas,\n \"metadata\" => array(\n \"total_registros\" => count($aPlazas)\n )\n ));\n }", "title": "" } ]
[ { "docid": "5a817d1eb6dba96b11fafb732375ac21", "score": "0.65799916", "text": "public function get_catalogs()\n {\n return array();\n }", "title": "" }, { "docid": "ceef7dedc223e58de2aa12300d2c1bc3", "score": "0.65007454", "text": "public function consult_catalogue()\n {\n $data = array();\n $data['minilogonextwatt'] = img_url('minilogonextwatt.png');\n\n //Chargement du titre et de la page avec la librairie \"Layout\" pour l'appliquer sur ladite page\n $this->layout->title('Catalogue B2E');\n $this->layout->view('B2E/Catalogue/Consulter_Catalogue', $data);\n }", "title": "" }, { "docid": "b563e30dd81aa7272a1901a43a00e0c8", "score": "0.6439713", "text": "public function catalogos(){\n\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\n\t\t\t\t$sql=\"select * from catalogos \";\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\n\t\t\t\tif($rs->RecordCount() > 0){\n\n\t\t\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t\t\t$this->lista[]=array(\"id\" => $fila[\"id\"],\n\t\t\t\t\t\t\t\t\t\t\t\t \"nombre\" => $fila[\"nombre\"],\n\t\t\t\t\t\t\t\t\t\t\t\t \"tabla\" => $fila[\"tabla\"]\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\treturn $this->lista;\n\t\t\t\t}else{\n\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\n\t\t}", "title": "" }, { "docid": "55e55f23494bf3d2690de13542fe0b68", "score": "0.6295836", "text": "function catalogo($datos)\n{\n\t$datos['Catalogo']['Certificado'] = $datos['factura']['certificado'];\n\t$datos['Catalogo']['noCertificado'] = $datos['factura']['noCertificado'];\n\tunset($datos['factura']);\n\t\n\t// Atributos del nodo Catalogo\n\t$atrs_catalogo = mf_atributos_nodo($datos['Catalogo'], '');\n\t\n\t// Nodos Ctas\n\t$xml_ctas = '';\n\tforeach($datos['Catalogo']['Ctas'] as $idx => $ctas)\n\t{\n\t\t$atrs_cta = mf_atributos_nodo($ctas, '');\n\t\t$xml_ctas .= \"<catalogocuentas:Ctas $atrs_cta />\";;\n\t}\n\t\n\t// XML de Catalogo completo\n\t$xml_balanza = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.\"\\n<catalogocuentas:Catalogo xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:catalogocuentas=\\\"http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/CatalogoCuentas\\\" xsi:schemaLocation=\\\"http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/CatalogoCuentas http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/CatalogoCuentas/CatalogoCuentas_1_3.xsd\\\" Version='1.3' $atrs_catalogo Sello='{SELLO}'>$xml_ctas</catalogocuentas:Catalogo>\";\n\treturn $xml_balanza;\n}", "title": "" }, { "docid": "e4b8bfccb9c4c4db8ff552167be6aa9a", "score": "0.6129107", "text": "public function listar(){\r\n\t\t\t$fachaBD= fBaseDeDatos::getInstance();\r\n\t\t\t$nombre = array();\r\n\t\t\t$nombre[0] = \"catalogo\";\r\n\t\t\t$columnas = array();\r\n\t\t\t$columnas[0]= \"*\";\r\n\t\t\t$Busqueda= new BusquedaSimple($nombre,$columnas,null);\t\t\t\t\t\r\n\t\t\t$result = $fachaBD->search($Busqueda);\r\n\t\t\t$listarray = array();\r\n\t\t\t$i=0;\r\n\t\t\t\r\n\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\t\r\n\t\t\t\t$etapa = new catalogo($row['nombre']);\r\n\t\t\t\t$etapa->set($row['nombre']);\r\n\t\t\t\t$listarray[$i] = $etapa;\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $listarray;\t\t\r\n\t\t}", "title": "" }, { "docid": "cf1183ef39f135205da35f2f72d92443", "score": "0.60424334", "text": "public function listaCompras()\n\t{\n\t\t$compras = array();\n\t\ttry {\n\t\t\t$compras = json_decode($this->httpClient->get('/pedido/lista-compras-farmacias'));\n\t\t} catch (Exception $ex) {\n\t\t\tLog::error($ex);\n\t\t}\n\t\tLog::debug(__METHOD__ .\" - Listado de compras: \". print_r($compras,true));\n\t\t$this->layout->main = View::make('compra.compras', compact('compras'));\n\t}", "title": "" }, { "docid": "4ea18eb81ab8cde7568fc6306341dc6a", "score": "0.5981594", "text": "public function visualizarCategorias()\r\n {\r\n require __DIR__ . '/../Repositorio/articuloRepositorio.php';\r\n $listaCateg= (new ArticuloRepositorio)->mostrarCategorias();\r\n require __DIR__ . '/../../app/plantillas/categorias.php';\r\n }", "title": "" }, { "docid": "d5cbbed68237dbf6745c149b233b6308", "score": "0.5959023", "text": "function altaPelicula() {\r\n $tpl = new TemplatePower(\"templates/altaPelicula.html\");\r\n $tpl->prepare();\r\n $tpl->gotoBlock(\"_ROOT\");\r\n $mod = new Pelicula_Model();\r\n $res_d = $mod->listarDirectores();\r\n\r\n if($res_d){\r\n $tpl->gotoBlock(\"_ROOT\");\r\n foreach($res_d as $director){\r\n $tpl->newBlock(\"DIRECTORES\");\r\n $tpl->assign(\"director\",$director['di_nombreArtistico']);\r\n }\r\n }\r\n\r\n $res_g = $mod->listarGeneros();\r\n\r\n if($res_g){\r\n $tpl->gotoBlock(\"_ROOT\");\r\n foreach($res_g as $genero){\r\n $tpl->newBlock(\"GENEROS\");\r\n $tpl->assign(\"genero\",$genero['ge_nombre']);\r\n }\r\n }\r\n\r\n return $tpl->getOutputContent();\r\n }", "title": "" }, { "docid": "9b466382dd13e966cd9f3dbafda93897", "score": "0.5946063", "text": "public function AmenuCarnetizacion() {\n $oLCarnetizacion = new LCarnetizacion();\n $comboTipoDocumentos = $oLCarnetizacion->comboTipoDocumento();\n $comboTipoCertifica = $oLCarnetizacion->comboTipoCertifica();\n require_once('../../../hospitalizacion/cvista/carnetizacion/vistaCarnetizacion.php');\n }", "title": "" }, { "docid": "d213a9cda975454cdae4ac8973ff15a7", "score": "0.5932464", "text": "public function index() {\n\t\t$this->CategoriaPlatillo->recursive = 0;\n\n\t\t$this->paginate['CategoriaPlatillo']['limit'] = 5;\n\t\t$this->paginate['CategoriaPlatillo']['order'] = array('CategoriaPlatillo.id' => 'asc');\n\t\t$this->set('categoriaPlatillos', $this->paginate('CategoriaPlatillo'));\n\t}", "title": "" }, { "docid": "5184ee36836a54ea1b905f375171e8d7", "score": "0.5931725", "text": "function buscarprodu(){\n parent::cargarvista(\"html/adminbuscarproductos\");\n }", "title": "" }, { "docid": "d07870b5c9759db4b570e7e3d6429955", "score": "0.5873234", "text": "public function productosPopulares(){\n\n\n\n }", "title": "" }, { "docid": "f1a0d1892ebed9af2c942c231bfb4262", "score": "0.5866137", "text": "public function index()\n {\n return ResourcesProduto::collection(\n ModelsProduto::all()\n );\n }", "title": "" }, { "docid": "e97129983713d3fbd9b53a10b6167588", "score": "0.5857904", "text": "public function produtoCategoria(){\n\n $produto = Produto::find(1);\n $categorias = $produto->categorias;\n\n\n echo \"Produto: $produto->nome<br>\";\n foreach ($categorias as $categoria){\n echo \"$categoria->nome , \";\n }\n\n }", "title": "" }, { "docid": "66ca0668b29033caeb2b0a41846daf70", "score": "0.58467215", "text": "public function getListadoCatformularios()\r\n {\r\n return $this->conexionCatformulario->listaLlaves(\"estructura\", \"ASC\");\r\n }", "title": "" }, { "docid": "3b5f5ab06bcdd97b7ab7502131c93a1b", "score": "0.5823829", "text": "public function mostrarProdutos(){\n \n if(!empty($this->produtos)){ //Se não tiver vazio os produtos, podemos mostra-los:\n for($i = 0;$i < count($this->produtos);$i++){ //Fazemos um laço.\n echo $this->produtos[$i].'</br>'; //mostre cada produto.\n } \n }\n \n }", "title": "" }, { "docid": "85a1ada2ce89fa305531610b073a656d", "score": "0.5789459", "text": "public function listar() {\n $produto = new Produto();\n $lista_produtos = $produto->buscaLista();\n /**\n * Exiba a lista de produtos\n */\n require 'view/produto-view.php';\n }", "title": "" }, { "docid": "e0c4b97d07b1e3ec3ae95d3e6767fe3a", "score": "0.5787627", "text": "public function mostrarProductosAlProv(){\n for($i = 0; $i<count($this->productos); $i++)\n {\n $this->productos[$i]->mostrarPProv();\n }\n }", "title": "" }, { "docid": "c932688ee2d746e1c4255b205f9aaf67", "score": "0.57846195", "text": "function MAP()\n {\n $this->catalogProducts = $this->GetProductsArrForSiteMap(); // РЎРїРёСЃРѕРє товаров РІ каждой категории каталога\n $this->ShowCatalogMap();\n }", "title": "" }, { "docid": "42ee872324232a454d105ab7ffe5c301", "score": "0.5780447", "text": "public function show(Catalogue $catalogue)\n {\n //\n }", "title": "" }, { "docid": "91f00ce6d130450b01d0fa98ca0f164e", "score": "0.5776364", "text": "public static function get_catalogs() {\n\n\t\t$sql = \"SELECT `id` FROM `catalog` ORDER BY `name`\";\n\t\t$db_results = Dba::read($sql);\n\n\t\t$results = array();\n\n\t\twhile ($row = Dba::fetch_assoc($db_results)) {\n\t\t\t$results[] = $row['id'];\n\t\t}\n\n\t\treturn $results;\n\n\t}", "title": "" }, { "docid": "2fa658e222a9923fc00f190716250d44", "score": "0.57672346", "text": "public function index() {\n $labores = Labor::all();\n $labores->each(function($item) {\n $item->categorialabor;\n });\n return view('feligresia.feligresia.labores.list')\n ->with('location', 'feligresia')\n ->with('labores', $labores);\n }", "title": "" }, { "docid": "7d551285d77e5113b9e2122d38aaeb8d", "score": "0.57629365", "text": "protected function carregar_auxiliares(){\r\n\t\t$arr_codbanco = array();\r\n\t\t$arr_codparceiro = array();\r\n\t\tforeach($this->arr_lancamento as $lancamento){\r\n\t\t\tif(strlen($lancamento->getcodbanco()) > 0){\r\n\t\t\t\t$arr_codbanco[] = $lancamento->getcodbanco();\r\n\t\t\t}\r\n\t\t\t$arr_codparceiro[] = array($lancamento->gettipoparceiro(), $lancamento->getcodparceiro());\r\n\t\t}\r\n\t\t$this->arr_banco = object_array_key(objectbytable(\"banco\", NULL, $this->con), $arr_codbanco);\r\n\t\t$this->arr_parceiro = object_array_key(objectbytable(\"vparceiro\", NULL, $this->con), $arr_codparceiro);\r\n\t}", "title": "" }, { "docid": "c7654a9b0487150df356c602fc696b8b", "score": "0.5725759", "text": "public function cargarTopologiasPais()\n {\n flash('Resultado: '.MyDB::cargarToposPais());\n return view('home');\n }", "title": "" }, { "docid": "aee516e50e1cbb51a6c2d0f571799a90", "score": "0.57229817", "text": "public function getCatalog()\n {\n return $this->catalog;\n }", "title": "" }, { "docid": "caa9d84591072da678ba3a422dc92533", "score": "0.56887895", "text": "function noizetier_compositions_lister_disponibles($flux) {\n\n\t// Initialisation des arguments du pipeline\n\t$type = $flux['args']['type'];\n\t$informer = $flux['args']['informer'];\n\n\t// Récupération des compositions virtuelles du noiZetier afin de les injecter dans le pipeline\n\t// étant donné qu'elles ne peuvent pas être détectées par Compositions car sans XML\n\t// -- filtre sur l'indicateur est_virtuelle qui n'est à oui que pour les compositions\n\t// -- filtre sur l'indicateur est_page_objet à oui car on ne considère que les compositions virtuelles sur objet\n\t// -- filtre sur le type de contenu ou pas suivant l'appel\n\tinclude_spip('inc/noizetier_page');\n\t$informations = array('type', 'composition', 'nom', 'description', 'icon', 'branche');\n\t$filtres = array('est_virtuelle' => 'oui', 'est_page_objet' => 'oui');\n\tif ($type) {\n\t\t$filtres['type'] = $type;\n\t}\n\t$compositions_virtuelles = page_noizetier_repertorier($informations, $filtres);\n\n\tif ($compositions_virtuelles) {\n\t\t// On insère les compositions virtuelles selon le format imposé par le plugin Compositions\n\t\tforeach ($compositions_virtuelles as $_configuration) {\n\t\t\tif ($informer){\n\t\t\t\t$flux['data'][$_configuration['type']][$_configuration['composition']] = array(\n\t\t\t\t\t'nom' \t\t\t=> typo($_configuration['nom']),\n\t\t\t\t\t'description'\t=> isset($_configuration['description']) ? typo($_configuration['description']) : '',\n\t\t\t\t\t'icon' \t\t\t=> chemin_image($_configuration['icon']),\n\t\t\t\t\t'branche' \t\t=> unserialize($_configuration['branche']),\n\t\t\t\t\t'class' \t\t=> '',\n\t\t\t\t\t'configuration'\t=> '',\n\t\t\t\t\t'image_exemple'\t=> '',\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$flux['date'][$_configuration['type']][$_configuration['composition']] = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $flux;\n}", "title": "" }, { "docid": "32df2919671856ab5c3e6d7d99478bd8", "score": "0.5675036", "text": "public function index()\n {\n $companies = Auth::user()->companies ;\n if(sizeof($companies) == 0)\n abort(404) ;\n $co_id = $companies[0]->id ;\n\n $pcats = ProductCat::where(['company_id' => $co_id])->get();\n return view('index.pcat' , compact('pcats'));\n }", "title": "" }, { "docid": "4b9ab354f6b9aacc1074b6e224423d11", "score": "0.56692225", "text": "public function Listar_cat()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = array();\n\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM catetgoria\");\n\t\t\t$stm->execute();\n\n\t\t\tforeach($stm->fetchAll(PDO::FETCH_OBJ) as $r)\n\t\t\t{\n\t\t\t\t$cat = new tipocateg();\n\n\t\t\t\t$cat->__SET('nomCat', $r->nomCat);\n\t\t\t\t$cat->__SET('descr_cat', $r->descr_cat);\n\t\t\t\n\n\t\t\t\t$result[] = $cat;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "0210f2f86d2459fa888675f97adc2c63", "score": "0.5662576", "text": "public function listar(){\n $page=0;\n $firstResult=0;\n $maxResultsQuery = ($GLOBALS['em']->getRepository('Src\\Entity\\Configuration\\Configuration')->find(1));\n $maxResults = $maxResultsQuery->getNumberOfItems();\n \n if (isset($_GET['page'])) {\n $page=$_GET['page'];\n $firstResult=$page * $maxResults;\n }\n /* Paginacion -- que elementos mostrar */\n /* Paginacion -- calcular numero de paginas */\n \n $numberOfItems= count($GLOBALS['em']->getRepository('Src\\Entity\\Purchase\\Sale')-> findAll());\n $numberOfPages= ceil($numberOfItems / $maxResults);\n\n /* Paginacion -- calcular numero de paginas */\n $sales = $GLOBALS['em']->getRepository('Src\\Entity\\Purchase\\Sale')->findOrderedByName($firstResult, $maxResults);\n $plantilla = $GLOBALS['twig']-> loadTemplate('purchase/sales.html.twig');\n $plantilla-> display(array('sales' => $sales, 'accion' => \"Vendas\", 'actualPage' => $page, 'numberOfPages' => $numberOfPages,'url'=>$this->url));\n }", "title": "" }, { "docid": "6e24e6e6740fcfb7ea9872f9be20e304", "score": "0.5650401", "text": "function mostrarproductos(){\n $consulta = new ProductoModelo();\n $result = $consulta->mostrar();\n \n // ejecutan el metodo heredado de controlador para cargar la vista\n // y se le pasa los datos a la vista\n parent::cargarvista(\"html/clientesmostrarproductos\",$result);\n }", "title": "" }, { "docid": "b06e74cbd326b637a69e13cf6db3d9f2", "score": "0.5633226", "text": "public function index()\n\t{\n\t\t$data['categories'] = LarrockCategory::getModel()->whereComponent('catalog')->whereLevel(1)\n ->orderBy('position', 'DESC')->orderBy('updated_at', 'ASC')->with(['get_child', 'get_parent'])->paginate(30);\n\t\t$data['nalichie'] = LarrockCatalog::getModel()->where('nalichie', '<', 1)->get();\n\n\t\treturn view('larrock::admin.catalog.index', $data);\n\t}", "title": "" }, { "docid": "8daec1a445fb5e4346e0592fa4c71d79", "score": "0.5620135", "text": "public function listarPais()\n {\n $retorno = $this->listar('pais'); \n \n foreach ($retorno as $linhas)\n {\n $pais[$linhas->codpas] = $linhas->nompas;\n }\n \n return $pais; \n }", "title": "" }, { "docid": "5aedfe42e1fdb693d54df2f42a41467d", "score": "0.5588307", "text": "function catalog()\n\t\t{\n\t\t\t$this->load->model('catalog_model');\n\t\t\t//lay ID cua the loai\n\t\t\t$id = intval($this->uri->rsegment('3'));\n\t\t\t//lay ra thong tin cua the loai\n\t\t\t$catalog = $this->catalog_model->get_info($id);\n\t\t\tif(!$catalog)\n\t\t\t{\n\t\t\t\tredirect();\n\t\t\t}\n\t\t\t//lay ra danh sach san pham danh muc do\n\t\t\t//Phan trang\n\t\t\t$total_rows = $this->product_model->get_total();\n\t\t\t$this->data['total_rows'] = $total_rows;\n\t\t\t//load ra thu vien phan trang\n\t\t\t$this->load->library('pagination');\n\t\t\t$config = array();\n\t\t\t$config['total_rows'] = $total_rows;//tong tat ca cac san pham tren website\n\t\t\t$config['base_url'] = base_url('product/catalog'.$id);//link hien thi ra danh sach san pham\n\t\t\t$config['per_page'] = 15;//so luong danh sach san pham hien thi trong 1 trang\n\t\t\t$config['uri_segment']= 4;//phan doan hien thi tren trang url\n\t\t\t$config['next_link'] = 'Trang kế';\n\t\t\t$config['prev_link'] = 'Trang sau';\n\t\t\t//khoi tao cac cau hinh phan trang\n\t\t\t$this->pagination->initialize($config);\n\n\t\t\t$segment = $this->uri->segment('4');\n\t\t\t$segment = intval($segment);\n\n\t\t\t$input = array();\n\t\t\t$input['limit'] = array($config['per_page'],$segment);\n\t\t\t$input['where'] = array('catalog_id'=>$id); \n\n\t\t\t//lay danh sach san pham\n\t\t\t$list = $this->product_model->get_list($input);\n\t\t\t$this->data['list'] = $list;\n\n\t\t\t//hien thi ra view\n\t\t\t$this->data['temp'] = 'site/product/catalog';\n\t\t}", "title": "" }, { "docid": "2e2f3bb8550c80f1ad67c05c6fb86bdb", "score": "0.55818546", "text": "public function about() {\n\t\t$areas = collect([\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones a la ingeniería de producción de bienes y servicios',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Gestión de la Cadena de Suministro' ],\n\t\t\t\t[ 'name' => 'Gestión del Rendimiento' ],\n\t\t\t\t[ 'name' => 'Logística' ],\n\t\t\t\t[ 'name' => 'Planificación y Programación de Procesos Industriales' ],\n\t\t\t\t[ 'name' => 'Programación de Proyectos' ],\n\t\t\t\t[ 'name' => 'Sistemas de Inventarios y Producción' ],\n\t\t\t\t[ 'name' => 'Transporte (pasajeros, carga)' ],\n\t\t\t],\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones a la economía y negocios',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Comercio Electrónico' ],\n\t\t\t\t[ 'name' => 'Modelación Financiera' ],\n\t\t\t\t[ 'name' => 'Modelos Económicos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones específicas de optimización',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Análisis Envolvente de Datos' ],\n\t\t\t\t[ 'name' => 'Corte y Empaque' ],\n\t\t\t\t[ 'name' => 'Localización de Instalaciones' ],\n\t\t\t\t[ 'name' => 'Problema de Asignación' ],\n\t\t\t\t[ 'name' => 'Programación de Horarios' ],\n\t\t\t\t[ 'name' => 'Ruteo de Vehículos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Aplicaciones estadísticas',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Control de Calidad' ],\n\t\t\t\t[ 'name' => 'Estadística descriptiva e inferencial' ],\n\t\t\t\t[ 'name' => 'Minería de Datos' ],\n\t\t\t\t[ 'name' => 'Pronósticos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Gestión del Conocimiento',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Sistemas de Aplicación del Conocimiento' ],\n\t\t\t\t[ 'name' => 'Sistemas de Captura del Conocimiento' ],\n\t\t\t\t[ 'name' => 'Sistemas de Compartición del Conocimiento' ],\n\t\t\t\t[ 'name' => 'Sistemas de Descubrimiento del Conocimiento' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Métodos computacionales',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Heurísticas' ],\n\t\t\t\t[ 'name' => 'Inteligencia Artificial' ],\n\t\t\t\t[ 'name' => 'Metaheurísticas' ],\n\t\t\t\t[ 'name' => 'Redes Neuronales' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Optimización matemática',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Grafos y Redes' ],\n\t\t\t\t[ 'name' => 'Optimización lineal' ],\n\t\t\t\t[ 'name' => 'Optimización no lineal' ],\n\t\t\t\t[ 'name' => 'Optimización combinatoria' ],\n\t\t\t\t[ 'name' => 'Programación Dinámica' ],\n\t\t\t\t[ 'name' => 'Programación Estocástica' ],\n\t\t\t\t[ 'name' => 'Programación Lineal Entera' ],\n\t\t\t\t[ 'name' => 'Programación Multicriterio' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[\n\t\t\t'name' => 'Toma de decisiones',\n\t\t\t'subAreas' => [\n\t\t\t\t[ 'name' => 'Análisis de Decisión' ],\n\t\t\t\t[ 'name' => 'Procesos de análisis Jerárquico' ],\n\t\t\t\t[ 'name' => 'Sistemas de Soporte a la toma Decisión' ],\n\t\t\t\t[ 'name' => 'Teoría de Juegos' ]\n\t\t\t]\n\t\t\t],\n\t\t\t[ 'name' => 'Procesos Estocásticos' ],\n\t\t\t[ 'name' => 'Simulación' ]\n\t\t]);\n\n\t\treturn view('copios.about')->withAreas($areas);\n\t}", "title": "" }, { "docid": "2d3c7ed55701256dccafb9b5d5ba0a3c", "score": "0.55743253", "text": "function mostrar_productos_x_categoria($id_categoria){\n $con = getConexion(); \n $sql =\"SELECT * FROM `producto` WHERE id_subcategoria = $id_categoria\";\n $result = $con->query($sql);\n if($con->connect_errno){\n $con-close();\n return false; \n }\n $productos_cate= array(); \n $productos = $result->fetch_all(); \n foreach ($productos as $p) {\n array_push($productos_cate, cargar_producto($p)); \n }\n return $productos_cate; \n }", "title": "" }, { "docid": "caeb71fde06ff2c70bb88ed5394584c0", "score": "0.5573539", "text": "public function readCatalogus()\n {\n $query = 'SELECT * FROM bioscopen';\n $bioscopen = $this->dataHandler->ReadData($query);\n return $bioscopen;\n }", "title": "" }, { "docid": "304ecd07446a6d50ca34d7997760116c", "score": "0.5570536", "text": "public function getPlurals(): TraversableCatalog {\n $pluralFilter = function(Entry $entry) {\n return $entry->isPlural();\n };\n return $this->filter($pluralFilter);\n }", "title": "" }, { "docid": "9fc098c426e1d7debc4472c9efcc6105", "score": "0.55680996", "text": "public function produtoCaract(){\n\n $caracteristica = Caracteristica::find(1);\n $produtos = $caracteristica->produtos;\n\n echo \"Caracteristia: $caracteristica->nome<br>\";\n foreach ($produtos as $produto){\n echo \"$produto->nome , \";\n }\n\n }", "title": "" }, { "docid": "98dac08432374e38d3babec9f19c7e3e", "score": "0.5566503", "text": "public function index()\n {\n \t// Seccion Lanapelo\n $lanapelos_id = 1;\n \t// Seccion Kanekalon\n $kanekalon_id = 2;\n \t// Seccion Moños o Colas\n $colas_id = 3;\n \t// Seccion Accesorios\n $accesorios_id = 4;\n\n // Hay que tener cuidado en que existan productos en la categoria\n $productos_lanapelos = $this->getProducts($lanapelos_id, 10);\n $productos_kanekalon = $this->getProducts($kanekalon_id, 10);\n $productos_colas = $this->getProducts($colas_id, 10);\n $productos_accesorios = $this->getProducts($accesorios_id, 10);\n\n // dd($productos_lanapelos);\n\n return view('index', \n \tcompact(\n \t\t'productos_lanapelos',\n \t\t'productos_kanekalon',\n \t\t'productos_colas',\n \t\t'productos_accesorios'\n \t)\n );\n }", "title": "" }, { "docid": "4f3694a9e1bb6716c20a3ad81eefb145", "score": "0.55484563", "text": "public function index()\n {\n try{\n $platillos = Categorias::with('infoPlatillo')->select('id', 'nombre', 'URL')->get();\n } catch(QueryException $e) {\n return response( $e->getMessage(), 501);\n }\n return response($platillos, 201); \n }", "title": "" }, { "docid": "7efdf416a357abbd9bea71a8db3a058c", "score": "0.55450124", "text": "public static function info_codigos(){\n\n\t\tsession_start();\n\n\t\tView::set(\"user\", $_SESSION['logged_user'] );\n\n\t\tView::set(\"pageTitle\", \"Códigos de Equipos\");\n\n\t\t$codigos = Clients::getInfoCodigos();\n\t\tView::set(\"codigos\", $codigos);\n\n\t\t/* VISTA */\n\t\t$opcionMenu = \"info_codigos\";\n\t\tView::set(\"opcionMenu\", $opcionMenu);\n\n\t\tView::render( \"portal_tech_home\" );\n\t}", "title": "" }, { "docid": "8587f49f9133054e0fd19e92caeaf885", "score": "0.5542551", "text": "function listadoPeliculas() {\r\n $tpl = new TemplatePower(\"templates/listadoPeliculas.html\");\r\n $tpl->prepare();\r\n $tpl->gotoBlock(\"_ROOT\");\r\n\r\n $mod = new Pelicula_Model();\r\n $res = $mod->listarPeliculas();\r\n $mod->borrarActorPelicula(28,288);\r\n\r\n if($res){\r\n $tpl->gotoBlock(\"_ROOT\");\r\n foreach($res as $fila){\r\n $tpl->newBlock(\"LISTADO\");\r\n $tpl->assign(\"titulo\",$fila['pe_nombre']);\r\n $tpl->assign(\"genero\",$fila['ge_nombre']);\r\n $tpl->assign(\"fechaestreno\",$fila['pe_fechaEstreno']);\r\n $tpl->assign(\"director\",$fila['di_nombreArtistico']);\r\n $tpl->assign(\"duracion\",$fila['pe_duracion']);\r\n $tpl->assign(\"id\",$fila['id_pelicula']);\r\n $actores = $mod->listarActores($fila['id_pelicula']);\r\n $ac = \"\";\r\n foreach ($actores as $actor) {\r\n $ac .= $actor['ac_nombreArtistico'] . \", \";\r\n }\r\n $ac = substr($ac,0,-2);\r\n $tpl->assign(\"actores\",$ac);\r\n }\r\n }\r\n\r\n return $tpl->getOutputContent();\r\n }", "title": "" }, { "docid": "5710840ecd08879d381554af3fb26c1b", "score": "0.5539343", "text": "public function buscar() {\n\n\t\t\t$auditoria = new Auditoria;\n\n\t\t\t$auditoria->include_related('usuario', '*');\n\t\t\t$auditoria->include_related('usuario/persona', '*');\n\t\t\t$auditoria->include_related('usuario/perfile', '*');\n\t\t\t$auditoria->order_by('id', 'DESC');\n\t\t\t$auditoria->get();\n\n\t\t\t$this->url_view = $this->url_modulo.'/'.$this->url_menu.'/'.$this->url_crud;\n\n\t\t\t$this->datos_view = array('auditorias' => $auditoria);\t\t\n\t\t\n\t\t//---------------------------------Cargar Vistas-------------------------------------\n\t\t\n\t\t\tlayout_all($this->titulo, $this->url_view, $this->datos_view, $this->view_menu, $this->datos_menu, $this->datos_crud);\t // Carga layouts.\n\n\t\t//-----------------------------------------------------------------------------------\n\t\t\n\t}", "title": "" }, { "docid": "9300360077163fa80079f67c8bd5c9f8", "score": "0.5531645", "text": "public function contaLancamentosCartao(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/lancamentos?access_token='.$this->chave_granatum);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"conta_id=55632&data_inicio=\".$this->p_dia.\"&data_fim=\".$this->h_dia.\"&tipo_view=count\");\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n $this->n_lancamentos_cartao = json_decode($result, true);\n\n curl_close($ch);\n }", "title": "" }, { "docid": "0ccc11eafe5aa09bcd877eb8676916bc", "score": "0.5518027", "text": "public function listaProduto()\n {\n $produtos = Product::join('sku', 'produto.cd_sku', '=', 'sku.cd_sku')->orderBy('produto.cd_produto', 'desc')->paginate(25);\n $tamanhosLetras = LetterSize::all();\n $tamanhosNumeros = NumberSize::all();\n $cores = Color::all();\n $marcas = Marca::all();\n //$produtosVariacao = ProductVariation::join('produto', 'produto.cd_produto', '=', 'produto_variacao.cd_produto')->paginate(25);\n $produtosVariacao = ProductVariation::rightJoin('produto', 'produto.cd_produto', 'produto_variacao.cd_produto')\n ->select('produto.cd_produto', 'produto.nm_slug', 'produto_variacao.nm_produto_variacao')\n ->groupBy('produto.cd_produto')\n ->orderBy('produto.cd_produto', 'desc')\n ->paginate(25);\n\n //dd($produtos);\n\n return view('pages.admin.products.list', compact('produtos', 'tamanhosLetras', 'tamanhosNumeros', 'cores', 'produtosVariacao', 'marcas'));\n }", "title": "" }, { "docid": "f0d80b3c93f707b7cdf538645ae57f3a", "score": "0.55160284", "text": "public function getCatalogo($page, $ppage = 5) {\n $cols = \"id,titulo,descripcion,evento_id,costo,totalhoras,cupolimite\";\n \t$join =\"INNER JOIN actividad ON actividad_id = id_actividad\";\n \n return $this->paginate(\"columns: $cols\",\"join: $join\", \"page: $page\", \"per_page: $ppage\");\n }", "title": "" }, { "docid": "397f225d7576175d196b311516a80459", "score": "0.5514124", "text": "public function index(){\n $cat = categoria::find(1);\n return $cat->productos;\n }", "title": "" }, { "docid": "68c7a183e9b20704846dcac9e82942e1", "score": "0.55091554", "text": "public function index(){\n $calculadora = $this->modelo('Calculadora');\n\n $archivo = parent::getInfoSistema();\n $datos = [\n 'infoSistema' => $archivo,\n 'CalculadoraModelo' => $calculadora\n ];\n $this->vista('calculadora/index', $datos);\n }", "title": "" }, { "docid": "377a515d6f17dcd40a2b04c8a24c6e38", "score": "0.55082774", "text": "function getCategorias($sku,$departamento,$seccion,$familia){\n\t\t\t$catalogo[1][1][1]=array(3,23,24,25);\n\t\t\t$catalogo[1][1][2]=array(3,23,24,26);\n\t\t\t$catalogo[1][1][3]=array(3,23,24,27);\n\t\t\t$catalogo[1][1][4]=array(3,23,24,36);\n\t\t\t$catalogo[1][1][5]=array(3,23,24,30);\n\t\t\t$catalogo[1][1][6]=array(3,23,24,35);\n\t\t\t$catalogo[1][1][7]=array(3,23,24,31);\n\t\t\t$catalogo[1][1][8]=array(3,23,24,29);\n\t\t\t$catalogo[1][1][9]=array(3,23,24,37);\n\t\t\t$catalogo[1][1][10]=array(3,23,24,38);\n\t\t\t$catalogo[1][1][11]=array(3,23,24,155);\n\t\t\t$catalogo[1][1][12]=array(3,23,24,32);\t\n\t\t\t$catalogo[1][1][13]=array(3,23,24,28);\n\t\t\t$catalogo[1][1][14]=array(3,23,24,40);\n\t\t\t$catalogo[1][1][15]=array(3,23,24,33);\n\t\t\t$catalogo[1][1][16]=array(3,23,24,42);\n\t\t\t$catalogo[1][1][17]=array(3,23,24,44);\n\t\t\t$catalogo[1][2][1]=array(3,23,45,49);\n\t\t\t$catalogo[1][2][2]=array(3,23,45,47);\n\t\t\t$catalogo[1][2][3]=array(3,23,45,46);\n\t\t\t$catalogo[1][2][4]=array(3,23,45,54);\n\t\t\t$catalogo[1][2][5]=array(3,23,45,53);\n\t\t\t$catalogo[1][2][6]=array(3,23,45,48);\n\t\t\t$catalogo[1][2][7]=array(3,23,45,156);\n\t\t\t$catalogo[1][2][8]=array(3,23,45,57);\n\t\t\t$catalogo[1][3][1]=array(3,23,59,60);\n\t\t\t$catalogo[1][3][2]=array(3,23,59,176);\n\t\t\t$catalogo[1][3][3]=array(3,23,59,177);\n\t\t\t$catalogo[1][3][4]=array(3,23,59,178);\n\t\t\t$catalogo[1][3][5]=array(3,23,59,179);\n\t\t\t$catalogo[1][3][6]=array(3,23,59,180);\n\t\t\t$catalogo[1][3][7]=array(3,23,59,181);\n\t\t\t$catalogo[1][3][8]=array(3,23,59,182);\n\t\t\t$catalogo[1][4][1]=array(3,23,61,152);\n\t\t\t$catalogo[1][4][2]=array(3,23,61,183);\n\t\t\t$catalogo[1][4][3]=array(3,23,61,184);\n\t\t\t$catalogo[1][4][4]=array(3,23,61,185);\n\t\t\t$catalogo[1][4][5]=array(3,23,61,186);\n\t\t\t$catalogo[1][4][6]=array(3,23,61,187);\n\t\t\t$catalogo[1][4][7]=array(3,23,61,188);\n\t\t\t$catalogo[1][4][8]=array(3,23,61,189);\n\t\t\t$catalogo[1][4][9]=array(3,23,61,190);\n\t\t\t$catalogo[1][5][1]=array(3,23,206,207,158,159);\n\t\t\t$catalogo[1][5][2]=array(3,23,206,208,158,159);\n\t\t\t$catalogo[1][5][3]=array(3,23,206,209,158,159);\n\t\t\t$catalogo[1][5][4]=array(3,23,206,210,158,159);\n\t\t\t$catalogo[1][5][5]=array(3,23,206,211,158,159);\n\t\t\t$catalogo[1][5][6]=array(3,23,206,212,158,159);\n\t\t\t$catalogo[1][5][7]=array(3,23,206,213,158,159);\n\t\t\t$catalogo[1][5][8]=array(3,23,206,214,158,159);\n\t\t\t$catalogo[2][1][1]=array(3,62,63,64);\n\t\t\t$catalogo[2][1][2]=array(3,62,63,65);\n\t\t\t$catalogo[2][1][3]=array(3,62,63,66);\n\t\t\t$catalogo[2][1][4]=array(3,62,63,67);\n\t\t\t$catalogo[2][1][5]=array(3,62,63,68);\n\t\t\t$catalogo[2][1][6]=array(3,62,63,70);\n\t\t\t$catalogo[2][1][7]=array(3,62,63,71);\n\t\t\t$catalogo[2][1][8]=array(3,62,63,69);\n\t\t\t$catalogo[2][1][9]=array(3,62,63,72);\n\t\t\t$catalogo[2][1][10]=array(3,62,63,73);\n\t\t\t$catalogo[2][1][11]=array(3,62,63,77);\n\t\t\t$catalogo[2][2][1]=array(3,62,78,84);\n\t\t\t$catalogo[2][2][2]=array(3,62,78,81);\n\t\t\t$catalogo[2][2][3]=array(3,62,78,80);\n\t\t\t$catalogo[2][2][4]=array(3,62,78,87);\n\t\t\t$catalogo[2][2][5]=array(3,62,78,82);\n\t\t\t$catalogo[2][2][6]=array(3,62,78,83);\n\t\t\t$catalogo[2][2][7]=array(3,62,78,153);\n\t\t\t$catalogo[2][2][8]=array(3,62,78,90);\n\t\t\t$catalogo[2][2][9]=array(3,62,78,79);\n\t\t\t$catalogo[2][3][1]=array(3,62,92,93);\n\t\t\t$catalogo[2][3][2]=array(3,62,92,191);\n\t\t\t$catalogo[2][3][3]=array(3,62,92,192);\n\t\t\t$catalogo[2][3][4]=array(3,62,92,193);\n\t\t\t$catalogo[2][3][5]=array(3,62,92,194);\n\t\t\t$catalogo[2][4][1]=array(3,62,94,95);\n\t\t\t$catalogo[2][4][2]=array(3,62,94,195);\n\t\t\t$catalogo[2][4][3]=array(3,62,94,196);\n\t\t\t$catalogo[2][4][4]=array(3,62,94,197);\n\t\t\t$catalogo[2][4][5]=array(3,62,94,198);\n\t\t\t$catalogo[2][4][6]=array(3,62,94,199);\n\t\t\t$catalogo[2][4][7]=array(3,62,94,200);\n\t\t\t$catalogo[2][4][8]=array(3,62,94,201);\n\t\t\t$catalogo[2][5][1]=array(3,62,215,216,158,160);\n\t\t\t$catalogo[2][5][2]=array(3,62,215,217,158,160);\n\t\t\t$catalogo[2][5][3]=array(3,62,215,218,158,160);\n\t\t\t$catalogo[2][5][4]=array(3,62,215,219,158,160);\n\t\t\t$catalogo[2][5][5]=array(3,62,215,220,158,160);\n\t\t\t$catalogo[2][5][6]=array(3,62,215,221,158,160);\n\t\t\t$catalogo[2][5][7]=array(3,62,215,222,158,160);\n\t\t\t$catalogo[2][5][8]=array(3,62,215,223,158,160);\n\t\t\t$catalogo[4][1][1]=array(3,101,171,102);\n\t\t\t$catalogo[4][1][4]=array(3,101,171,120);\n\t\t\t$catalogo[4][1][5]=array(3,101,171,121);\n\t\t\t$catalogo[4][1][6]=array(3,101,171,116);\n\t\t\t$catalogo[4][1][7]=array(3,101,171,115);\n\t\t\t$catalogo[4][1][8]=array(3,101,171,119);\n\t\t\t$catalogo[4][1][9]=array(3,101,171,112);\n\t\t\t$catalogo[4][1][10]=array(3,101,171,167);\n\t\t\t$catalogo[4][1][11]=array(3,101,171,168);\n\t\t\t$catalogo[4][1][12]=array(3,101,171,111);\n\t\t\t$catalogo[4][1][13]=array(3,101,171,110);\n\t\t\t$catalogo[4][1][14]=array(3,101,171,117);\n\t\t\t$catalogo[4][1][15]=array(3,101,171,113);\n\t\t\t$catalogo[4][1][16]=array(3,101,171,118);\n\t\t\t$catalogo[4][2][1]=array(3,101,224,226,171,105);\n\t\t\t$catalogo[4][2][2]=array(3,101,224,227,171,105);\n\t\t\t$catalogo[4][3][1]=array(3,101,225,228,171,104);\n\t\t\t$catalogo[4][3][2]=array(3,101,225,229,171,104);\n\t\t\t$catalogo[4][4][1]=array(3,101,106,169);\n\t\t\t$catalogo[4][4][2]=array(3,101,106,170);\n\t\t\t$catalogo[4][4][3]=array(3,101,106,108);\n\t\t\t$catalogo[4][4][4]=array(3,101,106,109);\n\t\t\t$catalogo[4][4][5]=array(3,101,106,205);\n\t\t\t$catalogo[4][5][1]=array(3,101,96,164);\n\t\t\t$catalogo[4][5][2]=array(3,101,96,97);\n\t\t\t$catalogo[4][5][3]=array(3,101,96,166);\n\t\t\t$catalogo[4][5][4]=array(3,101,96,165);\n\t\t\t$catalogo[4][5][5]=array(3,101,96,99);\n\t\t\t$catalogo[7][1][1]=array(3,122,123,124);\n\t\t\t$catalogo[7][1][2]=array(3,122,123,125);\n\t\t\t$catalogo[7][1][3]=array(3,122,123,126);\n\t\t\t$catalogo[7][1][4]=array(3,122,123,127);\n\t\t\t$catalogo[7][1][5]=array(3,122,123,128);\n\t\t\t$catalogo[7][1][6]=array(3,122,123,129);\n\t\t\t$catalogo[7][1][7]=array(3,122,123,130);\n\t\t\t$catalogo[7][1][8]=array(3,122,123,132);\n\t\t\t$catalogo[7][1][9]=array(3,122,123,133);\n\t\t\t$catalogo[7][1][10]=array(3,122,123,134);\n\t\t\t$catalogo[7][1][11]=array(3,122,123,135);\n\t\t\t$catalogo[7][1][12]=array(3,122,123,136);\n\t\t\t$catalogo[7][1][13]=array(3,122,123,137);\n\t\t\t$catalogo[7][1][14]=array(3,122,123,138);\n\t\t\t$catalogo[7][1][15]=array(3,122,123,140);\n\t\t\t$catalogo[7][2][1]=array(3,122,142,144);\n\t\t\t$catalogo[7][2][2]=array(3,122,142,145);\n\t\t\t$catalogo[7][3][1]=array(3,122,148,149);\n\t\t\t$catalogo[7][4][1]=array(3,122,150,151);\n\n\n if ($departamento && $seccion && $familia){\t\n\t\t\t$categorias=$catalogo[$departamento][$seccion][$familia];\n\n\t\t}\n\t\t$catExist = CategoriesFromSku($sku);\n\t\techo 'cats_exits=';\n\t\tprint_r ($catExist);\n\t\tif (!empty($catExist)){\n\t\t\t$categorias = array_merge($categorias, $catExist);\n\t\t\t$categorias = array_unique($categorias);\n\t\t}\n\t\t foreach($categorias as $categor):\n\t\t\t$cats .= $categor.\",\";\n\t\t endforeach;\n\t\t \n\t\t $cats = substr($cats,0,-1);\n\t\t echo 'cats='.$cats;\n\t\treturn $cats;\n\n\t\t\n}", "title": "" }, { "docid": "760a02c238388604e15960f254a527c1", "score": "0.5507374", "text": "function cl_placaixarec() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"placaixarec\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "46c2ffae757a7d79261f2f38fd02b4b4", "score": "0.5493472", "text": "public function index()\n {\n $afcat = Afiliacioncatalogo::where('activo', 1)->get();\n return view('afiliacioncatalogos.afiliacioncatalogo',compact('afcat'));\n }", "title": "" }, { "docid": "f19dfe1ddc654128939d4ebaf2665e8d", "score": "0.54605025", "text": "public function catalogo(){\n return $this->productoM->todos();\n }", "title": "" }, { "docid": "e9c4a73a5d017067f112ec850d086983", "score": "0.54555404", "text": "function listDishesPlats() {\n $sql = $this->database->query('SELECT * FROM `lcdh_dishes` WHERE `categories_id` = \"2\" ');\n $result = $sql->fetchAll(PDO::FETCH_OBJ);\n return $result;\n }", "title": "" }, { "docid": "fcc8b8290630ba4d3fc978366de0229f", "score": "0.5453189", "text": "public static function catalog()\n\t{\n\t\t//for a template in the templates directory\n\t\tglobal $post;\n\t\t$this_url = get_permalink($post->ID);\n\t\t\n\t\tob_start();\n\t\t\n\t\t/** Calculations for pagination **/\n\t\t$page = get_query_var('paged') ? get_query_var('paged') : 1;\n\t\t$posts_per_page = get_query_var('posts_per_page');\n\t\t$total_workers = wp_count_posts(MANPOWER)->publish;\t\n\n\t\tif ($total_workers % $posts_per_page == 0)\n\t\t{\n\t\t\t//if divisible, just divide\n\t\t\t$total_pages = ($total_workers / $posts_per_page);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//if not divisible, add 1 for the remainder\n\t\t\t//note: there is no integral division in PHP. int / int = float.\n\t\t\t$total_pages = (int)($total_workers / $posts_per_page) + 1;\n\t\t}\n\t\t$workers = Worker::load_all($page);\n\t\trequire_once(\"views/mp_catalog.phtml\");\n\t}", "title": "" }, { "docid": "7dadcf14640348e6a087cba9c713abdb", "score": "0.5452762", "text": "public function getProductByOrigami()\n {\n $category = ParentCategory::where('name', 'Origami')->firstOrFail();\n\n // if category doesnt exist return error message\n if (!$category) return response()->json(['message' => 'Category does not exist..']);\n\n // get all products that has parent_category_id same as $category->id\n $productsWithPag = Product::info()->where('parent_category_id', $category->id)->paginate(6);\n $products = Product::info()->where('parent_category_id', $category->id)->get();\n\n // get all child categories that has parent_category_id same as $category->id\n $childCat = ChildCategory::info()->where('parent_category_id', $category->id)->get();\n\n $data = [\n 'productsWithPag' => $productsWithPag,\n 'products' => $products,\n 'childCat' => $childCat\n ];\n\n // return collection\n return response()->json($data, 200);\n }", "title": "" }, { "docid": "fdced2c47d376a00816d40848621e2a9", "score": "0.54329467", "text": "private function afficherCatalogue()\n {\n if (isset($_POST['type']) && isset($_POST['ordre'])) {\n $type = $_POST['type'];\n $ordre = $_POST['ordre'];\n $bte = new Bouteille();\n\n // var_dump($type, $ordre);\n // exit;\n $data = $bte->getListeBouteilleCatalogueTri($type, $ordre);\n include(\"vues/entete.php\");\n include(\"vues/catalogue.php\");\n include(\"vues/pied.php\");\n } else if (isset($_POST['recherche'])) {\n $recherche = $_POST['nom_bouteille_catalogue'];\n $bte = new Bouteille();\n\n // var_dump($recherche);\n // exit;\n $data = $bte->getRechercheBouteilleCatalogue($recherche);\n include(\"vues/entete.php\");\n include(\"vues/catalogue.php\");\n include(\"vues/pied.php\");\n } else {\n $bte = new Bouteille();\n $data = $bte->getListeBouteille();\n include(\"vues/entete.php\");\n include(\"vues/catalogue.php\");\n include(\"vues/pied.php\");\n }\n }", "title": "" }, { "docid": "3a8dbb05ba705ac420f50946e27b9e31", "score": "0.54232436", "text": "public function cobas() \r\n {\r\n return $this->liste(\"COBAS=1\");\r\n }", "title": "" }, { "docid": "1b027e44d59f42c18144e489e2f55792", "score": "0.5416299", "text": "public function getListPais(){\n return Pais::orderBy('nombre')->get();\n }", "title": "" }, { "docid": "9a9f97ca378f2e4a686b67a0b6d3123b", "score": "0.5414709", "text": "function _putCatalog() {\n parent::_putcatalog();\n if (count($this->outlines) > 0) {\n $this->_out('/Outlines '.$this->OutlineRoot.' 0 R');\n $this->_out('/PageMode /UseOutlines');\n }\n }", "title": "" }, { "docid": "f9b571dbc97c9aac9a0dc2425a8e031c", "score": "0.5413925", "text": "public function initCargos()\n\t{\n\t\t$this->collCargos = new PropelObjectCollection();\n\t\t$this->collCargos->setModel('Cargo');\n\t}", "title": "" }, { "docid": "675e8ac343648485130d8ff5d2cb4101", "score": "0.5407986", "text": "public function indexAction() {\n //$cidades = $this->mongo('BannerCoreBundle:City')->findAll();\n $cidades = $this->mongo('BannerCoreBundle:City')->findAllByOrder();\n return array('cidades' => $cidades, 'title' => $this->trans(\"Listagem de Cidades\"));\n }", "title": "" }, { "docid": "36e33f8c88ef819e36e170250ee4ddd1", "score": "0.5407451", "text": "function getCatalog($prof_id, $uid, &$count, &$size, &$works, $limit, $offset, $order = \"general\", $direction = 0, $favorite = 0, $filter = NULL)\n {\n return $this->new_getCatalog($prof_id, $uid, $count, $size, $works, $limit, $offset, $order, $direction, $favorite, $filter);\n }", "title": "" }, { "docid": "7ba6cf1ba1c9cd2598ec4fa1572051ab", "score": "0.54064065", "text": "public function listar()\n {\n return CategoriaResource::collection(Categoria::all());\n }", "title": "" }, { "docid": "2d91ddee03ee58e756d671f45bd06038", "score": "0.5399169", "text": "function listar_categorias(){\n\t\t$conexión = new Conexion();\n\n\t\t//Se usa el metodo conectar de la clase conexion\n\t\t$cadena_conexion = $conexión->Conectar();\n\n\t\t//Realizamos ek script para insertar una categoria producto\n\t\t$stmt = $cadena_conexion->prepare(\"SELECT * FROM categoria_producto\");\n\n\t\n\t\t//si la insercion del usuario se ejecuto entonces...\n\t\tif($stmt->execute()){\n\t\t\t$result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn json_encode($result);\n\n\n\t}", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.5391472", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "efe8a215d0ec5e373cd1b8d2b73433fb", "score": "0.5388627", "text": "public function cgetCataloguesAction(Request $request)\n {\n $filter = array();\n\n $packageId = $request->get('packageId');\n if (!empty($packageId)) {\n $filter['packageId'] = $packageId;\n }\n\n if ($request->get('flat') == 'true') {\n /** @var RestHelperInterface $restHelper */\n $restHelper = $this->get('sulu_core.doctrine_rest_helper');\n\n /** @var DoctrineListBuilderFactory $factory */\n $factory = $this->get('sulu_core.doctrine_list_builder_factory');\n\n $listBuilder = $factory->create(self::$entityName);\n\n $restHelper->initializeListBuilder($listBuilder, $this->getFieldDescriptors());\n\n foreach ($filter as $key => $value) {\n $listBuilder->where($this->getFieldDescriptor($key), $value);\n }\n\n $list = new ListRepresentation(\n $listBuilder->execute(),\n self::$entityKey,\n 'get_catalogues',\n $request->query->all(),\n $listBuilder->getCurrentPage(),\n $listBuilder->getLimit(),\n $listBuilder->count()\n );\n } else {\n $list = new TranslateCollectionRepresentation(\n $this->getDoctrine()->getRepository(self::$entityName)->findAll(),\n self::$entityKey\n );\n }\n $view = $this->view($list, 200);\n\n return $this->handleView($view);\n }", "title": "" }, { "docid": "c275188dfa85a54c1857742719aadaf8", "score": "0.5385277", "text": "public function getCabeceras() {\n include_once \"../lib/incluye_recursos.php\";\n include_once \"../lib/head.php\";\n }", "title": "" }, { "docid": "d72058141b40ea0aac0c67843873a299", "score": "0.5382787", "text": "public function run()\n {\n $produtos = [\n 0 => [\n 'nome' => 'Açucareiro',\n 'descricao' => 'Açucareiro com design moderno.',\n 'preco' => 9.99,\n 'categorias' => [\n ['id' => 3],\n ],\n 'imagens' => [\n ['id' => 1],\n ],\n 'caracteristicas' => [\n ['id' => 1, 'valor' => 'Açúcar Brasil'],\n ['id' => 2, 'valor' => 'Prateado'],\n ['id' => 5, 'valor' => '200 gramas'],\n ],\n ],\n 1 => [\n 'nome' => 'Cabide',\n 'descricao' => 'Cabide de plástico resistente.',\n 'preco' => 1.99,\n 'categorias' => [\n ['id' => 3],\n ],\n 'imagens' => [\n ['id' => 2],\n ],\n 'caracteristicas' => [\n ['id' => 1, 'valor' => 'Conde Plus'],\n ['id' => 2, 'valor' => 'Preto'],\n ['id' => 5, 'valor' => '150 gramas'],\n ],\n ],\n 2 => [\n 'nome' => 'Cadeira Branca',\n 'descricao' => 'Cadeira de Luxo.',\n 'preco' => 1599.99,\n 'categorias' => [\n ['id' => 2],\n ],\n 'imagens' => [\n ['id' => 3],\n ],\n 'caracteristicas' => [\n ['id' => 1, 'valor' => 'Presidente'],\n ['id' => 2, 'valor' => 'Branca'],\n ['id' => 5, 'valor' => '5 Kilos'],\n ],\n ],\n 3 => [\n 'nome' => 'Discman',\n 'descricao' => 'Discman top de linha.',\n 'preco' => 1599.99,\n 'categorias' => [\n ['id' => 1],\n ],\n 'imagens' => [\n ['id' => 4],\n ],\n 'caracteristicas' => [\n ['id' => 1, 'valor' => 'Sony'],\n ['id' => 2, 'valor' => 'Prata'],\n ['id' => 5, 'valor' => '700 gramas'],\n ],\n ],\n 4 => [\n 'nome' => 'Mesa de Jantar',\n 'descricao' => 'Mesa especial para sua cozinha.',\n 'preco' => 459.99,\n 'categorias' => [\n ['id' => 2],\n ],\n 'imagens' => [\n ['id' => 5],\n ],\n 'caracteristicas' => [\n ['id' => 1, 'valor' => 'Itatiaya'],\n ['id' => 2, 'valor' => 'Marrom'],\n ['id' => 5, 'valor' => '6 Kilos'],\n ],\n ],\n 5 => [\n 'nome' => 'Televisão Antiga',\n 'descricao' => 'Televisão raridade para colecionadores.',\n 'preco' => 4678.99,\n 'categorias' => [\n ['id' => 1],\n ],\n 'imagens' => [\n ['id' => 6],\n ],\n 'caracteristicas' => [\n ['id' => 1, 'valor' => 'Sony'],\n ['id' => 2, 'valor' => 'Marrom claro'],\n ['id' => 5, 'valor' => '15 Kilos'],\n ],\n ],\n 6 => [\n 'nome' => 'Videocassete',\n 'descricao' => 'Videocassete raridade para colecionadores.',\n 'preco' => 2699.99,\n 'categorias' => [\n ['id' => 1],\n ],\n 'imagens' => [\n ['id' => 7],\n ],\n 'caracteristicas' => [\n ['id' => 1, 'valor' => 'JVC'],\n ['id' => 2, 'valor' => 'Preto'],\n ['id' => 5, 'valor' => '2 Kilos'],\n ],\n ],\n ];\n\n foreach($produtos as $produto) {\n $produto_obj = new Produto;\n $produto_obj->nome = $produto['nome'];\n $produto_obj->descricao = $produto['descricao'];\n $produto_obj->preco = $produto['preco'];\n $produto_obj->created_at = now();\n $produto_obj->updated_at = now(); \n\n $produto_obj->save();\n \n foreach($produto['categorias'] as $categoria) { \n $categoria_obj = Categoria::find($categoria['id']);\n\n $produto_categoria = new ProdutoCategoria;\n $produto_categoria->produto_id = $produto_obj->id;\n $produto_categoria->categoria_id = $categoria_obj->id;\n\n $produto_categoria->save(); \n }\n\n foreach($produto['caracteristicas'] as $caracteristica) {\n $caracteristica_obj = Caracteristica::find($caracteristica['id']);\n \n $produto_caracteristica = new ProdutoCaracteristica;\n $produto_caracteristica->produto_id = $produto_obj->id;\n $produto_caracteristica->caracteristica_id = $caracteristica_obj->id;\n $produto_caracteristica->valor = $caracteristica['valor'];\n\n $produto_caracteristica->save(); \n }\n\n foreach($produto['imagens'] as $imagem) {\n $imagem_obj = Imagem::find($imagem['id']);\n\n $produto_obj->imagens()->saveMany([$imagem_obj]); \n } \n }\n }", "title": "" }, { "docid": "c4c7d68c726021aec9a970273a1c487e", "score": "0.5380732", "text": "public function productos_marcas(){\n\t\t\n\t\t// Relative Uri Helper\n\t\t$data['rel_uri'] = '';\n\t\tif((substr_count($_SERVER['REQUEST_URI'],'/'))>1){\n\t\t\tfor ($i=1; $i < substr_count($_SERVER['REQUEST_URI'],'/'); $i++) { \n\t\t\t\t$data['rel_uri'] .= '../';\n\t\t\t}\n\t\t}\n\n\t\t// Carga estilos para la página\n\t\t$data['css'] = \"productos_marcas\";\n\n\t\t// Carga javascript para la página\n\t\t$data['js'] = \"productos_marcas\";\n\n\t\t// Carga de vistas de la función\n\t\techo view('templates/header', $data);\n\t\techo view('templates/navigation', $data);\n\t\techo view('pages/productos_marcas', $data);\n\t\techo view('templates/footer', $data);\n\t}", "title": "" }, { "docid": "b891a506da62340705592d3e46914c5a", "score": "0.53766936", "text": "function poliza($datos)\n{\n\t$datos['Polizas']['Certificado'] = $datos['factura']['certificado'];\n\t$datos['Polizas']['noCertificado'] = $datos['factura']['noCertificado'];\n\tunset($datos['factura']);\n\t\n\tforeach($datos['Polizas']['Poliza'] as $idxp => $poliza)\n\t{\n\t\t$nodos_transaccion = '';\n\t\tforeach($poliza['Transaccion'] as $idxt => $transaccion)\n\t\t{\n\t\t\t$atrs_transaccion = mf_atributos_nodo($transaccion, '');\n\t\t\t\n\t\t\t$nodos_compnal='';\n\t\t\tforeach($transaccion['CompNal'] as $idxcn => $compnal)\n\t\t\t{\n\t\t\t\t$atrs_compnal = mf_atributos_nodo($compnal, '');\n\t\t\t\t$nodos_compnal .= \"<PLZ:CompNal $atrs_compnal></PLZ:CompNal>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nodos_compnalotr='';\n\t\t\tforeach($transaccion['CompNalOtr'] as $idxcno => $compnalotr)\n\t\t\t{\n\t\t\t\t$atrs_compnalotr = mf_atributos_nodo($compnalotr, '');\n\t\t\t\t$nodos_compnalotr .= \"<PLZ:CompNalOtr $atrs_compnalotr></PLZ:CompNalOtr>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nodos_compext='';\n\t\t\tforeach($transaccion['CompExt'] as $idxcme => $compext)\n\t\t\t{\n\t\t\t\t$atrs_compext = mf_atributos_nodo($compext, '');\n\t\t\t\t$nodos_compext .= \"<PLZ:CompExt $atrs_compext></PLZ:CompExt>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nodos_cheque='';\n\t\t\tforeach($transaccion['Cheque'] as $idxcheque => $cheque)\n\t\t\t{\n\t\t\t\t$atrs_cheque = mf_atributos_nodo($cheque, '');\n\t\t\t\t$nodos_cheque .= \"<PLZ:Cheque $atrs_cheque></PLZ:Cheque>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nodos_transferencia='';\n\t\t\tforeach($transaccion['Transferencia'] as $idxcheque => $transferencia)\n\t\t\t{\n\t\t\t\t$atrs_transferencia= mf_atributos_nodo($transferencia, '');\n\t\t\t\t$nodos_cheque .= \"<PLZ:Transferencia $atrs_transferencia></PLZ:Transferencia>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nodos_otrometodopago='';\n\t\t\tforeach($transaccion['OtrMetodoPago'] as $idxcheque => $otrmetodopago)\n\t\t\t{\n\t\t\t\t$atrs_otrmetodopago= mf_atributos_nodo($otrmetodopago, '');\n\t\t\t\t$nodos_otrometodopago .= \"<PLZ:OtrMetodoPago $atrs_otrmetodopago></PLZ:OtrMetodoPago>\";\n\t\t\t}\n\t\t\t\n\t\t\t$nodos_transaccion .= \"<PLZ:Transaccion $atrs_transaccion>$nodos_compnal$nodos_compnalotr$nodos_compext$nodos_cheque$nodos_transferencia$nodos_otrometodopago</PLZ:Transaccion>\";\n\t\t}\n\t\t\n\t\t$atrs_poliza = mf_atributos_nodo($poliza, '');\n\t\t$nodos_poliza .= \"<PLZ:Poliza $atrs_poliza>$nodos_transaccion</PLZ:Poliza>\";\n\t}\n\t\n\t$atrs_polizas = mf_atributos_nodo($datos['Polizas'], '');\n\t$xml_polizas = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.\"\\n<PLZ:Polizas xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:PLZ=\\\"http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/PolizasPeriodo\\\" xsi:schemaLocation=\\\"http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/PolizasPeriodo http://www.sat.gob.mx/esquemas/ContabilidadE/1_3/PolizasPeriodo/PolizasPeriodo_1_3.xsd\\\" Version='1.3' $atrs_polizas Sello='{SELLO}'>$nodos_poliza</PLZ:Polizas>\";\n\treturn $xml_polizas;\n}", "title": "" }, { "docid": "248d2da59e8238591a32c6aa97465140", "score": "0.53740275", "text": "public function listarCatalogo($CONTRATO)//listo\n {\n try\n {\n $query=\"SELECT tbcatalogo_produccion.id_catalogoP, tbasignaciones_contrato.clave_contrato, tbasignaciones_contrato.region_fiscal,\n tbcatalogo_produccion.ubicacion, tbcatalogo_produccion.tag_patin, tbcatalogo_produccion.tipo_medidor,\n tbcatalogo_produccion.tag_medidor, tbcatalogo_produccion.clasificacion,\n tbcatalogo_produccion.hidrocarburo\n FROM catalogo_produccion tbcatalogo_produccion\n JOIN asignaciones_contrato tbasignaciones_contrato\n ON tbasignaciones_contrato.id_asignacion = tbcatalogo_produccion.id_asignacion\n WHERE tbasignaciones_contrato.contrato = $CONTRATO\";\n $db= AccesoDB::getInstancia();\n $lista = $db->executeQuery($query);\n return $lista;\n } catch (Exception $ex)\n {\n throw $ex;\n return -1;\n }\n }", "title": "" }, { "docid": "d95f55f241b01d3a50710ced7db64ea7", "score": "0.5373754", "text": "function retornaProdutosCadastradosCombo(){\n\t\t\t$this->dao=new DaoProduto();\n\t\t\t$produtos = $this->dao->retornaProdutosCadastradosCombo();\n\t\t\treturn $produtos;\n\t\t}", "title": "" }, { "docid": "81c773a6e07f8c39f82d2a1ec140f24d", "score": "0.5370866", "text": "public static function getPOIProviders(){\n\n global $DBConnection;\n $db = $DBConnection->getDB();\n\n $poi_cats = iterator_to_array($db->poi_categories->find()->sort(array(\"_id\" => 1)));\n $pois = array();\n\n // Fetch the means\n foreach($poi_cats as $cat) {\n \n $itemsAsPHPArray = iterator_to_array($db->poi_providers->find(array('category_id' => $cat['_id'])));\n\n $items = array();\n\n foreach ($itemsAsPHPArray as $item){\n $items[$item['_id']] = $item['label'];\n }\n\n array_push($pois, array('id' => $cat['_id'], 'label' => $cat['label'], 'icon' => $cat['icon'], 'items' => $items));\n \n } \n\n return $pois;\n\n }", "title": "" }, { "docid": "c4f1d1dac4154a0745a2845f3a3058c8", "score": "0.5369444", "text": "public function listar(){\n // $cursos = ['Curso 1','Curso 2','Curso 3','Curso 4','Curso 5'];\n\n // Obtendo todos os dados do DB atraves da método estático 'all'\n // `id`, `nome`, `carga_horaria`, `professor`, `preco`, `created_at`, `updated_at`\n $cursos = Curso::all();\n\n return view('admin.cursos.listar_cursos', compact('cursos') );\n }", "title": "" }, { "docid": "04234650cf47e31de9c7f430ad080153", "score": "0.5367006", "text": "public function ubicaciones_articulos()\n\t{\n\t\treturn view('almacenaje::ubicaciones_articulos', [\n\t\t\t'bodega' => $this->getCombo(\"bodegaAO\"),\n\t\t\t'clasificacion' => $this->getCombo(\"clasificacion\"),\n\t\t\t'inactividad' => $this->getCombo(\"inactividad\"),\n\t\t\t'clase' => $this->getCombo(\"clase\")\n\t\t]);\n\t}", "title": "" }, { "docid": "46300bb2f3f5588d355d0066c4401192", "score": "0.53669924", "text": "public function initPioche(){\n $this->pioche = $this->getDeck()->getCartes();\n }", "title": "" }, { "docid": "e4b3bef94fee13c143a48432e5165c8e", "score": "0.53573775", "text": "function agregar(){\n parent::cargarvista(\"html/adminagregarproductos\");\n }", "title": "" }, { "docid": "c3ce14ed0fce66d97a7eb0bc848a2c8e", "score": "0.5346574", "text": "function squid_get_carp_list() {\n\t$list = array();\n\t$list[] = array(\"name\" => \"none\", \"value\" => \"none\");\n\t$carplist = get_configured_vip_list();\n\tforeach ($carplist as $vid => $vaddr) {\n\t\t$vip = get_configured_vip($vid);\n\t\t$list[] = array(\"name\" => \"$vaddr ({$vip['descr']})\", \"value\" => $vid);\n\t}\n\treturn ($list);\n}", "title": "" }, { "docid": "a1cc9ea3ce9b92665fda2984e655ef1c", "score": "0.53458846", "text": "function conteudo_capa(){\n\t\n\t \treturn\t'<!-- cabecalho -->\n\t \t\t\t<div class=\"cabecalho\"> \t\n\t\t\t\t\t<div id=\"owl-demo\" class=\"owl-carousel owl-theme\">\n\t\t\t\t\t \n\t\t\t\t\t <div class=\"item\"><img src=\"imagens/fullimage1.jpg\" alt=\"The Last of us\"></div>\n\t\t\t\t\t <div class=\"item\"><img src=\"imagens/fullimage2.jpg\" alt=\"GTA V\"></div>\n\t\t\t\t\t <div class=\"item\"><img src=\"imagens/fullimage3.jpg\" alt=\"Mirror Edge\"></div>\n\t\t\t\t\t \n\t\t\t\t\t</div>\n\t\t \t\t</div>\n\t\t \t\t<!-- cabecalho fim -->\n\t\t \t\t<!-- categorias-produtos -->\n\t\t\t\t<div class=\"categorias-produtos\"> \t\n\t\t\t\t\t<form class=\"form-topo\">\n\t\t \t\t\t\t<input type=\"text\" class=\"input-busca\" placeholder=\"pesquise por nomes de produtos\">\n\t\t \t\t\t\t<div class=\"busca-topo\">\n\t\t \t\t\t\t\t<i class=\"fa fa-search\"></i>\n\t\t \t\t\t\t\t<span class=\"btn-buscar\">buscar</span>\n\t\t \t\t\t\t</div>\n\t\t \t\t\t</form>\n\t\t\t\t\t<div class=\"categorias\"> \t\n\t\t\t\t\t\t<h1>Categorias</h1>\n\t\t\t\t\t\t<ul>\n\t\t\t \t\t\t\t<li><a href=\"#\">Eletrônicos</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Eletrodomésticos</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Informática</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Livros</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Brinquedos</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Saúde e Beleza</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Escritório</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Esporte e Lazer</a></li>\n\t\t\t \t\t\t\t<li><a href=\"#\">Relógios</a></li>\n\t\t \t\t\t\t</ul>\n\t\t \t\t\t</div>\n\t\t \t\t\t<div class=\"produtos\"> \n\t\t \t\t\t \t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\t\t\t \t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\n\t\t\t \t\t\t<div class=\"box-produto\">\n\t\t\t \t\t\t\t<a href=\"#\">\n\t\t\t \t\t\t\t\t<img src=\"imagens/foto-produto.jpg\">\n\t\t\t\t \t\t\t\t<h1>Livro xxx</h1>\n\t\t\t\t \t\t\t\t<p>$60</p>\n\t\t\t \t\t\t\t</a>\t\t \t\t\t\t\n\t\t\t \t\t\t</div>\t\t \n\t\t \t\t\t</div>\n\t\t \t\t</div>\t \n\t\t \t\t<!-- categorias-produtos fim -->';\n}", "title": "" }, { "docid": "1887c1c907cca31757b5de22ee362852", "score": "0.53429115", "text": "public function realizarArreglo()\n {\n $categories = Category::where('category_type_id', 1)->get();\n $ocasiones = Occasion::All();\n $colores= Color::All();\n $ciudades=City::All();\n $masVendidos = Product::limit(6)->get();\n $sliders=Slider::where('ruta', 1)->get();\n $datas = Data::all();\n\n\n return View('plantillas.realizarArreglo',compact('categories','masVendidos','ocasiones','sliders','datas','colores','ciudades'));\n }", "title": "" }, { "docid": "a82051fb9c3c79d2cc8656cce31d9677", "score": "0.5334937", "text": "public function visualizarProductos()\r\n {\r\n $resultado[][]=null;\r\n require_once __DIR__ . '/../../core/conexionBd.php';\r\n $conexionBD = (new ConexionBd())->getConexion();\r\n $sql = \"SELECT id, nombreCorto, nombre, descripcion, PVP , idFamilia , Foto\r\n FROM dbo.articulo\";\r\n $stmt = $conexionBD->query( $sql );\r\n $contador=0;\r\n while ( $row = $stmt->fetch( PDO::FETCH_ASSOC ) ){\r\n $resultado[$contador][0] = $row['id'];\r\n $resultado[$contador][1] = $row['nombreCorto'];\r\n $resultado[$contador][2] = $row['nombre'];\r\n $resultado[$contador][3] = $row['descripcion'];\r\n $resultado[$contador][4] = $row['PVP'];\r\n $resultado[$contador][5] = $row['idFamilia'];\r\n $resultado[$contador][6] = $row['Foto'];\r\n $contador++;\r\n }\r\n return $resultado;\r\n }", "title": "" }, { "docid": "114652a2d9bcf48ca4750d10ff23f96c", "score": "0.5334072", "text": "public function caducidadbylugarAction(){\n $idarticulovariante = $this->params()->fromQuery('idarticulovariante');\n $idlugar = $this->params()->fromQuery('idlugar');\n $descripcion = $this->params()->fromQuery('descripcion');\n $existencias = $this->params()->fromQuery('existencias');\n $lugarNombre = $this->params()->fromQuery('lugarNombre');\n $modalName = 'modal-producto-'.$idarticulovariante.'-lugar-'.$idlugar;\n \n $modal = array(\n 'nombre' => \\ArticulovarianteQuery::create()->findOneByIdarticulovariante($idarticulovariante)->getArticulo()->getArticuloNombre(),\n 'descripcion' => $descripcion,\n 'caducidad' => array(),\n 'existencias' => $existencias,\n 'lugar_nombre' => $lugarNombre,\n );\n \n //Obtenemos todas las ordenes de compra por idarticulovariante\n $ordenCompraDetalleCollection = \\OrdencompradetalleQuery::create()->findByIdarticulovariante($idarticulovariante);\n //Comenzamos a itinerar\n foreach($ordenCompraDetalleCollection as $kocd => $vocd){\n $date = new \\DateTime($vocd->getOrdencompradetalleCaducidad()); \n $tmp['caducidad'] = $date->format('m/y'); \n $tmp['id'] = $vocd->getIdOrdencompradetalle();\n \n //Por cada item de articulovariante revisamos su lugar en el inventrario\n $idodencompreadetalle = $vocd->getIdordencompradetalle();\n $lugarinventarioCollection = \\LugarinventarioQuery::create()->filterByIdlugar($idlugar)->filterByIdordencompradetalle($idodencompreadetalle)->find();\n //Itineramos en lugarInventario\n foreach ($lugarinventarioCollection as $kli => $vli){\n $tmp['cantidad'] = $vli->getLugarinventarioCantidad();\n $modal['caducidad'][] = $tmp;\n }\n \n }\n \n \n \n $viewModel = new ViewModel();\n $viewModel->setTerminal(true);\n $viewModel->setVariables(array(\n 'modalName' => $modalName,\n 'modal' => $modal,\n ));\n \n\n return $viewModel;\n \n }", "title": "" }, { "docid": "28cf7c04d7edc79a887519ac297f4b1a", "score": "0.53219473", "text": "public function products()\n {\n $catalogs = Catalog::orderBy('order', 'asc')->get();\n return view('product.index', compact('catalogs'));\n }", "title": "" }, { "docid": "b13053f2918f4dc83a75d804f50d8a9e", "score": "0.53206974", "text": "function listarResumenBautizoSantaCena(){\n\t\t$this->procedimiento='ccb.f_region_evento_sel';\n\t\t$this->transaccion='CCB_REGESCRES_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\t\n\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('hasta','hasta','date');\n\t\t$this->setParametro('id_regiones','id_regiones','varchar');\n\t\t$this->setParametro('tipo_evento','tipo_evento','varchar');\n\t\t\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('fecha_programada','date');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_region_evento','int4');\n\t\t$this->captura('id_casa_oracion','integer');\n\t\t$this->captura('id_region','int4');\n\t\t$this->captura('nombre_region','varchar');\n\t\t$this->captura('nombre_co','varchar');\n\t\t$this->captura('cantidad_hermano','INTEGER');\t\t\n\t\t$this->captura('cantidad_hermana','INTEGER');\t\t\n\t\t$this->captura('id_gestion','int4');\t\t\n\t\t$this->captura('gestion','varchar');\n\t\t$this->captura('id_detalle_evento_hermano','int4');\n\t\t$this->captura('id_detalle_evento_hermana','int4');\n\t\t$this->captura('id_evento','INTEGER');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('id_usuario_mod','integer');\n\t\t$this->captura('cuenta','varchar');\n\t\t$this->captura('hora','time');\n\t\t$this->captura('id_obrero','int4');\n\t\t$this->captura('desc_obrero','text');\n\t\t$this->captura('id_lugar','int4');\n\t\t$this->captura('nombre_lugar','varchar');\n\t\t\n\t\t\n\t\t\n \n \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "0415b0606a397ca0bd87d8ebb2463e5e", "score": "0.53118044", "text": "function configuracion(){\n\t$percepciones = array();\n\t$regimenfiscal = $this->CatalogosModel->regimenFiscal();\n\t$registroPatronal = $this->CatalogosModel->registroPatronal();\n\t$datos = $this->CatalogosModel->configuracionNominas();\n\t$percep = $this->CatalogosModel->percepcionesConfiguracion();\n\t$zona = $this->CatalogosModel->zona();\n\t$tipPeriodos=$this->CatalogosModel->tipoperiodo();\n\t$org = $this->CatalogosModel->organizacion();\n\tWhile ($result = $percep->fetch_array()){ \n\t\t$percepciones[] = $result; \n\t} \n\trequire(\"views/configuracion.php\");\n}", "title": "" }, { "docid": "6a4a6a72312717636ad026421147c4a2", "score": "0.53117573", "text": "public function index()\n{\n $cathegories = Cathegory::all();\n $products = Product::find(1)->paginate(6);\n return view('catalog.index', compact('products'), compact('cathegories'));\n}", "title": "" }, { "docid": "622b050655952b3f916ae4c134c689df", "score": "0.5311546", "text": "public function principal(){\n\t\t$id = '';\n\t\t$paginacion = 39;\n\t\t$categorias = Categoria::whereNull('padre_id')->orderBy('nombre', 'asc')->get();\n\t\t\n\t\tif(Request::isMethod('get')){\n\t\t\t\n\t\t\tif(Input::has('curso') && Input::has('colegio') && Input::has('categoria')){\n\t\t\t\t\t//solo las categorias del curso\n\t\t\t\t\t$categoria = Input::get('categoria');\n\t\t\t\t\t$colegio = Colegio::find(Input::get('colegio'));\n\t\t\t\t\t$curso = Curso::find(Input::get('curso'));\n\t\t\t\t\t$productos = $curso->productos();\n\t\t\t\t\t$filtro = Input::get('filtro');\n\t\t\t\t\t\n\t\t\t\t\tif($filtro == 'N'){\n\t\t\t\t\t\t$productos = $productos->orderBy('nombre', 'asc');\n\t\t\t\t\t}\n\t\t\t\t\tif($filtro == 'P'){\n\t\t\t\t\t\t$productos = $productos->orderBy('precio', 'asc');\n\t\t\t\t\t}\n\t\t\t\t\t//$categorias = $curso->categorias();\n\t\t\t\t\tSession::put('colegio', $colegio->nombre);\n\t\t\t\t\tSession::put('curso', $curso->nombre);\n\t\t\t\t\t$id = '-1';\n\t\t\t\t\t\n\t\t\t\t\t//filtro de productos\n\t\t\t\t\tif(Input::has('categoria') && Input::get('categoria')!='-1'){\n\t\t\t\t\t\t$productos = $productos->where('categoria_id', Input::get('categoria'));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t$productos = $productos->paginate($paginacion);\n\t\t\t\t\t\n\t\t\t\t\t//filtro de categorias\n\t\t\t\t\tif(!Session::has('categoria_colegio_'.$curso->id)){\n\t\t\t\t\t\t$categorias = array();\n\t\t\t\t\t\tforeach($productos as $p){\n\t\t\t\t\t\t\t$categorias = array_add($categorias, $p->categoria_id, Categoria::find($p->categoria_id));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSession::put('categoria_colegio_'.$curso->id, $categorias);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$categorias = Session::get('categoria_colegio_'.$curso->id);\n\t\t\t\t\t}\n\t\t\t\t\treturn View::make('shop.consultar')\n\t\t\t\t\t\t->with('title', 'Principal')\n\t\t\t\t\t\t->with('cat', $categoria)\n\t\t\t\t\t\t->with('categorias', $categorias)\n\t\t\t\t\t\t->with('productos', $productos);\n\t\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\tif(Input::has('categoria') && Input::get('categoria')!='-1'){\n\t\t\t\t\t$filtro = Input::get('filtro');\n\t\t\t\t\t$productos = Producto::where('categoria_id', Input::get('categoria'));\n\t\t\t\t\tif($filtro == 'N'){\n\t\t\t\t\t\t$productos = $productos->orderBy('nombre', 'asc');\n\t\t\t\t\t}\n\t\t\t\t\tif($filtro == 'P'){\n\t\t\t\t\t\t$productos = $productos->orderBy('precio', 'asc');\n\t\t\t\t\t}\n\t\t\t\t\t$productos = $productos->paginate($paginacion);\n\t\t\t\t\tif($productos->count() > 0){\n\t\t\t\t\t\t$id = Input::get('categoria');\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$productos = Producto::paginate($paginacion);\n\t\t\t\t\t\t$id = '-1';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$productos = Producto::paginate($paginacion);\n\t\t\t\t\t$id = '-1';\n\t\t\t\t\tSession::set('colegio', null);\n\t\t\t\t\tSession::set('curso', null);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$productos = $productos->appends(Input::except('page'));\n\t\treturn View::make('shop.index')\n\t\t\t->with('title', 'Principal')\n\t\t\t->with('cat', $id)\n\t\t\t->with('categorias', $categorias)\n\t\t\t->with('productos', $productos);\n\t}", "title": "" }, { "docid": "ea98a5dd89ddaf4efa45ec74d5c8b625", "score": "0.53075117", "text": "public function index()\n {\n $marcas = Catalogo::Select(\"marca\")->groupby(\"marca\")->get()->toArray();\n $anios = Catalogo::Select(\"anio\")->groupby(\"anio\")->orderby(\"anio\")->get()->toArray();\n //dd($marcas); \n return view('welcome')->with([\"marcas\" => $marcas, \"anios\" => $anios]);\n }", "title": "" }, { "docid": "8cbb7035acb06a09673dea8397a909d4", "score": "0.5306673", "text": "public function visualizzaPagina(){\n $this->impostaPagina();\n $VHome= USingleton::getInstance('VHome');\n $VHome->mostraPagina();\n }", "title": "" }, { "docid": "38bd93b829ed2744c0cedf5ce340ae4a", "score": "0.5304974", "text": "public function show(LugarPoblado $lugarPoblado)\n {\n //\n }", "title": "" }, { "docid": "4236dcd7422f89b6554fdd6ca84a5749", "score": "0.53043", "text": "public function listarColaboradoresPendentes(){\n\t\t}", "title": "" }, { "docid": "5a8b30523df56f4062e4fd7c1ca674db", "score": "0.5304011", "text": "function cadastraProduto(){\n\t\t\t$nome=$_REQUEST['nome'];\n\t\t\t$preco=$_REQUEST['preco']; //Teste\n\t\t\t$codigo=$this->dao->cadastraProduto($nome); \n\t\t\t\t\t\t\n\t\t\t$produto=new Produto();\n\t\t\t$produto->setCodigo($codigo);\n\t\t\t$produto->setNome($nome);\n\t\t\t$produto->setPreco($preco); //Teste\n\t\t\t\n\t\t\techo $produto->getCodigo();\n\t\t}", "title": "" }, { "docid": "db6f96729ed26a20ee033f233d2a8514", "score": "0.5302667", "text": "public function plaqueados(): HasMany\n {\n return $this->hasMany(Plaqueado::class);\n }", "title": "" }, { "docid": "a3b5605a34674bb4f31472e09b4eb066", "score": "0.5291874", "text": "public function index()\n {\n $name = '';\n $storage = new StorageModel();\n $storage_list = $storage->storageList(null);\n\n $china_city = ChinaCityModel::where('layer',1)->get();\n\n $consignors = ConsignorModel::orderBy('id','desc')->paginate(20);\n return view('home.printSetup.consignor',[\n 'storage_list' => $storage_list,\n 'consignors' => $consignors,\n 'china_city' => $china_city,\n 'name' => $name\n ]);\n }", "title": "" }, { "docid": "b59e68259cc0a200301fef547903ca14", "score": "0.528758", "text": "public function index()\n {\n return Planos::all();\n }", "title": "" }, { "docid": "c3fbd620848db51229361c322941edaa", "score": "0.5287366", "text": "public function getIdCatalogo(){\n return $this->catalogo_id;\n }", "title": "" }, { "docid": "81adf1d286d5dae1f703d3c5ad1b7cfd", "score": "0.52860045", "text": "public function index()\n\t{\n $configuration['all_pizzas'] = PCPizzas::with(['pizzasConnections'])->with(['ground'])->with(['cheese'])->get()->toArray();\n\n// dd($configuration);\n\n return view('content.list_pizzas', $configuration);\n\t}", "title": "" }, { "docid": "c4de90e01b03502fa044fea331d8e982", "score": "0.52859575", "text": "public function get_categoria(){\n\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select * from categoria ;\";\n\n $sql=$conectar->prepare($sql);\n\n $sql->execute();\n\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "74ab17c5ddaf8d0b383abddbf4687676", "score": "0.52821517", "text": "private function affich_liste_prest_par_cat(){\r\n $cat = Categorie::where('id', '=', $this->id)->first();\r\n $nom = $cat->nom;\r\n $this->lien = $this->lien.'../';\r\n $page = '<h1> Prestations de la catégorie: '.$nom.'</h1> <ul>';\r\n $i = 1;\r\n foreach($this->tab as $pre){\r\n $cat = Categorie::where('id', '=', $pre->cat_id)->first();\r\n $page=$page.'<div class=\"col-lg-4 col-md-4\">\r\n <div class=\"fh5co-blog animate-box\">\r\n <a href=\"#\"><img class=\"img-responsive\" src=\"../../../images/'.$pre->img.'\"alt=\"\"></a>\r\n <div class=\"blog-text\">\r\n <h3><a href=\"#\">'.$pre->nom.'</a></h3>\r\n <span class=\"posted_on\">'.$pre->prix.' €</span>\r\n <a href=\"'.$this->lien.'index.php/PrestationController/affich_prest/'.$pre->id.'\" class=\"btn btn-primary\">Lire plus</a>\r\n <br> Categorie: '.$cat->nom.'\r\n </div> \r\n </div>\r\n </div>';\r\n $i++;\r\n }\r\n \r\n $this->methode='affich_cat_tri/'.$this->id;\r\n \r\n return $page;\r\n }", "title": "" }, { "docid": "6091ccb68db3896331fbd9af3395cb15", "score": "0.52810663", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $products = $em->getRepository('BoutiqueProduitsBundle:Produit')->findAll();\n\n $categories = $em->getRepository('BoutiqueProduitsBundle:Category')->findAll();\n\n //dump($categories);\n\n return $this->render('produit/index.html.twig', array(\n 'products' => $products,\n 'categories' => $categories\n ));\n }", "title": "" } ]
ee7213e3ac0eb65f2b572f60fcd4d94f
append list of contacts
[ { "docid": "a6bb9c78ee02fa405e3922c0953aefcb", "score": "0.6713547", "text": "public function append($myContacts) {\n foreach ($myContacts as $contact) {\n $this->sendContact($contact);\n }\n }", "title": "" } ]
[ { "docid": "e0573a99d4cf50b35951d641dcd86156", "score": "0.6757462", "text": "public function setList()\n {\n\n $this->OpenConnect();\n $sql=\"call spAllContacts()\";\n \n $result = $this->link->query($sql);\n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))\n {\n $newContact=new self();\n $newContact->setIdContact($row['idContact']);\n $newContact->setName($row['name']);\n $newContact->setSurname($row['surname']);\n $newContact->setTel($row['tel']);\n \n array_push($this->list, $newContact);\n }\n mysqli_free_result($result);\n $this->CloseConnect();\n \n \n }", "title": "" }, { "docid": "45a5298034fd30ac6a02b34b85014460", "score": "0.63799596", "text": "public function contacts();", "title": "" }, { "docid": "a57433bfb01dcf8fd362395c2393d699", "score": "0.6142788", "text": "function get_all_contacts () {\n global $db;\n\n $contacts = array();\n\n $result = $db->query(\"select * from contact\");\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n $contacts[] = array (\n 'id' => $row['contact_id'],\n 'content' => \"{$row['name']}, {$row['street']}, {$row['city']}, {$row['state']}, {$row['zip']}, {$row['phone']}\"\n );\n }\n\n return $contacts;\n }", "title": "" }, { "docid": "2708c3872c4895fd02c4439b5ac8e3d0", "score": "0.6138861", "text": "public static function listContacts(){\n\t\t\tglobal $smarty,$user;\n\n\t\t\t$contacts = get_contact_list($user[\"id\"]);\n\n\t\t\t$smarty->assign(\"contacts\",$contacts);\n\t\t\t$smarty->display(\"contacts.list.tpl.html\");\n\t\t}", "title": "" }, { "docid": "dc4466aa4ab552ccc9eabf99d52b6b8a", "score": "0.60668796", "text": "public function add_contacts(Request $request){\n\t\t\t\t\t\n\t\t$encrypted_cookies = base64_decode($request->account);\n\t\t$pieces = explode(\":\",$encrypted_cookies);\t\n\n\t\t$account_obj = User::where('username','=',$pieces[0])\n\t\t\t\t\t\t->where('api_token','=',$request->api_token)\n\t\t\t\t\t\t->first();\n\n\t \t$data_obj = null;\n\t \t$data_obj['success'] = false;\n\n\t\tif($account_obj!=null){\n\n\t \t\t$request['rep_id'] = $account_obj->id;\n\t\t \t$data_obj['success'] = true;\n\t \t\t$data_obj['content'] = Track::create($request->all());\n\t\t\t\n\t \t\treturn response()->json($data_obj);\n\t\t}\n\n\t\treturn response()->json($data_obj);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "1480a56cc65d03a377cf0518ca6654dd", "score": "0.606487", "text": "public function addContact();", "title": "" }, { "docid": "b8c1db47cb77d8b60d3780dc4cb40dc7", "score": "0.60598814", "text": "public function getContacts()\n {\n return $this->contacts;\n }", "title": "" }, { "docid": "b8c1db47cb77d8b60d3780dc4cb40dc7", "score": "0.60598814", "text": "public function getContacts()\n {\n return $this->contacts;\n }", "title": "" }, { "docid": "b8c1db47cb77d8b60d3780dc4cb40dc7", "score": "0.60598814", "text": "public function getContacts()\n {\n return $this->contacts;\n }", "title": "" }, { "docid": "ad7c61df216872149f782cf49b390ee4", "score": "0.6051533", "text": "public function retrieveContacts() {\n $this->contacts = array();\n $table_name = \"tblContacts\";\n $connection = db_connect();\n if ($connection->connect_error) {\n die(\"Connection failed: \" . $connection->connect_error);\n }\n $sql = \"SELECT * FROM $table_name ORDER BY id\";\n $result = @mysqli_query($connection, $sql) or die(mysqli_error($connection));\n while ($row = mysqli_fetch_array($result)) {\n $id = $row['id'];\n $firstname = $row['firstname'];\n $surname = $row['surname'];\n $phone = $row['phone'];\n $email = $row['email'];\n $address = $row['address'];\n $city = $row['city'];\n $province = $row['province'];\n $postal = $row['postal'];\n $birthday = $row['birthday'];\n $contact = new Contact($id, $firstname, $surname, $phone, $email, $address, $city, $province, $postal, $birthday);\n array_push($this->contacts, $contact);\n }\n //db_close($connection);\n }", "title": "" }, { "docid": "392135fe421a531fb5b68c71c3632638", "score": "0.59956723", "text": "public function writeContacts() {\n $file = fopen(\"../Assets/clientInfo.csv\",\"w\");\n //write to file\n foreach ($this->contacts as $contact) {\n $contact = (array) $contact;\n fputcsv($file, $contact, \",\");\n }\n //close file\n fclose($file);\n }", "title": "" }, { "docid": "4cac2965ddcaa0353d48ec48f70ddf23", "score": "0.5977783", "text": "public function addNumbersToModel($contacts)\n {\n foreach($contacts as $contact){\n $allNumbers = $contact->numbers;\n $contactNumbers = [];\n foreach($allNumbers as $number){\n $contactNumbers[] = $number->number;\n }\n $contact->phoneNumbers = implode(', ', $contactNumbers);\n }\n return $contacts;\n }", "title": "" }, { "docid": "a1099a92efa8de4bd8222fd9c5feb218", "score": "0.5956441", "text": "function appendContactFields(&$fields) {\n $addContactID = FALSE;\n foreach ($fields as $profileField => $specs) {\n if($profileField == 'profile_id') {\n continue;\n }\n if(in_array(strtolower($specs['entity']), array('contribution', 'membership', 'activity', 'participant'))) {\n //at this stage we will just always add contact id if it seems to include other entities - perhaps we should always?\n $addContactID = TRUE;\n }\n if(CRM_Utils_Array::value('FKClassName', $specs) == 'CRM_Contact_DAO_Contact') {\n $fields[$profileField]['type'] = 5000;\n $fields[$profileField]['name_field'] = $profileField . '_name';\n $fields[$profileField]['name_field'] = $profileField . '_name';\n }\n if(CRM_Utils_Array::value('data_type',$specs) == 'ContactReference') {\n $fields[$profileField]['type'] = 5001;\n $fields[$profileField]['url'] = CRM_Utils_System::url('civicrm/ajax/contactref', 'context=customfield&id=' . CRM_Core_BAO_CustomField::getKeyID($profileField));\n }\n\n }\n if($addContactID) {\n $fields = array_merge(array(\n 'contact_id' => array(\n 'title' => 'Contact', 'type' => 5000,\n 'size' => 60,\n 'entity' => 'contact',\n 'name_field' => 'contact_id_name',\n 'required' => true,\n ),\n // 'contact_id_name' => array('title' => 'Contact', 'type' => 5000)\n ), $fields);\n }\n }", "title": "" }, { "docid": "7d91889a7eaaace00e8edd5758563973", "score": "0.5939102", "text": "public function distributeContacts($agentsZipCodes , $contactsList);", "title": "" }, { "docid": "ddcb7af4d81ee387e0735294ad31c514", "score": "0.5934265", "text": "public function getContacts()\n {\n $l_sql = 'SELECT *, isys_catg_mail_addresses_list__title AS isys_cats_person_list__mail_address\n\t\t\tFROM isys_cats_person_nagios_list\n\t\t\tINNER JOIN isys_cats_person_list ON isys_cats_person_list__isys_obj__id = isys_cats_person_nagios_list__isys_obj__id\n\t\t\tINNER JOIN isys_obj ON isys_obj__id = isys_cats_person_list__isys_obj__id\n\t\t\tLEFT JOIN isys_catg_mail_addresses_list ON (isys_obj__id = isys_catg_mail_addresses_list__isys_obj__id AND isys_catg_mail_addresses_list__primary = 1)\n\t\t\tWHERE isys_obj__status = ' . $this->convert_sql_int(C__RECORD_STATUS__NORMAL) . ';';\n\n return $this->retrieve($l_sql . ';');\n }", "title": "" }, { "docid": "c21747e5551ac38d3faf1201e300ef59", "score": "0.58741146", "text": "function get_contacts()\r\n\t{\r\n\t\trequire_once('modules/Contacts/Contact.php');\r\n\t\t$this->load_relationship('contacts');\r\n\t\t$query_array=$this->contacts->getQuery(true);\r\n\t\t\r\n\t\t//update the select clause in the retruned query.\r\n\t\t$query_array['select']=\"SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.email1, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id \";\r\n\t\r\n\t\t$query='';\r\n\t\tforeach ($query_array as $qstring) {\r\n\t\t\t$query.=' '.$qstring;\r\n\t\t}\t\r\n\t $temp = Array('id', 'first_name', 'last_name', 'title', 'email1', 'phone_work', 'opportunity_role', 'opportunity_rel_id');\r\n\t\treturn $this->build_related_list2($query, new Contact(), $temp);\r\n\t}", "title": "" }, { "docid": "a46bdd5b9775898300580a2ea61b780c", "score": "0.58528215", "text": "public function addContact($email, $first_name, $last_name, $list)\n {\n ElasticEmail::addContact($email, $first_name, $last_name, $list);\n }", "title": "" }, { "docid": "02fbbd0fcb0f82841176ba455922fb10", "score": "0.57782024", "text": "function add2list($contact,$list,array $existing=null)\n\t{\n\t\tif (!(int)$list || !is_array($contact) && !(int)$contact) return false;\n\n\t\tif (!is_array($existing))\n\t\t{\n\t\t\t$existing = array();\n\t\t\tforeach($this->db->select($this->ab2list_table,'contact_id',array('list_id'=>$list),__LINE__,__FILE__) as $row)\n\t\t\t{\n\t\t\t\t$existing[] = $row['contact_id'];\n\t\t\t}\n\t\t}\n\t\tif (!($to_add = array_diff((array)$contact,$existing)))\n\t\t{\n\t\t\treturn true;\t// no need to insert it, would give sql error\n\t\t}\n\t\tforeach($to_add as $contact)\n\t\t{\n\t\t\t$this->db->insert($this->ab2list_table,array(\n\t\t\t\t'contact_id' => $contact,\n\t\t\t\t'list_id' => $list,\n\t\t\t\t'list_added' => time(),\n\t\t\t\t'list_added_by' => $GLOBALS['egw_info']['user']['account_id'],\n\t\t\t),array(),__LINE__,__FILE__);\n\t\t}\n\t\t// update etag\n\t\treturn $this->db->update($this->lists_table,array(\n\t\t\t'list_etag=list_etag+1',\n\t\t\t'list_modified' => time(),\n\t\t\t'list_modifier' => $GLOBALS['egw_info']['user']['account_id'],\n\t\t),array(\n\t\t\t'list_id' => $list,\n\t\t),__LINE__,__FILE__);\n\t}", "title": "" }, { "docid": "f19ebe7fa2d1263fa8cb36dc67ee29ed", "score": "0.5775449", "text": "public function add_mailchimp_contact($params){ //\n\n $result = $this->call(\"POST\",MAILCHIMP_API_URL.'lists/'.$params['mailchimp_group_id'].'/members/',$params);\n\n return $result;\n\t}", "title": "" }, { "docid": "8dd0456d344488b96d5af17f598186d1", "score": "0.5759391", "text": "function migrate_contacts() {\n\t\t$clients = $this->Client->find('all');\n\t\t\n\t\tif ($clients) {\n\t\t\tforeach ($clients as $client) {\n\t\t\t\tif ($client['Contact']) {\n\t\t\t\t\t$arr_contact['Client']['billing_name'] = $client['Contact'][0]['contact_name'];\n\t\t\t\t\t$arr_contact['Client']['billing_email'] = $client['Contact'][0]['email'];\n\t\t\t\t\t\n\t\t\t\t\tif (isset($client['Contact'][1])) {\n\t\t\t\t\t\t$arr_contact['Client']['project_name'] = $client['Contact'][1]['contact_name'];\n\t\t\t\t\t\t$arr_contact['Client']['project_email'] = $client['Contact'][1]['email'];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$arr_contact['Client']['project_name'] = $client['Contact'][0]['contact_name'];\n\t\t\t\t\t\t$arr_contact['Client']['project_email'] = $client['Contact'][0]['email'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$arr_contact['Client']['id'] = $client['Client']['id'];\n\t\t\t\t\t$this->Client->save($arr_contact);\n\t\t\t\t\techo \"Contact info saved for \".$client['Client']['client_name']. \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fa6b1324a9cab2cca834f77916cac1aa", "score": "0.5744808", "text": "public function getAllContacts() {\n\n $this->setMaxResults(10000);\n\n $response = $this->httpClient->get($this->getQuery());\n\n $dom = new \\DOMDocument();\n $xml = simplexml_load_string($response->getBody());\n $xml->registerXPathNamespace('gd', 'http://schemas.google.com/g/2005');\n\n $contacts = array();\n\n foreach($xml->entry as $key => $entry) {\n\n // Get email address and phone number\n $contactInfo = $this->getContactDetails($entry->children('http://schemas.google.com/g/2005'));\n // Get the photo uri of the user\n $photoUri = $this->getPhotoUri($entry->link);\n // Get contact group memberships for the user\n $cGroups = $this->getGroupMembership($entry->xpath('gContact:groupMembershipInfo'));\n\n // Add entry information to an array\n $contacts[] = [\n 'id'=>(string)$entry->id,\n 'title'=>(string)$entry->title,\n 'emailAddress'=>$contactInfo['emailAddress'],\n 'phoneNumber'=>$contactInfo['phoneNumber'],\n 'photoUri'=>$photoUri,\n 'groups'=>$cGroups\n ];\n }\n // return all contact info\n return $contacts;\n }", "title": "" }, { "docid": "cfd68efb27eaa92d972856b28cd83798", "score": "0.5727993", "text": "public function getContactUserList() {\n $request = $this->getApi()->createRequest(\n 'flickr.contacts.getList',\n array('user_id'=>$this->getId())\n );\n return new Phlickr_UserList($request);\n }", "title": "" }, { "docid": "26179b59093ad766d4774228bceb95cc", "score": "0.57272476", "text": "public function get_contacts()\n {\n $GLOBALS['log']->deprecated('Opportunity::get_contacts() has been deprecated in 7.8');\n $this->load_relationship('contacts');\n $query_array = $this->contacts->getQuery(true);\n\n //update the select clause in the retruned query.\n $query_array['select'] = \"SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.email1, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id \";\n\n $query = '';\n foreach ($query_array as $qstring) {\n $query .= ' ' . $qstring;\n }\n $temp = Array(\n 'id',\n 'first_name',\n 'last_name',\n 'title',\n 'email1',\n 'phone_work',\n 'opportunity_role',\n 'opportunity_rel_id'\n );\n return $this->build_related_list2($query, BeanFactory::newBean('Contacts'), $temp);\n }", "title": "" }, { "docid": "75a383574592b20218be6e2a2d899c70", "score": "0.57081044", "text": "public function __construct( $contacts )\n {\n foreach($contacts as $contact){\n return 'hello';\n }\n\n }", "title": "" }, { "docid": "f4218253746209997198c6af499ba13e", "score": "0.5702957", "text": "function getContactsList()\n{\n $dbh = getDbConnection();\n\n return array();\n}", "title": "" }, { "docid": "47d45dec7cc68e2b5e1a7b908ae09729", "score": "0.57015926", "text": "function add_list($keys,$owner,$contacts=array(),array &$data=array())\n\t{\n\t\t//error_log(__METHOD__.'('.array2string($keys).\", $owner, \".array2string($contacts).', '.array2string($data).') '.function_backtrace());\n\t\tif (!$keys && !$data || !(int)$owner) return false;\n\n\t\tif ($keys && !is_array($keys)) $keys = array('list_name' => $keys);\n\t\tif ($keys)\n\t\t{\n\t\t\t$keys['list_owner'] = $owner;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['list_owner'] = $owner;\n\t\t}\n\t\tif (!$keys || !($list_id = $this->db->select($this->lists_table,'list_id',$keys,__LINE__,__FILE__)->fetchColumn()))\n\t\t{\n\t\t\t$data['list_created'] = time();\n\t\t\t$data['list_creator'] = $GLOBALS['egw_info']['user']['account_id'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data[] = 'list_etag=list_etag+1';\n\t\t}\n\t\t$data['list_modified'] = time();\n\t\t$data['list_modifier'] = $GLOBALS['egw_info']['user']['account_id'];\n\t\tif (!$data['list_id']) unset($data['list_id']);\n\n\t\tif (!$this->db->insert($this->lists_table,$data,$keys,__LINE__,__FILE__)) return false;\n\n\t\tif (!$list_id && ($list_id = $this->db->get_last_insert_id($this->lists_table,'list_id')) &&\n\t\t\t(!isset($data['list_uid']) || !isset($data['list_carddav_name'])))\n\t\t{\n\t\t\t$update = array();\n\t\t\tif (!isset($data['list_uid']))\n\t\t\t{\n\t\t\t\t$update['list_uid'] = $data['list_uid'] = common::generate_uid('addresbook-lists', $list_id);\n\t\t\t}\n\t\t\tif (!isset($data['list_carddav_name']))\n\t\t\t{\n\t\t\t\t$update['list_carddav_name'] = $data['list_carddav_name'] = $data['list_uid'].'.vcf';\n\t\t\t}\n\t\t\t$this->db->update($this->lists_table,$update,array('list_id'=>$list_id),__LINE__,__FILE__);\n\n\t\t\t$this->add2list($list_id,$contacts,array());\n\t\t}\n\t\tif ($keys) $data += $keys;\n\t\t//error_log(__METHOD__.'('.array2string($keys).\", $owner, ...) data=\".array2string($data).' returning '.array2string($list_id));\n\t\treturn $list_id;\n\t}", "title": "" }, { "docid": "be8c99fa180bb7039b42b3023cab7985", "score": "0.5699487", "text": "public function getRequestCreatedContacts()\n {\n $query = \"SELECT c.identifier, c.first_name, r.identifier AS request_id FROM \".$this->_name.\" c\n INNER JOIN FtvRequests r ON r.request_by = c.identifier GROUP BY c.identifier\";\n if(($result = $this->getQuery($query,ture)) != NULL)\n {\n foreach($result as $key=>$value)\n {\n $contact_list[$value['identifier']]=strtoupper($value['email'].'('.$value['first_name'].')');\n }\n if($contact_list)\n asort($contact_list);\n if($contact_list)\n array_unshift($contact_list, \"S&eacute;lectionner\");\n return $contact_list;\n }\n else\n return \"no\";\n }", "title": "" }, { "docid": "7f028838797f27f11b2f298926f07017", "score": "0.56928784", "text": "public function findAllContacts()\n {\n $db= $this->getBdd();\n $data=$db->query( \"SELECT * FROM `contact`\")->fetchAll();\n \n return $data;\n }", "title": "" }, { "docid": "0ac1bb5eb509e8b97a7070fc15db0e8b", "score": "0.56813484", "text": "public function initContacts()\n\t{\n\t\t$this->collContacts = array();\n\t}", "title": "" }, { "docid": "c837fa785b4d80e4c5aa693b4a1b31ee", "score": "0.5676648", "text": "abstract protected function GetContactsData();", "title": "" }, { "docid": "da6f1b985da6fedb29d8f3fc761dca3d", "score": "0.5648303", "text": "public function importContacts()\n {\n $input = \\Input::all();\n if (!empty($input))\n {\n return $this->contactsGateway->processContactsImport($input);\n }\n }", "title": "" }, { "docid": "3bbe04cd255952e0e95c79479715f5ee", "score": "0.5613816", "text": "public function addRecipients( $value){\n return $this->_add(10, $value);\n }", "title": "" }, { "docid": "bf5a1e43fa5d09e91a86d13c41e2b5ab", "score": "0.56019187", "text": "function parseContacts($filename)\r\n{\r\n $contacts = [];\r\n\r\n // open a file\r\n // read the contents to a string\r\n $handle = fopen($filename, 'r');\r\n $contentString = trim(fread($handle, filesize($filename)));\r\n fclose($handle);\r\n\r\n $arrayOfContents = explode(\"\\n\", $contentString);\r\n foreach($arrayOfContents as $personString) {\r\n $personArray = explode(\"|\", $personString);\r\n\r\n $personArrayWithKeys = [];\r\n $personArrayWithKeys['name'] = $personArray[0];\r\n $personArrayWithKeys['phone'] = formatPhoneNumber($personArray[1]);\r\n\r\n // $contacts[] = $personArray is the same thing as array_push($contacts, $personArray);\r\n $contacts[] = $personArrayWithKeys;\r\n\r\n }\r\n return $contacts;\r\n}", "title": "" }, { "docid": "4f6f2a753d7c1d1c8f822e7350f16930", "score": "0.5574603", "text": "public function addContacts($emails) {\n $contact_ids = [];\n // Get all contact ids from ActiveTrail\n foreach ($emails as $key => $email) {\n /* @var EmailCampaignInterface $client */\n $id = $this->getContactId($email);\n if (!empty($id)) {\n $contact_ids[] = $id;\n }\n else {\n throw new ContactIdNotFoundException();\n }\n }\n $this->campaignPayload->campaign_contacts->setContactsEmails($emails);\n $this->campaignPayload->campaign_contacts->setContactsIds($contact_ids);\n return $this;\n }", "title": "" }, { "docid": "2a7d3ed8905a9fba25957aa47a8d87a6", "score": "0.5564234", "text": "private function syncContact($params) {\n $result = false;\n\n $i = 0;\n $nameValueList = array();\n $collection = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect(array('firstname', 'lastname', 'email'));\n\n foreach ($collection as $value) {\n $firstname = $value['firstname'];\n $lastname = $value['lastname'];\n $email = $value['email'];\n\n $customerMagento = array($firstname . ' ' . $lastname, $email);\n $customerSugar = Mage::helper('sugarcp')->getCustomerFromSugarCrmToArray($email);\n\n if ($customerMagento != $customerSugar) {\n\n\n $id = Mage::helper('sugarcp')->getContactID($email);\n if ($id !== false) {\n $arr = array($i => array(\n array('name' => 'id', 'value' => $id),\n array('name' => 'title', 'value' => ''),\n array('name' => 'first_name', 'value' => $value['firstname']),\n array('name' => 'last_name', 'value' => $value['lastname']),\n array('name' => 'email1', 'value' => $value['email']),\n array('name' => 'birthdate', 'value' => ''),\n array('name' => 'lead_source', 'value' => 'Other'),\n array('name' => 'primary_address_country', 'value' => ''),\n array('name' => 'primary_address_postalcode', 'value' => ''),\n array('name' => 'primary_address_state', 'value' => ''),\n array('name' => 'primary_address_city', 'value' => ''),\n array('name' => 'primary_address_street', 'value' => ''),\n array('name' => 'alt_address_country', 'value' => ''),\n array('name' => 'alt_address_postalcode', 'value' => ''),\n array('name' => 'alt_address_state', 'value' => ''),\n array('name' => 'alt_address_city', 'value' => ''),\n array('name' => 'alt_address_street', 'value' => '')\n )\n );\n $nameValueList = array_merge($nameValueList, $arr);\n $i++;\n } else {\n $arr = array($i => array(\n array('name' => 'title', 'value' => ''),\n array('name' => 'first_name', 'value' => $value['firstname']),\n array('name' => 'last_name', 'value' => $value['lastname']),\n array('name' => 'email1', 'value' => $value['email']),\n array('name' => 'birthdate', 'value' => ''),\n array('name' => 'lead_source', 'value' => 'Other'),\n array('name' => 'primary_address_country', 'value' => ''),\n array('name' => 'primary_address_postalcode', 'value' => ''),\n array('name' => 'primary_address_state', 'value' => ''),\n array('name' => 'primary_address_city', 'value' => ''),\n array('name' => 'primary_address_street', 'value' => ''),\n array('name' => 'alt_address_country', 'value' => ''),\n array('name' => 'alt_address_postalcode', 'value' => ''),\n array('name' => 'alt_address_state', 'value' => ''),\n array('name' => 'alt_address_city', 'value' => ''),\n array('name' => 'alt_address_street', 'value' => '')\n )\n );\n\n $nameValueList = array_merge($nameValueList, $arr);\n\n $i++;\n }\n }\n }\n //set Contact properties\n\n $contactParams = array(\n 'session' => $params['sessionId'],\n 'module' => 'Contacts',\n 'name_value_list' => $nameValueList,\n );\n\n\n\n $requestResult = Mage::helper('sugarcp')->sendRequest('set_entries', $contactParams);\n\n if (isset($requestResult->ids) && isset($requestResult->ids[0])) {\n\n $result = $requestResult->ids[0];\n }\n\n return $result;\n }", "title": "" }, { "docid": "622fcc61d23385dfb67ccef73c186e7d", "score": "0.55567694", "text": "abstract protected function ParseContactsData();", "title": "" }, { "docid": "c6cef1b7fc28f8a68cc4d7cd861572c4", "score": "0.5531262", "text": "public function contacts()\n {\n return $this->transformCollection(\n $this->get(\"contacts\"),\n Contact::class\n );\n }", "title": "" }, { "docid": "0c264939bc2b0cdf57754510b89350a9", "score": "0.5520655", "text": "public function getContacts()\n {\n $endpoint = '/contacts';\n return $this->sendRequest('GET', $endpoint);\n }", "title": "" }, { "docid": "a0fe71a3003c8f6525ee804272f81024", "score": "0.5516306", "text": "public function contacts(): MorphToMany\n {\n return $this->morphToMany(\n config('contacts.models.contact'),\n 'model',\n config('contacts.table_names.model_has_contacts'),\n config('contacts.column_names.model_morph_key'),\n 'contact_id'\n );\n }", "title": "" }, { "docid": "5f55c75e18e3228ed25bb78843cc9478", "score": "0.550992", "text": "public function getContacts()\n {\n return $this->api('contacts');\n }", "title": "" }, { "docid": "bd04a47cb42bcc839c9f79a69442a5af", "score": "0.5477965", "text": "public function setContacts($contacts)\n {\n $this->contacts = $contacts;\n return $this;\n }", "title": "" }, { "docid": "13d688bd19a9ff668f69d62c55383ba6", "score": "0.5460007", "text": "public function contacts()\n {\n return $this->hasMany(Contact::class);\n }", "title": "" }, { "docid": "ab3d54481f894c32d5d44f880a8ce442", "score": "0.54597473", "text": "public function getAllContact(){\n $listOfContacts=Contacts::orderBy('contact_id')->get();\n\n return response ()->json ( array (\n 'status' => 'ok',\n 'data'=>$listOfContacts\n ), 200 );\n }", "title": "" }, { "docid": "d31913cca6fefd56ede45d9946ca699a", "score": "0.5452174", "text": "public function processContacts($input)\n {\n $this->loggedinUserDetails = $this->getLoggedInUser();\n if ($this->loggedinUserDetails)\n {\n $this->neoLoggedInUserDetails = $this->neoUserRepository->getNodeByEmailId($this->loggedinUserDetails->emailid) ;\n if (!empty($this->neoLoggedInUserDetails) && count($this->neoLoggedInUserDetails))\n {\n //declare returnArray\n $returnArray = $autoconnectedUsers = array();\n $fromUser = $this->neoLoggedInUserDetails ;\n if (!empty($input['contacts']))\n {\n $contacts = json_decode($input['contacts']); //$input['contacts'] ;\n if (!empty($contacts) && is_array($contacts))\n {\n //delete all imported contacts\n //Queue::push('Mintmesh\\Services\\Queues\\DeleteContactQueue', array('emailid'=>$this->loggedinUserDetails->emailid), 'IMPORT');\n $deletedResult = $this->contactsRepository->deleteImportedContacts($this->loggedinUserDetails->emailid);\n $mintmeshEmails = $processedEmails = array();\n if ($deletedResult){// process afer delete contact is done\n foreach($contacts as $contact)\n {\n $connectResult = $autoConnectIds = array();\n $relationAttrs = array();\n $emails = !empty($contact->emails)?$contact->emails:array();\n $phones = !empty($contact->phones)?$contact->phones:array();\n //format the phone numbers\n $userPhone = !empty($fromUser->phone)?$fromUser->phone:'';\n $phones = $this->formatPhoneNumbers($phones, $userPhone);\n // \\Log::info(\"<<<<<<<<<<<<<<<<<<<<<< In getExisting contacts before >>>>>>>>>>>>>>>>>>>>> \".date('H:i:s'));\n $result = $this->contactsRepository->getExistingContacts($emails, $phones);\n // \\Log::info(\"<<<<<<<<<<<<<<<<<<<<<< In getExisting contacts after >>>>>>>>>>>>>>>>>>>>> \".date('H:i:s'));\n if (!empty($result))\n {\n foreach ($result as $res)//process each contacts \n {\n $r = $res[0]->getProperties();\n $r['dp_path'] = !empty($r['dp_renamed_name'])?$r['dp_renamed_name']:'';\n if (isset($r['id']))\n unset($r['id']);\n $connected = $this->neoUserRepository->checkConnection($fromUser->emailid,$res[0]->emailid);\n if (!empty($connected))\n {\n if (!empty($connected['connected'])){\n $r['connected'] = 1 ;\n }else{\n $r['connected'] = 0 ;\n }\n $r['request_sent_at'] = 0 ;\n }\n else\n {\n //check if in pending state\n $pending = $this->neoUserRepository->checkPendingConnection($fromUser->emailid,$res[0]->emailid);\n if (!empty($pending))// if pending\n {\n $r['request_sent_at'] = $pending ;\n $r['connected'] = 2 ;\n }else\n {\n $r['connected'] = 0 ;\n $r['request_sent_at'] = 0;\n }\n }\n if (!empty($contact->recordID))\n $r['recordID'] = $contact->recordID ;\n unset($r['services']);//unset it as it causes chrash\n $returnArray[$res[0]->emailid]=$r; \n $autoConnectIds[]=$res[0]->getID();\n }\n //autoconnect people\n if (!empty($input['autoconnect']))\n $connectResult = $this->checkAutoconnect($this->loggedinUserDetails->emailid, $autoConnectIds, $userPhone);\n //foreach sutoconnect result unset the result array\n foreach ($connectResult as $autoConnectEmailId){\n if (!empty($returnArray[$autoConnectEmailId])){\n $returnArray[$autoConnectEmailId]['connected']=1;\n $autoconnectedUsers[] = $returnArray[$autoConnectEmailId] ;\n unset($returnArray[$autoConnectEmailId]);\n }\n }\n }\n //check for create or relate contacts\n $pushData = array();\n $pushData['emails']=$emails;\n $pushData['phones']=$phones;\n $pushData['contact']=$contact;\n $pushData['fromUser']=$this->neoLoggedInUserDetails;\n //$jobData = $pushData ;\n Queue::push('Mintmesh\\Services\\Queues\\CreateOrRelateContactsQueue', $pushData, 'IMPORT');\n //$this->checkToCreateOrRelateContacts($jobData['emails'], $jobData['phones'], $jobData['contact'], $jobData['fromUser']) ;\n }\n }\n $tmp = Array(); \n foreach($returnArray as &$ma) \n $tmp[] = &$ma[\"fullname\"]; \n array_multisort($tmp, $returnArray); \n \n $tmp = Array(); \n foreach($autoconnectedUsers as &$ma) \n $tmp[] = &$ma[\"fullname\"]; \n array_multisort($tmp, $autoconnectedUsers); \n $message = array('msg'=>array(Lang::get('MINTMESH.import_contacts.success')));\n return $this->commonFormatter->formatResponse(200, \"success\", $message, array('mintmesh_users'=>array_values($returnArray),'autoconnected_users'=>$autoconnectedUsers)) ;\n }\n else\n {\n $message = array('msg'=>array(Lang::get('MINTMESH.import_contacts.invalid')));\n return $this->commonFormatter->formatResponse(201, \"error\", $message, array()) ;\n }\n\n }\n else\n {\n $message = array('msg'=>array(Lang::get('MINTMESH.import_contacts.invalid')));\n return $this->commonFormatter->formatResponse(201, \"error\", $message, array()) ;\n }\n }\n else\n {\n $message = array('msg'=>array(Lang::get('MINTMESH.user.user_not_found')));\n return $this->commonFormatter->formatResponse(self::ERROR_RESPONSE_CODE, self::ERROR_RESPONSE_MESSAGE, $message, array()) ;\n }\n \n }\n else\n {\n $message = array('msg'=>array(Lang::get('MINTMESH.user.user_not_found')));\n return $this->commonFormatter->formatResponse(self::ERROR_RESPONSE_CODE, self::ERROR_RESPONSE_MESSAGE, $message, array()) ;\n }\n }", "title": "" }, { "docid": "b4b6629ff01d3d22a1e5c2339cf35910", "score": "0.5447728", "text": "public function listAllContact() {\n $query = $this->db->get(\"contacts\");\n return $query->result();\n }", "title": "" }, { "docid": "86fe3b2a6b65a876453ef66f1da47921", "score": "0.54413575", "text": "public function getMyContacts()\n\t\t{\n\t\treturn $this->plugin->getMyContacts();\n\t\t}", "title": "" }, { "docid": "61bd1cf3ec9624f6a5027bbb2485f53c", "score": "0.54237455", "text": "public function contactList(): HasMany\n {\n return $this->hasMany(CampaignsList::class, 'campaign_id');\n }", "title": "" }, { "docid": "6811ec0996444c5910cfcfc8b8b3a90b", "score": "0.5417526", "text": "function contacts_list_data($client_id = 0) {\n\n $this->access_only_allowed_members_or_client_contact($client_id);\n\n $custom_fields = $this->Custom_fields_model->get_available_fields_for_table(\"client_contacts\", $this->login_user->is_admin, $this->login_user->user_type);\n\n $options = array(\"user_type\" => \"client\", \"client_id\" => $client_id, \"custom_fields\" => $custom_fields);\n $list_data = $this->Users_model->get_details($options)->result();\n $result = array();\n\n $hide_primary_contact_label = false;\n if (!$client_id) {\n $hide_primary_contact_label = true;\n }\n\n\n foreach ($list_data as $data) {\n $result[] = $this->_make_contact_row($data, $custom_fields, $hide_primary_contact_label);\n }\n echo json_encode(array(\"data\" => $result));\n }", "title": "" }, { "docid": "b9219a3444dac4e151058ccbcbfe408c", "score": "0.5410367", "text": "function getUserContacts() \n\t{\n\t\tHybrid_Logger::error( \"HybridAuth do not provide users contats list for {$this->providerId} yet.\" ); \n\t\t\n\t\tthrow new Exception( \"Provider does not support this feature.\", 8 ); \n\t}", "title": "" }, { "docid": "01b261da8ecdec49987da594c07b27b3", "score": "0.54088384", "text": "public function AddContacts(&$FormArray)\n {\n # ================================================\n $db_record = array(\n 'first_name' => $FormArray['first_name'],\n 'last_name' => $FormArray['last_name'],\n 'email_address' => $FormArray['email_address'],\n 'super_user' => $FormArray['super_user'],\n 'created_by' => $FormArray['created_by'],\n 'type_customer' => $FormArray['type_customer'],\n \n 'type_administrator' => $FormArray['type_administrator'],\n \n 'type_instructor' => $FormArray['type_instructor'],\n 'type_instructor_standard' => $FormArray['type_instructor_standard'],\n 'type_instructor_therapy' => $FormArray['type_instructor_therapy'],\n 'instructor_account_limited' => $FormArray['instructor_account_limited'],\n \n 'contact_discounts_id' => $FormArray['contact_discounts_id'],\n \n 'module_roles' => $FormArray['module_roles'],\n 'class_roles' => $FormArray['class_roles'],\n 'email_subscriptions' => $FormArray['email_subscriptions'],\n 'terms_conditions_agree' => $FormArray['terms_conditions_agree'],\n 'liability_waiver_agree' => $FormArray['liability_waiver_agree'],\n 'privacy_policy_agree' => $FormArray['privacy_policy_agree'],\n 'address_1' => $FormArray['address_1'],\n 'address_2' => $FormArray['address_2'],\n 'address_3' => $FormArray['address_3'],\n 'city' => $FormArray['city'],\n 'state' => $FormArray['state'],\n 'postal_code' => $FormArray['postal_code'],\n 'time_zones_id' => $FormArray['time_zones_id'],\n 'phone_home' => $FormArray['phone_home'],\n 'phone_work' => $FormArray['phone_work'],\n 'phone_cell' => $FormArray['phone_cell'],\n 'created' => $FormArray['created'],\n );\n $this->AddRecordLoc('contacts', $db_record);\n $db_last_insert_id = $this->SQL->Last_Insert_Id;\n $this->wh_id = $db_last_insert_id + 1000000;\n \n \n # 2. CREATE PASSWORD FOR USER\n # ================================================\n $Password_Syllables = 2;\n $Password_Characters = 'CN';\n $new_password = Lib_Password::MakePassword($Password_Syllables, $Password_Characters);\n $update_password = Lib_Password::GetPasswordHash($new_password);\n \n \n # 3. UPDATE USER RECORD\n # ================================================\n $db_record = array( \n 'wh_id' => $this->wh_id,\n 'password' => $update_password,\n );\n $where = \"`contacts_id`=$db_last_insert_id\";\n $this->UpdateRecordLoc('contacts', $db_record, $where);\n \n $FormArray['wh_id'] = $this->wh_id;\n $FormArray['password'] = $new_password;\n }", "title": "" }, { "docid": "70c03493068e2c64f53c7f1641dec3b0", "score": "0.5405652", "text": "public function getAllContactEntries() {\n $contactDataClass = new ContactData();\n $allContactDataObjects = $contactDataClass -> readContact();\n $allContactData = array();\n\n foreach ($allContactDataObjects as $contactArray) {\n $contactObject = new Contact($contactArray['idContact'], $contactArray['name'], $contactArray['email'], stripcslashes($contactArray['description']), $contactArray['phone'], $contactArray['title']);\n\n array_push($allContactData, $contactObject);\n }\n return $allContactData;\n }", "title": "" }, { "docid": "1d1c52720ebc16d8c3878c26dedc5b71", "score": "0.53889453", "text": "public function contacts()\n\t{\n\t\treturn $this->hasMany('Contact', 'ctg_cnd_id');\n\t}", "title": "" }, { "docid": "83c800355738197581746da288607539", "score": "0.53885543", "text": "function getUserContacts()\n\t{\n\t\t$params = array();\n\t\t$params['uid'] = $this->user_id;\n\t\t$params['cursor'] = 0;\n\t\t$params['count'] = 10;\n\t\t\n\t\t$response = $this->api->oauth->get( 'friendships/friends', $params );\n\n\t\tif ( $this->api->oauth->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( 'User contacts request failed! ' . $this->providerId . ' returned an error: ' . $response['error'] );\n\t\t}\n\n\t\tif ( !$response )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$contacts = array();\n\t\t\n\t\tforeach( $response['users'] as $item ) {\n\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t$uc->identifier = @ $item['id'];\n\t\t\t$uc->displayName = @ $item['name'];\n\t\t\t$uc->profileURL = @ $item['url'];\n\t\t\t$uc->photoURL = @ $item['profile_image_url'];\n\t\t\t$uc->description = @ $item['description'];\n\n\t\t\t$contacts[] = $uc;\n\t\t}\n\t\t\n\t\treturn $contacts;\n\t}", "title": "" }, { "docid": "dd3e59cadad853b5efd4f43aaf823ed6", "score": "0.5385771", "text": "public function getContacts()\n\t{\n\t \t//if( Request::ajax() ){\n \t\t\t$query = Input::get('query'); \n\n\t\t\t$clientes \t\t= Cliente::where('email', 'like', '%'.$query.'%')->get();\n\t\t\t$fornecedores \t= Fornecedor::where('email', 'like', '%'.$query.'%')->get();\n\t\t\t$vendedores \t= Vendedor::where('email', 'like', '%'.$query.'%')->get();\n\n\n\n\t\t\tforeach ($clientes as $cliente) {\n\t\t\t\t$suggestions[] = array(\n\t\t\t\t \t\"value\" => $cliente->email,\n\t\t\t\t \t\"data\"\t => array(\n\t\t\t\t \t 'type' => 'Clientes ('.count($clientes).')'\n\t\t\t\t \t )\t\t \t\t\t\t\t\t\t\n\t\t\t\t );\t\t\t\t\n\t\t\t}\n\t\t\tforeach ($fornecedores as $fornecedor) {\n\t\t\t\t$suggestions[] = array(\n\t\t\t\t \t\"value\" => $fornecedor->email,\n\t\t\t\t \t\"data\"\t => array(\n\t\t\t\t \t 'type' => 'Fornecedores ('.count($fornecedores).')'\n\t\t\t\t \t )\t\t \t\t\t\t\t\t\t\n\t\t\t\t );\t\t\t\t\n\t\t\t}\n\t\t\tforeach ($vendedores as $vendedor) {\n\t\t\t\t$suggestions[] = array(\n\t\t\t\t \t\"value\" => $vendedor->email,\n\t\t\t\t \t\"data\"\t => array(\n\t\t\t\t \t 'type' => 'Vendedores ('.count($vendedores).')'\n\t\t\t\t \t )\t\t \t\t\t\t\t\t\t\n\t\t\t\t );\t\t\t\t\n\t\t\t}\n\n\n \t\t\t$contacts = array( 'suggestions' => $suggestions );\t\n\t\t\n\t\t \t//$contacts = Cliente::all();\n\t\t \treturn Response::json($contacts);\n\t //}\n\t}", "title": "" }, { "docid": "389fb701d58aa5bfc29a13a7c0d70173", "score": "0.5381584", "text": "public function addContact($data, $remove_tags = [] , $add_tags = [])\n {\n try {\n\n $contact_data = array(\n 'list_ids' => array($data['list_id']),\n 'contacts' => array($data)\n );\n\n // send call to API to add contact\n $res = $this->curl('contacts', $contact_data, \"PUT\");\n $res = json_decode($res);\n\n if(isset($res->job_id)) {\n $this->successResponse();\n }\n\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "4bfe44311ff0edfb1c9a55358bbf9db0", "score": "0.53795695", "text": "public function contacts()\n {\n return $this->hasMany('App\\Contact');\n }", "title": "" }, { "docid": "00a9b3737a02d5528491d5e80d1c5d83", "score": "0.53793734", "text": "public function contacts()\n {\n return $this->activeCampaign->contactsByList($this->id);\n }", "title": "" }, { "docid": "662244926064dad1aa0ad2cfc3213bb6", "score": "0.53784555", "text": "function getContactsWithEmails(){\n\t\t\t$sql = 'select firstname, lastname, stname1, city, state, zip, yob, email, phone, bio\n\t\t\t\t\tfrom voters where email <> \"\"';\n\t\t\t$list = $this -> db -> get_results($sql, 'ARRAY_A');\n\t\t\treturn $list;\n\n\t\t}", "title": "" }, { "docid": "76869fff4cc7ce3cc18050f602fbea15", "score": "0.53776765", "text": "public function contacts()\n {\n return $this->belongsToMany('App\\Contact');\n }", "title": "" }, { "docid": "c7ec74d28614208184061490d8041cda", "score": "0.5377544", "text": "public function agregarContacto(){\r\n }", "title": "" }, { "docid": "427c70cfe7e79af4e2efcf42e9172288", "score": "0.5370027", "text": "function activecampaign_rules_add_to_list($email, $activecampaign_lists) {\n $contact['email'] = $email;\n foreach ($activecampaign_lists as $listid => $list) {\n $contact['p['.$listid.']'] = 'p['.$listid.']';\n }\n activecampaign_contact_sync($contact);\n $account = user_load_by_mail($email);\n rules_invoke_event(\"activecampaign_contact_sync_event\", $account);\n}", "title": "" }, { "docid": "27aadd557521f74aced20354b11bdfb9", "score": "0.53482383", "text": "public function AddContacts(&$FormArray)\n {\n # ================================================\n $db_record = array(\n 'first_name' => $FormArray['first_name'],\n 'last_name' => $FormArray['last_name'],\n 'email_address' => $FormArray['email_address'],\n 'super_user' => $FormArray['super_user'],\n 'created_by' => $FormArray['created_by'],\n 'type_customer' => $FormArray['type_customer'],\n 'type_instructor' => $FormArray['type_instructor'],\n 'type_administrator' => $FormArray['type_administrator'],\n 'module_roles' => $FormArray['module_roles'],\n 'class_roles' => $FormArray['class_roles'],\n 'email_subscriptions' => $FormArray['email_subscriptions'],\n 'terms_conditions_agree' => $FormArray['terms_conditions_agree'],\n 'liability_waiver_agree' => $FormArray['liability_waiver_agree'],\n 'privacy_policy_agree' => $FormArray['privacy_policy_agree'],\n 'instructor_account_limited' => $FormArray['instructor_account_limited'],\n 'address_1' => $FormArray['address_1'],\n 'address_2' => $FormArray['address_2'],\n 'address_3' => $FormArray['address_3'],\n 'city' => $FormArray['city'],\n 'state' => $FormArray['state'],\n 'postal_code' => $FormArray['postal_code'],\n 'time_zones_id' => $FormArray['time_zones_id'],\n 'phone_home' => $FormArray['phone_home'],\n 'phone_work' => $FormArray['phone_work'],\n 'phone_cell' => $FormArray['phone_cell'],\n );\n $this->AddRecordLoc('contacts', $db_record);\n $db_last_insert_id = $this->SQL->Last_Insert_Id;\n $this->wh_id = $db_last_insert_id + 1000000;\n \n \n # 2. CREATE PASSWORD FOR USER\n # ================================================\n $Password_Syllables = 2;\n $Password_Characters = 'CN';\n $new_password = Lib_Password::MakePassword($Password_Syllables, $Password_Characters);\n $update_password = Lib_Password::GetPasswordHash($new_password);\n \n \n # 3. UPDATE USER RECORD\n # ================================================\n $db_record = array( \n 'wh_id' => $this->wh_id,\n 'password' => $update_password,\n );\n $where = \"`contacts_id`=$db_last_insert_id\";\n $this->UpdateRecordLoc('contacts', $db_record, $where);\n \n $FormArray['wh_id'] = $this->wh_id;\n $FormArray['password'] = $new_password;\n }", "title": "" }, { "docid": "d85af1011f3969ba33a24fa65288e555", "score": "0.5312743", "text": "public function getContactsList() {\n $req = $this->web('https://contacts.skype.com/contacts/v1/users/'.$this->username.'/contacts?$filter=type%20eq%20%27skype%27%20or%20type%20eq%20%27msn%27%20or%20type%20eq%20%27pstn%27%20or%20type%20eq%20%27agent%27&reason=default');\n $contacts = json_decode($req, true);\n\n return isset($contacts[\"contacts\"]) ? $contacts[\"contacts\"] : false;\n }", "title": "" }, { "docid": "eace2fcd239beb13d7a3750077bedd2a", "score": "0.52942353", "text": "public function addContact($data, $remove_tags = [], $add_tags = [])\n { \n // @todo throw exception if email field is empty or list id or not available\n try {\n \n $response = $this->cc->getContactByEmail( $this->access_token , $data['email'] );\n \n // If contact not found, add new one\n if (empty($response->results)) {\n $contact = new Contact();\n $contact->addEmail( $data['email'] );\n $contact->addList( $data['list_id'] );\n $contact->first_name = $data['first_name'] ;\n $contact->last_name = $data['last_name'] ;\n $returnContact = $this->cc->addContact( $this->access_token, $contact, true);\n return $this->successResponse();\n } else {\n // If contact found, update entry\n $contact = $response->results[0];\n $contact->addList( $data['list_id'] );\n $contact->first_name = $data['first_name'] ;\n $contact->last_name = $data['last_name'] ;\n $returnContact = $this->cc->updateContact( $this->access_token , $contact, true);\n return $this->successResponse();\n }\n\n } catch (Exception $e) { // Catch any exceptions\n throw new \\Exception($e->getMessage(), 1);\n \n }\n }", "title": "" }, { "docid": "f78cd21d81dea5bbaf86c0c37169a655", "score": "0.5274539", "text": "public function contacts()\n {\n $contacts = User::where('id', '!=', auth()->id())->get();\n // get a collection of items where sender_id is the user who sent us a message\n // and messages_count is the number of unread messages we have from him\n $unreadIds = Message::select(\\DB::raw('`from` as sender_id, count(`from`) as messages_count'))\n ->where('to', auth()->id())\n ->where('read', false)\n ->groupBy('from')\n ->get();\n // add an unread key to each contact with the count of unread messages\n $contacts = $contacts->map(function($contact) use ($unreadIds) {\n $contactUnread = $unreadIds->where('sender_id', $contact->id)->first();\n $contact->unread = $contactUnread ? $contactUnread->messages_count : 0;\n return $contact;\n });\n return response()->json($contacts);\n }", "title": "" }, { "docid": "785fbb819fc15818795efd47ef3601da", "score": "0.52704936", "text": "public function listContacts()\n {\n $user_id = Auth::id();\n\n $contactList = $this->contacts->findBy('user_id', $user_id);\n\n return view('contact.list', ['contacts' => $contactList]);\n }", "title": "" }, { "docid": "1fc210557f43be82c9481f8bf01c22aa", "score": "0.5253889", "text": "public function mySharedContacts()\n {\n $userId = Auth::id();\n $contacts = DB::table('contacts')\n ->join('shares', 'contacts.id', '=', 'shares.contact_id')\n ->leftJoin('users', 'users.id', '=', 'shares.user_id')\n ->where('contacts.user_id', $userId)\n ->select('contacts.*', 'users.name as sharedToName', 'users.id as sharedToId');\n return $contacts;\n }", "title": "" }, { "docid": "070e027f5b03fffa0331a6fc9d186660", "score": "0.5252475", "text": "public function addList($contact_list)\n {\n if ($contact_list instanceof ContactList) {\n $list = $contact_list;\n } elseif (is_numeric($contact_list)) {\n $list = new ContactList($contact_list);\n } else {\n throw new IllegalArgumentException(sprintf(Config::get('errors.id_or_object'), 'ContactList'));\n }\n\n $this->sent_to_contact_lists[] = $list;\n }", "title": "" }, { "docid": "e541a677aeaba86fa8a373b5a8eaa545", "score": "0.52455574", "text": "public function contacts()\n\t{\n\t\treturn $this->hasMany('Contact');\n\t}", "title": "" }, { "docid": "eec354cf2ae3d071b5f4402ade6b3d9b", "score": "0.52356756", "text": "public function rewrite($myContacts) {\n $this->empty();\n foreach($myContacts as $contact) {\n $this->sendContact($contact);\n }\n }", "title": "" }, { "docid": "e724c754086908c531c8a74efb7f7a09", "score": "0.52317476", "text": "public function get_contact()\n {\n $posted_data = $this->input->post();\n if($posted_data){\n $query = \"SELECT * FROM \".db_prefix().\"contacts WHERE userid = \".$posted_data['clientid'];\n $query = $this->db->query($query);\n $result = $query->result_array();\n $i = 0;\n foreach ($result as $res) {\n $result[$i]['name'] = $res['email'].' - '.$res['firstname'].' '.$res['lastname'];\n $i++;\n }\n die(json_encode($result));\n }\n die;\n }", "title": "" }, { "docid": "49a2a145fd2e39a315792857275a2745", "score": "0.5229094", "text": "function save()\n\t\t{\n\t\t\tarray_push($_SESSION['list_of_contacts'], $this);\n\t\t}", "title": "" }, { "docid": "8bbdcd647cec84ab5c0467993b960ec7", "score": "0.52241325", "text": "public static function getContacts() {\n\t\treturn LMongo::collection('contacts')->get();\n\t\t//return \"Stub: Contacts: model\";\n\t}", "title": "" }, { "docid": "226a159585ec88567c94f1aed2613ea8", "score": "0.52113694", "text": "public function showContactList(Request $request){\n\n $datos = $request->getContent();\n $datos = json_decode($datos);\n\n $apiToken = $request->bearerToken();\n $userID = User::where('api_token',$apiToken)->value('id');\n\n //$userContacts = UserContact::where('user_id',$userID)->get()->toArray();\n //$venta = Venta::orderByRaw('price','ASC')->get();\n $users = User::where('id',$userID)->get()->toArray();\n $contacts = Contact::all();\n $userContacts = UserContact::all();\n $list = [];\n foreach($users as $user){\n\n foreach($userContacts as $usercontact){\n\n if($user['id'] == $usercontact['user_id']){\n\n foreach($contacts as $contact){\n\n if($contact['id'] == $usercontact['contact_id']){\n\n $list[] = [\n\n //'Username' => $user['name_user'],\n 'Contact' => $contact['name_contact'],\n 'Contact_phone' => $contact['phone_contact'],\n 'Contact_email' => $contact['mail_contact']\n\n ];\n }\n }\n }\n } \n\n }\n //$user = User::all();\n return response($list);\n\n}", "title": "" }, { "docid": "c5cb86d10abc3a4c4e5b12aeeacea5cd", "score": "0.52101445", "text": "function ListContacts($inputdata){\n\t\tglobal $con;\n\n\t\t$response = array(\n\t\t\t\"status\" => false,\n\t\t\t\"data\" => array(),\n\t\t\t\"msg\"=>'',\n\t\t\t\"errors\" => array()\n\t\t);\n\t\t$page_no = $inputdata['page_no'];\n\t\t$row_size = $inputdata['row_size'];\n\t\t$sort_on = $inputdata['sort_on'];\n\t\t$sort_type = $inputdata['sort_type'];\n\t\t$where = \"\";\n\t\t\n\t\tif(!empty($inputdata['search'])){\n\t\t\t$where = \" and (i.first_name like '%\".safe_str($inputdata['search']).\"%' or i.last_name like '%\".safe_str($inputdata['search']).\"%' or i.phone like '%\".safe_str($inputdata['search']).\"%' or i.email like '%\".safe_str($inputdata['search']).\"%')\";\n\t\t}\n\t\t\n\t\t$pcount_qry = \"select count(*) as total_count from `sl_customer_contacts_info` i where i.delete_flag=0 and i.customer_id=\".safe_str($inputdata['customer_id']).$where;\n\t\t\n\t\t$pcount_result = $con->query($pcount_qry);\n\t\t$pcount_row = $pcount_result->fetch_assoc();\n\t\t$total_records = $pcount_row[\"total_count\"];\n\t\t$total_pages = ceil($total_records / $row_size);\n\t\tif ($total_pages == 0) {\n\t\t\t$total_pages = 1;\n\t\t}\n\t\tif ($page_no > $total_pages) {\n\t\t\t$page_no = $total_pages;\n\t\t}\n\t\t$get_det_query=\"select * from sl_customer_contacts_info i where i.delete_flag=0 and i.customer_id=\".safe_str($inputdata['customer_id']).$where.\" order by $sort_on $sort_type LIMIT $row_size OFFSET \".($page_no-1)*$row_size;\n\n\t\t$pagging_list = array();\n\t\t$pagg_result = $con->query($get_det_query);\n\t\tif($pagg_result) {\n\t\t\t$pagg_count = $pagg_result->num_rows;\n\t\t\tif ($pagg_count > 0) {\n\t\t\t\t$i = 0;\n\t\t\t\twhile ($row = $pagg_result->fetch_assoc()) {\n\t\t\t\t\t$pagging_list[$i] = $row;\n\t\t\t\t\t$i++;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!empty($pagging_list)) {\n\t\t\t\t\t$response[\"status\"] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$response[\"status\"] = false;\n\t\t\t\t$response[\"msg\"] = \"No data found\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$response['errors'][] = $con->error;\n\t\t}\n\t\t$response['data'][\"total_records\"] = $total_records;\n\t\t$response['data'][\"total_pages\"] = $total_pages;\n\t\t$response['data'][\"pagging_list\"] = $pagging_list;\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "4d328d586e654959bc04f5360f887456", "score": "0.52059686", "text": "public function syncContacts(...$contacts)\n {\n $this->contacts()->detach();\n\n return $this->assignContact($contacts);\n }", "title": "" }, { "docid": "a4c30756675a0536946f2938b15403fb", "score": "0.52043587", "text": "public function getContacts() {\n\t\t$query = \"SELECT c2.*, i.name as instrumentname \";\n\t\t$query .= \"FROM \";\n\t\t$query .= \" (SELECT c.*, a.street, a.city, a.zip \";\n\t\t$query .= \" FROM contact c \";\n\t\t$query .= \" LEFT JOIN address a \";\n\t\t$query .= \" ON c.address = a.id) as c2 \";\n\t\t$query .= \"LEFT JOIN instrument i \";\n\t\t$query .= \"ON c2.instrument = i.id \";\n\t\treturn $this->database->getSelection($query);\n\t}", "title": "" }, { "docid": "d15a29253c04e30e96ab11204ec47fc0", "score": "0.520043", "text": "public function indexAction() {\n\t\t$this->view->assign('step', 'contact_list');\n\t\t$this->mdr->AddParam('command', 'contact_list');\n\t\t$this->mdr->doTransaction();\n\n\t\t$this->_checkForErrors($this->mdr);\n\n\t\t$contacts = array();\n\t\tfor($i=0; $i < $this->mdr->Values[\"contactcount\"]; $i++){\n\t\t\t$contacts[$i]['id'] = $this->mdr->Values[\"contact_id[$i]\"];\n\t\t\t$contacts[$i]['bedrijfsnaam'] = $this->mdr->Values[\"contact_bedrijfsnaam[$i]\"];\n\t\t\t$contacts[$i]['voorletter'] = $this->mdr->Values[\"contact_voorletter[$i]\"];\n\t\t\t$contacts[$i]['tussenvoegsel'] = $this->mdr->Values[\"contact_tussenvoegsel[$i]\"];\n\t\t\t$contacts[$i]['achternaam'] = $this->mdr->Values[\"contact_achternaam[$i]\"];\n\t\t\t$contacts[$i]['straat'] = $this->mdr->Values[\"contact_straat[$i]\"];\n\t\t\t$contacts[$i]['huisnr'] = $this->mdr->Values[\"contact_huisnr[$i]\"];\n\t\t\t$contacts[$i]['huisnrtoev'] = $this->mdr->Values[\"contact_huisnrtoev[$i]\"];\n\t\t\t$contacts[$i]['postcode'] = $this->mdr->Values[\"contact_postcode[$i]\"];\n\t\t\t$contacts[$i]['plaats'] = $this->mdr->Values[\"contact_plaats[$i]\"];\n\t\t\t$contacts[$i]['land'] = $this->mdr->Values[\"contact_land[$i]\"];\n\t\t\t$contacts[$i]['email'] = $this->mdr->Values[\"contact_email[$i]\"];\n\t\t\t$contacts[$i]['tel'] = $this->mdr->Values[\"contact_tel[$i]\"];\n\t\t}\n\t\t$this->view->assign('contacts', $contacts);\n\n\t\t$this->view->assign('legalForms', $this->legalForms);\n\t\t$this->view->assign('countries', $this->countries);\n\t}", "title": "" }, { "docid": "2547e012fe08a9fad8455f03bbe91585", "score": "0.5199283", "text": "protected function allContacts(Swift_Mime_SimpleMessage $message)\n {\n return array_merge(\n (array) $message->getTo(),\n (array) $message->getCc(),\n (array) $message->getBcc()\n );\n }", "title": "" }, { "docid": "f066154dd5bd38b03aeb5f9d8942d2bd", "score": "0.5195968", "text": "function contact_list(){\n\t\t$data['name']='Erfanullah';\n\t\t$data['lname']='Yousofi';\n\t\t$data['tel']='07987667677';\n\t\t$data['email']='[email protected]';\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "746e52461e2fdc6263871b42c0454dcf", "score": "0.518943", "text": "function invite_people( & $focus){\n\n\t//Will have to set this eventually when we allow existing meetings to add people\n\t//$existing_contacts\n\t//$existing_users\n\n\n\tif (!empty($focus->users_arr) && is_array($focus->users_arr )) {\n\t \tforeach ($focus->users_arr as $key => $user_id)\n \t\t{\n \tif (empty($user_id) || isset($existing_users[$user_id]))\n \t{\n \tcontinue;\n \t}\n \t if (!isset($focus->users) || empty($focus->users)) {\n \t \t$focus->load_relationship('users');\n \t }\n\t $focus->users->add($user_id);\n \t\t}\n\t}\n\n\tif (!empty($focus->contacts_arr) && is_array($focus->contacts_arr )) {\n \t\tforeach ($focus->contacts_arr as $key =>$contact_id)\n \t\t{\n \tif (empty($contact_id) || isset($existing_contacts[$contact_id]))\n \t{\n \tcontinue;\n \t}\n\n \t if (!isset($focus->contacts)) {\n \t \t$focus->load_relationship('contacts');\n \t }\n\t $focus->contacts->add($contact_id);\n \t\t}\n\t}\n\n\n//end function invite_people\n}", "title": "" }, { "docid": "ee44b1c745d6aa8f3c2c14d14e5753c8", "score": "0.5187701", "text": "public function getRecipientsList(){\n return $this->_get(10);\n }", "title": "" }, { "docid": "68dbe24b962855ddd5103bbda1e08eeb", "score": "0.51815045", "text": "function getContacts(){\n\t\t$con=mysqli_connect(\"localhost\",\"simon_baaman\",\"2237f7e245302fb8\",\"mobileweb__simon_baaman\");\n\t\t// Check connection\n\t\tif (mysqli_connect_errno())\n\t\t{\n\t\t\t\n\t\t}\n\n\t\t$sql=\"SELECT contact_name, contact_num FROM contacts\";\n\t\t$result=mysqli_query($con,$sql);\n\n\t\t// Fetch all\n\t\t$contact_details = mysqli_fetch_all($result,MYSQLI_ASSOC);\n\t\t\n\t\tif($contact_details){\n\t\t\techo json_encode($contact_details);\n\t\t}else{\n\t\t\techo '{\"result\":0,\"message\":\"Please Check your records. No Users added Yet\"}';\n\t\t}\n\t\t\n\t\tmysqli_close($con);\n\t}", "title": "" }, { "docid": "108803ed88d1933b85c68657b6e967c2", "score": "0.5180216", "text": "public function getUserContacts()\n\t{\n\t\t//-- get params\n\t\t$compId = isset($this->requestData->compId)?$this->requestData->compId:\"\";\n\t\t$usrId = isset($this->requestData->usrId)?$this->requestData->usrId:\"\";\n\t\t$limit = isset($this->requestData->limit)?$this->requestData->limit:\"\";\n\t\t$index = isset($this->requestData->index)?$this->requestData->index:\"\";\n\t\t$search = isset($this->requestData->search)?$this->requestData->search:\"\";\n\t\ttry\n\t\t{\n\t\t\t//-- call model function getUserContacts\n\t\t\t$arrayResponse = $this->UserModel->getUserContacts($compId,$usrId,$limit,$index,$search);\n\t\t\tif(empty($arrayResponse))\n\t\t\t\tthrow new Exception('Response not get, please try again.');\n\t\t} \n\t\tcatch (Exception $e)\n\t\t{\n\t\t\techo $this->CommonModel->getJsonData(array('success'=> false, 'message' => $e->getMessage(), 'data' => []));\n\t\t\texit();\n\t\t}\n\t\t//-- convert arrayResponse to json\n\t\techo $this->CommonModel->getJsonData($arrayResponse);\n\t}", "title": "" }, { "docid": "e27490588ff4161b025da34e765160a2", "score": "0.5175074", "text": "public function associateInDatabase()\n {\n $this->verboseStart('Associating Contacts...');\n\n /** @var SFContact $contact */\n foreach ($this->all as $contact) {\n $contact->associateInDatabase($this->userCache);\n }\n\n $this->verboseEnd($this->all->count());\n }", "title": "" }, { "docid": "76712f824bbff421646986fa034beae0", "score": "0.5173369", "text": "private function add(array $data) : Contact\n {\n $uuid = Str::uuid()->toString();\n\n $avatar = (new GenerateAvatar)->execute([\n 'uuid' => $uuid,\n 'size' => 200,\n ]);\n\n return Contact::create([\n 'account_id' => $data['account_id'],\n 'enc_first_name' => EncryptionHelper::encrypt($data['first_name'], $data['secret']),\n 'uuid' => Str::uuid()->toString(),\n 'avatar' => $avatar,\n 'is_dummy' => $this->valueOrFalse($data, 'is_dummy'),\n ]);\n }", "title": "" }, { "docid": "aed488783e9a8f665aea91ed5669d631", "score": "0.517078", "text": "protected function __add_contact_item($name, $email)\n\t{\n\t\tif(strpos($email, \"@\") == 0)\n\t\t{ //!< simple check for $email field to contain actual email address\n\t\t\t//! \"@\" either in first position or not in $email (strpos will return false or 0 or actual index position)\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->return_arrays)\n\t\t{\n\t\t\t$this->_names[] = $name;\n\t\t\t$this->_emails[] = $email;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_contacts[] = new SPContactsItem($name, $email);\n\t\t}\n\n\t\t$this->ContactsCount++;\n\t}", "title": "" }, { "docid": "bad60abe691cbb64c136489d12d99047", "score": "0.51653606", "text": "public function readContacts($fileName) {\n $this->csvContacts = array();\n $file = fopen($fileName,\"r\");\n while(! feof($file)) {\n $info = fgetcsv($file);\n $firstname = $info[0];\n $surname = $info[1];\n $phone = $info[2];\n $email = $info[3];\n $address = $info[4];\n $city = $info[5];\n $province = $info[6];\n $postal = $info[7];\n $birthday = $info[8];\n $contact = new Contact(null, $firstname, $surname, $phone, $email, $address, $city, $province, $postal, $birthday);\n array_push($this->csvContacts, $contact);\n }\n fclose($file);\n return $this->csvContacts;\n }", "title": "" }, { "docid": "4d15dafc95bb568e41f024f80708955c", "score": "0.51649326", "text": "function db_insert_contacts()\r\n {\r\n \r\n $dbmgr = new DB_Mgr();\r\n $stmt = \"INSERT INTO SI_SITE_CONTACT VALUES (\"\r\n . $this->site_num . \", \"\r\n . $this->mgr_emp_id . \", 0, 0, 0, 0\";\r\n return $dbmgr->query($stmt);\r\n }", "title": "" }, { "docid": "b715d3b15d96dd16996dcb59fe6f8e9f", "score": "0.51589483", "text": "public function getAddressList() {\n $returnVal;\n \n if(null != $this->addressList)\n {\n $returnVal = $this->getAddressList(); \n }else\n {\n //do a join, fill address list\n $sql = \"SELECT T1.* FROM itsolutions.address AS T1,\nitsolutions.addressassign AS T2, itsolutions.customer AS T3\nWHERE T1.addressid = T2.addressid AND T2.customerid = T3.customerid\nAND T3.customerid = '\".$this->getId().\"';\";\n \n $db = DatabaseHandler::getInstance();\n $result = $db->executeSelect($sql);\n \n \n \n $this->addressList = array();\n foreach($result as $value)\n {\n $customer = new Customer($value[\"customertitle\"],$value[\"customerfirstname\"],$value[\"customerlastname\"]);\n $customer->setId($value[\"customerid\"]);\n \n array_push($this->addressList,$customer);\n }\n \n $returnVal = $this->addressList;\n }\n \n \n return $returnVal;\n }", "title": "" }, { "docid": "a706e96a5ef7436f88744a0f46effbf7", "score": "0.5157597", "text": "public function getCusContacts()\n {\n return $this->hasMany(CusContact::className(), ['customer_id' => 'customer_id']);\n }", "title": "" }, { "docid": "acf8dbb59c8359e62f5e9f8428b8229e", "score": "0.51476383", "text": "public function testListContacts()\n {\n $params = new ContactListHttpParam();\n $response = 'A dummy response';\n\n $this->expectRequest(\n $this->httpMock,\n $params,\n 0,\n $this->anOKResponse($response)\n );\n\n $this->parserFactoryMock->expects($this->once())->method(\n 'createParser'\n )->with($this->equalTo(ParserFactory::CONTACT_LIST))->will(\n $this->returnValue($this->parserMock->mock)\n );\n\n $this->parserMock->expects($this->once())->method('parse')->with(\n $this->equalTo($response)\n )->will($this->returnValue('dummy'));\n\n $this->object->listContacts();\n\n }", "title": "" }, { "docid": "66584323745ae6981b3dd5547bdaf09f", "score": "0.51405394", "text": "function afficherContactsSousCateg() { \r\n\t\t$result=mysql_query(\"SELECT numsscateg FROM if_sscateg WHERE numcateg='$this->nummenu'\");\r\n\t\twhile ($row=mysql_fetch_row($result)) {\r\n\t\t\t$res=mysql_query(\"SELECT numcontact FROM if_cont_sscateg WHERE numsscateg='$row[0]'\");\r\n\t\t\twhile ($riw=mysql_fetch_row($res)) {\r\n\t\t\t\t $tab_contact[]=$riw[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tab_contact_unique=array_unique($tab_contact);\r\n\t\tfor ($i=0;$i<count($tab_contact_unique);$i++) {\r\n\t\t\t\t $leContact=new Contact();\r\n\t\t\t\t $leContact->numcontact=$tab_contact_unique[$i]; \r\n\t\t\t\t $leContact->infosContact();\r\n\t\t\t\t $this->listcontact[]=$leContact;\r\n\t\t}\r\n\t\t\r\n\t\t//tri multidimentionnel sur tableau d'objets (la fonction de reference est dans fonctions.php)\r\n\t\tusort($this->listcontact, 'trierContacts');\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "37ac844614a70e577faf04386d25e406", "score": "0.51384646", "text": "public function setContacts($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DataCatalog\\V1\\Contacts::class);\n $this->contacts = $var;\n\n return $this;\n }", "title": "" }, { "docid": "0c3758789844a01665886d622e87d68c", "score": "0.51358926", "text": "public function get_all_customer_contacts()\n {\n $this->db->order_by(\"date\", \"desc\");\n return $this->db->get(\"contact\")->result_array();\n }", "title": "" }, { "docid": "735202d0ebdd143e8c3acdb9ebc00aac", "score": "0.513584", "text": "public function GetContactsArrays()\n\t{\n\t\t$options = func_get_args();\n\t\t$this->SetOptions($options);\n\t\t$this->return_arrays = true;\n\t\t$this->_contacts = null;\n\t\t$this->_names = array();\n\t\t$this->_emails = array();\n\t\treturn $this->GetContacts();\n\t}", "title": "" }, { "docid": "c49293f02be9ab81e6f908fd1bf848d9", "score": "0.51354396", "text": "function getUserContacts() {\r try {\r $response = $this->api->connections('~/connections:(id,first-name,last-name,picture-url)?start=0&count=1000');\r } catch (LinkedInException $e) {\r throw new Exception(\"User contacts request failed! {$this->providerId} returned an error: $e\");\r }\r\r if (!$response || !$response['success']) {\r return ARRAY();\r }\r\r $connections = new SimpleXMLElement($response['linkedin']);\r\r $contactInfo = array();\r\r if ((int) $connections['total'] > 0) {\r\r $key = 0;\r\r foreach ($connections->person as $connection) {\r\r $contactInfo[$key]['name'] = $connection->{'first-name'} . ' ' . $connection->{'last-name'};\r\r $contactInfo[$key]['id'] = (string) $connection->{'id'};\r\r $contactInfo[$key]['picture'] = (string) $connection->{'picture-url'};\r\r $key++;\r }\r }\r\r return $contactInfo;\r }", "title": "" }, { "docid": "fd4e8119da85f5d15418ad6c2e590db0", "score": "0.5127266", "text": "public function listContacts($contactID=null) {\n\t\t$contacts = array();\n\t\tif($contactID != null) {\n\t\t\t$sql = \"SELECT * FROM `contacts` WHERE contactID =\".$contactID;\n\t\t} else {\n\t\t\t$sql = \"SELECT * FROM `contacts` ORDER BY `contactUpdated` DESC\";\n\t\t}\n\t\t$res = mysqli_query($this->link,$sql);\n\t\t$fields = mysqli_fetch_fields($res);\n\t\t$i=0;\n\t\twhile($row = mysqli_fetch_array($res)) {\n\t\t\tforeach($fields as $f) {\n\t\t\t\t$contacts[$i][$f->name] = $row[$f->name];\n\t\t\t\t\n\t\t\t}\n\t\t\t$contacts[$i]['clientContacts'] = $this->getContactClients($row['contactID']);\n\t\t\t$i++;\n\t\t}\n\t\treturn $contacts;\n\t}", "title": "" }, { "docid": "0efe9e794c6386889180ac1e205e771b", "score": "0.51240504", "text": "public function load_contacts($data){\n\t\t\t\t\n\t\t\t\t$u = json_decode($data);\n\t\t\t\t\n\t\t\t\t$html = \"\";\n\t\t\t\t$this->db->where('friend_user_id', $u->ud);\n\t\t\t\t$query = $this->db->get(\"watch_friends\"); \n\t\t\t\tif($query->num_rows() > 0){\n\t\t\t\t\tforeach($query->result() as $r){\n\t\t\t\t\t\t$info = $this->function_users->get_user_fields_by_id(array(\"user_id\",\"user_avatar\",\"user_name\"),$r->friend_friend_id);\n\t\t\t\t\t\t$html .= \"<div class='contact_info col-sm-3'>\n\t\t\t\t\t\t\t\t\t<input type='hidden' class='recipient' value='\".$info['user_id'].\"'>\n\t\t\t\t\t\t\t\t\t<img src='\".$info['user_avatar'].\"' style='max-width:50px; max-height:50px'>\t\t\t \n\t\t\t\t\t\t\t\t\t<div class='recipient_name'>\".$info['user_name'].\"</div>\n\t\t\t\t\t\t\t\t </div>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html2 = '<div class=\"regular_register\">\n\t\t\t\t\t\t\t<i class=\"fa fa-exclamation-triangle\"></i> You have 0 Contacts yet.\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>';\n\t\t\t\tif($html == \"\"){\n\t\t\t\t\texit($html2);\n\t\t\t\t} else {\n\t\t\t\t\texit($html);\n\t\t\t\t}\n }", "title": "" }, { "docid": "7322bafd68b806d6ddac3bce07b64959", "score": "0.51226276", "text": "public function contacts()\n {\n return $this->morphMany(Contact::class, 'contactable')\n ->orderBy('created_at', 'desc');\n }", "title": "" } ]
6a7665a0400b8d4ec2689948366c537c
Compiles the ext_emconf.php file
[ { "docid": "10ea379f17bcb7dc172369bc90eacbaf", "score": "0.7262027", "text": "function construct_ext_emconf_file ($extKey, $EM_CONF) {\n\t\t$fMsg = array(\n\t\t\t'version' => '\t// Don\\'t modify this! Managed automatically during upload to repository.'\n\t\t);\n\t\t\t// Clean version number\n\t\t$vDat = $this->renderVersion($EM_CONF['version']);\n\t\t$EM_CONF['version'] = $vDat['version'];\n\n\t\t$lines = array();\n\t\t$lines[] = '<?php';\n\t\t$lines[] = '';\n\t\t$lines[] = '########################################################################';\n\t\t$lines[] = '# Extension Manager/Repository config file for ext: \"'.$extKey.'\"';\n\t\t$lines[] = '# ';\n\t\t$lines[] = '# Auto generated '.date('d-m-Y H:i');\n\t\t$lines[] = '# ';\n\t\t$lines[] = '# Manual updates:';\n\t\t$lines[] = '# Only the data in the array - anything else is removed by next write';\n\t\t$lines[] = '########################################################################';\n\t\t$lines[] = '';\n\t\t$lines[] = '$EM_CONF[$_EXTKEY] = array (';\n\t\t$indent = chr(9);\n\t\tforeach ($EM_CONF as $k => $v) {\n\t\t\tif (is_array($v)) {\n\t\t\t\t$lines[] = $indent . \"'\" . $k . \"' => \" . 'array(';\n\t\t\t\t$indentMore = \n\t\t\t\t$lines = array_merge($lines, $this->constructArrayDefinition($v, $indent . chr(9)));\n\t\t\t\t$lines[] = $indent . '),';\n\t\t\t} else {\n\t\t\t\t$lines[] = $indent . \"'\" . $k . \"' => \" . (\\TYPO3\\CMS\\Core\\Utility\\MathUtility::canBeInterpretedAsInteger($v) ? intval($v) : \"'\" . \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::slashJS(trim($v), 1) . \"'\"). ',' . $fMsg[$k];\n\t\t\t}\n\t\t}\n\t\t$lines [] =');';\n\t\t$lines [] ='';\n\t\t$lines [] ='?>';\n\n\t\treturn implode(LF, $lines);\n\t}", "title": "" } ]
[ { "docid": "f79c0fa0a5acb7975de8921000024367", "score": "0.6479886", "text": "public function buildExtension() {\n\t \n\t // Generates the xml array\n\t $this->setXmlArray();\n\n\t\t// Generates the Configuration/TCA directory\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep($this->extensionDirectory, 'Resources/Private/Icons');\n\t\t\n // Generates the icons\n \t\t$this->generateFile('icons.t');\n\n\t\t// Generates ext_emconf.php\n\t\t$fileContents = $this->generateFile('extEmconf.phpt');\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'ext_emconf.php', $fileContents);\n\n\t\t// Generates ext_localconf.php\n\t\tif (!$this->sectionManager->getItem('general')->getItem(1)->getItem('keepExtLocalConf') ||\n\t\t\t\t($this->sectionManager->getItem('general')->getItem(1)->getItem('keepExtLocalConf') && !file_exists($this->extensionDirectory . 'ext_localconf.php'))) {\n\t\t\t$fileContents = $this->generateFile('Configuration/ExtLocalconf/extLocalconf.phpt');\n\t\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'ext_localconf.php', $fileContents);\n\t\t}\n\n\t\t// Generates ext_tables.php\n\t\tif($this->compatibility == self::COMPATIBILITY_TYPO3_4x_7x) {\n\t\t // Creates the directories\n\t\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep($this->extensionDirectory, 'Configuration/ExtTables/' . self::TYPO3_4x_VERSION_DIRECTORY);\n\t\t // Creates the generic ext_tables.php files\n\t\t $fileContents = $this->generateFile('Configuration/ExtTables/extTables.phpt');\n\t\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'ext_tables.php', $fileContents);\n\t\t // Creates the specific ext_tables.php file for each directory\n\t\t $fileContents = $this->generateFile('Configuration/ExtTables/' . self::TYPO3_4x_VERSION_DIRECTORY . '/extTables.phpt');\n\t\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Configuration/ExtTables/' . self::TYPO3_4x_VERSION_DIRECTORY . '/ext_tables.php', $fileContents);\t\t \n\t\t $fileContents = $this->generateFile('Configuration/ExtTables/' . self::TYPO3_6x7x_VERSION_DIRECTORY . '/extTables.phpt');\n\t\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Configuration/ExtTables/ext_tables.php', $fileContents);\t\t \n\t\t} else {\n\t\t // Creates the ext_tables depending on the requested compatibility\n \t\t$fileContents = $this->generateFile('Configuration/ExtTables/' . $this->getVersionDirectory() .'/extTables.phpt');\n \t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'ext_tables.php', $fileContents);\n\t\t}\n\n\t\t// Generates ext_tables.sql\n\t\t$fileContents = $this->generateFile('extTables.sqlt');\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'ext_tables.sql', $fileContents);\n\n\t\t// Generates the Configuration/TCA/tca.php file\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep($this->extensionDirectory, 'Configuration/TCA');\n \t$fileContents = $this->generateFile('Configuration/TCA/tca.phpt');\n \t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Configuration/TCA/tca.php', $fileContents);\n\n\t\t// Generates the Configuration/Flexforms directory\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep($this->extensionDirectory, 'Configuration/Flexforms');\n\t\t\n\t\t// Generates flexforms\n\t\t$fileContents = $this->generateFile('Configuration/Flexforms/ExtensionFlexform.xmlt');\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Configuration/Flexforms/ExtensionFlexform.xml', $fileContents);\n\t\t\n\t\t// Generates the Configuration/SavLibraryPlus directory\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep($this->extensionDirectory, 'Configuration/Library');\n\n\t\t// Generates the configuration file\t\t\n\t\t$fileContents = $this->generateFile('Configuration/Library/SavLibraryPlus.xmlt', NULL, $this->xmlArray);\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Configuration/Library/SavLibraryPlus.xml', $fileContents);\n\n\t\t// Generates the Resources/Private/Language directory\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep($this->extensionDirectory, 'Resources/Private/Language');\n\t\t\n\t\t// Generate locallang.xml file if it does not exist\n\t\tif (!file_exists($this->extensionDirectory . 'Resources/Private/Language/locallang.xml')) {\n\t\t $fileContents = $this->generateFile('Resources/Private/Language/locallang.xmlt');\n\t\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Resources/Private/Language/locallang.xml', $fileContents);\n }\n\t\t\t// Generate locallang.xlf file if it does not exist\n\t\tif (!file_exists($this->extensionDirectory . 'Resources/Private/Language/locallang.xlf')) {\n\t\t $fileContents = $this->generateFile('Resources/Private/Language/locallang.xlft');\n\t\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Resources/Private/Language/locallang.xlf', $fileContents);\n }\n \n\t\t// Generates locallang_db.xml file\n\t\t$fileContents = $this->generateFile('Resources/Private/Language/locallang_db.xmlt');\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Resources/Private/Language/locallang_db.xml', $fileContents);\n\t\t// Generates locallang_db.xlf file\n\t\t$fileContents = $this->generateFile('Resources/Private/Language/locallang_db.xlft');\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Resources/Private/Language/locallang_db.xlf', $fileContents);\n\t\t\n\t\t// Generates the plugin file\n\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep($this->extensionDirectory, 'Classes');\t\t\n\t\t$fileName = 'class.tx_' . str_replace('_','', $this->extensionKey) . '_pi1.php'; \t \t\n \t$fileContents = $this->generateFile('Classes/class.tx_extension_pi1.phpt');\n \t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($this->extensionDirectory . 'Classes/' . $fileName, $fileContents);\t\t \t \t\n\t}", "title": "" }, { "docid": "3223b741e701d0934f8c31131f4cf639", "score": "0.5815643", "text": "function updateLocalEM_CONF ($extKey, $extInfo) {\n\t\t$EM_CONF = $extInfo['EM_CONF'];\n\t\t$EM_CONF['_md5_values_when_last_written'] = serialize($this->serverExtensionMD5Array($extKey,$extInfo));\n\t\t\t// Update extension constraints with those of this extension\n\t\t$EM_CONF['constraints'] = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cc_infotablesmgm']['constraints'];\n\t\t$emConfFileContent = $this->construct_ext_emconf_file($extKey, $EM_CONF);\n\t\tif ($emConfFileContent) {\n\t\t\t$absPath = $extInfo['path'];\n\t\t\t$emConfFileName = $absPath . 'ext_emconf.php';\n\t\t\tif (@is_file($emConfFileName)) {\n\t\t\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::writeFile($emConfFileName,$emConfFileContent);\n\t\t\t\treturn '\"'.substr($emConfFileName,strlen($absPath)).'\" was updated with a cleaned up EM_CONF array.';\n\t\t\t} else die('Error: No file \"'.$emConfFileName.'\" found.');\n\t\t}\n\t}", "title": "" }, { "docid": "38f00e3c8b860dd67d47f73c2d375f34", "score": "0.54874223", "text": "function includeEMCONF ($path, $_EXTKEY) {\n\t\t$EM_CONF = array();\n\t\tinclude($path);\n\t\treturn $EM_CONF[$_EXTKEY];\n\t}", "title": "" }, { "docid": "a3e12ab3899b97dfcc5cc62992e7101d", "score": "0.54408056", "text": "function apc_compile_file ($filename) {}", "title": "" }, { "docid": "7581511bc7ea25779ffe57126d4fb76a", "score": "0.53979915", "text": "function action_generate_appconfig()\n\t{\n\t\tlog_write(\"debug\", \"script\", \"Generating Bind application configuration file (\". $GLOBALS[\"config\"][\"bind\"][\"config\"] .\")\");\n\n\t\tif (!$fh = fopen($GLOBALS[\"config\"][\"bind\"][\"config\"], \"w\"))\n\t\t{\n\t\t\tlog_write(\"error\", \"main\", \"Unable to open file \". $GLOBALS[\"config\"][\"bind\"][\"config\"] .\" for writing\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tfwrite($fh, \"//\\n\");\n\t\tfwrite($fh, \"// NamedManager Configuration\\n\");\n\t\tfwrite($fh, \"//\\n\");\n\t\tfwrite($fh, \"// This file is automatically generated any manual changes will be lost.\\n\");\n\t\tfwrite($fh, \"//\\n\");\n\n\t\tif ($this->domains)\n\t\t{\n\t\t\tforeach ($this->domains as $domain)\n\t\t\t{\n\t\t\t\t// we can assume a utf8 filesystem, but bind requires we convert the domain names\n\t\t\t\t// to an IDN format (eg παράδειγμα.δοκιμή -> xn--hxajbheg2az3al.xn--jxalpdlp) before\n\t\t\t\t// it can resolve DNS requests.\n\t\t\t\t//\n\t\t\t\t// Requires PHP > 5.4 and/or PHP with intl package installed.\n\n\t\t\t\tif (function_exists(\"idn_to_ascii\"))\n\t\t\t\t{\n\t\t\t\t\t$domain[\"domain_name_idn\"]\t= $domain[\"domain_name\"];\n\t\t\t\t\t$domain[\"domain_name\"]\t\t= idn_to_ascii($domain[\"domain_name\"]);\n\t\t\t\t\n\t\t\t\t\tif ($domain[\"domain_name\"] != $domain[\"domain_name_idn\"])\n\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($fh, \"// UTF-8 Compatibility: \". $domain[\"domain_name_idn\"] .\" renamed to \". $domain[\"domain_name\"] .\"\\n\");\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// this will break international domains, but will work for all other domains\n\t\t\t\t\tlog_write(\"warning\", \"script\", \"idn/international functions not available on this server, UTF-8 domains may be handled incorrectly\");\n\t\t\t\t}\n\n\n\t\t\t\tfwrite($fh, \"zone \\\"\". $domain[\"domain_name\"] .\"\\\" IN {\\n\");\n\t\t\t\tfwrite($fh, \"\\ttype master;\\n\");\n\t\t\t\t\n\t\t\t\tif (!empty($GLOBALS[\"config\"][\"bind\"][\"zonefullpath\"]))\n\t\t\t\t{\n\t\t\t\t\t// unusual, needed if Bind lacks a directory configuration option\n\t\t\t\t\tfwrite($fh, \"\\tfile \\\"\". $GLOBALS[\"config\"][\"bind\"][\"zonefiledir\"] .\"\". $domain[\"domain_name\"] .\".zone\\\";\\n\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfwrite($fh, \"\\tfile \\\"\". $domain[\"domain_name\"] .\".zone\\\";\\n\");\n\t\t\t\t}\n\n\t\t\t\tfwrite($fh, \"\\tallow-update { none; };\\n\");\n\t\t\t\tfwrite($fh, \"};\\n\");\n\t\t\t}\n\t\t}\n\n\t\tfclose($fh);\n\n\t\t// validate configuration\n\t\tif ($GLOBALS[\"config\"][\"bind\"][\"verify_config\"] && file_exists($GLOBALS[\"config\"][\"bind\"][\"verify_config\"]))\n\t\t{\n\t\t\texec($GLOBALS[\"config\"][\"bind\"][\"verify_config\"] .\" \". $GLOBALS[\"config\"][\"bind\"][\"config\"], $exec_output, $exec_return_value);\n\n\t\t\tif ($exec_return_value)\n\t\t\t{\n\t\t\t\tlog_write(\"error\", \"script\", \"An unexpected problem occured when validating the generated configuration.\");\n\t\t\t\tlog_write(\"error\", \"script\", \"It is possible this is an application bug, raising error to avoid reload\");\n\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlog_write(\"warning\", \"script\", \"No named configuration validater found, you should install named-checkconf to improve safety checks of your name server\");\n\t\t}\n\t\t\n\n\n\t\tlog_write(\"debug\", \"script\", \"Finished writing application configuration\");\n\n\t\treturn 1;\n\n\t}", "title": "" }, { "docid": "3452062d37cf196c147274a56b63319b", "score": "0.53746", "text": "function load_config(){\n\t\t$this->parent->modules = array();\n\t\t$this->modules = array();\n\t\t/*\n\t\t-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\t\t- Initialise the engine load the configuration file and configure the system.\n\t\t-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\t\t*/\n//\t\tprint CONFIGURATION_DIRECTORY.\"/licence_data.php\";\n\t\tif (file_exists(CONFIGURATION_DIRECTORY.\"/licence_data.php\")){\n\t\t\tinclude(CONFIGURATION_DIRECTORY.\"/licence_data.php\");\n\t\t\t$file = split(\"\\n\",LICENCE);\n\t\t\t$cmd=\"\";\n\t\t\tfor ($index=0,$length=count($file);$index<$length;$index++){\n\t\t\t\tif (strpos($file[$index],\"#\")===0){\n\t\t\t\t\t$cmd=trim($file[$index]);\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t\tif ($cmd==\"#MODULES\"){\n\t\t\t\t\t$pram=split(\",\",trim($file[$index]));\n\t\t\t\t\t$this->add_module($pram);\n\t\t\t\t}else if ($cmd==\"#SERVER\"){\n\t\t\t\t\t$param = split('::',trim($file[$index]));\n\t\t\t\t\t$tag= $param[0].\"\";\n\t\t\t\t\t$val= $param[1].\"\";\n\t\t\t\t\t$this->server[$tag]=$val;\n\t\t\t\t}else {\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (file_exists(CONFIGURATION_DIRECTORY.\"/paths.php\")){\n\t\t\t\t$file = file(CONFIGURATION_DIRECTORY.\"/paths.php\");\n\t\t\t\t$cmd=\"\";\n\t\t\t\tfor ($index=0,$length=count($file);$index<$length;$index++){\n\t\t\t\t\tif (strpos($file[$index],\"#\")===0){\n\t\t\t\t\t\t$cmd=trim($file[$index]);\n\t\t\t\t\t\t$index++;\n\t\t\t\t\t}\n\t\t\t\t\tif ($cmd==\"#PATHS\"){\n\t\t\t\t\t\t$param = split(',',trim($file[$index]));\n\t\t\t\t\t\t$tag= $param[0].\"\";\n\t\t\t\t\t\t$val= $param[1].\"\";\n\t\t\t\t\t\t$str = \"\\$this-\".\">site_directories[\\\"\".$tag.\"\\\"]=\\\"\".$val.\"\\\";\";\n\t\t\t\t\t\teval($str);\n\t\t\t\t\t}else {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->load_locale();\n\t\t\t\t$this->call_command(\"SESSION_RETRIEVE\",array(session_id()));\n\t\t\t} else {\n\t\t\t\t$this->call_command(\"ENGINE_ERROR\",array(__FILE__,__LINE__,\"The Engine could not load the configuration file [paths.php]\"));\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif ($this->server[LICENCE_TYPE]==ECMS){\n\t\t\t\t$extra_mods = $this->site_directories[\"MODULE_DIR\"].\"/licences/ecms.ls\";\n\t\t\t} else if ($this->server[LICENCE_TYPE]==MECM){\n\t\t\t\t$extra_mods = $this->site_directories[\"MODULE_DIR\"].\"/licences/wcm.ls\";\n\t\t\t} else {\n\t\t\t\t$extra_mods = $this->site_directories[\"MODULE_DIR\"].\"/licences/sw.ls\";\n\t\t\t}\n\t\t\tif (file_exists($extra_mods)){\n\t\t\t\t$list = file($extra_mods);\n\t\t\t\tfor ($i=0,$m=count($list);$i<$m;$i++){\n\t\t\t\t\t$pram=split(\",\",trim($list[$i]));\n\t\t\t\t\t$this->add_module($pram);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t$this->call_command(\"ENGINE_ERROR\",array(__FILE__,__LINE__,\"The Engine could not load the configuration file [licence.php]\"));\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "5ea54a10560c8ec2a4a70e71ee96a112", "score": "0.53727925", "text": "function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug = false, $debug_test = false)\n{\n\t$load_extensions = implode(',', $load_extensions);\n\n\t$config_data = \"<?php\\n\";\n\t$config_data .= \"// phpBB 3.0.x auto-generated configuration file\\n// Do not change anything in this file!\\n\";\n\n\t$config_data_array = array(\n\t\t'dbms'\t\t\t=> $dbms,\n\t\t'dbhost'\t\t=> $data['dbhost'],\n\t\t'dbport'\t\t=> $data['dbport'],\n\t\t'dbname'\t\t=> $data['dbname'],\n\t\t'dbuser'\t\t=> $data['dbuser'],\n\t\t'dbpasswd'\t\t=> htmlspecialchars_decode($data['dbpasswd']),\n\t\t'table_prefix'\t=> $data['table_prefix'],\n\t\t'acm_type'\t\t=> 'file',\n\t\t'load_extensions'\t=> $load_extensions,\n\t);\n\n\tforeach ($config_data_array as $key => $value)\n\t{\n\t\t$config_data .= \"\\${$key} = '\" . str_replace(\"'\", \"\\\\'\", str_replace('\\\\', '\\\\\\\\', $value)) . \"';\\n\";\n\t}\n\n\t$config_data .= \"\\n@define('PHPBB_INSTALLED', true);\\n\";\n\n\tif ($debug)\n\t{\n\t\t$config_data .= \"@define('DEBUG', true);\\n\";\n\t\t$config_data .= \"@define('DEBUG_EXTRA', true);\\n\";\n\t}\n\telse\n\t{\n\t\t$config_data .= \"// @define('DEBUG', true);\\n\";\n\t\t$config_data .= \"// @define('DEBUG_EXTRA', true);\\n\";\n\t}\n\n\tif ($debug_test)\n\t{\n\t\t$config_data .= \"@define('DEBUG_TEST', true);\\n\";\n\t}\n\n\treturn $config_data;\n}", "title": "" }, { "docid": "5d9a9fa8e295805ec05c2433b362dbfc", "score": "0.52905947", "text": "function configure(){\n\t\tglobal $GONX;\n\t\t$filename = \"init.php\";\n//\t\t$perms = fileperms ($filename);\n\t\t$contents = implode('',file($filename));\n\t\tpreg_match_all(\"|(.*)=(.*);|U\",$contents ,$matches );\n$initform = \"<form action=\\\"?\\\" method=post>\n<table class=config cellspacing=0 cellpadding=4>\n <tr><td colspan=2><b>\".$GONX[\"configureapp\"].\"</b></td></tr>\\n\\n\n <tr align=center><th width=50%><i>Variable</i></th><th width=50%><i>Value</i></th></tr>\\n\\n\";\nforeach($matches[1] as $k=>$v){\n\tif (ereg(\"<?php\",$v)) {\n\t $v = str_replace(\"<?php\",\"\" , $v);\n\t}\n\t$v = trim($v);\n\t$value = trim(htmlentities($matches[2][$k]));\n\t$initform .= \" <tr><td>$v</td><td><input type=text size=40 name=vars[$k] value=\\\"$value\\\"></td></tr>\\n\\n\";\n}\n$initform .= \" \n</table>\n<p align=right><input type=submit style=\\\"width:200\\\" class=button></p>\n<input type=hidden name=go value=saveconfig>\n</form>\\n\\n\";\n\t\treturn $initform ;\n\t}", "title": "" }, { "docid": "e52987c3feef8a36d6b1348bc00ffd19", "score": "0.5285369", "text": "function writeconfig(){\r\n\t\tif(file_exists(LOQ_INSTALLER.DIRECTORY_SEPARATOR.'config.tmpl') && is_readable(LOQ_INSTALLER.DIRECTORY_SEPARATOR.'config.tmpl')){\r\n\t\t\t$config = file_get_contents(LOQ_INSTALLER.DIRECTORY_SEPARATOR.'config.tmpl');\r\n\t\t\t$config = str_replace('__pfx__', $_SESSION['config']['table_prefix'], $config);\r\n\t\t\tforeach($_SESSION['config'] as $setting=>$value){\r\n\t\t\t\t//This is not the proper place to put this fix\r\n\t\t\t\tif($setting == 'fs_path'){\r\n\t\t\t\t\tif(strrpos($value, DIRECTORY_SEPARATOR) == strlen($value) && DIRECTORY_SEPARATOR == '\\\\'){\r\n\t\t\t\t\t\t$value = substr_replace($value, '\\\\', strlen($value));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$config = str_replace('__'.$setting.'__', $value, $config);\r\n\t\t\t}\r\n\t\t\t$config = str_replace('__loq_version__', LOQ_CUR_VERSION, $config);\r\n\t\t\t$config = str_replace('__loq_app_root__', LOQ_APP_ROOT, $config);\r\n\t\t}\r\n\t\tif(($fp = fopen(LOQ_APP_ROOT.'config.php', 'w+b')) !== false){\n\t\t\tif(fwrite($fp, \"<?php\\n$config\\n?>\") === false){\r\n\t\t\t}\r\n\t\t\tfclose($fp);\r\n\t\t}else{\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "02d534a769d1f7239f65268a1d818028", "score": "0.5270393", "text": "static public function getExtensionInfo ($extKey, $path = '') {\n $result = '';\n\n if (!$path) {\n $path = \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extPath($extKey);\n }\n\n if (is_dir($path)) {\n $file = $path . 'ext_emconf.php';\n\n if (@is_file($file)) {\n $_EXTKEY = $extKey;\n $EM_CONF = [];\n include($file);\n\n $eInfo = [];\n $fieldArray = [\n 'author',\n 'author_company',\n 'author_email',\n 'category',\n 'constraints',\n 'description',\n 'lastuploaddate',\n 'reviewstate',\n 'state',\n 'title',\n 'version',\n 'CGLcompliance',\n 'CGLcompliance_note'\n ];\n $extConf = $EM_CONF[$extKey];\n\n if (isset($extConf) && is_array($extConf)) {\n foreach ($fieldArray as $field) {\n // Info from emconf:\n if (isset($extConf[$field])) {\n $eInfo[$field] = $extConf[$field];\n }\n }\n\n if (\n isset($extConf['constraints']) &&\n is_array($extConf['constraints']) &&\n isset($EM_CONF[$extKey]['constraints']['depends']) &&\n is_array($EM_CONF[$extKey]['constraints']['depends'])\n ) {\n $eInfo['TYPO3_version'] = $extConf['constraints']['depends']['typo3'];\n } else {\n $eInfo['TYPO3_version'] = $extConf['TYPO3_version'];\n }\n $eInfo['manual'] =\n @is_file($path . '/doc/manual.sxw') ||\n @is_file($path . '/Documentation/Index.rst');\n $result = $eInfo;\n } else {\n $result = 'ERROR: $EM_CONF mismatch in file: ' . $file;\n }\n } else {\n $result = 'ERROR: File ext_emconf.php does not exist: ' . $file;\n }\n } else {\n $result = 'ERROR: Path not found: ' . $path;\n }\n\n return $result;\n }", "title": "" }, { "docid": "db0b94b5491a38ee1f442f427c5d0fac", "score": "0.52326435", "text": "public function configFile()\n {\n $this->file_contents = str_replace([\n '{class_name}', '{section}', '{contents}'\n ],[\n $this->class_name, $this->section, $this->contents\n ],$this->file_contents);\n\n if(!empty($this->extends))\n {\n $this->file_contents = str_replace('{extends}','extends '.$this->extends,$this->file_contents);\n }\n\n if(count($this->traits))\n {\n foreach ($this->traits as $trait)\n {\n $this->file_contents = str_replace('{traits}','use '.$trait.\";\\n\".\"{traits}\",$this->file_contents);\n }\n $this->file_contents = str_replace(\"\\n\".\"{traits}\",'',$this->file_contents);\n }\n\n if(!empty($this->src))\n {\n $this->file_contents = str_replace('{src}',$this->src,$this->file_contents);\n }\n }", "title": "" }, { "docid": "59b440ce0b5f6ffa8069930ef3ba1a86", "score": "0.52203286", "text": "function qadmin_compile ($def, $cfg)\n{\n\tglobal $config, $tpl_section, $tpl_block, $db_prefix, $lang;\n\n\t// init\n\t$tmp = ''; $tab_list = $ezd = $ezf = $row = array (); $file = FALSE;\n\tif (empty ($cfg['action']))\n\t{\n\t\t$t = parse_url (urldecode (cur_url()));\n\t\t$cfg['action'] = basename ($t['path']);\n\t}\n\n\tif (strpos ($cfg['action'], '?')) $cfg['action'] .= '&'; else $cfg['action'] .= '?';\n\n\t// template\n\tif (empty ($cfg['template'])) $cfg['template'] = 'default';\n\tif ($cfg['template'] == 'default')\n\t{\n\t\tload_section ('adm', 'qadmin_ezf_section.tpl');\n\t\tload_section ('adm', 'qadmin_section.tpl');\n\t}\n\telse\n\t{\n\t\tload_section ('adm', $cfg['template'].'_ezf_section.tpl');\n\t\tload_section ('adm', $cfg['template'].'_section.tpl');\n\t}\n\n\t// buttons\n\t$cfg['tab_list'] = '';\n\tif (empty ($cfg['back']))\n\t\t$cfg['back'] = \"<a href=\\\"$cfg[action]\\\" style=\\\"background:#eee\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\"></span> <small>Back</small></a>\";\n\telse\n\t\t$cfg['back'] = \"<a href=\\\"$cfg[back]\\\" style=\\\"background:#eee\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\"></span> <small>Back</small></a>\";\n\n\tif ($cfg['cmd_new_enable'])\n\t\t$cfg['savenew_button'] = $tpl_section['qadmin_savenew_button'];\n\telse\n\t\t$cfg['savenew_button'] = '';\n\n\t// value (sql_select) for $def_val (default value)\n\tif (($cfg['cmd'] == 'update') && (!isset ($cfg['sql_select'])))\n\t\t$cfg['sql_select'] = \"SELECT * FROM $cfg[table] WHERE $cfg[primary_key]='$cfg[primary_val]' LIMIT 1\";\n\telseif ($cfg['cmd'] == 'new')\n\t{\n\t\t$def_val = create_blank_tbl ($cfg['table']);\n\t\t$cfg['sql_select'] = '';\n\t}\n\n\t// execute sql\n\tif (!empty ($cfg['sql_select']))\n\t{\n\t\t$res = sql_query ($cfg['sql_select']);\n\t\t$def_val = sql_fetch_array ($res);\n\t\tif (($cfg['cmd'] == 'update') && empty ($def_val)) admin_die ($lang['msg']['qadmin_item_not_found']);\n\t}\n\n\t// form already filled?\n\t$f = load_form ($cfg['table']);\n\tif (!empty ($f)) $def_val = $form_val = $f;\t// $def_val = we replace values from sql; but some field needs further processing (eg date/time), so we use $form_val\n\n\t// field\n\tforeach ($def as $key=>$val)\n\t{\n\t\t$val['value'] = empty ($val['value']) ? '' : $val['value'];\n\t\t$val['size'] = empty ($val['size']) ? 0 : $val['size'];\n\t\t$val['help'] = empty ($val['help']) ? '' : addslashes ($val['help']);\n\t\t$val['prefix'] = !empty ($val['prefix']) ? $val['prefix'] : '';\n\t\t$val['suffix'] = !empty ($val['suffix']) ? $val['suffix'] : '';\n\t\t$val['thisid'] = $cfg['table'].'-'.$val['field'];\n\n\t\tif ($val['value'] == 'sql') $val['value'] = !isset ($def_val[$val['field']]) ? '' : $def_val[$val['field']];\n\t\tif (empty ($val['help'])) $val['help'] = ''; else $val['help'] = quick_tpl ($tpl_section['qadmin_help'], $val);\n\t\tif (empty ($val['required']))\n\t\t{\n\t\t\t$val['required'] = '';\n\t\t\t$val['required_js'] = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$val['required'] = quick_tpl ($tpl_section['ezform_required'], 0);\n\t\t\t$val['required_js'] = quick_tpl ($tpl_section['ezform_required_js'], 0);\n\t\t}\n\n\t\tif (empty ($val['type'])) die (\"<b>Error!</b> $val[field] doesn\\'t have type!\");\n\t\tswitch ($val['type'])\n\t\t{\n\t\t\t// plain text\n\t\t\tcase 'echo':\n\t\t\t\tif (empty ($val['value'])) $val['value'] = '&nbsp;';\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_echo'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_echo'], $val);\n\t\t\tbreak;\n\n\n\t\t\t// link\n\t\t\tcase 'url':\n\t\t\t\tif (empty ($val['value'])) $val['value'] = '#';\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_url'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_url'], $val);\n\t\t\tbreak;\n\n\t\t\t// disabled\n\t\t\tcase 'disabled':\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_disabled'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_disabled'], $val);\n\t\t\tbreak;\n\n\t\t\t// hidden value\n\t\t\tcase 'hidden':\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = \"<tr><td colspan=\\\"2\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" style=\\\"margin:0;padding:0;border:none\\\"><input type=\\\"hidden\\\" name=\\\"$val[field]\\\" value=\\\"$val[value]\\\" /></td></tr>\";\n\t\t\t\t$ezf['ezf_'.$val['field']] = \"<input type=\\\"hidden\\\" name=\\\"$val[field]\\\" value=\\\"$val[value]\\\" />\";\n\t\t\tbreak;\n\n\t\t\t// static (a combination of echo & hidden)\n\t\t\tcase 'static':\n\t\t\t\tif (!empty ($val['option']))\n\t\t\t\t{\n\t\t\t\t\t$val['display_value'] = empty ($val['option'][$val['value']]) ? '-' : $val['option'][$val['value']];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$val['display_value'] = $val['value'];\n\t\t\t\t}\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_static'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_static'], $val);\n\t\t\tbreak;\n\n\t\t\t// email\n\t\t\tcase 'email':\n\t\t\t\t$ezd['ezd_'.$val['field']] = $val['maxlength'] = $val['size'];\n\t\t\t\t$val['size'] = $val['size'] > 50 ? 50 : $val['size'];\n\n\t\t\t\tif (!empty ($val['value']))\n\t\t\t\t{\n\t\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_email'], $val);\n\t\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_email'], $val);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_varchar'], $val);\n\t\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_varchar'], $val);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\t// divider\n\t\t\tcase 'divider':\n\t\t\tcase 'div':\n\t\t\t\t$tab_list[] = $val['title'];\n\t\t\t\t$val['tabindex'] = count ($tab_list) + 1;\n\t\t\t\t$tmp .= quick_tpl ($tpl_section['qadmin_divider'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_divider'], $val);\n\t\t\tbreak;\n\n\t\t\t// mask\n\t\t\tcase 'mask':\n\t\t\t\t$val['value'] = empty ($val['option'][$val['value']]) ? '-' : $val['option'][$val['value']];\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_echo'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_echo'], $val);\n\t\t\tbreak;\n\n\t\t\t// short text\n\t\t\tcase 'varchar':\n\t\t\tcase 'permalink':\n\t\t\tcase 'password':\n\t\t\t\t$val['maxlength'] = $val['size'];\n\t\t\t\t$val['size'] = $val['size'] > 50 ? 50 : $val['size'];\n\n\t\t\t\tif ($val['type'] == 'varchar')\n\t\t\t\t{\n\t\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_varchar'], $val);\n\t\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_varchar'], $val);\n\t\t\t\t}\n\t\t\t\telseif ($val['type'] == 'permalink')\n\t\t\t\t{\n\t\t\t\t\tif (empty ($val['value']))\n\t\t\t\t\t\t$val['permalink_path'] = empty ($cfg['permalink_folder']) ? $config['site_url'].'/' : $config['site_url'].'/'.$cfg['permalink_folder'].'/';\n\t\t\t\t\telse\n\t\t\t\t\t\t$val['permalink_path'] = $config['site_url'].'/';\n\n\t\t\t\t\tif (empty ($val['help']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$val['help'] = 'Create a search engine friendly URL. Leave empty to auto generate, or enter your own url.';\n\t\t\t\t\t\t$val['help'] = quick_tpl ($tpl_section['qadmin_help'], $val);\n\t\t\t\t\t}\n\t\t\t\t\t$val['size'] = $val['size'] > 32 ? 32 : $val['size'];\n\t\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_permalink'], $val);\n\t\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_permalink'], $val);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_password'], $val);\n\t\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_password'], $val);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\t// date\n\t\t\tcase 'date':\n\t\t\t\tif (empty ($val['value']))\n\t\t\t\t{\n\t\t\t\t\t$val['value'] = 'today';\n\t\t\t\t\t$y = date ('Y'); $m = date ('m') - 1; $d = date ('d');\n\t\t\t\t\t$val['js_value'] = \"$y,$m,$d\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$y = substr ($val['value'], 0, 4); $m = substr ($val['value'], 5, 2) - 1; $d = substr ($val['value'], -2);\n\t\t\t\t\t$val['js_value'] = \"$y,$m,$d\";\n\t\t\t\t}\n\n\t\t\t\t// user_val = user entered val in a form (some fields don't need more processing, but others ~like this one~ need more processing)\n\t\t\t\tif (!empty ($form_val[$key.'_dd']))\n\t\t\t\t{\n\t\t\t\t\t$val['value'] = $form_val[$key.'_yy'].'-'.$form_val[$key.'_mm'].'-'.$form_val[$key.'_dd'];\n\t\t\t\t\t$val['js_value'] = $form_val[$key.'_yy'].','.$form_val[$key.'_mm'].','.$form_val[$key.'_dd'];\n\t\t\t\t}\n\n\t\t\t\t$val['date_select'] = date_form ($val['field'], date('Y'), 1, 1, $val['value']);\n\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_date'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_date'], $val);\n\t\t\tbreak;\n\n\t\t\t// time\n\t\t\tcase 'time':\n\t\t\t\tif (empty ($val['value'])) $val['value'] = 'now';\n\t\t\t\tif (!empty ($form_val[$key.'_hou'])) $val['value'] = $form_val[$key.'_hou'].':'.$form_val[$key.'_min'];\n\t\t\t\t$val['time_select'] = time_form ($val['field'], $val['value']);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_time'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_time'], $val);\n\t\t\tbreak;\n\n\t\t\t// text - $row['size'] is in \"x,y\"\n\t\t\tcase 'text':\n\t\t\tcase 'textarea':\n\t\t\t\tif (empty ($val['size'])) $val['size'] = '500,200';\n\t\t\t\t$s = explode (',', $val['size']);\n\n\t\t\t\t$val['x'] = $s[0]; $val['y'] = $s[1];\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_text'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_text'], $val);\n\t\t\tbreak;\n\n\t\t\t// code - $row['size'] is in \"x,y\"\n\t\t\tcase 'code':\n\t\t\t\tif (empty ($val['lang'])) $val['lang'] = 'html';\n\t\t\t\t$s = explode (',', $val['size']);\n\t\t\t\tif (empty ($val['size']))\n\t\t\t\t\t$val['code_area'] = code_editor_area ($val['field'], $val['value'], $val['lang']);\n\t\t\t\telse\n\t\t\t\t\t$val['code_area'] = code_editor_area ($val['field'], $val['value'], $val['lang'], $s[0], $s[1]);\n\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_code'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_code'], $val);\n\t\t\tbreak;\n\n\t\t\t// rte - $row['size'] is in \"x,y\"\n\t\t\tcase 'wysiwyg':\n\t\t\t\t$s = explode (',', $val['size']);\n\t\t\t\tif (!empty ($form_val[$key])) $val['value'] = html_entity_decode ($val['value']);\n\t\t\t\tif (!empty ($val['wysiwyg_pagebreak'])) $pagebreak = TRUE; else $pagebreak = FALSE;\n\t\t\t\tif (empty ($val['size']))\n\t\t\t\t\t$val['rte_area'] = rte_area ($val['field'], $val['value'], 0, 0, $pagebreak);\n\t\t\t\telse\n\t\t\t\t\t$val['rte_area'] = rte_area ($val['field'], $val['value'], $s[0], $s[1], $pagebreak);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_wysiwyg'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_wysiwyg'], $val);\n\t\t\tbreak;\n\n\t\t\t// select\n\t\t\tcase 'select':\n\t\t\t\t$val['edit_opt'] = '';\n\t\t\t\tif (!empty ($val['editopt']))\n\t\t\t\t{\n\t\t\t\t\t$val['edit_opt'] = quick_tpl ($tpl_section['qadmin_edit_opt'], $val);\n\t\t\t\t\t$val['option'] = get_editable_option ($val['editopt']);\n\t\t\t\t}\n\t\t\t\tif (!empty ($val['required']))\n\t\t\t\t\t$val['data_select'] = create_select_form ($val['field'], $val['option'], $val['value'], '[ Please Select ]', 0, 'required=\"required\"');\n\t\t\t\telse\n\t\t\t\t\t$val['data_select'] = create_select_form ($val['field'], $val['option'], $val['value'], '[ Please Select ]');\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_select'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_select'], $val);\n\t\t\tbreak;\n\n\t\t\t// radio\n\t\t\tcase 'radio':\n\t\t\tcase 'radioh':\n\t\t\t\t$val['edit_opt'] = '';\n\t\t\t\tif (!empty ($val['editopt']))\n\t\t\t\t{\n\t\t\t\t\t$val['edit_opt'] = quick_tpl ($tpl_section['qadmin_edit_opt'], $val);\n\t\t\t\t\t$val['option'] = get_editable_option ($val['editopt']);\n\t\t\t\t}\n\n\t\t\t\tforeach ($val['option'] as $k => $v) $val['option'][$k] = str_replace ('\\n', '<br />', $v);\n\t\t\t\t$val['data_radio'] = create_radio_form ($val['field'], $val['option'], $val['value']);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_radioh'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_radioh'], $val);\n\t\t\tbreak;\n\n\t\t\t// radio\n\t\t\tcase 'radiov':\n\t\t\t\t$val['edit_opt'] = '';\n\t\t\t\tif (!empty ($val['editopt']))\n\t\t\t\t{\n\t\t\t\t\t$val['edit_opt'] = quick_tpl ($tpl_section['qadmin_edit_opt'], $val);\n\t\t\t\t\t$val['option'] = get_editable_option ($val['editopt']);\n\t\t\t\t}\n\n\t\t\t\tforeach ($val['option'] as $k => $v) $val['option'][$k] = str_replace ('\\n', '<br />', $v);\n\t\t\t\t$val['data_radio'] = create_radio_form ($val['field'], $val['option'], $val['value'], 'v');\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_radiov'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_radiov'], $val);\n\t\t\tbreak;\n\n\t\t\t// file\n\t\t\tcase 'file':\n\t\t\t\t$file = TRUE;\n\t\t\t\tif (!empty ($val['value']))\n\t\t\t\t{\n\t\t\t\t\t$val['view'] = $cfg['file_folder'].'/'.$val['value'];\n\t\t\t\t\t@$val['size'] = num_format (filesize ($val['view']));\n\t\t\t\t\t$val['remove'] = $cfg['action'].\"qadmin_cmd=remove_file&amp;field=$val[field]&amp;primary_val=$cfg[primary_val]\";\n\t\t\t\t\t$val['viewfile'] = quick_tpl ($tpl_section['qadmin_viewfile'], $val);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$val['viewfile'] = quick_tpl ($tpl_section['qadmin_upload'], $val);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_file'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_file'], $val);\n\t\t\tbreak;\n\n\t\t\t// image\n\t\t\tcase 'img':\n\t\t\tcase 'image':\n\t\t\t\t$file = TRUE;\n\t\t\t\tif (!empty ($val['value']))\n\t\t\t\t{\n\t\t\t\t\t$val['view'] = $cfg['img_folder'].'/'.$val['value'];\n\t\t\t\t\t@$val['size'] = num_format (filesize ($val['view']));\n\t\t\t\t\t$val['remove'] = $cfg['action'].\"qadmin_cmd=remove_file&amp;field=$val[field]&amp;primary_val=$cfg[primary_val]\";\n\t\t\t\t\t$val['viewimg'] = quick_tpl ($tpl_section['qadmin_viewimg'], $val);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$val['viewimg'] = quick_tpl ($tpl_section['qadmin_upload'], $val);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_img'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_img'], $val);\n\t\t\tbreak;\n\n\t\t\t// image series\n\t\t\tcase 'img_set':\n\t\t\tcase 'img_series':\n\t\t\t\t$file = TRUE;\n\t\t\t\t$ok = FALSE; $i = 0;\n\t\t\t\t$val['viewimg'] = '';\n\t\t\t\tif ($cfg['cmd'] == 'update')\n\t\t\t\twhile (!$ok)\n\t\t\t\t{\n\t\t\t\t \t$i++;\n\t\t\t\t\t$fn = $val['prefix'].'_'.$cfg['primary_val'].'_'.$i;\n\t\t\t\t\t$img_th = \"$cfg[thumb_folder]/$fn.jpg\";\n\t\t\t\t\t$img_src = \"$cfg[img_folder]/$fn.jpg\";\n\t\t\t\t\tif (file_exists ($img_src)) // if thumbs avail\n\t\t\t\t\t{\n\t\t\t\t\t\t$val['view'] = $img_src;\n\t\t\t\t\t\t@$val['size'] = num_format (filesize ($img_src));\n\t\t\t\t\t\t$val['remove'] = \"<a href=\\\"\".$cfg['action'].\"qadmin_cmd=remove_file&amp;field=$val[field]&amp;primary_val=$cfg[primary_val]&amp;idx=$i\\\"><span class=\\\"glyphicon glyphicon-remove\\\"></span> Delete</a>\";\n\t\t\t\t\t\t$val['viewimg'] .= \"<p><a href=\\\"$img_src\\\" class=\\\"lightbox\\\"><img src=\\\"$img_th\\\" alt=\\\"image\\\" /></a><br /><span class=\\\"glyphicon glyphicon-file\\\"></span> $val[size] bytes $val[remove]</p>\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$ok = TRUE;\n\t\t\t\t}\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_img_set'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_img'], $val);\n\t\t\tbreak;\n\n\t\t\t// image + thumb\n\t\t\tcase 'thumb':\n\t\t\t\t$file = TRUE;\n\t\t\t\tif (!empty ($val['value']))\n\t\t\t\t{\n\t\t\t\t\t$val['view'] = $cfg['img_folder'].'/'.$val['value'];\n\t\t\t\t\t$val['thumb'] = $cfg['thumb_folder'].'/'.$val['value'];\n\t\t\t\t\t$val['size'] = num_format (filesize ($val['view']));\n\t\t\t\t\t$val['remove'] = $cfg['action'].\"qadmin_cmd=remove_file&amp;field=$val[field]&amp;primary_val=$cfg[primary_val]\";\n\t\t\t\t\t$val['viewthumb'] = quick_tpl ($tpl_section['qadmin_viewthumb'], $val);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$val['viewthumb'] = quick_tpl ($tpl_section['qadmin_upload'], $val);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_thumb'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_thumb'], $val);\n\t\t\tbreak;\n\n\t\t\t// image resize\n\t\t\tcase 'img_resize':\n\t\t\tcase 'image_resize':\n\t\t\t\t$file = TRUE;\n\t\t\t\tif (!empty ($val['value']))\n\t\t\t\t{\n\t\t\t\t\t$val['view'] = $cfg['img_folder'].'/'.$val['value'];\n\t\t\t\t\t$val['size'] = num_format (filesize ($val['view']));\n\t\t\t\t\t$val['remove'] = $cfg['action'].\"qadmin_cmd=remove_file&amp;field=$val[field]&amp;primary_val=$cfg[primary_val]\";\n\t\t\t\t\t$val['viewimg'] = quick_tpl ($tpl_section['qadmin_viewimg'], $val);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$val['viewimg'] = quick_tpl ($tpl_section['qadmin_upload'], $val);;\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_img_resize'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_img_resize'], $val);\n\t\t\tbreak;\n\n\t\t\t// multi = stored as: <opt>\\r\\n<opt>\\r\\n<opt>\n\t\t\t// multi, = stored as: ,opt,opt,opt,\t(make searching easier with LIKE %,opt,%)\n\t\t\t// multicsv = stored as: opt,opt,opt\n\t\t\tcase 'multi':\n\t\t\tcase 'multi,':\n\t\t\tcase 'multicsv':\n\t\t\t\t$val['edit_opt'] = '';\n\t\t\t\tif (!empty ($val['editopt']))\n\t\t\t\t{\n\t\t\t\t\t$val['edit_opt'] = quick_tpl ($tpl_section['qadmin_edit_opt'], $val);\n\t\t\t\t\t$val['option'] = get_editable_option ($val['editopt']);\n\t\t\t\t}\n\n\t\t\t\tif (empty ($val['size'])) $val['size'] = 3;\n\n\t\t\t\tif ($val['type'] == 'multi')\n\t\t\t\t\t$val['value'] = explode (\"\\r\\n\", $val['value']);\n\t\t\t\telseif ($val['type'] == 'multi,')\n\t\t\t\t\t$val['value'] = explode (',', substr ($val['value'], 1, -1));\n\t\t\t\telse\n\t\t\t\t\t$val['value'] = explode (',', $val['value']);\n\n\t\t\t\t$fuu = array ();\n\t\t\t\tif (!empty ($form_val))\n\t\t\t\t\tforeach ($form_val as $fk => $fv)\n\t\t\t\t\t\tif (strpos ('*'.$fk, $key) == 1) $fuu[] = $fv;\t// to make things easier, find '*[field_name]' in form_val, not '[field_name]' :-)\n\t\t\t\tif (!empty ($fuu)) $val['value'] = $fuu;\n\t\t\t\tforeach ($val['option'] as $k => $v) $val['option'][$k] = str_replace ('\\n', '<br />', $v);\n\n\t\t\t\t$val['data_multi'] = create_checkbox_form ($val['field'], $val['option'], $val['value'], $val['size'], 'qadmin_form');\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_multi'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_multi'], $val);\n\t\t\tbreak;\n\n\t\t\t//\n\t\t\tcase 'rating':\n\t\t\t\tglobal $rating_def;\n\t\t\t\t$val['edit_opt'] = '';\n\t\t\t\t$val['data_select'] = create_select_form ($val['field'], $rating_def, $val['value']);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_select'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_select'], $val);\n\t\t\tbreak;\n\n\t\t\t//\n\t\t\tcase 'checkbox':\n\t\t\t\t$val['checkbox'] = create_tickbox_form ($val['field'], $val['option'], $val['value']);\n\t\t\t\t$tmp .= $ezd['ezd_'.$val['field']] = quick_tpl ($tpl_section['qadmin_checkbox'], $val);\n\t\t\t\t$ezf['ezf_'.$val['field']] = quick_tpl ($tpl_section['ezform_checkbox'], $val);\n\t\t\tbreak;\n\n\t\t\t// what?\n\t\t\tdefault:\n\t\t\t\tdie (\"<b>Error!</b> $val[field] has unrecognized type of $val[type]!\");\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// tabs\n\t$i = 1;\n\tforeach ($tab_list as $k => $v)\n\t{\n\t\t$i++;\n\t\t$tb = array ('i' => $i, 'title' => $v);\n\t\t$cfg['tab_list'] .= quick_tpl ($tpl_section['qadmin_tab_list_li'], $tb);\n\t}\n\n\t// show captchai\n\tif (!empty ($cfg['captcha']))\n\t{\n\t\tqvc_init ();\n\t\t$ezd['ezd_captcha'] = $tmp .= quick_tpl ($tpl_section['qadmin_captcha'], $val);\n\t\t$ezf['ezf_captcha'] = quick_tpl ($tpl_section['ezform_captcha'], $val);\n\t}\n\n\t// show remove item (on UPDATE mode)\n\tif (($cfg['cmd'] == 'update') && ($cfg['cmd_remove_enable']))\n\t{\n\t\t$ezd['ezd_remove'] = $tmp .= quick_tpl ($tpl_section['qadmin_remove'], $cfg);\n\t\t$ezf['ezf_remove'] = quick_tpl ($tpl_section['ezform_remove'], $cfg);\n\t}\n\n\t// last update\n\tif ($cfg['cmd'] == 'new')\n\t\t$cfg['last_update'] = '';\n\telseif ($cfg['cmd'] == 'update')\n\t{\n\t\tif ($cfg['enable_log'])\n\t\t{\n\t\t\t$fn = basename ($_SERVER['SCRIPT_NAME']);\n\t\t\t$tlog = sql_qquery (\"SELECT COUNT(*) AS count FROM \".$db_prefix.\"qadmin_log WHERE log_file='$fn' AND log_pid='$cfg[primary_val]' LIMIT 1\");\n\t\t\t$rlog = sql_qquery (\"SELECT log_date, log_user FROM \".$db_prefix.\"qadmin_log WHERE log_file='$fn' AND log_pid='$cfg[primary_val]' ORDER BY log_id DESC LIMIT 1\");\n\t\t\t$last_update = date ('Y-m-d H:i:s', $rlog['log_date']);\n\t\t\t$cfg['last_update'] = \"<p class=\\\"small\\\">This entry has been updated $tlog[count]&times;, last updated at $last_update by $rlog[log_user] <a href=\\\"qadmin_log.php?w=pid&amp;h=$fn&amp;pid=$cfg[primary_val]\\\" class=\\\"btn btn-default btn-xs\\\"><span class=\\\"glyphicon glyphicon-zoom-in\\\"></span> See details or restore changes</a></p>\";\n\t\t}\n\t\telse\n\t\t\t$cfg['last_update'] = '(Log has been disabled)';\n\t}\n\n\n\t// table header & footer\n\tif ($file) $cfg['enctype'] = 'multipart/form-data'; else $cfg['enctype'] = 'application/x-www-form-urlencoded';\n\t$row['title'] = $cfg['title'];\n\t$head = quick_tpl ($tpl_section['qadmin_head'], $cfg);\n\t$head_inner = quick_tpl ($tpl_section['qadmin_head_inner'], $cfg);\n\t$foot_inner = quick_tpl ($tpl_section['qadmin_foot_inner'], $cfg);\n\t$foot = quick_tpl ($tpl_section['qadmin_foot'], $cfg);\n\t$ezf['ezf_head'] = quick_tpl ($tpl_section['ezform_head'], $cfg);\n\t$ezf['ezf_foot'] = quick_tpl ($tpl_section['ezform_foot'], $cfg);\n\n\t// additional header & footer\n\tif (!empty ($cfg['header'])) $head = $cfg['header'].$head;\n\tif (!empty ($cfg['footer'])) $foot = $foot.$cfg['footer'];\n\n\tif (!empty ($cfg['ezf_mode']))\n\t\treturn $ezf;\n\telseif (!empty ($cfg['ezd_mode']))\n\t\treturn $head.quick_tpl ($cfg['ezd_template'], $ezd).$foot;\n\telse\n\t\treturn $head.$head_inner.$tmp.$foot_inner.$foot;\n}", "title": "" }, { "docid": "fd68e7b0840025c7c25f5f7628efe155", "score": "0.5208722", "text": "public static function createExecFile()\n\t{\n\t\tself::$content= '<?php\n\t$_REQ= Array();\n\t$_REQ[\"env\"]= \"shell\";\n\tdefine(\"_MINDSRC_\", \"'.getcwd().'\");\n \n \n if(sizeOf($_SERVER[\"argv\"])>0 && isset($_SERVER[\"argv\"][1])){\n require(\"'.getcwd().'/mind\");\n }else{\n require(\"'.getcwd().'/mind3rd/API/utils/utils.php\");\n }\n';\n\n\t\techo \" starting the installation...\\n\";\n\t\techo \" creating the file...\\n\";\n\t\tshell_exec(\"sudo touch /bin/mind\");\n\t\techo \" writing the header...\\n\";\n\t\tshell_exec(\"sudo echo '\".self::$header.\"' > \".\n\t\t\t\t \"/bin/mind\");\n\t\techo \" writing the main commands...\\n\";\n\t\techo shell_exec(\"sudo echo '\".self::$content.\"' >>\".\n\t\t\t\t\t\t\"/bin/mind;\");\n\t\techo \" setting permissions...\\n\";\n\t\techo shell_exec(\"sudo chmod +x /bin/mind\");\n return true;\n\t}", "title": "" }, { "docid": "d3ccad108ee6cfc62ab73cac19500551", "score": "0.51361066", "text": "private function loadConfigFile()\n {\n require $this->asEnginePath . \"/ASConfig.php\";\n }", "title": "" }, { "docid": "07078c81f01a5ecca2831f03f9b22378", "score": "0.5095193", "text": "public static function makeUploadArray($extPath, $extKey, array $conf) {\n\t\t// Get files for extension:\n\t\t$fileArr = array();\n\t\t$fileArr = self::getAllFilesAndFoldersInPath($fileArr, $extPath, '', 0, 99, '(CVS|\\..*|.*~|.*\\.bak)');\n\n\t\t// Calculate the total size of those files:\n\t\t$totalSize = 0;\n\t\tforeach ($fileArr as $file) {\n\t\t\t$totalSize += filesize($file);\n\t\t}\n\n\t\t// Initialize output array:\n\t\t$uploadArray = array();\n\t\t$uploadArray['extKey'] = $extKey;\n\t\t$uploadArray['EM_CONF'] = $conf['EM_CONF'];\n\t\t$uploadArray['misc']['codelines'] = 0;\n\t\t$uploadArray['misc']['codebytes'] = 0;\n\n\t\t//$uploadArray['techInfo'] = $this->install->makeDetailedExtensionAnalysis($extKey, $conf, 1);\n\n\t\t// Read all files:\n\t\tforeach ($fileArr as $file) {\n\t\t\t$relFileName = substr($file, strlen($extPath));\n\t\t\t$fI = pathinfo($relFileName);\n\t\t\tif ($relFileName != 'ext_emconf.php') { // This file should be dynamically written...\n\t\t\t\t$uploadArray['FILES'][$relFileName] = array(\n\t\t\t\t\t'name' => $relFileName,\n\t\t\t\t\t'size' => filesize($file),\n\t\t\t\t\t'mtime' => filemtime($file),\n\t\t\t\t\t'is_executable' => is_executable($file),\n\t\t\t\t\t'content' => file_get_contents($file)\n\t\t\t\t);\n\t\t\t\tif (self::inList('php,inc', strtolower(@$fI['extension']))) {\n\t\t\t\t\t$uploadArray['FILES'][$relFileName]['codelines'] = count(explode(LF, $uploadArray['FILES'][$relFileName]['content']));\n\t\t\t\t\t$uploadArray['misc']['codelines'] += $uploadArray['FILES'][$relFileName]['codelines'];\n\t\t\t\t\t$uploadArray['misc']['codebytes'] += $uploadArray['FILES'][$relFileName]['size'];\n\t\t\t\t}\n\t\t\t\t$uploadArray['FILES'][$relFileName]['content_md5'] = md5($uploadArray['FILES'][$relFileName]['content']);\n\t\t\t}\n\t\t}\n\n\t\t// Return upload-array:\n\t\treturn $uploadArray;\n\t}", "title": "" }, { "docid": "67874fd5db662d439ad68614153f81db", "score": "0.50882715", "text": "protected function _compile_config()\n {\n $output = \"\\n\\n\"\n .'<div id=\"kali_profiler_config\" style=\"border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee;\">'\n .\"\\n\"\n .'<legend style=\"color:#000;\">&nbsp;&nbsp;CONFIG VARIABLES&nbsp;&nbsp;(<span style=\"cursor: pointer;\" class=\"kali_profiler_toggle\">Show'.\"</span>)</legend>\\n\\n\\n\"\n .'<table style=\"width:100%;display:none;\" id=\"kali_profiler_config_table\">'.\"\\n\";\n\n //foreach (config::$call_configs as $config => $val)\n //{\n //if (is_array($val) OR is_object($val))\n //{\n //$val = print_r($val, TRUE);\n //}\n\n //$output .= '<tr><td style=\"padding:5px;vertical-align:top;color:#900;background-color:#ddd;\">'\n //.$config.'&nbsp;&nbsp;</td><td style=\"padding:5px;color:#000;background-color:#ddd;\">'.htmlspecialchars($val, ENT_QUOTES, 'utf-8').\"</td></tr>\\n\";\n //}\n\n return $output.\"</table>\\n</div>\";\n }", "title": "" }, { "docid": "d2d1f77a622d365cf4397b09fcd1d49a", "score": "0.5081365", "text": "protected function executeProtocolSpecificConfigurationFile() {\n $conffile = ABSPATH_CONFIG.\"config-\".$this->protocol.\".php\" ;\n if (isReadableFile($conffile)) {\n require_once($conffile) ;\n } else {\n // execute the config.php file of the extension if it exist.\n $conffile = ABSPATH_EXTENSIONS_REPOSITORIES.$this->protocol.\"/config-\".$this->protocol.\".php\" ;\n if (isReadableFile($conffile)) {\n require_once($conffile) ;\n } else {\n unset($conffile) ;\n }\n }\n if (isset($conffile)) {\n $this->logger->log('protocol specific configuration file '.$conffile.' has been executed') ;\n }\n }", "title": "" }, { "docid": "7b7b09429704bf7c34c1416dc2bd1db7", "score": "0.5078485", "text": "protected function loadExternalPhp($includeNode,$configPath)\n\t{\n\t\tforeach($includeNode as $include)\n\t\t{\n\t\t\t$when = isset($include['when'])?true:false;\n\t\t\tif(!isset($include['file']))\n\t\t\t\tthrow new TConfigurationException('appconfig_includefile_required');\n\t\t\t$filePath = $include['file'];\n\t\t\tif(isset($this->_includes[$filePath]))\n\t\t\t\t$this->_includes[$filePath]='('.$this->_includes[$filePath].') || ('.$when.')';\n\t\t\telse\n\t\t\t\t$$this->_includes[$filePath]=$when;\n\t\t\t$this->_empty=false;\n\t\t}\n\t}", "title": "" }, { "docid": "81675fbe4e86aba270c9380b283cf266", "score": "0.5059629", "text": "function update_config_php($dbhost, $dbusername, $dbpassword, $dbname, $dbprefix, $dbtype, $dbtabletype)\n{\n global $reg_src, $reg_rep;\n add_src_rep('dbhost', $dbhost);\n add_src_rep('dbuname', base64_encode($dbusername));\n add_src_rep('dbpass', base64_encode($dbpassword));\n add_src_rep('dbname', $dbname);\n add_src_rep('prefix', $dbprefix);\n add_src_rep('dbtype', $dbtype);\n add_src_rep('dbtabletype', $dbtabletype);\n add_src_rep(\"encoded\", '1');\n return modify_file($reg_src, $reg_rep);\n}", "title": "" }, { "docid": "98ad346ab4a59d7dddcbaecd6b52cd72", "score": "0.5045908", "text": "private static function _createConfig()\n {\n $configText .= '<?php' . \"\\r\\n\";\n $configText .= '$mtConfig[version] = \\'20141028\\';' . \"\\r\\n\";\n $configText .= \"\\r\\n\";\n $configText .= '// Must be filled:' . \"\\r\\n\";\n $configText .= '$mtConfig[lastfmKey] = \\'\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[gracenoteClientId] = \\'\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[gracenoteUserId] = \\'\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[gracenoteHost] = \\'https://208.72.242.176/webapi/xml/1.0/\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[curlProxy] = \\'\\';' . \"\\r\\n\";\n $configText .= \"\\r\\n\";\n $configText .= '$mtConfig[downloadPath] = \\'E:\\Music\\_musicTug-test-1\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[tmpPath] = \\'.\\_tmp\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[playlistsPath] = \\'.\\_playlists\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[shell] = \\'cmd\\'; // {\\'cmd\\'|\\'powershell\\'|\\'unixshell\\'}' . \"\\r\\n\";\n $configText .= '$mtConfig[powershellPath] = \\'%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\';' . \"\\r\\n\";\n $configText .= \"\\r\\n\";\n $configText .= \"// Tags, Lyrics, Artwork\\r\\n\";\n $configText .= '$mtConfig[embedArtwork] = true;' . \"\\r\\n\";\n $configText .= '$mtConfig[storeArtwork] = true;' . \"\\r\\n\";\n $configText .= '$mtConfig[parseLyrics] = true;' . \"\\r\\n\";\n $configText .= '$mtConfig[embedLyrics] = true;' . \"\\r\\n\";\n $configText .= '$mtConfig[storeLyrics] = true;' . \"\\r\\n\";\n $configText .= '$mtConfig[parseTags] = true;' . \"\\r\\n\";\n $configText .= '$mtConfig[embedTags] = true;' . \"\\r\\n\";\n $configText .= \"\\r\\n\";\n $configText .= \"// Extantions, similar limit\\r\\n\";\n $configText .= '$mtConfig[trackExt] = \\'m4a\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[artworkExt] = \\'jpg\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[similarMin] = 60;' . \"\\r\\n\";\n $configText .= \"\\r\\n\";\n $configText .= \"// Playlists\\r\\n\";\n $configText .= '$mtConfig[genrePlsStore] = 3; // 0..3, 0 - to disable' . \"\\r\\n\";\n $configText .= '$mtConfig[moodPlsStore] = 3;' . \"\\r\\n\";\n $configText .= '$mtConfig[tempoPlsStore] = 3;' . \"\\r\\n\";\n $configText .= '$mtConfig[genrePlsPrefix] = \\'[G] \\';' . \"\\r\\n\";\n $configText .= '$mtConfig[moodPlsPrefix] = \\'[M] \\';' . \"\\r\\n\";\n $configText .= '$mtConfig[tempoPlsPrefix] = \\'[T] \\';' . \"\\r\\n\";\n $configText .= '$mtConfig[plsDir_L1] = \\'\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[plsDir_L2] = \\'_pls-level-2\\';' . \"\\r\\n\";\n $configText .= '$mtConfig[plsDir_L3] = \\'_pls-level-3\\';' . \"\\r\\n\";\n\n $configText .= \"\\r\\n\";\n $configText .= \"// \\r\\n\";\n $configText .= '$mtConfig[logLevel] = array('\n . '\\'init\\',\\'info\\',\\'stream\\',\\'file\\',\\'shell\\',\\'warning\\',\\'error\\',\\'playlist\\''\n . ');' . \"\\r\\n\";\n $configText .= '$mtConfig[logPath] = \\'.\\_log\\';' . \"\\r\\n\";\n\n file_put_contents(MT_CONFIG_FILE, $configText);\n }", "title": "" }, { "docid": "6b6e87ea7967c3964b67aacbbba7ae71", "score": "0.5042319", "text": "private function requireAdditionalEngineFiles()\n\t{\n\t\trequire_once BACKEND_MODULE_PATH . '/engine/helper.php';\n\t}", "title": "" }, { "docid": "a6c7a476901305d8adf13e373df4765b", "score": "0.50224906", "text": "public function importExtension($extensionKey) {\n\t\t$extensionDirectory = PATH_typo3conf . 'ext/' . $extensionKey . '/';\n\n\t\t$extension = file_get_contents(t3lib_extMgm::extPath('yamltv', $this->sourceDirectory . '/' . $extensionKey . '.t3x'));\n\t\t$extensionArray = $this->terConnection->decodeExchangeData($extension);\n\n\t\t$EM_CONF = $this->extensionManager->fixEMCONF($extensionArray[0]['EM_CONF']);\n\n\t\t// Create the directories needed for the extension\n\t\tt3lib_div::mkdir($extensionDirectory);\n\t\t$directoriesInExtension = $this->extensionManager->extractDirsFromFileList(array_keys($extensionArray[0]['FILES']));\n\t\tforeach($directoriesInExtension as $directory) {\n\t\t\tt3lib_div::mkdir_deep($extensionDirectory, $directory);\n\t\t}\n\n\t\t// Now write all the files from the extension\n\t\tforeach($extensionArray[0]['FILES'] as $theFile => $fileData) {\n\t\t\tt3lib_div::writeFile($extensionDirectory . $theFile, $fileData['content']);\n\t\t\tif (!@is_file($extensionDirectory . $theFile)) {\n\t\t\t\t// Error handling\n\t\t\t} elseif (md5(t3lib_div::getUrl($extensionDirectory . $theFile)) != $fileData['content_md5']) {\n\t\t\t\t// Error handling\n\t\t\t}\n\t\t}\n\n\t\t// Create EMCONF file\n\t\t$extensionMD5Array = $this->extensionManager->serverExtensionMD5Array($extensionKey, array('type' => 'L', 'EM_CONF' => array(), 'files' => array()));\n\t\t$EM_CONF['_md5_values_when_last_written'] = serialize($extensionMD5Array);\n\t\t$emConfFile = $this->extensionManager->construct_ext_emconf_file($extensionKey, $EM_CONF);\n\t\tt3lib_div::writeFile($extensionDirectory . 'ext_emconf.php', $emConfFile);\n\t}", "title": "" }, { "docid": "89766c6139cc58f60cbfc270789b9f5b", "score": "0.49714732", "text": "function configm4($extName, $withName)\n {\n static $first = true;\n\n $extUpname = strtoupper($extName);\n $withUpname = str_replace(\"-\", \"_\", strtoupper($withName));\n\n if (!$this->platform->test(\"unix\")) {\n return \"\";\n }\n\n $ret = \"\";\n\n if ($first) {\n $ret.= \" PHP_SUBST({$extUpname}_SHARED_LIBADD)\\n\\n\";\n $first = false;\n }\n\n if ($this->function) {\n $ret.= \"\n PHP_CHECK_LIBRARY({$this->name}, {$this->function},\n [\n PHP_ADD_LIBRARY_WITH_PATH({$this->name}, \\$PHP_{$withUpname}_DIR/{$this->path}, {$extUpname}_SHARED_LIBADD)\n ],[\n AC_MSG_ERROR([wrong {$this->name} lib version or lib not found])\n ],[\n -L\\$PHP_{$withUpname}_DIR/{$this->path}\n ])\n\";\n } else {\n $ret.= \" PHP_ADD_LIBRARY_WITH_PATH({$this->name}, \\$PHP_{$withUpname}_DIR/{$this->path}, {$extUpname}_SHARED_LIBADD)\\n\";\n\n }\n\n return $ret;\n }", "title": "" }, { "docid": "b32b473af490a79196a181ea382ad086", "score": "0.4951815", "text": "function main($content, $conf) {\r\n\t\t$this->conf = $conf;\r\n\t\t$this->pi_setPiVarDefaults();\r\n\t\t$this->pi_loadLL();\r\n\t\t\r\n\t\t\r\n\t\t$this->pi_initPIflexform(); // get the flexform data of the plugin\r\n\t\t$this->init(); //parse the flexform data and put it in $this->lConf array\r\n\t\t$this->pi_USER_INT_obj=1; //enable caching\r\n\t\t\r\n\t\t//HTML output\r\n\t\tglobal $htmlCode; \r\n\t\t$htmlCode= array();\r\n\t\t\r\n\t\t\r\n\t\t$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);\r\n\t\t\r\n\t\t//intercept and output XML playlist if the given page type matches\r\n\t\tif($GLOBALS['TSFE']->type == $extConf['typeNum']){\r\n\t\t\t//print_r($_REQUEST);\r\n\t\t\treturn $this->writeXML();\r\n\t\t}\r\n\t\t\r\n\t\t//current language displayed in the frontend\r\n\t\t$current_sys_language_uid = $GLOBALS['TSFE']->sys_language_uid;\r\n\t\t\r\n\t\t// $extConf['default_sys_language_uid'] = sys_language_uid for the default language\r\n\t\t\r\n\t\t// records for the default language are stored in the database with sys_language_uid == 0\r\n\t\t// thus we have to correct the current_sys_language_uid value to 0 if it matches the language currently displayed\r\n\t\tif($GLOBALS['TSFE']->sys_language_uid == $extConf['default_sys_language_uid']) $current_sys_language_uid = 0;\r\n\t\t\t\t\r\n\t\t\r\n\t\t// PLUGIN INTERNAL SETTINGS\r\n\t\t// Forging this player unique identifier.\r\n\t\t$pluginName = $this->prefixId;\r\n\t\t$contentUID = $this->cObj->data['uid'];\t\r\n\t\t$currentPageUID = $GLOBALS['TSFE']->id;\r\n\t\t$contentID = $this->prefixId.'_'.$contentUID;\r\n\t\t\r\n\t\t//ISO2 code for extension current language (eg: fr, us, es...)\r\n\t\t$langKey = $GLOBALS['TSFE']->tmpl->setup['config.']['language'];\r\n\t\t\r\n\t\t$stylesheetPath = trim($this->conf['cssFile']);\r\n\t\t\r\n\t\t//Define the flash file to be used\r\n\t\t$resPath = t3lib_extMgm::siteRelPath($this->extKey).\"res/\";\r\n\t\t\t\t\t\r\n\t\t//relative path to the images related to the website root directory\r\n\t\t$imgSiteRelPath = t3lib_extMgm::siteRelPath($this->extKey).\"res/img/\";\r\n\t\t\r\n\t\t//Javascripts & stylesheets\r\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = '<link rel=\"stylesheet\" href=\"'.$stylesheetPath.'\" type=\"text/css\" media=\"screen\" /><script src=\"'.$resPath.'swfobject.js\"></script>';\r\n\t\t\r\n\t\t//URL parameters \r\n\t\t$action = \t\t\t($this->piVars['action']) ? \t$this->piVars['action']:'default';\r\n\t\t$record_uid = \t\t($this->piVars['uid']) ? \t\tintval($this->piVars['uid']):'';\r\n\t\t\r\n\t\t\r\n\t\t//add error message to this variable for error display\r\n\t\t$errorMessage=\"\";\r\n\t\t//Add text to this variable for debug output\r\n\t\t$debug=\"\";\r\n\t\t//stores the flash HTML\r\n\t\t$flashCode = array();\r\n\t\t\r\n\t\t$comma = array(\",\");\r\n\t\t\r\n\t\t\r\n\t\t//Managing player settings between Typoscript and Plugin flexfoms settings\r\n\t\t\r\n\t\t$this->TSSettingsOverridePluginSettings = intval($this->conf['TSSettingsOverridePluginSettings']);\r\n\t\t\r\n\t\t$flash_version_req \t= $this->getSetting($this->conf['flash_version_req'], $this->lConf['flash_version_req'], \"9.0115.0\");\r\n\t\t$width \t\t\t\t= $this->getSetting($this->conf['width'], $this->lConf['width'], \"320\");\r\n\t\t$height\t\t\t \t= $this->getSetting($this->conf['height'], $this->lConf['height'], \"240\");\r\n\t\t$playertype \t\t= $this->getSetting($this->conf['JWPlayer.']['playertype'], $this->lConf['jw_playertype'], \"regular\");\r\n\t\t$show_meta\t \t\t= $this->getSetting($this->conf['JWPlayer.']['show_meta'], $this->lConf['jw_show_meta'], \"true\");\r\n\t\t$controlbar \t\t= $this->getSetting($this->conf['JWPlayer.']['controlbar'], $this->lConf['jw_controlbar'], \"bottom\");\r\n\t\t$backcolor \t\t\t= $this->getSetting($this->conf['JWPlayer.']['backcolor'], $this->lConf['jw_backcolor'], \"\");\r\n\t\t$frontcolor \t\t= $this->getSetting($this->conf['JWPlayer.']['frontcolor'], $this->lConf['jw_frontcolor'], \"\");\r\n\t\t$lightcolor \t\t= $this->getSetting($this->conf['JWPlayer.']['lightcolor'], $this->lConf['jw_lightcolor'], \"\");\r\n\t\t$screencolor \t\t= $this->getSetting($this->conf['JWPlayer.']['screencolor'], $this->lConf['jw_screencolor'], \"\");\r\n\t\t$smoothing \t\t\t= $this->getSetting($this->conf['JWPlayer.']['smoothing'], $this->lConf['jw_smoothing'], \"true\");\r\n\t\t$stretching \t\t= $this->getSetting($this->conf['JWPlayer.']['stretching'], $this->lConf['jw_stretching'], \"uniform\");\r\n\t\t$icons \t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['icons'], $this->lConf['jw_icons'], \"true\");\r\n\t\t$logo \t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['logo'], $this->lConf['jw_logo'], \"\");\r\n\t\t$playlist\t\t\t= $this->getSetting($this->conf['JWPlayer.']['playlist'], $this->lConf['jw_playlist'], \"none\");\r\n\t\t$playlistsize\t\t= $this->getSetting($this->conf['JWPlayer.']['playlistsize'], $this->lConf['jw_playlistsize'], \"180\");\r\n\t\t$skin\t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['skin'], $this->lConf['jw_skin'], \"\");\r\n\t\t$autostart\t\t\t= $this->getSetting($this->conf['JWPlayer.']['autostart'], $this->lConf['jw_autostart'], \"false\");\r\n\t\t$bandwidth\t\t\t= $this->getSetting($this->conf['JWPlayer.']['bandwidth'], $this->lConf['jw_bandwidth'], \"5000\");\r\n\t\t$bufferlength\t\t= $this->getSetting($this->conf['JWPlayer.']['bufferlength'], $this->lConf['jw_bufferlength'], \"1\");\r\n\t\t$displayclick\t\t= $this->getSetting($this->conf['JWPlayer.']['displayclick'], $this->lConf['jw_displayclick'], \"play\");\r\n\t\t$dock\t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['dock'], $this->lConf['jw_dock'], \"false\");\r\n\t\t$item\t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['item'], $this->lConf['jw_item'], \"0\");\r\n\t\t$linktarget\t\t\t= $this->getSetting($this->conf['JWPlayer.']['linktarget'], $this->lConf['jw_linktarget'], \"_blank\");\r\n\t\t$mute\t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['mute'], $this->lConf['jw_mute'], \"false\");\r\n\t\t$repeat\t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['repeat'], $this->lConf['jw_repeat'], \"none\");\r\n\t\t$shuffle\t\t\t= $this->getSetting($this->conf['JWPlayer.']['shuffle'], $this->lConf['jw_shuffle'], \"false\");\r\n\t\t$volume\t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['volume'], $this->lConf['jw_volume'], \"90\");\r\n\t\t$plugins\t\t\t= $this->getSetting($this->conf['JWPlayer.']['plugins'], $this->lConf['jw_plugins'], \"\");\r\n\t\t$flashvars\t\t\t= $this->getSetting($this->conf['JWPlayer.']['flashvars'], $this->lConf['jw_flashvars'], \"\");\r\n\t\t$debug\t\t\t\t= $this->getSetting($this->conf['JWPlayer.']['debug'], $this->lConf['jw_debug'], \"\");\r\n\t\t\r\n\t\t\r\n\t\t//a little bit of data pre-processing\r\n\t\t\r\n\t\tif($logo != \"\") $logo = '/uploads/tx_paemedialibrary/'.$logo;\r\n\t\t\r\n\t\t$playerFile = ($playertype == \"regular\")?\"player.swf\":\"player-viral.swf\";\r\n\t\t$playerPath = $resPath.\"JWPlayer_4.6/\".$playerFile;\r\n\t\t\r\n\t\t//strip line feeds from flashvars so they don't get doubled\r\n\t\t$flashvars = str_replace($this->stripCR, '', $flashvars);\r\n\t\t//now make sure we have proper line feeds because there won't be any in TS values.\r\n\t\t$flashvars = str_replace($comma, ','.chr(10), $flashvars);\r\n\t\t\r\n\t\t\r\n\t\t$media;\r\n\t\t\r\n\t\tif($this->lConf['displayMode'] == \"single\"){\r\n\t\t\tif($this->lConf['selectedFile'] != \"\"){\r\n\t\t\t\t//retreiving dam media record\r\n\t\t\t\t$queryParts = array(\r\n\t\t\t\t\t'SELECT' => \"*\",\r\n\t\t\t\t\t'FROM' => \"tx_dam\",\r\n\t\t\t\t\t'WHERE' => \"uid=\".$this->lConf['selectedFile'].$this->cObj->enableFields('tx_dam'),\r\n\t\t\t\t);\r\n\t\t\t\t//echo \"SELECT \".$queryParts['SELECT'].\" FROM \".$queryParts['FROM'].\" WHERE \".$queryParts['WHERE'].\" ;<br />\";\r\n\t\t\t\t\r\n\t\t\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\r\n\t\t\t\t\t$queryParts['SELECT'],\r\n\t\t\t\t\t$queryParts['FROM'],\r\n\t\t\t\t\t$queryParts['WHERE']\r\n\t\t\t\t) or die(\"ERROR: tx_paemedialibrary->main(req1): \" .$GLOBALS['TYPO3_DB']->sql_error());\r\n\t\t\t\t\r\n\t\t\t\t$media = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\r\n\t\t\t\t\r\n\t\t\t\tif($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0){\r\n\t\t\t\t\tif($media['tx_paemedialibrary_file_use_advanced_location'] == 1)\r\n\t\t\t\t\t\t$media_src=$this->getMediaSrc($media['tx_paemedialibrary_file_advanced_location'], true);\r\n\t\t\t\t\telse $media_src='/'.$media['file_path'].$media['file_name'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t//$htmlCode[] = $media_src;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$errorMessage .= $this->pi_getLL('media_offline');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$errorMessage .= $this->pi_getLL('no_single_media');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if($this->lConf['displayMode'] == \"category\"){\r\n\t\t\t\r\n\t\t\t//extracting the &L parameter from piVars\r\n\t\t\tparse_str($GLOBALS['TSFE']->linkVars);\r\n\t\t\t//now the variable named $L has been initialized by parse_str\r\n\t\t\t$this->L = $L;\r\n\t\t\t\t\r\n\t\t\t//generate regular URL\r\n\t\t\t$format = 'RSS';\r\n\t\t\t$subFormat = 'itunes';\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tif($extConf['realurlintegration']){\r\n\t\t\t\t//generate url rewrited URL\r\n\t\t\t\t$conf = array(\r\n\t\t\t\t 'parameter' => $currentPageUID.','.$extConf['typeNum'], // Link to current page + page type\r\n\t\t\t\t // Set additional parameters \r\n\t\t\t\t 'additionalParams' => '&'.$this->prefixId.'[format]'.'='.$format.'&'.$this->prefixId.'[subFormat]'.'='.$subFormat.'&'.$this->prefixId.'[categories]'.'='.$this->lConf['selectedCategories'].'&'.$this->prefixId.'[sorting_criteria]'.'='.$this->lConf['sorting_criteria'].'&'.$this->prefixId.'[sorting_direction]'.'='.$this->lConf['sorting_direction'], \r\n\t\t\t\t 'useCacheHash' => $this->pi_checkCHash, // We must add cHash because we use parameters\r\n\t\t\t\t 'returnLast' => 'url', // We want link only\r\n\t\t\t\t);\r\n\t\t\t\t$media_src = urlencode($this->cObj->typoLink('',$conf));\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//generate regular URL\r\n\t\t\t\t$media_src = urlencode(\"index.php?id=\".$currentPageUID.'&type='.$extConf['typeNum'].'&'.$this->prefixId.'[format]'.'='.$format.'&'.$this->prefixId.'[subFormat]'.'='.$subFormat.'&'.$this->prefixId.'[categories]'.'='.$this->lConf['selectedCategories'].'&'.$this->prefixId.'[sorting_criteria]'.'='.$this->lConf['sorting_criteria'].'&'.$this->prefixId.'[sorting_direction]'.'='.$this->lConf['sorting_direction']);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse if($this->lConf['displayMode'] == \"records\"){\r\n\t\t\t\r\n\t\t\t//extracting the &L parameter from piVars\r\n\t\t\tparse_str($GLOBALS['TSFE']->linkVars);\r\n\t\t\t//now the variable named $L has been initialized by parse_str\r\n\t\t\t$this->L = $L;\r\n\t\t\t\r\n\t\t\t//generate regular URL\r\n\t\t\t$format = 'RSS';\r\n\t\t\t$subFormat = 'itunes';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\tif($extConf['realurlintegration']){\r\n\t\t\t\t//generate url rewrited URL\r\n\t\t\t\t$conf = array(\r\n\t\t\t\t 'parameter' => $currentPageUID.','.$extConf['typeNum'], // Link to current page + page type\r\n\t\t\t\t // Set additional parameters\r\n\t\t\t\t 'additionalParams' => '&'.$this->prefixId.'[format]'.'='.$format.'&'.$this->prefixId.'[subFormat]'.'='.$subFormat.'&'.$this->prefixId.'[records]'.'='.$this->lConf['selectedRecords'], \r\n\t\t\t\t 'useCacheHash' => $this->pi_checkCHash, // We must add cHash because we use parameters\r\n\t\t\t\t 'returnLast' => 'url', // We want link only\r\n\t\t\t\t);\r\n\t\t\t\t$media_src = urlencode($this->cObj->typoLink('playlist',$conf));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//generate regular URL\r\n\t\t\t\t$media_src = urlencode(\"index.php?id=\".$currentPageUID.'&type='.$extConf['typeNum'].'&'.$this->prefixId.'[format]'.'='.$format.'&'.$this->prefixId.'[subFormat]'.'='.$subFormat.'&'.$this->prefixId.'[records]'.'='.$this->lConf['selectedRecords']);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse if($this->lConf['displayMode'] == \"playlist\"){\r\n\t\t\t$media_src = $this->lConf['playlist_url'];\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//store meta information for file properties\r\n\t\t$meta=\"\";\t\t\r\n\t\t\r\n\t\t//meta information preprocessing\r\n\t\t$date = date($this->conf['dateFormat'], $media['date_cr']); //$extConf['dateFormat']\r\n\t\t\r\n\t\t$description = str_replace($this->stripCR, '', $media['description']);\r\n\t\t\r\n\t\t$image = '/uploads/tx_paemedialibrary/'.$media['tx_paemedialibrary_thumbnail_user_defined'];\r\n\t\t\r\n\t\t//defining meta information for single files. For other files it is loaded from XML\r\n\t\tif($this->lConf['displayMode'] == \"single\"){\r\n\t\t\t\r\n\t\t\tif(isset($media['creator']) && $media['creator'] != \"\")\t$meta .= 'author: \"'.$media['creator'].'\",'.chr(10);\r\n\t\t\tif(isset($media['date_cr']) && $media['date_cr'] != \"\")\t$meta .= 'date: \"'.$date.'\",'.chr(10);\r\n\t\t\tif(isset($media['description']) && $media['description'] != \"\")\t$meta .= 'description: \"'.$description.'\",'.chr(10);\r\n\t\t\tif(isset($media['tx_paemedialibrary_duration_seconds']) && $media['tx_paemedialibrary_duration_seconds'] != \"\")\t$meta .= 'duration: \"'.$media['tx_paemedialibrary_duration_seconds'].'\",'.chr(10);\r\n\t\t\tif(isset($media['tx_paemedialibrary_thumbnail_user_defined']) && $media['tx_paemedialibrary_thumbnail_user_defined'] != \"\")\t$meta .= 'image: \"'.$image.'\",'.chr(10);\r\n\t\t\tif(isset($media['alt_text']) && $media['alt_text'] != \"\")\t$meta .= 'link: \"'.$media['alt_text'].'\",'.chr(10);\r\n\t\t\tif(isset($media['tx_paemedialibrary_start_seconds']) && $media['tx_paemedialibrary_start_seconds'] != \"\")\t$meta .= 'start: \"'.$media['tx_paemedialibrary_start_seconds'].'\",'.chr(10);\r\n\t\t\tif(isset($media['keywords']) && $media['keywords'] != \"\")\t$meta .= 'tags: \"'.$media['keywords'].'\",'.chr(10);\r\n\t\t\tif(isset($media['title']) && $media['title'] != \"\")\t$meta .= 'title: \"'.$media['title'].'\",'.chr(10);\r\n\t\t\tif(isset($media['tx_paemedialibrary_type']) && $media['tx_paemedialibrary_type'] != \"\")\t$meta .= 'type: \"'.$media['tx_paemedialibrary_type'].'\",'.chr(10);\r\n\r\n\t\t}\r\n\t\t\t\t\r\n\t\t//$media_src = \"typo3conf/ext/pae_media_library/rss.xml\";\r\n\t\t// Flash code\r\n\t\t$flashCode[] = '\r\n\t\t\t<div id=\"'.$contentID.'\"></div>\r\n\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t// <![CDATA[\r\n\t\t\t\t\r\n\t\t\t\tvar flashvars = {\r\n\t\t\t\t\t//file properties'.chr(10).\r\n\t\t\t\t\t$meta.\r\n\t\t\t\t\t'file: \"'.$media_src.'\",'.chr(10).\r\n\t\t\t\t\t(($this->lConf['streaming_base_url'] != \"\")?'streamer: \"'.$this->lConf['streaming_base_url'].'\",':'').'\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t //layout';\r\n\t\t\t\t \r\n\t\t\t\t $layout = $this->getFlashvar('controlbar', $controlbar, \"bottom\").\r\n\t\t\t\t $this->getFlashvar('width', $width, \"280\").\r\n\t\t\t\t $this->getFlashvar('height', $height, \"400\").\r\n\t\t\t\t $this->getFlashvar('icons', $icons, \"true\").\r\n\t\t\t\t $this->getFlashvar('backcolor', $backcolor, \"\").\r\n\t\t\t\t $this->getFlashvar('frontcolor', $frontcolor, \"\").\r\n\t\t\t\t $this->getFlashvar('lightcolor', $lightcolor, \"\").\r\n\t\t\t\t $this->getFlashvar('screencolor', $screencolor, \"\").\r\n\t\t\t\t $this->getFlashvar('icons', $icons, \"true\").\r\n\t\t\t\t $this->getFlashvar('logo', $logo, \"\").\r\n\t\t\t\t $this->getFlashvar('skin', $skin, \"\");\r\n\t\t\t\r\n\t\t\t\t //behavior\r\n\t\t\t\t $behavior = $this->getFlashvar('playlist', $playlist, \"none\").\r\n\t\t\t\t $this->getFlashvar('playlistsize', $playlistsize, \"180\").\r\n\t\t\t\t $this->getFlashvar('smoothing', $smoothing, \"true\").\r\n\t\t\t\t $this->getFlashvar('stretching', $stretching, \"uniform\").\r\n\t\t\t\t $this->getFlashvar('autostart', $autostart, \"false\").\r\n\t\t\t\t $this->getFlashvar('bandwidth', $bandwidth, \"5000\").\r\n\t\t\t\t $this->getFlashvar('bufferlength', $bufferlength, \"1\").\r\n\t\t\t\t $this->getFlashvar('displayclick', $displayclick, \"play\").\r\n\t\t\t\t $this->getFlashvar('dock', $dock, \"false\").\r\n\t\t\t\t $this->getFlashvar('item', $item, \"0\").\r\n\t\t\t\t $this->getFlashvar('linktarget', $linktarget, \"_blank\").\r\n\t\t\t\t $this->getFlashvar('mute', $mute, \"false\").\r\n\t\t\t\t $this->getFlashvar('repeat', $repeat, \"none\").\r\n\t\t\t\t $this->getFlashvar('shuffle', $shuffle, \"false\").\r\n\t\t\t\t $this->getFlashvar('volume', $volume, \"90\").\r\n\t\t\t\t $this->getFlashvar('plugins', $plugins, \"\").\r\n\t\t\t\t $this->getFlashvar('debug', $debug, \"\");\r\n\t\t\t\t \r\n\t\t\t//remove ','.chr(10) in the end of the string for IE7 Javascriopt engine compatibility\r\n\t\t\t$flashCode[] = substr_replace($layout.$behavior,'',-2) ;\t\r\n\t\t\t\r\n\t\t\t$flashCode[] = '};\r\n\t\t\t\tvar params = {\r\n\t\t\t\t allowfullscreen: \"true\",\r\n\t\t\t\t allowScriptAccess: \"always\"\r\n\t\t\t\t};\r\n\t\t\t\tvar attributes = {\r\n\t\t\t\t id: \"myDynamicContent\",\r\n\t\t\t\t name: \"myDynamicContent\"\r\n\t\t\t\t};'.chr(10);\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$flashCode[] = '//JW player plugins flashvars';\r\n\t\t\t\t//dealing with plugin flashvars requires a specific processing because of the dot notation of JW player plugin flashvar names which messes up with javascript dot notation.\r\n\t\t\t\t$flashvars = explode(',',$flashvars);\r\n\t\t\t\tforeach($flashvars as $index => $value){\r\n\t\t\t\t\t$value = explode(':',$value);\r\n\t\t\t\t\t//strip line feeds \r\n\t\t\t\t\t$value[0] = trim(str_replace($this->stripCR, '', $value[0]));\r\n\t\t\t\t\t$value[1] = trim(str_replace($this->stripCR, '', $value[1]));\r\n\t\t\t\t\tif($value[0] != \"\")$flashCode[] = 'flashvars[\"'.$value[0].'\"] = '.$value[1].';';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$flashCode[] = '\r\n\t\t\t\tswfobject.embedSWF(\"'.$playerPath.'\", \"'.$contentID.'\", \"'.$width.'\", \"'.$height.'\", \"'.$flash_version_req.'\",\"'.$resPath.'expressInstall.swf\", flashvars, params, attributes);\r\n\r\n\t\t\t// ]]>\r\n\t\t\t</script>';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t//use template for displaying file meta information only if a single file is being displayed, and if show_meta setting is enabled\r\n\t\tif($this->lConf['displayMode'] == \"single\" && $show_meta == \"true\"){\r\n\t\t\t// Get the template\r\n\t\t\t$this->templateCode = $this->cObj->fileResource($this->conf['templateFile']);\r\n\t\t\t \r\n\t\t\t // Get the parts out of the template\r\n\t\t\t$template['total'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_MEDIAPLAYER###');\r\n\t\t\t \r\n\t\t\t // Fill marker\r\n\t\t\t$markerArray['###MEDIA_TITLE###'] = $media['title'];\r\n\t\t\t$markerArray['###PLAYER_SWF###'] = implode(chr(10),$flashCode);\r\n\t\t\t$markerArray['###MEDIA_DESCRIPTION###'] = nl2br($media['description']);\r\n\t\t\t$markerArray['###MEDIA_DURATION###'] = $media['tx_paemedialibrary_duration'];\r\n\t\t\t$markerArray['###MEDIA_AUTHOR###'] = $media['creator'];\r\n\t\t\t$markerArray['###MEDIA_DATE###'] = $date;\r\n\t\t\t$markerArray['###MEDIA_KEYWORDS###'] = $media['keywords'];\r\n\t\t\t\r\n\t\t\t$markerArray['###MEDIA_DESCRIPTION_LABEL###'] = $this->pi_getLL('media.description');\r\n\t\t\t$markerArray['###MEDIA_DURATION_LABEL###'] = $this->pi_getLL('media.duration');\r\n\t\t\t$markerArray['###MEDIA_AUTHOR_LABEL###'] = $this->pi_getLL('media.author');\r\n\t\t\t$markerArray['###MEDIA_DATE_LABEL###'] = $this->pi_getLL('media.date');\r\n\t\t\t$markerArray['###MEDIA_KEYWORDS_LABEL###'] = $this->pi_getLL('media.keywords');\r\n\t\t\r\n\t\t\t// Finalize and create the content by replacing the \"content\" marker in the template\r\n\t\t\tif($errorMessage == \"\"){\r\n\t\t\t\t$content = $this->cObj->substituteMarkerArrayCached($template['total'],$markerArray);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$errorCode = '<div class=\"'.$this->prefixId.'_errorMessage\">'.$this->pi_getLL('error').\": \".$errorMessage.'</div><br /><br />'.chr(10);\r\n\t\t\t\t$content = $errorCode.$this->cObj->substituteMarkerArrayCached($template['total'],$markerArray);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\t// Finalize and create the content by replacing the \"content\" marker in the template\r\n\t\t\tif($errorMessage == \"\"){\r\n\t\t\t\t$content = implode(chr(10),$flashCode);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$errorCode = '<div class=\"'.$this->prefixId.'_errorMessage\">'.$this->pi_getLL('error').\": \".$errorMessage.'</div><br /><br />'.chr(10);\r\n\t\t\t\t$content = $errorCode.implode(chr(10),$flashCode);\r\n\t\t\t}\r\n\t\t\t \r\n\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t//debug : view current dam record content in page\r\n\t\t//$content .= t3lib_div::view_array($media);\r\n\t\t\r\n\t\t\r\n\t\treturn $this->pi_wrapInBaseClass($content);\r\n\t}", "title": "" }, { "docid": "54dbbcbfc0db80dd3e863f8f6d347f4a", "score": "0.49486247", "text": "public function createMethodConfigurationFiles(){\n\t\ttry {\n\t\t\t$this->validate();\n\t\t\t$this->load->model('extension/wallee/dynamic');\n\t\t\t$this->model_extension_wallee_dynamic->install();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t// ensure that permissions etc. do not cause page loads to fail\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "03d9fd5205a547e6c069be252fdd112b", "score": "0.49481425", "text": "function generate_config() {\n\tgenerate_opers();\n\tgenerate_channels();\n\tgenerate_bans();\n\tgenerate_exceptions();\n\tgenerate_dcc();\n\tgenerate_vhosts();\n\tgenerate_badwords();\n\tgenerate_spamfilters();\n\tgenerate_cgiirc();\n\tgenerate_other();\n}", "title": "" }, { "docid": "95ac23a78ebc97b2fb66e2a4a9f38e8e", "score": "0.4946682", "text": "public function load_module_config(){\n\t\trequire_once( 'config/'.$this->name.'-settings.php' );\n }", "title": "" }, { "docid": "b52af9ce31a20dea729ce59d46a1375a", "score": "0.49406487", "text": "protected function generateSystemModulesConfig()\n {\n file_put_contents(APPLICATION_ROOT . '/config/module/system.php',\n '<?php return ['. implode(',', array_map(function($value) {return \"'\" . $value . \"'\";}, $this->systemModules)) . '];');\n }", "title": "" }, { "docid": "4427c2990645100b088a88cda3ad62f2", "score": "0.49370518", "text": "public function loadFileConfig(){\r\n $stored = array(\"PhpConfig\", \"JavascriptConfig\");\r\n $this->fileConfig = array();\r\n foreach ($stored as $fileConfig){\r\n Yii::import('application.components.filetypes.' . $fileConfig);\r\n $config = new $fileConfig();\r\n foreach ($config->extensions as $extension){\r\n $this->fileConfig[$extension] = $config->commentRules;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b07010fba6c5818e43bee30a7bb9eaef", "score": "0.4927664", "text": "public static function compileAllConfig($extention, $force_compile, $time_limit, $max_errors, Smarty $smarty)\n {\n // switch off time limit\n if (function_exists('set_time_limit')) {\n @set_time_limit($time_limit);\n }\n $smarty->force_compile = $force_compile;\n $_count = 0;\n $_error_count = 0;\n // loop over array of template directories\n foreach($smarty->getConfigDir() as $_dir) {\n $_compileDirs = new RecursiveDirectoryIterator($_dir);\n $_compile = new RecursiveIteratorIterator($_compileDirs);\n foreach ($_compile as $_fileinfo) {\n if (substr($_fileinfo->getBasename(),0,1) == '.' || strpos($_fileinfo, '.svn') !== false) continue;\n $_file = $_fileinfo->getFilename();\n if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;\n if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {\n $_config_file = $_file;\n } else {\n $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;\n }\n echo '<br>', $_dir, '---', $_config_file;\n flush();\n $_start_time = microtime(true);\n try {\n $_config = new Smarty_Internal_Config($_config_file, $smarty);\n if ($_config->mustCompile()) {\n $_config->compileConfigSource();\n echo ' compiled in ', microtime(true) - $_start_time, ' seconds';\n flush();\n } else {\n echo ' is up to date';\n flush();\n }\n }\n catch (Exception $e) {\n echo 'Error: ', $e->getMessage(), \"<br><br>\";\n $_error_count++;\n }\n if ($max_errors !== null && $_error_count == $max_errors) {\n echo '<br><br>too many errors';\n exit();\n }\n }\n }\n return $_count;\n }", "title": "" }, { "docid": "a17dd0914354cac5e04343255a775a65", "score": "0.48770535", "text": "public function __construct() {\n\t\t// Create an instance of language. Needed in order to make the em_index work\n\t\t$GLOBALS['LANG'] = t3lib_div::makeInstance('language');\n\t\t$GLOBALS['LANG']->csConvObj = t3lib_div::makeInstance('t3lib_cs');\n\n\t\trequire_once(TYPO3_EM_PATH . 'class.em_index.php');\n\t\t$this->extensionManager = t3lib_div::makeInstance('SC_mod_tools_em_index');\n\n\t\t// Setting paths of install scopes for the extensionManager\n\t\t$this->extensionManager->typePaths = Array (\n\t\t\t'S' => TYPO3_mainDir.'sysext/',\n\t\t\t'G' => TYPO3_mainDir.'ext/',\n\t\t\t'L' => 'typo3conf/ext/'\n\t\t);\n\t\t$this->extensionManager->typeBackPaths = Array (\n\t\t\t'S' => '../../../',\n\t\t\t'G' => '../../../',\n\t\t\t'L' => '../../../../'.TYPO3_mainDir\n\t\t);\n\n\t\t$this->terConnection = t3lib_div::makeInstance('SC_mod_tools_em_terconnection');\n\t}", "title": "" }, { "docid": "85adf7e5a98b6ba65d0e795f7e25088e", "score": "0.48685658", "text": "protected function compile()\n {\n if (TL_MODE == 'BE')\n {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new \\Contao\\BackendTemplate($this->strTemplate);\n }\n }", "title": "" }, { "docid": "48a836697f2cfa6c19ec6297d1a38b01", "score": "0.48587865", "text": "private function define_config()\n\t{\n\t\t$this->define('admin', $this->admin);\n\t\t$this->define('DOCUMENT_ROOT', $this->root);\n\t\t$this->core_root = ADMIN_ROOT.'/'.$this->boot;\n\t\t// define('CC_ROOT', $this->root);\n\t\t// define('CC_DIR', $this->relative_root);\n\t\tdefine('env', $this->env);\n\t\tdefine('ENV', mb_strtoupper($this->env));\n\t\tif (!empty($this->site))\n\t\t{\n\t\t\t$this->define('site', $this->site);\n\t\t\t$this->define('KEY', constant(ENV.'_KEY'));\n\t\t\t$this->define('URLR', constant(ENV.'_URLR'));\n\t\t}\n\t\t$this->define('URI', $this->uri);\n\t\t$this->define('URL', $this->url);\n\t\t$this->define('DOMAIN_URL', $this->domain);\n\t\t$this->define('ROOT', constant(ENV.'_ROOT'));\n\t}", "title": "" }, { "docid": "8f3fafcc5fb94f2b1439df9524bb1a62", "score": "0.48492545", "text": "function syncConfigs()\n\t{\n# added in ver 0.29.13, 2010-01-01, in first hours of 2010, happy new year !\n\t\tif (!$this->commandline)\n\t\t\treturn;\n\n\t\t$filecontents = \"\n<?\n\\$dbhost='\" . $this->dbhost . \"';\n\\$dbusername='\" . $this->dbusername . \"';\n\\$dbpass='\" . $this->dbpass . \"';\n\\$dbname='\" . $this->dbname . \"';\n?>\";\n\n\t\twriteoutput2(\"$this->ehcpdir/webmail/plugins/ehcp_change_pass/config.php\", $filecontents, \"w\");\n\n\t}", "title": "" }, { "docid": "ca013914c2d203f33f8bc604c722a90e", "score": "0.4836458", "text": "protected function makeConfig()\n {\n new GenerateConfig($this, $this->files);\n }", "title": "" }, { "docid": "2906c14414e36d746572611bf4b8bb48", "score": "0.4834233", "text": "public function configurePHP() {\n\t\t\n\t\t/** Set error reporting */\n\t\tif ($this->debug) {\n\t\t\t\t\n\t\t\terror_reporting(E_ALL);\n\t\t\t$this->ini['display_errors'] = 1;\n\t\t\t\n\t\t\tif (defined('DEBUG_LOG_PATH')) {\n\t\t\t\t$this->ini['log_errors'] = 1;\n\t\t\t\t$this->ini['error_log'] = DEBUG_LOG_PATH;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\terror_reporting(E_ALL ^E_STRICT);\n\t\t\t$this->ini['display_errors'] = 0;\n\t\t}\n\t\t\n\t\t/** Set ini settings */\n\t\tforeach($this->ini as $varname => $value) {\n\t\t\tini_set($varname, $value);\n\t\t}\n\t\t\n\t\t/** Set default timezone */\n\t\tdate_default_timezone_set($this->timezone);\n\t}", "title": "" }, { "docid": "1bc2210320233dcb51b0a365fd0f265f", "score": "0.4827765", "text": "private function configure(): void\n {\n $directives = (array) ($this->config['directives'] ?? []);\n\n foreach ($directives as $name => $callable) {\n if (is_callable($callable)) {\n $this->engine->directive($name, $callable);\n }\n }\n\n $if = (array) ($this->config['if'] ?? []);\n\n foreach ($if as $name => $callable) {\n if (is_callable($callable)) {\n $this->engine->if($name, $callable);\n }\n }\n }", "title": "" }, { "docid": "43459dd9e975ca97bfe024f2974d33f1", "score": "0.48198757", "text": "function saveConfigFile($conf, $file)\n{\n \n $f = fopen($file, 'w');\n if ($f === FALSE) {\n return FALSE;\n }\n \n fputs($f, \"<?php\\n# This file is auto-generated by pebugger.\\n# Try not to edit yourself - any formatting and comments will be lost!\\n\\n\");\n $out = '';\n foreach ($conf as $n => $v) {\n $out .= \"$$n = \" . var_export($v, TRUE) . \";\\n\";\n }\n fputs($f, $out . \"\\n\\n?>\\n\");\n \n fclose($f);\n}", "title": "" }, { "docid": "1cfb84604d89b8a1ee986fa4d528d0f9", "score": "0.4819224", "text": "public function init()\n {\n $cwd = getcwd();\n $configpath = $cwd.'/'.$this->config_file;\n if (true === file_exists($configpath))\n {\n $this->logger->write(\"Exists $configpath\", null, \"error\");\n exit();\n }\n\n if (false === is_dir(dirname($configpath)))\n {\n mkdir(dirname($configpath), 0777, true);\n }\n\n $content = <<<END\n<?php\nreturn array(\n 'colors' => true,\n 'databases' => array(\n 'master' => array(\n // PDO Connection settings.\n 'dsn' => 'mysql:dbname=yourdatabase;host=localhost',\n 'user' => 'user',\n 'password' => 'password',\n ),\n ),\n);\n\nEND;\n\n file_put_contents($configpath, $content);\n $this->logger->write(\"Create configuration file to $configpath\");\n }", "title": "" }, { "docid": "7cae83015c5bab8e82a68ea793776060", "score": "0.4809455", "text": "public function createCompiler(): File;", "title": "" }, { "docid": "fb4d95fa248c7b44bed1aafd7c7779a9", "score": "0.47778788", "text": "public function compile()\n {\n exec(\"cd {$this->_project_path} && haxe {$this->_hxml_file}\", $output, $result_code);\n if ($result_code > 0) {\n throw new PassetCompileException('Haxe compile Error!!');\n }\n }", "title": "" }, { "docid": "cc70ecc23f528ddc8c82dc49895a550d", "score": "0.47767717", "text": "public static function get_config(){\n return array( 'id' => 'system',\n 'inpath' => new \\SYSTEM\\PSYSTEM(),\n 'outpath' => new \\SYSTEM\\PSYSTEM('docu/system/'),\n 'inpath_md' => new \\SYSTEM\\PSYSTEM('docu/system/structure.xml'),\n 'outpath_md' => new \\SYSTEM\\PSYSTEM('docu/system_wiki/'),\n 'cachepath' => new \\SYSTEM\\PSYSTEM('docu/system/cache/'),\n 'ignore' => array( 'lib/animate/*',\n 'lib/bootstrap/*',\n 'lib/bootstrap_growl/*',\n 'lib/git/*',\n 'lib/jqbootstrapvalidation/*',\n 'lib/jquery/*',\n 'lib/lettering/*',\n 'lib/markdown/*',\n 'lib/minify/*',\n 'lib/phpdocumentor/*',\n 'lib/scssphp/*',\n 'lib/tablesorter/*',\n 'lib/textillate/*',\n 'lib/tinymce/*',\n 'lib/jstree/*',\n 'lib/phpdoc_md/*'),\n 'sourcecode' => true,\n 'parseprivate' => false,\n 'title' => 'SYSTEM - PHP Framework');\n }", "title": "" }, { "docid": "89b001e9fd9ed6e5937fea80e85a9281", "score": "0.4775106", "text": "function config_file() {\n\t return \"secure/config_ldap.inc.php\";\n }", "title": "" }, { "docid": "510a757421590c0553e9206f31025aa9", "score": "0.4765762", "text": "protected function compile()\n {\n }", "title": "" }, { "docid": "bd68b7eb4c39caee1771dc7a9ca7d14c", "score": "0.47592074", "text": "public function configAction()\n {\n $this->view->title = 'QA Audit Form Administration';\n $this->view->headScript()->appendFile($this->getFrontController()->getBaseUrl() . '/extjsmanager/loadqaconfig');\n }", "title": "" }, { "docid": "57b8c601298d4adab327dcfdb3692d26", "score": "0.47537637", "text": "public function getConfig(){\n\t\treturn include __DIR__ . '/config/module.config.php';\n\t}", "title": "" }, { "docid": "42d3d1642c17e3d87aa0bb72d666731c", "score": "0.47481263", "text": "public function configure() {\n\t\tLogger::getRootLogger ()->info ( \"Configuring Proxy server\" );\n\t\tFunctions::mountFilesystem ( 'mount' );\n\t\t\n\t\t//Write away the DHCPD config.\n\t\t$fd = fopen ( self::CONFIG_PATH, \"w\" );\n\t\tif (! $fd) {\n\t\t\tLogger::getRootLogger ()->error ( \"Error: Could not write Proxy conifg to \" . self::CONFIG_PATH );\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$interface = $this->framework->getPlugin ( \"Ext\" );\n\t\tif (empty ( $interface )) {\n\t\t\tLogger::getRootLogger ()->error ( 'Could not get EXT plugin.' );\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$interfaceIP = $interface->getIpAddress (1);\n\t\tif(empty($interfaceIP)){\n\t\t\t//\tInterface IP could not be resolved so we have no listen directives\n\t\t\tLogger::getRootLogger()->error('Could not get the IP of the Ext interface');\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$proxyconf = \"PidFile \\\"\" . self::PID_PATH . \"\\\"\\n\";\n\t\t$proxyconf .= <<<EOD\n# tinyproxy daemon configuration file\n\n# Name of the user the tinyproxy daemon should switch to after the port\n# has been bound.\nUser nobody\nGroup nogroup\n\n# Port to listen on.\nPort {$this->data->port}\n\n# If you have multiple interfaces this allows you to bind to only one. If\n# this is commented out, tinyproxy will bind to all interfaces present.\nListen $interfaceIP\n\n# Timeout: The number of seconds of inactivity a connection is allowed to\n# have before it closed by tinyproxy.\nTimeout 600\n\n# Where to log the information. Either LogFile or Syslog should be set,\n# but not both.\n# Logfile \"/var/log/tinyproxy.log\" OR Syslog On\n#LogLevel Warning\nLogfile \"/var/log/tinyproxy.log\"\n\n# Include the X-Tinyproxy header, which has the client's IP address when\n# connecting to the sites listed.\n#XTinyproxy mydomain.com\n\n# This is the absolute highest number of threads which will be created. In\n# other words, only MaxClients number of clients can be connected at the\n# same time.\nMaxClients 100\n\n# These settings set the upper and lower limit for the number of\n# spare servers which should be available. If the number of spare servers\n# falls below MinSpareServers then new ones will be created. If the number\n# of servers exceeds MaxSpareServers then the extras will be killed off.\nMinSpareServers 2\nMaxSpareServers 20\n\n# Number of servers to start initially.\nStartServers 5\n\n# MaxRequestsPerChild is the number of connections a thread will handle\n# before it is killed. In practise this should be set to 0, which disables\n# thread reaping. If you do notice problems with memory leakage, then set\n# this to something like 10000\nMaxRequestsPerChild 0\n\n# The following is the authorization controls. If there are any access\n# control keywords then the default action is to DENY. Otherwise, the\n# default action is ALLOW.\n#\n# Also the order of the controls are important. The incoming connections\n# are tested against the controls based on order.\n# Allow all as we only listen to one interface. \n#Allow 127.0.0.1\n#Allow 192.168.1.0/25\n\n# The \"Via\" header is required by the HTTP RFC, but using the real host name\n# is a security concern. If the following directive is enabled, the string\n# supplied will be used as the host name in the Via header; otherwise, the\n# server's host name will be used.\nViaProxyName \"tinyproxy\"\n\n# If an Anonymous keyword is present, then anonymous proxying is enabled.\n# The headers listed are allowed through, while all others are denied. If\n# no Anonymous keyword is present, then all header are allowed through.\n# You must include quotes around the headers.\n#Anonymous \"Host\"\n#Anonymous \"Authorization\"\n\n# This is a list of ports allowed by tinyproxy when the CONNECT method\n# is used. To disable the CONNECT method altogether, set the value to 0.\n# If no ConnectPort line is found, all ports are allowed (which is not\n# very secure.)\n\nEOD;\n\t\t\n\t\tforeach ( $this->data->rule as $rule ) {\n\t\t\t$proxyconf .= \"ConnectPort {$rule->port}\\n\";\n\t\t}\n\t\t\n\t\tfwrite ( $fd, $proxyconf );\n\t\tfclose ( $fd );\n\t\tFunctions::mountFilesystem ( 'unmount' );\n\t\t\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "c0f0a52a001bba812bfd4412bac2eb5a", "score": "0.47426093", "text": "public static function generate(): void\n {\n $projectRoot = \\dirname(__DIR__);\n $phpUnitVersion = explode('.', Version::id())[0];\n\n self::generatePhpstanConfig($projectRoot, $phpUnitVersion);\n self::generatePhpUnitConfig($projectRoot, $phpUnitVersion);\n }", "title": "" }, { "docid": "0332ef909e9df07ff2a541b2316b92bf", "score": "0.47411448", "text": "public function config_shortcodes() {\n\n\t\tif ( ! self::$has_vc_edits || ! function_exists( 'vc_add_param' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Config files tweak VC modules (add/remove params)\n\t\trequire_once( ATHEN_FRAMEWORK_DIR .'third-party/visual-composer/config/vc-row.php' );\n\t\trequire_once( ATHEN_FRAMEWORK_DIR .'third-party/visual-composer/config/vc-single-image.php' );\n\n\t\t// Add params to other modules\n\t\trequire_once( ATHEN_FRAMEWORK_DIR .'third-party/visual-composer/config/add-params.php' );\n\n\t}", "title": "" }, { "docid": "cf2c9a865dcc4fdbaa8e211569584be4", "score": "0.47394872", "text": "function wrk_mpdconf($kernelver = null, $i2s = null) {\n\t$_tcmods_conf = getTcmodsConf();\n\n\t// $mpdcfg = ConfigDB::read('', 'mpdconf');\n\t$mpdcfg = array_column(ConfigDB::read('', 'mpdconf'), 'value_player', 'param');\n\n\t// set mpd.conf file header\n\t$output = \"#########################################\\n\";\n\t$output .= \"# This file is automatically generated by\\n\";\n\t$output .= \"# the Player via MPD Configuration page. \\n\";\n\t$output .= \"#########################################\\n\";\n\t$output .= \"\\n\";\n\n\tforeach ($mpdcfg as $key => $val) {\n\t\tswitch ($key) {\n\t\t\t// suppress\n\t\t\tcase 'dsd_usb':\n\t\t\t\tbreak;\n\n\t\t\tcase 'device':\n\t\t\t\t$device = $val;\n\t\t\t\tbreak;\n\n\t\t\tcase 'mixer_type':\n\t\t\t\t// get volume mixer control name\n\t\t\t\tif ('hardware' == ($mixer_type = $mpdcfg['mixer_type'])) {\n\t\t\t\t\t$hwmixer = getMixerName($kernelver, $i2s);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// fallthrough - output mixer_type\n\t\t\tdefault:\n\t\t\t\t// don't output disabled audio_output_format\n\t\t\t\tif ($key !== 'audio_output_format' || $val !== 'disabled') {\n\t\t\t\t\t$output .= $key . \" \\\"\" . $val . \"\\\"\\n\";\n\t\t\t\t}\n\t\t}\n\t}\n\n\t// format audio input / output interfaces\n\t$output .= <<<EOT\nmax_connections \"20\"\n\ndecoder {\nplugin \"ffmpeg\"\nenabled \"yes\"\n}\n\ninput {\nplugin \"curl\"\n}\n\naudio_output {\ntype \"alsa\"\nname \"Output\"\ndevice \"hw:$device,0\"\n\nEOT;\n\n\tif (isset($hwmixer)) {\n\t\t$output .= \"mixer_control \\\"\" . $hwmixer . \"\\\"\\n\";\n\t\t$output .= \"mixer_device \\\"hw:\" . $device . \"\\\"\\n\";\n\t\t$output .= \"mixer_index \\\"0\\\"\\n\";\n\t}\n\n\t$output .= \"dsd_usb \\\"\" . $mpdcfg['dsd_usb'] . \"\\\"\\n\";\n\t$output .= \"}\\n\";\n\n\t// write mpd.conf file\n\tfile_put_contents(\"/etc/mpd.conf\", $output);\n\n\t// store volume mixer type in tcmods.conf\n\tif ($_tcmods_conf['volume_mixer_type'] != $mixer_type) {\n\t\t$_tcmods_conf['volume_mixer_type'] = $mixer_type;\n\t\t_updTcmodsConf($_tcmods_conf);\n\t}\n}", "title": "" }, { "docid": "8f73e27893bfbe9c512f5ca9a36516d8", "score": "0.47336474", "text": "public static function extend($compiler) {\n \n }", "title": "" }, { "docid": "144ee167755b821be0ca2f68a765265f", "score": "0.47278255", "text": "function widget_creativeclans_slideshow_buildConfigXML($par, $module_absolute_path) \r\n {\r\n if ('' != $par['includeEffects']) $par['includeEffects'] = widget_creativeclans_slideshow_checkEffects($par['includeEffects']);\r\n if ('' != $par['excludeEffects']) $par['excludeEffects'] = widget_creativeclans_slideshow_checkEffects($par['excludeEffects']);\r\n \r\n // create config XML file \r\n $xml_data = '<?xml version=\"1.0\" encoding=\"utf-8\"?>'.\"\\n\";\r\n?><?php\r\n $xml_data .= \"<parameters>\\n\";\r\n foreach ($par as $key=>$value) {\r\n \t$xml_data .= \"<parameter name=\\\"$key\\\">$value</parameter>\\n\";\r\n }\r\n $xml_data .= \"</parameters>\\n\";\r\n \r\n return $xml_data; \r\n }", "title": "" }, { "docid": "abe7dddfbfe10b4062cfe8bddec367a2", "score": "0.47193703", "text": "public function create_config_file( $config )\n\t{\n\t\t$string_config = \n\t\t\"<?php\n/**\n * Database configuration for Tendoo CMS\n * -------------------------------------\n * Tendoo Version : \" . get( 'core_version' ) . \"\n**/\n\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\n\\$active_group = 'default';\n\\$query_builder = TRUE;\n\n\\$db['default']['hostname'] = '\".$config['hostname'].\"';\n\\$db['default']['username'] = '\".$config['username'].\"';\n\\$db['default']['password'] = '\".$config['password'].\"';\n\\$db['default']['database'] = '\".$config['database'].\"';\n\\$db['default']['dbdriver'] = '\".$config['dbdriver'].\"';\n\\$db['default']['dbprefix'] = '\".$config['dbprefix'].\"';\n\\$db['default']['pconnect'] = FALSE;\n\\$db['default']['db_debug'] = TRUE;\n\\$db['default']['cache_on'] = FALSE;\n\\$db['default']['cachedir'] = 'application/cache/database/';\n\\$db['default']['char_set'] = 'utf8';\n\\$db['default']['dbcollat'] = 'utf8_general_ci';\n\\$db['default']['swap_pre'] = '';\n\\$db['default']['autoinit'] = TRUE;\n\\$db['default']['stricton'] = FALSE;\n\nif(!defined('DB_PREFIX'))\n{\n\tdefine('DB_PREFIX',\\$db['default']['dbprefix']);\n}\";\n\t\t$file = fopen( APPPATH . 'config/database.php' , 'w+' );\n\t\tfwrite( $file , $string_config );\n\t\tfclose( $file );\n\t}", "title": "" }, { "docid": "087d8552d55ac96ef082ddf5674957e6", "score": "0.47146633", "text": "protected function generateFile($config)\n\t{\n\t\tif(!is_array($config) || !isset($config['Chain']) || !isset($config['Aspect']))\n\t\t{\n\t\t\tthrow Exception(\"Invalid config file, please check the sample.yml and follow the rule\");\n\t\t}\n\n\t\t$content = \"\n\t\t<?php \n\t\t//{$this->containerName}\n\t\tclass {$this->containerName}\n\t\t{\t\t\n\t\t\t\";\n\n\t\tforeach($config['Aspect'] as $aspect_name=>$aspect_class)\n\t\t{\n\t\t\t$func = \"\n\t\t\t//{$aspect_name}\n\t\t\tpublic function get_{$aspect_name}()\n\t\t\t{\n\t\t\t\treturn new {$aspect_class['class']}();\n\t\t\t}\n\n\t\t\t\";\n\t\t\t$content .= $func;\n\t\t}\n\n\t\tforeach($config['Chain'] as $chain_name=>$chain_aspects)\n\t\t{\n\t\t\t$func = \"\n\t\t\t//{$chain_name}\n\t\t\tpublic function get_{$chain_name}()\n\t\t\t{\n\t\t\t\treturn array(\n\t\t\t\t\t\";\n\t\t\tforeach($chain_aspects as $aspect_class)\n\t\t\t{\n\t\t\t\t$func .= \"\\$this->get_{$aspect_class}(), \n\t\t\t\t\";\n\t\t\t}\n\t\t\t\t$func .= \");\n\t\t\t}\n\n\t\t\t\";\n\t\t\t$content .= $func;\n\t\t}\n\n\t\t$content .= \"\n\t\t}\";\n\n\t\tfile_put_contents(APP_PATH.'cache/'.$this->containerName.\".php\", $content);\n\n\t\trequire_once(APP_PATH.'cache/'.$this->containerName.\".php\");\n\n\t}", "title": "" }, { "docid": "e4fc10fd0d81668317858938e9b233bf", "score": "0.47035313", "text": "function __construct()\n {\n\t\t/*Inclusion que genera la ubicacion del config.php*/\n include_once $_SERVER['DOCUMENT_ROOT'].\"/tesis/config.php\"; \n }", "title": "" }, { "docid": "818fa7d0c40903c09996ff676a2af69f", "score": "0.46722254", "text": "protected function compile()\r\n\t{\r\n\t\tif (TL_MODE == 'BE')\r\n\t\t{\r\n\t\t\t$this->strTemplate = 'be_wildcard';\r\n\t\t\t$this->Template = new Contao\\BackendTemplate($this->strTemplate);\r\n\t\t\t$this->Template->title = $this->headline;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fca2d3c1c7260e49b593ee166184c8a7", "score": "0.46708035", "text": "function sms_to_xmpp_initialize()\n{\n\t$config['php_path'] = '/usr/bin/php';\n\t$config['php_script'] = realpath(dirname(__FILE__)).'/libraries/abhinavsingh-JAXL-5829c3b/sendMessage.php';\n\t$config['xmpp_code'] = 'XMPP';\n\treturn $config;\n}", "title": "" }, { "docid": "9629c8842fb97b1b7ed2fa84d4bc948a", "score": "0.4670518", "text": "private function writeConfig()\n {\n $fileName = Yii::getAlias($this->module->extensionsStorage);\n $writer = new ApplicationConfigWriter([\n 'filename' => $fileName,\n ]);\n $writer->addValues($this->extensions);\n\n if (true === $writer->commit()) {\n $this->stdout('Extensions configuration successfully updated.' . PHP_EOL);\n if (true === $this->module->configurationUpdater->updateConfiguration(false)) {\n $this->stdout('Application configuration successfully updated.' . PHP_EOL);\n return true;\n } else {\n $this->stdout('Application configuration update error.' . PHP_EOL);\n return false;\n }\n } else {\n $this->stdout('There was an error while updating extensions configuration file.' . PHP_EOL);\n }\n return false;\n }", "title": "" }, { "docid": "ac19ad9d4a3ebc48c3c61fbd36b3426a", "score": "0.46702218", "text": "public function eXpOnLoad()\n {\n //Listen to all dedicated events\n $this->enableDedicatedEvents();\n /** @var Config $config */\n $config = Config::getInstance();\n\n //Start multi lang system for eXpansion. Gogo languages\n I18n::getInstance()->start();\n\n $expansion = <<<'EOT'\n \n \n\n __ __ _ \n \\ \\ / / (_) \n ___ \\ ' / _ __ __ _ _ __ ___ _ ___ _ __ \n / _ \\ > < | '_ \\ / _` | '_ \\/ __| |/ _ \\| '_ \\ \n | __// . \\| |_) | (_| | | | \\__ \\ | (_) | | | |\n \\___/_/ \\_\\ .__/ \\__,_|_| |_|___/_|\\___/|_| |_|\n...........................| |.........Plugin Pack for Manialive...............\n |_| \n\n _ _____ _ _ _ _ \n | | / ____| | | | | | | | |\n | | | (___ _ _ _ __ _ __ ___ _ __| |_ __| |_ __ ___ _ __ _ __ ___ __| | | |\n | | \\___ \\| | | | '_ \\| '_ \\ / _ \\| '__| __| / _` | '__/ _ \\| '_ \\| '_ \\ / _ \\/ _` | | |\n |_| ____) | |_| | |_) | |_) | (_) | | | |_ | (_| | | | (_) | |_) | |_) | __/ (_| | |_|\n (_) |_____/ \\__,_| .__/| .__/ \\___/|_| \\__| \\__,_|_| \\___/| .__/| .__/ \\___|\\__,_| (_)\n | | | | | | | | \n..................|_|...|_| eXpansion² is planned..............|_|...|_|...................\n............................but give it time, lot's of time :(\n...please don't report bugs on eXp1, while waiting for exp² switch to another controller...\n...........................................................................................\nEOT;\n\n $this->console($expansion);\n $server = $this->connection->getVersion();\n $d = (object)date_parse_from_format(\"Y-m-d_H_i\", $server->build);\n $this->console('Dedicated Server running for title: ' . $server->titleId);\n\n $this->connection->setApiVersion($config->API_Version); // For SM && TM\n $this->console('Dedicated Server api version in use: ' . $config->API_Version);\n $this->console('eXpansion version: ' . $this->getVersion());\n\n //Checking dedicated version\n $bExitApp = false;\n $dedicatedVersion = $d->year . \".\" . $d->month . \".\" . $d->day;\n if (version_compare($dedicatedVersion, self::EXP_REQUIRE_DEDIATED, \"lt\")) {\n $this->console('Dedicated Server: ' . $d->year . \"-\" . $d->month . \"-\" . $d->day);\n $this->console(\n 'Minimum Dedicated version ' . self::EXP_REQUIRE_DEDIATED . ': Fail (' . $dedicatedVersion . ')'\n );\n $this->connection->chatSendServerMessage(\n \"Couldn't start eXpansion - Your dedicated server is too old, required version is: \"\n . self::EXP_REQUIRE_DEDIATED\n );\n $bExitApp = true;\n } else {\n $this->console(\n 'Minimum Dedicated version ' . self::EXP_REQUIRE_DEDIATED . ': Pass (' . $dedicatedVersion . ')'\n );\n }\n\n\n //Checking php version\n if (version_compare(PHP_VERSION, '5.4.3') >= 0) {\n $this->console('Minimum PHP version 5.4.3: Pass (' . PHP_VERSION . ')');\n } else {\n $this->console('Minimum PHP version 5.4.3: Fail (' . PHP_VERSION . ')');\n $bExitApp = true;\n }\n\n //Without GC we are already out of memory we stop\n if (gc_enabled()) {\n $this->console('Garbage Collector enabled: Pass ');\n } else {\n $this->console('Garbage Collector enabled: Fail )');\n $bExitApp = true;\n }\n\n if (!$this->checkDirPermissions()) {\n $bExitApp = true;\n }\n\n if (!$this->checkPhpExtensions()) {\n $bExitApp = true;\n }\n\n $this->console(\n 'Version ' . Core::EXP_VERSION . ' build ' .\n date(\"Y-m-d h:i:s A\", Helper::getBuildDate()) . ''\n );\n\n //List of supported languages found\n $this->console('');\n $this->console(\n 'Language support detected for: ' . implode(\",\", I18n::getInstance()->getSupportedLocales()) . '!'\n );\n $this->console('Enabling default locale: ' . $config->defaultLanguage . '');\n I18n::getInstance()->setDefaultLanguage($config->defaultLanguage);\n\n $this->console('');\n\n\n //If debug stupid, debug declaration\n $this->console('');\n $this->console('-------------------------------------------------------------------------------');\n $this->console('');\n if (DEBUG) {\n $this->console(' RUNNING IN DEVELOPMENT MODE ');\n $this->console('');\n $this->console('-------------------------------------------------------------------------------');\n $this->console('');\n }\n\n //Errors let us stop the proccess.\n if ($bExitApp) {\n $this->connection->chatSendServerMessage(\"Failed to init eXpansion, see consolelog for more info!\");\n die();\n }\n\n //Save last game mode\n $this->lastGameMode = Storage::getInstance()->gameInfos->gameMode;\n\n //let know the players they are on a great server running eXpansion\n $this->connection->chatSendServerMessage('$fff$w$oe$3afΧ$fffpansion');\n $this->connection->chatSendServerMessage('$000P L U G I N P A C K ');\n $this->connection->chatSendServerMessage(\n 'Version ' . Core::EXP_VERSION . ' $n build '\n . date(\"Y-m-d\", Helper::getBuildDate()) . ''\n );\n if (DEBUG) {\n $this->connection->chatSendServerMessage('$f00$w DEBUG MODE enabled');\n }\n\n if ($this->storage->gameInfos->gameMode == GameInfos::GAMEMODE_SCRIPT) {\n $this->connection->triggerModeScriptEvent(\"LibXmlRpc_UnblockAllCallbacks\", \"\");\n try {\n $this->connection->setModeScriptSettings(array(\"S_UseScriptCallbacks\" => true));\n } catch (\\Exception $ex) {\n $this->console(\n \"Script mode running, but can't enable 'S_UseScriptCallbacks'... perhaps non-nadeo script running ?\"\n );\n }\n\n $this->connection->triggerModeScriptEvent(\"LibXmlRpc_UnblockAllCallbacks\", \"\");\n $this->enableScriptEvents(\"LibXmlRpc_Callbacks\");\n }\n\n //Started paralel download utility, thanks to xymph and other devs to have coded it. it rocks\n DataAccess::getInstance()->start();\n }", "title": "" }, { "docid": "061ccb778fc74db402c74b75ab0b022b", "score": "0.4669535", "text": "function step_5_write_config()\n{\n $log = new Tempcode();\n\n $base_url = post_param_string('base_url');\n if (substr($base_url, -1) == '/') {\n $base_url = substr($base_url, 0, strlen($base_url) - 1);\n }\n\n // Open up _config.php\n $config_file = '_config.php';\n $config_path = get_file_base() . '/' . $config_file;\n\n $config_contents = \"<\" . \"?php\\nglobal \\$SITE_INFO;\\n\";\n\n $config_contents .= '\n\nif (!function_exists(\\'git_repos\\')) {\n /**\n * Find the git branch name. This is useful for making this config file context-adaptive (i.e. dev settings vs production settings).\n *\n * @return ?ID_TEXT Branch name (null: not in git)\n */\n function git_repos()\n {\n $path = dirname(__FILE__).\\'/.git/HEAD\\';\n if (!is_file($path)) return \\'\\';\n $lines = file($path);\n $parts = explode(\\'/\\', $lines[0]);\n return trim(end($parts));\n }\n}\n\n';\n\n // Write in inputted settings\n foreach ($_POST as $key => $val) {\n if (in_array($key, array(\n 'ftp_password',\n 'ftp_password_confirm',\n 'master_password_confirm',\n 'cns_admin_password',\n 'cns_admin_password_confirm',\n\n 'clear_existing_forums_on_install',\n 'send_error_emails_ocproducts',\n 'board_path',\n 'confirm',\n 'email',\n 'interest_level',\n 'advertise_on',\n 'forum',\n 'max',\n 'use_msn',\n 'use_multi_db',\n\n 'gae_live_db_site',\n 'gae_live_db_site_host',\n 'gae_live_db_site_user',\n 'gae_live_db_site_password',\n ))) {\n continue;\n }\n\n if (($key == 'admin_username') && (post_param_string('forum_type') != 'none')) {\n continue;\n }\n\n if ((GOOGLE_APPENGINE) && (($key == 'domain') || ($key == 'base_url') || (substr($key, 0, 9) == 'db_forums'))) {\n continue;\n }\n\n if (get_magic_quotes_gpc()) {\n $val = stripslashes($val);\n }\n if ($key == 'master_password') {\n if (function_exists('password_hash')) { // PHP5.5+\n $val = password_hash($val, PASSWORD_BCRYPT, array('cost' => 12));\n } else {\n $val = '!' . md5($val . 'cms');\n }\n }\n if ($key == 'base_url') {\n $val = $base_url;\n }\n $_val = addslashes(trim($val));\n $config_contents .= '$SITE_INFO[\\'' . $key . '\\'] = \\'' . $_val . \"';\\n\";\n }\n\n // Derive a random session cookie name, to stop conflicts between sites\n if (!isset($_POST['session_cookie'])) {\n $config_contents .= '$SITE_INFO[\\'session_cookie\\'] = \\'cms_session__' . md5($base_url) . \"';\\n\";\n }\n\n // On the live GAE, we need to switch in different settings to the local dev server\n if (GOOGLE_APPENGINE) {\n $gae_live_code = \"\nif (appengine_is_live()) {\n \\$SITE_INFO['db_site'] = '\" . addslashes(post_param_string('gae_live_db_site')) . \"';\n \\$SITE_INFO['db_site_host'] = '\" . addslashes(post_param_string('gae_live_db_site_host')) . \"';\n \\$SITE_INFO['db_site_user'] = '\" . addslashes(post_param_string('gae_live_db_site_user')) . \"';\n \\$SITE_INFO['db_site_password'] = '\" . addslashes(post_param_string('gae_live_db_site_password')) . \"';\n \\$SITE_INFO['custom_file_base'] = '\" . addslashes('gs://' . post_param_string('gae_bucket_name')) . \"';\n if ((strpos(\\$_SERVER['HTTP_HOST'],'.appspot.com') !== false) || (!tacit_https())) {\n \\$SITE_INFO['custom_base_url'] = '\" . addslashes((tacit_https() ? 'https://' : 'http://') . post_param_string('gae_bucket_name') . '.storage.googleapis.com') . \"';\n } else { // Assumes a storage.<domain> CNAME has been created\n \\$SITE_INFO['custom_base_url'] = '\" . addslashes((tacit_https() ? 'https://' : 'http://') . 'storage.') . \"'.\\$_SERVER['HTTP_HOST'];\n }\n \\$SITE_INFO['no_extra_logs'] = '1';\n \\$SITE_INFO['no_disk_sanity_checks'] = '1';\n \\$SITE_INFO['no_installer_checks'] = '1';\n \\$SITE_INFO['disable_smart_decaching'] = '1';\n} else {\n \\$SITE_INFO['custom_file_base'] = '\" . addslashes(get_file_base() . '/data_custom/modules/google_appengine') . \"';\n \\$SITE_INFO['custom_base_url'] = '\" . addslashes(get_base_url() . '/data_custom/modules/google_appengine') . \"';\n\n // Or this for more accurate (but slower) testing (assumes app name matches bucket name)...\n //\\$SITE_INFO['custom_file_base'] = 'gs://\" . addslashes(post_param_string('gae_application')) . \"';\n //\\$SITE_INFO['custom_base_url'] = 'http://localhost:8080/data/modules/google_appengine/cloud_storage_proxy.php?';\n}\n\\$SITE_INFO['use_persistent_cache'] = '1';\n\\$SITE_INFO['self_learning_cache'] = '1';\n\\$SITE_INFO['charset'] = 'utf-8';\n\";\n $config_contents .= preg_replace('#^\\t\\t\\t#m', '', $gae_live_code);\n }\n\n // ---\n\n $success_status = cms_file_put_contents_safe($config_path, $config_contents, FILE_WRITE_FAILURE_SILENT | FILE_WRITE_FIX_PERMISSIONS);\n if (!$success_status) {\n warn_exit(do_lang_tempcode('INSTALL_WRITE_ERROR', escape_html($config_file)));\n }\n\n require_once(get_file_base() . '/' . $config_file);\n\n global $FILE_ARRAY, $DIR_ARRAY;\n if ((@is_array($FILE_ARRAY)) && (!is_suexec_like())) {\n $conn = false;\n $domain = trim(post_param_string('ftp_domain'));\n $port = 21;\n if (strpos($domain, ':') !== false) {\n list($domain, $_port) = explode(':', $domain, 2);\n $port = intval($_port);\n }\n if (function_exists('ftp_ssl_connect')) {\n $conn = @ftp_ssl_connect($domain, $port);\n }\n $ssl = ($conn !== false);\n\n $username = trim(post_param_string('ftp_username'));\n $password = trim(post_param_string('ftp_password'));\n\n if (($ssl) && (!@ftp_login($conn, $username, $password))) {\n $conn = false;\n $ssl = false;\n }\n if ($conn === false) {\n $conn = ftp_connect($domain, $port);\n }\n if (!$ssl) {\n ftp_login($conn, $username, $password);\n }\n $ftp_folder = post_param_string('ftp_folder');\n if (substr($ftp_folder, -1) != '/') {\n $ftp_folder .= '/';\n }\n ftp_chdir($conn, $ftp_folder);\n if (!is_suexec_like()) {\n @ftp_site($conn, 'CHMOD 666 _config.php'); // Can't be 644, because it might have been uploaded (thus not nobodies)\n }\n if (function_exists('ftp_close')) {\n ftp_close($conn);\n }\n }\n\n if (GOOGLE_APPENGINE) {\n require_code('files');\n\n // Copy in default php.ini file\n @unlink(get_file_base() . '/php.ini');\n copy(get_file_base() . '/data/modules/google_appengine/php.gae.ini', get_file_base() . '/php.ini');\n\n // Customise php.ini file\n $php_ini = file_get_contents(get_file_base() . '/php.ini');\n $php_ini = str_replace('<application>', post_param_string('gae_application'), $php_ini);\n cms_file_put_contents_safe(get_file_base() . '/php.ini', $php_ini | FILE_WRITE_FIX_PERMISSIONS);\n\n // Copy in default YAML files\n $dh = opendir(get_file_base() . '/data/modules/google_appengine');\n while (($f = readdir($dh)) !== false) {\n if (substr($f, -5) == '.yaml') {\n @unlink(get_file_base() . '/' . $f);\n copy(get_file_base() . '/data/modules/google_appengine/' . $f, get_file_base() . '/' . $f);\n }\n }\n\n // Customise app.yaml file\n $app_yaml = file_get_contents(get_file_base() . '/app.yaml');\n $app_yaml = preg_replace('#^application: .*$#m', 'application: ' . post_param_string('gae_application'), $app_yaml);\n cms_file_put_contents_safe(get_file_base() . '/app.yaml', $app_yaml | FILE_WRITE_FIX_PERMISSIONS);\n }\n\n $log->attach(do_template('INSTALLER_DONE_SOMETHING', array('_GUID' => '261a1eb80baed15cbbce1a684d4a354d', 'SOMETHING' => do_lang_tempcode('WROTE_CONFIGURATION'))));\n return $log;\n}", "title": "" }, { "docid": "ff5050ad40a821ce3edfa6688ea3e510", "score": "0.46691364", "text": "static function check_global_config($updateVersion = false, $file = '', $leave = array()){\n\t\tself::loadConfigs();\n\t\t$processedConfigs = ($file ?\n\t\t\t\t\t\tarray('global' => 'contentBak') :\n\t\t\t\t\t\tarray('global' => 'contentDef', 'conf' => 'contentDef'));\n\n\t\t$moveToConf = array('DB_SET_CHARSET');\n\t\tforeach($processedConfigs as $conf => $dataField){\n\t\t\t// Read the global configuration file\n\t\t\t$file_name = $GLOBALS['config_files']['conf_' . $conf]['filename'];\n\t\t\t//if we don't have content, make sure, we have at least an php-tag\n\t\t\t$oldContent = (trim(str_replace('?>', '', $GLOBALS['config_files']['conf_' . $conf]['contentBak']), \"\\n \")? : \"<?php \\n\");\n\n\t\t\tif($file && $file != $file_name){//=> this is intentended only for we_conf_global\n\t\t\t\t//we have the data from a backup file. We need to change e.g. DB-Settings, HTTP-User, ...\n\t\t\t\t$content = we_base_file::load($file);\n\t\t\t\t//leave settings in their current state\n\t\t\t\tforeach($leave as $settingname){\n\t\t\t\t\t$active = in_array($settingname, $moveToConf) ? ($conf === 'conf') : true;\n\t\t\t\t\t$content = self::changeSourceCode('define', $content, $settingname, (defined($settingname) ? constant($settingname) : ''), $active);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$content = $GLOBALS['config_files']['conf_' . $conf][$dataField];\n\t\t\t}\n\n\t\t\t// load & Cut closing PHP tag from configuration file\n\t\t\t$content = trim(str_replace(array('?>', \"\\n\\n\\n\\n\", \"\\n\\n\\n\"), array('', \"\\n\\n\", \"\\n\\n\"), $content), \"\\n \");\n\n\t\t\t// Go through all needed values\n\t\t\tforeach($GLOBALS['configs'][$conf] as $define => $value){\n\t\t\t\tif(!preg_match('/define\\([\"\\']' . $define . '[\"\\'],/', $content)){\n\t\t\t\t\t// Add needed variable\n\t\t\t\t\t$active = in_array($define, $moveToConf) ? ($conf === 'conf') : ($conf == 'global' ? true : defined($define));\n\t\t\t\t\t$content = self::changeSourceCode('add', $content, $define, (defined($define) ? constant($define) : $value[2]), $active, $value[0], isset($value[3]) && $conf != 'global'/* access restriction */ ? $value[3] : false);\n\t\t\t\t\t//define it in running session\n\t\t\t\t\tif(!defined($define) && $active){\n\t\t\t\t\t\tdefine($define, $value[2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($conf == 'global' && $updateVersion){\n\t\t\t\t$content = self::changeSourceCode('define', $content, 'CONF_SAVED_VERSION', str_replace(array('$Rev$'), '', WE_SVNREV), true);\n\t\t\t}\n\t\t\t$GLOBALS['config_files']['conf_' . $conf]['contentBak'] = $oldContent;\n\t\t\t$GLOBALS['config_files']['conf_' . $conf]['content'] = $content;\n\t\t}\n// Check if we need to rewrite the config file\n\t\tself::saveConfigs();\n\t}", "title": "" }, { "docid": "15acd489d68122d7f854eefd8c2c1607", "score": "0.4668688", "text": "function cplus_extension_installer() {\n\t\tinclude_once BSF_UPDATER_PATH . '/plugin-installer/index.php';\n\t}", "title": "" }, { "docid": "496a16d9dec9e4ba77066cdfca14d89c", "score": "0.46675792", "text": "function compileSampleProject()\n{\n\t$configFile = dirname(__FILE__) . '/config.xml';\n\t$compiler \t= new TinyQueries\\Compiler( $configFile );\n\t\n\t$compiler->compile();\n}", "title": "" }, { "docid": "0f16e8900c78059488ac996e2f36d6b1", "score": "0.46586382", "text": "protected function copiar_framework()\n\t{\n\t\t$this->manejador_interface->mensaje(\"Copiando framework\", false);\t\n\t\t$empaquetado = $this->ini_file->get_datos_entrada('empaquetado');\n\t\t$librerias = array();\n\t\t$proyectos = array();\n\t\tif (isset($empaquetado['librerias'])) {\n\t\t\t$librerias = explode(',', $empaquetado['librerias']);\n\t\t\t$librerias = array_map('trim', $librerias);\n\t\t}\n\t\tif (isset($empaquetado['proyectos_extra'])) {\n\t\t\t$proyectos = explode(',', $empaquetado['proyectos_extra']);\n\t\t\t$proyectos = array_map('trim', $proyectos);\n\t\t\t$proyectos = array_diff($proyectos, array('toba_editor'));\n\t\t}\t\t\n\t\t$instalacion = $this->proyecto->get_instalacion();\n\t\t$destino_instalacion = $this->get_dir_destino(). '/proyectos/'.$this->proyecto->get_id().'/toba';\n\t\t$instalacion->empaquetar_en_carpeta($destino_instalacion, $librerias, $proyectos);\t\t\n\t}", "title": "" }, { "docid": "4bc244decf6465618f9a32781ae48899", "score": "0.4655779", "text": "function framework_set_extmap() {\n\tglobal $db;\n\t$full_list = framework_check_extension_usage(true);\n\tforeach ($full_list as $module => $entries) {\n\t\tforeach ($entries as $exten => $stuff) {\n\t\t\t$extmap[$exten] = $stuff['description'];\n\t\t}\n\t}\n $extmap_serialized = $db->escapeSimple(serialize($extmap));\n sql(\"REPLACE INTO `module_xml` (`id`, `time`, `data`) VALUES ('extmap_serialized', '\".time().\"','\".$extmap_serialized.\"')\");\n}", "title": "" }, { "docid": "d546934048a03cd26d3fdf91b804d6b6", "score": "0.4652986", "text": "protected function comprobarExtension() {\n if (!in_array($this->ext, $this->allow_list)) {\n trigger_error(\"Tipo de archivo no permitido\" . $this->ext);\n exit();\n }\n }", "title": "" }, { "docid": "5b1ae1a0f006759cc31e33e8561031bc", "score": "0.4649632", "text": "function fixMailConfiguration()\n\t{\n\t\t# purpose: in case mail/ehcp configuration is corrupted, or ehcp mysql db pass changed, update system configuration accordingly\n\t\t# this function was for mail configuration at start, became whole ehcp configuration later.. included vsftpd, net2ftp... and so on..\n\t\t$this->requireCommandLine(__FUNCTION__);\n\n\t\tinclude_once(\"install_lib.php\");\n\t\t$this->write_file_if_not_exists('/etc/mailname', 'mail.myserver.com'); # on some systems, this is deleted somehow.\n\t\tif (!file_exists('/etc/postfix/main.cf'))\n\t\t\tpassthru2(\"cp \" . $this->ehcpdir . \"/etc/postfix/main.cf.sample /etc/postfix/main.cf\"); # on some systems, this is deleted somehow.\n\n\t\t$params = array('ehcppass' => $this->dbpass);\n\t\t$params2 = array_merge($params, array('ehcpinstalldir' => $this->conf['ehcpdir']));\n\n\t\tglobal $ip, $ehcpmysqlpass, $ehcpinstalldir;\n\t\tinclude('config.php');\n\n\t\t$ip = $this->miscconfig['dnsip'];\n\t\t$ehcpmysqlpass = $dbpass;\n\t\t$ehcpinstalldir = $this->conf['ehcpdir'];\n\n\t\t$this->adjust_webmail_dirs();\n\t\tmailconfiguration($params);\n\t\tpassthru2('newaliases');\n\n\t\tnet2ftp_configuration($params2);\n\n\t\t$this->syncDns();\n\t\t$this->syncDomains();\n\n\t\tpassthru2(\"chmod a+w \" . $this->ehcpdir . \"/webmail/data\");\n\t\tpassthru2(\"chmod a+w \" . $this->ehcpdir . \"/net2ftp/temp\");\n\t\tmanageService(\"vsftpd\", \"restart\");\n\t\tmanageService(\"postfix\", \"restart\");\n\n\t\treturn True;\n\t}", "title": "" }, { "docid": "bd7345aca1fb6b7fa79f10e3773f05a7", "score": "0.4648591", "text": "public function build()\n\t{\n $configCreated = $this->createConfig();\n if ($configCreated) {\n\t\t\t$propel_command\t\t\t= sprintf(\n\t\t\t\t'%s/bin/propel model:build --config-dir=\"%s\" --schema-dir=\"%s\" --output-dir=\"%s\"',\n\t\t\t $this->_getVendorPath(),\n\t\t\t $this->getModuleConfigPath(),\n\t\t\t\t$this->getModuleSchemaPath(),\n\t\t\t\t$this->getModuleClassPath());\n\t\t\texec($propel_command,$output);\n print \"Building Model Classes for Module: \" . $this->getModuleName() . \"\\n\";\n print implode(\"\\n\",$output);\n\t\t}\n\t}", "title": "" }, { "docid": "6c1a0c2f50b359cdda2b94a0ddcd2c74", "score": "0.4645875", "text": "function install()\n {\n\treturn array(\n\t 'php_code' => '$value=\"\";\\r\\n' \n\t);\n }", "title": "" }, { "docid": "7860401d00e31f5a7fe37f77e40cf912", "score": "0.46357208", "text": "function makeUploadArray($extKey,$extInfo) {\n\t\t$extPath = $extInfo['path'];\n\n\t\tif ($extPath) {\n\n\t\t\t\t// Get files for extension:\n\t\t\t$fileArr = array();\n\t\t\t$fileArr = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getAllFilesAndFoldersInPath($fileArr,$extPath);\n\n\t\t\t\t// Calculate the total size of those files:\n\t\t\t$totalSize = 0;\n\t\t\tforeach ($fileArr as $file) {\n\t\t\t\t$totalSize+=filesize($file);\n\t\t\t}\n\n\t\t\t\t// If the total size is less than the upper limit, proceed:\n\t\t\tif ($totalSize < $this->maxUploadSize) {\n\n\t\t\t\t\t// Initialize output array:\n\t\t\t\t$uploadArray = array();\n\t\t\t\t$uploadArray['extKey'] = $extKey;\n\t\t\t\t$uploadArray['EM_CONF'] = $extInfo['EM_CONF'];\n\t\t\t\t$uploadArray['misc']['codelines'] = 0;\n\t\t\t\t$uploadArray['misc']['codebytes'] = 0;\n\n#\t\t\t\t$uploadArray['techInfo'] = $this->makeDetailedExtensionAnalysis($extKey,$conf,1);\n\n\t\t\t\t\t// Read all files:\n\t\t\t\tforeach ($fileArr as $file) {\n\t\t\t\t\t$relFileName = substr($file,strlen($extPath));\n\t\t\t\t\t$fI = pathinfo($relFileName);\n\t\t\t\t\tif ($relFileName!='ext_emconf.php') {\t\t// This file should be dynamically written...\n\t\t\t\t\t\t$uploadArray['FILES'][$relFileName] = array(\n\t\t\t\t\t\t\t'name' => $relFileName,\n\t\t\t\t\t\t\t'size' => filesize($file),\n\t\t\t\t\t\t\t'mtime' => filemtime($file),\n\t\t\t\t\t\t\t'is_executable' => (TYPO3_OS=='WIN' ? 0 : is_executable($file)),\n\t\t\t\t\t\t\t'content' => \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getUrl($file)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::inList('php,inc',strtolower($fI['extension']))) {\n\t\t\t\t\t\t\t$uploadArray['FILES'][$relFileName]['codelines']=count(explode(LF,$uploadArray['FILES'][$relFileName]['content']));\n\t\t\t\t\t\t\t$uploadArray['misc']['codelines']+=$uploadArray['FILES'][$relFileName]['codelines'];\n\t\t\t\t\t\t\t$uploadArray['misc']['codebytes']+=$uploadArray['FILES'][$relFileName]['size'];\n\n\t\t\t\t\t\t\t\t// locallang*.php files:\n\t\t\t\t\t\t\tif (substr($fI['basename'],0,9)=='locallang' && strstr($uploadArray['FILES'][$relFileName]['content'],'$LOCAL_LANG'))\t{\n\t\t\t\t\t\t\t\t$uploadArray['FILES'][$relFileName]['LOCAL_LANG']=$this->getSerializedLocalLang($file,$uploadArray['FILES'][$relFileName]['content']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$uploadArray['FILES'][$relFileName]['content_md5'] = md5($uploadArray['FILES'][$relFileName]['content']);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\t// Return upload-array:\n\t\t\t\treturn $uploadArray;\n\t\t\t} else return 'Error: Total size of uncompressed upload ('.$totalSize.') exceeds '.\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::formatSize($this->maxUploadSize);\n\t\t}\n\t}", "title": "" }, { "docid": "e41c026be384d2766fd2f2a6e2cb88f3", "score": "0.46356553", "text": "public function compile(NodeTree $tree) {\n\n\t\t// Compile the node tree\n\t\t$this->compileNode($tree->getRoot());\n\n\t\t// Create the helperStack property\n\t\t$property = new PHPProperty('helperStack', new PHPValue($this->helperStack, PHPValue::TYPE_ARRAY));\n\t\t$this->class->addProperty($property);\n\n\t\t// Create the blockMap property\n\t\t$property = new PHPProperty('blockMap', new PHPValue($this->blockMap, PHPValue::TYPE_ARRAY));\n\t\t$this->class->addProperty($property);\n\n\t\t// Create the encoding property\n\t\t$property = new PHPProperty('encoding', new PHPValue($tree->getEncoding(), PHPValue::TYPE_STRING));\n\t\t$this->class->addProperty($property);\n\n\t\t// Generate the file\n\t\t$content = $this->file->generate();\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "1f24fbcb36bdb7c09afc84f5bf5e2810", "score": "0.46307483", "text": "function write_configuration()\n\t{\n\t\t//-----------------------------------------\n\t\t// Safe mode?\n\t\t//-----------------------------------------\n\t\t\n\t\t$safe_mode = 0;\n\n\t\tif ( @get_cfg_var('safe_mode') )\n\t\t{\n\t\t\t$safe_mode = @get_cfg_var('safe_mode');\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set info array\n\t\t//-----------------------------------------\n\t\t\n\t\t$INFO = array( \n\t\t\t\t\t 'sql_driver' => $this->saved_data['sql_driver'],\n\t\t\t\t\t 'sql_host' => $this->saved_data['db_host'],\n\t\t\t\t\t 'sql_database' => $this->saved_data['db_name'],\n\t\t\t\t\t 'sql_user' => $this->saved_data['db_user'],\n\t\t\t\t\t 'sql_pass' => $this->saved_data['db_pass'],\n\t\t\t\t\t 'sql_tbl_prefix' => $this->saved_data['db_pre'],\n\t\t\t\t\t 'sql_debug' => 1,\n\n\t\t\t\t\t 'board_start' => time(),\n\t\t\t\t\t 'installed' => 1,\n\n\t\t\t\t\t 'php_ext' => 'php',\n\t\t\t\t\t 'safe_mode' => $safe_mode,\n\n\t\t\t\t\t 'board_url' => $this->saved_data['install_url'],\n\t\t\t\t\t \n\t\t\t\t\t 'banned_group' => '5',\n\t\t\t\t\t 'admin_group'\t=> '4',\n\t\t\t\t\t 'guest_group' => '2',\n\t\t\t\t\t 'member_group' => '3',\n\t\t\t\t\t 'auth_group'\t\t=> '1',\n\t\t\t\t\t );\n\t\t\t\t\t\n\t\t//-----------------------------------\n\t\t// Any \"extra\" configs required for this driver?\n\t\t//-----------------------------------\n\t\t\n\t\tforeach( $this->saved_data as $k => $v )\n\t\t{\n\t\t\tif ( preg_match( \"#^__sql__#\", $k ) )\n\t\t\t{\n\t\t\t\t$k = str_replace( \"__sql__\", \"\", $k );\n\t\t\t\t\n\t\t\t\t$INFO[ $k ] = $v;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------\n\t\t// Write to disk\n\t\t//-----------------------------------\n\n\t\t$core_conf = \"<\".\"?php\\n\";\n\n\t\tforeach( $INFO as $k => $v )\n\t\t{\n\t\t\t$core_conf .= '$INFO['.\"'\".$k.\"'\".']'.\"\\t\\t\\t=\\t'\".$v.\"';\\n\";\n\t\t}\n\n\t\t$core_conf .= \"\\n\".'?'.'>';\n\n\t\t/* Write Configuration Files */\n\t\t$output[] = 'Сохранение конфигурационных файлов...<br />';\n\t\t\n\t\t$this->write_file( $this->saved_data['install_dir'] . '/conf_global.php' , $core_conf );\n\t}", "title": "" }, { "docid": "b77a0c828b3e6fe727726434d00cf97f", "score": "0.46146485", "text": "public function generate() {\n $code = array();\n\n $code[] = 'if (PHP_SAPI === \"cli\") {';\n $srvVars = array(\n 'SCRIPT_FILENAME',\n 'REMOTE_ADDR',\n 'SERVER_SOFTWARE',\n 'REQUEST_METHOD',\n 'SCRIPT_NAME',\n );\n foreach ($srvVars as $srvVar) {\n $code[] = sprintf('$_SERVER[\"%s\"] = %s;',\n $srvVar, var_export($_SERVER[$srvVar], 1));\n }\n foreach (array('CIVICRM_UF') as $envVar) {\n if (getenv($envVar)) {\n $code[] = sprintf('putenv(\"%s=\" . %s);', $envVar, var_export(getenv($envVar), 1));\n $code[] = sprintf('$_ENV[\"%s\"] = %s;', $envVar, var_export(getenv($envVar), 1));\n }\n }\n $code[] = '}';\n\n $code[] = sprintf('$GLOBALS[\\'_CV\\'] = %s;', var_export($GLOBALS['_CV'], 1));\n\n $code[] = sprintf('define(\"CIVICRM_SETTINGS_PATH\", %s);', var_export(CIVICRM_SETTINGS_PATH, 1));\n $code[] = '$error = @include_once CIVICRM_SETTINGS_PATH;';\n $code[] = 'if ($error == FALSE) {';\n $code[] = ' throw new \\Exception(\"Could not load the CiviCRM settings file: {$settings}\");';\n $code[] = '}';\n\n $code[] = 'require_once $GLOBALS[\"civicrm_root\"] . \"/CRM/Core/ClassLoader.php\";';\n $code[] = '\\CRM_Core_ClassLoader::singleton()->register();';\n\n return implode(\"\\n\", $code);\n }", "title": "" }, { "docid": "7c8af7861df7a02ce394597543e062c8", "score": "0.46123642", "text": "public function getConfig() {\n return include __DIR__.\"/../config/module.config.php\";\n }", "title": "" }, { "docid": "32f45ad39d9bbd4735985f6648c92f8d", "score": "0.46121624", "text": "static function loadConfigs(){\n\t\t$GLOBALS['config_files'] = array(\n\t\t\t// we_conf.inc.php\n\t\t\t'conf_conf' => array(\n\t\t\t\t'filename' => WE_INCLUDES_PATH . 'conf/we_conf.inc.php',\n\t\t\t\t'content' => '',\n\t\t\t\t'contentBak' => '',\n\t\t\t\t'contentDef' => '',\n\t\t\t),\n\t\t\t// we_conf_global.inc.php\n\t\t\t'conf_global' => array(\n\t\t\t\t'filename' => WE_INCLUDES_PATH . 'conf/we_conf_global.inc.php',\n\t\t\t\t'content' => '',\n\t\t\t\t'contentBak' => '',\n\t\t\t\t'contentDef' => '',\n\t\t\t),\n\t\t\t// proxysettings.inc.php\n\t\t\t'conf_proxysettings' => array(\n\t\t\t\t'filename' => WEBEDITION_PATH . 'liveUpdate/includes/proxysettings.inc.php',\n\t\t\t\t'content' => '',\n\t\t\t\t'contentBak' => '',\n\t\t\t\t'contentDef' => '',\n\t\t\t),\n\t\t\t// we_active_integrated_modules.inc.php\n\t\t\t'conf_active_integrated_modules' => array(\n\t\t\t\t'filename' => WE_INCLUDES_PATH . 'conf/we_active_integrated_modules.inc.php',\n\t\t\t\t'content' => '',\n\t\t\t\t'contentBak' => '',\n\t\t\t\t'contentDef' => '',\n\t\t\t),\n\t\t);\n\t\tforeach($GLOBALS['config_files'] as &$config){\n\t\t\t$config['content'] = we_base_file::load($config['filename']);\n\t\t\t$config['contentBak'] = $config['content'];\n\t\t\t$config['contentDef'] = we_base_file::load($config['filename'] . '.default')? : '<?php ';\n\t\t}\n\t\t//finally add old session prefs\n\t\t$GLOBALS['config_files']['oldPrefs'] = isset($_SESSION['prefs']) ? $_SESSION['prefs'] : array();\n\t}", "title": "" }, { "docid": "a1c19ec80b9b6703cf54378a35634501", "score": "0.46054262", "text": "private function chkConfig()\n\t{\n\t\t$this->config['configok'] = 1;\n\t\t$php_version = PHP_VERSION;\n\t\tif(version_compare($php_version,\"5.2.0\")>0)\n\t\t\t$this->config['php'] = '<span class=\"installed\">Installed</span>'; \n\t\telse\n\t\t{\n\t\t\t$this->config['php'] = '<span class=\"off_txt\">Not Installed</span>';\n\t\t\t$this->config['configok'] = 0;\n\t\t}\n\t\t\t\n\t\tif(@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')\n\t\t\t$this->config['regglobals'] = '<span class=\"off_txt\">ON</span>';\n\t\telse\n\t\t\t$this->config['regglobals'] = '<span class=\"installed\">OFF</span>';\n\t\t\n\t\tif(extension_loaded('GD'))\n\t\t\t$this->config['gd'] = '<span class=\"installed\">Installed</span>';\n\t\telse\n\t\t{\n\t\t\t$this->config['gd'] = '<span class=\"off_txt\">Not Installed</span>';\t\n\t\t\t$this->config['configok'] = 0;\n\t\t}\n\t\t\t\t\n\t\tif(extension_loaded('CURL'))\n\t\t\t$this->config['curl'] = '<span class=\"installed\">Installed</span>';\n\t\telse\n\t\t{\n\t\t\t$this->config['curl'] = '<span class=\"off_txt\">Not Installed</span>';\t\n\t\t\t$this->config['configok'] = 0;\n\t\t}\n\n\t\tif(extension_loaded('SimpleXML'))\n\t\t\t$this->config['sxml'] = '<span class=\"installed\">Installed</span>';\n\t\telse\n\t\t{\n\t\t\t$this->config['sxml'] = '<span class=\"off_txt\">Not Installed</span>';\t\n\t\t\t$this->config['configok'] = 0;\n\t\t}\n\n\t\tif(extension_loaded('MySQL'))\n\t\t\t$this->config['mysql'] = '<span class=\"installed\">Installed</span>';\n\t\telse\n\t\t{\n\t\t\t$this->config['mysql'] = '<span class=\"off_txt\">Not Installed</span>';\t\n\t\t\t$this->config['configok'] = 0;\n\t\t}\n\t\t\n\t\t\n\t\t$folders777=array(\n\t\t\t'../images',\n\t\t\t'../images/homepageads',\n\t\t\t'../images/slidesupload',\n\t\t\t'../images/slidesupload/thumb',\n\t\t\t'../images/logo',\n\t\t\t'../images/products',\n\t\t\t'../images/products/thumb',\n\t\t\t'../images/products/large_image',\n\t\t\t'../images/sociallink',\t\t\n\t\t\t'../Bin', \n\t\t\t'../Bin/Configuration',\n\t\t\t'../Built', \n\t\t\t'../cache', \n\t\t\t'../uploadedimages',\n\t\t\t'../uploadedimages/caticons',\t\t\t \n\t\t\t'../upload_bulk_products', \n\t\t\t'../admin/cache', \n\t\t\t'../admin/uploadedtsvfile',\n\t\t\t'../admin/download',\n\t\t\t'../admin/uploadedbulkimages',\n\t\t\t'../includes',\n\t\t\t'../includes/Charts',\n\t\t\t'../timthumb',\n\t\t\t'../timthumb/cache'); \t\n\t\t\n\t\t$i=1;\n\t\tforeach($folders777 as $folder)\n\t\t{\n\t\t if(@is_writable($folder)) \n\t\t {\n\t\t\t $this->config['filepermit'.$i] = '<span class=\"installed\">Writable</span>';\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $this->config['filepermit'.$i] = '<span class=\"off_txt\">Not Writable</span>';\t\t\n\t\t\t $this->config['configok'] = 0;\n\t\t }\t\n\t\t $i++;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "3ae20ced50a303fcf0012197560867c0", "score": "0.46041375", "text": "public function moptRegisterController_Frontend_MoptPaymentEcs() {\n $this->Application()->Snippets()->addConfigDir($this->Path() . 'snippets/');\n return $this->Path() . 'Controllers/Frontend/MoptPaymentEcs.php';\n }", "title": "" }, { "docid": "0af592e6e7f7a3f46c1c17752b7efde1", "score": "0.46040878", "text": "public function main($content, $conf) {\r\n\t\t//global $LANG;\r\n\r\n\t\t//initiate\r\n\t\t$this->pi_initPIflexForm();\r\n\t\t$db = $GLOBALS['TYPO3_DB'];\r\n\t\t$this->conf = $conf;\r\n\t\t$this->pi_loadLL();\r\n\r\n\t\t// get the extension-manager configuration\r\n\t\t$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rs_securedownload']);\r\n\t\tif (!isset($this->extConf['enableIpLogging'])) {\r\n\t\t\t$this->extConf['enableIpLogging'] = 0;\r\n\t\t}\r\n\t\tif (!isset($this->extConf['enableNameLogging'])) {\r\n\t\t\t$this->extConf['enableNameLogging'] = 0;\r\n\t\t}\r\n\t\tif (strlen($this->extConf['templateFile']) < 1) {\r\n\t\t\t$this->extConf['templateFile'] = t3lib_extMgm::siteRelPath($this->extKey).'pi1/template.htm';\r\n\t\t}\r\n\r\n\t\t//set important values\r\n\t\t$pid = $this->cObj->data['pid'];\r\n\t\t$uid = $this->cObj->data['uid'];\r\n\t\t$pathUploads = t3lib_div::dirname($_SERVER['SCRIPT_FILENAME']).'/uploads/tx_rssecuredownload/';\r\n\t\t$pluginPath = t3lib_extMgm::siteRelPath($this->extKey);\r\n\r\n\t\t//get data from flexform\r\n\t\t$tryall = $this->FF('tryall', 'general');\r\n\t\t$downloadid = $this->FF('downloadselect', 'general');\r\n\r\n\t\t//get the HTML template:\r\n\t\t$this->templateCode = $this->cObj->fileResource($this->extConf['templateFile']);\r\n\t\t// Get the subparts from the HTML template.\r\n\t\tif($this->templateCode) {\r\n\t\t\t$t = array();\r\n\t\t\t$t['total'] = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE###');\r\n\t\t\t$t['description'] = $this->cObj->getSubpart($t['total'], '###SUB_DESCRIPTION###');\r\n\t\t\t$t['error'] = $this->cObj->getSubpart($t['total'], '###SUB_ERROR###');\r\n\t\t\t$t['download'] = $this->cObj->getSubpart($t['total'], '###SUB_DOWNLOAD###');\r\n\t\t\t$t['form'] = $this->cObj->getSubpart($t['total'], '###SUB_FORM###');\r\n\t\t}\r\n\r\n\t\t$markerArray = array();\r\n\t\t$subpartArray = array(\r\n\t\t\t'###SUB_DESCRIPTION###' => '',\r\n\t\t\t'###SUB_ERROR###' => '',\r\n\t\t\t'###SUB_DOWNLOAD###' => '',\r\n\t\t\t'###SUB_FORM###' => '',\r\n\t\t);\r\n\r\n\t\tif (($this->piVars['senderuid'] == $uid) && ($this->piVars['action'] != '')) {\r\n\t\t\t$action = $this->piVars['action'];\r\n\t\t\t$givenCode = htmlspecialchars($this->piVars['code']);\r\n\t\t} else {\r\n\t\t\t$action = 'getCode';\r\n\t\t}\r\n\r\n\t\tswitch ($action) {\r\n\t\t\tcase 'checkCode':\r\n\t\t\t\tif ( ($tryall == 1) && ($this->piVars['download'] == 0) ) {\r\n\t\t\t\t\t$code_query = $db->exec_SELECTquery('*', 'tx_rssecuredownload_codes', 'code=\"' . addslashes($givenCode) . '\"' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$code_query = $db->exec_SELECTquery('*', 'tx_rssecuredownload_codes', 'uid=\"' . addslashes($downloadid) . '\" AND code=\"' . addslashes($givenCode) . '\"' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (($tryall == 0) && ($this->piVars['download'] != $downloadid)) {break;}\r\n\r\n\t\t\t\t$markerArray['###TITLE###'] = $this->pi_getLL('titleall');\r\n\r\n\t\t\t\t$log = $this->UserDataArray();\r\n\t\t\t\t$log['docid'] = $this->piVars['download'];\r\n\t\t\t\t$log['pid'] = $pid;\r\n\r\n\t\t\t\tif ($db->sql_num_rows($code_query) > 0) {\r\n\t\t\t\t\t$code = $db->sql_fetch_assoc($code_query);\r\n\t\t\t\t\t$markerArray['###TITLE###'] = $code['title'];\r\n\r\n\t\t\t\t\tif ( ($code['starttime'] == 0 && $code['endtime'] == 0 ) ||\r\n\t\t\t\t\t\t\t ($code['starttime'] == 0 && date('Y-m-d', $code['endtime']) >= date('Y-m-d', strtotime(date('Y-m-d'))) ) ||\r\n\t\t\t\t\t\t\t (date('Y-m-d', $code['starttime']) <= date('Y-m-d', strtotime(date('Y-m-d'))) && $code['endtime'] == 0 ) ||\r\n\t\t\t\t\t\t\t (date('Y-m-d', $code['starttime']) <= date('Y-m-d', strtotime(date('Y-m-d'))) && date('Y-m-d', $code['endtime']) >= date('Y-m-d', strtotime(date('Y-m-d'))) ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($code['hidden'] == 0) {\r\n\t\t\t\t\t\t\t$markerArray['###TITLE###'] = $code['title'];\r\n\t\t\t\t\t\t\tif ($code['description'] != '') {\r\n\t\t\t\t\t\t\t\t$subpartArray['###SUB_DESCRIPTION###'] = $this->cObj->substituteMarker($t['description'], '###DESCRIPTION###', $code['description']);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (file_exists('rssecuredownload.php')) {\r\n\t\t\t\t\t\t\t\t$subpartArray['###SUB_DOWNLOAD###'] = \r\n\t\t\t\t\t\t\t\t\t$this->cObj->substituteMarker($t['download'], '###DOWNLOAD###', '<a href=\"'.'rssecuredownload.php\">'.$this->pi_getLL('start_download').'</a>');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$subpartArray['###SUB_DOWNLOAD###'] = \r\n\t\t\t\t\t\t\t\t\t$this->cObj->substituteMarker($t['download'], '###DOWNLOAD###', '<a href=\"'.$pluginPath.'rssecuredownload.php\">'.$this->pi_getLL('start_download').'</a>');\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t$db->exec_INSERTquery('tx_rssecuredownload_logs', $log );\r\n\r\n\t\t\t\t\t\t\t//set data in session for download.php\r\n\t\t\t\t\t\t\tsession_start();\r\n\t\t\t\t\t\t\t$_SESSION[$this->prefixId]['file'] = $pathUploads.$code['file'];\r\n\t\t\t\t\t\t\t$_SESSION[$this->prefixId]['title'] = $code['file'];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$markerTemp['###ERROR###'] = $this->pi_getLL('error3');\r\n\t\t\t\t\t\t\t$markerTemp['###ERROR_NR###'] = 3;\r\n\t\t\t\t\t\t\t$log['error'] = 3;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$markerTemp['###ERROR###'] = $this->pi_getLL('error2');\r\n\t\t\t\t\t\t$markerTemp['###ERROR_NR###'] = 2;\r\n\t\t\t\t\t\t$log['error'] = 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$markerTemp['###ERROR###'] = sprintf($this->pi_getLL('error1'), $givenCode);\r\n\t\t\t\t\t$markerTemp['###ERROR_NR###'] = 1;\r\n\t\t\t\t\t$log['error'] = 1;\r\n\t\t\t\t\t$log['errortext'] = $givenCode;\r\n\t\t\t\t}\r\n\t\t\t\t$subpartArray['###SUB_ERROR###'] = $this->cObj->substituteMarkerArray($t['error'], $markerTemp);\r\n\r\n\t\t\t\t$db->exec_INSERTquery('tx_rssecuredownload_logs', $log );\r\n\r\n\t\t\t\t$query_local = $db->exec_SELECTquery('*', 'tx_rssecuredownload_codes', 'uid=\"'.addslashes($downloadid).'\"');\r\n\t\t\t\tif ($db->sql_num_rows($query_local) == 1) {\r\n\t\t\t\t\t$row = $db->sql_fetch_assoc($query_local);\r\n\r\n\t\t\t\t\t$markerArray['###TITLE###'] = $row['title'];\r\n\t\t\t\t\tif ($row['description'] != '') {\r\n\t\t\t\t\t\t$subpartArray['###SUB_DESCRIPTION###'] = $this->cObj->substituteMarker($t['description'], '###DESCRIPTION###', $row['description']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($tryall == 1) {\r\n\t\t\t\t\t\t$downloadid = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!empty($row['file'])) {\r\n\t\t\t\t\t\t$markerTemp['###FORM_ACTION###'] = $this->pi_getPageLink($pid);\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] = '<input type=\"hidden\" name=\"'.$this->prefixId.'[action]\" value=\"checkCode\" />';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[download]\" value=\"'.$downloadid.'\" />';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[senderuid]\" value=\"'.$uid.'\" />';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"text\" name=\"'.$this->prefixId.'[code]\" value=\"'.$row['codeprompt'].'\" />&nbsp;&nbsp;';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"submit\" value=\"'.$this->pi_getLL('send_download').'\" />';\r\n\t\t\t\t\t\t$subpartArray['###SUB_FORM###'] = $this->cObj->substituteMarkerArray($t['form'], $markerTemp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'getCode':\r\n\t\t\t\t$query_local = $db->exec_SELECTquery('*', 'tx_rssecuredownload_codes', 'uid=\"'.addslashes($downloadid).'\"');\r\n\t\t\t\tif ($db->sql_num_rows($query_local) == 1) {\r\n\t\t\t\t\t$row = $db->sql_fetch_assoc($query_local);\r\n\r\n\t\t\t\t\t$markerArray['###TITLE###'] = $row['title'];\r\n\t\t\t\t\tif ($row['description'] != '') {\r\n\t\t\t\t\t\t$subpartArray['###SUB_DESCRIPTION###'] = $this->cObj->substituteMarker($t['description'], '###DESCRIPTION###', $row['description']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($tryall == 1) {\r\n\t\t\t\t\t\t$downloadid = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!empty($row['file'])) {\r\n\t\t\t\t\t\t$markerTemp['###FORM_ACTION###'] = $this->pi_getPageLink($pid);\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] = '<input type=\"hidden\" name=\"'.$this->prefixId.'[action]\" value=\"checkCode\" />';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[download]\" value=\"'.$downloadid.'\" />';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"hidden\" name=\"'.$this->prefixId.'[senderuid]\" value=\"'.$uid.'\" />';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"text\" name=\"'.$this->prefixId.'[code]\" value=\"'.$row['codeprompt'].'\" />&nbsp;&nbsp;';\r\n\t\t\t\t\t\t$markerTemp['###FORM_FIELDS###'] .= '<input type=\"submit\" value=\"'.$this->pi_getLL('send_download').'\" />';\r\n\t\t\t\t\t\t$subpartArray['###SUB_FORM###'] = $this->cObj->substituteMarkerArray($t['form'], $markerTemp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t$content = $this->cObj->substituteMarkerArray($t['total'], $markerArray);\r\n\t\tforeach ($subpartArray as $subPart => $subContent) {\r\n\t\t\t$content = $this->cObj->substituteSubpart($content, $subPart, $subContent);\r\n\t\t}\r\n\t\treturn $this->pi_wrapInBaseClass($content);\r\n\t}", "title": "" }, { "docid": "90079f98bf863e44dd14e0b6db113c8c", "score": "0.46007553", "text": "private function includeDependencies ()\n {\n require_once THEME_DIR . '/includes/deps/config.php';\n }", "title": "" }, { "docid": "dc9a9e709a59302089b56036ec76c8cc", "score": "0.45996925", "text": "private function configureClassesToCompile()\n {\n $this->addClassesToCompile([\n SeoRouter::class,\n SeoRouterSubscriber::class,\n SeoExtension::class,\n ]);\n }", "title": "" }, { "docid": "22b5a115eff7cba4737d5ad1ca8738b8", "score": "0.45951095", "text": "public function setupPhpConfig() {\n\t\terror_reporting(E_ALL);\n\t\tini_set('display_errors', true);\n\t\tini_set('default_charset', 'ISO-8859-1');\n\t\tdate_default_timezone_set('Asia/Calcutta');\n\t}", "title": "" }, { "docid": "23c616184ca1bd7c624be3a5064158d7", "score": "0.4595035", "text": "function cyz_create_cyz_config_file(){\n $config_content = cyz_get_cyz_config_file_content();\n\n /** Directory where apache htaccess resides */\n $config_dir = '/cyz-gen/';\n\n // Create Directory if does not exists\n if(!is_dir(ABSPATH.$config_dir)) mkdir(ABSPATH.$config_dir);\n\n /** Directory where apache htaccess resides */\n $config_dir = '/cyz-gen/config/';\n\n // Create Directory if does not exists\n if(!is_dir(ABSPATH.$config_dir)) mkdir(ABSPATH.$config_dir);\n\n /** Directory where apache htaccess Filename */\n $config_filename = 'cyz-config.php';\n\n /** File Operator Object */\n $file_worker = new cyz_file_op();\n\n /** Check write permission */\n $is_dir_writeable = $file_worker->writeable($config_dir);\n\n /** Check if directory is writeable */\n if(!$is_dir_writeable['status']) return [\n 'status' => false,\n 'description' => 'Application directory not writable.'\n ];\n \n /** Create new/update htaccess file */\n $config_file_updated = $file_worker->update_file(\n $config_dir.$config_filename,\n $config_content\n );\n\n /** Htaccess file has been updated */\n if($config_file_updated['status']) return [\n 'status' => true,\n 'description' => ''\n ];\n\n /** Error updating Htaccess file */\n else return [\n 'status' => false,\n 'description' => 'Please delete old config file.'\n ];\n}", "title": "" }, { "docid": "bbc911875d9712b999bcd5096f68704a", "score": "0.45923612", "text": "public static function loadConfig()\n\t{\n\t\t$filePath = 'system/cache/rocksolid_custom_elements_config.php';\n\t\t$fileFullPath = TL_ROOT . '/' . $filePath;\n\n\t\t$cacheHash = md5(implode(',', array_merge(\n\t\t\tglob(TL_ROOT . '/templates/rsce_*') ?: array(),\n\t\t\tglob(TL_ROOT . '/templates/*/rsce_*') ?: array()\n\t\t)));\n\n\t\tif (file_exists($fileFullPath)) {\n\t\t\t$fileCacheHash = null;\n\t\t\tinclude $fileFullPath;\n\t\t\tif ($fileCacheHash === $cacheHash) {\n\t\t\t\t// the cache file is valid and loaded\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$contents = array();\n\t\t$contents[] = '<?php' . \"\\n\";\n\t\t$contents[] = '$fileCacheHash = ' . var_export($cacheHash, true) . ';' . \"\\n\";\n\n\t\t$templates = \\Controller::getTemplateGroup('rsce_');\n\n\t\t$allConfigs = array_merge(\n\t\t\tglob(TL_ROOT . '/templates/rsce_*_config.php') ?: array(),\n\t\t\tglob(TL_ROOT . '/templates/*/rsce_*_config.php') ?: array()\n\t\t);\n\t\t$fallbackConfigPaths = array();\n\n\t\tforeach ($allConfigs as $configPath) {\n\t\t\t$templateName = basename($configPath, '_config.php');\n\t\t\tif (file_exists(substr($configPath, 0, -11) . '.html5')) {\n\t\t\t\tif (!isset($templates[$templateName])) {\n\t\t\t\t\t$templates[$templateName] = $templateName;\n\t\t\t\t}\n\t\t\t\tif (!isset($fallbackConfigPaths[$templateName])) {\n\t\t\t\t\t$fallbackConfigPaths[$templateName] = $configPath;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($templates as $template => $label) {\n\n\t\t\tif (substr($template, -7) === '_config') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$configPath = null;\n\n\t\t\ttry {\n\t\t\t\t$templatePaths = CustomTemplate::getTemplates($template);\n\t\t\t\tif (!empty($templatePaths[0])) {\n\t\t\t\t\t$configPath = substr($templatePaths[0], 0, -6) . '_config.php';\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (\\Exception $e) {\n\t\t\t\t$configPath = null;\n\t\t\t}\n\n\t\t\tif ($configPath === null || !file_exists($configPath)) {\n\t\t\t\tif (isset($fallbackConfigPaths[$template])) {\n\t\t\t\t\t$configPath = $fallbackConfigPaths[$template];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$config = include $configPath;\n\n\t\t\t$label = isset($config['label']) ? $config['label'] : array(implode(' ', array_map('ucfirst', explode('_', substr($template, 5)))), '');\n\t\t\t$types = isset($config['types']) ? $config['types'] : array('content', 'module');\n\t\t\t$contentCategory = isset($config['contentCategory']) ? $config['contentCategory'] : 'custom_elements';\n\t\t\t$moduleCategory = isset($config['moduleCategory']) ? $config['moduleCategory'] : 'custom_elements';\n\n\t\t\tif (in_array('content', $types)) {\n\t\t\t\t$contents[] = '$GLOBALS[\\'TL_CTE\\'][\\'' . $contentCategory . '\\'][\\'' . $template . '\\'] = \\'MadeYourDay\\\\\\\\Contao\\\\\\\\Element\\\\\\\\CustomElement\\';';\n\t\t\t\t$contents[] = '$GLOBALS[\\'TL_LANG\\'][\\'CTE\\'][\\'' . $template . '\\'] = ' . var_export($label, true) . ';';\n\t\t\t\tif (!empty($config['wrapper']['type'])) {\n\t\t\t\t\t$contents[] = '$GLOBALS[\\'TL_WRAPPERS\\'][' . var_export($config['wrapper']['type'], true) . '][] = ' . var_export($template, true) . ';';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (in_array('module', $types)) {\n\t\t\t\t$contents[] = '$GLOBALS[\\'FE_MOD\\'][\\'' . $moduleCategory . '\\'][\\'' . $template . '\\'] = \\'MadeYourDay\\\\\\\\Contao\\\\\\\\Element\\\\\\\\CustomElement\\';';\n\t\t\t\t$contents[] = '$GLOBALS[\\'TL_LANG\\'][\\'FMD\\'][\\'' . $template . '\\'] = ' . var_export($label, true) . ';';\n\t\t\t}\n\n\t\t}\n\n\t\t$file = new \\File($filePath, true);\n\t\t$file->write(implode(\"\\n\", $contents));\n\t\t$file->close();\n\t\tstatic::refreshOpcodeCache($fileFullPath);\n\n\t\tif (file_exists($fileFullPath)) {\n\t\t\tinclude $fileFullPath;\n\t\t}\n\t\telse {\n\t\t\t// was not able to create the cache file\n\t\t\teval('?>' . implode(\"\\n\", $contents));\n\t\t}\n\n\t}", "title": "" }, { "docid": "9ff111f390cab15845f24c33cf17da9d", "score": "0.45915928", "text": "function main($content,$conf)\t{\n\t\t// Init FlexForm configuration for plugin:\n\t\t$this->pi_initPIflexForm();\n\t\t$pluginMode = intval($this->pi_getFFvalue($this->cObj->data['pi_flexform'],'fieldModuleMode','sDefault'));\n\t\t$this->conf = $conf;\n\t\t$this->myPluginMode = $pluginMode;\n\t\t$this->myCmdMode = 0;\n\t\t$myConf = NULL;\n\t\t// t3lib_div::debug(Array('$this->conf'=>$this->conf, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\tif (is_array($this->conf['dispatcher.'])) {\n\t\t\tif ($pluginMode && is_array($this->conf['dispatcher.'][$pluginMode.'.'])) {\n\t\t\t\t$myConf = $this->conf['dispatcher.'][$pluginMode.'.'];\n\t\t\t}\n\t\t\tif (!$myConf && $this->conf['CMD']) {\n\t\t\t\tforeach ($this->conf['dispatcher.'] as $key=>$value) {\n\t\t\t\t\tif (strcmp($value['cmd'],$this->conf['CMD'])==0) {\n\t\t\t\t\t\t$myConf = $value;\n\t\t\t\t\t\t$this->myCmdMode = 1;\n\t\t\t\t\t\t$this->myPluginMode = intval($key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($myConf['execList']) {\n\t\t\t$dispatcherConf = $this->conf['dispatcher.'];\n\t\t\t$idList = t3lib_div::trimExplode(',',$myConf['execList']);\n\t\t\tforeach ($idList as $id) if ($id) {\n\t\t\t\t$myConf = $dispatcherConf[$id.'.'];\n\t\t\t\t$content .= $this->executeMyConf($myConf);\n\t\t\t}\n\t\t\treturn ($content);\n\t\t} else {\n\t\t\t$content = $this->executeMyConf($myConf);\n\t\t}\n\t\treturn ($content);\n\t}", "title": "" }, { "docid": "f856ffcb29e7571ceb78a1990b3030ee", "score": "0.45866925", "text": "function modules_admin_modifyconfig()\n{\n // Security check\n if (!SecurityUtil::checkPermission('Modules::', '::', ACCESS_ADMIN)) {\n return LogUtil::registerPermissionError();\n }\n\n // Create output object\n $pnRender = & pnRender::getInstance('Modules', false);\n\n // assign all the module vars\n $pnRender->assign(pnModGetVar('Modules'));\n\n // load support for legacy modules\n $pnRender->assign('loadlegacy', pnConfigGetVar('loadlegacy'));\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('modules_admin_modifyconfig.htm');\n}", "title": "" }, { "docid": "c142613c9d45e5211b170606ade25840", "score": "0.45847297", "text": "public function configuration(){\n define('CORE_MINIMUM_PHP', '7.1.3');\n if (version_compare(PHP_VERSION, CORE_MINIMUM_PHP, '<')){\n die('Your host needs to use PHP ' . CORE_MINIMUM_PHP . ' or higher to run this version of Core System !');\n }\n // Saves the start time and memory usage.\n $startTime = microtime(1);\n $startMem = memory_get_usage();\n /**\n * Constant that is checked in included files to prevent direct access.\n * \n */\n define('_JEXEC', 1);\n define('JPATH_INCLUDES', 'theme.includes');\n define('JPATH_ROOT','views.theme.');\n define('JPATH_THEME','theme');\n //return __DIR__;\n \n if(view()->exists(JPATH_INCLUDES.'.defines')){\n return json_encode(array(\n 'state' => 1,\n 'message' => 'success',\n 'codeState' => 200\n )); \n }else{\n return \"Error, Directorio defines\";\n }\n\n $Config_ = core_template_manager::where('idState',1)->where('main',1)->first();\n if(!empty($Config_)){\n if(empty($Config_->themeTemplate)){\n return json_encode(array(\n 'state' => 2,\n 'message' => 'tema esta vacio',\n 'codeState' => 'XXX'\n )); \n }\n\n if(view()->exists(JPATH_TEMPLATES . $Config_->nameDirectory . '.' . $Config_->themeTemplate)){\n \n return $this->execute($Config_);\n /* Permite lanzar la aplicacion , una vez ralizada todas las validaciones ---*/\n /*\n public function execute($Config_){\n $destinyAction_ = 'store.index';\n return redirect()->route($destinyAction_);\n }\n\n */\n /*---------------------------------------------------------------------------*/\n \n\n \n }else{\n return json_encode(array(\n 'state' => 2,\n 'message' => JPATH_TEMPLATES . $Config_->themeTemplate,\n 'codeState' => 'XXX'\n ));\n }\n }else{\n return json_encode(array(\n 'state' => 2,\n 'message' => 'Error ',\n 'codeState' => 'XXX'\n ));\n }\n\n \n //return CORE_MINIMUM_PHP;\n }", "title": "" }, { "docid": "e82ee31252520dc56f0566ceb3643fec", "score": "0.45767367", "text": "abstract public function config();", "title": "" }, { "docid": "9a6638c85deb0407fb15e96c5f5b0736", "score": "0.45737416", "text": "function compile() {\r\n\t\t$this->getCompiler()->setOptions(\r\n\t\t\tarray(\r\n\t\t\t\ttranslateExtractorCompiler::OPTIONS_RESOURCE => $this->getBackendOptions(\r\n\t\t\t\t\ttranslateExtractorBackend::OPTIONS_RESOURCE_LOCATION\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t\t$this->getCompiler()->setTranslationTable($this->getBackend()->getTranslationTable());\r\n\t\t$this->getCompiler()->compile();\r\n\t}", "title": "" }, { "docid": "d92d5999728d71bf57a5f43199c0ce95", "score": "0.45715594", "text": "public function generateConfigFile()\n {\n $configFile = $this->getSampleFileContent();\n $params = $this->getParams();\n $secretKeys = $this->generateSecretKeys();\n $wpdb = $this->wpdb;\n \n $constantsMap = array(\n 'DB_NAME' => $params['database']['dbname'],\n 'DB_USER' => $params['database']['user'],\n 'DB_PASSWORD' => $params['database']['password'],\n 'DB_HOST' => $params['database']['host'],\n );\n \n $key = 0;\n foreach ($configFile as $lineNum => $line) {\n if ('$table_prefix =' == substr($line, 0, 16)) {\n $configFile[$lineNum] = '$table_prefix = \\'' . addcslashes($params['database']['table_prefix'], \"\\\\'\") . \"';\\r\\n\";\n continue;\n }\n \n $match = array();\n if ( ! preg_match( '/^define\\(\\'([A-Z_]+)\\',([ ]+)/', $line, $match ) ) {\n continue;\n }\n \n $constant = $match[1];\n $padding = $match[2];\n \n switch ($constant) {\n case 'DB_NAME' :\n case 'DB_USER' :\n case 'DB_PASSWORD' :\n case 'DB_HOST' :\n $configFile[$lineNum] = sprintf(\"define('%s',%s'%s');\\r\\n\", $constant, $padding, addcslashes($constantsMap[$constant], \"\\\\'\"));\n break;\n case 'DB_CHARSET' :\n if ('utf8mb4' === $wpdb->charset || (!$wpdb->charset && $wpdb->has_cap('utf8mb4'))) {\n $configFile[$lineNum] = sprintf(\"define('%s',%s'utf8mb4');\\r\\n\", $constant, $padding);\n }\n break;\n case 'AUTH_KEY' :\n case 'SECURE_AUTH_KEY' :\n case 'LOGGED_IN_KEY' :\n case 'NONCE_KEY' :\n case 'AUTH_SALT' :\n case 'SECURE_AUTH_SALT' :\n case 'LOGGED_IN_SALT' :\n case 'NONCE_SALT' :\n $configFile[$lineNum] = sprintf(\"define('%s',%s'%s');\\r\\n\", $constant, $padding, $secretKeys[$key++]);\n break;\n }\n }\n \n $handle = fopen($this->getConfigFilePath(), 'w');\n foreach($configFile as $line ) {\n fwrite($handle, $line);\n }\n fclose($handle);\n }", "title": "" }, { "docid": "bbac77455c57c490effa4066d6e34127", "score": "0.45666215", "text": "private function majOptionsFile() {\n\n $newOptions = '<?php' . \"\\n\";\n $newOptions .= 'define(\\'OPT_ADMIN\\', \\'' . SYS_ADMIN . '\\') ;' . \"\\n\";\n\n $options = $this->getOptions();\n\n foreach ($options as $key => $value) {\n $newOptions .= 'define(\\'' . $key . '\\', \\'' . $value . '\\') ;' . \"\\n\";\n }\n\n $fp = fopen($this->fileOpt, 'w+');\n if (fputs($fp, $newOptions)) {\n fclose($fp);\n }\n }", "title": "" }, { "docid": "8004e6b26097a5af90453ed9e0dc3913", "score": "0.45652416", "text": "public function compile();", "title": "" }, { "docid": "8004e6b26097a5af90453ed9e0dc3913", "score": "0.45652416", "text": "public function compile();", "title": "" }, { "docid": "8004e6b26097a5af90453ed9e0dc3913", "score": "0.45652416", "text": "public function compile();", "title": "" }, { "docid": "cba58fbe1208ecac18eb5a31add0a8df", "score": "0.45580947", "text": "public static function getModuleConfig()\n {\n return include __DIR__ . '/config/module.config.php';\n }", "title": "" }, { "docid": "c777ba620edefae4f9c1f5dd6c35e4c3", "score": "0.45577344", "text": "public function generateConfigTestsFile()\n {\n\t$serviceConf = array();\n\tforeach ($this->_testFiles as $type => $testFile) {\n\t foreach ($testFile as $service => $portails) {\n\t $serviceConf[$service][$type] = $portails;\n\t }\n\t}\n\tforeach ($serviceConf as $service => $mainConfig) {\n\t $tplConf = array(\n\t\t\t'projectName' => $this->getProjectName(),\n\t\t\t'service' => $service\n\t\t );\n\t foreach ($mainConfig as $type => $config) {\n\t \t$tplConf['portails' . $type] = $config;\n\t }\n\t $configTestsClassFile = $this->_rootDir . self::TEST_PATH_CONFIG_LIB . ucfirst($service) . '.php';\n\t Twig::saveFileToTpl(self::TPL_TESTS_CONFIG_CLASS, $tplConf, $configTestsClassFile);\n\t}\n }", "title": "" }, { "docid": "b68aa7e045be32faa4c83fae79a31851", "score": "0.45574108", "text": "function CLCFG_setDebconf($serverIP,$debconfFile)\n{\n\t$quiet = ($_SESSION['debug'] ? \"\": \"-qq\");\n\n\techo(\"\n\n\tapt-get update\n\n\tapt-get -m --force-yes -y install debconf-utils\n\tapt-get -m --force-yes -y install dialog\n\n\tif [ -f /usr/bin/debconf-set-selections ]\n\tthen\n\t\techo \\\"debconf-set-selections found\\\"\n\telse\n\t\tapt-get -m --force-yes -y install m23-debconf-woody wget\n\tfi\n\n\trm /tmp/m23client-debconf 2> /dev/null\n\n\twget $quiet https://$serverIP$debconfFile -O /tmp/m23client-debconf\n\n\texport PATH=\\$PATH:/usr/bin\n\n\tdebconf-set-selections /tmp/m23client-debconf\n\n\texport DEBIAN_FRONTEND=noninteractive\n\n\tdpkg-reconfigure passwd\n\n\t\");\n}", "title": "" }, { "docid": "3fbc53874b49cb7d41bb72ae8fcc6533", "score": "0.45567647", "text": "private function generateConfigFile($dir, $config)\n {\n $originalConfigFile = $this->sdkLibDir . '/../config/' . self::CONFIG_FILE_NAME;\n\n $contents = file_get_contents($originalConfigFile);\n\n //private keyfile config\n if ('#02299991' == $this->posId) {\n $contents = preg_replace('/otp\\.webshop\\.PRIVATE_KEY_FILE_#02299991=.*/', 'otp.webshop.PRIVATE_KEY_FILE_#02299991=' . $this->privateKeyFileName, $contents);\n } else {\n $contents = preg_replace('/otp\\.webshop\\.PRIVATE_KEY_FILE.*/', 'otp.webshop.PRIVATE_KEY_FILE_' . $this->posId . '=' . $this->privateKeyFileName, $contents);\n }\n\n if ($this->isSandbox()) {\n $contents = preg_replace('/otp\\.webshop\\.OTPMW_SERVER_URL=.*/', 'otp.webshop.OTPMW_SERVER_URL=\"https://sandbox.simplepay.hu/mw/mw/pspHU\"', $contents);\n } else {\n $contents = preg_replace('/otp\\.webshop\\.OTPMW_SERVER_URL=.*/', 'otp.webshop.OTPMW_SERVER_URL=\"https://securepay.simplepay.hu/mw/mw/pspHU\"', $contents);\n }\n\n //log directory for the transactions keyfile config\n if (isset($config['sdk_transaction_log_dir'])) {\n $contents = preg_replace('/otp\\.webshop\\.sdk_transaction_log_dir=.*/', 'otp.webshop.sdk_transaction_log_dir=' . $config['sdk_transaction_log_dir'], $contents);\n }\n\n if (isset($config['sdk_transaction_log_dir.success'])) {\n $contents = preg_replace('/otp\\.webshop\\.sdk_transaction_log_dir\\.SUCCESS_DIR=.*/', 'otp.webshop.sdk_transaction_log_dir.SUCCESS_DIR=' . $config['sdk_transaction_log_dir.success'], $contents);\n }\n\n if (isset($config['sdk_transaction_log_dir.failed'])) {\n $contents = preg_replace('/otp\\.webshop\\.sdk_transaction_log_dir\\.FAILED_DIR=.*/', 'otp.webshop.sdk_transaction_log_dir.FAILED_DIR=' . $config['sdk_transaction_log_dir.failed'], $contents);\n }\n\n //log directory for the webshopclient\n\n if (isset($config['sdk_log4php_file'])) {\n $contents = preg_replace('/log4php\\.appender\\.WebShopClient\\.File=.*/', 'log4php.appender.WebShopClient.File=' . $config['sdk_log4php_file'], $contents);\n }\n\n file_put_contents($dir . '/' . self::CONFIG_FILE_NAME, $contents);\n\n\n }", "title": "" }, { "docid": "1512457bd51d352f60d65cedb89c2182", "score": "0.45534337", "text": "protected function _compile(){ }", "title": "" }, { "docid": "1854acad74794582a2838ae6bf7eca73", "score": "0.45483136", "text": "protected function set_from_file()\n\t{\n\t\t$custom_config_file = $this->ext_root_path . 'config.' . $this->php_ext;\n\n\t\tif (file_exists($custom_config_file))\n\t\t{\n\t\t\tinclude($custom_config_file);\n\n\t\t\tif (!isset($config) || !is_array($config))\n\t\t\t{\n\t\t\t\t$config = array();\n\t\t\t}\n\n\t\t\t$this->__set_array($config);\n\t\t}\n\t}", "title": "" }, { "docid": "0a3d60d65005614e5c8bb343a7de89bb", "score": "0.45407093", "text": "private function processConfig() {\n $this->conf = include($this->conf_file);\n $this->log(\"Configuration file [{$this->conf_file}] read.\");\n if(!isset($this->conf['application'])) {\n $this->conf['application'] = [];\n }\n if(!isset($this->conf['application']['name'])) {\n $this->conf['application']['name'] = 'Test Application';\n }\n if(!isset($this->conf['application']['debug'])) {\n $this->conf['application']['debug'] = true;\n }\n $this->log(\"Loaded and processed configuration:\\n\".Dumper::dump($this->conf));\n }", "title": "" } ]
9895c7d754d9ff52e37215753b6887d1
print Quotation in the preview page
[ { "docid": "446f8641e86bd009561f1ae4af889ad1", "score": "0.55439633", "text": "public function actionPrint($id)\n {\n $this->layout = 'print';\n\n $attachment = QuotationAttachment::find()->where(['quotation_id' => $id])->all();\n\n\n return $this->render('print', [\n 'model' => $this->findModel($id),\n 'attachment' => $attachment,\n 'detail' => QuotationDetail::find()->where(['quotation_id' => $id ])->all(),\n ]);\n }", "title": "" } ]
[ { "docid": "a1ba68d6c970982ab116dc0ef5250e97", "score": "0.6222244", "text": "function printQuote()\n{\n $arr_printing = getRandomQuote($GLOBALS['quotes']);\n $string_to_print = '';\n $string_to_print .= '<p class=\"quote\">' . $arr_printing['quote'] . ' </p>';\n $string_to_print .= '<p class=\"source\">' . $arr_printing['source'];\n if ($arr_printing['citation']) {\n $string_to_print .= '<span class=\"citation\">' . $arr_printing['citation'] . '</span>';\n $string_to_print .= '<span class=\"year\">' . $arr_printing['year'] . '</span>';\n }\n if ($arr_printing['tags']) {\n $string_to_print .= '</br><span class=\"tags\">' . $arr_printing['tags'] . '</span>';\n }\n $string_to_print .= '</p>';\n echo $string_to_print;\n}", "title": "" }, { "docid": "311410234479e218c7f8421657ce2c51", "score": "0.620453", "text": "public function previewFormat()\n {\n return implode([$this->_actionDescription(), $this->_releaseName(), $this->notes], \"\\n\\n\");\n }", "title": "" }, { "docid": "248c2e0cf0e26942248aa041f5f93a7d", "score": "0.6108086", "text": "function display_quote( $quote_object ) \n {\n $quote = $quote_object;\n $html = '';\n if( is_object($quote) ) {\n $source_url = get_post_meta($quote->ID, 'bbquotations-source-url', true);\n // add the source url if available\n // or else link to the author of the quote \n error_log($source_url);\n if( empty($source_url) ) {\n $url = get_author_posts_url($quote->post_author);\n $link = \"<a href='$url'>$quote->post_title</a>\"; \n } else {\n $url = $source_url;\n $link = \"<a href='$url'>$quote->post_title</a>\"; \n }\n $html .= \"<blockquote class='bbquotations' cite='$url'>\";\n $html .= \"<p>\";\n $html .= $quote->post_content;\n $html .= \"</p>\";\n \n $html .= \"<cite>$link</cite>\";\n $html .= \"</blockquote>\"; \n }\n return $html;\n }", "title": "" }, { "docid": "115e797930d950701aae1eb2bb6e2719", "score": "0.6050237", "text": "function printQuote($array){\n \n $singleQuote = getRandomQuote($array);\n \n //builds the string to apply to the page\n $quoteString = '<p class=\"quote\">'. $singleQuote[\"quote\"] .'</p><p class=\"source\">'. $singleQuote[\"source\"];\n \n if($singleQuote[\"citation\"] && $singleQuote[\"year\"]){\n $quoteString .= '<span class=\"citation\">' . $singleQuote[\"citation\"] . '</span><span class=\"year\">' . $singleQuote[\"year\"] . '</span></p>';\n } else if($singleQuote[\"citation\"]){\n $quoteString .= '<span class=\"citation\">' . $singleQuote[\"citation\"] . '</span></p>';\n }else if($singleQuote[\"year\"]){\n $quoteString .= '<span class=\"year\">' . $singleQuote[\"year\"] . '</span></p>';\n }else{\n $quoteString .= '</p>';\n };\n //prints the string to page \n print $quoteString; \n }", "title": "" }, { "docid": "9bd4a6b5fe2591ec84973758ef6f4a55", "score": "0.59746855", "text": "public function renderQuickEdit() {}", "title": "" }, { "docid": "0b3e79da8bdac7294ec917c43f560ec3", "score": "0.5970275", "text": "function quote_open() {\n $this->doc .= '<blockquote><div class=\"no\">'.DOKU_LF;\n }", "title": "" }, { "docid": "1591f5da774d643841eeffad466f9c3a", "score": "0.59084463", "text": "function printPreview()\n {\n echo '<div class=\"theme_preview\">';\n echo '<h2>' . htmlspecialchars($this->getName())\n .' (' . htmlspecialchars($this->getVersion()) . ')</h2>'\n .'<p>'\n .'<a target=\"_top\" href=\"index.php'\n .PMA_generate_common_url(array('set_theme' => $this->getId())) . '\"'\n .' onclick=\"takeThis(\\'' . addslashes($this->getId()) . '\\');'\n .' return false;\">';\n if (@file_exists($this->getPath() . '/screen.png')) {\n // if screen exists then output\n\n echo '<img src=\"' . $this->getPath() . '/screen.png\" border=\"1\"'\n .' alt=\"' . htmlspecialchars($this->getName()) . '\"'\n .' title=\"' . htmlspecialchars($this->getName()) . '\" /><br />';\n } else {\n echo $GLOBALS['strThemeNoPreviewAvailable'];\n }\n\n echo '[ <strong>' . $GLOBALS['strTakeIt'] . '</strong> ]</a>'\n .'</p>'\n .'</div>';\n }", "title": "" }, { "docid": "eee10223b74ab88a282d97872944be53", "score": "0.5890314", "text": "public function printContent()\n {\n $this->includeFieldComponent('selectwithpopup');\n }", "title": "" }, { "docid": "260d50fc33fd6778a41c63a37d198908", "score": "0.5840553", "text": "protected function printOpenHtml()\n {\n echo '<HTML>';\n }", "title": "" }, { "docid": "b16954ccc7fca64af34dc2126b82c973", "score": "0.5827599", "text": "public function preview()\n {\n $message = $this->get('message');\n if ($message) {\n $this->console->output($message);\n }\n }", "title": "" }, { "docid": "b4d27bb3ef3c6bb59ccb1675ddfcf4e3", "score": "0.58137447", "text": "public function preview($slug){\n\n echo <<<HTML\n<!doctype html>\n<html lang=\"\">\n <head>\n <meta charset=\"utf-8\">\n </head>\n <body>\nHTML;\n\n $this->embed($slug);\n\n echo <<<HTML\n </body>\n</html>\nHTML;\n\n }", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5757284", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5757284", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5757284", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5757284", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5757284", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.575676", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.575676", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.575676", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "45bf081260b8a52f791eebfc0eabf693", "score": "0.5755558", "text": "public function printContent() {}", "title": "" }, { "docid": "5d99ca1bc9cb5f10b27324c952fe8138", "score": "0.5722232", "text": "function printTextInput($isPro,$options, $label, $id, $description, $type = 'text', $url='', $showSave = false) {\r\n if (empty($options[$id])) {\r\n $options[$id] = '';\r\n }\r\n \r\n $offset = '';\r\n if (ai_startsWith($label, 'i-')) {\r\n $offset = 'class=\"'.substr($label,0, 5).'\" ';\r\n $label = substr($label, 5);\r\n }\r\n if (!isset($options['demo']) || $options['demo'] == 'false') {\r\n $isPro = false;\r\n }\r\n $pro_class = $isPro ? ' class=\"ai-pro\"':'';\r\n\r\n if ($isPro) {\r\n $label = '<span alt=\"Pro feature\" title=\"Pro feature\">'.$label.'</span>';\r\n }\r\n\r\n echo '\r\n <tr'.$pro_class.'>\r\n <th scope=\"row\" '.$offset.'>' . $label . renderExampleIcon($url) . renderExternalWorkaroundIcon($showSave). '</th>\r\n <td><span class=\"hide-print\">\r\n <input name=\"' . $id . '\" type=\"' . $type . '\" id=\"' . $id . '\" value=\"' . esc_attr($options[$id]) . '\" /><br></span>\r\n <p class=\"description\">' . $description . '</p></td>\r\n </tr>\r\n ';\r\n}", "title": "" }, { "docid": "95b745a6a2bee8237beadc38fb2e7983", "score": "0.5713331", "text": "function singlequoteclosing() {\n global $lang;\n $this->doc .= $lang['singlequoteclosing'];\n }", "title": "" }, { "docid": "2e205b14619ae56bc0716792c20efea5", "score": "0.5692126", "text": "private function MakeContentQR(){\n $content = \"{$this->Nombre} {$this->Apellidos}\\n{$this->email}\\n{$this->Carrera}\\n\n {$this->Semestre}\\n{$this->ncontrol}\\n{$this->FolioPago}\\n{$this->F_Examen}\";\n\n return $content;\n }", "title": "" }, { "docid": "deafac2aa8a674ca0db6e07ee06fc973", "score": "0.56886023", "text": "function print_embed_comments_button()\n {\n }", "title": "" }, { "docid": "1e4d67b751b3ed903399f2a961194c93", "score": "0.5664366", "text": "function displayQrcode()\r\n\t {\r\n\t \t$redirectPage = JRequest::getVar('redirect');\r\n\t\t $model = $this->getModel('qrcode');\r\n\t\t $printStyle = $model->getActiveStyle();//Get active style name from the database.\r\n\t\t $currentStyle = $printStyle->style_name;\r\n\t\t \r\n\t\t if($redirectPage == \"print\")\r\n\t\t {\r\n\t\t\t\tJRequest::setVar( 'view', 'qrcode' );\r\n\t \tJRequest::setVar( 'layout', $currentStyle);\r\n\t \tJRequest::setVar('hidemainmenu', 0);\r\n\t \tparent::display();\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t \tJRequest::setVar( 'view', 'qrcode' );\r\n\t \tJRequest::setVar( 'layout', 'share');\r\n\t \tJRequest::setVar('hidemainmenu', 0);\r\n\t \tparent::display();\r\n\t\t }\t \r\n\t }", "title": "" }, { "docid": "f6fd52fa32bdf77820ba50b4eaa14090", "score": "0.5647376", "text": "function dumpContents()\r\n {\r\n\r\n $attributes = $this->_getCommonAttributes();\r\n\r\n //TODO [Perez][JLeon] Do we leave this method?\r\n // call the OnShow event if assigned so the Text property can be changed\r\n if ($this->_onshow != null)\r\n {\r\n $this->callEvent('onshow', array());\r\n }\r\n\r\n $avalue = $this->_text;\r\n $avalue=str_replace('\"','&quot;',$avalue);\r\n $type = \"progress\";\r\n if ($this->_type == pbsMeterBar)\r\n $type = \"meter\";\r\n echo \"<$type id=\\\"$this->_name\\\" value=\\\"$avalue\\\" $attributes>$this->_text</$type>\";\r\n\r\n }", "title": "" }, { "docid": "1bcd2b92fe7d9210ca9fce6e7b191df0", "score": "0.5614882", "text": "public function toString()\n {\n return 'Search preview is present in search results';\n }", "title": "" }, { "docid": "e16bc37acdc15015400a8f0684b0764f", "score": "0.5612378", "text": "function pqurc_display_extra()\n {\n $extra_fi = get_option('pqurcode_extra');\n printf(\"<input type='text' id='%s' name='%s' value='%s' />\", 'pqurcode_extra', 'pqurcode_extra', $extra_fi);\n }", "title": "" }, { "docid": "b27ce70aedf9c606543ab501eadf9e94", "score": "0.56034064", "text": "public function print()\n {\n if (!headers_sent()) {\n header(\"Content-Type: text/html\");\n }\n\n $data = \"\";\n $args = func_get_args();\n foreach ($args as $arg) {\n $data .= $this->processLine($arg);\n }\n\n echo \"<style>$this->style</style>\";\n echo \"$data\";\n echo \"<script type='text/javascript'>$this->scripts</script>\";\n }", "title": "" }, { "docid": "ab63e4efd274870c67b4c5d5edb5640f", "score": "0.5570618", "text": "public function show(Quote $quote)\n {\n //\n }", "title": "" }, { "docid": "ab63e4efd274870c67b4c5d5edb5640f", "score": "0.5570618", "text": "public function show(Quote $quote)\n {\n //\n }", "title": "" }, { "docid": "ab63e4efd274870c67b4c5d5edb5640f", "score": "0.5570618", "text": "public function show(Quote $quote)\n {\n //\n }", "title": "" }, { "docid": "ab63e4efd274870c67b4c5d5edb5640f", "score": "0.5570618", "text": "public function show(Quote $quote)\n {\n //\n }", "title": "" }, { "docid": "fc990962ede3c113be177dd0864802af", "score": "0.55585086", "text": "public function print_preview_page() {\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<?php\n\n\t\t\techo conference_schedule()->get_conference_schedule();\n\n\t\t\t?>\n </div>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "4c528b9fd661056bf24eb86fc0d27c91", "score": "0.55538636", "text": "final public function display(): string\n {\n ob_start();\n\n parent::display();\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "b4a1615f59e48d32a369981718bddf45", "score": "0.55489904", "text": "protected function afterPrint()\n {\n //just a shell\n }", "title": "" }, { "docid": "01073a6374ca6dede52b976ba2f3399f", "score": "0.5524129", "text": "function display() {\n $output = '';\n \n $output .= $this->_component_id;\n $output .= '<br/>' . $this->_component_type_id;\n $output .= '<br/>' . $this->_quote_id;\n $output .= '<br/>' . $this->component_name;\n $output .= '<br/>' . $this->metal;\n $output .= '<br/>' . $this->powdercoating;\n $output .= '<br/>' . $this->fabric;\n $output .= '<br/>' . $this->processing;\n $output .= '<br/>' . $this->wastage;\n $output .= '<br/>' . $this->installation;\n $output .= '<br/>' . $this->margin;\n $output .= '<br/>' . $this->other;\n\n $output .= '<br/>';\n \n return $output;\n }", "title": "" }, { "docid": "8d2af6d4d85ff664034478563d756372", "score": "0.55239785", "text": "public function formatting()\n\t{\n\t\tmd('sketchpad::help/output/formatting');\n\t}", "title": "" }, { "docid": "02ce8379e76fd9db4f76af32f7929578", "score": "0.5520829", "text": "public function print () : void {\r\n echo $this->getTitle(), PHP_EOL, PHP_EOL;\r\n echo $this->getInfo(), PHP_EOL, PHP_EOL;\r\n\r\n foreach ($this->items as $index => $value) {\r\n echo ($index + 1) . '. ' . $value->getText(), PHP_EOL;\r\n }\r\n\r\n echo PHP_EOL;\r\n }", "title": "" }, { "docid": "67e7b14a184aa32a519075e6e7cffba6", "score": "0.55070066", "text": "public function printquery(){\n\t\techo $this->query.\";\";\n\t}", "title": "" }, { "docid": "1f891eb31189d6769bc8a54e94d0a5d5", "score": "0.5503986", "text": "public function show()\n {\n //\n return 'Rosie can i have a dance';\n }", "title": "" }, { "docid": "e39a10ab3d4ad756b98a6d062a526f19", "score": "0.5501897", "text": "public function render()\n\t{\n\t\t$this->printer->render();\n\t}", "title": "" }, { "docid": "a44f7d3eff50d9ae705eb4ec9a26b844", "score": "0.5481031", "text": "protected function TitleQuoted() {\n\treturn '&ldquo;'.$this->TitleString().'&rdquo;';\n }", "title": "" }, { "docid": "900c5cb29f5821399ab6fc374270bb18", "score": "0.5473734", "text": "function tf_print($value, $die = false) {\r\n static $first_time = true;\r\n\r\n if ($first_time) {\r\n ob_start();\r\n ?><style type=\"text/css\">\r\n div.tf_print_r {\r\n max-height: 500px;\r\n overflow-y: scroll;\r\n background: #111;\r\n margin: 10px 30px;\r\n padding: 0;\r\n border: 1px solid #F5F5F5;\r\n position: relative;\r\n z-index: 10;\r\n }\r\n\r\n div.tf_print_r pre {\r\n color: #47EE47;\r\n text-shadow: 1px 1px 0 #000;\r\n font-family: Consolas, monospace;\r\n font-size: 12px;\r\n margin: 0;\r\n padding: 5px;\r\n display: block;\r\n line-height: 16px;\r\n text-align: left;\r\n }\r\n </style><?php\r\n echo str_replace(array(' ', \"\\n\"), '', ob_get_clean());\r\n }\r\n\r\n ?><div class=\"tf_print_r\"><pre><?php print htmlspecialchars(tf_print_r($value, true), null, 'UTF-8'); ?></pre></div><?php\r\n\r\n $first_time = false;\r\n\r\n if ($die) die();\r\n }", "title": "" }, { "docid": "544518dbfdc08067d75b35597184811e", "score": "0.5432163", "text": "public function print_template()\n {\n }", "title": "" }, { "docid": "28f894e6cd3b5e430d941e72a063775e", "score": "0.5431637", "text": "public function printContent()\n {\n GeneralUtility::logDeprecatedFunction();\n $this->content .= $this->doc->endPage();\n $this->content = $this->doc->insertStylesAndJS($this->content);\n echo $this->content;\n }", "title": "" }, { "docid": "544518dbfdc08067d75b35597184811e", "score": "0.5430516", "text": "public function print_template()\n {\n }", "title": "" }, { "docid": "35b4dfcfd5ed68955075d9d84a2fa83e", "score": "0.5424397", "text": "protected function _showText($text) {}", "title": "" }, { "docid": "f75eaa9670a47db9a71bccb039795c8f", "score": "0.54189396", "text": "function showPreview() {\r\n $tpl = new tpl('gbook');\r\n $tpl->set(\"TEXT\", BBcode(escape($_POST[\"txt\"], \"textarea\")));\r\n $tpl->out('preview');\r\n}", "title": "" }, { "docid": "f6d0bca4978ed9145fd5d3ac24ac34d5", "score": "0.5417424", "text": "public static function content_with_quote($content)\n\t\t\t{\n\t\t\t\n\t\t\t\t//IMPORTANT\n\t\t\t\t//This method should contain all of the options defined\n\t\t\t\t//Works similar to \"toString\"\n\t\t\t\n//\t\t\t\t$quote = '<p><blockquote>' . get_option('he_po_quote') . '</blockquote></p>';\n\n\t\t\t\t$test1 = get_option('he_popup_option'); \n\t\t\t\t$test2 = get_option('he_copypaste_option'); \n\t\t\t\t\n\t\t\t\t//echo $test1.':::'.$test2;\n\t\t\t\t\n\t\t\t\t//$id = '<p><blockquote>' . get_option('he_userid') . '</blockquote></p>';\n\t\t\t\tif(get_option('he_popup_option')) {\n\t\t\t\t\t$popup = '<script type=\"text/javascript\" src=\"http://hiddenempire.co.il/i/popup/users/popcorn.js.php?u='.get_option('he_userid').'\" async=\"true\"></script><div id=\"example-widget-container\"></div>';\n\t\t\t\t} else { $popup = ''; }\n\t\t\t\t\n\t\t\t\tif(get_option('he_copypaste_option')) {\n\t\t\t\t$copypaste = '<script type=\"text/javascript\" src=\"http://hiddenempire.co.il/i/copy-paste-tool/copypaste.js.php?u='.get_option('he_userid').'\" async=\"true\"></script>'; } else { $copypaste = ''; }\n\t\t\t\t\n\t\t\t\t$other = get_option('he_freecode');\n\n\t\t\t\t//return $content . $id . $popup . $copypaste . $other;\n\t\t\t\treturn $content . $popup . $copypaste . $other; // Adam's version\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "a8fbc3c414af912f35e30714ed9660d0", "score": "0.5417311", "text": "function learn_press_single_quiz_preview_mode() {\n\t\tlearn_press_get_template( 'content-quiz/preview-mode.php' );\n\t}", "title": "" }, { "docid": "78ba6f16cff34abc843f212a5f5a1850", "score": "0.54155886", "text": "public function displayPreview()\r\n {\r\n $previewHtml = '';\r\n $previewHtml .= html_entity_decode($this->content);\r\n\r\n if (!empty($this->subordinates))\r\n {\r\n foreach ($this->subordinates as $subordinate)\r\n {\r\n $previewHtml .= $subordinate->displayPreview();\r\n }\r\n }\r\n\r\n return $previewHtml;\r\n }", "title": "" }, { "docid": "869ddb74d6f6659392317ecaf6a8591e", "score": "0.5400594", "text": "protected function output() {\n\t\treturn \"<hr class=\\\"hr-text\\\" data-content=\\\"{$this->option( 'text', '' )}\\\"/>\";\n\t}", "title": "" }, { "docid": "94768f564cd39e2b566d4feb865664cf", "score": "0.5395104", "text": "function email_print_preview_button($courseid) {\n // Action is handled weird, put in a dummy hidden element\n // and then change its name to action when our button has\n // been clicked\n /*echo '<span id=\"print_preview\" class=\"print_preview\">\n <input type=\"submit\" value=\"'.get_string('printemails', 'block_email_list').'\" name=\"action\" onclick=\"return print_multiple_emails(document.sendmail.mail);\" />\n <input type=\"hidden\" value=\"print\" name=\"disabled\" id=\"printactionid\" />\n </span>';\n*/\n\techo '<span id=\"print_preview\" class=\"print_preview\">';\n email_print_to_popup_window ('button', '/blocks/email_list/email/print.php?courseid='.$courseid.'&amp;mailids=', get_string('printemails', 'block_email_list'),\n get_string('printemails', 'block_email_list'));\n echo '</span>';\n}", "title": "" }, { "docid": "9ee6a5e7ea34bb3fd6ef066e0a6ab10a", "score": "0.5391167", "text": "public function actionPreview() {\n $output = '';\n $module = Yii::$app->controller->module;\n if (isset($_POST['source'])) {\n $output = (strlen($_POST['source']) > 0) ? HtmlPurifier::process(Markdown::convert($_POST['source'], ['custom' => $module->customConversion])) : $_POST['nullMsg'];\n }\n echo Json::encode($output);\n }", "title": "" }, { "docid": "657f45fddd2a0068abcdf9247ab499d5", "score": "0.5385908", "text": "public function showTemplate(): string\n {\n $Qr = CoreFunctions::mostrar_qr($this);\n $firmas = CoreFunctions::mostrar_estado_proceso($this);\n $Service = $this->getService();\n $contenido = $this->getFieldValue('contenido');\n return <<<HTML\n <table style=\"width: 100%;border: 0\">\n <tbody>\n <tr>\n <td colspan=\"2\">{$Service->getFechaCiudad()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td>{$Service->getModel()->getFieldValue('destino')}</td>\n <td style=\"text-align:center\">$Qr<br/>No.{$Service->getRadicado()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">ASUNTO: $this->asunto</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">Cordial saludo:</td>\n </tr>\n \n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n $contenido\n <p>{$Service->getDespedida()}<br/><br/></p>\n $firmas\n <p>{$Service->getOtherData()}</p>\nHTML;\n\n }", "title": "" }, { "docid": "ad6801812a897e3b959842d54032bcf2", "score": "0.5383425", "text": "public function print();", "title": "" }, { "docid": "fa5327296cb4546d1d142cb82491985b", "score": "0.5383336", "text": "function singlequoteopening() {\n global $lang;\n $this->doc .= $lang['singlequoteopening'];\n }", "title": "" }, { "docid": "85e0e96f9d2a872aa8b56582c0d6cad5", "score": "0.53804904", "text": "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "title": "" }, { "docid": "a7e0330926229e6580510431845d379a", "score": "0.53790486", "text": "function gtext($text) {\n global $native_presave,$presave_plugins;\n if ($native_presave) {\n $replace = array(\"'\" => '&#39;', '\"' => '&#34;', '<' => '&lt;', '>' => '&gt;');\n $text = str_replace(array_keys($replace), array_values($replace), $text);\n $text = preg_replace (\"/\\<quote\\>(.*?)\\<\\/quote\\>/is\", '<div class=\"quote\">$1</div>', nl2br($text));\n }\n if (@count($presave_plugins)>0) {\n foreach($presave_plugins as $plugin) {\n include('plugins/'.$plugin['name'].'/actions.php');\n }\n }\n return($text);\n}", "title": "" }, { "docid": "4c855e8098b2d7c2e0dee32553682417", "score": "0.5374913", "text": "function echoResultsQREE ($rows) \r{\r \techo \"<table cellpadding=7>\\n\";\r \tforeach ($rows as $row) {\r\t\techo \"\\n\\n\\n<tr>\\n<td valign=top>\\n\";\r\t\techoDocumentLink($row);\r\t\techo \"<td><font color=blue>\".$row[0].\"</font><br>\";\r\t\techoTwoSentences($row[3],$row[4],$row[5],$row[6],$row[7],false);\r \t}\r \techo \"</table>\\n\";\r}", "title": "" }, { "docid": "2cf96c011d582cbac0a70b96d149232f", "score": "0.53733176", "text": "private function printAnswerPage() {\n\t\t$correctVocabulary = 0;\n\t\t$wrongVocabulary = 1;\n\t\tinclude ('html/vocabularyAnswer.php');\n\t}", "title": "" }, { "docid": "a12a9d81a5b747fb7ced8c1675d0debb", "score": "0.53730804", "text": "public function printContent()\n {\n echo $this->content;\n }", "title": "" }, { "docid": "9bdf46e41e07681060869e818bf1a632", "score": "0.53713936", "text": "function render($embedded=false) { return \"\"; }", "title": "" }, { "docid": "bb65cb2ed92d63506d84ba62442ee2de", "score": "0.53682196", "text": "public function __toString()\n {\n $q = $this->getQteReste();\n return (string)$q;\n\n // return \" \";\n\n }", "title": "" }, { "docid": "a0867f0259b57eb682bd16f474d70a9f", "score": "0.5361159", "text": "public function printForm() {\n\t\t$html = $this->printPre().'<input type=\"file\" id=\"'.$this->name().'\" name=\"'.$this->name().'\" />'.$this->printPost().$this->printDescription();\n\n\t\tif ($this->allowMultiple) {\n\t\t\t$html .= $this->print_js();\n\t\t}\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "54c9446d55923ec83f293932fbf48567", "score": "0.5357671", "text": "public function actionPrint()\n {\n $model = new LibraryMagazineIssueSearch();\n $this->layout = false;\n $sql = \"SELECT CONCAT_WS(' ', mm.Member_First_Name, mm.Member_Middle_Name, mm.Member_Last_Name) as Name,tm.Magazine_Title,\n mi.Magazine_Issue_Date,mi.Magazine_Due_Date,mi.Remarks\" \n . \" FROM library_magazine_issue mi,library_magazine_title_master tm,library_member_master mm,library_magazine_subscription_master sm \"\n . \"WHERE mi.Magazine_Id=sm.Magazine_Subscription_Id AND sm.Magazine_Title_Id=tm.Magazine_Id AND mi.Magazine_Person_Id=mm.Member_Id\";\n $connection = Yii::$app->getDb();\n $command = $connection->createCommand($sql);\n $data = $command->queryAll();\n return $this->render('print', ['data' => $data]);\n exit;\n \n }", "title": "" }, { "docid": "64dbf861ca7613b3d905d06ba8e2f706", "score": "0.53571063", "text": "public static function printEmbedScripts()\n {\n $embed = self::getEmbed();\n if(!empty($embed)){\n echo $embed;\n }\n }", "title": "" }, { "docid": "8cec87d7c30d3661a404050fdbb736a5", "score": "0.53507626", "text": "public function showText($text) {}", "title": "" }, { "docid": "f8c156146bff89796a0df38ad5a31cde", "score": "0.534746", "text": "static function before(){\n\t\t$text = \"\n\t\t\\n== Background == \n\t\tThis databrowser queries data from this paper. <ref name='PMID:########'/>\n\t\t\n\t\t\\n== References ==\n\t\t<references/>\n\t\t\t\n\t\t\\n== Search ==\n\t\t\";\n\treturn $text;\n\t}", "title": "" }, { "docid": "590f3310ceeda8426db3a6355c311a0c", "score": "0.53446764", "text": "public function printContent()\n {\n $this->includeFieldComponent('baseselect');\n }", "title": "" }, { "docid": "2de32e40da8a4a3af6a940c4854c14ce", "score": "0.534231", "text": "protected function quote_escaped()\n {\n }", "title": "" }, { "docid": "e1559e96cdac10e3bcdafba742462bb2", "score": "0.53374994", "text": "function printLink($params)\n{\n extract($params);\n $strResult = \"<a href=\\\"javascript:openWindowDialog('templates/training_request_print.html?dataID=\" . $record['id'] . \"');\\\">\" . getWords(\n \"print\"\n ) . \"</a>\";\n return $strResult;\n}", "title": "" }, { "docid": "b437cc700a3e7b6697b9a886a73342b8", "score": "0.5331466", "text": "public function printText() {\n\t\tfor ($i = 0; $i < count($this->textToPrint); $i++) {\n\t\t echo $this->textToPrint[$i].\"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "08ba07b03ca739711503a9b101b6b904", "score": "0.5330234", "text": "function debug($input) {\r\n $contents = func_get_args();\r\n\r\n foreach ( $contents as $content ) {\r\n print '<textarea style=\"width:49%; height:250px; float: left;\">';\r\n print_r($content);\r\n print '</textarea>';\r\n }\r\n\r\n echo '<div style=\"clear: both\"></div>';\r\n }", "title": "" }, { "docid": "b35b7f5eb8cd5e06b2a61ef4437e9f9f", "score": "0.53292805", "text": "public function config_print() {\n\t\t// 6th = image HTML\n\t\t$this->config_print_engine('s3generic', 'S3', __('S3 (Compatible)', 'updraftplus'), 'S3', '', '', true);\n\t}", "title": "" }, { "docid": "629e165739f5acc6b029c9ea39a39a8e", "score": "0.53292376", "text": "function instructDisp($docPath)\n{\n\techo \"\n\t\t<div id='instruction'>\n\t\t\t\t<embed src='\" . $docPath . \"' id='instructDisp' class='instructDisp' type='application/pdf'>\n\t\t</div>\";\n}", "title": "" }, { "docid": "1f5fa96cb4cc786e0f25fdb027406e66", "score": "0.5328747", "text": "function printHTML() \n {\n $this->openBlockHeader(\"CASPSR Help &amp; Support\");\n?>\n <table>\n <tr>\n <td>\n <a href=\"https://docs.google.com/document/d/1TqPdFopf5TkQ4uFGPWRfsaxd9zsex4YbDtzDr0NO7bI/edit?hl=en&authkey=CJuapdQO\">CASPSR Observer's Guide</a>\n </td>\n <td>Basic information on the use of CASPSR</td>\n </tr>\n <tr>\n <td>\n <a href=\"http://psrdada.sf.net/support.shtml\" style=\"text-decoration: none\"> <font color=green>PSR</font>DADA Support</a>\n </td>\n <td>To report bugs and/or request features</td>\n </tr>\n </table>\n\n<?\n $this->closeBlock();\n }", "title": "" }, { "docid": "65f20800fef8d8fb2dd135a3760915e4", "score": "0.5324099", "text": "public function print(): void\n {\n $values = $this->table->getValues();\n $size = $this->table->getSize();\n echo \"<table>\";\n foreach ($values as $index => $row) {\n if ($index === 1) {\n echo \"<tr><th>*</th>\";\n foreach ($row as $cell) {\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</th>\";\n }\n echo \"</tr>\";\n }\n echo \"<tr>\";\n echo \"<th style='width:\" . (100 / ($size + 1)) . \"%'>{$index}</th>\";\n foreach ($row as $cell) {\n echo \"<td style='width:\" . (100 / ($size + 1)) . \"%'>\" . $cell . \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "title": "" }, { "docid": "3be8b0d2d40803d2393c46b6677f09f1", "score": "0.53227097", "text": "function formatQA( $question, $answer ) {\n return \"> {$question}\\n{$answer}\";\n}", "title": "" }, { "docid": "f66a8552c5f6fee21b14b1aeb444eb11", "score": "0.5318309", "text": "public final function print_template()\n {\n }", "title": "" }, { "docid": "da3aa7c82929c3b34ff55724a1b9df2c", "score": "0.5316727", "text": "function printDebug($options, $label, $id, $description) {\r\n $offset = '';\r\n \r\n $url = 'http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/debug-javascript-example';\r\n \r\n echo '\r\n <tr>\r\n <th scope=\"row\">' . $label . renderExampleIcon($url) . '</th>\r\n <td><span class=\"hide-print\">\r\n ';\r\n echo '<input type=\"radio\" id=\"' . $id . '1\" name=\"' . $id . '\" value=\"false\" ';\r\n if ($options[$id] == \"false\") {\r\n echo 'checked=\"checked\"';\r\n }\r\n echo ' /> ' . __('No', 'advanced-iframe') . '&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" id=\"' . $id . '2\" name=\"' . $id . '\" value=\"bottom\" ';\r\n if ($options[$id] == \"bottom\") {\r\n echo 'checked=\"checked\"';\r\n }\r\n echo '/> ' . __('Bottom of page', 'advanced-iframe') . '<br></span>\r\n <p class=\"description\">' . $description . '</p></td>\r\n </tr>\r\n ';\r\n}", "title": "" }, { "docid": "cde6803efc83ecb2e1a63f87ee5895b6", "score": "0.53141487", "text": "public static function dump()\n {\n $html = \"\";\n\n foreach( func_get_args() as $value )\n {\n $html .= \"<div style=\\\"background: #ffc; margin: 20px; padding: 20px;\\\"> \\n\";\n $html .= \" <pre> \\n\";\n $html .= \" \" . print_r( $value, true ) .\" \\n\";\n $html .= \" </pre> \\n\";\n $html .= \"</div> \\n\";\n }\n echo trim( $html );\n exit;\n }", "title": "" }, { "docid": "d6642ba787da76e31357136a4f290383", "score": "0.53133696", "text": "public function render(IQuizzVisitor $v)\n {\n $v->renderLittleOpenAsk($this);\n }", "title": "" }, { "docid": "57534a29dfa5cce8d0f67232d0361848", "score": "0.53103095", "text": "public function showQrCode()\n {\n $this->app->qrCode->show($this->app->config['server.qr_uuid']);\n }", "title": "" }, { "docid": "11faec0d456f98c45ba70ce9f3721d92", "score": "0.53065133", "text": "public function render() {\n $html = str_replace('{text}', $this->text, FORMWIZARD_SEPARATOR);\n $this->html = $html;\n }", "title": "" }, { "docid": "cebf277a6ff8746823b96f604830ab64", "score": "0.53049034", "text": "function printHtml($p) {\n\treturn htmlspecialchars($p, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "1787ee3097fcba3d1ddcdda245b136e4", "score": "0.5299141", "text": "function print_bracket_link( $p_link, $p_url_text ) {\r\n\t\tif ( empty( $p_link ) ) {\r\n\t\t\techo \"[ $p_url_text ]\";\r\n\t\t} else {\r\n\t\t\techo \"[ <a href=\\\"$p_link\\\">$p_url_text</a> ]\";\r\n\t\t}\r\n\t}", "title": "" } ]
0e87ab3a032c56a056172e868019937d
Function to return an array of nested groups when given a group or list of groups. $searchedgroups is used for tail recursion and shouldn't be provided when called externally.
[ { "docid": "ec46c27636950f488df1bf8e45d0be2b", "score": "0.7602434", "text": "function searchNestedGroups( $groups, $searchedgroups = array( \"dn\" => Array(), \"short\" => Array() ) ) {\n\t\t$this->printDebug( \"Entering searchNestedGroups\", NONSENSITIVE );\n\n\t\t//base case, no more groups left to check\n\t\tif ( count( $groups[\"dn\"] ) == 0 ) {\n\t\t\t$this->printDebug( \"No more groups to search.\", NONSENSITIVE );\n\t\t\treturn $searchedgroups;\n\t\t}\n\n\t\t$this->printDebug( \"Searching groups:\", SENSITIVE, $groups[\"dn\"] );\n\n\t\t$groupstosearch = array( \"short\"=>array(), \"dn\"=>array() );\n\t\tforeach ( $groups[\"dn\"] as $group ) {\n\t\t\t$returnedgroups = $this->searchGroups( $group );\n\t\t\t$this->printDebug( \"Group $group is in the following groups:\", SENSITIVE, $returnedgroups[\"dn\"] );\n\t\t\tforeach ( $returnedgroups[\"dn\"] as $searchme ) {\n\t\t\t\tif ( in_array( $searchme, $searchedgroups[\"dn\"] ) ) {\n\t\t\t\t\t//We already searched this, move on\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//We'll need to search this group's members now\n\t\t\t\t\t$this->printDebug( \"Adding $searchme to the list of groups (1)\", SENSITIVE );\n\t\t\t\t\t$groupstosearch[\"dn\"][] = $searchme;\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ( $returnedgroups[\"short\"] as $searchme ) {\n\t\t\t\tif ( in_array( $searchme, $searchedgroups[\"short\"] ) ) {\n\t\t\t\t\t//We already searched this, move on\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t$this->printDebug( \"Adding $searchme to the list of groups (2)\", SENSITIVE );\n\t\t\t\t\t//We'll need to search this group's members now\n\t\t\t\t\t$groupstosearch[\"short\"][] = $searchme;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$searchedgroups = array_merge_recursive( $groups, $searchedgroups );\n\n\t\t//Mmmmmm. Tail recursion. Tasty.\n\t\treturn $this->searchNestedGroups( $groupstosearch, $searchedgroups ); \n\t}", "title": "" } ]
[ { "docid": "56e14494c58e72057320246950b4ba88", "score": "0.6434403", "text": "private function getGroupGroups(string $groupName): array\n {\n $ldapConnection = $this->getConnection();\n $this->bindSystemUser($ldapConnection);\n\n $followReferrals = $this->config['follow_referrals'] ? 1 : 0;\n $this->ldap->setOption($ldapConnection, LDAP_OPT_REFERRALS, $followReferrals);\n\n $baseDn = $this->config['base_dn'];\n $groupsAttr = strtolower($this->config['group_attribute']);\n\n $groupFilter = 'CN=' . $this->ldap->escape($groupName);\n $groups = $this->ldap->searchAndGetEntries($ldapConnection, $baseDn, $groupFilter, [$groupsAttr]);\n if ($groups['count'] === 0) {\n return [];\n }\n\n return $this->groupFilter($groups[0]);\n }", "title": "" }, { "docid": "5d2a86ed43be385382dc06efc3546583", "score": "0.6389271", "text": "public function retrieve_groups()\n {\n // Set the conditions for the search query\n $search_query = Request::post(self::PARAM_SEARCH_QUERY);\n if ($search_query && $search_query != '')\n {\n $q = '*' . $search_query . '*';\n $name_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_NAME), \n $q);\n $name_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n $q);\n $conditions[] = new OrCondition($name_conditions);\n }\n \n $code_conditions = array();\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'AY_*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'CA*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'DEP_*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'TRA_OP_*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'TRA_STU_*');\n $code_conditions[] = new EqualityCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_PARENT_ID), \n new StaticConditionVariable(0));\n \n $conditions[] = new OrCondition($code_conditions);\n \n $filter_id = $this->get_filter();\n \n if ($filter_id)\n {\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_PARENT_ID), \n new StaticConditionVariable($filter_id));\n }\n else\n {\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_PARENT_ID), \n new StaticConditionVariable(0));\n }\n \n // Combine the conditions\n $count = count($conditions);\n if ($count > 1)\n {\n $condition = new AndCondition($conditions);\n }\n \n if ($count == 1)\n {\n $condition = $conditions[0];\n }\n \n $groups = \\Chamilo\\Core\\Group\\Storage\\DataManager::retrieves(\n Group::class_name(), \n new DataClassRetrievesParameters(\n $condition, \n null, \n null, \n array(new OrderBy(new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_NAME)))));\n \n if ($this->get_user()->is_platform_admin())\n {\n return $groups;\n }\n elseif (\\Ehb\\Application\\Atlantis\\Rights::getInstance()->access_is_allowed())\n {\n $target_groups = \\Ehb\\Application\\Atlantis\\Rights::getInstance()->get_target_groups($this->get_user());\n \n $allowed_groups = array();\n \n while ($group = $groups->next_result())\n {\n foreach ($target_groups as $target_group)\n {\n $is_parent = $group->is_parent_of($target_group);\n $is_child = $group->is_child_of($target_group);\n \n if ($is_parent || $is_child || $target_group == $group->get_id())\n {\n $allowed_groups[] = $group;\n break;\n }\n }\n }\n \n return new ArrayResultSet($allowed_groups);\n }\n }", "title": "" }, { "docid": "aafccab2ea3ea972b27a238fa4589bb4", "score": "0.62187475", "text": "function USER_getChildGroups($groupid)\n{\n global $_TABLES;\n\n $to_check = array();\n array_push($to_check, $groupid);\n $groups = array();\n while (count($to_check) > 0) {\n $thisgroup = array_pop($to_check);\n if ($thisgroup > 0) {\n $result = DB_query(\"SELECT ug_grp_id FROM {$_TABLES['group_assignments']} WHERE ug_main_grp_id = $thisgroup\");\n $numGroups = DB_numRows($result);\n for ($i = 0; $i < $numGroups; $i++) {\n $A = DB_fetchArray($result);\n if (!in_array($A['ug_grp_id'], $groups)) {\n if (!in_array($A['ug_grp_id'], $to_check)) {\n array_push($to_check, $A['ug_grp_id']);\n }\n }\n }\n $groups[] = $thisgroup;\n }\n }\n\n return $groups;\n}", "title": "" }, { "docid": "51993a167821541b2ab7ce3c1417c051", "score": "0.6185969", "text": "public function getGroups();", "title": "" }, { "docid": "51993a167821541b2ab7ce3c1417c051", "score": "0.6185969", "text": "public function getGroups();", "title": "" }, { "docid": "51993a167821541b2ab7ce3c1417c051", "score": "0.6185969", "text": "public function getGroups();", "title": "" }, { "docid": "8f4f3fb522f89357965684b5a53b22a1", "score": "0.61784333", "text": "public function getGroups($search = '') {\n\t\tif ($this->isAdmin) {\n\t\t\treturn $this->groupManager->search($search);\n\t\t} else {\n\t\t\t$userObject = $this->userSession->getUser();\n\t\t\tif ($userObject !== null) {\n\t\t\t\t$groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($userObject);\n\t\t\t} else {\n\t\t\t\t$groups = [];\n\t\t\t}\n\n\t\t\treturn $groups;\n\t\t}\n\t}", "title": "" }, { "docid": "eacf955fc2fbee99d27325de6453a600", "score": "0.6128452", "text": "function _getGroupsWithSubgroups($params)\n {\n if ($params['select'] == 'one' || $params['select'] == 'row') {\n // Don't allow 'subgroups' with 'select' if 'one' or 'row'\n $this->stack->push(\n LIVEUSER_ADMIN_ERROR, 'exception',\n array('msg' => 'Setting \"subgroups\" requires select to be set to \"col\" or \"all\"')\n );\n return false;\n }\n\n $subgroups = is_array($params['subgroups']) ? $params['subgroups'] : array();\n\n // Prepare the params for the getGroups call on Perm::Medium.\n $tmp_params = array(\n 'fields' => array('group_id'),\n 'select' => 'col',\n 'filters' => $subgroups,\n );\n\n $result = parent::getGroups($tmp_params);\n if (!$result) {\n return $result;\n }\n\n $subgroup_ids = $result;\n\n // Retrieve all the group_ids from all the subgroups in a do-while loop.\n do {\n // Prepare the params for the getGroups call on Perm::Medium.\n $tmp_params = array(\n 'fields' => array(\n 'subgroup_id',\n ),\n 'filters' => $subgroups,\n 'select' => 'col',\n );\n\n // Do not include groups that have already been fetched\n $tmp_params['filters']['subgroup_id'] = array(\n 'op' => 'NOT IN',\n 'value' => $result,\n );\n\n // Merge 'group_id' filter if needed\n if (array_key_exists('group_id', $tmp_params['filters'])\n && (!is_array($params['filters']['group_id'])\n || !array_key_exists('value', $params['filters']['group_id'])\n )\n ) {\n $tmp_params['filters']['group_id'] = array_intersect(\n $subgroup_ids,\n (array)$params['subgroups']['group_id']\n );\n } else {\n $tmp_params['filters']['group_id'] = $subgroup_ids;\n }\n\n $subgroup_ids = $this->getGroups($tmp_params);\n if ($subgroup_ids === false) {\n return false;\n }\n\n $result = array_merge($result, (array)$subgroup_ids);\n // If there were more subgroups, loop again and try to retrieve the subgroups under the current subgroup.\n } while(!empty($subgroup_ids));\n\n // Merge 'group_id' filter if needed\n if (array_key_exists('filters', $params)\n && array_key_exists('group_id', $params['filters'])\n && (!is_array($params['filters']['group_id'])\n || !array_key_exists('value', $params['filters']['group_id'])\n )\n ) {\n $params['filters']['group_id'] = array_intersect($result, (array)$params['filters']['group_id']);\n } else {\n $params['filters']['group_id'] = $result;\n }\n return parent::getGroups($params);\n }", "title": "" }, { "docid": "7d21165f8bcd4c14c1a635e3b7585d15", "score": "0.61148477", "text": "public function getGroup(string $group): array;", "title": "" }, { "docid": "5f4ba6f7a5e34bc4f537079195b06e2e", "score": "0.6043841", "text": "public function listGroups($search){ \n $this->groupname = $search;\n $this->only_search = array(\"cn\", \"dn\");\n $this->search_base = configSetting('groupsearchbase');\n if(empty($this->groupname)){\n $this->search=ldap_search($this->search_con, $this->search_base, \"(objectclass=group)\", $this->only_search);\n }else{ \n $this->search=ldap_search($this->search_con, $this->search_base, \"(cn=*$this->groupname*)\", $this->only_search);\n }\n ldap_sort($this->search_con, $this->search, \"cn\");\n $this->search_info = ldap_get_entries($this->search_con, $this->search);\n\n for ($i=0; $i<$this->search_info[\"count\"]; $i++){ \n $this->groups[\"$i\"][\"cn\"] = $this->search_info[$i][\"cn\"][0]; \n $this->groups[\"$i\"][\"dn\"] = $this->search_info[$i][\"dn\"]; \n }\n \n return $this->groups;\n}", "title": "" }, { "docid": "9bdc1f866979fe89faafd6c6899568aa", "score": "0.5973564", "text": "public function getGroups(): array {}", "title": "" }, { "docid": "c5694534acb11070d362666b930daea0", "score": "0.5971115", "text": "public static function findSelectedLdapGroups()\n {\n $arrSelectedLdapGroups = \\StringUtil::deserialize(\n \\Config::get('ldap' . static::$strPrefix . 'Groups'), // TODO rename sql field: ldapPrefixSelectedGroups\n true);\n \n\t\t\\System::getContainer()\n\t\t\t->get('logger')\n\t\t\t->info('Result '.__CLASS__.'::'.__FUNCTION__,\n\t\t\t\tarray('contao' => new ContaoContext(__CLASS__.'::'.__FUNCTION__, TL_GENERAL),\n\t\t\t\t\t'arrSelectedLdapGroups' => $arrSelectedLdapGroups));\n \n return $arrSelectedLdapGroups;\n }", "title": "" }, { "docid": "95f9c84729cdf9e4475f4eb3b4576a6c", "score": "0.5947204", "text": "public function discover($groups) {\n if (is_array($groups)) {\n return $this->_discoverGroups($groups);\n } else {\n return $this->_discoverGroup($groups);\n }\n }", "title": "" }, { "docid": "1bac60a46b1b6d3fc1fa9c431f40d2f0", "score": "0.59307104", "text": "public function ldap_get_grouplist($filter = \"*\") {\n global $CFG;\n\n $ldapconnection = $this->ldap_connect();\n\n $fresult = array ();\n\n $servercontrols = array();\n\n if ($filter == \"*\") {\n $filter = \"(&(\" . $this->config->group_attribute . \"=*)(objectclass=\" . $this->config->group_class . \"))\";\n }\n\n if (!empty($CFG->cohort_synching_ldap_groups_contexts)) {\n $contexts = explode(';', $CFG->cohort_synching_ldap_groups_contexts);\n } else {\n $contexts = explode(';', $this->config->contexts);\n }\n\n if (!empty ($this->config->create_context)) {\n array_push($contexts, $this->config->create_context);\n }\n\n $ldappagedresults = ldap_paged_results_supported($this->config->ldap_version, $ldapconnection);\n $ldapcookie = '';\n\n foreach ($contexts as $context) {\n $context = trim($context);\n if (empty ($context)) {\n continue;\n }\n\n do {\n if ($ldappagedresults) {\n $servercontrols = array(\n array(\n 'oid' => LDAP_CONTROL_PAGEDRESULTS, 'value' => array(\n 'size' => $this->config->pagesize, 'cookie' => $ldapcookie\n )\n )\n );\n }\n if ($this->config->search_sub) {\n // Use ldap_search to find first group from subtree.\n $ldapresult = ldap_search($ldapconnection, $context, $filter, array ($this->config->group_attribute),\n 0, -1, -1, LDAP_DEREF_NEVER, $servercontrols);\n } else {\n // Search only in this context.\n $ldapresult = ldap_list($ldapconnection, $context, $filter, array ($this->config->group_attribute),\n 0, -1, -1, LDAP_DEREF_NEVER, $servercontrols);\n }\n $groups = ldap_get_entries($ldapconnection, $ldapresult);\n\n if ($ldappagedresults) {\n // Get next server cookie to know if we'll need to continue searching.\n $ldapcookie = '';\n ldap_parse_result($ldapconnection, $ldapresult, $errcode, $matcheddn,\n $errmsg, $referrals, $controls);\n if (isset($controls[LDAP_CONTROL_PAGEDRESULTS]['value']['cookie'])) {\n $ldapcookie = $controls[LDAP_CONTROL_PAGEDRESULTS]['value']['cookie'];\n }\n }\n\n // Add found groups to list.\n for ($i = 0; $i < count($groups) - 1; $i++) {\n $groupcn = $groups[$i][$this->config->group_attribute][0];\n array_push($fresult, ($groupcn));\n\n // Keep the dn/cn in cache for processing.\n if ($this->config->process_nested_groups) {\n $groupdn = $groups[$i]['dn'];\n $this->groupdnscache[$groupdn] = $groupcn;\n }\n }\n } while ($ldappagedresults && $ldapcookie !== null && $ldapcookie != '');\n }\n $this->ldap_close(true);\n return $fresult;\n }", "title": "" }, { "docid": "079363078e9a4b3e46174f03a640fe9d", "score": "0.5893749", "text": "public function getAllGroups(): array\n {\n $filterCriteria = \"({$this->config->getLdapGroupAttribute()}=*)\";\n\t\t\t$searchAttributes\t=\t$this->config->getLdapSearchAttribute();\n\t\t\t$searchAttributes\t=\tarray_merge(\n\t\t\t\t\t\t\t\t\t\t$searchAttributes,\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t$this->config->getLdapMemberOfGroupsIdentifier(),\n\t\t\t\t\t\t\t\t\t\t\t$this->config->getLdapGroupAttribute()\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t);\n $ldapSearchResource = ldap_search(\n $this->ldapResource,\n $this->config->getLdapBaseDN(),\n $filterCriteria,\n\t\t\t\t\t\t\t\t\t\t$searchAttributes\n );\n if (!is_resource($ldapSearchResource)\n\t\t\t\t\t|| get_resource_type($ldapSearchResource) != 'ldap result')\n {\n log_message('error', 'LDAP Search failure! Either connectivity issue or server not responding');\n return [];\n }\n return ldap_get_entries($this->ldapResource, $ldapSearchResource) ?? [];\n }", "title": "" }, { "docid": "ae8e5d36b5f34f2bf860d308d670b90d", "score": "0.58794653", "text": "abstract protected function getGroupList();", "title": "" }, { "docid": "3e519c15916090522dd79c20503bc51a", "score": "0.5822439", "text": "function _getGroupsWithHierarchy($params)\n {\n // Sanity checks on the provided params.\n if (!$params['rekey'] || $params['group'] || $params['select'] != 'all'\n || (reset($params['fields']) !== 'group_id' && reset($params['fields']) !== '*')\n ) {\n $this->stack->push(\n LIVEUSER_ADMIN_ERROR, 'exception',\n array('msg' => \"Setting 'hierarchy' is only allowed if 'rekey' is enabled, \".\n \"'group' is disabled, 'select' is 'all' and the first field is 'group_id'\")\n );\n return false;\n }\n\n // Get the initial groups.\n $groups = parent::getGroups($params);\n if (!$groups) {\n return $groups;\n }\n\n // Get the the subgroup id's for these initials groups.\n $tmp_params = array(\n 'fields' => array(\n 'group_id',\n 'subgroup_id',\n ),\n 'filters' => array('group_id' => array_keys($groups)),\n 'rekey' => true,\n 'group' => true,\n );\n\n $subgroups = $this->getGroups($tmp_params);\n if ($subgroups === false) {\n return false;\n }\n\n $hierarchy = is_array($params['hierarchy']) ? $params['hierarchy'] : array();\n\n // Loop through the subgroups. In each loop, perform a recursive \n // call the the subgroup_ids that are assigned to the current group.\n foreach ($subgroups as $group_id => $subgroup_ids) {\n $params['filters'] = $hierarchy;\n // Merge 'group_id' filter with 'hierachy' if needed\n if (array_key_exists('group_id', $params['filters'])\n && (!is_array($params['filters']['group_id'])\n || !array_key_exists('value', $params['filters']['group_id'])\n )\n ) {\n $params['filters']['group_id'] = array_intersect(\n $subgroup_ids,\n (array)$params['filters']['group_id']\n );\n } else {\n $params['filters']['group_id'] = $subgroup_ids;\n }\n $subgroup_data = $this->_getGroupsWithHierarchy($params);\n if ($subgroup_data === false) {\n return false;\n }\n $groups[$group_id]['subgroups'] = $subgroup_data;\n }\n\n return $groups;\n }", "title": "" }, { "docid": "d150322293df3327ab03daf7da59d34b", "score": "0.580725", "text": "private function getGroupsRecursive(array $groupsArray, array $checked): array\n {\n $groupsToAdd = [];\n foreach ($groupsArray as $groupName) {\n if (in_array($groupName, $checked)) {\n continue;\n }\n\n $parentGroups = $this->getGroupGroups($groupName);\n $groupsToAdd = array_merge($groupsToAdd, $parentGroups);\n $checked[] = $groupName;\n }\n\n $groupsArray = array_unique(array_merge($groupsArray, $groupsToAdd), SORT_REGULAR);\n\n if (empty($groupsToAdd)) {\n return $groupsArray;\n }\n\n return $this->getGroupsRecursive($groupsArray, $checked);\n }", "title": "" }, { "docid": "ab5f1622b8af3b62917b625ac2960191", "score": "0.5803226", "text": "function prepare_groups_select($group_id)\n{\n $show_groups = ($group_id == 0) ? true : group_has_children($group_id);\n\n if (!$show_groups) {\n return false;\n }\n\n $all_groups = get_groups(false);\n\n if (empty($all_groups)) {\n return false;\n }\n\n $groups_list = array();\n $selected_group_id = $group_id;\n\n foreach ($all_groups as $group) {\n $group_is_empty = (bool) ($group['inumofagents'] == 0);\n $group_related_with_specified = empty($group_id)\n || $group['parent'] == $group_id\n || $group['groupid'] == $group_id;\n\n if ($group_is_empty || !$group_related_with_specified) {\n continue;\n }\n\n if (group_is_online($group) && !$selected_group_id) {\n $selected_group_id = $group['groupid'];\n }\n\n $groups_list[] = array(\n 'id' => $group['groupid'],\n 'name' => get_group_name($group),\n 'description' => get_group_description($group),\n 'online' => group_is_online($group),\n 'selected' => (bool) ($group['groupid'] == $selected_group_id),\n );\n }\n\n // One group must be selected by default\n if (!empty($groups_list)) {\n // Check if there is selected group\n $selected_group_present = false;\n foreach ($groups_list as $group) {\n if ($group['selected']) {\n $selected_group_present = true;\n break;\n }\n }\n\n // If there is no selected group select the first one\n if (!$selected_group_present) {\n $groups_list[0]['selected'] = true;\n }\n }\n\n return $groups_list;\n}", "title": "" }, { "docid": "f8ae178ecbce3bb8ed6b74efa36f3802", "score": "0.5781325", "text": "public function getGroups() : array {\n\t\treturn $this->container->getHierarchyLevel(Group::class);\n\t}", "title": "" }, { "docid": "7c66c51e358dbc36d274b4e2109babac", "score": "0.57676685", "text": "function build_groups_list_array()\r\n{\r\n\tglobal $db;\r\n\t$sql = \"SELECT group_id, group_name, group_color\r\n\t\tFROM \" . GROUPS_TABLE . \"\r\n\t\tWHERE group_single_user <> \" . TRUE . \"\r\n\t\t\tAND group_legend = 1\r\n\t\tORDER BY group_name ASC\";\r\n\tif (!($result = $db->sql_query($sql)))\r\n\t{\r\n\t\tmessage_die(GENERAL_ERROR, 'Could not obtain group list', '', __LINE__, __FILE__, $sql);\r\n\t}\r\n\r\n\t$i = 0;\r\n\t$groups_list = array();\r\n\twhile ($row = $db->sql_fetchrow($result))\r\n\t{\r\n\t\t$i++;\r\n\t\t$groups_list[$i]['group_id'] = $row['group_id'];\r\n\t\t$groups_list[$i]['group_name'] = $row['group_name'];\r\n\t\t$groups_list[$i]['group_url'] = append_sid('groupcp.' . PHP_EXT . '?' . POST_GROUPS_URL . '=' . $row['group_id']);\r\n\t\t$groups_list[$i]['group_color'] = check_valid_color($row['group_color']);\r\n\t\t$groups_list[$i]['group_color_style'] = ($groups_list[$i]['group_color'] ? ' style=\"color:' . $row['group_color'] . ';font-weight:bold;\"' : ' style=\"font-weight:bold;\"');\r\n\t}\r\n\t$db->sql_freeresult($result);\r\n\tif ($i > 0)\r\n\t{\r\n\t\treturn $groups_list;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "0930f1db5dbfdd0dc2e3c67016541217", "score": "0.57234335", "text": "function GetSubgroupList($pGroupId) \n {\t\t\t\n // Connecting to DB\n $mysqli = new mysqli(\"localhost\", \"faust\", \"ioan\", \"iNDocsnet\"); // connecting to DB\n if ($mysqli->connect_error) \n {\n die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);\n }\n $mysqli->set_charset(\"utf8\");\n \n // подготавливаемый запрос, первая стадия: подготовка \n if (!($stmt = $mysqli->prepare(\"SELECT group_id, name, native_lang_name FROM groups WHERE group_id IN (SELECT group_id FROM groups_graph WHERE parent_group_id = (?))\"))) {\n echo \"Не удалось подготовить запрос: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n // подготавливаемый запрос, вторая стадия: привязка и выполнение \n if (!$stmt->bind_param(\"i\", $pGroupId)) {\n echo \"Не удалось привязать параметры: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n // выполняю запрос\n if (!$stmt->execute()) {\n echo \"Не удалось выполнить запрос: (\" . $stmt->errno . \") \" . $stmt->error;\n } \n // Определяю переменные для результата \n $stmt->bind_result($lGrId, $lGrNm, $lNativeLangGrNm); \n $mGroupList = NULL;\n $lCounter = 0;\n // Выбираю значения изрезалтсета\n while ($stmt->fetch()) { \n $mGroup = [$lGrId, $lNativeLangGrNm];\n $mGroupList[$lCounter] = $mGroup;\n $lCounter = $lCounter + 1;\n }\n // free memory\n $stmt->close();\n \n// //Old version \n// // Select group_id's and native_lang_name's \n// $result_set = $mysqli->query(\"SELECT group_id, name, native_lang_name FROM groups WHERE group_id IN (SELECT group_id FROM groups_graph WHERE parent_group_id = '$pGroupId')\"); // selecting rows from \"groups_graph\" table\n// $mGroupList = NULL;\n// $lCounter = 0;\n// while ($line = $result_set->fetch_assoc()) \n// {\n// $mGroup = [$line[\"group_id\"], $line[\"native_lang_name\"]];\n// $mGroupList[$lCounter] = $mGroup;\n// $lCounter = $lCounter + 1;\n// }\n// if(count($mGroupList)==0){\n// $mGroupList[0] = [-1 , \"У выбранной группы отсутствуют подгруппы\"];\n// }\n// $result_set->close();\n\n return $mGroupList;\n }", "title": "" }, { "docid": "6e8ad27cb9084bcf5a010e8ff82f57f5", "score": "0.5711715", "text": "public function getGroups(){\r\n\t\tif(empty($this->groupList))\r\n\t\t\t$this->readGroups();\r\n\t\treturn $this->groupList;\r\n\t}", "title": "" }, { "docid": "9c76cd4984e34a3431add499e98bc335", "score": "0.5696962", "text": "public function getGroups($only_subscribed_groups = false){\n\n\n\n // These are the content types which are used by Drupal for the 2 types of groups (regional groups and working groups)\n\n $content_types = explode(',', $this->config['group_content_types']);\n\n\n\n $groups = array();\n\n $nodes = array();\n\n $result['error'] = false;\n\n\n\n // Limiting the request, just in case...\n\n $init_value = 0;\n\n $max_results = 100;\n\n\n\n // Start Drupal database query\n\n $query = new \\EntityFieldQuery();\n\n $entities = $query->entityCondition('entity_type', 'node')\n\n ->propertyCondition('type', $content_types)\n\n ->propertyCondition('status', 1)\n\n ->propertyOrderBy('title','ASC')\n\n ->range($init_value, $max_results)\n\n ->execute();\n\n\n\n if (!empty($entities['node'])) {\n\n $node_ids = array_keys($entities['node']);\n\n $nodes = entity_load('node', $node_ids);\n\n }\n\n\n\n // Extract group title only\n\n $i = 0;\n\n foreach ($nodes as $node){\n\n\n\n // Get group ID (we allow 5 different group types, but currently all Drupal sites using this module only use 2 group types)\n\n if (isset ($node->field_group_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group2_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group2_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group3_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group3_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group4_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group4_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group5_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group5_id_for_qmembers['und'][0]['value']);\n\n else $group_id = '';\n\n\n\n if ($only_subscribed_groups){\n\n\n\n $NodeGroups = new NodeGroups;\n\n if ( in_array($group_id, $NodeGroups->subscribed_groups) ){\n\n\n\n $groups[$i]['title'] = $node->title;\n\n $groups[$i]['id'] = $group_id;\n\n }\n\n }\n\n else{\n\n $groups[$i]['title'] = $node->title;\n\n $groups[$i]['id'] = $group_id;\n\n }\n\n\n\n $i++;\n\n }\n\n\n\n return $groups;\n\n }", "title": "" }, { "docid": "8bd2931fbe2e4e1de93c3074579d9bb4", "score": "0.5657525", "text": "public function getAllGroups();", "title": "" }, { "docid": "6dc92eed069a6407bf403cf4351fac26", "score": "0.56541693", "text": "public function getGroups() {\n\t\treturn $this->collectRecursiveDataCached('getSubgroup', 'getSubgroup', null, function($item) {\n\t\t\treturn $item->getUid();\n\t\t});\n\t}", "title": "" }, { "docid": "64784cba628c2cad2e3f9f52deb2d4c6", "score": "0.5649744", "text": "public function Groups() {\n\t\t$groups = $this->getManyManyComponents(\"Groups\");\n\n\t\t$unsecure = DataObject::get(\"Group_Unsecure\", \"\");\n\t\tif($unsecure) {\n\t\t\tforeach($unsecure as $unsecureItem) {\n\t\t\t\t$groups->push($unsecureItem);\n\t\t\t}\n\t\t}\n\n\t\t$groupIDs = $groups->column();\n\t\t$collatedGroups = array();\n\t\tforeach($groups as $group) {\n\t\t\t$collatedGroups = array_merge((array)$collatedGroups,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$group->collateAncestorIDs());\n\t\t}\n\n\t\t$table = \"Group_Members\";\n\n\t\tif(count($collatedGroups) > 0) {\n\t\t\t$collatedGroups = implode(\", \", array_unique($collatedGroups));\n\n\t\t\t$result = singleton('Group')->instance_get(\"`ID` IN ($collatedGroups)\", \"ID\", \"\", \"\", \"Member_GroupSet\");\n\t\t} else {\n\t\t\t$result = new Member_GroupSet();\n\t\t}\n\n\t\t$result->setComponentInfo(\"many-to-many\", $this, \"Member\", $table,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Group\");\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "411e2e8f873c75759d608372203b843a", "score": "0.5626155", "text": "protected function get_group_filter() {\n\n //TODO: Replace this with a SQL join? \n\n // If the user is not allowed to access all groups in the current context,\n // create a \"filter\" which identifies which groups the user can access. \n if (!has_capability('moodle/site:accessallgroups', $this->context, $this->user)) {\n\n // Get an array of groups which the current user is a member of.\n $member_groups = groups_get_user_groups($this->course->id);\n\n // If the user isn't in any groups, they shouldn't be able to see anything.\n if(empty($mygroups['0'])) {\n \n // Return an empty array of \"seeable\" groups.\n return array();\n\n } else {\n \n // Otherwise, create a SQL clause which will get all of the relevant groups...\n $gids = implode(',', array_values($mygroups['0']));\n\n // ... and use it to get an array of group information.\n return $DB->get_records_select('groups', 'id IN ('.$gids.')');\n\n }\n\n // Otherwise, the user can access all groups, and no filter is necessary.\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "37015e60926505eadf28e0f2995214e8", "score": "0.5623416", "text": "public static function groups(): array {\n $storage = \\Drupal::entityTypeManager()->getStorage('ebms_group');\n $query = $storage->getQuery()->accessCheck(FALSE);\n $query->sort('name');\n $entities = $storage->loadMultiple($query->execute());\n $groups = [];\n foreach ($entities as $entity) {\n $groups[$entity->id()] = $entity->getName();\n }\n return $groups;\n }", "title": "" }, { "docid": "83f5a4f40acdfa7021d2ce23b29af9b7", "score": "0.56166166", "text": "function crb_make_named_group_array_recursively($value_tree)\n{\n $named_group_array = [];\n foreach ($value_tree as $field_group_key => $field_group) {\n $fields = [];\n foreach ($field_group as $field_key => $field) {\n if (is_array($field)) {\n if (count($field) == 1) {\n $fields[$field_key] = $field[0]['value'];\n } else {\n $named_group_array = array_merge(crb_make_named_group_array_recursively($field), $named_group_array);\n }\n }\n }\n if (isset($field_group['__id__']) && $field_group['__id__'] != '') {\n $group_id = $field_group['__id__'][0]['value'];\n $named_group_array[$group_id] = $fields;\n }\n }\n return $named_group_array;\n}", "title": "" }, { "docid": "4608464d27cbac19e8fc0c38fb791fc0", "score": "0.5602008", "text": "function search_group()\r\n{\r\n\tglobal $database, $url, $results_per_page, $p, $search_text, $t, $search_objects, $results, $total_results;\r\n\r\n\r\n\t// GET GROUP FIELDS\r\n\t$fields = $database->database_query(\"SELECT groupfield_id AS field_id, groupfield_type AS field_type, groupfield_options AS field_options FROM se_groupfields WHERE groupfield_type<>'5' AND (groupfield_dependency<>'0' OR (groupfield_dependency='0' AND groupfield_display<>'0'))\");\r\n\t$group_query = \"se_groups.group_title LIKE '%$search_text%' OR se_groups.group_desc LIKE '%$search_text%'\";\r\n \r\n\t// LOOP OVER FIELDS\r\n\twhile($field_info = $database->database_fetch_assoc($fields)) {\r\n \r\n\t // TEXT FIELD OR TEXTAREA\r\n\t if($field_info['field_type'] == 1 || $field_info['field_type'] == 2) {\r\n\t if($group_query != \"\") { $group_query .= \" OR \"; }\r\n\t $group_query .= \"se_groupvalues.groupvalue_\".$field_info['field_id'].\" LIKE '%$search_text%'\";\r\n\r\n\t // RADIO OR SELECT BOX\r\n\t } elseif($field_info['field_type'] == 3 || $field_info['field_type'] == 4) {\r\n\t $options = unserialize($field_info['field_options']);\r\n \t $langids = Array();\r\n\t $cases = Array();\r\n\t for($i=0,$max=count($options);$i<$max;$i++) { \r\n\t $cases[] = \"WHEN languagevar_id={$options[$i]['label']} THEN {$options[$i]['value']}\";\r\n\t $langids[] = $options[$i]['label']; \r\n\t }\r\n\t if(count($cases) != 0) {\r\n\t if($group_query != \"\") { $group_query .= \" OR \"; }\r\n\t $group_query .= \"se_groupvalues.groupvalue_\".$field_info['field_id'].\" IN (SELECT CASE \".implode(\" \", $cases).\" END AS value FROM se_languagevars WHERE languagevar_id IN (\".implode(\", \", $langids).\") AND languagevar_value LIKE '%$search_text%')\";\r\n\t }\r\n\r\n\t // CHECKBOX\r\n\t } elseif($field_info['field_type'] == 6) {\r\n\t $options = unserialize($field_info['field_options']);\r\n \t $langids = Array();\r\n\t $cases = Array();\r\n\t for($i=0,$max=count($options);$i<$max;$i++) { \r\n\t $cases[] = \"WHEN languagevar_id={$options[$i]['label']} THEN \".(pow(2, $i));\r\n\t $langids[] = $options[$i][label]; \r\n\t }\r\n\t if(count($cases) != 0) {\r\n\t if($group_query != \"\") { $group_query .= \" OR \"; }\r\n\t $group_query .= \"se_groupvalues.groupvalue_\".$field_info['field_id'].\" & (SELECT sum(CASE \".implode(\" \", $cases).\" END) AS value FROM se_languagevars WHERE languagevar_id IN (\".implode(\", \", $langids).\") AND languagevar_value LIKE '%$search_text%')\";\r\n\t }\r\n\t }\r\n\t}\r\n\r\n\t// CONSTRUCT QUERY\r\n\t$group_query = \"\r\n\t(\r\n\tSELECT \r\n\t '1' AS sub_type,\r\n\t se_groups.group_id AS group_id, \r\n\t se_groups.group_title AS group_title, \r\n\t se_groups.group_photo AS group_photo,\r\n\t '' AS title,\r\n\t se_groups.group_desc AS description,\r\n\t '' AS id,\r\n\t '' AS extra\r\n\tFROM \r\n\t se_groupvalues \r\n\tLEFT JOIN \r\n\t se_groups \r\n\tON \r\n\t se_groupvalues.groupvalue_group_id=se_groups.group_id \r\n\tWHERE \r\n\t se_groups.group_search='1' \r\n\t AND \r\n\t ($group_query)\r\n\tORDER BY group_id DESC\r\n\t)\r\n\tUNION ALL\r\n\t(\r\n\tSELECT\r\n '2' AS sub_type,\r\n\t se_groups.group_id AS group_id, \r\n\t se_groups.group_title AS group_title, \r\n\t se_groups.group_photo AS group_photo,\r\n\t se_groupmedia.groupmedia_title AS title,\r\n\t se_groupmedia.groupmedia_desc AS description,\r\n\t se_groupmedia.groupmedia_id AS id,\r\n\t se_groupmedia.groupmedia_ext AS extra\r\n\tFROM\r\n\t se_groupmedia,\r\n\t se_groupalbums,\r\n\t se_groups\r\n\tWHERE\r\n\t se_groupmedia.groupmedia_groupalbum_id=se_groupalbums.groupalbum_id AND\r\n\t se_groupalbums.groupalbum_group_id=se_groups.group_id AND\r\n\t se_groups.group_search='1'\r\n\t AND\r\n\t (\r\n\t se_groupmedia.groupmedia_title LIKE '%$search_text%' OR\r\n\t se_groupmedia.groupmedia_desc LIKE '%$search_text%'\r\n\t )\r\n\tORDER BY groupmedia_id DESC\r\n\t)\r\n\tUNION ALL\r\n\t(\r\n\tSELECT\r\n '3' AS sub_type,\r\n\t se_groups.group_id AS group_id, \r\n\t se_groups.group_title AS group_title, \r\n\t se_groups.group_photo AS group_photo,\r\n\t se_grouptopics.grouptopic_subject AS title,\r\n\t se_groupposts.grouppost_body AS description,\r\n\t se_grouptopics.grouptopic_id AS id,\r\n\t se_groupposts.grouppost_id AS extra\r\n\tFROM\r\n\t se_groupposts,\r\n\t se_grouptopics,\r\n\t se_groups\r\n\tWHERE\r\n\t se_groupposts.grouppost_grouptopic_id=se_grouptopics.grouptopic_id AND\r\n\t se_grouptopics.grouptopic_group_id=se_groups.group_id AND\r\n\t se_groups.group_search='1'\r\n\t AND\r\n\t (\r\n\t se_groupposts.grouppost_body LIKE '%$search_text%'\r\n\t )\r\n\tORDER BY grouppost_id DESC\r\n\t)\";\r\n\r\n\t// GET TOTAL GROUP RESULTS\r\n\t$total_groups = $database->database_num_rows($database->database_query($group_query.\" LIMIT 201\"));\r\n\r\n\t// IF NOT TOTAL ONLY\r\n\tif($t == \"group\") {\r\n\r\n\t // MAKE GROUP PAGES\r\n\t $start = ($p - 1) * $results_per_page;\r\n\t $limit = $results_per_page+1;\r\n\r\n\t // SEARCH GROUPS\r\n\t $groups = $database->database_query($group_query.\" LIMIT $start, $limit\");\r\n\t while($group_info = $database->database_fetch_assoc($groups)) {\r\n\r\n\t // SET UP GROUP\r\n\t $group = new se_group();\r\n\t $group->group_info['group_id'] = $group_info['group_id'];\r\n\t $group->group_info['group_photo'] = $group_info['group_photo'];\r\n\t $thumb_path = $group->group_photo('./images/nophoto.gif', TRUE);\r\n\r\n\t // IF DESCRIPTION IS LONG\r\n\t if(strlen($group_info['description']) > 150) { $group_info['description'] = substr($group_info['description'], 0, 147).\"...\"; }\r\n\t if(strlen($group_info['group_desc']) > 150) { $group_info['group_desc'] = substr($group_info['group_desc'], 0, 147).\"...\"; }\r\n\r\n\t // RESULT IS A GROUP\r\n\t if($group_info[sub_type] == 1)\r\n {\r\n\t $result_url = $url->url_create('group', NULL, $group_info['group_id']);\r\n\t $result_name = 2000292;\r\n\t $result_name_1 = $group_info['group_title'];\r\n\t $result_desc = 2000295;\r\n\t $result_desc_1 = $group_info['description'];\r\n }\r\n \r\n\t // RESULT IS A PHOTO\r\n\t elseif($group_info['sub_type'] == 2)\r\n {\r\n\t $result_url = $url->url_create('group_media', NULL, $group_info['group_id'], $group_info['id']);\r\n\t $result_name = 2000293;\r\n\t $result_name_1 = $group_info['title'];\r\n\t $result_desc = 2000296;\r\n\t $result_desc_1 = $url->url_create('group', NULL, $group_info['group_id']);\r\n\t $result_desc_2 = $group_info['group_title'];\r\n\t $result_desc_3 = $group_info['description'];\r\n\r\n\t // SET THUMBNAIL, IF AVAILABLE\r\n\t switch($group_info['extra'])\r\n {\r\n case \"jpeg\": case \"jpg\": case \"gif\": case \"png\": case \"bmp\":\r\n $thumb_path = $group->group_dir($group->group_info['group_id']).$group_info['id'].\"_thumb.jpg\";\r\n break;\r\n case \"mp3\": case \"mp4\": case \"wav\":\r\n $thumb_path = \"./images/icons/audio_big.gif\";\r\n break;\r\n case \"mpeg\": case \"mpg\": case \"mpa\": case \"avi\": case \"swf\": case \"mov\": case \"ram\": case \"rm\":\r\n $thumb_path = \"./images/icons/video_big.gif\";\r\n break;\r\n default:\r\n $thumb_path = \"./images/icons/file_big.gif\";\r\n\t }\r\n \r\n\t if(!file_exists($thumb_path)) { $thumb_path = \"./images/icons/file_big.gif\"; }\r\n }\r\n \r\n\t // RESULT IS A DISCUSSION POST\r\n\t else\r\n {\r\n\t $result_url = $url->url_create('group_discussion_post', NULL, $group_info['group_id'], $group_info['id'], $group_info['extra']);\r\n\t $result_name = 2000294;\r\n\t $result_name_1 = $group_info['title'];\r\n\t $result_desc = 2000297;\r\n\t $result_desc_1 = $url->url_create('group', NULL, $group_info['group_id']);\r\n\t $result_desc_2 = $group_info['group_title'];\r\n\t $result_desc_3 = $group_info['description'];\r\n\t }\r\n \r\n\t $results[] = Array(\r\n 'result_url' => $result_url,\r\n\t\t\t\t'result_icon' => $thumb_path,\r\n\t\t\t\t'result_name' => $result_name,\r\n\t\t\t\t'result_name_1' => $result_name_1,\r\n\t\t\t\t'result_desc' => $result_desc,\r\n\t\t\t\t'result_desc_1' => $result_desc_1,\r\n\t\t\t\t'result_desc_2' => $result_desc_2,\r\n\t\t\t\t'result_desc_3' => $result_desc_3\r\n );\r\n\t }\r\n\r\n\t // SET TOTAL RESULTS\r\n\t $total_results = $total_groups;\r\n\r\n\t}\r\n\r\n\t// SET ARRAY VALUES\r\n\tSE_Language::_preload_multi(2000291, 2000292, 2000293, 2000294, 2000295, 2000296, 2000297);\r\n\tif($total_groups > 200) { $total_groups = \"200+\"; }\r\n\t$search_objects[] = Array(\r\n 'search_type' => 'group',\r\n 'search_lang' => 2000291,\r\n 'search_total' => $total_groups\r\n );\r\n}", "title": "" }, { "docid": "45f610ea881d321422a3d15103298753", "score": "0.55628854", "text": "function get_groups_from_grouping($grouping_id) {\r\n\t$query = \"SELECT gid FROM {pi_grouping_group} WHERE grouping_id = %d\";\r\n\t$result = db_query($query, $grouping_id);\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "0bd3b90fc070b433a9ab82680b94be86", "score": "0.5561121", "text": "public function getAllGroups()\n {\n // get the cache for this service\n $cache = Injector::inst()->get(CacheInterface::class . '.nztaWorkplace');\n $cacheKey = md5('workplaceGroups');\n\n // attempt to retrieve Array of groups from cache\n if (!($groups = $cache->get($cacheKey))) {\n $response = $this->WorkplaceGateway->getAllGroups();\n $groups = [];\n $items = json_decode($response)->data;\n if (is_array($items)) {\n foreach ($items as $item) {\n if (isset($item->id) && isset($item->name)) {\n $groups[$item->id] = $item->name;\n }\n }\n }\n\n // otherwise we retrieve the groups and store to the cache as an array\n $cache->set($cacheKey, $groups, Config::inst()->get(WorkplaceService::class, 'workplace_groups_lifetime'));\n }\n return $groups;\n\n }", "title": "" }, { "docid": "1b8bdc2ef4d85b8d972f4b63dab0c356", "score": "0.5518964", "text": "public function getGroups() \n {\n // metodo para el selector dinamico\n }", "title": "" }, { "docid": "5bfd08d45b2252cffc4d25487cc55134", "score": "0.551234", "text": "private function GetGroupsList()\n {\n $shell_result = $this->ExecuteCommand('sudo cat /etc/group')->Output;\n $groups = preg_split('/[\\r\\n]+/', $shell_result, -1, PREG_SPLIT_NO_EMPTY);\n $result = array();\n\n foreach ($groups as $group)\n {\n // name : password : GID : member1,member2...\n // mysql:x:117:\n $fields = explode(':', $group);\n $g = new \\WebAPI\\Users\\Models\\Group();\n $g->Name = $fields[0];\n $g->Password = $fields[1];\n $g->Id = $fields[2];\n $g->Members = explode(',', $fields[3]);\n\n $result[] = $g;\n }\n \n return $result;\n }", "title": "" }, { "docid": "a1731ee67f022ab1ee1f8e9494c984b1", "score": "0.5508195", "text": "protected function getSubEventGroups($groupId) {\n $q = $this->modx->newQuery('popEventGroup');\n\t\t$q->where(array(\n 'parent' => $groupId\n ));\n $q->sortby('rank','ASC');\n $groups = $this->modx->getCollection('popEventGroup', $q);\n\n\t\t// init empty nodes array\n\t\t$nodes = array();\n\n foreach ($groups as $group) {\n\t \n // create new node array to hold properties of current group\n $node = $group->toArray();\n $node['text'] = $group->get('name') . ' (' . $group->get('id') . ')';\n\t $node['leaf'] = true;\n \n // build query to check if current group has children\n $c = $this->modx->newQuery('popEventGroup');\n\t\t\t$c->where(array(\n 'parent' => $group->get('id')\n ));\n $childrenCount = $this->modx->getCount('popEventGroup', $c);\n\n if ($childrenCount > 0) {\n\t $node['leaf'] = false;\n\t $node['children'] = $this->getSubEventGroups($group->get('id'));\n }\n \n $nodes[] = $node;\n\n }\n \n return $nodes;\n }", "title": "" }, { "docid": "3ab3bc914869d69c05e5531e73db4949", "score": "0.5495906", "text": "public static function getGroupList( $data = array() ){\n\t\t\t$resultado = DB::select('ads_groups ag')\n\t\t\t\t->where('ag.state', '!=', 0);\n\n\t\t\tif( isset($data['columns']) ) $resultado->columns($data['columns']);\n\t\t\tif( isset($data['type']) ) $resultado->where('type', '=', $data['type']);\n\n\t\t\tif( isset($data['limit'], $data['offset']) )\n\t\t\t\t$resultado->limit($data['limit'], $data['offset']);\n\t\t\telse if( isset($data['limit']) ) $resultado->limit($data['limit']);\n\n\t\t\tif( isset($data['order']) ) $resultado->order($data['order']);\n\n\t\t\treturn self::getSelect($resultado->getSQL());\n\t\t}", "title": "" }, { "docid": "54d98c171de329ad8120d4f74a0b08d2", "score": "0.5475609", "text": "static function getUserGroupsTree( &$requiredParams,\n $filter,\n $curDN,\n &$groupsTree,\n &$stack, // stack for recursion checking\n $depth = 0 )\n {\n if ( $depth == 0 )\n {\n return false;\n }\n $thisFunctionErrorLabel = 'eZComuneDiTrentoLDAPUser.php, function getUserGroupsTree()';\n\n if ( !isset( $requiredParams[ 'LDAPGroupBaseDN' ] ) or empty( $requiredParams[ 'LDAPGroupBaseDN' ] ) or\n !isset( $requiredParams[ 'LDAPGroupClass' ] ) or empty( $requiredParams[ 'LDAPGroupClass' ] ) or\n !isset( $requiredParams[ 'LDAPGroupNameAttribute' ] ) or empty( $requiredParams[ 'LDAPGroupNameAttribute' ] ) or\n !isset( $requiredParams[ 'LDAPGroupMemberAttribute' ] ) or empty( $requiredParams[ 'LDAPGroupMemberAttribute' ] ) or\n !isset( $requiredParams[ 'ds' ] ) or !$requiredParams[ 'ds' ] )\n {\n eZDebug::writeError( 'Missing one of required parameters.',\n $thisFunctionErrorLabel );\n return false;\n }\n if ( !isset( $groupsTree[ $curDN ] ) )\n {\n eZDebug::writeError( 'Passed $curDN is not in result tree array. Algorithm\\'s usage error.',\n $thisFunctionErrorLabel );\n return false;\n }\n array_push( $stack, $curDN );\n\n $LDAPGroupBaseDN =& $requiredParams[ 'LDAPGroupBaseDN' ];\n $LDAPGroupClass =& $requiredParams[ 'LDAPGroupClass' ];\n $LDAPGroupNameAttribute =& $requiredParams[ 'LDAPGroupNameAttribute' ];\n $LDAPGroupMemberAttribute =& $requiredParams[ 'LDAPGroupMemberAttribute' ];\n $LDAPGroupDescriptionAttribute =& $requiredParams[ 'LDAPGroupDescriptionAttribute' ];\n $ds =& $requiredParams[ 'ds' ];\n\n $current =& $groupsTree[ $curDN ];\n\n $retrieveAttributes = array( $LDAPGroupNameAttribute,\n $LDAPGroupMemberAttribute );\n $sr = ldap_search( $ds, $LDAPGroupBaseDN, $filter, $retrieveAttributes );\n $entries = ldap_get_entries( $ds, $sr );\n\n if ( is_array( $entries ) and\n isset( $entries[ 'count' ] ) and $entries[ 'count' ] > 0 )\n {\n $newfilter = '(&(objectClass=' . $LDAPGroupClass . ')';\n\n for ( $i = 0; $i < $entries[ 'count' ]; $i++ )\n {\n $parent =& $entries[ $i ];\n if ( is_null( $parent ) )\n continue;\n\n $parentDN =& $parent['dn'];\n if ( in_array( $parentDN, $stack ) )\n {\n $requiredParams[ 'LDAPGroupNameAttribute' ];\n\n eZDebug::writeError( 'Recursion is detected in the user-groups tree while getting parent groups for ' . $curDN,\n $thisFunctionErrorLabel );\n $groupsTree[ '_recursion_detected_' ] = true;\n return false;\n }\n\n if ( !isset( $groupsTree[ $parentDN ] ) )\n {\n $groupsTree[ $parentDN ] = array( 'data' => $parent,\n 'parents' => array(),\n 'children' => array() );\n }\n $groupsTree[ $parentDN ][ 'children' ][ $curDN ] =& $current;\n $current[ 'parents' ][ $parentDN ] =& $groupsTree[ $parentDN ];\n $newfilter1 = $newfilter . '(' . $LDAPGroupMemberAttribute . '=' . $parentDN . '))';\n $ret = eZComuneDiTrentoLDAPUser::getUserGroupsTree( $requiredParams,\n $newfilter1,\n $parentDN,\n $groupsTree,\n $stack,\n $depth - 1 );\n if ( isset( $groupsTree[ '_recursion_detected_' ] ) and\n $groupsTree[ '_recursion_detected_' ] )\n {\n return false;\n }\n }\n }\n else\n {\n // We've reached a top node\n if ( !isset( $groupsTree[ 'root' ] ) )\n {\n $groupsTree[ 'root' ] = array( 'data' => null,\n 'parents' => null,\n 'children' => array(),\n 'nodes' => array( $requiredParams[ 'TopUserGroupNodeID' ] ) );\n }\n if ( !isset( $groupsTree[ 'root' ][ 'children' ][ $curDN ] ) )\n $groupsTree[ 'root' ][ 'children' ][ $curDN ] =& $current;\n if ( !isset( $current[ 'parents' ][ 'root' ] ) )\n $current[ 'parents' ][ 'root' ] =& $groupsTree[ 'root' ];\n }\n\n array_pop( $stack );\n return true;\n }", "title": "" }, { "docid": "f9d13125cd39e25e7c13cbde6b8cf0e4", "score": "0.5463345", "text": "function groups($group = null,$uniqueKey = \"id\",$where = \"\")\r\n{\r\n\t$result = null;\n\n\tglobal $mysqli_object; global $worked; $worked = false; global $output; $output = \"\";\n\tglobal $settings_database_name; global $settings_database_auth_table; global $settings_database_groups_table; global $settings_uniqueUsernames; global $settings_lastDatabase; global $settings_lastTable; global $settings_lastColumn;\n\t$query = \"\";\n\tif((!is_null($group)) && haspropertyandvalue($group,$uniqueKey,\"groups\") && (!is_null($uniqueKey)))\n\t{\n\t\tif(haspropertyandvalue($group,$uniqueKey,\"groups\"))\n\t\t{\n\t\t\t$group_string = \"\";\n\t\t\tif(is_array($group))\n\t\t\t{\n\t\t\t\t$group_string = $group[$uniqueKey];\n\t\t\t}\n\t\t\telse if(is_object($group))\n\t\t\t{\n\t\t\t\t$group_string = $group->$uniqueKey;\n\t\t\t}\n\t\t\t// filter list\n\t\t\t$query = \"SELECT * FROM `\".$settings_database_groups_table.\"` WHERE `\".$uniqueKey.\"` = '\".$group_string.\"'\";\r\n\t\t\t$settings_lastDatabase = $settings_database_name;\n\t\t\t$settings_lastTable = $settings_database_auth_table;\n\t\t\t$settings_lastColumn = $uniqueKey;\n\t\t}\n\t}\n\telse\n\t{\r\n\t\tif(empty($where))\r\n\t\t{\r\n\t\t\t// return all groups\n\t\t\t$query = \"SELECT * FROM `\".$settings_database_groups_table.\"`\";\r\n\t\t\t$settings_lastDatabase = $settings_database_name;\n\t\t\t$settings_lastTable = $settings_database_groups_table;\n\t\t\t$settings_lastColumn = \"\";\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$query = \"SELECT * FROM `\".$settings_database_groups_table.\"` \".$where;\r\n\t\t\t$settings_lastDatabase = $settings_database_name;\n\t\t\t$settings_lastTable = $settings_database_groups_table;\n\t\t\t$settings_lastColumn = \"\";\n\t\t}\n\t}\n\n\t$group_array = $mysqli_object->query($query);\n\tif(isset($group_array))\n\t{\n\t\tif(count($group_array) <= 1)\n\t\t{\n\t\t\tif(isset($group_array[0]))\n\t\t\t{\n\t\t\t\t$result = $group_array[0];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = $group_array; // multiple records returned\n\t\t}\n\t}\n\n\tif(!empty($result)) $worked = true;\n\n\treturn $result;\n}", "title": "" }, { "docid": "7c6c761c9db0be18376e020d2f6ddb02", "score": "0.5461503", "text": "public function fetchGroups()\n {\n $result = DB::forTable('groups')->order_by_asc('g_id')->find_many();\n $groups = [];\n foreach ($result as $cur_group) {\n $groups[$cur_group['g_id']] = $cur_group;\n }\n return $groups;\n }", "title": "" }, { "docid": "3184152adb9fafeb17066747be182e49", "score": "0.5455719", "text": "function findAllGroups(){\n \n Log::info(\"Entering GroupBusinessService.findAllGroups() \");\n \n $database = new Database();\n $db = $database->getConnection();\n \n // Create a Group Data Service with this connection and calls findAllGroups method/\n $dbService = new GroupDataService($db);\n $flag = $dbService->findAllGroups();\n \n // close the connection\n $db = null;\n \n // return the finder result\n Log::info(\"Exit GroupBusinessService.findAllGroups() \");\n return $flag;\n }", "title": "" }, { "docid": "06ef8cc4fffa6d5a68debf3aeb12e8f0", "score": "0.5445325", "text": "public static function get_groups(){\n global $DB;\n\n $sql_groups = \"SELECT DISTINCT mdl_user_info_data.data, mdl_nir_groups.is_active, mdl_nir_groups.id AS nir_group_id FROM mdl_user_info_data LEFT JOIN mdl_nir_groups \n ON mdl_user_info_data.data = mdl_nir_groups.group_name WHERE mdl_user_info_data.fieldid = ? AND mdl_user_info_data.data != '' \n ORDER BY mdl_user_info_data.data\";\n $groups = $DB->get_records_sql($sql_groups, array(Config::FIELD_GROUP_ID));\n\n return $groups;\n }", "title": "" }, { "docid": "59b4e04f05da68d4bd781be07f4d7aad", "score": "0.5445082", "text": "private function getUserGroups()\n\t{\n\t\t$user = JFactory::getUser();\n\t\t$database = JFactory::getDBO();\n\t\tTienda::load( 'TiendaQuery', 'library.query' );\n\t\t$query = new TiendaQuery();\n\t\t$query->select( 'tbl.group_id' );\n\t\t$query->from('#__tienda_usergroupxref AS tbl');\n\t\t$query->join('INNER', '#__tienda_groups AS g ON g.group_id = tbl.group_id');\n\t\t$query->where(\"tbl.user_id = \".(int) $user->id);\n\t\t$query->order('g.ordering ASC');\n\n\t\t$database->setQuery( (string) $query );\n\t\treturn $database->loadResultArray();\n\t}", "title": "" }, { "docid": "c90539039271e679ef9a2ffdd4370ae8", "score": "0.5435481", "text": "function _get_members_groups($member)\n\t{\n\t\t$group=$this->get_member_row_field($member,'groupid');\n\t\treturn array($group);\n\t}", "title": "" }, { "docid": "195676b98f91376ddad7f83996f1ee86", "score": "0.5427823", "text": "function getAllGroupList()\n {\n $info['entity_table'] = $this->entity_table;\n $info['debug'] = false;\n\n // Select groups from DB\n $result = select($info);\n\n return $result;\n }", "title": "" }, { "docid": "220ecfceb8a7bd0432f31dc298b4c8c1", "score": "0.5407344", "text": "public function listGroups(&$input) {\n\n $allGroups = $this->uStore->listGroups();\n $response = array();\n if ($allGroups !== false) {\n $response[\"groups\"] = array();\n foreach ($allGroups as $group) {\n array_push($response[\"groups\"], $group->toArray());\n }\n $response[\"result\"] = \"success\";\n } else {\n $response[\"result\"] = \"failure\";\n }\n return $response;\n }", "title": "" }, { "docid": "ae2f32b6fe21faee99fc173ae1ab0377", "score": "0.5383074", "text": "private function group(&$data) {\n $result = array();\n\n if ( $this->options['group'] !== 'none' ) {\n foreach ( $data as $entry ) {\n if ( !empty($entry[$this->options['group']]) || $this->options['group'] === 'firstauthor' ) {\n if ( $this->options['group'] === 'firstauthor' ) {\n $target = $entry['author'][0]['nice'];\n }\n elseif ( $this->options['group'] === 'author' ) {\n $target = $entry['niceauthor'];\n }\n else {\n $target = $entry[$this->options['group']];\n }\n }\n else {\n $target = $this->options['lang']['rest'];\n }\n\n if ( empty($result[$target]) ) {\n $result[$target] = array();\n }\n\n $result[$target][] = $entry;\n }\n }\n else {\n $result[$this->options['lang']['all']] = $data;\n }\n\n return $result;\n }", "title": "" }, { "docid": "fd6468aaa2b105b76a0e2cf79fc0f051", "score": "0.5374431", "text": "public function getAllGroups()\r\n {\r\n $filter = 'objectclass=group';\r\n $attribs = array('cn');\r\n\t\t$result = ldap_search($this->_conn, $this->_baseDn, $filter, $attribs);\r\n\t\t$entries = ldap_get_entries($this->_conn, $result);\r\n\r\n $groups = array();\r\n $exclude = array_flip($this->_excludedGroups);\r\n foreach ($entries as $array) {\r\n $groupName = $array['cn'][0];\r\n if (isset($exclude[$groupName])) {\r\n continue;\r\n }\r\n if ($groupName) {\r\n $groups[] = $groupName;\r\n }\r\n }\r\n sort($groups);\r\n return $groups;\r\n }", "title": "" }, { "docid": "7f1bf88d0424057c983da2c1abfa384a", "score": "0.53640723", "text": "public function get() {\n\n if (!$this->hasSearchParameters()) {\n throw new \\Exception('At least one criteria must be provided to search groups.');\n }\n\n $this->addSearchParam('page', $this->page);\n $this->addSearchParam('recordsPerPage', $this->per_page);\n $result = $this->client->fetch('/groups/v1/groups/search?' . http_build_query($this->search_params));\n\n return $this->buildCollection($result['groups'], 'group', Group::class);\n }", "title": "" }, { "docid": "91f234cfe532f7fbc2c23d08b16ab357", "score": "0.5356773", "text": "function getGroups($option = \"as object\")\n{\n\t$result = null;\n\tglobal $mysqli_object; global $worked; $worked = false; global $output; $output = \"\";\n\tglobal $settings_database_name; global $settings_database_auth_table; global $settings_database_groups_table; global $settings_uniqueUsernames; global $settings_lastDatabase; global $settings_lastTable; global $settings_lastColumn;\n\t$result = $mysqli_object->query(\"SELECT * FROM `\".$settings_database_groups_table.\"`\");\n\n\tif($option == \"as array\")\n\t{\n\t\t$result_tmp = array();\n\t\t$target = count($result);\n\t\tfor($i=0;$i<$target;$i++)\n\t\t{\n\t\t\t$result_tmp[] = $result[$i]->groupname;\n\t\t}\n\n\t\t$result = $result_tmp;\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "9170610edcccfe544071afb9c8d4f56d", "score": "0.535638", "text": "public function getGroups()\n\t{\n\t\tstatic $cached = null;\n\n\t\tif (!is_object($this->integration))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tif (is_null($cached))\n\t\t{\n\t\t\t$cached = $this->integration->getAllGroups();\n\t\t}\n\n\t\treturn $cached;\n\t}", "title": "" }, { "docid": "0ab42165bffd5f07e1b3a8c4cae59f20", "score": "0.5335393", "text": "public function get_groups($item_types=FALSE)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('crm_groups');\n\t\tif ($item_types != FALSE) $this->db->where('group_item_types', $item_types);\n\t\t$this->db->order_by('group_name', 'ASC');\n\t\t$query = $this->db->get();\n\n\t\t// Any Results?\n\t\tif ($query->num_rows() == 0) return FALSE;\n\n\t\t$groups = array();\n\n\t\t// Loop Party\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\tif ($this->global_model->process_item_acl($row->group_author, $row->group_acl) == FALSE) continue;\n\n\t\t\t$groups[] = $row;\n\t\t}\n\n\t\t$query->free_result();\n\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "8e3ab6f71b278612cabbf269ffda287b", "score": "0.5334869", "text": "public function getGroups() : array\n {\n return $this->groups;\n }", "title": "" }, { "docid": "9fb3d1c2f012afe7b027c7efe4284bb8", "score": "0.5329491", "text": "function getGroups(){\n\t\treturn CunddFiles::getOfType(\"\",\"cundd/group\");\n\t}", "title": "" }, { "docid": "6ecf4bce035abb2ce667c7a1faddaab5", "score": "0.53258204", "text": "public function getGroups(): array\n\t{\n\t\treturn $this->groups;\n\t}", "title": "" }, { "docid": "10cc19f8728c78e84db0e9b6a089360b", "score": "0.5325199", "text": "public function getGroupsAction() {\r\n\r\n //FETCH\r\n $paramss = array();\r\n $paramss['title'] = $this->_getParam('text');\r\n $paramss['viewer_id'] = Engine_Api::_()->user()->getViewer()->getIdentity();\r\n $paramss['limit'] = $this->_getParam('limit', 40);\r\n $paramss['orderby'] = 'title ASC';\r\n $usersitegroups = Engine_Api::_()->getDbTable('groups', 'sitegroup')->getSuggestClaimGroup($paramss);\r\n $data = array();\r\n $mode = $this->_getParam('struct');\r\n if ($mode == 'text') {\r\n foreach ($usersitegroups as $usersitegroup) {\r\n $content_photo = $this->view->itemPhoto($usersitegroup, 'thumb.icon');\r\n $data[] = array(\r\n 'id' => $usersitegroup->group_id,\r\n 'label' => $usersitegroup->title,\r\n 'photo' => $content_photo\r\n );\r\n }\r\n } else {\r\n foreach ($usersitegroups as $usersitegroup) {\r\n $content_photo = $this->view->itemPhoto($usersitegroup, 'thumb.icon');\r\n $data[] = array(\r\n 'id' => $usersitegroup->group_id,\r\n 'label' => $usersitegroup->title,\r\n 'photo' => $content_photo\r\n );\r\n }\r\n }\r\n return $this->_helper->json($data);\r\n }", "title": "" }, { "docid": "0fc99ca35a2aa752f6f01d73872e0867", "score": "0.5322506", "text": "function getGroupsFromIDs($ids){\n\t\tif($ids && count($ids) > 1) {\n\t\t\treturn DataObject::get(\"Group\", \"ID IN (\" . implode(\",\", $ids) . \")\");\n\t\t} else {\n\t\t\treturn DataObject::get_by_id(\"Group\", $ids[0]);\n\t\t}\n\t}", "title": "" }, { "docid": "3713244850b0407a04cf3793a8c1b135", "score": "0.5316279", "text": "function getGroupInfo($groupData, $getGroup = 'all')\n{\n $return = [];\n\n foreach ($groupData as $data)\n {\n if ($data['data']['group_id'] > 3 // not the default groups\n && $data['configs']['kjp_join_price'] > 0\n && $data['data']['group_is_default'] == 0)\n { // maybe the webmaster using another group as default registration group ..\n if ($getGroup == 'all')\n {\n $group_id = $data['data']['group_id'];\n $group_name = $data['data']['group_name'];\n $join_price = $data['configs']['kjp_join_price'];\n $min_payout_limit = $data['configs']['kjp_min_payout_limit'];\n\n\n $return[] = [\n 'id' => $group_id ,\n 'name' => $group_name ,\n 'price' => $join_price ,\n 'kjp_min_payout_limit' => $min_payout_limit ,\n ];\n }\n elseif ((int) $getGroup\n && $getGroup > 3\n && $data['data']['group_id'] == $getGroup\n && $data['data']['group_is_default'] == 0)\n {\n $group_id = $data['data']['group_id'];\n $group_name = $data['data']['group_name'];\n $join_price = $data['configs']['kjp_join_price'];\n $min_payout_limit = $data['configs']['kjp_min_payout_limit'];\n\n\n $return = [\n 'id' => $group_id ,\n 'name' => $group_name ,\n 'price' => $join_price ,\n 'kjp_min_payout_limit' => $min_payout_limit ,\n ];\n }\n }\n }\n\n if (count($return) === 0)\n {\n return false;\n }\n\n\n return $return;\n}", "title": "" }, { "docid": "991ec4183257c536a4b161156b256982", "score": "0.53158945", "text": "public function queryGroups() : ContainerQuery {\n\t\treturn $this->container->getHierarchyLevelQuery(Group::class);\n\t}", "title": "" }, { "docid": "7f5d19366cf6a1260f1bc023976aae45", "score": "0.5313611", "text": "public function getGroupByName($groupName)\n {\n $groups = $this->slackApi->groupsList();\n $group = array_filter(Ar::get($groups, 'groups'), function ($item) use ($groupName) {\n return $groupName === Ar::get($item, 'name');\n });\n return is_array($group) ? (current($group) ?: []) : [];\n\n }", "title": "" }, { "docid": "6f6f0958e76356473be84f69a8e50901", "score": "0.5305487", "text": "function getSGroupList($id)\n{\n\tglobal $mysql_sgroups_table, $num_groups, $db;\n\n\n\n\tif($num_groups == 1)\n\t\t$sql = \"select id from $mysql_sgroups_table\";\n\telse\n\t\t$sql = \"select id from $mysql_sgroups_table where id != 1\";\n\n\t$result = $db->query($sql);\n\t//now we have the list of all the supporter groups.\n\t$i=0;\n\twhile($row = $db->fetch_row($result)){\n\t\tif($num_groups != 1){\n\t\t\t$sql2 = \"select id from sgroup\" . $row[0] . \" where user_id=$id\";\n\t\t\t$result2 = $db->query($sql2);\n\t\t\tif($db->num_rows($result2) != 0){\n\t\t\t\t$grouplist[$i] = \"sgroup\" . $row[0];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t }\n\t}\n\n\t//returns a list of strings (group table names).\n\treturn $grouplist;\n\n}", "title": "" }, { "docid": "6f206d3655c36f443f0024d9145387bc", "score": "0.53041506", "text": "public function groups() : array\n {\n return $this->groups;\n }", "title": "" }, { "docid": "dc289dfd771a17a6feaee8e670ead491", "score": "0.53013176", "text": "protected function groupFilter(array $userGroupSearchResponse): array\n {\n $groupsAttr = strtolower($this->config['group_attribute']);\n $ldapGroups = [];\n $count = 0;\n\n if (isset($userGroupSearchResponse[$groupsAttr]['count'])) {\n $count = (int) $userGroupSearchResponse[$groupsAttr]['count'];\n }\n\n for ($i = 0; $i < $count; $i++) {\n $dnComponents = $this->ldap->explodeDn($userGroupSearchResponse[$groupsAttr][$i], 1);\n if (!in_array($dnComponents[0], $ldapGroups)) {\n $ldapGroups[] = $dnComponents[0];\n }\n }\n\n return $ldapGroups;\n }", "title": "" }, { "docid": "beab9e30f479bd421b217e73e9d58045", "score": "0.5296028", "text": "public function provider_get_list_groups()\n {\n return [\n [['flag' => 'invalid_params', 'user_id' => '' ]],\n [['flag' => 'invalid_params', 'user_id' => 9999999999999 ]],\n\n [['flag' => 'success',]],\n\n ];\n }", "title": "" }, { "docid": "a58e2f29abe7d8c1ca7a13486e921a18", "score": "0.5293813", "text": "public function getWorkGroups(){\n\n\n\n // These are the content types which are used by Drupal for the 2 types of groups (regional groups and working groups)\n\n $content_types = $this->config['group_content_type_work_groups'];\n\n\n\n $groups = array();\n\n $nodes = array();\n\n $result['error'] = false;\n\n\n\n // Limiting the request, just in case...\n\n $init_value = 0;\n\n $max_results = 100;\n\n\n\n // Start Drupal database query\n\n $query = new \\EntityFieldQuery();\n\n $entities = $query->entityCondition('entity_type', 'node')\n\n ->propertyCondition('type', $content_types)\n\n ->propertyCondition('status', 1)\n\n ->propertyOrderBy('title','ASC')\n\n ->range($init_value, $max_results)\n\n ->execute();\n\n\n\n if (!empty($entities['node'])) {\n\n $node_ids = array_keys($entities['node']);\n\n $nodes = entity_load('node', $node_ids);\n\n }\n\n\n\n // Extract group title only\n\n $i = 0;\n\n foreach ($nodes as $node){\n\n\n\n // Get group ID (we allow 5 different group types, but currently all Drupal sites using this module only use 2 group types)\n\n if (isset ($node->field_group_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group2_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group2_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group3_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group3_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group4_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group4_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group5_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group5_id_for_qmembers['und'][0]['value']);\n\n else $group_id = '';\n\n\n\n if ($only_subscribed_groups){\n\n\n\n $NodeGroups = new NodeGroups;\n\n if ( in_array($group_id, $NodeGroups->subscribed_groups) ){\n\n\n\n $groups[$i]['title'] = $node->title;\n\n $groups[$i]['id'] = $group_id;\n\n }\n\n }\n\n else{\n\n $groups[$i]['title'] = $node->title;\n\n $groups[$i]['id'] = $group_id;\n\n }\n\n\n\n $i++;\n\n }\n\n\n\n return $groups;\n\n }", "title": "" }, { "docid": "4873280a903e9a883c947a9999c72272", "score": "0.5283623", "text": "public function findAllGroups()\n {\n /*\n * Using a SELECT SQL Statement in the groups table to find all of the groups and save them to an array\n */\n try{\n AppLogger::info(\"Entering CommunityDataService.findAllGroups()\");\n AppLogger::info(\"Preparing SQL Statement\");\n $sql_query = $this->db->prepare(\"SELECT * FROM `groups`\");\n \n AppLogger::info(\"Executing SQL Statement\");\n $sql_query->execute();\n \n $groupArray = [];\n while ($user = $sql_query->fetch(PDO::FETCH_ASSOC)) {\n array_push($groupArray, $user);\n }\n AppLogger::info(\"Exiting CommunityDataService with groups array\");\n return $groupArray;\n }\n catch(PDOException $e)\n {\n AppLogger::error(\"Exception: \", array(\"message: \" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n \n }\n }", "title": "" }, { "docid": "9dde0e9deb07f82bbaf911f4a1c19aa0", "score": "0.5283127", "text": "public function getRegionalGroups(){\n\n\n\n // These are the content types which are used by Drupal for the 2 types of groups (regional groups and working groups)\n\n $content_types = $this->config['group_content_type_regional_groups'];\n\n\n\n $groups = array();\n\n $nodes = array();\n\n $result['error'] = false;\n\n\n\n // Limiting the request, just in case...\n\n $init_value = 0;\n\n $max_results = 100;\n\n\n\n // Start Drupal database query\n\n $query = new \\EntityFieldQuery();\n\n $entities = $query->entityCondition('entity_type', 'node')\n\n ->propertyCondition('type', $content_types)\n\n ->propertyCondition('status', 1)\n\n ->propertyOrderBy('title','ASC')\n\n ->range($init_value, $max_results)\n\n ->execute();\n\n\n\n if (!empty($entities['node'])) {\n\n $node_ids = array_keys($entities['node']);\n\n $nodes = entity_load('node', $node_ids);\n\n }\n\n\n\n // Extract group title only\n\n $i = 0;\n\n foreach ($nodes as $node){\n\n\n\n // Get group ID (we allow 5 different group types, but currently all Drupal sites using this module only use 2 group types)\n\n if (isset ($node->field_group_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group2_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group2_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group3_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group3_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group4_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group4_id_for_qmembers['und'][0]['value']);\n\n elseif (isset ($node->field_group5_id_for_qmembers['und'][0]['value'])) $group_id = trim($node->field_group5_id_for_qmembers['und'][0]['value']);\n\n else $group_id = '';\n\n\n\n if ($only_subscribed_groups){\n\n\n\n $NodeGroups = new NodeGroups;\n\n if ( in_array($group_id, $NodeGroups->subscribed_groups) ){\n\n\n\n $groups[$i]['title'] = $node->title;\n\n $groups[$i]['id'] = $group_id;\n\n }\n\n }\n\n else{\n\n $groups[$i]['title'] = $node->title;\n\n $groups[$i]['id'] = $group_id;\n\n }\n\n\n\n $i++;\n\n }\n\n\n\n return $groups;\n\n }", "title": "" }, { "docid": "1911c3e294c84f557bea3803e7c6cfbb", "score": "0.5268316", "text": "function get_group_members($obj, $group)\n{\n $query = $obj->_query_reader->get_query_by_code('search_school_users', array('limittext' => '', 'searchstring' => ' AND usergroup ='.$group));\n\n return $obj->db->query($query);\n}", "title": "" }, { "docid": "15fa5f5f542c5d8cdafc46223179f797", "score": "0.5263106", "text": "function get_member_groups(){\n\n\t//sql command\n\t//$sql = 'SELECT group_id,date_added FROM group_lists WHERE friend_id = \\''.$_COOKIE[\"username\"].'\\' ';\n\t$sql = 'SELECT gl.group_id,date_added FROM group_lists gl, groups g WHERE gl.friend_id = \\''.$_COOKIE[\"username\"].'\\' ';\n\t$sql .= ' and gl.group_id = g.group_id and g.user_name != \\''.$_COOKIE[\"username\"].'\\' ';\n\t\treturn get_sql_results($sql);\n}", "title": "" }, { "docid": "1f05d33923587b61f65d811609eee808", "score": "0.5262563", "text": "public function getGroups() {\n\t\treturn $this->collectRecursiveDataCached('getGroup', 'getUsergroup', null, function($item) {\n\t\t\treturn $item->getUid();\n\t\t});\n\t}", "title": "" }, { "docid": "1f2ea15d6b1bcbcbc8dc53acd05facbf", "score": "0.5261569", "text": "function searchGroups( $dn ) {\n\t\tglobal $wgLDAPGroupObjectclass, $wgLDAPGroupAttribute, $wgLDAPGroupNameAttribute;\n\t\tglobal $wgLDAPProxyAgent, $wgLDAPProxyAgentPassword;\n\t\tglobal $wgUser;\n\n\t\t$this->printDebug( \"Entering searchGroups\", NONSENSITIVE );\n\n\t\t$base = $this->getBaseDN( GROUPDN );\n\n\t\t$objectclass = $wgLDAPGroupObjectclass[$_SESSION['wsDomain']];\n\t\t$attribute = $wgLDAPGroupAttribute[$_SESSION['wsDomain']];\n\t\t$nameattribute = $wgLDAPGroupNameAttribute[$_SESSION['wsDomain']];\n\n // We actually want to search for * not \\2a\n $value = $dn;\n if ( $value != \"*\" )\n $value = $this->getLdapEscapedString( $value );\n\n\t\t$filter = \"(&($attribute=$value)(objectclass=$objectclass))\";\n\n\t\t$this->printDebug( \"Search string: $filter\", SENSITIVE );\n\n\t\tif ( isset( $wgLDAPProxyAgent[$_SESSION['wsDomain']] ) ) {\n\t\t\t//We'll try to bind as the proxyagent as the proxyagent should normally have more\n\t\t\t//rights than the user. If the proxyagent fails to bind, we will still be able\n\t\t\t//to search as the normal user (which is why we don't return on fail).\n\t\t\t$this->printDebug( \"Binding as the proxyagent\", NONSENSITIVE );\n\t\t\t$bind = $this->bindAs( $wgLDAPProxyAgent[$_SESSION['wsDomain']], $wgLDAPProxyAgentPassword[$_SESSION['wsDomain']] );\n\t\t}\n\n\t\t$info = @ldap_search( $this->ldapconn, $base, $filter );\n\t\t#if ( $info[\"count\"] < 1 ) {\n\t\tif ( !$info ) {\n\t\t\t$this->printDebug( \"No entries returned from search.\", SENSITIVE );\n\n\t\t\t//Return an array so that other functions\n\t\t\t//don't error out.\n\t\t\treturn array( \"short\"=>array(), \"dn\"=>array() );\n\t\t}\n\n\t\t$entries = @ldap_get_entries( $this->ldapconn, $info );\n\n\t\t//We need to shift because the first entry will be a count\n\t\tarray_shift( $entries );\n\n\t\t//Let's get a list of both full dn groups and shortname groups\n\t\t$groups = array( \"short\"=>array(), \"dn\"=>array() );\n\t\tforeach ( $entries as $entry ) {\n\t\t\t$shortMember = strtolower( $entry[$nameattribute][0] );\n\t\t\t$dnMember = strtolower( $entry['dn'] );\n\t\t\t$groups[\"short\"][] = $shortMember;\n\t\t\t$groups[\"dn\"][] = $dnMember;\n\t\t}\n\n\t\t$this->printDebug( \"Returned groups:\", SENSITIVE, $groups[\"dn\"] );\n\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "04f691658978a1259b2eb4fd19167f1b", "score": "0.52562654", "text": "function do_get_groups($email){\n\t\t// get the group_name from the group table\n\t\t// where the email matches the email in the membership table\n\t\t// and the group_id matches the group_id in the group table\n\n\t\t$sql = \"\n\t\t \tSELECT group.group_id, group.group_name, group.creator\n\t\t \tFROM `group`\n\t\t \tINNER JOIN `membership`\n\t\t \tON group.group_id = membership.group_id \n\t\t \tAND '$email' = membership.email \n\t\t \tORDER BY group.group_name ASC\t\t\n\t\t\";\n\t\t$result = mysql_query($sql);\n\t\tif(!$result){\n\t\t\tdie(\"Invalid query: \" .mysql_error());\n\t\t}\t\n\t\telse{\n\t\t\tif(mysql_num_rows($result)==0){\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\telse{\n \t\t\t// Get the information from the result set\n\t\t\t\t$i = 0;\n \t\t\twhile($row = mysql_fetch_row($result)){\n \t\t\t\t$data[$i] = $row;\n \t\t\t\t$i++; \n \t\t\t}\n \t\t\treturn $data;\n \t\t}\n \t}\n \tdie;\n}", "title": "" }, { "docid": "e7d1b50dd708dc8379583bfd7a938928", "score": "0.52558994", "text": "public function posix_groups ( ) {\n\n $this->connect();\n\n $list = array();\n\n $sr = ldap_search( $this->ldap_ds, \"ou=Group,dc=reg,o=slac\", \"cn=*\" );\n if( !$sr )\n throw new RegDBException (\n __METHOD__,\n \"LDAP error: \".ldap_error( $this->ldap_ds ));\n\n $info = ldap_get_entries( $this->ldap_ds, $sr );\n\n $num_groups = $info[\"count\"];\n for( $i = 0; $i < $num_groups; $i++ )\n array_push( $list, $info[$i][\"cn\"][0] );\n\n return $list;\n }", "title": "" }, { "docid": "b2cb9a2a93aeed2964baf692dfa15163", "score": "0.5241118", "text": "public function getGroups() : array {\n\t\treturn [\n\t\t\t'found' => [\n\t\t\t\t'type' => 'warning',\n\t\t\t\t'message' => 'Using `post__not_in` should be done with caution, see https://docs.wpvip.com/how-tos/improve-performance-by-removing-usage-of-post__not_in/ for more information.',\n\t\t\t\t'keys' => [\n\t\t\t\t\t'post__not_in',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'exclude' => [\n\t\t\t\t'type' => 'warning',\n\t\t\t\t'message' => 'Using `exclude`, subsequently used by `post__not_in`, should be done with caution, see https://docs.wpvip.com/how-tos/improve-performance-by-removing-usage-of-post__not_in/ for more information.',\n\t\t\t\t'keys' => [\n\t\t\t\t\t'exclude',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "aac58721a8d8131ff858b41f58371229", "score": "0.52388066", "text": "abstract function getGroups($username);", "title": "" }, { "docid": "58e416b11768c6f8c81760f2cbce4571", "score": "0.5234182", "text": "protected function getGroups() {\n $groups = [];\n\n $this->civicrm->initialize();\n $params = [\n 'is_active' => 1,\n 'options' => ['limit' => 0],\n ];\n $result = civicrm_api3('Group', 'get', $params);\n\n if (empty($result['values'])) {\n return $groups;\n }\n\n foreach ($result['values'] as $value) {\n $groups[$value['id']] = $value['title'];\n }\n\n return $groups;\n }", "title": "" }, { "docid": "91ee49463ccbe5201cee3398de93c36e", "score": "0.523316", "text": "protected function getFormattedGroups() {\n\t\tif (!isset($this->formattedData['groups'])) {\n\t\t\t$this->formattedData['groups'] = array();\n\t\t\tif ($this->options['groups']['createMissing']) {\n\t\t\t\t$this->formattedData['groups'] = $this->formatter->getGroups();\n\t\t\t}\n\t\t}\n\n\t\treturn $this->formattedData['groups'];\n\t}", "title": "" }, { "docid": "d312a5e699525614ed5fa0990f5d3615", "score": "0.52280647", "text": "function __build_groups_dropdown_list($groups) {\n $dropdown_groups = array();\n foreach ($groups as $group) {\n $dropdown_groups[$group[\"Group\"][\"id\"]] = $group[\"Group\"][\"name\"] . \" (\" . $group[\"Group\"][\"slug\"] . \")\";\n }\n\n return $dropdown_groups;\n }", "title": "" }, { "docid": "996ab982f86b3aa5105101b9d8464c3e", "score": "0.5218946", "text": "public function getGroups(): array{\n return $this->groups;\n }", "title": "" }, { "docid": "5d7dd7375a75ddedc0caf33d592a5637", "score": "0.52157277", "text": "public function get_group_element($group)\n {\n $code_conditions = array();\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'AY_*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'CA*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'DEP_*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'TRA_OP_*');\n $code_conditions[] = new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'TRA_STU_*');\n \n $not_code_conditions = array();\n $not_code_conditions[] = new NotCondition(\n new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'TRA_STU_*_*'));\n $not_code_conditions[] = new NotCondition(\n new PatternMatchCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_CODE), \n 'COU_OP_*'));\n \n $conditions = array();\n $conditions[] = new OrCondition($code_conditions);\n $conditions[] = new AndCondition($not_code_conditions);\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(Group::class_name(), Group::PROPERTY_PARENT_ID), \n new StaticConditionVariable($group->get_id()));\n $condition = new AndCondition($conditions);\n \n $children_count = \\Chamilo\\Core\\Group\\Storage\\DataManager::count(\n Group::class_name(), \n new DataClassCountParameters($condition));\n \n if ($this->get_user()->is_platform_admin())\n {\n if ($children_count > 0)\n {\n $element_type = AdvancedElementFinderElement::TYPE_SELECTABLE_AND_FILTER;\n $element_class = 'type type_context_folder';\n }\n else\n {\n $element_type = AdvancedElementFinderElement::TYPE_SELECTABLE;\n $element_class = 'type type_context_simple';\n }\n }\n elseif (\\Ehb\\Application\\Atlantis\\Rights::getInstance()->access_is_allowed())\n {\n $target_groups = \\Ehb\\Application\\Atlantis\\Rights::getInstance()->get_target_groups($this->get_user());\n \n if (in_array($group->get_id(), $target_groups))\n {\n if ($children_count > 0)\n {\n $element_type = AdvancedElementFinderElement::TYPE_SELECTABLE_AND_FILTER;\n $element_class = 'type type_context_folder';\n }\n else\n {\n $element_type = AdvancedElementFinderElement::TYPE_SELECTABLE;\n $element_class = 'type type_context_simple';\n }\n }\n else\n {\n foreach ($target_groups as $target_group)\n {\n if ($group->is_child_of($target_group))\n {\n if ($children_count > 0)\n {\n $element_type = AdvancedElementFinderElement::TYPE_SELECTABLE_AND_FILTER;\n $element_class = 'type type_context_folder';\n }\n else\n {\n $element_type = AdvancedElementFinderElement::TYPE_SELECTABLE;\n $element_class = 'type type_context_simple';\n }\n break;\n }\n }\n \n // if (! $type)\n // {\n // $element_type = AdvancedElementFinderElement :: TYPE_FILTER;\n // $element_class = 'type type_context_folder';\n // }\n }\n }\n else\n {\n $element_type = AdvancedElementFinderElement::TYPE_FILTER;\n $element_class = 'type type_context_folder';\n }\n \n return new AdvancedElementFinderElement(\n PlatformGroupEntity::ENTITY_TYPE . '_' . $group->get_id(), \n $element_class, \n $group->get_name(), \n $group->get_code(), \n $element_type);\n }", "title": "" }, { "docid": "fca9ebfd93aad22638a53bb95177fe82", "score": "0.5211064", "text": "private function lookup_template_groups() {\n\n\t\t$out = array();\n\n\t\t$this->EE->db->select('group_id,group_name,is_site_default');\n\t\t$this->EE->db->where('site_id',$this->EE->session->userdata['site_id']);\n\t\t$this->EE->db->order_by('group_order');\n\t\t$query = $this->EE->db->get('template_groups');\n\n\t\tforeach($query->result() as $group) {\n\t\t\t$out[$group->group_id] = array($group->group_name,$group->is_site_default);\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "4ca86154be95016cf2e7725d06df083f", "score": "0.520898", "text": "public function getGroups($options = \"\", $limit = 10, $offset = 0) {\n\t\tif (is_string($options)) {\n\t\t\telgg_deprecated_notice('\\ElggUser::getGroups() takes an options array', 1.9);\n\t\t\t$subtype = $options;\n\t\t\t$options = array(\n\t\t\t\t'type' => 'group',\n\t\t\t\t'relationship' => 'member',\n\t\t\t\t'relationship_guid' => $this->guid,\n\t\t\t\t'limit' => $limit,\n\t\t\t\t'offset' => $offset,\n\t\t\t);\n\n\t\t\tif ($subtype) {\n\t\t\t\t$options['subtype'] = $subtype;\n\t\t\t}\n\t\t} else {\n\t\t\t$options['type'] = 'group';\n\t\t\t$options['relationship'] = 'member';\n\t\t\t$options['relationship_guid'] = $this->guid;\n\t\t}\n\n\t\treturn elgg_get_entities_from_relationship($options);\n\t}", "title": "" }, { "docid": "d5c3b19e8ec13763bfb412d8fca8e30e", "score": "0.52037203", "text": "public function getGroup(string $group = 'default'): array{\n if (!$this->hasGroup($group)) {\n throw new \\Exception(sprintf(\"Group %s does not exist.\", $group));\n }\n return $this->list[$group];\n }", "title": "" }, { "docid": "ca4569d106f8f284ca9ea5922e1607b1", "score": "0.5202712", "text": "public static function getGroupsIn($userID)\n\t{\n\t\t$connection = new mysqli(\"localhost\", \"root\", \"\", \"recipes\");\n \n\t\tif($connection->connect_error)\n\t\t\tdie(\"Error: \".$connection->connect_error);\n\t\t\n\t\t$sql = \"SELECT GroupID FROM groupmembers WHERE UserID=$userID\";\n\n\t\t// Performs query and stores values\n\t\t$result = $connection->query($sql); // Does query\n\n\t\tif($result) // If result has been found\n\t\t{\n\t\t\t$retval = Array();\n\t\t\twhile($row = $result->fetch_assoc())\n\t\t\t\t$retval[] = $row;\n\t\t\treturn $retval;\n\t\t}\n\t\telse \n\t\t\treturn NULL;\n\t}", "title": "" }, { "docid": "64bdf243720f985dd6e4e4ebec851d77", "score": "0.519759", "text": "public function getAllGroups(): array\n {\n $allGroups = FieldGroupRecord::find()->all();\n\n Anu::$app->getTemplate()->addAnuJsObject($allGroups, 'fieldGroups');\n\n return $allGroups ?: [];\n }", "title": "" }, { "docid": "c771c51507e73fdf3d18b93ee94ee1ab", "score": "0.519538", "text": "function get_subgroups($groupPar)\n\t{\n\t\t$aauth = new Aauth();\n\n\t\treturn $aauth->getSubgroups($groupPar);\n\t}", "title": "" }, { "docid": "e272863862c54cc8a96ca42aa1e0b04d", "score": "0.5194365", "text": "function get_suggested_groups($users_following, $groups_already_joined)\n {\n $user = $this->ion_auth->get_user();\n if (count($users_following) > 0)\n {\n $query = \"SELECT group_id FROM group_relationships \n WHERE \";\n $tracker = 0;\n foreach ($users_following as $id)\n {\n if ($tracker == 0)\n {\n $query .= \"user_following_id=$id OR user_joined_id=$id \";\n } else if ($tracker == count($users_following) - 1)\n {\n $query .= \"OR user_following_id=$id OR user_joined_id=$id\";\n } else\n {\n $query .= \"OR user_following_id=$id OR user_joined_id=$id \";\n }\n $tracker++;\n }\n $result = $this->db->query($query);\n\n $group_results = array();\n foreach ($result->result() as $group_id)\n {\n if (!in_array($group_id->group_id, $groups_already_joined))\n {\n $group_results[] = $group_id->group_id;\n }\n }\n }\n\n // generate second query to get all the groups from your school\n $school_id = $this->ion_auth->get_user()->school_id;\n $query = \"SELECT id FROM groups WHERE school_id=$school_id\";\n $result = $this->db->query($query);\n\n foreach ($result->result() as $group_id)\n {\n if (!in_array($group_id->id, $groups_already_joined))\n {\n $group_results[] = $group_id->id;\n }\n }\n\n return $group_results;\n }", "title": "" }, { "docid": "b75fa362a8a984dcf6caa67f6299d78c", "score": "0.518429", "text": "function getGroups( $username ) {\n\t\tglobal $wgLDAPRequiredGroups, $wgLDAPUseLDAPGroups;\n\t\tglobal $wgLDAPGroupUseFullDN, $wgLDAPGroupUseRetrievedUsername;\n\t\tglobal $wgLDAPGroupSearchNestedGroups;\n\t\tglobal $wgLDAPGroupsPrevail;\n\t\tglobal $wgLDAPGroupsUseMemberOf;\n\n\t\t$this->printDebug(\"Entering getGroups\", NONSENSITIVE);\n\n\t\t//Find groups\n\t\tif ( isset( $wgLDAPRequiredGroups[$_SESSION['wsDomain']] ) || ( isset( $wgLDAPUseLDAPGroups[$_SESSION['wsDomain']] ) && $wgLDAPUseLDAPGroups[$_SESSION['wsDomain']] ) ) {\n\t\t\t$this->printDebug( \"Retrieving LDAP group membership\", NONSENSITIVE );\n\n\t\t\t//Let's figure out what we should be searching for\n\t\t\tif ( isset( $wgLDAPGroupUseFullDN[$_SESSION['wsDomain']] ) && $wgLDAPGroupUseFullDN[$_SESSION['wsDomain']] ) {\n\t\t\t\t$usertopass = $this->userdn;\n\t\t\t} else {\n\t\t\t\tif ( ( isset( $wgLDAPGroupUseRetrievedUsername[$_SESSION['wsDomain']] ) && $wgLDAPGroupUseRetrievedUsername[$_SESSION['wsDomain']] )\n\t\t\t\t\t&& $this->LDAPUsername != '' ) {\n\n\t\t\t\t\t$usertopass = $this->LDAPUsername;\n\t\t\t\t} else {\n\t\t\t\t\t$usertopass = $username;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $wgLDAPGroupsUseMemberOf[$_SESSION['wsDomain']] ) && $wgLDAPGroupsUseMemberOf[$_SESSION['wsDomain']] ) {\n\t\t\t\t$this->printDebug( \"Using memberOf\", NONSENSITIVE );\n\t\t\t\t$this->userInfo = $this->getUserInfo();\n\t\t\t\tif ( is_null( $this->userInfo ) ) {\n\t\t\t\t\t$this->printDebug(\"Failed to get memberOf attribute\", NONSENSITIVE);\n\t\t\t\t}\n\t\t\t\tif ( isset( $this->userInfo[0][\"memberof\"] ) ) {\n\t\t\t\t\t# The first entry is always a count\n\t\t\t\t\t$memberOfMembers = $this->userInfo[0][\"memberof\"];\n\t\t\t\t\tarray_shift( $memberOfMembers );\n\t\t\t\t\t$groups = array( \"dn\"=> array(), \"short\"=>array() );\n\t\t\t\t\tforeach( $memberOfMembers as $mem ) {\n\t\t\t\t\t\tarray_push( $groups[\"dn\"], strtolower( $mem ) );\n\t\t\t\t\t}\n\t\t\t\t\t$this->userLDAPGroups = $groups;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->printDebug( \"Searching for the groups\", NONSENSITIVE );\n\t\t\t\t$this->userLDAPGroups = $this->searchGroups( $usertopass );\n\n\t\t\t\tif ( isset( $wgLDAPGroupSearchNestedGroups[$_SESSION['wsDomain']] ) && $wgLDAPGroupSearchNestedGroups[$_SESSION['wsDomain']] ) {\n\t\t\t\t\t$this->userLDAPGroups = $this->searchNestedGroups( $this->userLDAPGroups );\n\t\t\t\t\t$this->printDebug( \"Got the following nested groups:\", SENSITIVE, $this->userLDAPGroups[\"dn\"] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Only find all groups if the user has any groups; otherwise, we are\n\t\t\t//just wasting a search.\n\t\t\tif ( ( isset( $wgLDAPGroupsPrevail[$_SESSION['wsDomain']] ) && $wgLDAPGroupsPrevail[$_SESSION['wsDomain']] ) && count( $this->userLDAPGroups ) != 0 ) {\n\t\t\t\t$this->allLDAPGroups = $this->searchGroups( '*' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "db1fdd13fb1742f0c05dde1aaef2196d", "score": "0.51787007", "text": "protected function getOptions()\n {\n $dbo = JFactory::getDbo();\n $query = $dbo->getQuery(true);\n\n $query\n ->select('groups.id AS value, groups.title AS text')\n ->from('#__usergroups AS groups')\n ->innerJoin('#__thm_groups_role_associations AS assoc ON groups.id = assoc.groupID')\n ->group('text');\n\n $dbo->setQuery($query);\n\n try {\n $groups = $dbo->loadAssocList();\n } catch (Exception $exception) {\n JFactory::getApplication()->enqueueMessage($exception->getMessage(), 'error');\n\n return [];\n }\n\n\n if (empty($groups)) {\n return [];\n }\n\n $plugin = (bool)$this->getAttribute('plugin', false);\n\n if ($plugin) {\n $noTemplates = ['value' => '', 'text' => JText::_('COM_THM_GROUPS_GROUP_FILTER')];\n array_unshift($groups, $noTemplates);\n } else {\n $noTemplates = ['value' => -1, 'text' => JText::_('JNONE')];\n array_unshift($groups, $noTemplates);\n\n $allTemplates = ['value' => '', 'text' => JText::_('JALL')];\n array_unshift($groups, $allTemplates);\n }\n\n return $groups;\n }", "title": "" }, { "docid": "190fa2417228746e2fd156d5fc2927b4", "score": "0.5159065", "text": "public function findGroups($terms = '', $page = 0, $order = '')\n {\n \n if (!empty($order))\n {\n switch ($order)\n {\n case \"nameasc\":\n $order = 'Name ASC';\n break;\n case \"namedesc\":\n $order = 'Name DESC';\n break;\n case \"membersasc\":\n $order = '(SELECT SUM(IdMember) FROM membersgroups as mg WHERE IdGroup = groups.id) ASC, Name ASC';\n break;\n case \"membersdesc\":\n $order = '(SELECT SUM(IdMember) FROM membersgroups as mg WHERE IdGroup = groups.id) DESC, Name ASC';\n break;\n case \"createdasc\":\n $order = 'created ASC, Name ASC';\n break;\n case \"createddesc\":\n $order = 'created DESC, Name ASC';\n break;\n case \"category\":\n default:\n $order = 'created DESC, Name ASC';\n break;\n }\n }\n else\n {\n $order = 'Name ASC';\n }\n \n $terms_array = explode(' ', $terms);\n\n $group = $this->createEntity('Group');\n $group->sql_order = $order;\n return $this->_group_list = $group->findBySearchTerms($terms_array, ($page * 10));\n }", "title": "" }, { "docid": "bfeee99936fa94cd366885b946af82ef", "score": "0.51589143", "text": "function google_get_groups($token) {\r\n\t// retrieve groups\r\n\t$url = 'https://www.google.com/m8/feeds/groups/default/full?alt=json&v=3.0&oauth_token='.$token;\r\n\t$xml_response = curl_file_get_contents($url);\r\n\t$records = json_decode($xml_response, true);\r\n\r\n\t//check for authentication errors\r\n\tif ($records['error']['code']) {\r\n\t\theader(\"Location: contact_auth.php?source=google&target=\".substr($_SERVER[\"PHP_SELF\"], strrpos($_SERVER[\"PHP_SELF\"],'/')+1));\r\n\t\texit;\r\n\t}\r\n\r\n\t//create new array of groups\r\n\tforeach($records['feed']['entry'] as $group['number'] => $group) {\r\n\t\t$group_id = substr($group['id']['$t'], strrpos($group['id']['$t'], \"/\")+1);\r\n\t\t$groups[$group_id]['name'] = ($group['gContact$systemGroup']['id']) ? $group['gContact$systemGroup']['id'] : $group['title']['$t'];\r\n\t\t$groups[$group_id]['count'] = 0;\r\n\t\tunset($group_id);\r\n\t}\r\n\tunset($group);\r\n\r\n\t//set account holder info\r\n\t$_SESSION['contact_auth']['name'] = $records['feed']['author'][0]['name']['$t'];\r\n\t$_SESSION['contact_auth']['email'] = $records['feed']['author'][0]['email']['$t'];\r\n\r\n\treturn $groups;\r\n}", "title": "" }, { "docid": "4effae2fec6c9d872a5bbd9faa01bf64", "score": "0.5156995", "text": "function build_groups($category_id,$return = true)\n {\n $groups = \"\";\n if (isset($this->groups[$category_id]) && is_array($this->groups[$category_id]))\n {\n foreach ($this->groups[$category_id] as $group)\n {\n $groups.=$this->build_group($category_id,$group['id']);\n }\n }\n\n if ($return)\n return $groups;\n else\n echo $groups;\n }", "title": "" }, { "docid": "783f36e84de66933b9650309ff4827ee", "score": "0.51489806", "text": "function queryGroups($options = null)\n {\n return $this->_api->newApiCursor('Telerivet_Group', \"{$this->getBaseApiPath()}/groups\", $options);\n }", "title": "" }, { "docid": "33c93a1338a2db93413d91f326f453fc", "score": "0.51479185", "text": "public static function getGroups($where = '', $orderBy = '', $limitOffset = -1, $limitNumRows = -1, $assocKey = 'gid')\n {\n return DBUtil::selectObjectArray('groups', $where, $orderBy, $limitOffset, $limitNumRows, $assocKey);\n }", "title": "" }, { "docid": "bbd2f2c7a0ecfb19673308aa4804e1dd", "score": "0.514504", "text": "function _get_usergroup_list()\n\t{\n\t\treturn collapse_2d_complexity('groupid','title',$this->connection->query_select('groups',array('groupid','title')));\n\t}", "title": "" }, { "docid": "882774933b49787f37041b664696d2d9", "score": "0.5141422", "text": "protected function getGroups($exclude_admin = true)\n {\n $sql_where = '';\n \n if ($exclude_admin === true) {\n $sql_where = 'WHERE id != ' . $this->admin_group_id;\n }\n\n $sql = \"SELECT * \n FROM groups\n $sql_where\n ORDER BY id ASC\";\n\n $groups = $this->db->exec($sql);\n\n if (false === count($groups) > 0) {\n return false;\n }\n\n return $groups;\n }", "title": "" }, { "docid": "7c7846e08d21cd6fbd9c99ae19009c4d", "score": "0.51217514", "text": "public function list_group()\n {\n//DEVOLVEMOS EL PASSTHRU DONDE VAMOS A EJECUTAR EL SCRIPT PARA LISTAR LOS GRUPOS Y COMPROBAR DONDE 1 ES MAL Y 0 ES BIEN\n passthru(\"./list_group.sh\");\n//GENERAMOS EL ARCHIVO CON LOS GRUPOS DISPONIBLES DE DONDE SE VAN A IMPRIMIR EN LA PAGINA.\n $file = new SplFileObject(\"./group.txt\");\n\t// Loop hasta taerminar al final del archivo.\n while (!$file->eof()) {\n $g=$file->fgets();\n $resultat_list[$g] = new group($g);\n }\n//DEJAMOS EL ARCHIVO COMO FINALIZADO Y DEVOLVEMOS EL RETURN.\n $file=null;\n return $resultat_list;\n }", "title": "" }, { "docid": "74fc06bfa9f60f00383f2fe8c50308a9", "score": "0.51091725", "text": "public function getGroups($returnAs = GirafRecord::RETURN_PRIMARYKEY)\n\t{\n\t\t$g = sql_helper::selectQuery(\"SELECT groupKey FROM \" . TABLE_USER_GROUP_KEYS . \" WHERE userKey=\" . $this->id);\n\t\t\n\t\t$ret = array();\n\t\tif ($g === false) return $ret;\n\t\t\n\t\tif ($returnAs == GirafRecord::RETURN_PRIMARYKEY)\n\t\t{\n\t\t\twhile ($row = $g->fetch_row()) $ret[] = $row[0];\n\t\t}\n\t\telseif ($returnAs == GirafRecord::RETURN_RECORD)\n\t\t{\n\t\t\twhile ($row = $g->fetch_row()) $ret[] = GirafGroup::getGirafGroup($row[0]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception (\"Invalid return type $returnAs requested.\");\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "1ca3c77932dba787ef7d1570519e43ca", "score": "0.51015246", "text": "function get_groups_in_acl($acl_id, $level = 0) {\n\t$query = db_select('sgroup', 'g')->fields('g', array('id',\n\t\t\t\t'name'\n\t\t));\n\t$query->join('acl_sgroup', 'ag', 'g.id = ag.sgroup_id');\n\t$db_groups = $query->fields('ag', array('level'))\n\t\t->condition('ag.acl_id', $acl_id)\n\t\t->condition('ag.level', $level, '>=')\n\t\t->orderBy('g.name')\n\t\t->execute();\n\n\t$groups = array();\n\twhile ($record = $db_groups->fetch()) {\n\t\t$groups[] = $record;\n\t}\n\treturn $groups;\n}", "title": "" }, { "docid": "d5b3a4ccea429f1433f276cf47cfb568", "score": "0.5100871", "text": "public function getGroups(Teacher $teacher = null);", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "e0b04e672070d25c63b228ecce652174", "score": "0.0", "text": "public function __construct()\n {\n //\n }", "title": "" } ]
[ { "docid": "77e89b25c1d9a31d7126a81b36f2653a", "score": "0.80016077", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}\",\n '-a' => $this->option('controller'),\n ]));\n }", "title": "" }, { "docid": "90497e260355fa764cc256c485fc7fe8", "score": "0.7867204", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('build:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "60439355722c02ea2ff7078294c970c6", "score": "0.78008044", "text": "public function createController()\n {\n $this->_setupNewController();\n\n $controller_attr = [\n 'id_module' => $this->controller_module_id,\n 'controller' => $this->controller_name,\n 'controller_description' => 'Creator controller',\n 'time_creation' => time()\n ];\n\n if ($this->insert($controller_attr)) {\n return $this->_createControllerFile();\n }\n }", "title": "" }, { "docid": "0728266959ab1dbad8bad3daa2a100eb", "score": "0.7447672", "text": "protected function createController()\n {\n\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $args = [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ];\n\n $viewsDir = $this->option('views-dir');\n if ($viewsDir) {\n $args['--views-dir'] = $viewsDir;\n }\n\n $controllerDir = $this->option('controller-dir');\n if ($controllerDir) {\n $args['--controller-dir'] = $controllerDir;\n }\n\n $this->call('arche:controller', $args);\n }", "title": "" }, { "docid": "cc6491b2f0336ae13bfff98eea755c32", "score": "0.70706743", "text": "public function createController(){\n // Check class\n if (class_exists($this->controller)){\n $parents = class_parents($this->controller);\n // Check Extend\n If(in_array(\"controller\", $parents)){\n if(method_exists($this->controller, $this->action)){\n return new $this->controller($this->action, $this->request);\n } else{\n // Method Does Not Exist\n echo '<h1>Method does not exist</h1>';\n return;\n }\n } else {\n // Base Controller Does Not Exist\n echo '<h1>Basse controller not found</h1>';\n return;\n }\n } else {\n // Controller Class Does Not Exist\n echo '<h1>Controller class does not exist</h1>';\n return;\n }\n }", "title": "" }, { "docid": "cd89672daa4f5f61eda4a8291e0e7162", "score": "0.70479345", "text": "public function loadController()\n {\n $name = \"Tankfairies\\\\Controller\\\\{$this->controller}Controller\";\n\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "79e3e3fc0e344cfb3a21213aed829c60", "score": "0.70177794", "text": "public function createController(){\n\t\t// check our requested controller's class file exists and require it if so\n\t\tif (file_exists(\"controllers/\" . $this->controllerName . \".php\")) {\n\t\t\trequire (\"controllers/\" . $this->controllerName . \".php\");\n\t\t}\n\t\telse {\n\t\t\trequire (\"controllers/error.php\");\n\t\t\treturn new ErrorController(\"badurl\", $this->urlValues);\n\t\t}\n\t\t\n\t\t// does the class exist?\n\t\tif (class_exists($this->controllerClass)) {\n\t\t\t$parents = class_parents($this->controllerClass);\n\t\t\t\n\t\t\t// does the class inherit from the BaseController class?\n\t\t\tif (in_array(\"BaseController\", $parents)) {\n\t\t\t\t// does the requested class contain the requested action as a method?\n\t\t\t\tif (method_exists($this->controllerClass, $this->action)) {\n\t\t\t\t\treturn new $this->controllerClass($this->action, $this->urlValues);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// bad action/method error\n\t\t\t\t\trequire (\"controllers/error.php\");\n\t\t\t\t\treturn new ErrorController(\"badurl\", $this->urlValues);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// bad controller error\n\t\t\t\trequire (\"controllers/error.php\");\n\t\t\t\treturn new ErrorController(\"badurl\", $this->urlValues);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// bad controller error\n\t\t\trequire (\"controllers/error.php\");\n\t\t\treturn new ErrorController(\"badurl\", $this->urlValues);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "30259462cf1ac0f2bd38f26aebfe58ef", "score": "0.69965625", "text": "public function instanceController() {\n if ($this->request->isAdminPanel() && !Login::isLogin()) {\n header('Location: ' . $this->data['data']['siteUrl'] . 'login');\n exit();\n }\n\n if ($this->request->isLoginForm() && Login::isLogin()) {\n header('Location: ' . $this->data['data']['siteUrl'] . 'admin');\n exit();\n }\n\n $requesCtr = $this->request->getController() . 'Controller';\n $this->checkReadableController($requesCtr);\n $namespaceController = $this->getNamespaceController() . $requesCtr;\n $this->objectCtr = new $namespaceController;\n }", "title": "" }, { "docid": "8102ba49c557f1b7e2333b1195e07e8b", "score": "0.695944", "text": "public function createController(string $controllerName): \\Amvisie\\Core\\ControllerInterface\n {\n return $this->injector->make($controllerName);\n }", "title": "" }, { "docid": "d41f3cea42091f075639c6239344e637", "score": "0.6932172", "text": "public function instantiateController(): Controller {\n\t\t$class = $this->controllerClass;\n\t\t/* @var Controller $controller */\n\t\t$controller = new $class($this, $this->getOptions());\n\t\tif( !($controller instanceof Controller) ) {\n\t\t\tthrow new NotFoundException('The controller \"' . $this->controllerClass . '\" is not a valid controller, the class must inherit from \"' . get_class() . '\"');\n\t\t}\n\t\t\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "4d92b6a3ab78316122b82b17dfb05470", "score": "0.69104546", "text": "protected function createController($classname)\r\n {\r\n $controller = new $classname();\r\n if (is_a($controller, 'RoxControllerBase')) {\r\n }\r\n return $controller;\r\n }", "title": "" }, { "docid": "0b022a0a4938a80dae0ff0d5e70e7e52", "score": "0.69016707", "text": "public static function create($controller)\n {\n switch($controller) {\n case \"index.php\":\n return new ControllerHome($controller);\n break;\n case \"sign_up.php\":\n return new ControllerSignUp($controller);\n break;\n }\n }", "title": "" }, { "docid": "713df33e0580ea19e082cdf1420ef188", "score": "0.6883458", "text": "protected function createController(array $invokeArgs = array())\n {\n $class = $this->getControllerClass();\n if (!class_exists($class, true)) {\n $this->loadController();\n }\n $builder = new Mol_Util_ObjectBuilder('Zend_Controller_Action');\n $arguments = array(\n $this->request,\n $this->response,\n $invokeArgs\n );\n return $builder->create($class, $arguments);\n }", "title": "" }, { "docid": "7a8d6ed07f5cd7ffd8618e3bc08290c7", "score": "0.68022126", "text": "private function _setupNewController()\n {\n $this->controller_module_id = (!isset($this->controller_module_id)) ? \\filter_input(\\INPUT_POST, 'id_module', \\FILTER_SANITIZE_SPECIAL_CHARS) : $this->controller_module_id;\n $this->controller_model_id = (!isset($this->controller_model_id)) ? \\filter_input(\\INPUT_POST, 'sw_id_model', \\FILTER_VALIDATE_INT) : $this->controller_model_id;\n $this->controller_name = (!isset($this->controller_name)) ? \\filter_input(\\INPUT_POST, 'f_controller', \\FILTER_SANITIZE_SPECIAL_CHARS) : $this->controller_name;\n $this->controller_description = (!isset($this->controller_description)) ? filter_input(\\INPUT_POST, 'f_controller_description', \\FILTER_SANITIZE_SPECIAL_CHARS) : $this->controller_description;\n \n $this->_setPathController();\n }", "title": "" }, { "docid": "9b8ea93e18037e51f91dc2148793ff27", "score": "0.6736846", "text": "protected function buildController()\n {\n $controllerPath = $this->_getControllerPath($this->getNome());\n\n if ($this->files->exists($controllerPath) && $this->ask('A Controller with that name already exists. Do you want to overwrite (s/n)?', 's') == 'n') {\n return $this;\n }\n\n $this->info('Creating a controller ...');\n\n $replace = array_merge($this->buildReplacements(),$this->replaceParams());\n\n $controllerTemplate = str_replace(\n array_keys($replace), array_values($replace), $this->getStub('Controller')\n );\n\n $this->write($controllerPath, $controllerTemplate);\n\n return $this;\n }", "title": "" }, { "docid": "f2a700cb078d6a29d46fe2c698bff5ba", "score": "0.67269427", "text": "public static function createController($route){\n\t\t//var_dump($route);\n\t\tif ($route === ''||$route === null) {\n\t\t\t$route = self::$defaultController;\n\t\t}\n\t\tif (($pos = strpos($route, '/')) !== false) {\n\t\t\t$id = substr($route, 0, $pos); // Lets get the first bit before the first /\n\t\t\t$route = substr($route, $pos + 1); // then lets get everything else\n\t\t} else {\n\t\t\t$id = $route;\n\t\t\t$route = '';\n\t\t}\n\n\t\t$controllerName = $id.\"Controller\";\n\t\tif(php_sapi_name() == 'cli')\n\t\t\t$controllerFile = ( self::getPath('@cli')!==null ? self::getPath('@cli') : self::getPath('@app') . DIRECTORY_SEPARATOR . 'cli' ) .\r\n\t\t\t\tDIRECTORY_SEPARATOR . $controllerName . '.php';\t\t\t\n\t\telse\n\t\t\t$controllerFile = ( self::getPath('@controllers')!==null ? self::getPath('@controllers') : self::getPath('@app') . DIRECTORY_SEPARATOR . 'controllers' ) .\n\t\t\t\tDIRECTORY_SEPARATOR . $controllerName . '.php';\n\t\t//var_dump($controllerFile);\n\t\t$className = ltrim(self::$controllerNamespace . '\\\\' . $controllerName, '\\\\');\n\n\t\tif(isset(self::$classMap[$className])){\n\t\t\t$controller = new self::$classMap[$className]['file'];\n\t\t}elseif(is_file($controllerFile)){\n\n\t\t\t// cache this response so we don't do it everytime\n\t\t\tself::$classMap[$className] = array(\n\t\t\t\t'class' => $className,\n\t\t\t\t'name' => $controllerName,\n\t\t\t\t'file' => $controllerFile\n\t\t\t);\n\t\t\tinclude($controllerFile);\n\t\t\t$controller = new $className;\n\n\t\t\tif($route==='')\n\t\t\t\t$route=self::$actionPrefix.$controller->defaultAction;\n\t\t\telse\n\t\t\t\t$route=self::$actionPrefix.$route;\n\t\t}\n\t\treturn isset($controller) ? array($controller,$route) : false;\n\t}", "title": "" }, { "docid": "a63577bbe00a8d905bcd679acc6c0582", "score": "0.6705274", "text": "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "84b6925238d80b15f065746663531a3c", "score": "0.6616432", "text": "public function controller($args) {\n\t\tif (!isset($args[0])) {\n\t\t\tdie(\"Name not given \\n\");\n\t }\n\n\t $name = ucfirst($args[0]) . \"Controller\";\n\n\t $this->createFile($name, 'controller', '/App/Controllers/');\n\t}", "title": "" }, { "docid": "f4d07412dc292f0a6cff40ae8543b4db", "score": "0.65842915", "text": "public function createController($pi, array $params)\n {\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\Controller\\\\' . ucfirst($params['page']);\n\n return new $class();\n }", "title": "" }, { "docid": "2b80450a3990abce0a05639818f24be0", "score": "0.656793", "text": "private function createControllerObject($class)\n\t{\n\t\treturn new $class();\n\t}", "title": "" }, { "docid": "b80ca0d91acf5fa408fb563919b42529", "score": "0.65628874", "text": "protected function _createControllerFile()\n {\n try {\n fopen($this->controller_path . $this->controller_name . 'Controller.php', 'w');\n $this->_makeCodeControllerClass();\n } catch (Exception $ex) {\n $descripcion = 'Imposible to find the controller file to write ' . $ex;\n \\kerana\\Exceptions::showError('Creator', $descripcion);\n }\n }", "title": "" }, { "docid": "f3d9052720cbefd58ba72c5dfd15c8e6", "score": "0.6521173", "text": "protected function makeController($controller)\n {\n\n if (!$this->creator) {\n return $this->container->make($controller);\n }\n\n return $this->creator->createController($controller, $this->getPage());\n\n }", "title": "" }, { "docid": "ec64f7c47b67530b129a7d6e9429211a", "score": "0.64916253", "text": "public function createController(): void\n {\n $this->checkDsToken();\n\n // Call the worker method\n $results = $this->checkRequestStatus();\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Check request status\",\n \"Admin API data response output:\",\n \"Results from UserExport:getUserListExport method:\",\n json_encode(json_encode($results))\n );\n }\n }", "title": "" }, { "docid": "e3eaee4a3b61824fe74af10e651e7a6d", "score": "0.6487939", "text": "private function createControllerFromClassName($className)\n {\n // If we can, use the container to build the Controller so that Constructor params can\n // be injected where possible\n if ($this->invoker) {\n return $this->invoker->getContainer()->get($className);\n }\n\n return new $className;\n }", "title": "" }, { "docid": "53068661fa2ea5fa9960c7d4105233b8", "score": "0.6484272", "text": "private function newController($name)\n {\n $className = ucfirst($name) . 'Controller';\n $path = $this->sys->homePath . \"module/controller/{$className}.php\";\n if (! is_file($path)) {\n return null;\n }\n\n require $path;\n if (! class_exists($className, false)) {\n return null;\n }\n\n return new $className();\n }", "title": "" }, { "docid": "ad6914f87ccd4791fb383404ed3b53d3", "score": "0.64755636", "text": "public function getController() {\r\n $page = ($_GET['page']) ? $_GET['page'] : 'index';\r\n $page = rtrim($page, '/');\r\n $this->url = explode('/', $page);\r\n if (isset($this->url[0])) {\r\n $this->file = ROOT . '/app/controllers/' . ucfirst($this->url[0]) . 'Controller.php';\r\n if (is_readable($this->file)) {\r\n $name = ucfirst($this->url[0]) . 'Controller';\r\n $this->controller = new $name($this->registry);\r\n } else {\r\n $this->controller = new Index($this->registry);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "448340282fb9c39c138bb392484c0326", "score": "0.6474414", "text": "function createController()\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = $this->worker($this->args);\n\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Add a form to a room\",\n \"The DocuSign Form was successfully added to the room\",\n \"Results from the Rooms::AddFormToRoom method\",\n json_encode(json_encode($results))\n );\n }\n\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "7e91823fe77b5e2f03b6fae33a6098da", "score": "0.6464249", "text": "function createController()\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = AddFormsToRoomService::worker($this->args, $this->clientService);\n\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Add a form to a room\",\n \"The DocuSign Form was successfully added to the room\",\n \"Results from the Rooms::AddFormToRoom method\",\n json_encode(json_encode($results))\n );\n }\n\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "79283084dbdf9d6599d62dcf46545404", "score": "0.640609", "text": "protected function getMaker_AutoCommand_MakeControllerService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/console/Command/Command.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/maker-bundle/src/Command/MakerCommand.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/maker-bundle/src/MakerInterface.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/maker-bundle/src/Maker/AbstractMaker.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/maker-bundle/src/Maker/MakeController.php';\n\n $a = ($this->privates['maker.file_manager'] ?? $this->getMaker_FileManagerService());\n\n $this->privates['maker.auto_command.make_controller'] = $instance = new \\Symfony\\Bundle\\MakerBundle\\Command\\MakerCommand(new \\Symfony\\Bundle\\MakerBundle\\Maker\\MakeController($a), $a, ($this->privates['maker.generator'] ?? $this->getMaker_GeneratorService()));\n\n $instance->setDescription('Creates a new controller class');\n $instance->setName('make:controller');\n\n return $instance;\n }", "title": "" }, { "docid": "7efc33ba99ed4e269f90f065a7233813", "score": "0.640261", "text": "private function _makeCodeControllerClass()\n {\n\n // load the creator-template to a controller class \n $path_tpl = realpath(__DOCUMENTROOT__ . '/../templates/creator/tpl_controller.ker');\n\n // path to the new controller created\n $path_controller = realpath($this->controller_path . $this->controller_name . 'Controller.php');\n $file_contents = file_get_contents($path_tpl);\n\n // lets check if model object is necessary\n if ($this->controller_model_id > 0) {\n\n // create a model object to fetch model data\n $model_for_controller = new DataModel();\n $model_for_controller->_setIdTableValue($this->controller_model_id);\n $rsModel = $model_for_controller->getRecord();\n $model_name = $rsModel->model;\n $model_attribute_name = strtolower(substr($model_name, 0, -5));\n $model_resultset = ucwords($model_attribute_name);\n $model_object_to_create = ' $this->_' . $model_attribute_name . '= New \\\\application\\\\modules\\\\' .\n $this->controller_module . '\\\\model\\\\' . $model_name . '();';\n }\n\n // replacement parse file\n $code_replace = [\n '[{controller_name}]' => ucwords($this->controller_name) . 'Controller',\n '[{controller}]' => $this->controller_name,\n '[{module_name}]' => $this->controller_module,\n '[{controller_description}]' => $this->controller_description,\n '[{controller_date}]' => date('d-m-Y H:i:s'),\n '[{controller_implements}]' => ($this->controller_model_id > 0) ? 'implements \\\\kerana\\\\KeranaInterface' : '',\n '[{controller_model}]' => ($this->controller_model_id > 0) ? 'protected $_' . $model_attribute_name . ';' : '',\n '[{model_object}]' => ($this->controller_model_id > 0) ? $model_object_to_create : '',\n '[{model_name}]' => '$this->_' . $model_attribute_name,\n '[{view_dependency}]' => $this->view_dependency,\n '[{model_rs}]' => ($this->controller_model_id > 0) ? $model_resultset : '',\n ];\n $file_new_contents = strtr($file_contents, $code_replace);\n // put the replacement into a model class\n file_put_contents($path_controller, $file_new_contents);\n \n return true;\n }", "title": "" }, { "docid": "2f4e77299bf36758d4cc146acf4401aa", "score": "0.639783", "text": "public function createController(string $route): Controller {\n if (!$route) {\n $route = 'index';\n }\n\n $routes = config('routes');\n $derived = $route . '/';\n\n while (false !== ($derived = substr($derived, 0, strrpos($derived, '/')))) {\n\n $def = $routes[$derived] ?? null;\n\n if ($def !== null) {\n if (substr($def, -1) === '\\\\') {\n // this means $def is a namespace\n\n $len = strlen($derived);\n\n $remaining = substr($route, $len ? $len + 1 : 0);\n\n $class = $def . join('\\\\', array_map('ucfirst', explode('/', $remaining)));\n } else {\n $class = $def;\n }\n\n break;\n }\n }\n\n try {\n return new $class;\n } catch (Error $err) {\n if ($err->getMessage() === \"Class '$class' not found\") {\n throw new Exception($this->t8('common', 'ctrlnotfound'), 404);\n }\n throw $err;\n }\n }", "title": "" }, { "docid": "cda353b74f986d425dc6739af895513d", "score": "0.6390569", "text": "public function createController($category, $page, $args = null){\n if(!in_array($category, $this->controller_categories)){\n return new WP_Error( 'wrong_controller_name', __( \"Wrong controller category.\", 'Halo1' ).' '.$category.'.');\n }\n\n $class_name = $this->generateClassName($page, $category, 'controller', $category);\n $file_name = $this->generateFilename($page, $category, 'controller');\n\n if($category == \"theme\"){\n if(is_null($args))\n $args = array();\n $args['factory-instance'] = $this;\n }\n\n if(!class_exists('Halo1AbstractController')){\n require_once($this->controllers_path . $this->abstract_subfix . \"halo1-abstract-controller.php\");\n }\n\n if($category == \"theme-config\"){\n if(!class_exists('Halo1AbstractThemeConfigController'))\n require_once($this->controllers_path . $this->abstract_subfix . \"halo1-abstract-theme-config-controller.php\");\n }\n\n if($category == \"metabox\"){\n if(!class_exists('Halo1AbstractMetaboxController'))\n require_once($this->controllers_path . $this->abstract_subfix . \"halo1-abstract-metabox-controller.php\");\n }\n\n if($category == \"widget\"){\n if(!class_exists('Halo1AbstractWidgetController'))\n require_once($this->controllers_path . $this->abstract_subfix . \"halo1-abstracts-widget-controller.php\");\n }\n\n if($category == \"frontend\"){\n if(!class_exists('Halo1WalkerMainMenu'))\n require_once('halo1-walker-main-menu.php');\n if(!class_exists('Halo1WalkerPrivacyMenu'))\n require_once('halo1-walker-privacy-menu.php');\n if(!class_exists('Halo1AbstractFrontendController'))\n require_once($this->controllers_path . \"abstracts/halo1-abstract-frontend-controller.php\");\n }\n\n if(!class_exists($class_name))\n require_once($this->controllers_path . $file_name);\n return $class_name::getInstance($class_name, $args);\n }", "title": "" }, { "docid": "3babefbf594dd92b51c387388dc1320a", "score": "0.6388098", "text": "public static function factory($componentName)\n {\n // Determine full classname\n $className = self::getClassName($componentName);\n\n // Construct and return Controller\n return new $className();\n }", "title": "" }, { "docid": "12da3b00961742341476503e9dcea0d4", "score": "0.63620377", "text": "protected function instantiateController($class)\r\n {\r\n return new $class();\r\n }", "title": "" }, { "docid": "058e0aa72e6bb6ecc773036934278825", "score": "0.63552123", "text": "protected function makeController($controller)\n {\n Controller::setRouter($this->router);\n\n return $this->container->make($controller);\n }", "title": "" }, { "docid": "6efcbbbbe9b7fae4edc89128a1638a95", "score": "0.6342292", "text": "function Controller()\n {\n \n }", "title": "" }, { "docid": "4d95572e6e7479ffd2b92ee2f50fdbaa", "score": "0.62714833", "text": "public function MyController()\n {\n if ($controller_name = Config::inst()->get(static::class, 'controller_name')) {\n $controller = $controller_name;\n } else {\n $class = ClassInfo::ShortName($this->getClassName());\n $controller = sprintf('%sController', $class);\n }\n if (class_exists($controller)) {\n return new $controller();\n }\n return false;\n }", "title": "" }, { "docid": "1401ea43f67a5acccbad9b43d1d4ac3a", "score": "0.62172264", "text": "public function Controller()\n {\n $this->afk = AFK::getInstance();\n }", "title": "" }, { "docid": "ce8de7bc058f2a9b48d571a3b1e89307", "score": "0.6209262", "text": "public function create()\n\t{\n\t\t//\n\t\techo 'Industry Controller create';\n\t}", "title": "" }, { "docid": "c4090d9a567cc2cba63e66a2bce2a65f", "score": "0.61799705", "text": "public function __construct() {\n\t\t// calling a method within the controller as the second parameter and then any other parameters\n\t\t// we pass in to our controllers (ex. using views) which could consist of ex. $id\n\t\t$url = $this->parseUrl();\n\n\t\t//print_r($url);\n\n\t\t// check if controller exists, bc if it doesn't, \n\t\t// we don't wanna set the controller but instead use the default one\n\t\tif(file_exists('../app/Controllers/' . $url[0] . '.php')) {\n\t\t\t// if the controller exists as a file, we wanna set it to url[0] (=name of the controller that we've called)\n\t\t\t// so that it essentially will replace the default controller\n\t\t\t$this->controller = $url[0];\n\t\t\t// then we unset it to remove it from the array so that it doesn't get send to the params\n\t\t\tunset($url[0]);\n\t\t\t// OBS! if the controller doens't exist as a file, the code block within this if-statement won't run\n\t\t\t// and only the default controller (home) will show\n\t\t}\n\t\t// once the url[0] is unset, we wanna require in the controller that we have called\n\t\t// default controller (home) will be required if the called controller file doesn't exist\n\t\trequire_once '../app/Controllers/' . $this->controller . '.php';\n\n\t\t$controller = \"\\\\App\\\\Controllers\\\\\" . $this->controller;\n\n\t\t// we create a new instance (object) of $this->controller\n\t\t// ex. Home controller will become a Home object \n\t\t\n\t\t$this->controller = new $controller;\n\t\t// var_dump($this->controller);\n\n\t\t// here we check if the controller object created above has a method (second url parameter)\n\t\t// ex. localhost/Grupp3/public/home/INDEX/params\n\t\tif (isset($url[1])) {\n\t\t\t// checks if the class method exists in the object, ex. our controller Home\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t\t// unset gives us a leftover params array that we can parse through to our controller\n\t\t\t}\n\t\t}\n\t\t// print_r($url);\n\n\t\t// check if the url has any content, then rebase values in array so they start at 0, else set params to empty\n\t\t$this->params = $url ? array_values($url) : [];\n\n\t\t// now we call the controller and method that we've been checking! \n\t\t// What will we get? THE METHOD INSIDE THE CONTROLLER :D ex. the index method in our Home controller!\n\t\tcall_user_func_array([$this->controller, $this->method], $this->params);\n\t}", "title": "" }, { "docid": "c67d928acf846fd271ea848a0c634c81", "score": "0.6177312", "text": "public function controller() {\n\t\t// router dengan Slim\n\t\trequire 'lib/Slim/Slim.php';\n\t\t\\Slim\\Slim::registerAutoloader();\n\t\t$this->app = new \\Slim\\Slim();\n\t\t\n\t\t$this->load('helper', 'controller');\n\t\t$app =& $this->app;\n\t\t$ctr = $this;\n\t\t\n\t\t// controller file\n\t\tforeach (scandir('controller') as $file) {\n\t\t\tif (is_file('controller/' . $file))\n\t\t\t\trequire('controller/' . $file);\n\t\t}\n\t\t\n\t\t$this->app->run();\n\t}", "title": "" }, { "docid": "d69e7bd214645cb9a6fc950c17bc921c", "score": "0.6157848", "text": "public function __construct(){\n $url = $this->parseURL();\n\n // Check if controller file exist\n if(file_exists('../app/Controllers/' . $url[0] . '.Controller.php')){\n // Overwrite controller name\n $this->controller = $url[0];\n unset($url[0]);\n }\n\n require_once '../app/Controllers/' . $this->controller . '.Controller.php';\n // Call new instance\n $this->controller = new $this->controller;\n\n // Check if method inside selected controller exists\n if(isset($url[1])){\n if(method_exists($this->controller, $url[1])){\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // If there are params set, get values, else, leave param array empty\n $this->params = $url ? array_values($url) : [];\n\n // Call selected controller with method and params, if set\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "eda06a6e146a53ad2bbec88653146063", "score": "0.6141012", "text": "public function createController($data)\n {\n $controller_dist = $this->container->get('kernel')->locateResource('@SmirikPropelAdminBundle/Skeleton/BaseAdminController.php.dist');\n $content = file_get_contents($controller_dist);\n\n $content = str_replace('**Controller**', $data['controller'], $content);\n $content = str_replace('**ModelName**', $data['model_name'], $content);\n $content = str_replace('**layout**', $data['layout'], $content);\n $content = str_replace('**model_prefix**', $data['model_prefix'], $content);\n $content = str_replace('**Query**', '\\\\'.$data['query'], $content);\n $content = str_replace('**Form**', $data['form'], $content);\n $content = str_replace('**Model**', '\\\\'.$data['model'], $content);\n $content = str_replace('**bundle**', $data['bundle'], $content);\n\n /**\n * Write generated content into controller file.\n */\n $base_path = $this->container->get('kernel')->locateResource('@'.$data['bundle']);\n $controller_file = $base_path.'/Controller/Base/Admin'.$data['model_name'].'Controller.php';\n file_put_contents($controller_file, $content);\n\n if ($this->createMainController($data['controller'], $data['model_name'], $data['bundle'])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "aeefbcf9b2f016108c3ed4723db44eaf", "score": "0.612158", "text": "private static function cli_controller ( $name = null )\n {\n if ( $name == null )\n {\n echo self::$usage;\n return;\n }\n\n if ( !preg_match ( '#^[a-zA-Z0-9_]+$#', $name ) )\n {\n echo \"\\033[0;31mInvalid name for a controller\\n\";\n return;\n }\n\n $path = XT_PROJECT_DIR .'/controllers/'. $name .'_controller.php';\n\n if ( file_exists ( $path ) )\n {\n echo \"\\033[0;31m\". $name .\"_controler already exists\\n\";\n return;\n }\n\n $template = \"<?php\\n\\nclass \". $name .\"_controller extends controller_base\\n\".\n \"{\\n\\n\".\n \" public function __construct ()\\n\".\n \" {\\n\\n\".\n \" }\\n\\n\".\n \"}\";\n file_put_contents ( $path,\n $template );\n echo \"\\033[0;32mController '\". $name .\"' created\\n\";\n }", "title": "" }, { "docid": "b42beecfd7d664c5f72876d2805da0f3", "score": "0.61149263", "text": "function loadController(){\n \n $name = ucfirst($this->request->controller) .'Controller';\n $file = ROOT . DS .'app'.DS.'Controller' . DS . $name .'.php';\n\n if(!file_exists($file)){\n \t$this->error('Le controller '.$this->request->controller.\" n'existe pas\");\n }\n\n require $file;\n\t$namecontroller = '\\App\\Controller\\\\' . $name;\n $controller = new $namecontroller($this->request);\n return $controller;\n\n\n }", "title": "" }, { "docid": "9303ed8c0fd5a2c2297b44080ef42dd7", "score": "0.6098177", "text": "public function defineController()\r\n {\r\n ($this->url[0] === '') ? $this->url[0] = 'index' : false;\r\n if ($this->fs->exists($this->appsDir . $this->route['appName'] . DS . $this->route['controllerFolder'] . DS . ucfirst($this->urlToCamel($this->url[0])) . 'Controller.php') === true) {\r\n $this->route['controller'] = $this->route['appsFolder'] . '\\\\' . $this->route['appName'] . '\\\\' . $this->route['controllerFolder'] . '\\\\' . ucfirst($this->urlToCamel($this->url[0])) . 'Controller';\r\n $this->shiftUrl();\r\n } else if ($this->fs->methodExists($this->route['appsFolder'] . '\\\\' . $this->route['appName'] . '\\\\' . $this->route['controllerFolder'] . '\\IndexController', $this->urlToCamel($this->url[0])) === true) {\r\n $this->route['controller'] = $this->route['appsFolder'] . '\\\\' . $this->route['appName'] . '\\\\' . $this->route['controllerFolder'] . '\\IndexController';\r\n } else {\r\n $this->shiftUrl();\r\n }\r\n\r\n }", "title": "" }, { "docid": "c62bae7e056633f57506d340f6d96c35", "score": "0.60906184", "text": "public function __construct() {\n $url = self::parseURL();\n\n // Check if the controller file exists\n if (file_exists('app/controllers/' . $url[0] . '_controller.php')) {\n $this->controller = $url[0];\n $_GET['controller'] = $url[0];\n unset($url[0]);\n }\n\n // Check if the model file exists\n if (file_exists('app/models/' . $this->controller . '.php')) {\n require_once('app/models/' . $this->controller . '.php');\n }\n\n //We now require the controller passed as a parameter and we create a new object of it\n require_once('app/controllers/' . $this->controller . '_controller.php');\n $this->controller = ucfirst($this->controller) . \"Controller\";\n $this->controller = new $this->controller;\n\n\n\n // Now we check the action of that controller exists\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->action = $url[1];\n $_GET['action'] = $url[1];\n unset($url[1]);\n }\n }\n\n // Now we check if there are any params, and if there are, add them to the array $params\n $this->params = $url ? array_values($url) : [];\n\n // We call the controller, with its action and its params\n call_user_func_array([$this->controller, $this->action], $this->params);\n }", "title": "" }, { "docid": "3028072d232036c467223c0152a8dc88", "score": "0.6082392", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $envelope_id = UseConditionalRecipientsService::worker($this->args, $this->clientService, $this::DEMO_DOCS_PATH);\n\n if ($envelope_id) {\n # That need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Use conditional recipients\",\n \"Use conditional recipients\",\n \"Envelope ID {$envelope_id} with the conditional\n routing criteria has been created and sent to the first recipient!\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "46a6962756e67e6093c241520e1c75e1", "score": "0.60628444", "text": "public function createController($id, $module)\n\t{\n\t\tif (isset($module->controllerMap[$id])) {\n\t\t\treturn Yii::createObject($module->controllerMap[$id], $id, $module);\n\t\t} elseif (preg_match('/^[a-z0-9\\\\-_]+$/', $id)) {\n\t\t\t$className = StringHelper::id2camel($id) . 'Controller';\n\t\t\t$classFile = $module->controllerPath . DIRECTORY_SEPARATOR . $className . '.php';\n\t\t\tif (is_file($classFile)) {\n\t\t\t\t$className = $module->controllerNamespace . '\\\\' . $className;\n\t\t\t\tif (!class_exists($className, false)) {\n\t\t\t\t\trequire($classFile);\n\t\t\t\t}\n\t\t\t\tif (class_exists($className, false) && is_subclass_of($className, '\\yii\\base\\Controller')) {\n\t\t\t\t\treturn new $className($id, $module);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "7e01532c87afa8d8ccce62bcdc6b6cfc", "score": "0.60513467", "text": "private function controllerLoad()\n {\n /**\n * Check if a controller was setted, if not add the inicital default controller\n * setted in config file\n */\n if (!$this->controller) {\n // Add the default controller\n require_once ABSPATH . '/app/controllers/' . INITIAL_CONTROLLER . '.php';\n // Cretae object with the instance of the controller setted to\n // home of the application\n $class = INITIAL_CONTROLLER;\n $this->controller = new $class();\n // Execute the index function or other function defined as initial\n $function = INITIAL_FUNCTION;\n $this->controller->$function();\n return;\n }\n\n // If the controller not exist, redirect to a 404 page\n if (!file_exists(ABSPATH . '/app/controllers/' . $this->controller . '.php')) {\n $this->fileNotFound();\n }\n\n // Inclui o arquivo do controller\n require_once ABSPATH . '/app/controllers/' . $this->controller . '.php';\n\n $this->controller = preg_replace('/[^a-zA-Z]/i', '', $this->controller);\n\n // If class not exists, redirect to a 404 page\n if (!class_exists($this->controller)) {\n $this->fileNotFound();\n }\n\n // Create the class object and send the parameters\n $this->controller = new $this->controller($this->parameters);\n\n // Remove special characters from the method/function name\n $this->action = preg_replace('/[^a-zA-Z]/i', '', $this->action);\n\n if (method_exists($this->controller, $this->action)) {\n $this->controller->{$this->action}($this->parameters);\n return;\n }\n\n if (!$this->action && method_exists($this->controller, 'index')) {\n $this->controller->index($this->parameters);\n\n return;\n }\n\n // By default send to 404 page\n $this->fileNotFound();\n }", "title": "" }, { "docid": "ba827e9fe97dc7dfd670676b7dbbf110", "score": "0.60498595", "text": "public function service()\n\t{\n\t\t$namespace = $this->getNamespace('controller');\n\n\t\t// Path to find controller service template\n\t\t$tpl = $this->templateDir. DS .'Controllers'. DS .'Controller.tpl';\n\n\t\t//If not a vendor, trait like a config starter controller...\n\t\t$controllerName = ($this->vendor != null) ? $this->object : 'Config';\n\n\t\t//\n\t\t$model = $this->getNamespace('model') . '\\\\' . ucfirst($controllerName);\n\n\t\t//\n\t\t$saveController = $this->getUp($controllerName);\n\t\t\n\t\t// args to send to handler replace on template\n\t\t$vars = ['controllerName' => $controllerName, \n\t\t\t\t 'varController' => strtolower($controllerName),\n\t\t\t\t 'namespaceModel' => $model,\n\t\t\t\t 'namespace' \t => $namespace,\n\t\t\t\t 'saveController' => $saveController];\n\t\t\n\t\t// get file name to the new controller\n\t\t$file = $this->getFileName($controllerName, 'controller');\n\n\t\t// get content of template file\n\t\t$content = $this->fopenReplace($tpl, $vars);\n\t\n\t\t// Create file\n\t\t$this->fopenWrite($file, $content);\n\t}", "title": "" }, { "docid": "14d0cf0c580ccc6830d99422ce4b5af2", "score": "0.6033886", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n $_SESSION[\"envelope_id\"] = $results[\"envelope_id\"]; # Save for use by other examples\n # which need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Envelope sent\",\n \"Envelope sent\",\n \"The envelope has been created and sent!<br/>\n Envelope ID {$results[\"envelope_id\"]}.\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "e175ad4cb3823e9a3bee75744ce34a11", "score": "0.60308653", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Controller\\Game21Controller\", $controller);\n }", "title": "" }, { "docid": "2a2df064f45d56e03a465664ee6b0d25", "score": "0.6030713", "text": "public function create(Info $Info, ?string $name = \"Index\", ?string $controller = 'Home'){\n\n try{\n\n /**\n * Normalize controller name\n */\n $controller = ucfirst(rtrim($controller, '/'));\n $name = ucfirst(rtrim($name, '/'));\n\n /**\n * Details Gathering\n */\n if( ($Info->getAppBase() !== null) && ($Info->getAppName() !== null) ){\n $app_base = $Info->getAppBase();\n $app_name = $Info->getAppName();\n }else{\n throw new \\Exception(\"Error: Couldn't resolve app directories\\n\");\n }\n\n if( !empty($app_base) ){\n\n /* View Buffering */\n\n if( empty($controller) ){\n throw new \\Exception(\"Error: Empty controller identifier\\n\");\n }\n\n /**\n * Component BluePrint\n */\n\n if( !is_null($controller) && file_exists(\"{$app_base}controller/{$controller}.php\") ){\n\n /**\n * Set Progress Message\n */\n $Info->getProgressMessage(\"createComponent\");\n\n print \"updating {$controller} controller...\\n\";\n\n $filehandler = new Filehandler;\n\n $context = null;\n\n $buffering_pont = \"{$app_base}controller/{$controller}.php\";\n $context_handle = fopen(\"{$buffering_pont}\", 'rb');\n\n /**\n * Prepare new Component\n */\n $component = \"\\t\\t\\tpublic function {$name}(Param \\$param){\\n\\t\\t\\t\\ttry{}catch(\\Throwable \\$t){}\\n\\t\\t\\t}\\n\\n\";\n\n $first = true;\n $halt_writing = false;\n\n while ($blueprint = fgets($context_handle) ) {\n\n /**\n * Find first function in the controller class and insert conveyor before first\n */\n $pattern = \"/^(public|private|protected)?[\\s]*function[\\s]+(.)+(\\{)?$/i\";\n\n if ( preg_match($pattern, trim($blueprint), $match) != 0 && $halt_writing == false) {\n\n if($first){\n\n $context .= $component.$blueprint;\n $halt_writing = true;\n }\n }else{\n $context .= $blueprint;\n }\n }\n\n /**\n * Recreate Controller File\n */\n $filehandler->createFile(\"{$app_base}controller/{$controller}.php\", $context);\n\n unset( $context, $blueprint);\n fclose($context_handle);\n\n }else{\n throw new \\Exception(\"Host controller/api not found\");\n }\n\n }else{\n echo \"Error: Couldn't create {$name} view, {$name} exists\\n\";\n }\n }catch(\\Exception $e){\n\n print($e->getMessage().' on line '.$e->getLine().' ('.$e->getFile().\")\\n\");\n }catch(\\Throwable $e){\n print($e->getMessage().' on line '.$e->getLine().' ('.$e->getFile().\")\\n\");\n }finally{\n unset( $context, $blueprint);\n\n print \"Component creation closed\\n\";\n }\n }", "title": "" }, { "docid": "3d88e31c91576de3ff25a91dbb52e286", "score": "0.6018949", "text": "static function getController($className){\n $controller = null;\n // add subNamespaces for controller classes\n $subNamespaces = ['Api', 'Ccp'];\n\n for($i = 0; $i <= count($subNamespaces); $i++){\n $path = [__NAMESPACE__];\n $path[] = ( isset($subNamespaces[$i - 1]) ) ? $subNamespaces[$i - 1] : '';\n $path[] = $className;\n $classPath = implode('\\\\', array_filter($path));\n\n if(class_exists($classPath)){\n $controller = new $classPath();\n break;\n }\n }\n\n if( is_null($controller) ){\n throw new \\Exception( sprintf('Controller class \"%s\" not found!', $className) );\n }\n\n return $controller;\n }", "title": "" }, { "docid": "3c22ad45fb731f5fc7092d68d28d4216", "score": "0.6016665", "text": "public function buildControllerClass() {\n return $this->getKeyBuilder('controller')->build();\n }", "title": "" }, { "docid": "0c1861a962c93309a792841cbf270c7f", "score": "0.59944934", "text": "protected function registerController()\n {\n\t$this->app['generate.controller'] = $this->app->share(function($app)\n\t{\n\t $generator = $this->app->make('Way\\Generators\\Generator');\n\n\t return new ControllerGeneratorCommand($generator);\n\t});\n\n\t$this->commands('generate.controller');\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.59863526", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.59863526", "text": "public function getController();", "title": "" }, { "docid": "0230d79452efe6b49609c89fe70c2b74", "score": "0.59707826", "text": "public static function controller($name = null)\n {\n $route = new self($name);\n $route->method = 'controller';\n return $route;\n }", "title": "" }, { "docid": "2725b3eb5d092b6e5f827a943b36a85a", "score": "0.5960791", "text": "function createController($name){\n $controllerName = ucfirst($name) . 'Controller';\n echo \"\\nCreating controller $controllerName\";\n\n // Le sigulier pour downloads c'est download (on enlève la dernière lettre)\n $singulier = substr($name, 0, -1);\n\n // Contenu du fichier controller\n $content = '<?php\nrequire_once(\"libraries/controllers/Controller.php\");\n\nclass '.$controllerName.' extends Controller {\n protected $viewFolder = \"'.$name.'\";\n protected $modelName = \"'.$name.'\";\n\n public function index(){\n $'.$name.' = $this->model->all();\n $this->display(\"index\", [\"'.$name.'\" => $'.$name.']);\n }\n\n public function show(){\n $id = filter_input(INPUT_GET, \"id\", FILTER_VALIDATE_INT);\n $'.$singulier.' = [];\n $errorMessage = \"\";\n\n if(!$id){\n $errorMessage = \"Vous n\\'avez pas envoyé l\\'id !\";\n } else {\n $'.$singulier.' = $this->model->find($id);\n\n if(!$'.$singulier.'){\n $errorMessage = \"Aucun élément trouvé pour l\\'id $id\";\n }\n }\n\n $this->display(\"show\", [\"'.$singulier.'\" => $'.$singulier.']);\n }\n}\n';\n // On ajoute le contenu dans le fichier php\n file_put_contents('libraries/controllers/' . $controllerName . '.php', $content); \n}", "title": "" }, { "docid": "e903474c6ff6875ffce93d01bf89998e", "score": "0.5949032", "text": "protected function instantiateController($class)\n {\n $instance = new $class();\n /* @var $instance Request */\n\n return $instance;\n }", "title": "" }, { "docid": "06732986cae72da3f43c3d101e006bef", "score": "0.59483635", "text": "protected function dispatchController()\n {\n if (!file_exists($this->controllerDir.'/'.ucfirst($this->request->getParams('controller')).'.php')) {\n throw new Exception404('404 Not Found', 404);\n }\n $controller = $this->toNamespace(\"app\", $this->controllerDir).'\\\\'.ucfirst($this->request->getParams('controller'));\n if (!(class_exists($controller) &&\n (is_subclass_of($controller,'\\lib\\controllers\\BaseController')))) {\n throw new Exception404(\"404 Not Found\", 404);\n }\n $this->controller = new $controller($this->request, $this->response);\n }", "title": "" }, { "docid": "59eef28ae1981791ae9abe735df54ace", "score": "0.594728", "text": "public function createForMvc() : Application;", "title": "" }, { "docid": "00597ee1846b7d8a79391f97db66a307", "score": "0.5945841", "text": "private function createControllers()\n\t{\n\t\t$this->createModel();\n\t\tforeach ($this->options->folders as $folder)\n\t\t{\n\t\t\tforeach ($this->options->controllers as $controller)\n\t\t\t{\n\t\t\t\tif (!file_exists(APPPATH.'/controllers/'.$folder.'/'.$controller.'.php'))\n\t\t\t\t{\n\t\t\t\t\t$data = $this->generateControllerContent($controller);\n\t\t\t\t\twrite_file(APPPATH.'/controllers/'.$folder.'/'.$controller.'.php', $data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cb1e23faf7e1374592600b562f7c6b02", "score": "0.5929854", "text": "public static function get_create_controller(midcom_helper_datamanager2_interfaces_create $handler)\n {\n $controller = midcom_helper_datamanager2_controller::create('create');\n $controller->schemadb = $handler->load_schemadb();\n $controller->schemaname = $handler->get_schema_name();\n $controller->defaults = $handler->get_schema_defaults();\n $controller->callback_object = $handler;\n if (!$controller->initialize()) {\n throw new midcom_error('Failed to initialize a DM2 create controller.');\n }\n return $controller;\n }", "title": "" }, { "docid": "7ebcec9fe8152999dd02f82ac6d10711", "score": "0.59202087", "text": "public function createService(ServiceLocatorInterface $controllerLoader)\n {\n // get service locator to fetch other services\n $serviceLocator = $controllerLoader->getServiceLocator();\n\n // get all services that need to be injected\n $orderService = $serviceLocator->get('Order\\Service');\n\n // instantiate class\n $controller = new IndexController();\n\n // inject all services \n $controller->setOrderService($orderService);\n\n // return instance of class\n return $controller;\n }", "title": "" }, { "docid": "3ca3a545c7e8c5744c91fa9d08d6e38d", "score": "0.59168905", "text": "protected function buildController(Codendi_Request $request) {\n $planning_factory = new PlanningFactory(new PlanningDao(),\n TrackerFactory::instance());\n \n return new Planning_Controller($request, $planning_factory);\n }", "title": "" }, { "docid": "6880c8186d10407382756eba39f05069", "score": "0.59145945", "text": "function makeControllerFile() {\n\n\t\t$class = $this->_className;\n\t\t$file = $this->getIncludePath() . $class . '.inc.php';\n\t\tif (file_exists($file)) {\n\t\t\tinclude_once $file;\n\t\t\t$include = new $class($this->_namespace);\n\t\t\t$this->_includeMapper = $include;\n\t\t} else {\n\t\t\t$this->_includeMapper = new Mapper_Default($this->_namespace);\n\t\t}\n\n\t\t$mapperFile=$this->getLocation().DIRECTORY_SEPARATOR.'Controllers'.DIRECTORY_SEPARATOR.$this->_className.'Controller.php';\n\n\t\t$mapperData=$this->getParsedTplContents('controller.tpl');\n \n\t\tif (!file_put_contents($mapperFile,$mapperData)) {\n //die(var_dump($mapperData));\n\t\t\tdie(\"Error: could not write controller file $mapperFile.\");\n\t\t}\n\t}", "title": "" }, { "docid": "acd5742d08ade29b4e16759df5b3e587", "score": "0.5903087", "text": "public function getController()\n {\n // TODO: Implement getController() method.\n }", "title": "" }, { "docid": "aab3ca1dc94a4ef75fb836b774789bd2", "score": "0.5901692", "text": "public function __construct()\n {\n $this->authController = new AuthController();\n }", "title": "" }, { "docid": "48b8ce734170a837f9c723f9b1ec0c34", "score": "0.588652", "text": "private function _set_controller() {\n if(!isset ($this->_segment[0])) {\n require BASEPATH.'config/config.php';\n $this->_segment[0] = $config['default_controller'];\n }\n $controller_path = BASEPATH.'controllers/'.$this->_segment[0].'.php';\n if(file_exists($controller_path)) {\n require BASEPATH.'core/controller.php';\n require $controller_path;\n $class = ucfirst($this->_segment[0]).'Controller';\n if(!class_exists($class)) {\n show_error();\n }\n $this->_controller = new $class();\n } else {\n show_error();\n }\n }", "title": "" }, { "docid": "e075625edb082584e0f85db9e92509bc", "score": "0.58852184", "text": "public function create(ServerRequest $request, Response $response)\n {\n $pluginPath = $controller = null;\n $namespace = 'Controller';\n if ($request->getParam('plugin')) {\n $pluginPath = $request->getParam('plugin') . '.';\n }\n if ($request->getParam('prefix')) {\n if (strpos($request->getParam('prefix'), '/') === false) {\n $namespace .= '\\\\' . Inflector::camelize($request->getParam('prefix'));\n } else {\n $prefixes = array_map(\n 'Cake\\Utility\\Inflector::camelize',\n explode('/', $request->getParam('prefix'))\n );\n $namespace .= '\\\\' . implode('\\\\', $prefixes);\n }\n }\n\n $this->failureIfForbiddenCharacters($request->getParam('controller'), $namespace);\n\n if ($request->getParam('controller')) {\n $namespace .= '\\\\' . $request->getParam('controller');\n }\n\n $action = 'Index';\n if ($request->getParam('action')) {\n $action = Inflector::camelize($request->getParam('action'));\n }\n\n // Disallow plugin short forms, / and \\\\ from\n // controller names as they allow direct references to\n // be created.\n $this->failureIfForbiddenCharacters($action, $namespace);\n\n $className = App::className($pluginPath . $action, $namespace, 'Action');\n if (!$className) {\n $this->missingAction($namespace, $action);\n }\n $reflection = new ReflectionClass($className);\n if ($reflection->isAbstract() || $reflection->isInterface()) {\n $this->missingAction($namespace, $action);\n }\n\n $instance = $reflection->newInstance($request, $response, $action);\n $instance->setControllerName($request->getParam('controller'));\n return $instance;\n }", "title": "" }, { "docid": "96c60bcde3e3dd964ebe2f24bfc97df2", "score": "0.58733714", "text": "public function __construct()\n {\n $this->setControllerName();\n }", "title": "" }, { "docid": "ccff4a345946834fa2902d74a94f502d", "score": "0.58705366", "text": "protected function createDefaultHttpRequestController() : HttpRequestController {\n\t\t\n\t/**\n\t\t* Default one. Then set the right Controller based on the request content. BooksController, AuthorsController, PublishersController \t\n\t\t* @param a storage object or array of storage objects to the HttpRequestController class\n\t\t* @param a config array\n\t\t* @param a resource_types array\t?\t\n\t\t*\n\t\t**/\n\t\treturn new HttpRequestController($this->storage, $this->config, $this->resource_types);\n\t\t\n\t}", "title": "" }, { "docid": "d5837e44e27ac3b678f867e4d6a21136", "score": "0.5864205", "text": "private function getController() {\n\t\t$matchedRoute = $this->router->getRoute();\n\t\t$controllerClass = $matchedRoute->module .\"Controller\";\n\t\t$file = $this->frontcontroller_path . $controllerClass . $this->php_class_ext;\n\t\tif(file_exists($file))\n\t\t{\n\t\t\trequire_once($file);\n\t\t\treturn new $controllerClass($this, $matchedRoute->module, $matchedRoute->action);\n\t\t}\n\t\telse\n\t\t\tthrow new RuntimeException(\"Le fichier \\\"\". $controllerClass . $this->php_class_ext .\"\\\" est introuvable\");\n\t}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5849116", "text": "public function create() {}", "title": "" }, { "docid": "2848992aa90aa37fc5d8e010244a1f9d", "score": "0.58421075", "text": "protected function instantiateController($class)\n {\n $reflector = new ReflectionClass($class);\n\n $constructor = $reflector->getConstructor();\n\n if ($constructor && $constructor->getParameters()) {\n $controller = $this->container->get($class);\n }\n else {\n $controller = new $class();\n }\n\n if ($controller instanceof ContainerAwareInterface) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "title": "" }, { "docid": "f0e14d953ded7f305516b5ea4ea7f820", "score": "0.5829563", "text": "public static function controller(string $dir = null)\n {\n //Load default Controller\n if (!isset($dir)) {\n return new Controller;\n }\n\n $class = self::NAMESPACE_CONTROLLER . Str::pathToNamespace($dir);\n\n if (!class_exists($class)) {\n Log::error(\"The controller class '$dir' doesn't exists\");\n\n return false;\n }\n\n return new $class;\n }", "title": "" }, { "docid": "45dbaf9b416a171db8bb0dd3c0f5e14d", "score": "0.58279604", "text": "public function controller($viewName, array $config = array())\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn parent::controller($viewName, $config);\n\t\t}\n\t\tcatch (ControllerNotFound $e)\n\t\t{\n\t\t\t$magic = new Magic\\ControllerFactory($this->container);\n\n\t\t\treturn $magic->make($viewName, $config);\n\t\t}\n\t}", "title": "" }, { "docid": "19fdca14d6ebac34fd5ddbf3f335c5eb", "score": "0.582259", "text": "public function testCreateTheControllerClass()\n {\n $controller = new SessionController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "title": "" }, { "docid": "cefcb020a103209965b8d0b1c554f06a", "score": "0.5821296", "text": "function controller( $controller = 'application' ) {\n\n // Check if controller already is instantiated.\n if (!array_key_exists($controller, $this->controllers)) {\n\n // Prepend controller namespace and append Controller to the name.\n // Now it's all ready for PSR-4, which is awesome.\n $class_name = __NAMESPACE__ . '\\\\Controllers\\\\' . ucfirst($controller).'Controller';\n if (class_exists($class_name)) {\n $this->controllers[$controller] = new $class_name($this);\n } else {\n // Class not found. Return null\n return null;\n }\n }\n\n return $this->controllers[$controller];\n }", "title": "" }, { "docid": "13a2e41d9a52b928e1146e27a6d1dc40", "score": "0.58146715", "text": "function __construct()\n {\n $this->controller_usuario = new Controller_Usuario();\n $this->controller_entidade = new Controller_Entidade();\n $this->controller_endereco = new Controller_Endereco();\n }", "title": "" }, { "docid": "a85af13677a2a97100bc16185b5b41a0", "score": "0.5812875", "text": "public function create()\n {\n return CrudController::create('documental.componentes.create', 'documental', ['App\\Area' => ['valor' => 'nombre', 'clave' => 'id']]);\n }", "title": "" }, { "docid": "a07e8794dbbe1404dc73889e88da65b8", "score": "0.5812167", "text": "protected function controller($controller, $view)\n {\n $controller_name = $this->controller_namespace.$controller;\n \n /**\n * Den Controller als Datei laden.\n */\n $loaded = \\dcms\\Core::load_file($controller, $this->controller_path, true, false);\n if($loaded === false):\n \\dcms\\Log::write(\"Could not load controller file $controller.php!\", null, 3);\n return false;\n endif;\n \n /**\n * Prüfen ob die Controllerklasse existiert.\n */\n if(class_exists($controller_name) === false):\n \\dcms\\Log::write(\"Controller class $controller_name could not be found!\", null, 3);\n return false;\n endif;\n \n \\dcms\\Log::write(\"Creating instance of controller class $controller_name ...\", null, 1);\n \\dcms\\Hooks::call('pre_controller');\n \n $this->controller_instance = new $controller_name($view);\n $this->controller_name = $controller;\n \n \\dcms\\Core::track_file($this->controller_path.'/'.$controller.'.php', 'controller');\n return true;\n }", "title": "" }, { "docid": "cf7fa3507de0499972cf20af64eaf5d5", "score": "0.58087456", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Yatzy();\n $this->assertInstanceOf(\"\\Ampheris\\ampController\\Yatzy\", $controller);\n }", "title": "" }, { "docid": "4ec2afc4175f52d90db01a3e9f5003fb", "score": "0.580254", "text": "public function setControllerAndMethod()\n {\n $controllerFile = $_SERVER['DOCUMENT_ROOT'].'/'.$this->controllerPath.ucfirst(self::$route[1]).'Controller.php';\n\n if (file_exists($controllerFile)) {\n $this->controllerClass = $this->controllerNamespace.self::decodeUrlPath(self::$route[1], 'upper').'Controller';\n $this->method = isset(self::$route[2]) ? self::decodeUrlPath(self::$route[2]).'Action' : $this->method;\n } else {\n $this->method = self::$route[1] != '' ? self::decodeUrlPath(self::$route[1]).'Action' : $this->method;\n }\n $this->controller = new $this->controllerClass();\n\n $this->checkMethod();\n }", "title": "" }, { "docid": "3659dc52d1828c2438b8d77bcc96904f", "score": "0.58015656", "text": "public function create()\n {\n return $this->createForModuleAndAction(null, null, false);\n }", "title": "" }, { "docid": "c040ba9c4267b78175052e5c589726a1", "score": "0.57975936", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Dice();\n $this->assertInstanceOf(\"\\App\\Dice\\Dice\", $controller);\n }", "title": "" }, { "docid": "58750134ca76b751fcbf21a80696ff7c", "score": "0.57950884", "text": "function __construct() {\n\n parent::Controller();\n\n }", "title": "" }, { "docid": "5404dfc85e5adc922cf24c054703a005", "score": "0.57920384", "text": "public static function getController()\n {\n return self::$instance;\n }", "title": "" }, { "docid": "3595b93ce9b813609015b108d6181477", "score": "0.5789918", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\Mos\\Controller\\Game21\", $controller);\n }", "title": "" }, { "docid": "3595b93ce9b813609015b108d6181477", "score": "0.5789918", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\Mos\\Controller\\Game21\", $controller);\n }", "title": "" }, { "docid": "6ed8193a6ecdf51257c1bf2cac296fcf", "score": "0.5787728", "text": "protected function controller(array $data)\n {\n if (isset($data[self::ID])) {\n $controller = ResourceUpdateController::class;\n } else {\n $controller = ResourceStoreController::class;\n }\n\n return new $controller;\n }", "title": "" }, { "docid": "8e0363355a2babc7657af4b9b5e80809", "score": "0.57852805", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\\\neskoc\\Controller\\Game21\", $controller);\n }", "title": "" }, { "docid": "9078992e89b7bb474dff25ce94989df2", "score": "0.5781253", "text": "public static function create () {}", "title": "" }, { "docid": "a8b98ba1f19490f5f4a30fe1d8a1c43e", "score": "0.5776286", "text": "private function setController() {\n\t\t$file_folder = 'application/' . $this->controllerPath . $this->_url[0] . '.php';\n\n\t\t// Verifica se o arquivo existe\n\t\tif (file_exists($file_folder)) {\n\t\t\t// Requer o arquivo\n\t\t\trequire_once $file_folder;\n\t\t\t// Instância o controlador passado na url\n\t\t\t$this->_controller = new $this->_url[0];\n\n\t\t\t// Faz a chamada do modelLoad, passa como controlador e chama o \"models/ pasta\"\n\t\t\t$this->_controller->modelLoad($this->_url[0], $this->modelPath);\n\t\t} else {\n\t\t\t// Caso não exista chama o método de erro\n\t\t\t$this->error();\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1705fe9395287df348375b4243a50e81", "score": "0.5772599", "text": "public function create()\n {\n //TODO\n }", "title": "" }, { "docid": "1705fe9395287df348375b4243a50e81", "score": "0.5772599", "text": "public function create()\n {\n //TODO\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5770189", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5770189", "text": "public function create(){}", "title": "" } ]
5285a8acad5df8494b37dfdfce5d611b
Register the application services.
[ { "docid": "da4db02d00021ab37bb38e5ef5b756c5", "score": "0.0", "text": "public function register()\n {\n\n }", "title": "" } ]
[ { "docid": "44600508cffb5884be0d7e50b7ec91ee", "score": "0.8183838", "text": "public function register()\n {\n // Register services\n }", "title": "" }, { "docid": "bf07a6ccbc1940e2be8abff91e94a2f6", "score": "0.72834975", "text": "public function register()\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "ef0b9ac205be2f2e9ea9b7b078c6f737", "score": "0.71869415", "text": "public function register()\n {\n $this->registerRepositories();\n $this->registerServices();\n }", "title": "" }, { "docid": "592eb301e02de2377355da70b41bfd00", "score": "0.7020435", "text": "public function register()\n {\n $this->registerConfig();\n\n $this->registerRobotsService();\n }", "title": "" }, { "docid": "1b2e5072ce30a18a5f6802a2ad17a8c9", "score": "0.6983719", "text": "public function register()\n {\n $this->registerHelpers();\n\n $this->registerServices();\n }", "title": "" }, { "docid": "1115ad610dce5528ca42d8d10fda7d68", "score": "0.6976395", "text": "public function register()\n\t{\n $this->registerShippingService();\n $this->registerProductService();\n $this->registerOrderService();\n $this->registerAttributeService();\n $this->registerCouponService();\n $this->registerPaymentService();\n $this->registerCartService();\n $this->registerCategorieService();\n\n $this->registerOrderWorkerService();\n $this->registerOrderAdminWorkerService();\n $this->registerCartWorkerService();\n $this->registerPdfGeneratorService();\n\n\t}", "title": "" }, { "docid": "551197ae6f5ea973a8c779ff8a7caee3", "score": "0.69658834", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/api.php', 'api');\n\n $this->registerClient();\n\n $this->registerToken();\n\n if ($this->app->runningInConsole()) {\n $this->registerForConsole();\n }\n }", "title": "" }, { "docid": "b26286ad44071d36120fd89e28935199", "score": "0.6944496", "text": "public function register()\n {\n $this->registerAliases();\n $this->registerServices();\n }", "title": "" }, { "docid": "01fa28c3763e27ac5e6f62b3f6d87d29", "score": "0.69387877", "text": "public function register()\n {\n $this->registerRepositories();\n\n $this->registerFacade();\n }", "title": "" }, { "docid": "c9bc6cfd69a60feee0745325044d378e", "score": "0.69191223", "text": "public function register()\n {\n $this->registerRepositories();\n }", "title": "" }, { "docid": "c9bc6cfd69a60feee0745325044d378e", "score": "0.69191223", "text": "public function register()\n {\n $this->registerRepositories();\n }", "title": "" }, { "docid": "c9bc6cfd69a60feee0745325044d378e", "score": "0.69191223", "text": "public function register()\n {\n $this->registerRepositories();\n }", "title": "" }, { "docid": "f4bce7ab24b860b65455405e7af802e6", "score": "0.6861503", "text": "public function register(): void\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "fb4771ba97ec6ccae97c614cc9086a5f", "score": "0.6858223", "text": "public function register()\n {\n $this->app->bind(AirportService::class, function($app){\n return new AirportService();\n });\n }", "title": "" }, { "docid": "3c3676c5df29e0ff87db6040a5444c45", "score": "0.68580025", "text": "public function register()\n {\n /*\n |--------------------------------------------------------------------------\n | Routes and controllers\n |--------------------------------------------------------------------------\n */\n include __DIR__.'/routes/web.php';\n include __DIR__.'/routes/api.php';\n //$this->app->make('Uistacks\\Media\\Controllers\\MediaApiController');\n //$this->app->make('Uistacks\\Media\\Controllers\\MediaController');\n }", "title": "" }, { "docid": "3fa99234b62dcaa2ec76f1c09e058553", "score": "0.68526894", "text": "public function register()\n {\n /*\n * Register the service provider for the dependency.\n */\n\n $this->mapRoutes();\n\n $this->app->bind('shopy', function(){\n return new \\bachphuc\\Shopy\\Shopy(new Version());\n });\n\n $this->app->bind('shopy_product', '\\bachphuc\\Shopy\\Models\\Product');\n $this->app->bind('shopy_category', '\\bachphuc\\Shopy\\Models\\Category');\n $this->app->bind('shopy_product_variant', '\\bachphuc\\Shopy\\Models\\ProductVariant');\n\n LaravelTheme::registerFacade('shopy');\n }", "title": "" }, { "docid": "8a1e4bb6112547767b22858eb65ab245", "score": "0.6841975", "text": "public function register()\n {\n App::register(\\Laravel\\Passport\\PassportServiceProvider::class);\n App::register(\\Spatie\\Fractal\\FractalServiceProvider::class);\n App::register(\\Phaza\\LaravelPostgis\\DatabaseServiceProvider::class);\n }", "title": "" }, { "docid": "4a976ed963f51402d06d19ba929730cb", "score": "0.6837743", "text": "public function register()\n\t{\n\t\t$this->registerFilters();\n\t\t$this->registerEdiServices();\n\t}", "title": "" }, { "docid": "950f2cb1de35ed613b0eb28026d17d8e", "score": "0.6815055", "text": "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\IEmployee',\n 'App\\Repositories\\EmployeeRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\IReport',\n 'App\\Repositories\\ReportRepository'\n );\n\n }", "title": "" }, { "docid": "60e094b0197c19689ffa06f72447a587", "score": "0.68082476", "text": "public function register()\n {\n $this->registerRbacRepository();\n }", "title": "" }, { "docid": "cf0d94a7336add53ca6ccd28d7a3c26b", "score": "0.67978495", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'azure-face');\n $this->mergeConfigFrom(__DIR__ . '/config/speech.php', 'azure-speech');\n\n $this->app->singleton('niraj-shah.laravel-azure-face-api', function ($app) {\n return new AzureFaceClient(\n $app['config']->get('azure-face.api_key'),\n $app['config']->get('azure-face.endpoint')\n );\n });\n\n $this->app->singleton('niraj-shah.laravel-azure-speech-api', function ($app) {\n return new AzureSpeechClient(\n $app['config']->get('azure-speech.api_key'),\n $app['config']->get('azure-speech.region')\n );\n });\n }", "title": "" }, { "docid": "cbb2999ad336c6a33d64033f4b1159e9", "score": "0.67972136", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/laravel-tokens.php',\n 'laravel-tokens'\n );\n\n $this->registerGuard();\n }", "title": "" }, { "docid": "f109376556aa2a742223de73cb1ee59a", "score": "0.67952365", "text": "public function register()\n {\n $this->app->bind(\n 'Delivery\\Repositories\\CategoriaRepository',\n 'Delivery\\Repositories\\CategoriaRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Delivery\\Repositories\\ClienteRepository',\n 'Delivery\\Repositories\\CategoriaRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Delivery\\Repositories\\PedidoRepository',\n 'Delivery\\Repositories\\PedidoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Delivery\\Repositories\\PedidoItemRepository',\n 'Delivery\\Repositories\\PedidoItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Delivery\\Repositories\\ProdutoRepository',\n 'Delivery\\Repositories\\ProdutoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Delivery\\Repositories\\UserRepository',\n 'Delivery\\Repositories\\UserRepositoryEloquent'\n );\n }", "title": "" }, { "docid": "0a682d3867929a4205026f398dfee61b", "score": "0.67941636", "text": "public function register()\n {\n $this->registerCommandTranslator();\n\n $this->registerCommandBus();\n\n $this->registerArtisanCommand();\n }", "title": "" }, { "docid": "f1d3003fb4c4c35569613f096af9b5f3", "score": "0.6789987", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\AppUserRepository',\n 'App\\Services\\AppUserService'\n );\n\n $this->app->bind(\n 'App\\Repositories\\RewardRepository',\n 'App\\Services\\RewardService'\n );\n }", "title": "" }, { "docid": "941bc6c89b73a310cfa672d4851965d7", "score": "0.6788014", "text": "public function register()\n {\n $this->registerShiftReportService();\n }", "title": "" }, { "docid": "7174aea5efd58eee3f4a9270e819ddd7", "score": "0.67847663", "text": "public function register()\n {\n $this->registerServiceProviders();\n $this->registerAliases();\n }", "title": "" }, { "docid": "6821631afc07a35e4ad1d1bfdd068f5a", "score": "0.6778342", "text": "public function register()\n {\n $this->app->bind(\\Softage\\Repositories\\UserRepository::class, \\Softage\\Repositories\\UserRepositoryEloquent::class );\n $this->app->bind(\\Softage\\Repositories\\RoleRepository::class, \\Softage\\Repositories\\RoleRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\PermissionRepository::class, \\Softage\\Repositories\\PermissionRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\AreasRepository::class, \\Softage\\Repositories\\AreasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ParametrosRepository::class, \\Softage\\Repositories\\ParametrosRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\CampeonatosRepository::class, \\Softage\\Repositories\\CampeonatosRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\EstornoVendedorRepository::class, \\Softage\\Repositories\\EstornoVendedorRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\StatusRepository::class, \\Softage\\Repositories\\StatusRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\TimesRepository::class, \\Softage\\Repositories\\TimesRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\TemposRepository::class, \\Softage\\Repositories\\TemposRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\StatusVendasRepository::class, \\Softage\\Repositories\\StatusVendasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\TipoApostasRepository::class, \\Softage\\Repositories\\TipoApostasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\TipoCotacaoRepository::class, \\Softage\\Repositories\\TipoCotacaoRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\PremiacoesRepository::class, \\Softage\\Repositories\\PremiacoesRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\VendedorRepository::class, \\Softage\\Repositories\\VendedorRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ConfVendasRepository::class, \\Softage\\Repositories\\ConfVendasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\PartidasRepository::class, \\Softage\\Repositories\\PartidasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ModalidadesRepository::class, \\Softage\\Repositories\\ModalidadesRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\CotacoesRepository::class, \\Softage\\Repositories\\CotacoesRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ApostasRepository::class, \\Softage\\Repositories\\ApostasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\GolsRepository::class, \\Softage\\Repositories\\GolsRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ArrecadadorRepository::class, \\Softage\\Repositories\\ArrecadadorRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ArrecadacoesRepository::class, \\Softage\\Repositories\\ArrecadacoesRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\TimesAltaRepository::class, \\Softage\\Repositories\\TimesAltaRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\VendasRepository::class, \\Softage\\Repositories\\VendasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ChipesRepository::class, \\Softage\\Repositories\\ChipesRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\ImpressorasRepository::class, \\Softage\\Repositories\\ImpressorasRepositoryEloquent::class);\n $this->app->bind(\\Softage\\Repositories\\TabletsRepository::class, \\Softage\\Repositories\\TabletsRepositoryEloquent::class);\n //:end-bindings:\n }", "title": "" }, { "docid": "516edf480375adff2d4504a8b836f472", "score": "0.67757", "text": "public function register()\n {\n Carbon::setLocale(config('app.locale'));\n setlocale(LC_TIME, \"de_DE\");\n if ($this->app->environment() == 'local') {\n $this->app->register('Appzcoder\\CrudGenerator\\CrudGeneratorServiceProvider');\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n $this->app->bind('App\\Repositories\\Competition\\CompetitionRepositoryInterface', 'App\\Repositories\\Competition\\CompetitionRepository');\n $this->app->bind('App\\Repositories\\Record\\RecordRepositoryInterface', 'App\\Repositories\\Record\\RecordRepository');\n $this->app->bind('App\\Repositories\\Address\\AddressRepositoryInterface', 'App\\Repositories\\Address\\AddressRepository');\n $this->app->bind('App\\Repositories\\Page\\PageRepositoryInterface', 'App\\Repositories\\Page\\PageRepository');\n $this->app->bind('App\\Repositories\\Ageclass\\AgeclassRepositoryInterface', 'App\\Repositories\\Ageclass\\AgeclassRepository');\n $this->app->bind('App\\Repositories\\Participator\\ParticipatorRepositoryInterface', 'App\\Repositories\\Participator\\ParticipatorRepository');\n $this->app->bind('App\\Repositories\\Additional\\AdditionalRepositoryInterface', 'App\\Repositories\\Additional\\AdditionalRepository');\n $this->app->bind('App\\Repositories\\Organizer\\OrganizerRepositoryInterface', 'App\\Repositories\\Organizer\\OrganizerRepository');\n $this->app->bind('App\\Repositories\\Announciator\\AnnounciatorRepositoryInterface', 'App\\Repositories\\Announciator\\AnnounciatorRepository');\n $this->app->bind('App\\Repositories\\HashLogin\\HashLoginRepositoryInterface', 'App\\Repositories\\HashLogin\\HashLoginRepository');\n $this->app->bind('CompetitionService', CompetitionService::class);\n $this->app->bind('AnnounciatorService', AnnounciatorService::class);\n $this->app->bind('ParticipatorService', ParticipatorService::class);\n $this->app->bind('PageService', PageService::class);\n $this->app->bind('AgeclassService', AgeclassService::class);\n $this->app->bind('DisciplineService', DisciplineService::class);\n $this->app->bind('HtmlTagCleaner', HtmlTagCleaner::class);\n $this->app->bind('TimetableParser', HtmlTagCleaner::class);\n $this->app->alias('bugsnag.logger', \\Illuminate\\Contracts\\Logging\\Log::class);\n $this->app->alias('bugsnag.logger', LoggerInterface::class);\n\n }", "title": "" }, { "docid": "c0167f8f2c87044e7ca7102714ad5eaf", "score": "0.6772654", "text": "public function register(){\n $this->mergeConfigFrom(__DIR__ . '/config.php', 'laravision');\n /* load views */\n $this->loadViewsFrom(__DIR__ . '/views', 'Laravision-visiteur');\n\n /* publishe migrations files */\n $this->publishes([__DIR__ . '/database/migrations/' => base_path('database/migrations')]); \n \n\n $this->app->singleton('Lvisiteur', function ($app) {\n return new Visiteur();\n });\n\n }", "title": "" }, { "docid": "538366ccad95d93abd2b5b2f31d81b8e", "score": "0.6772173", "text": "public function register()\n {\n include __DIR__.'/routes.php';\n $this->app->make('LIBRESSLtd\\LBMessenger\\Controllers\\LBM_conversationController');\n $this->app->make('LIBRESSLtd\\LBMessenger\\Controllers\\LBM_conversationItemController');\n $this->app->make('LIBRESSLtd\\LBMessenger\\Controllers\\Ajax\\LBM_conversationController');\n $this->app->make('LIBRESSLtd\\LBMessenger\\Controllers\\Ajax\\LBM_conversationItemController');\n }", "title": "" }, { "docid": "e03efcdc019921d1314f5726f79a6e09", "score": "0.67713016", "text": "public function register()\n {\n $this->app->bind(\\App\\Domains\\Contracts\\Repositories\\ParametroEmpresaRepository::class, \\App\\Repositories\\ParametroEmpresaRepositoryEloquent::class);\n $this->app->bind(\\App\\Domains\\Contracts\\Repositories\\EmpresaConfiguracaoRepository::class, \\App\\Repositories\\EmpresaConfiguracaoRepositoryEloquent::class);\n $this->app->bind(\\App\\Domains\\Contracts\\Repositories\\MenuRepository::class, \\App\\Repositories\\MenuRepositoryEloquent::class);\n $this->app->bind(\\App\\Domains\\Contracts\\Repositories\\EmpresaRepository::class, \\App\\Repositories\\EmpresaRepositoryEloquent::class);\n //:end-bindings:\n }", "title": "" }, { "docid": "1825737f76fab56816f2f473777223cd", "score": "0.6769034", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/passwordHistory.php', 'password-history');\n }", "title": "" }, { "docid": "3ad80471d079f34b7491d69ac7327225", "score": "0.67684233", "text": "public function register()\n {\n /*\n * Register the service provider for the dependency.\n */\n $this->app->register('Maatwebsite\\Excel\\ExcelServiceProvider');\n /*\n * Create aliases for the dependency.\n */\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Excel', 'Maatwebsite\\Excel\\Facades\\Excel'); \n \n }", "title": "" }, { "docid": "3ad80471d079f34b7491d69ac7327225", "score": "0.67684233", "text": "public function register()\n {\n /*\n * Register the service provider for the dependency.\n */\n $this->app->register('Maatwebsite\\Excel\\ExcelServiceProvider');\n /*\n * Create aliases for the dependency.\n */\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Excel', 'Maatwebsite\\Excel\\Facades\\Excel'); \n \n }", "title": "" }, { "docid": "a6f3f6c2fc5ea3e3a46f92dfcd01ff5f", "score": "0.6757838", "text": "public function register()\n {\n //Register the service providers\n $this->registerServiceProviders();\n\n //Register the commands for the starter api starter\n $this->registerCommands();\n\n //Generate the jwt secret key\n $this->registerHelpers();\n }", "title": "" }, { "docid": "5e0e0c04ec051732ad6ecc208e1a4023", "score": "0.67509866", "text": "public function register()\n {\n $this->app->bind(\n \\Verdade\\Repositories\\UserRepository::class,\n \\Verdade\\Repositories\\UserRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\Verdade\\Repositories\\CursoRepository::class,\n \\Verdade\\Repositories\\CursoRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\Verdade\\Repositories\\DisciplinaRepository::class,\n \\Verdade\\Repositories\\DisciplinaRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\Verdade\\Repositories\\ProvaRepository::class,\n \\Verdade\\Repositories\\ProvaRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\Verdade\\Repositories\\QuestaoRepository::class,\n \\Verdade\\Repositories\\QuestaoRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\Verdade\\Repositories\\OpcaoRepository::class,\n \\Verdade\\Repositories\\OpcaoRepositoryEloquent::class\n );\n }", "title": "" }, { "docid": "7646e21005877772e3ce623800567c40", "score": "0.6748954", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/config/application.php', 'application'\n );\n// $this->app->register(RouteServiceProvider::class, false);\n $this->app->register(AuthServiceProvider::class, false);\n }", "title": "" }, { "docid": "d66c149d18667ed229165b8d552bf441", "score": "0.67453265", "text": "public function register()\n {\n //\n $this->app->bind(\n \\CodeProject\\Repositories\\Cadastros\\ClientRepository::class, \n \\CodeProject\\Repositories\\Cadastros\\ClientRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeProject\\Repositories\\Cadastros\\ProjectRepository::class,\n \\CodeProject\\Repositories\\Cadastros\\ProjectRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeProject\\Repositories\\Cadastros\\ProjectNoteRepository::class,\n \\CodeProject\\Repositories\\Cadastros\\ProjectNoteRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeProject\\Repositories\\Cadastros\\ProjectTaskRepository::class,\n \\CodeProject\\Repositories\\Cadastros\\ProjectTaskRepositoryEloquent::class\n );\n\n\n $this->app->bind(\n \\CodeProject\\Repositories\\Cadastros\\UserRepository::class,\n \\CodeProject\\Repositories\\Cadastros\\UserRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeProject\\Repositories\\Cadastros\\ProjectFileRepository::class,\n \\CodeProject\\Repositories\\Cadastros\\ProjectFileRepositoryEloquent::class\n );\n }", "title": "" }, { "docid": "0e2412c708b5ed24229442df9bbbb04f", "score": "0.67452407", "text": "public function register()\n {\n $this->registerLogger();\n $this->registerAppBenchmarkFormatter();\n $this->registerLogContextFormatter();\n }", "title": "" }, { "docid": "6517820d9c78612a420151f4954fbcef", "score": "0.6744753", "text": "public function register()\n {\n include __DIR__.'/routes.php';\n $this->app->make('Novatree\\ModelViewUi\\controller\\UiController');\n }", "title": "" }, { "docid": "7df24c7de50c7a4e2ceee3832bd05274", "score": "0.67437404", "text": "public function register() {\n //$this->mapApiRoutes();\n $this->mapWebRoutes();\n $this->registerViewPath();\n $this->registerPermissions();\n //\n }", "title": "" }, { "docid": "bbbacb051e3d12515f8a3fb64e407121", "score": "0.6741203", "text": "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->registerLogViewerFacade();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "title": "" }, { "docid": "e509f777d6ad39b4696b2f8916018f69", "score": "0.6740911", "text": "public function register()\n {\n $this->registerInertia();\n\n $this->registerPaginator();\n }", "title": "" }, { "docid": "12b7cdb0f9445e50a0907d2ad0dddc49", "score": "0.67384994", "text": "public function register()\n {\n /**\n * Acá aplicamos el principio de Inversion de dependencias\n *\n * Comunicamos el servicio [UserRepository] y el controlador por medio\n * de la interface [UserInterface]\n */\n $this->app->bind(\n 'App\\UseCase\\UserInterface',\n 'App\\Repositories\\UserRepository'\n );\n\n $this->app->bind(\n 'App\\UseCase\\VehicleInterface',\n 'App\\Repositories\\VehicleRepository'\n );\n\n $this->app->bind(\n 'App\\UseCase\\RentInterface',\n 'App\\Repositories\\RentRepository'\n );\n }", "title": "" }, { "docid": "5a1a386220d8029ef0cc6e1e8511a664", "score": "0.6734829", "text": "public function register()\n {\n $this->app->bind(LaravelODataServiceContract::class, OdataService::class);\n\n $this->mergeConfigFrom(__DIR__ . '/../../config/laravel-odata.php', 'laravel-odata');\n }", "title": "" }, { "docid": "8015a54f9c4748b822ac7d7e68544e7d", "score": "0.6734688", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/config/robots.php', 'length'\n );\n\n $this->app->singleton('robots', function () {\n return new Robots;\n });\n }", "title": "" }, { "docid": "6c2e2dd473a59ed62716de1bb574856e", "score": "0.67332274", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerSanitizer();\n }", "title": "" }, { "docid": "4e24cfd45c1b6a3b3d48aedc8e7b287c", "score": "0.6732749", "text": "public function register()\n {\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\Repositories\\CategoriesRepository', 'Milax\\Mconsole\\Commerce\\Repositories\\CategoriesRepository');\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\Repositories\\DeliveryTypesRepository', 'Milax\\Mconsole\\Commerce\\Repositories\\DeliveryTypesRepository');\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\Repositories\\DiscountsRepository', 'Milax\\Mconsole\\Commerce\\Repositories\\DiscountsRepository');\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\Repositories\\ProductsRepository', 'Milax\\Mconsole\\Commerce\\Repositories\\ProductsRepository');\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\Repositories\\OrdersRepository', 'Milax\\Mconsole\\Commerce\\Repositories\\OrdersRepository');\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\Repositories\\PaymentMethodsRepository', 'Milax\\Mconsole\\Commerce\\Repositories\\PaymentMethodsRepository');\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\Repositories\\PromocodesRepository', 'Milax\\Mconsole\\Commerce\\Repositories\\PromocodesRepository');\n $this->app->bind('Milax\\Mconsole\\Commerce\\Contracts\\OrderProcessor', 'Milax\\Mconsole\\Commerce\\OrderProcessor');\n }", "title": "" }, { "docid": "56221c09c1badba10712516663497c09", "score": "0.67285836", "text": "public function register()\n {\n // include __DIR__ . '/Routes/routes.php';\n // $this->app->make('Fhferreira\\Tags\\Controllers\\TagsController');\n\n include __DIR__ . '/Routes/routes.php';\n\n // $this->app->make('App\\Http\\Controllers\\Controle\\BannerController');\n\n }", "title": "" }, { "docid": "5cd97dc1ff66fad5d0aadbc63b663582", "score": "0.6726446", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\ReservationRepositoryInterface', \n 'App\\Repositories\\ReservationRepository'\n ); \n\n $this->app->bind(\n 'App\\Repositories\\VolRepositoryInterface', \n 'App\\Repositories\\VolRepository',\n );\n $this->app->bind(\n 'App\\Repositories\\AeroportRepositoryInterface', \n 'App\\Repositories\\AeroportRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\EscaleRepositoryInterface', \n 'App\\Repositories\\EscaleRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ClientRepositoryInterface', \n 'App\\Repositories\\ClientRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\PassagerRepositoryInterface', \n 'App\\Repositories\\PassagerRepository'\n );\n //\n }", "title": "" }, { "docid": "da881efa902d05cb434cc5694531d59d", "score": "0.6725944", "text": "public function register()\n {\n $this->app->make('Furic\\HouseAds\\Http\\Controllers\\HouseAdController');\n // $this->mergeConfigFrom(\n // __DIR__ . '/../config/house-ads.php', 'house-ads'\n // );\n }", "title": "" }, { "docid": "37dbf51930383739c3ccdf8940e2bbb6", "score": "0.6718877", "text": "public function register()\n {\n\n $this->app->bind('restclient', function($app)\n {\n return new RestClient();\n });\n\n\n\n }", "title": "" }, { "docid": "c82a7f7fccd0c57b901b862681b91d25", "score": "0.67183954", "text": "public function register()\n {\n $this->registerLogger();\n\n $this->registerRollbar();\n }", "title": "" }, { "docid": "c6cd32f9c1116dc508c2b4f4384734b5", "score": "0.6716793", "text": "public function register()\n {\n $this->registerCommands();\n $this->registerServiceProviders();\n }", "title": "" }, { "docid": "d787e86983c7c7a2784f303c56fc1b3f", "score": "0.6716757", "text": "public function register()\n {\n $this->registerGlide();\n $this->registerLengthAwarePaginator();\n $this->registerInertia();\n }", "title": "" }, { "docid": "31fb3f3ef707fa400000d56734d0b471", "score": "0.6715755", "text": "public function register()\n {\n $this->registerRouteModelBindings();\n\n $this->registerDriverConfiguration();\n\n $this->registerRoutes();\n\n $this->registerDriverRepository();\n\n $this->registerAuthManager();\n\n $this->registerPasswordBroker();\n\n $this->registerEvents();\n\n// $this->registerMiddleWare();\n }", "title": "" }, { "docid": "2a52682ee9ac8846531d29f2afaf2699", "score": "0.6714478", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../../config/tusupload.php', 'tusupload'\n );\n\n $this->app->bind(AuthenticationResolverContract::class, AuthenticationResolver::class);\n $this->app->singleton(AuthenticationResolver::class, function($app){\n return new AuthenticationResolver(\n $app->make(Gate::class), \n Auth::createUserProvider(config('auth.guards.api.provider')));\n });\n }", "title": "" }, { "docid": "5e59cd37f090a1fac36dd5c8f72262ea", "score": "0.6710228", "text": "public function register()\n {\n $this->app->singleton(VerificadorRolUsuario::class);\n }", "title": "" }, { "docid": "fa3e0c786e4123ed387f71de49fbb42c", "score": "0.6707592", "text": "public function register()\n {\n // $this->mergeConfigFrom(\n // __DIR__.'/config/hossapp.php', 'hossapp'\n // );\n }", "title": "" }, { "docid": "1cd517afd8ede4a0ca15c6936a7df4be", "score": "0.6707221", "text": "public function register()\n {\n $this->app->singleton('alidayu', function () {\n return new Alidayu();\n });\n\n $this->mergeConfigFrom(\n __DIR__.'/config/alidayu.php', 'alidayu'\n );\n }", "title": "" }, { "docid": "520969ec99bcaebeaf38391260140dbb", "score": "0.6706522", "text": "public function register()\n {\n $this->app->bind(\n 'WebDelivery\\Repositories\\CategoriaRepository',\n 'WebDelivery\\Repositories\\CategoriaRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\ClienteRepository',\n 'WebDelivery\\Repositories\\ClienteRepositoryEloquent'\n );\n \n $this->app->bind(\n 'WebDelivery\\Repositories\\ComponenteRepository',\n 'WebDelivery\\Repositories\\ComponenteRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\EmpresaRepository',\n 'WebDelivery\\Repositories\\EmpresaRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\PedidoRepository',\n 'WebDelivery\\Repositories\\PedidoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\PedidoItemRepository',\n 'WebDelivery\\Repositories\\PedidoItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\ProdutoRepository',\n 'WebDelivery\\Repositories\\ProdutoRepositoryEloquent'\n );\n \n $this->app->bind(\n 'WebDelivery\\Repositories\\ProdutoItemRepository',\n 'WebDelivery\\Repositories\\ProdutoItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\ProdutoItemPedidoRepository',\n 'WebDelivery\\Repositories\\ProdutoItemPedidoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\TamanhoRepository',\n 'WebDelivery\\Repositories\\TamanhoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\UserRepository',\n 'WebDelivery\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'WebDelivery\\Repositories\\CupomRepository',\n 'WebDelivery\\Repositories\\CupomRepositoryEloquent'\n );\n\n }", "title": "" }, { "docid": "fb10db0636823bad6187387e8eff45c0", "score": "0.6691934", "text": "public function register()\n {\n\n $interfacePath = 'App\\ShareMeshi\\Repositories';\n $repoPath = 'App\\ShareMeshi\\Repositories';\n\n $repositories = [\n\n 'User',\n\n ];\n\n foreach($repositories as $repo){\n\n $interface = $interfacePath.'\\\\'.$repo.'Interface';\n $repository = $repoPath.'\\\\'.$repo.'Repository';\n\n $this->app->bind($interface, $repository);\n }\n\n }", "title": "" }, { "docid": "040a1491ea019a6115bc7b56b8828a6f", "score": "0.6686389", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'vapor-queue-manager');\n\n $this->app->singleton('vapor-queue-manager', function () {\n return new VaporQueueManager;\n });\n }", "title": "" }, { "docid": "3c250f5e08b1921877218fbfba22e9b0", "score": "0.6686309", "text": "public function register()\n {\n $this->app->make('mxm\\sso\\controllers\\SSOController');\n \n $this->mergeConfigFrom(__DIR__.'/config/sso.php', 'sso');\n }", "title": "" }, { "docid": "93588a3d3a6fd8c3771e4729ccc53f1e", "score": "0.66858655", "text": "public function register()\n {\n $this->app->singleton('mxusearch', function () {\n return new MxusearchService();\n });\n }", "title": "" }, { "docid": "cc62c59d2fd05d85cc2cd2cf07302acf", "score": "0.6685192", "text": "public function register()\n {\n parent::register();\n\n $this->app->register(\\MikesLumenRepository\\Providers\\ValidatorServiceProvider::class);\n }", "title": "" }, { "docid": "1dcf2072d06cc924af9a3f83dd6e82ff", "score": "0.6684832", "text": "public function register()\n {\n\n $this->app->singleton('AdviserCateRepository', function($app){\n return new \\App\\Repositories\\admin\\AdviserCateRepository();\n });\n\n $this->app->singleton('ClassCateRepository', function($app){\n return new \\App\\Repositories\\admin\\ClassCateRepository();\n });\n\n $this->app->singleton('ClassArticleRepository', function($app){\n return new \\App\\Repositories\\admin\\ClassArticleRepository();\n });\n\n\n $this->app->singleton('AdviserArticleRepository', function($app){\n return new \\App\\Repositories\\admin\\AdviserArticleRepository();\n });\n\n $this->app->singleton('RecommendRepository', function($app){\n return new \\App\\Repositories\\admin\\RecommendRepository();\n });\n\n\n\n\n\n $this->app->singleton('VerifyCodeRepository', function($app){\n return new \\App\\Repositories\\api\\VerifyCodeRepository();\n\n });\n\n\n\n\n\n\n }", "title": "" }, { "docid": "e8e1ef25d6f6f5326873101f67dd004c", "score": "0.6683566", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/zabbixgraph.php', 'zabbixgraph');\n\n $this->app->bind(ZabbixGraph::class, function () {\n return new ZabbixGraph(\n $this->app['config']['zabbixgraph.host'],\n $this->app['config']['zabbixgraph.username'],\n $this->app['config']['zabbixgraph.password'],\n $this->app['config']['zabbixgraph.old_version']\n );\n });\n }", "title": "" }, { "docid": "574a212b9247a6fee169bc7f2f494dba", "score": "0.6681531", "text": "public function register()\n\t{\n\t\t$this->registerAccountRepository();\n\t\t$this->registerMailer();\n\t\t$this->registerCaracal();\n\t}", "title": "" }, { "docid": "6f68e4d31f2378432b6cd773581a4803", "score": "0.66750646", "text": "public function register()\n {\n $this->registerServiceProviders();\n $this->registerPreferencesService();\n $this->registerHelpers();\n }", "title": "" }, { "docid": "35986e23965d7a82f96da4ec47caa64c", "score": "0.66720116", "text": "public function register()\n {\n $this->app->bind('characterService', 'App\\Service\\CharacterService');\n }", "title": "" }, { "docid": "446ee0a791d48220fd126050510d4e7d", "score": "0.6663459", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'listing-ip-address');\n\n // Register the main class to use with the facade\n /*$this->app->singleton('listing-ip-address', function () {\n return new ListingIPAddress;\n });*/\n }", "title": "" }, { "docid": "216db4a2b351bac07d04bff1c960cfcb", "score": "0.6659545", "text": "public function register()\r\n {\r\n if ($this->app->runningInConsole()) \r\n {\r\n $this->registerRepository();\r\n $this->registerMakeEntityCommand();\r\n\r\n // $this->mergeConfigFrom(\r\n // __DIR__.'/../config/entity.php', 'entity'); \r\n }\r\n }", "title": "" }, { "docid": "6844d672de52f77c359b96c1af7f670a", "score": "0.6658597", "text": "public function register()\n {\n $this->app->bind(\n \\CodeDelivery\\Repositories\\CategoryRepository::class,\n \\CodeDelivery\\Repositories\\CategoryRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeDelivery\\Repositories\\ClientRepository::class,\n \\CodeDelivery\\Repositories\\ClientRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeDelivery\\Repositories\\OrderItemRepository::class,\n \\CodeDelivery\\Repositories\\OrderItemRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeDelivery\\Repositories\\OrderRepository::class,\n \\CodeDelivery\\Repositories\\OrderRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeDelivery\\Repositories\\ProductRepository::class,\n \\CodeDelivery\\Repositories\\ProductRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeDelivery\\Repositories\\UserRepository::class,\n \\CodeDelivery\\Repositories\\UserRepositoryEloquent::class\n );\n\n $this->app->bind(\n \\CodeDelivery\\Repositories\\CupomRepository::class,\n \\CodeDelivery\\Repositories\\CupomRepositoryEloquent::class\n );\n }", "title": "" }, { "docid": "7156baeeaa6ca010fc8567e76a394466", "score": "0.66585225", "text": "public function register()\n {\n // Bind admin services repository\n $this->app->bind(\n 'App\\Repositories\\Admin\\Services\\ServiceRepository',\n 'App\\Repositories\\Admin\\Services\\EloquentServiceRepository'\n );\n\n // Bind admin references repository\n $this->app->bind(\n 'App\\Repositories\\Admin\\References\\ReferenceRepository',\n 'App\\Repositories\\Admin\\References\\EloquentReferenceRepository'\n ); \n }", "title": "" }, { "docid": "c60c09c772b27cec4f82544eb46293bc", "score": "0.6657109", "text": "public function register()\n {\n $this->app->bind('SzentirasHu\\Data\\Repository\\BookRepository', 'SzentirasHu\\Data\\Repository\\BookRepositoryEloquent');\n $this->app->bind('SzentirasHu\\Data\\Repository\\TranslationRepository', 'SzentirasHu\\Data\\Repository\\TranslationRepositoryEloquent');\n $this->app->bind('SzentirasHu\\Data\\Repository\\VerseRepository', 'SzentirasHu\\Data\\Repository\\VerseRepositoryEloquent');\n $this->app->bind('SzentirasHu\\Data\\Repository\\SynonymRepository', 'SzentirasHu\\Data\\Repository\\SynonymRepositoryEloquent');\n\n }", "title": "" }, { "docid": "6537a4bf4474b9c603bdb8677a3f52f5", "score": "0.6656927", "text": "public function register()\n {\n if (! class_exists('Dinero')) {\n class_alias('App\\Dinero', 'Dinero');\n }\n\n $this->registerServices();\n }", "title": "" }, { "docid": "3dbb604d56dfe0297a9e971fbd6582e6", "score": "0.66567016", "text": "public function register()\n {\n $this->registerRoutes();\n $this->registerCommands();\n $this->registerViews();\n }", "title": "" }, { "docid": "a552c99fe97a38abfb840b266270f38a", "score": "0.6654543", "text": "public function register()\n {\n #$this->app->bind(\\CodeEduUser\\Repositories\\UserRepository::class, \\CodeEduUser\\Repositories\\UserRepositoryEloquent::class);\n #$this->app->bind(\\CodeEduBook\\Repositories\\CapituloRepository::class, \\CodeEduBook\\Repositories\\CapituloRepositoryEloquent::class);\n $this->app->bind(CategoriaRepository::class, CategoriaStoreRepositoryEloquent::class);\n $this->app->bind(ProdutoRepository::class, ProdutoStoreRepositoryEloquent::class);\n }", "title": "" }, { "docid": "7723a7e7bace4caaa3cbf69daa31f17a", "score": "0.6652925", "text": "public function register()\n {\n $this->app->bind(\n 'App\\\\Repositories\\\\Matches\\\\IMatchesRepository',\n 'App\\\\Repositories\\\\Matches\\\\MatchesRepository'\n );\n }", "title": "" }, { "docid": "305b3865d0a23789a60550ab88a872be", "score": "0.6652427", "text": "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n $this->registerMenuService();\n\n $this->registerReplyService();\n }", "title": "" }, { "docid": "3bc2715418127040bac9dbabb9378bf8", "score": "0.66513497", "text": "public function register()\n {\n if (! defined('ACACHASOCIALITE_PATH')) {\n define('ACACHASOCIALITE_PATH', realpath(__DIR__.'/../../'));\n }\n\n// $this->configureOAuthIdentitiesTable();\n\n $this->app->bind('AcachaSocialite', function () {\n return new \\Acacha\\Socialite\\AcachaSocialite();\n });\n }", "title": "" }, { "docid": "56b91f29dbc0e8a99acb9fd48b1d69c8", "score": "0.66509575", "text": "public function register()\n {\n $this->app->bind(\n \\LaccUser\\Repositories\\UserRepository::class,\n \\LaccUser\\Repositories\\UserRepositoryEloquent::class\n );\n $this->app->bind(\n \\LACC\\Repositories\\StateRepository::class,\n \\LACC\\Repositories\\StateRepositoryEloquent::class\n );\n $this->app->bind(\n \\LACC\\Repositories\\AddressRepository::class,\n \\LACC\\Repositories\\AddressRepositoryEloquent::class\n );\n $this->app->bind(\n \\LACC\\Repositories\\CityRepository::class,\n \\LACC\\Repositories\\CityRepositoryEloquent::class\n );\n $this->app->bind(\n \\LACC\\Repositories\\TelephoneUserRepository::class,\n \\LACC\\Repositories\\TelephoneUserRepositoryEloquent::class\n );\n }", "title": "" }, { "docid": "f5eb781dcb96bea949898d01b6f016d3", "score": "0.66506565", "text": "public function register()\n {\n $this->app->singleton(\n \\Illuminate\\Contracts\\Http\\Kernel::class,\n \\Qsoftvn\\ShoppingCart\\Http\\Kernel::class\n );\n\n $this->mergeConfigFrom(\n __DIR__ . '/config/qsoftvn/shopping.php', 'qsoftvn.shopping'\n );\n $this->map();\n\n }", "title": "" }, { "docid": "1102ee0a8b1aef7f8e2940eb9bea699b", "score": "0.66500187", "text": "public function register(): void {\n $this->mergeConfigFrom(__DIR__.'/../config/laravelmultiselect.php', 'laravelmultiselect');\n\n // Register the service the package provides.\n $this->app->singleton('laravelmultiselect', function ($app) {\n return new LaravelMultiSelect;\n });\n }", "title": "" }, { "docid": "a5d150b379888829bda1e219b986c952", "score": "0.6646821", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\Contracts\\IUserRepository',\n 'App\\Repositories\\UserRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Contracts\\IPatientRepository',\n 'App\\Repositories\\PatientRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Contracts\\IScheduleRepository',\n 'App\\Repositories\\ScheduleRepository'\n );\n }", "title": "" }, { "docid": "c01bfbaf6cbfe401d4a7a885a83f93f6", "score": "0.66467077", "text": "public function register()\r\n {\r\n $this->shareWithApp();\r\n $this->setPublishGroups();\r\n $this->registerAliases();\r\n $this->registerViews();\r\n $this->registerArtisanCommands();\r\n }", "title": "" }, { "docid": "7cfc762755b688636f2f7b97b9b2ca00", "score": "0.6646538", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../../../config/barcode.php', 'barcode',\n );\n\n $this->app->singleton('barcode', function ($app) {\n return new Manager($app);\n });\n }", "title": "" }, { "docid": "b3748642b33dad799dd7b4e535374e27", "score": "0.6646433", "text": "public function register()\n {\n $this->app->singleton('HttpClient',function($app){\n// return new \\GuzzleHttp\\Client([\n// 'base_uri' => config('services.micro.api_gateway'),\n// 'timeout' => config('services.micro.timeout'),\n// 'headers' =>[\n// 'Content-Type' => 'application/json'\n// ]\n// ]);\n return new GuzzleClient([\n 'base_uri' => config('services.micro.api_gateway'),\n 'timeout' => config('services.micro.timeout'),\n 'headers' =>[\n 'Content-Type' => 'application/json'\n ]\n ]);\n });\n $this->app->singleton('microUserService',function ($app){\n return new UserService();\n });\n }", "title": "" }, { "docid": "fb0d45472ba38ef537f3575b54e8da70", "score": "0.66454285", "text": "public function register()\n {\n\n\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\UserRepository',\n 'acessoSystem\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\ClientRepository',\n 'acessoSystem\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\SponsorRepository',\n 'acessoSystem\\Repositories\\SponsorRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\ProtocolRepository',\n 'acessoSystem\\Repositories\\ProtocolRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\ProtocolFileRepository',\n 'acessoSystem\\Repositories\\ProtocolFileRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\ProjectRepository',\n 'acessoSystem\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\DeliverableRepository',\n 'acessoSystem\\Repositories\\DeliverableRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\DeliverableFilesRepository',\n 'acessoSystem\\Repositories\\DeliverableFilesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\ContactRepository',\n 'acessoSystem\\Repositories\\ContactRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\AppealRepository',\n 'acessoSystem\\Repositories\\AppealRepositoryEloquent'\n );\n\n $this->app->bind(\n 'acessoSystem\\Repositories\\WarningRepository',\n 'acessoSystem\\Repositories\\WarningRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\RoleRepository',\n 'acessoSystem\\Repositories\\RoleRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\PermissionRepository',\n 'acessoSystem\\Repositories\\PermissionRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\EntryRepository',\n 'acessoSystem\\Repositories\\EntryRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\FreeRepository',\n 'acessoSystem\\Repositories\\FreeRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\BankingRepository',\n 'acessoSystem\\Repositories\\BankingRepositoryEloquent'\n );\n $this->app->bind(\n 'acessoSystem\\Repositories\\BradescoBankingsRepository',\n 'acessoSystem\\Repositories\\BradescoBankingsRepositoryEloquent'\n );\n }", "title": "" }, { "docid": "8b964c42e6738414876e20ae7e8b9e3f", "score": "0.6644385", "text": "public function register()\n {\n $this->app->singleton('datatables', function ($app) {\n return new DatatablesService($app->make(Request::class));\n });\n\n $this->app->singleton(DatatablesServiceInterface::class, function ($app) {\n return new DatatablesService($app->make(Request::class));\n });\n }", "title": "" }, { "docid": "81130e1288061031bf7db85334bab165", "score": "0.6642791", "text": "public function register()\n {\n $this->registerRepositoryInterfaces();\n }", "title": "" }, { "docid": "861cff30c3662ccb33ae87baf83fb9b4", "score": "0.66420776", "text": "public function register()\n {\n $this->app->bind(\n 'Admin',\n 'App\\\\Services\\\\Administrators\\\\AdministratorsService'\n );\n }", "title": "" }, { "docid": "6225616b778a7cfded57f11230d08d45", "score": "0.66367644", "text": "public function register()\n {\n $this->app->bind(\\Republicas\\Contracts\\Repositories\\RepublicRepository::class, \\Republicas\\Repositories\\Eloquent\\RepublicRepositoryEloquent::class);\n $this->app->bind(\\Republicas\\Contracts\\Repositories\\RoomRepository::class, \\Republicas\\Repositories\\Eloquent\\RoomRepositoryEloquent::class);\n $this->app->bind(\\Republicas\\Contracts\\Repositories\\UserRepository::class, \\Republicas\\Repositories\\Eloquent\\UserRepositoryEloquent::class);\n $this->app->bind(\\Republicas\\Contracts\\Repositories\\BillRepository::class, \\Republicas\\Repositories\\Eloquent\\BillRepositoryEloquent::class);\n $this->app->bind(\\Republicas\\Contracts\\Repositories\\BillTypeRepository::class, \\Republicas\\Repositories\\Eloquent\\BillTypeRepositoryEloquent::class);\n $this->app->bind(\\Republicas\\Contracts\\Repositories\\PhotoRepository::class, \\Republicas\\Repositories\\Eloquent\\PhotoRepositoryEloquent::class);\n $this->app->bind(\\Republicas\\Contracts\\Repositories\\NotificationRepository::class, \\Republicas\\Repositories\\Eloquent\\NotificationRepositoryEloquent::class);\n }", "title": "" }, { "docid": "11654621296b300ed5c0f6d89b5a4b47", "score": "0.66349494", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'phone-verify');\n $this->app->register(EventServiceProvider::class);\n }", "title": "" }, { "docid": "45cba1f2e979443c114fed291885fcc4", "score": "0.6634361", "text": "public function register()\n {\n $this->app->bind('ReferralService', ReferralService::class);\n }", "title": "" }, { "docid": "60cd438c5e2a5fa5ec3cdd0ebe5f53d7", "score": "0.66337717", "text": "public function register(): void\n {\n $this->mergeConfigFrom(__DIR__.'/../config/transbank.php', 'transbank');\n\n $this->app->bind(Services\\Webpay::class);\n $this->app->bind(Http\\Client::class);\n }", "title": "" }, { "docid": "5ef992588091df77f356a59c29208270", "score": "0.66333765", "text": "public function register()\n {\n // khai báo interface và repository\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\HomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\HomeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\JobListRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\JobListRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\JobDetailRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\JobDetailRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\EmployeeHomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\EmployeeHomeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\ProfileHomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\ProfileHomeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\CertificateHomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\CertificateHomeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\ExperienceOfProfileHomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\ExperienceOfProfileHomeRepository'\n );\n\n //admin\n\n $this->app->bind(\n 'App\\Repositories\\Contracts\\EmployerRepositoryInterface',\n 'App\\Repositories\\Eloquents\\EmployerRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\DegreeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\DegreeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\LanguageRepositoryInterface',\n 'App\\Repositories\\Eloquents\\LanguageRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\GraduateRepositoryInterface',\n 'App\\Repositories\\Eloquents\\GraduateRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\ProfileRepositoryInterface',\n 'App\\Repositories\\Eloquents\\ProfileRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\JobRepositoryInterface',\n 'App\\Repositories\\Eloquents\\JobRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\CertificateRepositoryInterface',\n 'App\\Repositories\\Eloquents\\CertificateRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\ExperienceRepositoryInterface',\n 'App\\Repositories\\Eloquents\\ExperienceRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\SalaryRepositoryInterface',\n 'App\\Repositories\\Eloquents\\SalaryRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\OfficeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\OfficeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\EmployeeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\EmployeeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\CareerRepositoryInterface',\n 'App\\Repositories\\Eloquents\\CareerRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\HomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\HomeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\JobListRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\JobListRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\JobDetailRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\JobDetailRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\EmployeeHomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\EmployeeHomeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\TypeofworkRepositoryInterface',\n 'App\\Repositories\\Eloquents\\TypeofworkRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\ProfileSubmittedHomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\ProfileSubmittedHomeRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Contracts\\Home\\JobHomeRepositoryInterface',\n 'App\\Repositories\\Eloquents\\Home\\JobHomeRepository'\n );\n }", "title": "" }, { "docid": "5a00bf6c096abeb1b81da72f5517c6f2", "score": "0.66333467", "text": "public function register()\n {\n $this->app->bind(\n \\App\\Repositories\\User\\UserRepositoryContract::class,\n \\App\\Repositories\\User\\UserRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Role\\RoleRepositoryContract::class,\n \\App\\Repositories\\Role\\RoleRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Department\\DepartmentRepositoryContract::class,\n \\App\\Repositories\\Department\\DepartmentRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Setting\\SettingRepositoryContract::class,\n \\App\\Repositories\\Setting\\SettingRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Task\\TaskRepositoryContract::class,\n \\App\\Repositories\\Task\\TaskRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Client\\ClientRepositoryContract::class,\n \\App\\Repositories\\Client\\ClientRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Contact\\ContactRepositoryContract::class,\n \\App\\Repositories\\Contact\\ContactRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Lead\\LeadRepositoryContract::class,\n \\App\\Repositories\\Lead\\LeadRepository::class\n );\n $this->app->bind(\n \\App\\Repositories\\Invoice\\InvoiceRepositoryContract::class,\n \\App\\Repositories\\Invoice\\InvoiceRepository::class\n );\n }", "title": "" }, { "docid": "1d30b56630270d101f02d41f53c69805", "score": "0.66315275", "text": "public function register()\n {\n $this->app->singleton('sendportal.resolver', function () {\n return new ResolverService();\n });\n }", "title": "" } ]
671dc6b632025ec6cf6ae3b1f38c38d8
Auto login tenant admin if first time
[ { "docid": "852603e2c482bdc428366e9793824972", "score": "0.7963182", "text": "function doAutologin()\n {\n $user = App\\Models\\Tenant\\User::find(1);\n\n if (is_null($user))\n die('Admin user not found');\n else\n Auth::login($user);\n\n $this->rememberAppUrl();\n }", "title": "" } ]
[ { "docid": "edad43f80aeb993a9a36deb0faf90cdd", "score": "0.7360286", "text": "function doAutologin()\n {\n $user = User::find(1);\n\n if (is_null($user))\n die('Admin user not found');\n else\n echo \"fine\";\n // Remove this later and make changes accordingly Auth::login($user);\n\n $this->rememberAppUrl();\n }", "title": "" }, { "docid": "b821ce4c4071df45f52345976989f120", "score": "0.71922594", "text": "public function loginAsAdmin()\n {\n $this->loginWithToken('[email protected]');\n }", "title": "" }, { "docid": "7fbcc2a8867661c76d15c98bcb127bc9", "score": "0.6746309", "text": "public static function autoLogin($isAdmin=false){\r\n $prefix = \"\";\r\n if($isAdmin){\r\n $prefix=\"_admin\";\r\n }\r\n /*Code added for work with admin and user login End*/\r\n $cookieEmail = sfContext::getInstance()->getRequest()->getCookie('counceledge_auth_email'.$prefix);\r\n $cookiePassword = sfContext::getInstance()->getRequest()->getCookie('counceledge_auth_pass'.$prefix);\r\n\r\n if(!empty($cookieEmail) && !empty($cookiePassword)){\r\n $decEmail = base64_decode($cookieEmail);\r\n $decPassword = base64_decode($cookiePassword);\r\n\r\n if(isset($decEmail) && isset($decPassword)){\r\n if($isAdmin){\r\n \t//echo \"ll\"; exit;\r\n if(!Users::checkAdminLogin($decEmail, $decPassword)){\r\n RememberMe::removeRemember($isAdmin);\r\n }\r\n }/*else{\r\n list($responce, $user) = Users::checkUserLogin($decEmail,$decPassword);\r\n if($responce['status']!=\"SUCCESS\"){\r\n RememberMe::removeRemember($isAdmin);\r\n }\r\n }*/\r\n }else{\r\n RememberMe::removeRemember($isAdmin);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ccb8cecaf27ce8ac65a8d021f70ca5de", "score": "0.6687367", "text": "private function _initSiteAdmin(){\n if(!$this->User->findByUsername('admin')){\n\n print_r(\"Begin to create super administrator...\\n\");\n $this->User->create(array(\n 'username' => 'admin',\n 'password' => 'P@ssword1',\n 'first_name' => 'Super',\n 'last_name' => 'Admin',\n 'email' => '[email protected]',\n 'group_id' => Group::USER_GROUP_SITE_ADMIN,\n 'is_active' => true,\n 'is_delete' => false\n ));\n\n $this->User->save();\n print_r(\"End creating super administrator with id \" .$this->User->getID() );\n }\n }", "title": "" }, { "docid": "8237dd633ccadfa707bcb0530becb19d", "score": "0.665922", "text": "public function loginAsAdmin(): void\n {\n $I = $this;\n\n Auth::guard('admin')->login($I->grabRecord(Admin::class, ['email' => '[email protected]']));\n $I->seeAuthentication('admin');\n }", "title": "" }, { "docid": "f25c8f6dae44a6358e5f1154ee94acd5", "score": "0.65842986", "text": "public function auto_login() {\n\t\t$b = parent::auto_login ();\n\t\tif ($b) {\n\t\t\t$user = parent::get_user ();\n\t\t\t$user->session_id = Session::instance ()->id ();\n\t\t\t$user->save ();\n\t\t}\n\t\treturn $b;\n\t}", "title": "" }, { "docid": "5ab145c5e6321093c423ef508dbd7a40", "score": "0.6556554", "text": "static function autoLogin() {\n\t\tif(strpos(Cookie::get('alc_enc'), ':') && !Session::get(\"loggedInAs\")) {\n\t\t\tlist($uid, $token) = explode(':', Cookie::get('alc_enc'), 2);\n\t\t\t$SQL_uid = Convert::raw2sql($uid);\n\n\t\t\t$member = DataObject::get_one(\"Member\", \"Member.ID = '$SQL_uid'\");\n\n\t\t\tif($member && $member->RememberLoginToken != $token) {\n\t\t\t\t$member = null;\n\t\t\t}\n\n\t\t\tif($member) {\n\t\t\t\tself::session_regenerate_id();\n\t\t\t\tSession::set(\"loggedInAs\", $member->ID);\n\n\t\t\t\t$token = substr(md5(uniqid(rand(), true)), 0, 49 - strlen($member->ID));\n\t\t\t\t$member->RememberLoginToken = $token;\n\t\t\t\tCookie::set('alc_enc', $member->ID . ':' . $token);\n\n\t\t\t\t$member->NumVisit++;\n\t\t\t\t$member->write();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "596c4fc930247b29b4fe5372b9f19d28", "score": "0.6544323", "text": "public function autoLogin()\n {\n $email = md5($this->email);\n $password = md5($_POST['signup__input-password-1']);\n\n new Auth('Customer', $email, $password);\n\n $_POST = [];\n }", "title": "" }, { "docid": "b0c912e37f1f3eddea65e6c2b44cef7b", "score": "0.65205604", "text": "public function checklogin()\n {\n if(($this->admin_type == \"superadmin\") || ($this->admin_type == \"admin\"))\n {\n $auth = Zend_Auth::getInstance();\n $hasIdentity = $auth->hasIdentity();\n /*************** check admin identity ************/\n if(!$hasIdentity) \n { \n $this->_redirect('admin/index/index'); \n } \n } else {\n $this->_redirect('admin/index/index'); \n } \n }", "title": "" }, { "docid": "6c76731abab87edca3f7c91cdf6fc75c", "score": "0.6433903", "text": "public function auto_login() {\n\t\t/*\n\t\t * Every page contains validation information, so get_user\n\t\t * authenticates...\n\t\t */\n\t\treturn $this->doAuth();\n\t}", "title": "" }, { "docid": "6924bc59525aa495ba801e009022cccd", "score": "0.6419156", "text": "public function visitDashboardAuthenticatedAsSuperAdmin()\n {\n $pengguna = \\App\\Models\\Pengguna::find(1);\n\n $this->browse(function (Browser $browser) use ($pengguna){\n $browser\n ->loginAs($pengguna, 'pengguna')\n ->visit('/')\n ->assertPathIs('/');\n });\n }", "title": "" }, { "docid": "92a79c10f68eecc676ecf5c45cde5a74", "score": "0.6407827", "text": "public function init()\n {\n $config = Registry::getConfig();\n $config->set(\"template\", \"admin\");\n //Nos aseguramos de que es admin\n $user = Registry::getUser();\n if ($user->id) {\n if ($user->roleId < USER_ROLE_VALIDADOR) {\n Url::redirect(Url::site());\n } elseif ($user->tfaStatus && !$user->isTfaAuth()) {\n Url::redirect(Url::site(\"login/tfa\"));\n }\n } else {\n Url::redirect(Url::site(\"login\"));\n }\n }", "title": "" }, { "docid": "5c5171d0d18488d96c13fbecdf919821", "score": "0.6404318", "text": "function authenticateTenant()\n {\n $this->connectTenantDB();\n try {\n DB::getDatabaseName();\n } catch (Exception $e) {\n die('Could not connect to database');\n }\n /* remove these later if ($this->isValidSubDomain()):\n\n //remove this later if ($this->isFirstTime()) {\n // register tenant database\n //$this->setupTenantDatabase();\n\n //$this->doAutologin();\n\n //$this->resetSetup();\n\n /*} else {\n $this->connectTenantDB();\n try {\n DB::getDatabaseName();\n } catch (Exception $e) {\n die('Could not connect to database');\n }\n }\n endif; */\n }", "title": "" }, { "docid": "e06d03460ab1a35775ddc11bb497930c", "score": "0.63310474", "text": "private static function _login_as_admin()\n {\n $_SESSION['logged_in'] = TRUE;\n // We can't know the current configuration for admin access, so we max it\n\t\t$_SESSION['user_access'] = PHP_INT_MAX;\n\t\t$_SESSION['user_id'] = 0;\n }", "title": "" }, { "docid": "dc8eee4cd2a8751afbcbb243a0429922", "score": "0.6326836", "text": "public function loginUser()\n {\n $this->getSessionService()->setValue(SessionService::FRONTEND_USER_ID, $this->getTestUser()->id);\n }", "title": "" }, { "docid": "dbcfac837093a18f92dcaa0473d2c4a3", "score": "0.63176876", "text": "public function login() {\n if ($this->_identity === null) {\n $this->_identity = new UserIdentity($this->username, $this->password,$this->tenant);\n $this->_identity->authenticate();\n }\n if ($this->_identity->errorCode === UserIdentity::ERROR_NONE) {\n $duration = $this->rememberMe ? 3600 * 24 * 30 : 0; // 30 days\n Yii::app()->user->login($this->_identity, $duration);\n $session = new CHttpSession();\n $session['tenant'] = Yii::app()->user->tenant;\n\n $this->audit_log_login(); //logs the login of the user\n return true;\n } else\n return false;\n }", "title": "" }, { "docid": "d13d2bbf3bcce071887f82c2c6288324", "score": "0.6303425", "text": "function audition_allow_auto_login() {\n\t$auto_login = get_site_option('audition_auto_login');\n\n\t/**\n\t * Filter whether users should be logged in after registration or not.\n\t *\n\t * @since 7.0\n\t *\n\t * @param bool $auto_login Whether users should be logged in after registration or not.\n\t */\n\treturn (bool) apply_filters('audition_allow_auto_login', $auto_login);\n}", "title": "" }, { "docid": "41e2723582b5b16b70acbeeaedcbe509", "score": "0.6302988", "text": "function adminAutoLogin()\n\t {\n\t\t$logins = array('activateAccount','createNewAccount','forgotPassword','resetPassword','resendActivationLink');\n\t\t //check for admin url access or not\n\t\tif($this->CI->router->directory == 'admin/')\n\t\t{\n\t\t\t//checking for admin session.: cookie removed from 31/1/2014\n\t\t\tif(!$this->CI->session->userdata('admin_id')):\n\t\t\t\t\n\t\t\t\t\t//pr(getFlashMessage('admin_referrer'));die;\n\t\t\t\t\tif($this->CI->router->class != 'lgs')\n\t\t\t\t\t\t$this->_setReferrerAdmin();\n\t\t\t\t\t\t\n\t\t\t\t\t$auth = array('dashboard','accountSettings','checkAdminPassword','logout');\n\t\t\t\t\tif($this->CI->input->is_ajax_request())\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<script>location.reload();</script>';\n\t\t\t\t\t\tdie;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($this->CI->router->class == 'lgs' && in_array($this->CI->router->method,$auth))\n\t\t\t\t\t\tredirect('admin/lgs');\n\t\t\t\t\telse if($this->CI->router->class != 'lgs')\n\t\t\t\t\t\tredirect('admin/lgs');\n\t\t\tendif;\n\t\t}\n\t\telse if($this->CI->router->class == 'account' || $this->CI->router->class == 'rest_account')\n\t\t{\n\t\t\t\n\t\t\t//pr($_SESSION);die;\n\t\t\t//$this->CI->session->set_userdata(array('chat_id'=>FALSE,'customer_id'=>FALSE,'customer_group_type'=>FALSE));\n\t\t\t//checking for customer session.\n\t\t\tif( !$this->CI->session->userdata('customer_id') && !in_array($this->CI->router->method,$logins) )\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(isset($_GET['acc']))\t//direct login from mail\n\t\t\t\t{\n\t\t\t\t\tletLoginUsingAccessToken();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_setReferrerCustomer();\n\t\t\t\t\tif(!$this->CI->session->userdata('customer_id') && $this->CI->input->is_ajax_request() && $this->CI->router->class == 'account')\n\t\t\t\t\t{\n\t\t\t\t\t\tif( is_restClient() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_REST_hook_failed();\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\techo json_encode(array('type'=>'error','msg'=>'Error: You are not logged in please <a href=\"'.site_url('login').'\">login</a> first.'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdie;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//functions which are required authentication\n\t\t\t\t\t$auth = array('dashboard','logout');\n\t\t\t\t\t$accesDenied = array('account');\n\t\t\t\t\t\n\t\t\t\t\tif($this->CI->router->class == 'login' && in_array($this->CI->router->method,$auth))\n\t\t\t\t\t{\n\t\t\t\t\t\tif( is_restClient() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_REST_hook_failed();\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\tredirect('login');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(in_array($this->CI->router->class,$accesDenied))\n\t\t\t\t\t{\n\t\t\t\t\t\tif( is_restClient() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_REST_hook_failed();\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\tredirect('login');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\telse if($this->CI->session->userdata('customer_group_type')==\"C\") //check chat user\n\t\t\t{\n\t\t\t\tif( is_restClient() )\n\t\t\t\t{\n\t\t\t\t\t$this->_REST_hook_failed();\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tredirect('login');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t //echo 'Wow!! Great hook called';\n\t }", "title": "" }, { "docid": "32e6e51272b01d49c1dc12d69ea8ec12", "score": "0.6282807", "text": "private function __autoLoginUser() {\n $autoLoginToken = $_GET['auto_login_token'];\n $email = $_GET['email'];\n if ($autoLoginToken !== '' && $autoLoginToken !== null && $email !== '' && $email !== null) {\n $email = base64_decode($email);\n if ($this->Otp->authenticateOTP($autoLoginToken, array('email' => $email))) {\n $userData = $this->User->findByEmail($email);\n if (!empty($userData) && isset($userData['User'])) {\n $user = $userData['User'];\n $this->Auth->login($user);\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'id' => $this->Auth->user('id'),\n\t\t\t\t\t\t'last_login_datetime' => date(\"Y-m-d H:i:s\")\n\t\t\t\t\t);\n\t\t\t\t\t$this->User->save($data);\n $this->__doAfterAutoLogin();\n }\n }\n }\n }", "title": "" }, { "docid": "3d7794165c0981bb55cdaa8b97da23a3", "score": "0.6277906", "text": "public function admin_login($admin){\n \t\t if($admin){\n \t\t\t\t$this->admin_id = $_SESSION['admin_id'] = $admin->id;\n \t\t\t\t$this->admin = true;\n \t\t\t}\n \t\t}", "title": "" }, { "docid": "f879bbe0f72dcd235e507e018cae897d", "score": "0.6271104", "text": "public function checklogin()\n {\n $auth = Zend_Auth::getInstance();\n /*************** check admin identity ************/\n if(!$auth->hasIdentity()) \n { \n $this->_redirect('admin/index/index'); \n } \n }", "title": "" }, { "docid": "062fe179ff5300cefe1a599024db6c83", "score": "0.6263712", "text": "function autologin(){\n if(isset($_COOKIE['rememberMe'])){\n $expl = explode('____', $_COOKIE['rememberMe']);\n if(count($expl) == 2){\n $email = $expl[0];\n $cryptedKey = $expl[1];\n $userModel = new UserModel();\n $dbUser = $userModel->getUserWithEmail($email);\n\n if($dbUser != null)\n if($dbUser['activation_key'] == $cryptedKey)\n $_SESSION['idUser'] = $dbUser['id'];\n }\n }\n }", "title": "" }, { "docid": "6e7d0cf2cf0878c898d7dc3d579b55b8", "score": "0.6248287", "text": "private function login()\n {\n $crawler = $this->client->request('GET', $this->host);\n\n // login\n $form = $crawler->filter('form[name=\"sign_in\"]')->form();\n $form['username'] = $this->username;\n $form['password'] = $this->password;\n $form['rememberMe'] = false;\n\n $this->client->submit($form);\n\n $this->deactivateCombinedReports();\n }", "title": "" }, { "docid": "ee85f6e8b541640347d0ad38d3f7d2aa", "score": "0.6234669", "text": "function wpc_gravity_registration_autologin( $user_id, $user_config, $entry, $password ) {\n\t$user = get_userdata( $user_id );\n\t$user_login = $user->user_login;\n\t$user_password = $password;\n $user->set_role(get_option('default_role', 'subscriber'));\n\n wp_signon( array(\n\t\t'user_login' => $user_login,\n\t\t'user_password' => $user_password,\n\t\t'remember' => false\n\n ) );\n}", "title": "" }, { "docid": "4024e6e2d34825702ddb0bf9de27372d", "score": "0.6229593", "text": "public function login()\n {\n if(Sentry::check()){\n Response::redirect($this->siteUrl('admin'));\n }else{\n $this->data['redirect'] = (Input::get('redirect')) ? base64_decode(Input::get('redirect')) : '';\n View::display('admin/login.twig', $this->data);\n }\n }", "title": "" }, { "docid": "9cd5705a224af58ad6679581a6c28831", "score": "0.62152267", "text": "public function auto_login()\n\t{\n\t\tif ($token = cookie::get('authautologin'))\n\t\t{\n\t\t\t// Load the token and user\n\t\t\t$token = ORM::factory('user_token', $token);\n\n\t\t\tif ($token->loaded AND $token->user->loaded)\n\t\t\t{\n\t\t\t\tif ($token->user_agent === sha1(Kohana::$user_agent))\n\t\t\t\t{\n\t\t\t\t\t// Save the token to create a new unique token\n\t\t\t\t\t$token->save();\n\n\t\t\t\t\t// Set the new token\n\t\t\t\t\tcookie::set('authautologin', $token->token, $token->expires - time());\n\n\t\t\t\t\t// Complete the login with the found data\n\t\t\t\t\t$this->complete_login($token->user);\n\n\t\t\t\t\t// Automatic login was successful\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\n\t\t\t\t// Token is invalid\n\t\t\t\t$token->delete();\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "b53ca34639911856e501cac40630f491", "score": "0.6210755", "text": "public function passLoginAdmin(){\r\n if(isset($_SESSION['admin'])){\r\n if($_SESSION['admin'] === true){\r\n $this->redirect('admin/dashboard');\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b7767a419681f48ba9dc071b5b8f5638", "score": "0.62039703", "text": "public function forceGuestLogin()\n {\n $this->getStorage()->write(array(\n 'user' => new Lumia_Auth_Identity(),\n 'permission' => new Lumia_Auth_Identity(),\n \t'navigation' => new Lumia_Auth_Identity()\n ));\n }", "title": "" }, { "docid": "1d307b0d05bced448adc5c9fcf8d5955", "score": "0.6198936", "text": "public function auto_login()\n {\n if ($token = Cookie::get('authautologin'))\n {\n // Load the token and user\n $token = Tokens::findFirst(array('token=:token:', 'bind' => array('token' => $token)));\n $user = $token->getUsers();\n \n // If the token and user exists\n if ($token && $user)\n {\n $roles = Arr::from_model($user->getRoles(), 'name', 'id');\n \n //If user has login role and tokens match, perform a login\n if (Arr::get($roles, 'login') && $token->user_agent === sha1(\\Phalcon\\DI::getDefault()->getShared('request')->getUserAgent()))\n {\n // Save the token to create a new unique token\n $token->token = $this->create_token();\n $token->save();\n\n // Set the new token\n Cookie::set('authautologin', $token->token, $token->expires - time());\n \n // Finish the login\n \\Phalcon\\DI::getDefault()->getShared('db')->execute('UPDATE `users` SET `logins` = ?, `last_login` = ? WHERE `id` = ?', array($user->logins+1, date('Y-m-d H:i:s'), $user->id));\n \n // Regenerate session_id\n session_regenerate_id();\n\n // Store user in session\n $user = Arr::to_object(Arr::merge(get_object_vars($user), array('roles' => $roles)));\n $this->_session->set($this->_config['session_key'], $user);\n\n // Automatic login was successful\n return $user;\n }\n\n // Token is invalid\n $token->delete();\n }\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "1697aeff6eb6d7a8bdca15f0b68c1226", "score": "0.6189321", "text": "private function autologin()\n\t{\n\t\tif (!$this->is_logged_in() AND !$this->is_logged_in(FALSE)) {\t\t\t// not logged in (as any user)\n\n\t\t\t$this->ci->load->helper('cookie');\n\t\t\tif ($cookie = get_cookie($this->ci->config->item('autologin_cookie_name', 'tank_auth'), TRUE)) {\n\n\t\t\t\t$data = unserialize($cookie);\n\n\t\t\t\tif (isset($data['key']) AND isset($data['user_id'])) {\n\n\t\t\t\t\t$this->ci->load->model('tank_auth/user_autologin');\n\t\t\t\t\tif (!is_null($user = $this->ci->user_autologin->get($data['user_id'], md5($data['key'])))) {\n\n\t\t\t\t\t\t// Login user\n\t\t\t\t\t\t$this->ci->session->set_userdata(array(\n\t\t\t\t\t\t\t\t'user_id'\t=> $user->id,\n\t\t\t\t\t\t\t\t'username'\t=> $user->username,\n\t\t\t\t\t\t\t\t'status'\t=> STATUS_ACTIVATED,\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\t// Renew users cookie to prevent it from expiring\n\t\t\t\t\t\tset_cookie(array(\n\t\t\t\t\t\t\t\t'name' \t\t=> $this->ci->config->item('autologin_cookie_name', 'tank_auth'),\n\t\t\t\t\t\t\t\t'value'\t\t=> $cookie,\n\t\t\t\t\t\t\t\t'expire'\t=> $this->ci->config->item('autologin_cookie_life', 'tank_auth'),\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\t$this->ci->users->update_login_info(\n\t\t\t\t\t\t\t\t$user->id,\n\t\t\t\t\t\t\t\t$this->ci->config->item('login_record_ip', 'tank_auth'),\n\t\t\t\t\t\t\t\t$this->ci->config->item('login_record_time', 'tank_auth'));\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "d81fb2106fe85dfa8a66aae9c8b34eff", "score": "0.61751646", "text": "public function login(){\n # Enable Single Sign-On\n if(in_array(\"login\", $this->features, TRUE)){\n $this->enable_sso();\n }\n }", "title": "" }, { "docid": "f09fdcf020426fbf2a87040565a291a1", "score": "0.61379886", "text": "function admin_authenticate()\n{\n $CI = & get_instance();\n $admin_uid=$CI->session->userdata('admin_uid');\n if(empty($admin_uid))\n {\n $redirect=base_url('admin');\n redirect($redirect);\n }\n}", "title": "" }, { "docid": "9ceb979857e6596333578e6569b37b52", "score": "0.61367744", "text": "public function attemptAdminLogin() {\n $query = \"SELECT id FROM admin WHERE username = '$this->username' AND password = SHA('$this->password')\";\n $data = $this->runQuery($query);\n \n if (mysqli_num_rows($data) == 1) {\n // The log-in is OK so set the user ID and username session vars (and cookies), and redirect to the home page\n $row = mysqli_fetch_array($data);\n $_SESSION['admin_id'] = $row['id'];\n setcookie('admin_id', $row['id'], time() + (60 * 60 * 24 * 30)); // expires in 30 days\n header('Location: ' . DOMAIN_PATH . '/admin.php');\n }\n else {\n // The username/password are incorrect so set an error message\n $this->error = 'Sorry, you must enter a valid username and password to log in.';\n }\n }", "title": "" }, { "docid": "028710b8a162562f25885dd4c25daa6d", "score": "0.61365396", "text": "public function AuthLogin() {\n $login_id = Session::get('maCongTy');\n $roles = Session::get('phanQuyen');\n if($login_id && $roles == 1) {\n return Redirect::to('/admin/dashboard');\n } else {\n return Redirect::to('/')->send();\n }\n }", "title": "" }, { "docid": "6683dd0e271cee633f3e04f3458133ed", "score": "0.61352754", "text": "public function init()\n {\n if ( !$this->_helper->Authentication->hasIdentity() ) {\n \t\t$this->_redirect(\"admin/login\");\n \t}\n \t\n \t// update the user's activity\n $this->_helper->Authentication->updateUserActivity();\n }", "title": "" }, { "docid": "e7265b7a62eea138c90c3389b445cefd", "score": "0.6126711", "text": "public function forceGuestLogin()\n {\n \tparent::forceGuestLogin();\n \t\n \t$identity = (array) $this->getIdentity();\n \t$identity['student'] = new Lumia_Auth_Identity();\n $this->getStorage()->write($identity);\n }", "title": "" }, { "docid": "f99df831354dc856df0a6d5030c6d611", "score": "0.6124977", "text": "function admin()\n {\n if ($logado = get_sts(false)) {\n if (!$logado->id || !$logado->status) {\n redirect('admin');\n }\n } else {\n redirect('admin');\n }\n }", "title": "" }, { "docid": "83b6913be1539ac32d06f06fd57ba185", "score": "0.61123794", "text": "public function AuthLoginCheck(){\n $admin_id = Auth::id();\n if($admin_id){\n return redirect()->route('dashboard');\n }\n else{\n return redirect()->route('admin')->send();\n }\n }", "title": "" }, { "docid": "14045538c42f2eddef8c83249a7b1f91", "score": "0.6112239", "text": "private function logInRandomValidUser()\n {\n //https://stackoverflow.com/a/30555103/6912075\n $session = $this->client->getContainer()->get('session');\n\n $userManager = $this->client->getContainer()->get('fos_user.user_manager');\n\n $user=$userManager->findUserByUsername('tester');\n if (!$user) {\n $user = $userManager->createUser();\n\n $user->setEmail('[email protected]');\n $user->setUsername('tester');\n $user->setPlainPassword('foo');\n $user->setEnabled(true);\n $user->addRole('ROLE_USER');\n\n $userManager->updateUser($user);\n }\n\n $firewall = 'main';\n $token = new UsernamePasswordToken($user, null, $firewall, array('ROLE_SUPER_ADMIN'));\n\n $session->set('_security_'.$firewall, serialize($token));\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "title": "" }, { "docid": "0ee42631611b3ce8b022ad3c9f9d6fae", "score": "0.610938", "text": "function log_in_admin($admin) {\n\t\t// Reentering the ID protects the admin from session fixation.\n\t\tsession_regenerate_id();\n\t\t$_SESSION['admin_id'] = $admin['id'];\n\t\t$_SESSION['last_login'] = time();\n\t\t$_SESSION['username'] = $admin['username'];\n\t\treturn true;\n\t}", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.6108383", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "7e2b1ea93dec65c38e2ceaf61a8e5761", "score": "0.61071146", "text": "public function login() {\r\n\r\n\t}", "title": "" }, { "docid": "ee36fcf6107c8add6e936f146c196bcb", "score": "0.6105095", "text": "public static function auth()\n\t{\n\t\tif(!UserModel::user_role('admin')):\n\t\t\tRedirect::to('dashboard');\n\t\tendif;\n\t}", "title": "" }, { "docid": "6446c13140de7116dab913de1c70a06d", "score": "0.6103046", "text": "public function logAdminIn(): void\n {\n $id_user = $this->db->selectOne('bbn_users', 'id', ['email' => $this->_cfg['admin_email']]);\n if ($id_user) {\n $this->logIn($id_user);\n return;\n }\n\n throw new Exception(\"Impossible to fiond the admin user\");\n }", "title": "" }, { "docid": "892427718d3158f89aa79c5dd7e53b70", "score": "0.6100245", "text": "public function amLoggedInAsAdmin(): void\n {\n $this->amLoggedInAs($this->grabUserByRole(Item::ROLE_ADMIN));\n }", "title": "" }, { "docid": "43ee928fc9fbcc5326f3663db13ec17b", "score": "0.6063679", "text": "protected function doBackendLogin()\n {\n $this->getSession()->visit($this->generateUrl('admin_login', array('_locale' => 'en')));\n $this->fillField('_username', 'backenduser');\n $this->fillField('_password', 'backenduser');\n $this->pressButton('_submit');\n }", "title": "" }, { "docid": "49c35ad5401358a75cf86cdb8abebc24", "score": "0.6063112", "text": "public function admin_login($id = null) {\n\n\t}", "title": "" }, { "docid": "47bf5a018b293454a715b778af58bfa3", "score": "0.60595953", "text": "public function AdminAuthCheck() {\n $AdminID = Session::get('admin_id');\n if ($AdminID) {\n return; \n } else {\n return Redirect::to('/Admin')->send();\n }\n }", "title": "" }, { "docid": "777561e32beeac947087d66ee54e7415", "score": "0.6055852", "text": "public function login() {\n \n }", "title": "" }, { "docid": "32ae352cf5989dc279d08fc08f217433", "score": "0.60291225", "text": "public function admin_login() {\n\t\t// $this->_render['layout'] = 'admin';\n\t\t$this->_render['template'] = 'login';\n\t\treturn $this->login();\n\t}", "title": "" }, { "docid": "4d29d895f858ac9ae1325d96fa7d8381", "score": "0.60100377", "text": "function login_admin($adminid)\n {\n $query = sprintf(\"INSERT into `admin_session` (`id`, `admin_id`, `created_on`) VALUES (NULL, '%s', NOW());\",\n\t\t mysql_real_escape_string($adminid));\n if ($res = mysql_query($query))\n {\n\t // add the cookie\n\t $id = mysql_insert_id();\n\t setcookie(\"session\", $id);\n\t return mysql_insert_id();\n }\n else\n {\n\t return False;\n }\n }", "title": "" }, { "docid": "d2ca710699d21af13d563ac1dcdcf628", "score": "0.6004975", "text": "public function checkSigninUser()\n {\n if ( !empty($_COOKIE['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n // Check session('nsmle') if isset redirect to admin home page\n } else if ( !empty($_SESSION['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n }\n }", "title": "" }, { "docid": "12f21c418f27faef9204fd029aa97139", "score": "0.5980807", "text": "public function login()\n {\n }", "title": "" }, { "docid": "e5cefe99e613c08a9bee15b255ea3723", "score": "0.5980363", "text": "public function index() {\n //$this->check_admin_user_session();\n \n $data['title'] = 'Admin login';\n $this->load->admin_render_minimal('admin_login', $data);\n \n }", "title": "" }, { "docid": "bcb95f1bbbad8ac05699999975871860", "score": "0.59789383", "text": "public function admin_login(){\n\n if(isset($_COOKIE['admin_user'])) {\n $admin_user = json_decode($_COOKIE['admin_user'],true);\n return view('admin_home', array('admin_ob' => self::getadmin($admin_user[0]['id'])));\n }else {\n return view('admin_login');\n }\n }", "title": "" }, { "docid": "c6355e16e5ae4bd7d016d1548676d897", "score": "0.5976899", "text": "public function admin_login()\n {\n $title = get_lang('InternalLogin');\n if (Shibboleth::session()->is_logged_in())\n {\n $message = get_lang('AlreadyLoggedIn');\n Shibboleth::display()->message_page($message, $title);\n }\n $index_manager = new IndexManager('');\n $html = $index_manager->display_login_form();\n Shibboleth::display()->page($html, $title);\n }", "title": "" }, { "docid": "27d2da1c9f5bfecfa6468ad6ba71bc02", "score": "0.59722626", "text": "private function __doAfterAutoLogin() {\n // if promptHealthStatusUpdate is set, show the health status pop up\n if (isset($_GET['promptHealthStatusUpdate'])) {\n $this->Session->write('isFirstLoginToday', true);\n }\n }", "title": "" }, { "docid": "ac93639106f88d29d7a934b9b054d821", "score": "0.5971004", "text": "public function auto_login()\n\t{\n\t\tif ($token = Cookie::get('authautologin'))\n\t\t{\n\t\t\t// Load the token and user\n\t\t\t$token = Factory_Repository::user_token()->load_object(array(array('token', '=', $token)));\n\n\t\t\tif ( ! empty($token) AND $token->expires > date('Y-m-d H:i:s') AND $token->user_agent === sha1(Request::$user_agent))\n\t\t\t{\n\t\t\t\t// Save the token to create a new unique token\n\t\t\t\t$token->token = sha1(uniqid(Text::random('alnum', 32), TRUE));\n\t\t\t\t$token = Factory_Repository::user_token()->update($token);\n\n\t\t\t\t// Set the new token\n\t\t\t\tCookie::set('authautologin', $token->token, strtotime($token->expires) - time());\n\n\t\t\t\t// Load the user\n\t\t\t\t$user = Factory_Repository::user()->load_object(array(array('id', '=', $token->user_id)));\n\n\t\t\t\t// Complete the login with the found data\n\t\t\t\t$this->complete_login($user);\n\n\t\t\t\t// Automatic login was successful\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t\telseif ( ! empty($token))\n\t\t\t{\n\t\t\t\t// Token is invalid\n\t\t\t\tFactory_Repository::user_token()->delete($token);\n\t\t\t\t$this->_clean_expired_tokens();\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "344c1b5e639a2d67b09e01afb5b032f4", "score": "0.5964784", "text": "function loginGuest() {\n\n\t\t# If no need in guest account\n\t\tif(!$this->guestData)\n\t\t\treturn;\n\n\t\t# Login guest\n\t\tself::$me = new UserController($this->guestData);\n\n\t}", "title": "" }, { "docid": "557ea9e9f0629227cd9509800800ea58", "score": "0.59610057", "text": "public function sadmin_login() {\n $sdmn_id = Session::get('admn_id');\n if ($sdmn_id != NULL):\n return Redirect::to('sAdmin-cPanel')->send();\n endif;\n return view('super-admin-login');\n }", "title": "" }, { "docid": "96742eb90d451e8b2b435d455e4c141b", "score": "0.5955014", "text": "public function backendLogin()\n {\n $this->amOnPage('/login');\n $this->maximizeWindow();\n if($this->isUsernameVisibleBE()){\n if($this->addCredentialsBE()){\n return $this->isDashboardVisibleBE();\n }else{\n dd($this->addCredentialsBE());\n $this->assertFalse(true);\n }\n }else{\n $this->assertFalse(true);\n }\n }", "title": "" }, { "docid": "5ab07eeefe99a83013abd948e8730e51", "score": "0.5945619", "text": "private static function service_autologin($set=null)\n {\n global $serendipity;\n\n if ($set && isset($serendipity['COOKIE']['author_information'])) {\n // set a global var to remember automatic autologin\n $serendipity['maintain']['autologin'] = true;\n serendipity_setCookie('maintain_autologin', 'true');\n }\n if (!$set && ((!isset($serendipity['maintain']['autologin']) || $serendipity['maintain']['autologin'] === true) || isset($serendipity['COOKIE']['maintain_autologin'])) ) {\n // automatic autologin logout\n $serendipity['maintain']['autologin'] = false;\n serendipity_deleteCookie('maintain_autologin');\n }\n }", "title": "" }, { "docid": "38ec1d287d0141ce6ea5222d4e59af54", "score": "0.59377736", "text": "public function login_as_admin(){\n if( !CurrentUser::login(\"testadmin\",\"testadminpassword\") ){\n throw new Exception (\"Cannot login as testadmin\");\n }\n }", "title": "" }, { "docid": "97dd0f95cd84827dba17c05aae4c187b", "score": "0.59057", "text": "public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url(), 'refresh');\n }", "title": "" }, { "docid": "17bc37eb518b6f408f8fcaa5b0b0e075", "score": "0.59047645", "text": "private function logInSimpleUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(41);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "title": "" }, { "docid": "c68bc1db336a988980fbb70155906135", "score": "0.5896253", "text": "function auto_login(){\r\n\t\t\tif(!empty($_COOKIE['auth'])){\r\n\t\t\t\t$split = explode(':', $_COOKIE['auth']);\r\n\r\n\t\t\t\tif(count($plit) != 2){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t//Recupere via ce cookie selector, token\r\n\t\t\t\tlist($selector,$token) = $split;\r\n\r\n\t\t\t\t$req = $db->prepare('SELECT auth_tokens.id, auth_tokens.token, auth_tokens.user_id \r\n\t\t\t\t\t\t\t\t\t users.id, users.pseudo, users.avatart, users.email\r\n\t\t\t\t\t\t\t\t\t FROM auth_tokens \r\n\t\t\t\t\t\t\t\t\t LEFT JOIN users\r\n\t\t\t\t\t\t\t\t\t ON auth_tokens.user_id = users.id\r\n\t\t\t\t\t\t\t\t\t WHERE selector = ?' AND execute >= CURDATE());\r\n\t\t\t\t$req->execute([base64_decode($selector)]);\r\n\r\n\t\t\t\t$data = $req->fetch(PDO::FETCH_OBJ);\r\n\t\t\t\tif ($data) {\r\n\t\t\t\t\tif (hash_equal($data->token,hash('sha256',base64_decode($token)))) {\r\n\t\t\t\t\t\tsession_regenerate_id(true);\r\n\t\t\t\t\t\t$_SESSION['user_id'] = $data->id;\r\n\t\t\t\t\t\t$_SESSION['pseudo'] = $data->pseudo;\r\n\t\t\t\t\t\t$_SESSION['avatar'] = $data->avatar;\r\n\t\t\t\t\t\t$_SESSION['email'] = $data->email;\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "ca5f9ff59a3cdd3ad88e3462e1a22afc", "score": "0.58874553", "text": "public function auth(){\n\t\t\tdate_default_timezone_set(\"America/Chicago\");\n\t\t\tif(!isset($_SESSION[\"current_rally_id\"]) || !isset($_SESSION[\"current_admin_id\"])) {\n\t\t\t\theader('location: login.php');\n\t\t\t\texit();\n\t\t\t}\n\t\t\t$verify_admin_query = $this->conn->query(\"SELECT * FROM `rallies` INNER JOIN `rally_admins` ON rallies.id=rally_admins.rally_id WHERE rally_admins.admin_id=\" . $this->getAdmin()->getId() . \" AND rally_admins.rally_id=\" . $this->getCurrentRally()->getRallyId());\n\t\t\tif($verify_admin_query->num_rows!=1) {\n\t\t\t\theader('location: login.php');\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4b5088371bdb9eeffa15b035310b0eea", "score": "0.5878076", "text": "public function login(){\n\t}", "title": "" }, { "docid": "1b7e6e4898c107f81ce876103637c41d", "score": "0.58736473", "text": "function require_inst_login() {\n return true;\n }", "title": "" }, { "docid": "9ae25a87f5ec99f453a416952d0c85c7", "score": "0.58698165", "text": "function admin_autenticado()\r\n{\r\n \r\n if(isset($_SESSION['type'])=='admin')\r\n {\r\n return true;\r\n \r\n }\r\n}", "title": "" }, { "docid": "faa1b87d9873fbc126ee2c25c675771e", "score": "0.586601", "text": "public function run()\n {\n //ADMIN USER\n $credentials = [\n 'member_id' => 0,\n 'name' => 'Admin',\n 'surname' => 'Admin',\n 'email' => '[email protected]',\n 'phone' => '+371 00000000',\n 'password' => '-!ADMIN!-',\n ];\n\n $admin = Sentinel::getUserRepository()->findByCredentials($credentials);\n $adminRole = Sentinel::getRoleRepository()->findBySlug('admin');\n\n if(!$admin){\n Sentinel::setModel('Entities\\User');\n Sentinel::registerAndActivate($credentials);\n }\n try\n {\n $adminRole->users()->attach($admin);\n } catch (\\Exception $e){\n\n }\n }", "title": "" }, { "docid": "d6e6e14230be0506a6fef010c1711da0", "score": "0.5864855", "text": "protected function logInAsAdmin()\n {\n return $this->logInUser('admin');\n }", "title": "" }, { "docid": "947fb2f1c048d28ebc1ca1db6592a429", "score": "0.5861626", "text": "protected function _loginAsAdministrator()\n {\n $usersFile = $this->loadData('User', 'default');\n $userDao = $this->User->load($usersFile[2]->getKey());\n\n return $this->_loginAsUser($userDao);\n }", "title": "" }, { "docid": "17e0a711e25b8ccbc76b0f4367942040", "score": "0.58606684", "text": "function _isFirstTime()\n {\n $data = session()->get('register_tenant');\n if (!is_null($data)) {\n return $data['first_time'];\n }\n\n return false;\n }", "title": "" }, { "docid": "17e0a711e25b8ccbc76b0f4367942040", "score": "0.58606684", "text": "function _isFirstTime()\n {\n $data = session()->get('register_tenant');\n if (!is_null($data)) {\n return $data['first_time'];\n }\n\n return false;\n }", "title": "" }, { "docid": "56e076ece3716a7dcf1e63bb120ccbb0", "score": "0.58584976", "text": "public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'login', 'refresh');\n }", "title": "" }, { "docid": "56e076ece3716a7dcf1e63bb120ccbb0", "score": "0.58584976", "text": "public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'login', 'refresh');\n }", "title": "" }, { "docid": "526d33e739d4c920df76ce0ce4d8eb0b", "score": "0.5856695", "text": "public function superadmin()\n {\n dd('Access only Superadmin');\n }", "title": "" }, { "docid": "07dd7100c9b82707fb13cc0aad1fd091", "score": "0.5855018", "text": "function auto_login( $user_id, $rememberme = 0 ) {\r\n\r\n\t\t\twp_set_current_user( $user_id );\r\n\r\n\t\t\twp_set_auth_cookie( $user_id, $rememberme );\r\n\r\n\t\t\t$user = get_user_by('ID', $user_id );\r\n\r\n\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\r\n\t\t}", "title": "" }, { "docid": "aa7843d42974cabd648cd04cad860597", "score": "0.5854159", "text": "function requiresLogin(){\n}", "title": "" }, { "docid": "9b875b59b3660328fff53fc34ee5bc10", "score": "0.58521456", "text": "public function isAdminLogin(){\n\tif(isset($SESSION['_admin_user'])){\n\t\treturn true;\n\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "f0d09300133e6dd7b3eb6e4a998f9dbb", "score": "0.5849753", "text": "function logado()\n {\n if ($logado = get_sts(false)) {\n if (!$logado->id || $logado->status !== 0) {\n redirect('login');\n }\n } else {\n redirect('login');\n }\n }", "title": "" }, { "docid": "6c6df4f94fa6c9c86ad115c8df09becb", "score": "0.5848694", "text": "public function performLogin()\n {\n\n }", "title": "" }, { "docid": "9d0be385f9b5b7501db1927d1c85cb46", "score": "0.58445454", "text": "public function adminUserLogin(Request $request)\n {\n $id = $request->input('id');\n $email = $request->input('email');\n\n //dd(\"id - \".$id.\" email - \".$email);\n\n session_unset('user_admin');\n session(['user_admin' => Auth::id()]);\n \n Log::info(\"Admin user id \".Auth::id());\n \n //login to admin panel\n Auth::loginUsingId($id);\n \n return redirect('home'); \n }", "title": "" }, { "docid": "39f50725ddc78c8807539019958059ab", "score": "0.58421135", "text": "public function check_login()\n {\n $admin_id=Session::get('admin_id');\n if($admin_id)\n {\n header(\"Location:/Gernetic/php-mvc/public/dashboard\");\n }else\n {\n header(\"Location:/Gernetic/php-mvc/public/admin\");\n }\n }", "title": "" }, { "docid": "d792de2de02d4a48bdf10f0eee1111d4", "score": "0.5835751", "text": "public function startup()\n {\n parent::startup();\n $this->checkAccess(array('admin')); \n }", "title": "" }, { "docid": "659f700cec249873ff99e7cb7d684b81", "score": "0.5831565", "text": "public function pretrip()\n {\n\n $this->user = Users::getUser($_SESSION['userId']);\n $this->user->checkLoggedIn();\n \n }", "title": "" }, { "docid": "919c52e43f9d8a60b64eebd1305dad48", "score": "0.58251196", "text": "public function login(){\r\n \r\n return 'Do stuff' . '...Log this action in an administrator\\'s table. ';\r\n }", "title": "" }, { "docid": "51f8d8ffb0fe148a75bff09b33b75f02", "score": "0.5824846", "text": "protected function get_loginadmin() {\n // ----- Jika Guest -----\n if (Auth::guest()) {\n $this->setTitle(\"Login Admin\");\n return View::make('admin.login2')->with('title', $this->title);\n } else {\n // ----- Melakukan Check Role User -----\n if (Auth::user()->role == 0 && Auth::user()->adm == 1) {\n return Redirect::to_route('admin');\n } else {\n return Redirect::to_route('loginuser');\n }\n }\n }", "title": "" }, { "docid": "22d83e19c292e7300219486a50de1941", "score": "0.58145154", "text": "public function Checklogin()\n\t{\n\t\tif ($this->session->userdata('admin_email') == '')\n\t\t{\n\t\t\tredirect('head/');\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "22d83e19c292e7300219486a50de1941", "score": "0.58145154", "text": "public function Checklogin()\n\t{\n\t\tif ($this->session->userdata('admin_email') == '')\n\t\t{\n\t\t\tredirect('head/');\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "c2051d38a7a41cca79fcb119ec8aacda", "score": "0.5809344", "text": "function signIn() {\n \n \n if(!$this->isUserPresent()) {\n $insert = $this->buildInsertQuery();\n $this->COMMON->executeQuery($insert, $_SERVER[\"SCRIPT_NAME\"]);\n }\n $this->setSessionVariables();\n }", "title": "" }, { "docid": "350e2992d282d20a671ab5911c026725", "score": "0.58004993", "text": "public function forceLogin($id);", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "8eebf425ce52b4bb228e70caffb79698", "score": "0.0", "text": "public function authorize()\n {\n return true;\n }", "title": "" } ]
[ { "docid": "4c4fbdb895548c0ca03ecf5e521e4d5e", "score": "0.8377201", "text": "public function authorize()\n {\n return $this->user() !== null;\n }", "title": "" }, { "docid": "9fb39029db943b6c00f8b0416336e051", "score": "0.82638186", "text": "public function authorize()\n {\n return $this->session()->has('user');\n }", "title": "" }, { "docid": "ddf940100e52b183093f5da8b6491c76", "score": "0.8253612", "text": "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "title": "" }, { "docid": "34d3c3af5616175051b41fb9c31cc830", "score": "0.8234551", "text": "public function authorized()\n {\n $ret = false;\n $user = Auth::user();\n\n switch ($this->access) {\n case '1': // Public\n $ret = true;\n break;\n case '2': // Guest - not authenticated user\n if (! $user) {\n $ret = true;\n }\n break;\n case '3': // Manager\n if ($user) {\n $ret = true;\n }\n break;\n case '4': // Admin\n if ($user) {\n if ($user->isSuperAdmin() || $user->isAdmin()) {\n $ret = true;\n }\n }\n break;\n case '5': // Super Admin\n if ($user) {\n if ($user->isSuperAdmin()) {\n $ret = true;\n }\n }\n break;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "863c6df1a64b6980d99e321f5f5e2d24", "score": "0.8212931", "text": "public function authorize()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "ec001bd38e23218816604180027e4b42", "score": "0.81441534", "text": "public function authorize()\n {\n return ($this->user = $this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "2ce3fad3a905b0d0905cc638404c8da5", "score": "0.8082406", "text": "public function isAuthorized()\n\t{\n\t\t$data = $this->requestTokens;\n\t\treturn ( isset($data['authorized']) && $data['authorized'] === TRUE ) ? TRUE : FALSE;\n\t}", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.8070732", "text": "public function isAuthorized();", "title": "" }, { "docid": "9848174a7f01e602f5b2cca10182994a", "score": "0.8061647", "text": "public function authorize()\n {\n return ($this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "3e98c2c30c025daf1dbec33ac2ed9523", "score": "0.8048158", "text": "public function isAuthorized()\n {\n return (bool) $this->getUserSession();\n }", "title": "" }, { "docid": "db0f0366972c6f6c30b0ff80e42d57c1", "score": "0.8026242", "text": "public function authorize()\n {\n $user = Auth::user();\n\n return $user->can('user-show') || ($user->id == $this->route('user'));\n }", "title": "" }, { "docid": "8fc85fc05a3d85bfc576c3699901db0e", "score": "0.80040145", "text": "public function authorize()\n {\n $loan = $this->route('loan');\n\n return $loan->user_id == auth()->id();\n }", "title": "" }, { "docid": "8fc85fc05a3d85bfc576c3699901db0e", "score": "0.80040145", "text": "public function authorize()\n {\n $loan = $this->route('loan');\n\n return $loan->user_id == auth()->id();\n }", "title": "" }, { "docid": "120024147e0d07455ff16dadfcf576c7", "score": "0.79839325", "text": "protected function _isAuthorized() {\n /*\n * Grant READ access to all authenticated users.\n */\n return $this->getAuthenticatedUserId() !== null;\n }", "title": "" }, { "docid": "8e64a8c8c86463cae319675933f00c0b", "score": "0.7975789", "text": "public function authorize()\n {\n if ($this->hasHeader('Authorization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e2c4dd2c91ad52b7e7052fcb0e3dcf7f", "score": "0.794905", "text": "public function authorize()\n\t{\n\t\t$account = $this->route()->parameter('account');\n\n\t\treturn Auth::id() == $account->user->id;\n\t}", "title": "" }, { "docid": "9bb5d7a6d555ed75f9865f127bc49565", "score": "0.79478514", "text": "public function isAuthorized()\n {\n return Registry::getSession()->hasVariable('sAuthToken') || $this->requiresFinalization();\n }", "title": "" }, { "docid": "cf7b6c6fd0970ab468ba682c6d07199f", "score": "0.7922109", "text": "public function authorize()\n {\n $user = Auth::user();\n if ($user->id == $this->id) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "11b6d6ac4b9b4a1b16c2f0dbdce58acd", "score": "0.79143125", "text": "public static function userIsAuthorized()\n {\n return Authorizer::getAuthorizedUser() != null;\n }", "title": "" }, { "docid": "5a4015ddd6d67b9698e7ea1294ad5c5c", "score": "0.7865671", "text": "public function authorize() {\n if ($this->user_id) {\n if (!in_array(Auth::user()->role, ['M0', 'M1'])) {\n return $this->user_id == Auth::user()->id;\n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "216ce89e8c94ef1355e2156f8b1c6649", "score": "0.7832899", "text": "public function authorize()\n {\n if (Auth()->user()->id != null)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "a8034e553b6dc00172f58eeea2162d97", "score": "0.783249", "text": "public function authorize()\n {\n $response = FALSE;\n $current_user_object = JWTAuth::parseToken()->authenticate();\n if ( $current_user_object->isActiveUser() && ($this->request->get('data[id]', 0, TRUE) == (int)$current_user_object->id) ) {\n $response = TRUE;\n }//if ( $current_user_object->isActiveUser() && ($this->request->get('data[id]', 0, TRUE) === (int)$current_user_object->id) )\n if ( $current_user_object->hasRule('user_update') ) {\n $response = TRUE;\n }//if ( $current_user_object->hasRule('user_update') )\n return $response;\n }", "title": "" }, { "docid": "c101c69ebf7bb8565886634de4c6a385", "score": "0.78304625", "text": "public function authorize() {\n return !is_null($user = \\Auth::user()) && ($user->is_admin || $this->route('accounts') == $user->profile->account->id);\n }", "title": "" }, { "docid": "035be3bbba4ddae1a64e8dbede997acc", "score": "0.781955", "text": "public function authorize()\n {\n if ($this->user()->role->id == 1)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "417dc61506afb0d0e60deac84ec87b5e", "score": "0.7818505", "text": "public function authorize()\n {\n return auth()->user() ? true : false;\n }", "title": "" }, { "docid": "8ce5e55d8de132818f8e320f37d54204", "score": "0.78063834", "text": "public function authorize()\n {\n return ($this->user()->hasRole('admin') || $this->user()->hasRole('manager'));\n }", "title": "" }, { "docid": "ad0328eb77e1742a2984285101bebeb3", "score": "0.7798022", "text": "public function authorize()\n {\n return auth('api')->check() && auth('api')->user()->id === request('id');\n }", "title": "" }, { "docid": "0c5acd04242b11ada42962c187851765", "score": "0.77811307", "text": "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "title": "" }, { "docid": "82f1cfbd42d07c07ccf54c4bb9b5c281", "score": "0.77779746", "text": "public function authorize()\n {\n $user = Auth::user();\n\n if (!$user->can(['edit-request_tenant', 'edit-request_service', 'edit-request'])) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "9020bf02522f41c3531f9fef468b02c3", "score": "0.77726173", "text": "function isAuthorized() {\n // Currently we do all meaningful checks in beforeFilter().\n\n return true;\n }", "title": "" }, { "docid": "0e5445da679a30337df458d7c01debfb", "score": "0.7768395", "text": "function isAuthorized() {\n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Login?\n $p['login'] = true;\n \n // Logout\n $p['logout'] = true;\n\n $this->set('permissions', $p);\n return $p[$this->action];\n }", "title": "" }, { "docid": "a4ba202c2342f9f434997ee6a8aece0a", "score": "0.7767021", "text": "public function authorize()\n {\n $user = \\Auth::user();\n\n if ( ! $user) {\n return false;\n }\n\n if ($user->isAdmin()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "35bd592fbaf85edbcfd36360cdfc9b65", "score": "0.7763412", "text": "public function isAuthorized () {\n return $this->uploader->isAuthorized();\n }", "title": "" }, { "docid": "94f42bab0960da47a4112cc7f5c19c74", "score": "0.7762168", "text": "public function authorize()\n {\n $action = $this->action();\n return $action ? $action->autorize() : false;\n }", "title": "" }, { "docid": "ca19b39797807c320b30262918c0c26f", "score": "0.7754543", "text": "public function isAuthorized()\n {\n return true;\n }", "title": "" }, { "docid": "52e4f38355f6f793aafabcb853d8a6da", "score": "0.77464604", "text": "public function authorize()\n {\n return $this->user()->can('view', $this->route('client'));\n }", "title": "" }, { "docid": "5bc0e01d7ee7d281e405ff13324a39ba", "score": "0.77455103", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_users') ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5b4c01003b40c31053fde7580331e0fc", "score": "0.7738395", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8d9006fe8b0c464c7dd28085ae91aa20", "score": "0.7732987", "text": "public function authorize()\n {\n if(!Auth::guest() && Auth::user()->id == $this->id)\n return true;\n }", "title": "" }, { "docid": "5991897bbbbc9438c63bcd58a4f4e055", "score": "0.77221936", "text": "public function authorize()\n {\n switch ($this->method())\n {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "title": "" }, { "docid": "fd10872049d6d3194517d776d9378451", "score": "0.77177185", "text": "public static function is_authorized() {\r\n\t\treturn Ga_Admin::api_client()->get_instance()->is_authorized();\r\n\t}", "title": "" }, { "docid": "450666b56766fcf940c23c5469ec46f0", "score": "0.77152175", "text": "public function authorized(): bool\n {\n return $this->authorized;\n }", "title": "" }, { "docid": "bf3b315e77797f32e591eb5b076d3465", "score": "0.7709501", "text": "public function authorize()\n {\n $role = auth()->user()->getAttributes()['role'];\n $resource = substr($this->route()->getActionName(), strrpos($this->route()->getActionName(), '\\\\') + 1);\n\n return \\App\\Acl::isAuthorized($role, $resource);\n }", "title": "" }, { "docid": "179372ea52f0f075fecfabbcdeda1536", "score": "0.7695277", "text": "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Configure CO Service Token Settings\n $p['configure'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }", "title": "" }, { "docid": "b52a7d231cbf064e0aa21522a4375fec", "score": "0.7693273", "text": "public function authorize()\n {\n $user = \\Auth::user();\n\n if ( ! $user) {\n return false;\n }\n\n if ($user->isAdmin()) {\n return true;\n }\n if ($user->isGuest()) {\n return false;\n }\n\n $site = $this->route('sites');\n\n if ($site->hasUser($user)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "dcc3c505819c77212d437ed9d2e7f7b1", "score": "0.76902485", "text": "public function authorize()\n {\n if (! hash_equals((string) $this->user()->getKey(), (string) $this->route('id'))) {\n return false;\n }\n\n if (! hash_equals(sha1($this->user()->getEmailForVerification()), (string) $this->route('hash'))) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "18dc817546bd6f577d86f493538ef8fc", "score": "0.76792604", "text": "public function authorize()\n {\n $user = User::find($this->route('id'));\n\n if (!$user) {\n return false;\n }\n\n if (! hash_equals((string) $this->route('id'), (string) $user->getKey())) {\n return false;\n }\n\n if (! hash_equals((string) $this->route('hash'), sha1($user->getEmailForVerification()))) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "2d62735e84461bb4fe7d53887095c433", "score": "0.76791996", "text": "public function authorize()\n {\n $user = $this->user();\n\n return $user->isAdmin() || $user->hasKey('post-alerts-users');\n }", "title": "" }, { "docid": "525409b531efb7016e5017aad86ebcc0", "score": "0.7678927", "text": "public function authorize()\n {\n $user = auth()->user();\n $robotId = $this->input('robot_id');\n $environmentId = $this->input('environment_id');\n\n // authorize only if user has related entities associated\n return $user->ownsRobot($robotId) && $user->ownsEnvironment($environmentId);\n }", "title": "" }, { "docid": "6262b92495ccedcc885e418484fe13c8", "score": "0.76664656", "text": "public function isAuthorized()\n {\n \\AppRoot::doCliOutput(\"User($this->displayname)->isAuthorized()\");\n\n // Check session\n if ($this->getSession(\"authorized\") !== null)\n return $this->getSession(\"authorized\");\n\n if ($this->isValid === null)\n $this->fetchIsAuthorized();\n\n $this->setSession(\"authorized\", $this->isValid);\n return $this->isValid;\n }", "title": "" }, { "docid": "c9e0567fbc8600185245fd749da3a80c", "score": "0.76532054", "text": "public function authorize()\n {\n if(auth()->check()){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "27e29e66b8ab942ea5cc0c3e77f3dc4b", "score": "0.7649922", "text": "public function authorize() : bool\n {\n return $this->checkUserAbleToSend();\n }", "title": "" }, { "docid": "862f2d833e96dfe116cb39f2e073e367", "score": "0.7645821", "text": "function isAuthorized(){\n return $this->__permitted($this->name,$this->action);\n }", "title": "" }, { "docid": "657b5c9c810f4a06aaeb4e63dee04837", "score": "0.7630052", "text": "public function authorize()\n {\n $currentUser = Auth::user();\n if($currentUser->profile and $currentUser->profile->isAdmin)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "e2dbd9d3263458d567479821ff82bfc5", "score": "0.76282746", "text": "public function isAuthorized() {\n return !empty($this->api_key) && !empty($this->api_secret) && $this->getRefreshToken();\n }", "title": "" }, { "docid": "ce50204e7668370fb3488c491e64c948", "score": "0.7627047", "text": "public function authorize()\n {\n return $this->getApiAuthedUser() && $this->getApiAuthedUser()->can('call interfaces');\n }", "title": "" }, { "docid": "4c5ad0a939316e07eda4f5bc86b72cd8", "score": "0.7619443", "text": "public function authorize()\n {\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "title": "" }, { "docid": "566cf25ae1520b43e02bdb99b0904208", "score": "0.76168334", "text": "public function authorize()\n {\n //$isSamePartner = (\\Auth::user()->partner_id == $this->partner_id);\n $hasAccess = \\Auth::check() && (\\Auth::user()->can('admin'));\n\n return $hasAccess;\n }", "title": "" }, { "docid": "05ba8b9af30207766e0006058fe71791", "score": "0.76159143", "text": "public function authorize(): bool\n {\n return $this->auth->check();\n }", "title": "" }, { "docid": "5fbd7a151e0f80d37790cc993af4d0a6", "score": "0.7609843", "text": "public function authorize()\n {\n $eventType = EventType::find($this->route('id'));\n return !is_null($eventType) && $eventType->owner == Auth::id();\n }", "title": "" }, { "docid": "7721e9deb876b374da55f4c6b2acd97a", "score": "0.7600515", "text": "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "b58a6cd434f34600b09a3b8be032e33b", "score": "0.7599175", "text": "public function authorize()\n {\n return (request()->user()->user_type == env('CUSTOMER_ROLE_ID'));\n }", "title": "" }, { "docid": "cfb6bd3751c0ccd791cd47f7baf526cb", "score": "0.7598978", "text": "public function authorize()\n {\n return $this->user()->can('view-users');\n }", "title": "" }, { "docid": "8b8eb40f2dec3977ba8b3ecc3349bf4d", "score": "0.7587994", "text": "public function authorize(): bool\n {\n return $this->roleGuard->verifiedUserOnly();\n }", "title": "" }, { "docid": "a46b0a139ee6646088a7b14a71906fc2", "score": "0.758775", "text": "public function authorize()\n {\n // Covered by Admin user auth\n return true;\n }", "title": "" }, { "docid": "55a064e5f61bf9a20ce281a304281c6e", "score": "0.7587354", "text": "public function needAuthorization()\n {\n return !$this->authorized;\n }", "title": "" }, { "docid": "61aa083b1f34b0c4e6efa2807e0f886d", "score": "0.7587287", "text": "public function authorize()\n {\n return $this->user()->isAnAdmin();\n }", "title": "" }, { "docid": "51813bf938b8b47738a3fe34ffb2b8a8", "score": "0.75862676", "text": "public function authorize()\n\t{\n\t\tif (Auth::user()->hasRole('admin'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check that auth user is owner of current entry\n\t\treturn $this->route('entries')->user_id == Auth::id();\n\t}", "title": "" }, { "docid": "5ef8fb8cbe67dc32400bb99dea092a6a", "score": "0.75776064", "text": "public function authorize()\n {\n // TODO: set correct check\n return true;\n }", "title": "" }, { "docid": "54c565a6e372b2e0f2bc66fef64e4e67", "score": "0.7573596", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('associate_photos') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "757aa00da3be83100c7a0c611e4b3382", "score": "0.7566827", "text": "public function authorize()\n {\n $post = Post::findFromSlug($this->slug);\n return $post->user_id == $this->user()->id;\n }", "title": "" }, { "docid": "576d25476f03c1201737996782e3957b", "score": "0.7566621", "text": "public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', User::class);\n }\n\n return $this->user()->can('update', User::class);\n }", "title": "" }, { "docid": "12b87e1bd82e607872d97602f87fc7f3", "score": "0.7566558", "text": "public function is_authorized()\r\n {\r\n if ($this->is_admin() || strtolower($this->role) == MANAGER_ROLE) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "313d94e8acea8646cc8150a6ab69f739", "score": "0.7565", "text": "public function authorize()\n {\n return !user();\n }", "title": "" }, { "docid": "f2070be821a6d29e7227c6b58c6461a4", "score": "0.75638413", "text": "public function authorize()\n {\n // Check permissions:\n // - Make sure the author_id is friends with profile_user_id\n // - OR check if profile_user_id's permissions are free\n\n return Auth::check();\n }", "title": "" }, { "docid": "f0f9ffc89a816096a377c84a90f3fc6e", "score": "0.7563504", "text": "public function authorize()\n {\n if(Auth::user()->is('System Admin') || Auth::user()->is('Super Admin')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ddf07a2b01ff2619fc5c7deaa69edc81", "score": "0.75617874", "text": "public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d69a30d4d6de445410b826bd96e3442a", "score": "0.75567424", "text": "public function authorize()\n {\n $shop = Shop::find($this->route('id'));\n return $shop && $shop->owner_id == Auth::ownerId();\n }", "title": "" }, { "docid": "c4f8bae32350577d9845bcf15c0addbf", "score": "0.75566745", "text": "public function authorize()\n {\n if(ApiHelper::isPatient($this->route('user_id')) \n && ApiHelper::isMedicineOfPatient($this->route('user_id'), $this->route('medicine_id')) )\n {\n return true;\n } \n return false;\n }", "title": "" }, { "docid": "d9bbceb0e04be12bdfdc0f84c97ff4be", "score": "0.75510716", "text": "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "title": "" }, { "docid": "d9bbceb0e04be12bdfdc0f84c97ff4be", "score": "0.75510716", "text": "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "title": "" }, { "docid": "22fc9e045f308437b0880842b8cfffbc", "score": "0.7548476", "text": "public function authorize()\n {\n $profileId = $this->route('profile');\n if ($profileId == Auth::user()->userProfile->id) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "377990f0a9740bf53639b42332e12e69", "score": "0.7547961", "text": "public function authorize()\n {\n if (Auth::user()->role === User::ROLE_MANAGER ) {\n return true;\n }elseif (Auth::user()->id == $this->all()['id']){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8aae643f98e4456d7e938e0b0c7c28dd", "score": "0.7547769", "text": "public function authorize()\n {\n if (auth()->user()->role_id !== NULL) {\n return true;\n }\n }", "title": "" }, { "docid": "a3a78a572f6eef51750e3dc5e37429fc", "score": "0.75471973", "text": "public function authorize()\n {\n return !$this->route('user')->isDemoUser();\n }", "title": "" }, { "docid": "e9628c01fe5befe8b15c063926813a03", "score": "0.75464207", "text": "public function authorize(){\n\t\t// @todo use middleware here?\n\t\tif(false === Auth::check()){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "55abdd559303c329b3642b9dbba91608", "score": "0.75455177", "text": "public function authorize()\n {\n return Auth::user()->hasPermissionTo('edit own user');\n }", "title": "" }, { "docid": "8557e8037d44598da236d60726cc54ca", "score": "0.75450045", "text": "public function authorize()\n {\n return Auth::id() && $this->wallet->user_id == Auth::id();\n }", "title": "" }, { "docid": "f8693c9e7d0b93aeffaaf00d5aa72a6b", "score": "0.7539092", "text": "public function authorize(): bool\n {\n $this->resource = $this->route()->hasParameter('user') ? $this->route('user') : new User();\n\n return true;\n }", "title": "" }, { "docid": "06375e69b53852716571c5cd01fbb7ee", "score": "0.75384843", "text": "public function authorize()\n {\n if( Auth::check() ){\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5b276d01c340c0e7092d9b11f13e0d8f", "score": "0.7537573", "text": "public function authorize()\n {\n if(!Auth::check()) return false;\n $user = User::find(Auth::user()->id);\n if($user->hasRole('admin') || $user->hasRole('superadmin')) return true;\n return false;\n }", "title": "" }, { "docid": "b8a022575057dc26c26137b5094f8fef", "score": "0.75346184", "text": "public function isAuthorized(Request $request)\n {\n $this->getLoggedUser($request);\n if ($this->loggedUser !== null) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "830a74071d48f3c6c6995bcaf41514b5", "score": "0.75232714", "text": "public function authorize()\n {\n if (\\Auth::user()->hasPermission('budget_simulation.budget_simulation'))\n {\n return true; \n }\n return false;\n }", "title": "" }, { "docid": "f049cb35e1fcd225a6e4cd3f673d4554", "score": "0.75231916", "text": "public function authorize(): bool\n {\n // Set to true because the authorization check happends\n // On the controller action.\n\n return true;\n }", "title": "" }, { "docid": "6fc67c364054e2addcf0d2403343fadb", "score": "0.7518512", "text": "public function isAuthorised() {\n\t\treturn $this->authorised=='t';\n\t}", "title": "" }, { "docid": "e75bc1ab5f56ab3b91b31cbca75e6ff3", "score": "0.7517669", "text": "public function authorize()\n\t{//to be changed with user authentication done\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1c2b6cace8bc73fda3bf58536736220e", "score": "0.7516545", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0ca62aaa4bbad2899cd4d2f0516c8c64", "score": "0.7504297", "text": "public function authorize()\n {\n if(Auth::user()->role == 1) return true;\n return false;\n }", "title": "" }, { "docid": "8a959493bfa9ffdcfe1d32b1846e3c17", "score": "0.7503306", "text": "public function isAuthorized($user = null, CakeRequest $request = null) {\n return (true);\n }", "title": "" }, { "docid": "348db2f518547ba0e43ad0c9919d247e", "score": "0.7495185", "text": "protected function _isAuthorized()\n {\n if (isset($this->session->services['facebook'])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "9320f8ef578ca5b72252eaed0363faab", "score": "0.7493694", "text": "public function authorize()\n {\n return (auth()->check() && auth()->user()->is_admin);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "b273072538066e3117359bfed973e64c", "score": "0.0", "text": "public function show(Employee $employee, $id)\n {\n $this->authorize('showSalary', $employee);\n\n $salary = $employee->salaries()\n ->orderBy('to_date')\n ->skip($id - 1)\n ->take(1)\n ->get();\n\n return $salary->toJson();\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": "03308cdf1f3eb0c47d8f3059a2a11231", "score": "0.7062654", "text": "public function show(Resource $resource)\n {\n app('App\\Http\\Controllers\\ViewsController')->resourceView($resource);\n\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.70187664", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "426f9c78118dbbe009edc89fcf8571df", "score": "0.6748524", "text": "public function show(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json($resource);\n }", "title": "" }, { "docid": "921410ad408e73391c76fba66fc4ab57", "score": "0.65274835", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n require_once($CFG->libdir.'/filelib.php');\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 /// Fetch parameters\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n $page = optional_param('page', 0, PARAM_INT);\n $frameset= optional_param('frameset', '', PARAM_ALPHA);\n\n /// Init some variables\n $errorcode = 0;\n $buttontext = 0;\n $querystring = '';\n $resourcetype = '';\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 /// Cache this per request\n static $items;\n\n /// Check for errors\n $errorcode = $this->check4errors($resource->reference, $course, $resource);\n\n /// If there are any error, show it instead of the resource page\n if ($errorcode) {\n if (!has_capability('moodle/course:activityvisibility', get_context_instance(CONTEXT_COURSE, $course->id))) {\n /// Resource not available page\n $errortext = get_string('resourcenotavailable','resource');\n } else {\n /// Depending of the error, show different messages and pages\n if ($errorcode ==1) {\n $errortext = get_string('invalidfiletype','error', $resource->reference);\n } else if ($errorcode == 2) {\n $errortext = get_string('filenotfound','error', $resource->reference);\n } else if ($errorcode == 3) {\n $errortext = get_string('packagenotdeplyed','resource');\n } else if ($errorcode == 4) {\n $errortext = get_string('packagechanged','resource');\n } else if ($errorcode == 5) {\n $errortext = get_string('packagenotdeplyed','resource'); // no button though since from repository.\n }\n }\n /// Display the error and exit\n if ($inpopup) {\n print_header($pagetitle, $course->fullname.' : '.$resource->name);\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n print_simple_box_start('center', '60%');\n echo '<p align=\"center\">'.$errortext.'</p>';\n /// If errors were 3 or 4 and isteacheredit(), show the deploy button\n if (has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id)) && ($errorcode == 3 || $errorcode == 4)) {\n $link = 'type/ims/deploy.php';\n $options['courseid'] = $course->id;\n $options['cmid'] = $cm->id;\n $options['file'] = $resource->reference;\n $options['sesskey'] = $USER->sesskey;\n $options['inpopup'] = $inpopup;\n if ($errorcode == 3) {\n $label = get_string ('deploy', 'resource');\n } else if ($errorcode == 4) {\n $label = get_string ('redeploy', 'resource');\n }\n $method='post';\n /// Let's go with the button\n echo '<center>';\n print_single_button($link, $options, $label, $method);\n echo '</center>';\n }\n print_simple_box_end();\n /// Close button if inpopup\n if ($inpopup) {\n close_window_button();\n }\n\n print_footer();\n exit;\n }\n\n /// Load serialized IMS CP index to memory only once.\n if (empty($items)) {\n if (!$this->isrepository) {\n $resourcedir = $CFG->dataroot.'/'.$course->id.'/'.$CFG->moddata.'/resource/'.$resource->id;\n }\n else {\n $resourcedir = $CFG->repository . $resource->reference;\n }\n if (!$items = ims_load_serialized_file($resourcedir.'/moodle_inx.ser')) {\n error (get_string('errorreadingfile', 'error', 'moodle_inx.ser'));\n }\n }\n\n /// Check whether this is supposed to be a popup, but was called directly\n\n if (empty($frameset) && $resource->popup && !$inpopup) { /// Make a page and a pop-up window\n\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", 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}\\\" target=\\\"resource{$resource->id}\\\" onclick=\\\"return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', 'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo \"<p>&nbsp;</p>\";\n echo '<p align=\"center\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo \"</p>\";\n\n print_footer($course);\n exit;\n }\n\n\n /// No frames or framesets anymore, except iframe. in print_ims, iframe filled.\n /// needs callback to this file to display table of contents in the iframe so\n /// $frameset = 'toc' leads to output of toc and blank or 'ims' produces the\n /// iframe.\n if (empty($frameset) || $frameset=='ims') {\n\n /// Conditional argument to pass to IMS JavaScript. Need to be global to retrieve it from our custom javascript! :-(\n global $jsarg;\n $jsarg = 'false';\n if (!empty($this->parameters->navigationmenu)) {\n $jsarg = 'true';\n }\n /// Define $CFG->javascript to use our custom javascript. Save the original one to add it from ours. Global too! :-(\n global $standard_javascript;\n $standard_javascript = $CFG->javascript; // Save original javascript file\n $CFG->javascript = $CFG->dirroot.'/mod/resource/type/ims/javascript.php'; //Use our custom IMS javascript code\n\n /// moodle header\n if ($resource->popup) {\n //print_header($pagetitle, $course->fullname.' : '.$resource->name);\n print_header();\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n }\n /// content - this produces everything else\n $this->print_ims($cm, $course, $items, $resource, $page);\n /// Moodle footer is back! Now using the DOMContentLoaded event (see resize.js) to trigger the resize\n /// no Moodle footer (because we cannot insert there the resize script).\n /// echo \"</div></div><script type=\\\"text/javascript\\\">resizeiframe($jsarg);</script></body></html>\";\n /// print_footer();\n echo \"</div></div></body></html>\";\n\n /// log it.\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n exit;\n }\n\n if ($frameset == 'toc') {\n print_header();\n $this->print_toc($items, $resource, $page);\n echo '</div></div></body></html>';\n exit;\n }\n }", "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": "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": "02d611037299aac573636734fd64f517", "score": "0.59945476", "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_League l')\n ->where('l.leagueid = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->league = $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": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "7b8f897ba2297696b69f6d8202444107", "score": "0.59492433", "text": "public function displayAction()\n {\n $params = $this->dispatcher->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n echo Las::display($firewall->name);\n }\n }", "title": "" }, { "docid": "89b549ed67b4702bbd94de618931239c", "score": "0.594717", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "d8bcb4a6a484fbd4595bf60c13751c5f", "score": "0.5916333", "text": "public function display()\n {\n $this->_getAdapter()->display();\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": "58526873a63ddff4b306282ce5155a89", "score": "0.58138895", "text": "public static function output($resource)\r\n\t{\r\n\t\tif (isset(self::$_resources[$resource])) {\r\n\t\t\t$res =& self::$_resources[$resource];\r\n\r\n\t\t\tif (function_exists('getInternalResource') && $data = getInternalResource($res['data'])) {\r\n\t\t\t\t$filename = self::$embedding_file;\r\n\t\t\t} else {\r\n\t\t\t\t$filename = $res['data'];\r\n\t\t\t}\r\n\r\n\t\t\t// use last-modified time as etag; etag must be quoted\r\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\r\n\r\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\r\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\r\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\theader('Etag: ' . $etag);\r\n\r\n\t\t\t// cache file for at most 30 days\r\n\t\t\theader('Cache-control: max-age=2592000');\r\n\r\n\t\t\t// output resource\r\n\t\t\theader('Content-type: ' . $res['mime']);\r\n\r\n\t\t\tif (isset($data)) {\r\n\t\t\t\tif (isset($res['base64'])) {\r\n\t\t\t\t\techo base64_decode($data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo $data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treadfile($filename);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "426c72f34858b1f8fc0c2377d1350691", "score": "0.58062166", "text": "public function show()\n {\n $arguments = func_get_args()[0];\n $id = $arguments[0];\n\n echo \"Show $id\";\n // return $this->view('example.show');\n }", "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": "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": "ecd6aa7074b9a655f317e213378a7ab9", "score": "0.57773685", "text": "public function show() {\n if (isset($_GET['name'])) {\n $this->view->source = $this->model::getByName($_GET['name']);\n }\n\n $this->view->setData($this->model::get($_GET));\n $this->view->setTemplate(SRC_SHOW);\n $this->view->setLayout(SHOW_LAYOUT);\n $this->view->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": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "91b553cd446c5431be6377bad7d6e9b7", "score": "0.57440376", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\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": "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": "6c6591ff03468044c76e66dc3ecca033", "score": "0.57143193", "text": "public function display(): Response;", "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": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "690a36be877c22d14829a018fd5e04e9", "score": "0.56947994", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $information = $em->getRepository('ThiefaineReferentielBundle:Information')->find($id);\n\n if (!$information) {\n throw $this->createNotFoundException(\"Impossible de trouver l'information.\");\n }\n\n $showForm = $this->createShowForm($information);\n $twig = 'ThiefaineReferentielBundle:Information:show.html.twig';\n $paramTwig = array(\n 'information' => $information,\n 'show_form' => $showForm->createView(),\n );\n\n return $this->render($twig,$paramTwig);\n }", "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": "" } ]
e2f3c10b1e013ecce387961351ad2089
Set values to the query. The method can execute multiple times. The passed array require the same amount of elements, otherwise an exception will thrown.
[ { "docid": "a6322bd0687b67fff3c8dc5f15a0e3fd", "score": "0.549", "text": "public function values(array $values);", "title": "" } ]
[ { "docid": "f5827d2d1ede16059cacd103e98ca6d2", "score": "0.7120114", "text": "public function set($array);", "title": "" }, { "docid": "f9aee7fb2486cbf8fa6a61c0b6a9b12a", "score": "0.70793265", "text": "public function fill($array, $set = 'query')\n {\n $this->$set = $array;\n }", "title": "" }, { "docid": "a0ce487005d2c582820c02098d11074a", "score": "0.7070291", "text": "public function setQuery(array $query);", "title": "" }, { "docid": "17ccbafcf20ab318eb0fd9b32a1be917", "score": "0.6838203", "text": "function setValues($array) {\n\t\t$this->exchangeArray($array);\n\t}", "title": "" }, { "docid": "bcac0bf424f4386d0769e9f76b523578", "score": "0.6668275", "text": "public function setQueryArr($query){\n\t\tif (is_array($query)){\n\t\t\t$this->query = $query;\n\t\t} else {\n\t\t\t$this->query = array();\n\t\t}\n\t}", "title": "" }, { "docid": "a03d83b6f62af809b5157a7c662ffecd", "score": "0.65395325", "text": "public function setArray($array)\n {\n // Multiple elements are present\n if (is_array($array[0])) {\n foreach ($array as $option) {\n // Check if comment is available.\n if (count($option) == 2) {\n $this->updateOrCreate(\n ['key' => $option[0]],\n ['value' => $option[1]]\n );\n } else {\n $this->updateOrCreate(\n ['key' => $option[0]],\n ['value' => $option[1], 'comment' => $option[2]]\n );\n }\n }\n } else {\n $option = $array;\n // Check if comment is available.\n if (count($option) == 2) {\n $this->updateOrCreate(\n ['key' => $option[0]],\n ['value' => $option[1]]\n );\n } else {\n $this->updateOrCreate(\n ['key' => $option[0]],\n ['value' => $option[1], 'comment' => $option[2]]\n );\n }\n }\n }", "title": "" }, { "docid": "85e0a50fc4336aa88d87aaf8ad8ede38", "score": "0.65303934", "text": "public function setFromArray ($array)\n {\n foreach($array as $field => $value)\n {\n if($this->isField($field))\n $this->$field = $value;\n } \n }", "title": "" }, { "docid": "8f0b9db1521671a37c3c6e7a66fb9d62", "score": "0.6517382", "text": "public function set(array $values)\n {\n $this->enableIsNullSyntax = false;\n $v = $this->buildWhereClauseFromArray([self::VALUES_DELIMITER => $values]);\n $this->unsafeAppendSQLPart('values', \"SET $v\");\n return $this;\n }", "title": "" }, { "docid": "7975e122a875873d95c72e1312e9a546", "score": "0.6471788", "text": "public function setQuery(array $arg){\n\t\tarray_push($this->m_query, $arg);\n\t}", "title": "" }, { "docid": "177f651c04e3b446801920399186dccf", "score": "0.64619297", "text": "public function setQuery( $query=[] )\n {\n if( is_array( $query ) )\n {\n $this->query = $query;\n }\n }", "title": "" }, { "docid": "3ceacda5e277755466782590dd9104f8", "score": "0.63742554", "text": "public function fill($array=array())\n\t{\n\t\tforeach ($array as $field=>$value)\n\t\t{\n\t\t\t#TODO add filter here\n\t\t\t$this->$field = $value;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "123070e1055ece6892131bd961c3b183", "score": "0.63690907", "text": "function Set(array $setObject)\n {\n\n $setParameters = \"\";\n foreach ($setObject as $key => $value) {\n $valueUpdated = processValueType($value);\n if ($valueUpdated == '?') {\n $this->params[] = [getSqlType($value), $value];\n }\n if (strlen($setParameters) > 0) $setParameters .= \",\";\n $setParameters .= \"$key=$valueUpdated\";\n }\n $this->setParameters = $setParameters;\n // $setParameters .= \"\";\n return $this;\n }", "title": "" }, { "docid": "515682b85f2e8cdd6beffa36b2502e84", "score": "0.6325754", "text": "public function setData($array)\r\n {\r\n //need interface\r\n if ($array instanceof \\Db\\ConstantValues)\r\n {\r\n $array = $array->getArray();\r\n }\r\n else if ($array instanceof \\Db\\Collection)\r\n {\r\n $array = $array->getData();\r\n }\r\n\r\n $this->data = $array;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "cce37ff99cfbaad0b8673e8e5e051160", "score": "0.6294981", "text": "public function setArray($array)\n {\n foreach ($array as $name => $instance) {\n $this->set($name, $instance);\n }\n }", "title": "" }, { "docid": "ac570aab8ffa4097ca64c17451f52532", "score": "0.62786055", "text": "public function setQueryVariables(array $array)\r\n {\r\n if (!$array) {\r\n $this->_query = false;\r\n } else {\r\n foreach ($array as $name => $value) {\r\n if ($this->getOption(self::OPTION_ENCODE_KEYS)) {\r\n $name = self::urlencode($name);\r\n }\r\n\r\n if (is_array($value)) {\r\n foreach ($value as $k => $v) {\r\n $parts[] = $this->getOption(self::OPTION_USE_BRACKETS)\r\n ? sprintf('%s[%s]=%s', $name, $k, $v)\r\n : ($name . '=' . $v);\r\n }\r\n } elseif (!is_null($value)) {\r\n $parts[] = $name . '=' . self::urlencode($value);\r\n } else {\r\n $parts[] = $name;\r\n }\r\n }\r\n $this->_query = implode($this->getOption(self::OPTION_SEPARATOR_OUTPUT),\r\n $parts);\r\n }\r\n }", "title": "" }, { "docid": "ff036773e8875041f3a1346db2199777", "score": "0.62560254", "text": "public function set(array $data);", "title": "" }, { "docid": "c47438ed18a4c4286df51103cda966eb", "score": "0.6244795", "text": "public function setQueryVariables(array $array)\n {\n if (!$array) {\n $this->_query = false;\n } else {\n foreach ($array as $name => $value) {\n if ($this->getOption(self::OPTION_ENCODE_KEYS)) {\n $name = self::urlencode($name);\n }\n\n if (is_array($value)) {\n foreach ($value as $k => $v) {\n $parts[] = $this->getOption(self::OPTION_USE_BRACKETS)\n ? sprintf('%s[%s]=%s', $name, $k, $v)\n : ($name . '=' . $v);\n }\n } elseif (!is_null($value)) {\n $parts[] = $name . '=' . self::urlencode($value);\n } else {\n $parts[] = $name;\n }\n }\n $this->_query = implode($this->getOption(self::OPTION_SEPARATOR_OUTPUT),\n $parts);\n }\n }", "title": "" }, { "docid": "8b5f443d511bc4e8eacd81c8079eb065", "score": "0.62144417", "text": "public function values(array $values)\r\n {\r\n if ( ! is_array($this->values))\r\n {\r\n throw new \\Exception('INSERT INTO ... SELECT statements cannot be combined with INSERT INTO ... VALUES');\r\n }\r\n\r\n // Get all of the passed values\r\n $values = func_get_args();\r\n\r\n // And process them\r\n foreach ($values as $value)\r\n {\r\n if (is_array(reset($value)))\r\n {\r\n $this->values = array_merge($this->values, $value);\r\n }\r\n else\r\n {\r\n $this->values[] = $value;\r\n }\r\n }\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "4cf24c2e1234ee70ad13f1b9b340febe", "score": "0.6144988", "text": "public function setArray( $array )\r\n {\r\n $this->array = $array;\r\n }", "title": "" }, { "docid": "fa69c96ad8170c5471930c7fe9c3f9b5", "score": "0.6098085", "text": "public function setValues( $values){}", "title": "" }, { "docid": "736e7fe9853efa71e9a772bebb5e0101", "score": "0.6097569", "text": "public function setValues($params = array()):EasyQueryBuilder{\n //and value represent the value to be set to the column while updating the table\n $this->values = $params;\n return $this;\n }", "title": "" }, { "docid": "44678c92ea5d06b876f208a399745622", "score": "0.6066316", "text": "public function setValues(array $values)\n {\n $this->values = $values;\n }", "title": "" }, { "docid": "9521c679acd8a30c06012dddbb63a009", "score": "0.5986423", "text": "public function values(array $values)\n\t{\n\t\tif ( ! is_array($this->_values))\n\t\t{\n\t\t\tthrow new Kohana_Exception('INSERT INTO ... SELECT statements cannot be combined with INSERT INTO ... VALUES');\n\t\t}\n\n\t\t// Get all of the passed values\n\t\t$values = func_get_args();\n\n\t\t$this->_values = array_merge($this->_values, $values);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "50e128e8a02c6fd50b439032f9ef157e", "score": "0.5978766", "text": "public function query($strQuery, $arrValues = []);", "title": "" }, { "docid": "41f3f9fdbcf5d1a31bf103e20e011ba7", "score": "0.5976281", "text": "public function setDataArray($vals);", "title": "" }, { "docid": "63dca70b782bac8c1cebabd4028630ba", "score": "0.5976199", "text": "public function setData($array)\r\n {\r\n foreach ($this->properties as $property) {\r\n if (isset($array[$property])) {\r\n $value = $array[$property];\r\n $setter = str_replace('_', '', 'set' . $property);\r\n $this->{$setter}($value);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3ac877aa2795bf38e118de3128a4aab0", "score": "0.59611565", "text": "public function values(array $values)\n {\n $fields = array_keys($values);\n $fields = $this->wrap($fields);\n \n // Resolve value bindings\n foreach($values as $value) {\n $this->queries['values'][] = $this->resolveBindings($value);\n }\n\n $this->queries['insert'][] = '(' .implode(', ', $fields). ')';\n return $this;\n }", "title": "" }, { "docid": "2b57dc07b35ef3b6732969e2b5d58922", "score": "0.59450924", "text": "public function set($params = array()):EasyQueryBuilder{\n //$params (parameters) are set of key-value pairs where key represent the column \n //and value represent the value to be set to the column while updating the table\n $this->qry .= \" set \";\n foreach ($params as $key => $value) {\n $this->qry .= $key.\" = ? ,\"; \n $val = $this->getCorrectValue($value);\n array_push($this->values,$val);\n }\n $this->qry = rtrim($this->qry,',');\n return $this;\n }", "title": "" }, { "docid": "847837eb82fb61ae229c6a12549869c4", "score": "0.59271127", "text": "public function assignByArray($array) {\n\t\t$result=array();\n\t\tforeach ($array as $fieldId=>$value) {\n\t\t\t$result[self::$FIELD_NAMES[$fieldId]]=$value;\n\t\t}\n\t\t$this->assignByHash($result);\n\t}", "title": "" }, { "docid": "847837eb82fb61ae229c6a12549869c4", "score": "0.59271127", "text": "public function assignByArray($array) {\n\t\t$result=array();\n\t\tforeach ($array as $fieldId=>$value) {\n\t\t\t$result[self::$FIELD_NAMES[$fieldId]]=$value;\n\t\t}\n\t\t$this->assignByHash($result);\n\t}", "title": "" }, { "docid": "847837eb82fb61ae229c6a12549869c4", "score": "0.59271127", "text": "public function assignByArray($array) {\n\t\t$result=array();\n\t\tforeach ($array as $fieldId=>$value) {\n\t\t\t$result[self::$FIELD_NAMES[$fieldId]]=$value;\n\t\t}\n\t\t$this->assignByHash($result);\n\t}", "title": "" }, { "docid": "18340c3c7ea23e414aa70ee4caa97891", "score": "0.5915316", "text": "private function setFromArray(array $array, $new = false)\n {\n $idColName = static::idColName();\n\n if (isset($array[$idColName]) && $new == false) {\n $this->setId($array[$idColName]);\n }\n\n if (empty($array)) {\n throw new Exception('Illegal empty array');\n }\n\n if($new == true){\n unset($array[$idColName]);\n }\n\n foreach($array as $key => $data){\n $propertySetter = 'set'.str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));\n if(in_array($propertySetter, get_class_methods($this))){\n $this->{$propertySetter}($data);\n }\n }\n }", "title": "" }, { "docid": "9b10ebe098373c9a56d15ab84587534c", "score": "0.5914971", "text": "abstract public static function updateMulti($query, $set);", "title": "" }, { "docid": "4c7ed59dcf8d429d5891e52b00a79b70", "score": "0.59071356", "text": "public function setMultiple(array $values)\n {\n foreach ($values as $name => $value) {\n $this->set($name, $value);\n }\n }", "title": "" }, { "docid": "c934faab43973add3c8127a60fbf2e79", "score": "0.5898776", "text": "public function setFieldValuesArray($pa_values) {\n\t\t$this->_FIELD_VALUES = $pa_values;\n\t}", "title": "" }, { "docid": "430e7ac1b27d3af03ff754b27c1b16d7", "score": "0.58882856", "text": "function setArray($array) {\n\t\tif ($array['username'])\n\t\t\t$this->username = $array['username'];\n\t\tif ($array['actionType'])\n\t\t\t$this->actionType = $array['actionType'];\n\t\tif ($array['actionComment'])\n\t\t\t$this->actionComment = $array['actionComment'];\n\n\t\t$this->_modified = true;\n\t}", "title": "" }, { "docid": "705f63047dce5bff3cf34adaecda6083", "score": "0.5857293", "text": "public function setParams(array $array)\n {\n foreach ((array) $array as $key => $value) {\n $this->setParam($key, $value);\n }\n\n return $this;\n }", "title": "" }, { "docid": "af8bef18bfee10822769c4398caa9818", "score": "0.5842169", "text": "public function setFromArray(array $values)\n\t{\n\t\tforeach($this->data->entity->getFields() as $fieldName => $field)\n\t\t{\n\t\t\tif(!isset($values[$fieldName]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif($fieldName == \"ID\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!($field instanceof Fields\\ScalarField))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$value = $values[$fieldName];\n\t\t\tif($field instanceof Fields\\BooleanField)\n\t\t\t{\n\t\t\t\t$value = ($value == \"Y\");\n\t\t\t}\n\t\t\t$this->data->set($fieldName, $value);\n\t\t}\n\t}", "title": "" }, { "docid": "26fe29eb0520724334fd20053815198d", "score": "0.5837993", "text": "public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []);", "title": "" }, { "docid": "2fed930f08aa699d2fe6c4cb292a53ab", "score": "0.58308953", "text": "public function set(array $entity);", "title": "" }, { "docid": "a3a557f4a8a0ab46a410dd8cee3a785f", "score": "0.5808392", "text": "static function setAll ( $array )\n\t{\n\t\tself::$_vars->setAll( $array ) ;\n\t}", "title": "" }, { "docid": "fef1b46965ca8ba599ed5963d2e4cd03", "score": "0.5800955", "text": "public function Update($arr, $vals) {\n\t\t$sql = \"UPDATE \".$this->tableName.\" SET \";\n\t\tforeach ($vals as $key => $value) {\n\t\t\t$sql .= \"$key = ?, \";\n\t\t}\n\t\t$sql = substr($sql, 0, -2);\n\t\t$sql .= \" WHERE \".$this->getConditions($arr);\n\n\t\t$this->db->beginTransaction(); // transaction = faster\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->execute(array_merge(array_values($vals), array_values($arr)));\n\t\t$this->db->commit();\n\t}", "title": "" }, { "docid": "cfc77183b8c590d410b6ab4927615cdc", "score": "0.5778504", "text": "private function setQueryArray($table = 'rule') {\r\n $post_array = json_decode($this->requestParameters);\r\n $ret_array = array();\r\n $fields = $table == 'rule' ? $this->dbfields : $this->conditionfields;\r\n\r\n $invalid_field = '';\r\n $invalid_value = '';\r\n\r\n foreach ($post_array as $key => $value) {\r\n\r\n $helper = 'rule_valid_' . $key;\r\n\r\n if (!array_key_exists($key, $fields)) {\r\n $invalid_field .= \"$key, \";\r\n continue;\r\n } else if ($key == 'arg') {\r\n $type = $post_array->type;\r\n $invalid_value .= (!$helper($type, $value)) ? $key . ': \"' . $value . '\", ' : '';\r\n } else if (function_exists($helper) && !$helper($value)) {\r\n $invalid_value .= $key . ': \"' . $value . '\", ';\r\n continue;\r\n }\r\n\r\n $k = split('\\.', $fields[$key]);\r\n $fieldarray = $key . '_array';\r\n\r\n if ($key == 'type') {\r\n $val = $this->type_array[$post_array->type]['value'];\r\n } else if ($key == 'arg') {\r\n $args = $this->type_array[$type]['arg'];\r\n $val = is_array($args) ? array_search($value, $args) : $value;\r\n } else {\r\n $val = (is_array($this->{\"$fieldarray\"})) ? array_search($value, $this->{\"$fieldarray\"}) : $value;\r\n }\r\n\r\n $ret_array[$k[1]] = $val;\r\n }\r\n\r\n if (trim($invalid_field) != '') {\r\n throw new Exception($invalid_field, 400003);\r\n }\r\n if (trim($invalid_value) != '') {\r\n throw new Exception($invalid_value, 400004);\r\n }\r\n\r\n return $ret_array;\r\n }", "title": "" }, { "docid": "75355948906d71980335ce4ef2fa9e74", "score": "0.577227", "text": "protected function set(array $data)\n {\n }", "title": "" }, { "docid": "2b5c763e0e5ef7afd89c476faa0f9e05", "score": "0.57598776", "text": "public function setParams(array $array)\n {\n $this->_params = $this->_params + (array) $array;\n\n foreach ($array as $key => $value) {\n if (null === $value) {\n unset($this->_params[$key]);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "d9e3457afeaebaec3fc64767b5992244", "score": "0.5752905", "text": "public function initByArray($array)\n {\n foreach ($array as $key => $value) {\n try {\n $this->$key = $value;\n } catch (Exception $e) {\n $this->errors[] = $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "5827f6e941af0d9a6ee6844fdd87ccb3", "score": "0.5728529", "text": "public function setValues(array $values = []): self\n {\n $this->values = [];\n\n foreach ($values as $fieldName => $value) {\n $this->set($fieldName, $value);\n }\n\n return $this;\n }", "title": "" }, { "docid": "5bfa46a97488160f0fbbc9afe1dfd886", "score": "0.571869", "text": "function set_multiple(string $sql, array $params = []): void\n{\n $pdo = connect_db_player();\n $pst = $pdo->prepare($sql);\n $pst->execute($params);\n}", "title": "" }, { "docid": "551a145bc4f0850ececd4854a45674d5", "score": "0.5695773", "text": "public function initWithArray($array);", "title": "" }, { "docid": "af73c0cab4ce1ec39dfa8add373139b0", "score": "0.569405", "text": "public function setArray($paramsList){\n\t\t\tforeach ($paramsList as $param =>$value){\n\t\t\t\t$this->set($param, $value);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6202e53c5e32c0421344e92483591325", "score": "0.56919736", "text": "function setArray($array) {\n\t\tif ($array['idClasses'])\n\t\t\t$this->idClasses = $array['idClasses'];\n\t\tif ($array['status'])\n\t\t\t$this->status = $array['status'];\n\t\tif ($array['firstDateId'])\n\t\t\t$this->firstDateId = $array['firstDateId'];\n\t\tif ($array['firstCampusLocation'])\n\t\t\t$this->firstCampusLocation = $array['firstCampusLocation'];\n\t\tif ($array['firstAllottedMinutes'])\n\t\t\t$this->firstAllottedMinutes = $array['firstAllottedMinutes'];\n\t\tif ($array['firstPreferredTime'])\n\t\t\t$this->firstPreferredTime = $array['firstPreferredTime'];\n\t\tif ($array['firstTimeRangeStart'])\n\t\t\t$this->firstTimeRangeStart = $array['firstTimeRangeStart'];\n\t\tif ($array['firstTimeRangeEnd'])\n\t\t\t$this->firstTimeRangeEnd = $array['firstTimeRangeEnd'];\n\t\tif ($array['secondDateId'])\n\t\t\t$this->secondDateId = $array['secondDateId'];\n\t\tif ($array['secondCampusLocation'])\n\t\t\t$this->secondCampusLocation = $array['secondCampusLocation'];\n\t\tif ($array['secondAllottedMinutes'])\n\t\t\t$this->secondAllottedMinutes = $array['secondAllottedMinutes'];\n\t\tif ($array['secondPreferredTime'])\n\t\t\t$this->secondPreferredTime = $array['secondPreferredTime'];\n\t\tif ($array['secondTimeRangeStart'])\n\t\t\t$this->secondTimeRangeStart = $array['secondTimeRangeStart'];\n\t\tif ($array['secondTimeRangeEnd'])\n\t\t\t$this->secondTimeRangeEnd = $array['secondTimeRangeEnd'];\n\t\tif ($array['instructions'])\n\t\t\t$this->instructions = $array['instructions'];\n\t\tif ($array['notes'])\n\t\t\t$this->notes = $array['notes'];\n\t\tif ($array['finalDateTime'])\n\t\t\t$this->finalDateTime = $array['finalDateTime'];\n\t\tif ($array['finalSessionLength'])\n\t\t\t$this->finalSessionLength = $array['finalSessionLength'];\n\t\tif ($array['finalCampus'])\n\t\t\t$this->finalCampus = $array['finalCampus'];\n\n\t\t$this->_modified = true;\n\t}", "title": "" }, { "docid": "eb5515b49eb4d59dc8134286c9405fb8", "score": "0.56731474", "text": "public function autoSetValue(){\r\n\t $msg = new MSG(__FUNCTION__);\r\n\t $tmpArgArr = func_get_args();\r\n\t if (!isset($tmpArgArr[0]) || !is_array($tmpArgArr[0])){\r\n\t\t SGF::eventLog('autoSetValue', 0, '$requestArray is invalid.', 'error');\r\n\t\t return $msg->msg(3, 'Bad request argument.');\r\n\t }\r\n\t if (isset($tmpArgArr[1]) && $tmpArgArr[1] === true){\r\n\t\t if (!isset($tmpArgArr[2]) || trim($tmpArgArr[2]) == '' || !isset($tmpArgArr[0][trim($tmpArgArr[2])])){\r\n\t\t SGF::eventLog('autoSetValue', 1, 'Invalid primary key.', 'error');\r\n\t\t return $msg->msg(3, 'Invalid primary key.');\r\n\t\t }\r\n\t }\r\n\t if (count($this->columnsArray) < 1){\r\n\t\t $this->getColumnsInfoFromDB();\r\n\t }\r\n\t $asvColumnCount = count($this->columnsArray);\r\n\t if ($asvColumnCount < 1){\r\n\t\t SGF::eventLog('autoSetValue', 2, 'error by getColumnsInfoFromDB.', 'error');\r\n\t\t return $msg->msg(3, 'error by getColumnsInfoFromDB.');\r\n\t }\r\n\t $asvRequestArray = $tmpArgArr[0];\r\n\t $asvValueArray = array_merge($asvRequestArray, $this->valueArray);\r\n\t $asvIsUpdate = (isset($tmpArgArr[1]) && $tmpArgArr[1] === true) ? true : false;\r\n\t if ($asvIsUpdate){\r\n\t\t $asvUpdateOrigDataType = '';\r\n\t\t foreach ($this->columnsArray as $tempColumn){\r\n\t\t\t if ($tempColumn['name'] == trim($tmpArgArr[2])){\r\n\t\t\t\t $asvUpdateOrigDataType = $tempColumn['type'];\r\n\t\t\t }\r\n\t\t }\r\n\t\t $asvUpdateOrigDataType = in_array($asvUpdateOrigDataType, array(1, 2, 3, 4, 5, 8, 9, 16, 246)) ? true : false;\r\n\t\t $asvPrimaryKeyValue = $asvUpdateOrigDataType ? $tmpArgArr[0][trim($tmpArgArr[2])] : \"'\" . $tmpArgArr[0][trim($tmpArgArr[2])] . \"'\";\r\n\t\t $asvUpdateOrigData = new Query(\"*\", $this->table, \"\", trim($tmpArgArr[2]) . \" = \" . $asvPrimaryKeyValue);\r\n\t\t $asvUpdateOrigData = DAS::quickQuery($asvUpdateOrigData);\r\n\t\t if (!DAS::hasData($asvUpdateOrigData)){\r\n\t\t\t SGF::eventLog('autoSetValue', 3, 'Value of primary key is not existed in DB.', 'error');\r\n\t\t return $msg->msg(3, 'Value of primary key is not existed in DB.');\r\n\t\t }\r\n\t\t $asvUpdateOrigData = $asvUpdateOrigData['data'][0];\r\n\t\t $asvHasDifference = false;\r\n\t\t foreach ($this->columnsArray as $asvUpdateColumn){\r\n\t\t if (isset($asvUpdateOrigData[$asvUpdateColumn['name']]) && isset($asvValueArray[$asvUpdateColumn['name']]) && $asvValueArray[$asvUpdateColumn['name']] != $asvUpdateOrigData[$asvUpdateColumn['name']]){\r\n\t\t\t $asvHasDifference = true;\r\n\t\t\t }\r\n\t\t }\r\n\t\t if ($asvHasDifference === false){\r\n\t\t\t SGF::eventLog('autoSetValue', 4, 'No difference between original value and update value.', 'alert');\r\n\t\t return $msg->msg(2, 'No difference between original value and update value.');\r\n\t\t }\r\n\t\t $asvValueArray = array_intersect_key($asvValueArray, $asvUpdateOrigData);\r\n $this->columnsArray = array_intersect_key($this->columnsArray, $asvValueArray);\r\n $asvColumnCount = count($this->columnsArray);\r\n\t }\r\n $asvColumnIndex = 0;\r\n\t foreach ($this->columnsArray as $columnArgm){\r\n $tempName = $columnArgm['name'];\r\n\t\t $tempFlags = $columnArgm['flags'];\r\n\t\t $tempType = $columnArgm['type'];\r\n\t\t $tempLength = $columnArgm['length'];\r\n $tempDef = $columnArgm['def'];\r\n\t\t $tempValue = NULL;\r\n\t\t if ($tempFlags & 512){\r\n\t SGF::eventLog('autoSetValue','5.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var% is a auto increment value.');\r\n\t\t continue;\r\n\t }\r\n\t\t if (isset($this->valueArray[$tempName])){\r\n\t\t\t SGF::eventLog('autoSetValue','6.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var% was manuel setted.');\r\n\t\t\t continue;\r\n\t\t }\r\n\t\t if ((!isset($this->valueArray[$tempName]) || $this->valueArray[$tempName] === NULL || $this->valueArray[$tempName] === '') && (!isset($asvValueArray[$tempName]) || $asvValueArray[$tempName] === NULL || $asvValueArray[$tempName] === '') && !($tempFlags & 1)){\r\n\t\t\t SGF::eventLog('autoSetValue','7.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var% no value to set, and the column accept a null value.');\r\n\t\t\t $this->setValue($tempName, NULL);\r\n continue;\r\n\t\t }\r\n\t\t if (isset($asvValueArray[$tempName]) && $asvValueArray[$tempName] !== NULL && $asvValueArray[$tempName] !== ''){\r\n\t\t\t switch ($tempType){\r\n\t\t\t\t case 1: case 2: case 3: case 8: case 9:\r\n\t\t\t\t settype($asvValueArray[$tempName], 'integer');\r\n\t\t\t\t\t if (is_int($asvValueArray[$tempName])){\r\n\t\t\t\t\t $tempValue = $asvValueArray[$tempName];\r\n\t\t\t\t\t\t $tempValueForIEID = $asvValueArray[$tempName];\r\n\t\t\t\t\t }\r\n\t\t\t\t\t break;\r\n\t\t\t\t case 4: case 5: case 246:\r\n\t\t\t\t settype($asvValueArray[$tempName], 'float');\r\n\t\t\t\t\t if (is_float($asvValueArray[$tempName])){\r\n\t\t\t\t\t\t $tempValue = $asvValueArray[$tempName];\r\n\t\t\t\t\t\t $tempValueForIEID = $asvValueArray[$tempName];\r\n\t\t\t\t\t }\r\n\t\t\t\t\t break;\r\n\t\t\t\t case 252: case 253: case 254:\r\n\t\t\t\t settype($asvValueArray[$tempName], 'string');\r\n\t\t\t\t if (is_string($asvValueArray[$tempName]) && trim($asvValueArray[$tempName]) !== ''){\r\n\t\t\t\t\t $tempValue = rawUrlToSQL(rawurlencode(trim($asvValueArray[$tempName])));\r\n\t\t\t\t\t\t $tempValueForIEID = \"'\" . $tempValue . \"'\";\r\n\t\t\t\t\t }\r\n\t\t\t\t\t break;\r\n\t\t\t\t case 12:\r\n\t\t\t\t settype($asvValueArray[$tempName], 'string');\r\n\t\t\t\t\t if(is_string($asvValueArray[$tempName]) && date_create_from_format('Y-m-d H:i:s', trim($asvValueArray[$tempName]))){\r\n\t\t\t\t\t\t $tempValue = trim($asvValueArray[$tempName]);\r\n\t\t\t\t\t\t $tempValueForIEID = \"'\" . $asvValueArray[$tempName] . \"'\";\r\n\t\t\t\t\t }\r\n\t\t\t\t\t break;\r\n\t\t\t\t case 10:\r\n\t\t\t\t settype($asvValueArray[$tempName], 'string');\r\n\t\t\t\t\t if (is_string($asvValueArray[$tempName]) && date_create_from_format('Y-m-d', trim($asvValueArray[$tempName]))){\r\n\t\t\t\t\t\t $tempValue = trim($asvValueArray[$tempName]);\r\n\t\t\t\t\t\t $tempValueForIEID = \"'\" . $asvValueArray[$tempName] . \"'\";\r\n\t\t\t\t\t }\r\n\t\t\t break;\r\n\t\t\t }\r\n\t\t\t if ($tempValue === NULL){\r\n\t\t\t SGF::eventLog('autoSetValue','8.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var% has a invalid data type.','error');\r\n\t\t\t\t return $msg->msg(3, $tempName . ': \"' . $asvValueArray[$tempName] . '\" has a invalid Value Type.');\r\n\t\t\t }\r\n\t\t }\r\n\t\t if (($tempFlags & 2) || ($tempFlags & 4)){\r\n\t\t\t if (($asvIsUpdate && DAS::isExistedInDB($this->table, $tempName . \" = \" . $tempValueForIEID . \" AND \" . trim($tmpArgArr[2]) . \" <> \" . $asvPrimaryKeyValue)) || (!$asvIsUpdate && DAS::isExistedInDB($this->table, $tempName . \" = \" . $tempValueForIEID))){\r\n\t\t\t\t SGF::eventLog('autoSetValue','9.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var%, is a primary/unique key.','error');\r\n\t\t\t\t return $msg->msg(3, $tempName . ', is a primary/unique key.');\r\n\t\t\t }\r\n\t\t }\r\n\t\t if (($tempFlags & 1) && $tempValue === NULL && !$tempDef){\r\n\t\t\t SGF::eventLog('autoSetValue','10.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var%, NULL Value is not allowed.','error');\r\n\t\t\t return MSG::msg(3, $tempName . ', NULL Value is not allowed.');\r\n\t }\r\n\t $tempLengthOfValue = $tempValue;\r\n\t\t settype($tempLengthOfValue, 'string');\r\n\t\t settype($tempLength, 'integer');\r\n\t\t $tempLengthOfValue = strlen($tempLengthOfValue);\r\n \r\n\t\t if ($tempLengthOfValue > $tempLength && $tempLength != -1){\r\n\t\t\t SGF::eventLog('autoSetValue','11.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var%, the value:%var%' . $tempValue . '%#var% is offsize.','error');\r\n\t\t\t return $msg->msg(3, $tempName . ', The value is offsize.');\r\n\t\t }\r\n\t\t if (isset($asvValueArray['AES_ENCRYPT']) && is_array($asvValueArray['AES_ENCRYPT']) && count($asvValueArray['AES_ENCRYPT']) > 0 && in_array($tempName, $asvValueArray['AES_ENCRYPT'])){\r\n\t\t\t $this->setValue($tempName, $tempValue, SGF::$KEY);\r\n\t\t }\r\n\t\t else{\r\n\t\t $this->setValue($tempName, $tempValue);\r\n //SGF::eventLog('autoSetValue','13.'.$asvColumnIndex,'the field %var%'.$tempName.'%#var% in table %var%'.$this->table.'%#var% with the value:%var%' . $tempValue . '%#var% is setted.'); \r\n\t\t }\r\n $asvColumnIndex++;\r\n }\r\n\t SGF::eventLog('autoSetValue','12', count($asvValueArray) . ' fields in table %var%'.$this->table.'%#var% is setted.');\r\n return $msg->msg(1, 'autoSetValue' . ' on server: auto set value successed.');\r\n }", "title": "" }, { "docid": "2fae6e6dc2c8b6e8d95d32a01d513d44", "score": "0.5658936", "text": "public function setValues(array $values)\n {\n foreach ($values as $key => $value) {\n if ($this->exists($key)) {\n $this->set($key, $value);\n }\n }\n }", "title": "" }, { "docid": "43982d06a8260ec8caf651939f0c333a", "score": "0.5655963", "text": "public function setQuery($query) {\n\t if (!is_array($query)) {\n\t throw new \\Zend\\Paginator\\Exception\\InvalidArgumentException('$query must be an array');\n\t } else {\n\t $this->_query = $query;\n\t }\n\t}", "title": "" }, { "docid": "a6efe5fe59819636c12fe8a4415c70b7", "score": "0.56453294", "text": "public function __construct(array $array = [])\n {\n $this->set($array);\n }", "title": "" }, { "docid": "7952eff677e4ed64137ad0b3dee46087", "score": "0.56443805", "text": "private function setResultDB($array) {\n\t\t$this->resultWeatherService = null;\n\t\t$this->resultDatabase = $array;\n\t\tif( is_array( $this->getResultDB() ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "bf865858bfb69ba62d0b095258c570d6", "score": "0.5637623", "text": "public function setValues(array $values) {\n\t\t$this->values = $values;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3459c19a49905871759f7410d671147d", "score": "0.5632565", "text": "final public function setArray($array){\r\n $array = $this->toArray($array);\r\n ModuleShare::$array = $array;\r\n }", "title": "" }, { "docid": "bafb37fa7c9dc67baa736ec3e95298b1", "score": "0.56285423", "text": "public function setupdateket($array,$where)\n\t{\n\t\treturn $this->db->where($where)\n\t\t->update('barangs',$array);\n\t}", "title": "" }, { "docid": "97bf5b84eb0dadc64a118e3741517297", "score": "0.5624778", "text": "public function set_settings( $array );", "title": "" }, { "docid": "d4eb3277ddc52df5bf58edff8daeb25b", "score": "0.5622496", "text": "function set(array $array, $inicio = 0) {\n $this->idnota=$array[0+$inicio];\n $this->idusuario=$array[1+$inicio];\n $this->asunto=$array[2+$inicio];\n $this->texto=$array[3+$inicio];\n $this->video=$array[4+$inicio];\n $this->sonido=$array[5+$inicio];\n $this->fmodificacion=$array[6+$inicio];\n }", "title": "" }, { "docid": "a53cd85da75b312d2ffa761366122aab", "score": "0.56208676", "text": "abstract function arrayQuery($sql, $params = array());", "title": "" }, { "docid": "a53cd85da75b312d2ffa761366122aab", "score": "0.56208676", "text": "abstract function arrayQuery($sql, $params = array());", "title": "" }, { "docid": "cf8f6cb5212a23fafcf9e87b098b9a36", "score": "0.5609551", "text": "function setValues($values) {\n $this->_values = $values;\n }", "title": "" }, { "docid": "87611361c1a8f524457847bcf3c299b2", "score": "0.56071407", "text": "public function setQuery(array $query) :Query\n {\n $this->query = $this->query->make($query);\n\n return $this;\n }", "title": "" }, { "docid": "d7b5f8dadad1f5f04bfb308511f2de27", "score": "0.5604894", "text": "function Set_Value($values){\r\n\tglobal $db;\r\n\tif (!is_array($values))\r\n\t\treturn array();\r\n\t$result = array();\r\n\tforeach ($values as $key\t=> $value){\t\t\t\t\t\t\r\n\t\t$db->update('cond=\"'.addslashes($key).'\"',array(\r\n\t\t\t'value '\t\t=>\t$value\r\n\t\t\t),'config_value'\r\n\t\t);\r\n\t}\r\n}", "title": "" }, { "docid": "ed684720b7de903eb5a826e4f8c0c6d6", "score": "0.55944186", "text": "public function fill($array);", "title": "" }, { "docid": "ce08f9a192709516d9d84439f65537e4", "score": "0.558837", "text": "public function setValues( array $values = null ) {\n if ( !is_null($values) ) {\n foreach ( $values as $field => $value ) {\n $this->$field = $value;\n }\n }\n }", "title": "" }, { "docid": "aaa7f71ca0cff50785d7bfd75782f007", "score": "0.5585212", "text": "private function setDateByArray(array $values)\n {\n $this->setProcessable();\n $count = count($values);\n\n if ($count <= 0 || $count > 2) {\n $this->setCantProcess();\n return;\n }\n\n if ($count === 1 && $this->setOperatorIfValueIsArray($values)) {\n $this->mode = self::EXACT_STRATEGY;\n $this->setOneDateSearch(current($values));\n return;\n }\n\n $array = array_chunk($values, 1, true);\n if (\n $this->setOperatorIfValueIsArray($array[0], 'firstOperator')\n && $this->setOperatorIfValueIsArray($array[1], 'lastOperator')\n ) {\n $this->setTwoDateSearch(current($array[0]), current($array[1]));\n return;\n }\n\n $this->setCantProcess();\n }", "title": "" }, { "docid": "5d0c47983a34580a9b07fdeb813c75db", "score": "0.5585146", "text": "public function setValue($value){\n\tif(!is_array($value) )\n\t\tdie(\"Error: Value is not an array\");\n\t$this->value=$value;\n\t}", "title": "" }, { "docid": "1072839af366fa03e6f2f37294d5fbdc", "score": "0.5569193", "text": "public function setArray(array $array): Schema\n {\n\n $this->data = $array;\n\n return $this;\n\n }", "title": "" }, { "docid": "54e1772e98a892aeb4e0d4b845cf7efc", "score": "0.55682594", "text": "function updateArray($table_name, $table_array, $primary_key, $primary_key_val, $distributor_id='') {\n global $db_new;\n\n $parameters[] = $table_name;\n foreach($table_array as $key=>$val) {\n $parameters[] = $key; \n $parameters[] = $val;\n $fields .= \"!=?,\";\n }\n $parameters[] = $primary_key;\n $parameters[] = $primary_key_val;\n \n $query = \"update ! set \" . trim($fields,',') . \" where !=? \"; \n\n $db_new->query($query, $parameters);\n\n if($primary_key){\n $ret_val = $primary_key_val;\n }\n\n return $ret_val;\n}", "title": "" }, { "docid": "4605592d641ce40fa628bbfe73cebed8", "score": "0.5564896", "text": "public function values(array $values, $flag = self::VALUES_SET) {\n\t\tif (! $this->action == 'insert') {\n\t\t\tthrow new Exception\\RuntimeException ( 'Only \"insert\" is allow to use group function' );\n\t\t}\n\t\tif ($values == null) {\n\t\t\tthrow new Exception\\RuntimeException ( 'values() expects an array of values' );\n\t\t}\n\t\tif (! is_array ( $values )) {\n\t\t\tthrow new Exception\\RuntimeException ( '$values must be a array' );\n\t\t}\n\t\t$this->values = $values;\n\t\t$this->valuesflag = $flag;\n\t}", "title": "" }, { "docid": "6de53b2977de02fc1d7e8b73a1725b98", "score": "0.5550685", "text": "function setValueByArray($a_values)\n\t{\n\t\tif(isset($a_values[$this->getPostVar()]))\n\t\t{\n\t\t\t$time_array = xvidUtils::timespanArray($a_values[$this->getPostVar()]);\n\n\t\t\t$tmp_date = date('Y-m-d', time()) . ' ' . $time_array['h'] . ':' . $time_array['m'] . ':' . $time_array['s'];\n\t\t\t$this->setDate(new ilDateTime($tmp_date,\n\t\t\t\tIL_CAL_DATETIME, 0));\n\t\t}\n\n\t\tif($this->activation_post_var)\n\t\t{\n\t\t\t$this->activation_checked = (bool)$a_values[$this->activation_post_var];\n\t\t}\n\n\t\tforeach($this->getSubItems() as $item)\n\t\t{\n\t\t\t$item->setValueByArray($a_values);\n\t\t}\n\t}", "title": "" }, { "docid": "6df3c26d6425542aba47b5c1c432ac43", "score": "0.5528306", "text": "protected function _setValues(array $values)\n {\n foreach ($values as $field => $value) {\n try {\n $this->_setValue($field, $value);\n } catch (P4Cms_Model_Exception $e) {\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "5f463c85d237532a9682dfb1ed92d732", "score": "0.5516385", "text": "public function setDataArray($vals) {\n\t\tif (!is_array($vals) || sizeof($vals) != 5)\n\t\t\tthrow new data_exception(\"Illegal array set into data_cc\");\n\t\tlist($this->type,$this->number,$this->exp,$this->cv2,$this->name)=$vals;\t\n\t}", "title": "" }, { "docid": "d477967e1cfaeec6325612a883e68a51", "score": "0.55149746", "text": "public function set($array)\n {\n $this->__rendered = null;\n foreach($array as $k => $v)\n {\n if(strpos($k, \"\\\\\") === false) {\n $this->$k = $v;\n }\n }\n return $this;\n }", "title": "" }, { "docid": "de57f2650ed7226e5e23bcd6deca5041", "score": "0.54956496", "text": "public function setParametersToModify($array)\n\t{\n\t\t$this->parametersToModify = array_merge($this->parametersToModify, $array);\n\t}", "title": "" }, { "docid": "691337a7f20e2fee0ad046c914fc52c9", "score": "0.54951894", "text": "public function parameters(array $values)\n {\n $this->values = $values;\n\n return $this;\n }", "title": "" }, { "docid": "66fb64d9690d9673461bfb1809c44405", "score": "0.5488435", "text": "public function update(array $values)\n {\n }", "title": "" }, { "docid": "e6ed4605f7f0300e4fefde4b232136f6", "score": "0.54865766", "text": "public function updateData($array) {\n\n if (!empty($array['type']) && isset($array['type']) && $array['type'] == 'batch') {\n\n $this->db->update_batch($array['tableName'], $array['update'], $array['id']);\n\n } else {\n\n /* where */\n if (!empty($array['where'])) {\n $this->db->where($array['where']);\n }\n\n /* where in field and where in value */\n if (!empty($array['whereInField']) && !empty($array['whereInVal'])) {\n $this->db->where_in($array['whereInField'], $array['whereInVal']);\n }\n \n if (!empty($array['whereInField']) && !empty($array['whereNOTInVal'])) {\n $this->db->where_not_in($array['whereInField'], $array['whereNOTInVal']);\n }\n \n\n $this->db->update($array['tableName'], $array['update']);\n return $this->db->affected_rows();\n }\n }", "title": "" }, { "docid": "b7419d23c050402933310880b60729f1", "score": "0.5480778", "text": "function setAlterQuery($input){\n\t\t$columns = array_keys($input);\n\n\t\t//Reading the global variable $dbInstance\n\t\t$connection=$this->dbInstance;\n\n\t\t/*\n\t\tfunction ($value) use ($connection) { is an Anonymous Function or closure\n\t\tRef: http://php.net/manual/en/functions.anonymous.php\n\n\t\tThe anonymous function receives the parameter $value \n\t\tThe anonymous function uses the external variable $connection\t\n\t\tThe anonymous function will be applied to each element of the array\n\n\t\tThe array_map() function sends each value of an array to an anonymous function, and returns an array with new values\n\t\t*/\n\t $values = array_map(function ($value) use ($connection) {\n\t if ($value===null) return null;\n\t return (string)$value;\n\t },array_values($input));\n\n\t\t/*\n\t\tBuilding the SET part of the SQL command\n\t\t*/\n\t for ($i=0; $i<count($columns); $i++) {\n\t $this->set.=($i>0?',':'').'`'.$columns[$i].'`=';\n\t $this->set.=($values[$i]===null?'NULL':'\"'.$values[$i].'\"');\n\t }\n\t}", "title": "" }, { "docid": "7c052f3279e80b4d4452209912202e00", "score": "0.5480594", "text": "public static function setOption($array){\n foreach ($array as $key=>$val)\n self::$$key = $val;\n }", "title": "" }, { "docid": "b8bc2b52bc6a7a42e234c75fb506c6aa", "score": "0.54803765", "text": "public function set_values_user( $array )\n\t\t{\n\t\t$values_user\t= $array;\n\t\t$values_temp_user = array();\n\t\tforeach( $values_user as $key => $temp )\n\t\t\t{\n\t\t\t\tif($key == \"id\"){$values_temp_user[] = $temp;}\n\t\t\t\tif($key == \"name\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"first_name\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"middle_name\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"last_name\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"link\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"username\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"birthday\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"gender\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"email\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t\tif($key == \"locale\"){$values_temp_user[] = \"'\".$temp.\"'\";}\n\t\t\t}\n\t\t\t//print_r($values_temp_user); //imprime el arreglo\n\t\treturn implode( \",\", $values_temp_user);\n\t\t}", "title": "" }, { "docid": "e81c20ef2f52065f4e7036cc84b8cf12", "score": "0.54739654", "text": "public function set()\n {\n $args = func_get_args();\n \n // object -> array\n \n if(is_object($args[0]))\n {\n $args[0] = (array) $args[0];\n }\n \n // adding\n \n if(is_array($args[0]))\n {\n foreach($args[0] as $field => $value)\n {\n $this->fields[$field] = $value;\n }\n }\n else\n {\n for($i = 0, $j = count($args); $i < $j; $i += 2)\n {\n $this->fields[$args[$i]] = $args[$i + 1];\n }\n }\n \n //--\n \n return $this;\n }", "title": "" }, { "docid": "5ceca5b724651d0801e5b2c59d153f44", "score": "0.5471248", "text": "public function set(array $data)\n {\n foreach ($data as $key => $value) {\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "0df2b009b727cd1eec1af3e846777df8", "score": "0.54695594", "text": "public function setData(array $array) {\n\t\tif (isset($array['id'])) {\n\t\t\t$this->setID($array['id']);\n\t\t} else {\n\t\t\t$this->data['id'] = null;\n\t\t}\n\t\t$this->setName($array['name'] ?? null);\n\t\t$this->setAmount($array['email'] ?? null);\n\t\t$this->setAbarot($array['password'] ?? null);\n\t}", "title": "" }, { "docid": "515a593ba7e16dab5f5bbc861281170e", "score": "0.5465248", "text": "function update($table, $array, $where = null)//数据库更新操作\n{\n foreach ($array as $key => $val) {\n if ($str == null) {\n $sep = \"\";\n } else {\n $sep = \",\";\n }\n $str .= $sep . $key . \"='\" . $val . \"'\";\n }\n $sql = \"update {$table} set {$str}\" . ($where == null ? null : \"where \" . $where);\n var_dump($sql);\n mysqli_query(connect(),$sql);\n return mysqli_affected_rows(connect());\n}", "title": "" }, { "docid": "2a5190e3f925337c6830cf6b46f4349a", "score": "0.5452849", "text": "public function _set_(array $expressions){\n\t\t$this->setUpdates = ' SET '.implode(', ',$expressions);\n\t}", "title": "" }, { "docid": "ea7fb087468ea8ed5689e8dcc914dcbd", "score": "0.54520977", "text": "public function insertInputValues(array $array)\n\t{\n\t\t$this->value_total += $array['value_total'];\n\t\t$this->value_end = $this->attributes['value_total']\n\t\t + $this->getCostTotal()\n\t\t + $this->getIncreaseTechnician()\n\t\t - $this->getDiscountTotal();\n\t\treturn $this->save();\n\t}", "title": "" }, { "docid": "4339a6e16afc7dca3fce1105b720b6c5", "score": "0.54511666", "text": "public function setValues($values) {\n\t\t\t$this->values = $values;\n\t\t}", "title": "" }, { "docid": "ce0e6593ca826c46242f6628de38fd2b", "score": "0.5447969", "text": "public function assignMultiple(array $values)\n {\n $this->data = array_merge($this->data, $values);\n }", "title": "" }, { "docid": "d304651d98ad95c212434232bcaafc57", "score": "0.5447311", "text": "protected function prepareSetPart()\n {\n $this->setQuery = 'SET ';\n $this->setQuery .= implode(', ', $this->setPart);\n $this->setQuery = \" {$this->setQuery} \";\n }", "title": "" }, { "docid": "c5dd3d4ebef33b5e56114a6ede74ad61", "score": "0.5446334", "text": "public function values(array $values)\n\t{\n\t\t// Get all of the passed values\n\t\t$values = func_get_args();\n\n\t\t$this->_values = array_merge($this->_values, $values);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bf670415cb14ea921e8501fa7b35994c", "score": "0.54436177", "text": "public function setValue(array $value)\n {\n $this->value = $value;\n return $this;\n }", "title": "" }, { "docid": "8ad3b9e0aedfd05caf8747ea2bc48e00", "score": "0.5427936", "text": "function __construct($array) {\n\t\tif($array instanceof LINQArray) {\n\t\t\t$array = $array->toArray();\n\t\t}\n\t\tif(is_object($array)) {\n\t\t\t$array = (array) $array;\n\t\t}\n\t\t$this->array = (is_array($array)) ? $array : array();\n\t}", "title": "" }, { "docid": "26c132ee73bf28a3560159daab19f051", "score": "0.54247236", "text": "public function array( array $array ) {\n\t}", "title": "" }, { "docid": "77446c2610cb3199e0ab086cf207c437", "score": "0.54190385", "text": "protected function setAll(array $values)\n {\n foreach ($values as $key=>$value)\n {\n $this->set($value, $key);\n }\n }", "title": "" }, { "docid": "b533a58792df2b1a929ec15fe0230016", "score": "0.54181314", "text": "public function set()\n {\n $args=func_get_args();\n if ( Utility::isNormalArray($args) && count($args)==2 )\n {\n $this->data[$args[0]]=$args[1];\n }\n else if( Utility::isAssocArray($args[0]) )\n {\n $this->data=array_merge($this->data, $args[0]);\n }\n else\n {\n throw new \\Exception(\"unsupported arguments\");\n }\n return $this;\n }", "title": "" } ]
e27d5f1ee09e154d12dd6b4ca67cbbbb
The search callback function for the handheld footer bar
[ { "docid": "30004ed0d7cf59c9b92934744e9621be", "score": "0.74659127", "text": "function storefront_handheld_footer_bar_search() {\n\t\techo '<a href=\"\">' . esc_attr__( 'Search', 'storefront' ) . '</a>';\n\t\tstorefront_product_search();\n\t}", "title": "" } ]
[ { "docid": "01510210bb56ad1f0146313384a22a17", "score": "0.63586646", "text": "function storefront_handheld_footer_bar() {\n\t\t$links = array(\n\t\t\t'my-account' => array(\n\t\t\t\t'priority' => 10,\n\t\t\t\t'callback' => 'storefront_handheld_footer_bar_account_link',\n\t\t\t),\n\t\t\t'search' => array(\n\t\t\t\t'priority' => 20,\n\t\t\t\t'callback' => 'storefront_handheld_footer_bar_search',\n\t\t\t),\n\t\t\t'cart' => array(\n\t\t\t\t'priority' => 30,\n\t\t\t\t'callback' => 'storefront_handheld_footer_bar_cart_link',\n\t\t\t),\n\t\t);\n\n\t\tif ( wc_get_page_id( 'myaccount' ) === -1 ) {\n\t\t\tunset( $links['my-account'] );\n\t\t}\n\n\t\tif ( wc_get_page_id( 'cart' ) === -1 ) {\n\t\t\tunset( $links['cart'] );\n\t\t}\n\n\t\t$links = apply_filters( 'storefront_handheld_footer_bar_links', $links );\n\t\t?>\n\t\t<div class=\"storefront-handheld-footer-bar\">\n\t\t\t<ul class=\"columns-<?php echo count( $links ); ?>\">\n\t\t\t\t<?php foreach ( $links as $key => $link ) : ?>\n\t\t\t\t\t<li class=\"<?php echo esc_attr( $key ); ?>\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif ( $link['callback'] ) {\n\t\t\t\t\t\t\tcall_user_func( $link['callback'], $key, $link );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</li>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</ul>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "ae75dfd41d32f43becf73ae56e12e906", "score": "0.6346275", "text": "public function filter_footer(){\n ?>\n <div id=\"To_top_animate\" class=\"button-scroll\"><a href=\"#\" >▲</a></div>\n <?php\n }", "title": "" }, { "docid": "1ed0adcd2559c29fc400559245adfbf2", "score": "0.6003288", "text": "function zerif_after_search_trigger() {\n\tdo_action( 'zerif_after_search' );\n}", "title": "" }, { "docid": "de7ccf28c0407ad4dcc7d822d67cb4c3", "score": "0.59798056", "text": "protected function afterSearch()\n {\n\n }", "title": "" }, { "docid": "3d5fac0ff14c9f6a5269d216278be7f6", "score": "0.5932382", "text": "function azad_footer_top_callback() {\n}", "title": "" }, { "docid": "3dd9019ba89af1f55a173172a44b2d55", "score": "0.58448017", "text": "function customPageFooter() { ?>\n<!-- Code for category search modal -->\n<script type=\"text/javascript\" src=\"<?php echo SITE_BASE; ?>js/catModal.js\"></script>\n<!-- Code for this page only -->\n<script type=\"text/javascript\" src=\"<?php echo SITE_BASE; ?>js/categories.js\"></script>\n<?php }", "title": "" }, { "docid": "ef89f600bc441cdad20beb9ade474ea5", "score": "0.58191574", "text": "function cryout_footer_hook() {\n do_action('cryout_footer_hook');\n}", "title": "" }, { "docid": "3cadb7eb4f53ce0d1deff96157f34733", "score": "0.58146966", "text": "public function wp_footer() {\n\t\t?>\n <script>\n jQuery(function ($) {\n\n elementor.settings.page.addChangeCallback('svq_transparent_header', svqElementorRefreshPage);\n elementor.settings.page.addChangeCallback('svq_transparent_menu_color', svqElementorRefreshPage);\n\n function svqElementorRefreshPage(newValue) {\n\n elementor.reloadPreview();\n }\n\n if (window.elementorFrontend) {\n elementorFrontend.hooks.addAction('frontend/element_ready/widget', function ($scope) {\n if (jQuery($scope).find('.kleo-carousel-items')) {\n setTimeout(function () {\n if ($.fn.carouFredSel) {\n KLEO.main.carouselItems()\n }\n }, 200);\n }\n });\n }\n });\n </script>\n\t\t<?php\n\t}", "title": "" }, { "docid": "3d42f90a8ae26cbe0dd775f7f87b6f37", "score": "0.58046067", "text": "function hookDisplayFooterProduct($params) {\n \n }", "title": "" }, { "docid": "4c6d69f456f3f8faf9c623e854d20f8d", "score": "0.5777901", "text": "function frontfooter() {\n}", "title": "" }, { "docid": "4be46903599f3b8dce9da65f592d185e", "score": "0.57661706", "text": "function _s_footer() {\n _s_get_template_part( 'template-parts/modal', 'contact' ); \n _s_get_template_part( 'template-parts/modal', 'search' ); \n}", "title": "" }, { "docid": "bb8c0e8a6326508b66829de87d63a6a0", "score": "0.57623535", "text": "function showFooter()\n {\n }", "title": "" }, { "docid": "c6f765e9f3f5d42b83dffe45e6fa6fb6", "score": "0.57277095", "text": "protected function do_footer() {}", "title": "" }, { "docid": "8a175b6de5a92b42472cf005523bb469", "score": "0.5692824", "text": "public function loadFooter()\n {\n }", "title": "" }, { "docid": "f6d88c90cd42b499579ae5926902e449", "score": "0.5692787", "text": "function SearchPage() {\n\t\treturn;\n\t}", "title": "" }, { "docid": "b0d0b900a85c8caa430c33a573244628", "score": "0.56813145", "text": "function Footer() {\n\t}", "title": "" }, { "docid": "2c0b88352fb046f0f847b9cb53978d11", "score": "0.56565017", "text": "function Footer()\n{\n}", "title": "" }, { "docid": "01826858ee2625539a18dc8a40a1e893", "score": "0.5622825", "text": "function wpSearch_printAdminScreen()\n{\n\tglobal $wpSearch_blogIds;\n\tglobal $wpSearch_notBlogIds;\n\tglobal $wpSearch_indexTitleBoost;\n\tglobal $wpSearch_indexAuthorBoost;\n\tglobal $wpSearch_indexCategoryBoost;\n\tglobal $wpSearch_indexContentBoost;\n\tglobal $wpSearch_indexTagBoost;\n\tglobal $wpSearch_indexCommentBoost;\n\tglobal $wpSearch_indexComments;\n\tglobal $wpSearch_blogSearchType;\n\tglobal $wpSearch_indexFile;\n\tglobal $wpSearch_index_location;\n\tglobal $wpdb;\n\t\n//\terror_reporting(E_ALL);\n\n\n\tif(isset($_POST[\"deleteIndex\"])){\n\t\twpSearch_removeDir($wpSearch_index_location . $wpdb->blogid);\n\t}else{\n\t\twpSearch_setOption('wpSearch_showFooter', \t\t\tisset($_POST['wpSearch_footer']) ? \"true\" : \"false\");\n\t\twpSearch_setOption('wpSearch_blogIds', \t\t\t\t$_POST['wpSearch_BIDS']);\n\t\twpSearch_setOption('wpSearch_notBlogIds', \t\t\t$_POST['wpSearch_NBIDS']);\n\t\twpSearch_setOption('wpSearch_indexTitleBoost', \t\t$_POST['wpSearch_RCTB']);\n\t\twpSearch_setOption('wpSearch_indexContentBoost', \t$_POST['wpSearch_TCCB']);\n\t\twpSearch_setOption('wpSearch_indexCategoryBoost', \t$_POST['wpSearch_TCatB']);\n\t\twpSearch_setOption('wpSearch_indexAuthorBoost', \t$_POST['wpSearch_TAuthB']);\n\t\twpSearch_setOption('wpSearch_indexTagBoost', \t\t$_POST['wpSearch_RCTagB']);\n\t\twpSearch_setOption('wpSearch_indexCommentBoost', \t$_POST['wpSearch_CB']);\n\t}\n\t\n\n\t$wpSearch_showFooter\t \t\t= wpSearch_getOption('wpSearch_showFooter'\t\t\t, 'true');\n\t$wpSearch_blogIds\t\t \t\t= wpSearch_getOption('wpSearch_blogIds'\t\t\t\t, \"\");\n\t$wpSearch_notBlogIds\t\t \t= wpSearch_getOption('wpSearch_notBlogIds'\t\t\t, \"\");\n\t$wpSearch_indexTitleBoost \t\t= wpSearch_getOption('wpSearch_indexTitleBoost'\t\t, 1.8);\n\t$wpSearch_indexContentBoost \t= wpSearch_getOption('wpSearch_indexContentBoost'\t, 1.3);\n\t$wpSearch_indexAuthorBoost\t \t= wpSearch_getOption('wpSearch_indexAuthorBoost'\t, 1);\n\t$wpSearch_indexCategoryBoost \t= wpSearch_getOption('wpSearch_indexCategoryBoost'\t, 1);\n\t$wpSearch_indexTagBoost \t\t= wpSearch_getOption('wpSearch_indexTagBoost'\t\t, 1);\n\t$wpSearch_indexCommentBoost \t= wpSearch_getOption('wpSearch_indexCommentBoost'\t, 1);\n\t$wpSearch_indexComments \t\t= wpSearch_getOption('wpSearch_indexComments'\t\t, 'false');\n\n\t//\n\t// update our cache of what blogs are indexing which other blogs\n\tif(file_exists($wpSearch_indexFile)){\n\t\t$cache = unserialize(file_get_contents($wpSearch_indexFile));\n\t}else{\n\t\t$cache = array();\n\t}\n\t$nids = parseIdsFor($wpSearch_blogIds);\n\t$nnids = parseIdsFor($wpSearch_notBlogIds);\n\t$cache[$wpdb->blogid] = array($nids, $nnids);\n\t$ret = @file_put_contents($wpSearch_indexFile, serialize($cache));\n\t\n\t$writeable = true;\n\tif($ret === false){\n\t\t// we can't write to our temp folder :(\n\t\t$writeable = false;\n\t}\n\t\n\t\n\t?>\n\t\n\t<div class=\"wrap\">\n\t\t<h2>wpSearchMu Control Panel</h2>\n\t\t<?php \n\t\t\n\t\t\t/* Check to see if we should rebuild the index */\n\t\t\tif($_POST['rebuild'] == 'rebuild') \n\t\t\t{ \n\t\t\t\t/* Check to see if we should include commments */\n\t\t\t\tif( $_POST['comments'] != 'comments' )\n\t\t\t\t{\n\t\t\t\t\techo 'Rebuilding index ... ';\n\t\t\t\t\t\n\t\t\t\t\t/* Disable Comment searching */\n\t\t\t\t\twpSearch_setOption('wpSearch_indexComments', 'false');\n\t\t\t\t\t\n\t\t\t\t\twpSearch_buildFullIndex();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo 'Rebuilding index with comments ... ';\n\t\t\t\t\t\n\t\t\t\t\t/* Set the option for comment searching to be enabled */\n\t\t\t\t\twpSearch_setOption('wpSearch_indexComments', 'true');\n\t\t\t\t\t\n\t\t\t\t\twpSearch_buildFullIndex( true );\n\t\t\t\t}\n\n\t\t\t\techo 'Complete<br/>';\n\t\t\t}\n\t\t\t\n\t\t?>\n\t\t<script language=\"javascript\">\n\t\t\tfunction checkIndexBox()\n\t\t\t{\n\t\t\t\tif( document.getElementById('chkComments').checked == true )\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById('chkRebuild').checked = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction uncheckCommentBox()\n\t\t\t{\n\t\t\t\tif( document.getElementById('chkRebuild').checked == false )\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById('chkComments').checked = false;\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<?\n\t\t\n\t\t$ok = true;\n\t\t\n\t\t$dir1 = realpath(get_template_directory() . \"/../../plugins/\") . \"/\";\n\t\t$dir2 = dirname(__FILE__);\n\t\t\n\t\t\tif(!wpSearch_isMultiSite()){\n\t\t\t\t$ok = false;\n\t\t?>\n\t\t\t<div id=\"message\" class=\"updated fade below-h2\" style=\"background-color: rgb(255, 251, 204);\">\n\t\t\t<p>WPSearchMu requires that Wordpress is running in Network mode.</p>\n\t\t\t<p>More information is available here: <a href='http://codex.wordpress.org/User:Andrea/Create_A_Network'>Wordpress 3.0 Network</a>.</p>\n\t\t\t</div>\n\t\t<?\n\t\t\t}else if(strpos($dir2, \"mu-plugin\") === false || strpos($dir2, $dir1) !== false){\n\t\t\t\t$ok = false;\n\t\t?>\n\t\t\t<div id=\"message\" class=\"updated fade below-h2\" style=\"background-color: rgb(255, 251, 204);\">\n\t\t\t<p>wpSearchMu needs to be installed to the mu-plugins folder. Please move the wp-search-mu folder and the wp-search-mu.php file to the following directory:</p>\n\t\t\t<p><?=$dir1?></p>\n\t\t\t</div>\n\t\t<? }else if(!wpSearchIsWriteable()){ ?>\n\t\t\t<div id=\"message\" class=\"updated fade below-h2\" style=\"background-color: rgb(255, 251, 204);\">\n\t\t\t<p>The wpSearchMu directory is not writeable. From the command line, please type:</p>\n\t\t\t<p>chmod 777 <?=dirname(__FILE__)?></p>\n\t\t\t</div>\n\t\t<? }else if(!wpSearchIsIndexBuilt()){ ?>\n\t\t\t<div id=\"message\" class=\"updated fade below-h2\" style=\"background-color: rgb(255, 251, 204);\">\n\t\t\t<p>Since there is no index built for this blog, the default WordPress search will be used.</p>\n\t\t\t<p>To use wpSearchMu for this blog, check the \"Build Search Index\" option below and then Save Changes.</p>\n\t\t\t</div>\n\t\t<? }else{ ?>\n\t\t\t<div id=\"message\" class=\"updated fade below-h2\" style=\"background-color: rgb(255, 251, 204);\">\n\t\t\t<p>wpSearchMu is properly configured and indexed. All searches on this blog use wpSearchMu instead of the regular WordPress search.</p>\n\t\t\t<p><b>Theme Integration</b>: Remember to integrate wpSearchMu with your theme. More info at <a href='http://welcome.totheinter.net/wpsearchmu/'>http://welcome.totheinter.net/wpsearchmu/</a>.</p>\n\t\t\t</div>\n\t\t<? } ?>\n\t\t\n\t\t<? if($ok){ ?>\n\t\t\t<h3>wpSearchMu Options</h3>\n\t\t\t<form action=\"<?php echo $PHP_SELF; ?>\" method=\"post\">\n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\">Show link in footer</th>\n\t\t\t\t\t\t\t<td>Show link to <a href='http://welcome.totheinter.net/wpsearchmu/'>wpSearchMu homepage</a> in footer: <input type=\"checkbox\" value=\"true\" <?php echo wpSearch_getOption('wpSearch_showFooter', $wpSearch_showFooter) == \"true\" ? \"CHECKED\" : \"\"; ?> name=\"wpSearch_footer\"/> \n\t\t\t\t\t\t\t\t<br />If you love wpSearchMu, then add a link back to my site in the footer of your search pages. <b>Thanks!!</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\">Blogs to Index</th>\n\t\t\t\t\t\t\t<td>Blog Ids: <input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_blogIds', $wpSearch_blogIds); ?>\" name=\"wpSearch_BIDS\"/> \n\t\t\t\t\t\t\t\t<br /><b>Leave blank for all blogs</b> OR enter the blog ids that you want to index separated by a comma.\n\t\t\t\t\t\t\t\t<br /><b>If you change this value, you will need to rebuild your index.</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\">Blogs NOT to Index</th>\n\t\t\t\t\t\t\t<td>Blog Ids: <input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_notBlogIds', $wpSearch_notBlogIds); ?>\" name=\"wpSearch_NBIDS\"/> \n\t\t\t\t\t\t\t\t<br />Enter the blog ids that you DO NOT want to index separated by a comma. This is really only helpful if you\n\t\t\t\t\t\t\t\tleave the first option blank.\n\t\t\t\t\t\t\t\t<br /><b>If you change this value, you will need to rebuild your index.</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\">Relevancy Customization (Field 'boosting')</th>\n\t\t\t\t\t\t\t<td>Title: <input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_indexTitleBoost', $wpSearch_indexTitleBoost); ?>\" name=\"wpSearch_RCTB\"/> \n\t\t\t\t\t\t\t Content:<input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_indexContentBoost', $wpSearch_indexContentBoost); ?>\" name=\"wpSearch_TCCB\"/> \n\t\t\t\t\t\t\t Author:<input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_indexAuthorBoost', $wpSearch_indexAuthorBoost); ?>\" name=\"wpSearch_TCCB\"/> \n\t\t\t\t\t\t\t <br />\n\t\t\t\t\t\t\t Tag:<input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_indexTagBoost', $wpSearch_indexTagBoost); ?>\" name=\"wpSearch_RCTagB\"/>\n\t\t\t\t\t\t\t Categories:<input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_indexCategoryBoost', $wpSearch_indexCategoryBoost); ?>\" name=\"wpSearch_TCatB\"/>\n\t\t\t\t\t\t\t Comments:<input type=\"text\" size=\"10\" value=\"<?php echo wpSearch_getOption('wpSearch_indexCommentBoost', $wpSearch_indexCommentBoost); ?>\" name=\"wpSearch_CB\"/><br />\n\t\t\t\t\t\t\t\t<br />'Boosting' one field higher than another will make that field more important in searches.\n\t\t\t\t\t\t\t\t<br />Usually, the title is the most important thing to match in a search, but that's up to you.\n\t\t\t\t\t\t\t\t<br />For most users, these values won't need to be changed. (Typical values range from 1 to 2).\n\t\t\t\t\t\t\t\t<br />Modifying these values will require an index rebuild (below).\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<th scope=\"row\">Advanced Options</th>\n\t\t\t\t\t\t\t<td><b>Build Search Index:</b> <input id=\"chkRebuild\" type=\"checkbox\" name=\"rebuild\" value=\"rebuild\" onClick=\"uncheckCommentBox()\">\n\t\t\t\t\t\t\t\t<b>Enable Comment Searching on build:</b><input id=\"chkComments\" type=\"checkbox\" name=\"comments\" value=\"comments\" onClick=\"checkIndexBox()\">\n\t\t\t\t\t\t\t\t<br />Checking this option and clicking 'Save' will build or rebuild the search database for your blog.\n\t\t\t\t\t\t\t\t<br />This should be done immediately after installation and almost never after.\n\t\t\t\t\t\t\t\t<br />If comment searching is enabled, it will always be enabled for the life of the index.\n\t\t\t\t\t\t\t\t<br />Enabling comments is only possible when also building the index,\n\t\t\t\t\t\t\t\t<br />and can greatly increase indexing time, depending on the number of comments.\n\t\t\t\t\t\t\t\t<br />If you suspect the index is corrupted (very rare), this will be the fix.\n\t\t\t\t\t\t\t\t<br />Index building runs at ~5 posts / second for a moderately sized page/post.\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t<input type=\"submit\" value=\"Save Changes\" name=\"Submit\"/>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t\t<? if(wpSearchIsIndexBuilt()){ ?>\n\t\t\t<h3>Stop Using wpSearchMu</h3>\n\t\t\t<form action=\"<?php echo $PHP_SELF; ?>\" method=\"post\" onsubmit='return confirm(\"Are you sure you want to delete the wpSearchMu index and use the default WordPress search instead?\")'>\n\t\t\t\t<p>\n\t\t\t\t\tRemove the wpSearchMu index and use the default WordPress search instead.\n\t\t\t\t</p>\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t<input type=\"hidden\" value=\"1\" name=\"deleteIndex\"/>\n\t\t\t\t\t<input type=\"submit\" value=\"Stop using wpSearchMu\" name=\"Submit\"/>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t\t<? } ?>\n\t\t\t\n\t\t<? } ?>\n\t</div>\n\t\n\t<?php\n}", "title": "" }, { "docid": "d9f0fecf1152410dc367283201642567", "score": "0.5618823", "text": "function mbb_get_footer() {\n\t$search = 'no_sidebar';\n\t$classes = get_body_class();\n\tif ( ! empty( $classes ) && is_array( $classes ) && ! in_array( $search, $classes, true ) ) {\n\t\tget_sidebar();\n\t}\n}", "title": "" }, { "docid": "6e4bb01b23ee43b69159a4255539189c", "score": "0.56125593", "text": "function footer()\n\t{\n\t\t\tinclude_once('classes/Display/DHome.php');\n\t\t\t$sql = \"SELECT link_name,link_url FROM footer_link_table \";\n\t\t\t$query = new Bin_Query();\n\t\t\tif($query->executeQuery($sql))\n\t\t\t{\n\t\t\t\treturn Display_DHome::footer($query->records);\n\t\t\t}\t\n\t}", "title": "" }, { "docid": "c8e3cbd533d4254000062f3286be7ea5", "score": "0.5611515", "text": "function zerif_footer_widgets_trigger() {\n\tdo_action( 'zerif_footer_widgets' );\n}", "title": "" }, { "docid": "389d264d9c111ae8e04c2b7bf055fbec", "score": "0.5610945", "text": "function ticker_in_footer(){\r\n\t\t $id=get_option('ccpw-p-id');\r\n\t\tif($id){\r\n\t\t\t\t$ticker_position = get_post_meta($id,'ticker_position', true );\r\n \t\t\t$type = get_post_meta($id,'type', true );\r\n \t\t\r\n \t\t\tif($type==\"ticker\"){\r\n \t\t\tif($ticker_position==\"header\"||$ticker_position==\"footer\"){\r\n\t\t\t\t\t $shortcode=get_option('ccpw-shortcode');\r\n\t\t\t\t\techo do_shortcode($shortcode);\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t}", "title": "" }, { "docid": "4c415554f0a8bc84013911e4b3d9e52b", "score": "0.55621326", "text": "public function search()\n\t{\n\t\t$contents = '';\n\t\t$contents .= $this->load->view('front/partials/navigation', $this->get_data(), TRUE);\n\t\t$contents .= $this->load->view('front/search', $this->get_data(), TRUE);\n\t\t$contents .= $this->load->view('front/partials/footer', $this->get_data(), TRUE);\n\t\t$this->template->load('layout/home', $contents, $this->get_data());\n\t}", "title": "" }, { "docid": "d6f89c00209956f35b3ba4fe48466184", "score": "0.5562023", "text": "public function loadFooter(){\r\n\t\t/** require our plugins class **/\r\n\t\trequire_once(ISVIPI_CLASSES_BASE .'plugins/class.plugins.php');\r\n\t\t$plugins = new plugins();\r\n\t\t\r\n\t\tglobal $p,$s_m,$isv_siteSettings,$isv_siteDetails,$converter,$PAGE;\r\n\t\trequire_once(ISVIPI_ACT_THEME . 'ovr/footer.php');\r\n\t}", "title": "" }, { "docid": "5a2d7e33c1a1dcfb8d06ea9a3e606aee", "score": "0.5541867", "text": "function cryout_post_footer_hook() {\n do_action('cryout_post_footer_hook');\n}", "title": "" }, { "docid": "f249b81cc83bdd9ae25fd224eb6fda02", "score": "0.5540748", "text": "function rew_register_menu_footer(){\n\n\t register_nav_menu( 'rew-footer-menu','3karatcom footer' );\n}", "title": "" }, { "docid": "d2862816ff807cfed6338ffd91176d80", "score": "0.55143356", "text": "function kr8_nav_footer_fallback() {\n\t/* you can put a default here if you like */\n}", "title": "" }, { "docid": "5c546d8b11e5e8176a3bb87c2ff0b82e", "score": "0.5513324", "text": "function zerif_after_footer_trigger() {\n\tdo_action( 'zerif_after_footer' );\n}", "title": "" }, { "docid": "c21b914e72063ed4525f4926b676efad", "score": "0.55048615", "text": "function julia_kaya_top_search_widget_area() {\n\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Search Filter', 'julia' ),\n\t\t'id' => 'search_filter',\n\t\t'description' => esc_html__( 'Add widgets here.', 'julia' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h3>',\n\t\t'after_title' => '</h3>',\n\t) );\n\n}", "title": "" }, { "docid": "f36965c0d12329e0d9af171af9f449be", "score": "0.55027074", "text": "function vf_footer() {\n do_action('vf_footer');\n}", "title": "" }, { "docid": "e10cb9929d99ef4cc166f6c880bdfb19", "score": "0.5496806", "text": "function navBarCallback($hookName, $args) {\n\t\t$output =& $args[2];\n\t\t$output .= '<li><a href=\"' . Request::url('misearch', 'index') . '\">' . __('navigation.search') . '</a></li>';\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3d301d183ecc12f3125a9b1528c9289a", "score": "0.5485058", "text": "function custom_mini_search() {\r\n\techo '<a class=\"shiftnav-searchbar-toggle shiftnav-toggle-main-block shiftnav-toggle-main-ontop\"><i class=\"fa fa-search\"></i></a>';\r\n\techo '<div class=\"shiftnav-searchbar-drop\">';\r\n\t$ps_echo = true ;\r\n\tif ( function_exists( 'woo_predictive_search_widget' ) ) woo_predictive_search_widget( $ps_echo );\r\n\techo '</div>';\r\n}", "title": "" }, { "docid": "881075c03ed15a29d93e153933784d16", "score": "0.54627335", "text": "function update_footer()\n {\n $footer_content = $this->Footer_Model->update_footer_content($_REQUEST['content'], $this->site_id);\n if($footer_content){\n $this->index(); \n } \n }", "title": "" }, { "docid": "f591ebb37b2ae4a37e9a91895fca81e0", "score": "0.5455406", "text": "function bubulla_the_social_footer() {\n\t\tbubulla_the_social_header();\n\t}", "title": "" }, { "docid": "6eb7554a160bcc8567c2866107e49614", "score": "0.5449593", "text": "function yourfitness_footer_template() {\n\n\tget_footer();\n\n}", "title": "" }, { "docid": "37ad2a7ac01a9b921b93a4230325cbbb", "score": "0.5443045", "text": "function dirindex_searchbox() {\n\nglobal $dirindex_fugue;\n\n$search_icon = $dirindex_fugue::searchbox_icon_url();\n$search_pattern = $dirindex_fugue->search_pattern();\n\n?>\n<!-- Search Box -->\n<div id=\"searchbox\">\n<form method=\"get\">\n<img id=\"searchicon\" src=\"<?php echo $search_icon; ?>\" />\n<input id=\"search\" type=\"text\" name=\"P\" value=\"<?php echo $search_pattern; ?>\" />\n</form>\n</div>\n<!-- END Search Box -->\n<?php }", "title": "" }, { "docid": "c43fc5abf9cc0e986be7b4ffa28f9f16", "score": "0.54302347", "text": "public function view_perfil_footer()\n {\n }", "title": "" }, { "docid": "3c08566f16f2b1e1bb232264e4bb9a85", "score": "0.54286855", "text": "function ScriptsInFooter(){\n\n\t\t}", "title": "" }, { "docid": "7959add4e128f923d9a9298f4e21ac82", "score": "0.54227096", "text": "public function admin_footer_suggestions()\n\t\t{\n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery(function($) {\n\n\t\t\t\t\t$(document).on('click', '.<?php echo $this->prefix; ?>-dismiss-suggestions .notice-dismiss', function() {\n\t\t\t\t\t\t$.post(ajaxurl, {\n\t\t\t\t\t\t\t'action': '<?php echo $this->prefix; ?>_dismiss_suggestions',\n\t\t\t\t\t\t\t'nonce': $(this).parent().attr('data-nonce')\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t});\n\t\t\t</script>\n\t\t<?php\n\t\t}", "title": "" }, { "docid": "fbf57b715d213bb65a3cf0c820790ca7", "score": "0.5421554", "text": "public function searchCompleted()\n\t{\n\t}", "title": "" }, { "docid": "36b64433762f36d6bc64ba21ab19bb90", "score": "0.53997564", "text": "function widget_docwhat_search() {\n?>\n<li class=\"nomin gradwhite boxc\" id=\"sidebar_search\">\n <form method=\"get\" id=\"searchform\" action=\"<?php bloginfo('url'); ?>/\">\n <div id=\"searchformbox\">\n <input type=\"text\" value=\"<?php the_search_query(); ?>\" name=\"s\" id=\"s\" />\n <input type=\"submit\" id=\"searchsubmit\" value=\"Search\" />\n </div>\n </form>\n</li>\n<?php\n}", "title": "" }, { "docid": "425b5a6fb5906330f082a9c83416a128", "score": "0.53961825", "text": "function responsivepp_search_bar() {\n\n\t\treturn \n\t\t'<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-37\">\n\t\t <form method=\"get\" id=\"searchform\" class=\"form-inline\" action='. esc_url( home_url( '/' ) ).' role=\"search\">\n\t\t\t <input type=\"search\" class=\"form-control input-search\" placeholder='.__(\"Search...\",\"odin\").' name=\"s\" id=\"s\" />\n\t\t \t</form>\n\t\t</li>';\n\t}", "title": "" }, { "docid": "ae1b0ef1392bbce3dd24447b1d3696a7", "score": "0.537803", "text": "function searchBox() {\n?>\n\t<!-- search -->\n\t<div id=\"p-search\" class=\"block\">\n\t\t<h2><label for=\"searchInput\"><?php $this->msg('search') ?></label></h2>\n\t\t<div id=\"searchBody\" class=\"content\">\n\t\t\t<form action=\"<?php $this->text('searchaction') ?>\" id=\"searchform\"><div>\n\t\t\t\t<input id=\"searchInput\" name=\"search\" type=\"text\"<?php echo $this->skin->tooltipAndAccesskey('search');\n\t\t\t\t\tif( isset( $this->data['search'] ) ) {\n\t\t\t\t\t\t?> value=\"<?php $this->text('search') ?>\"<?php } ?> />\n\t\t\t\t<input type='submit' name=\"go\" class=\"searchButton\" id=\"searchGoButton\"\tvalue=\"<?php $this->msg('searcharticle') ?>\"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;\n\t\t\t\t<input type='submit' name=\"fulltext\" class=\"searchButton\" id=\"mw-searchButton\" value=\"<?php $this->msg('searchbutton') ?>\"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />\n\t\t\t</div></form>\n\t\t</div><!-- pBody -->\n\t</div><!-- portlet -->\n<?php\n\t}", "title": "" }, { "docid": "71cc9c650133d5b9ff0fc4b549cb817a", "score": "0.5368586", "text": "function footer()\n {\n if (!is_404()) {\n if (in_array(get_the_ID(), $this->disabled_post_ids) || !$this->enabled) return;\n }\n \n $footer = '<div class=\"pswp\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\n <div class=\"pswp__bg\"></div>\n <div class=\"pswp__scroll-wrap\">\n <div class=\"pswp__container\">\n <div class=\"pswp__item\"></div>\n <div class=\"pswp__item\"></div>\n <div class=\"pswp__item\"></div>\n </div>\n <div class=\"pswp__ui pswp__ui--hidden\">\n <div class=\"pswp__top-bar\">\n <div class=\"pswp__counter\"></div>\n <button class=\"pswp__button pswp__button--close\" title=\"'.__('Close (Esc)', 'lightbox-photoswipe').'\"></button>\n <button class=\"pswp__button pswp__button--share\" title=\"'.__('Share', 'lightbox-photoswipe').'\"></button>\n <button class=\"pswp__button pswp__button--fs\" title=\"'.__('Toggle fullscreen', 'lightbox-photoswipe').'\"></button>\n <button class=\"pswp__button pswp__button--zoom\" title=\"'.__('Zoom in/out', 'lightbox-photoswipe').'\"></button>\n <div class=\"pswp__preloader\">\n <div class=\"pswp__preloader__icn\">\n <div class=\"pswp__preloader__cut\">\n <div class=\"pswp__preloader__donut\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"pswp__share-modal pswp__share-modal--hidden pswp__single-tap\">\n <div class=\"pswp__share-tooltip\">\n </div> \n </div>\n <button class=\"pswp__button pswp__button--arrow--left\" title=\"'.__('Previous (arrow left)', 'lightbox-photoswipe').'\"></button>\n <button class=\"pswp__button pswp__button--arrow--right\" title=\"'.__('Next (arrow right)', 'lightbox-photoswipe').'\"></button>\n <div class=\"pswp__caption\">\n <div class=\"pswp__caption__center\"></div>\n </div>\n </div>\n </div>\n</div>';\n $footer = apply_filters('lbwps_markup', $footer);\n echo $footer;\n }", "title": "" }, { "docid": "f00e7c1c523808caee4f5e23c7e9ea66", "score": "0.5361786", "text": "public function Footer() {\r\n\t}", "title": "" }, { "docid": "759321b171ae2e25194bcd2eada5117b", "score": "0.5355639", "text": "function zerif_bottom_footer_trigger() {\n\tdo_action( 'zerif_bottom_footer' );\n}", "title": "" }, { "docid": "e00367d0828d27c8af21f9f36c0ac3ba", "score": "0.5349288", "text": "function search_dashboard(){\n /** ==========================\n * Komponen Pencarian :\n * 1. Vessel (Ship) Type\n * 2. Department\n * 3. Nationality\n * 4. Keyword\n * */\n $this->search_process(\"search_dashboard\",true);\n// echo \"<div align='center' style='font-size: 16pt'><b >Coming soon ...</b><hr>Please Wait :)<br>still searching an effective logic for this function<br><a href='\".base_url().\"'>Back to Home</a></div>\";\n }", "title": "" }, { "docid": "706bf7e9910c27055450903dbb67c582", "score": "0.53485584", "text": "function abhisek_ps_search() {\r\n\r\n\t$ps_echo = true ;\r\n\tif ( function_exists( 'woo_predictive_search_widget' ) ) woo_predictive_search_widget( $ps_echo );\r\n\r\n}", "title": "" }, { "docid": "71df9a26e591a844eed7f98e29b6d4ff", "score": "0.53079903", "text": "function narrow_footer()\n\t{\n\t\t$this->i_methods['narrow_footer']='padding:0;';\n\t}", "title": "" }, { "docid": "6040bfade82a1e1ec74c1e19712a7e30", "score": "0.53049374", "text": "function theme_widget_search($args) {\n echo $args['before_widget'];\n include 'searchform.php';\n echo $args['after_widget'];\n}", "title": "" }, { "docid": "eb29a58f8eceb47a251d1674a36401f8", "score": "0.52997375", "text": "function header_product_search() {\n ?>\n <div class=\"site-search\">\n <div id=\"header-search-toggle\" class=\"search-toggle\"><?php echo file_get_contents(get_stylesheet_directory().\"/assets/svg/search.svg\"); ?></div>\n <div id=\"header-search-bar\" class=\"search-bar\">\n <?php the_widget('WC_Widget_Product_Search', 'title='); ?>\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.52988535", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "4be8ce71d124b653b4ca6927254f96fc", "score": "0.52932984", "text": "function my_footer() {\n\t?>\n\t<div id=\"infinite-footer\" class=\"site-footer\">\n\t\t<div class=\"container\" class=\"site-footer\">\n\t\t\t<div class=\"blog-info\">\n\t\t\t\t<a href=\"/algemene-voorwaarden/\">&copy; 2011–<?php echo date('Y'); ?> <?php bloginfo('name'); ?></a>\t\n\t\t\t\t<a href=\"feed:https://www.ongekunsteld.net/feed/\"><span class=\"rss\">R</span></a>\n\t\t\t\t<a href=\"https://twitter.com/ongekunsteld\"><span class=\"twitter\">T</span></a>\n\t\t\t\t<a href=\"https://www.facebook.com/ongekunsteld.net\"><span class=\"facebook\">F</span></a>\t\t\n\t\t\t</div>\t\n\t\t\t\n\t\t</div>\n\t</div>\n\t<?php\n\t}", "title": "" }, { "docid": "2f4220ae0ff2af411b90df1dfdf9fa21", "score": "0.5284723", "text": "function footer_widgets() {\n\n register_sidebars(1, array(\n 'name' => 'Footer',\n 'before_title' => '<h4 class=\"footertitle\">',\n 'after_title' => '</h4>'\n ));\n}", "title": "" }, { "docid": "3be401b63d39d8522ffeae599e97628b", "score": "0.52684194", "text": "function Location_Search()\n\t{\n\t\t//Initializing\n\t\t$classname = str_replace('_',' ', get_class($this));\n\n\t\t// widget actual processes\n\t\tparent::WP_Widget(\n\t\t\t$id = (isset($this->widget['description'])?$this->widget['description']:$classname),\n\t\t\t$name = (isset($this->widget['name'])?$this->widget['name']:$classname),\n\t\t\t$options = array( 'description'=>$this->widget['description'] )\n\t\t);\n\t}", "title": "" }, { "docid": "74114b7464888f8a858e081a5c5b0ecc", "score": "0.52676606", "text": "function kr8_nav_footer() {\n\t// display the wp3 menu if available\n wp_nav_menu(array(\n \t'container' => false, // remove nav container\n \t'menu_class' => 'navigation clearfix nav-footer', // adding custom nav class\n \t'theme_location' => 'nav-footer', // where it's located in the theme\n \t'before' => '', // before the menu\n 'after' => '', // after the menu\n 'link_before' => '', // before each link\n 'link_after' => '', // after each link\n 'depth' => 1, // limit the depth of the nav\n \t'fallback_cb' => 'kr8_nav_footer_fallback' // fallback function\n\t));\n}", "title": "" }, { "docid": "569feccbb9d1267f1231f0e079c48d15", "score": "0.5264765", "text": "public function Footer()\n {\n }", "title": "" }, { "docid": "e7761695634adca85fed762e6c85156c", "score": "0.52585286", "text": "function dr_register_fusion_footer() {\n\n fusion_builder_map( \n array(\n 'name' => esc_attr__( 'Dreamatic Footer', 'fusion-builder' ),\n 'shortcode' => 'dr_fusion_footer',\n 'icon' => 'fusiona-image',\n 'allow_generator' => true,\n 'params' => array(\n array(\n 'type' => 'textfield',\n 'heading' => esc_attr__( 'Title', 'fusion-builder' ),\n 'description' => esc_attr__( 'Title text', 'fusion-builder' ),\n 'param_name' => 'title',\n 'value' => '',\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_attr__( 'Subtitle', 'fusion-builder' ),\n 'description' => esc_attr__( 'Subtitle text', 'fusion-builder' ),\n 'param_name' => 'subtitle',\n 'value' => '',\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_attr__( 'Button Text', 'fusion-builder' ),\n 'description' => esc_attr__( 'Button text', 'fusion-builder' ),\n 'param_name' => 'cta',\n 'value' => '',\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_attr__( 'Button Link', 'fusion-builder' ),\n 'description' => esc_attr__( 'URL', 'fusion-builder' ),\n 'param_name' => 'link',\n 'value' => '',\n ),\n array(\n 'type' => 'radio_button_set',\n 'heading' => esc_attr__( 'Footer On', 'fusion-builder' ),\n 'description' => esc_attr__( 'Add footer', 'fusion-builder' ),\n 'param_name' => 'footer',\n 'value' => array(\n 'yes' => esc_attr__( 'Yes', 'fusion-builder' ),\n 'no' => esc_attr__( 'No', 'fusion-builder' ),\n ),\n ),\n array(\n 'type' => 'textfield',\n 'heading' => esc_attr__( 'Footer Text', 'fusion-builder' ),\n 'description' => esc_attr__( 'Footer content', 'fusion-builder' ),\n 'param_name' => 'footertext',\n 'value' => '',\n ),\n\t\t\t\t ),\n )\n );\n }", "title": "" }, { "docid": "e84cffd30027c1055f96bf0c13c89212", "score": "0.52461565", "text": "function OutputFooterJavascript() {}", "title": "" }, { "docid": "8152aee0f3372a8720ca0fa103d28548", "score": "0.52355576", "text": "function hs_render_footer() {\n global $config;\n\n if (strpos($config['cacti_version'], \"0.\") === 0) {\n include_once(\"./include/bottom_footer.php\");\n return;\n }\n\n bottom_footer();\n}", "title": "" }, { "docid": "15dceb78cf8acf33d5ecbdb3adb9fc95", "score": "0.5232605", "text": "public function onContentSearchAreas()\n {\n // return [];\n }", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5230056", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "22928070eb4f27942bb205f5fb1c78ec", "score": "0.5227168", "text": "function d4tw_filter_admin_footer () {\n echo '<span id=\"dashFooter\">Website developed by <a style = \"color: #ff0000; text-decoration: none;\" href=\"http://www.designs4theweb.com\" target=\"_blank\">Designs 4 The Web</a></span>';\n}", "title": "" }, { "docid": "b30e83554a2bea01573f96d03092d605", "score": "0.52258426", "text": "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "title": "" }, { "docid": "b30e83554a2bea01573f96d03092d605", "score": "0.52258426", "text": "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "title": "" } ]
c032e2c00ff1aa0df76a1399757b7279
get attribute type Either Extra for ExtraSegmentInfo or Vendor for VendorMessages.
[ { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.0", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" } ]
[ { "docid": "e7a7295803080e710e52c760d1e2e9be", "score": "0.6538766", "text": "protected function getAttributeType()\r\n {\r\n return $this->attributeType;\r\n }", "title": "" }, { "docid": "880b517720485bcfe9ad2b97ea1d62a1", "score": "0.60633653", "text": "public function getType() {\n\t\treturn isset($this->attributes['type'])?$this->attributes['type']:null;\n\t}", "title": "" }, { "docid": "880b517720485bcfe9ad2b97ea1d62a1", "score": "0.60633653", "text": "public function getType() {\n\t\treturn isset($this->attributes['type'])?$this->attributes['type']:null;\n\t}", "title": "" }, { "docid": "d974cd4fff6d99280bc74fddf571065a", "score": "0.59899515", "text": "public function getTypeAttribute()\n {\n switch ($this->attributes['TYPE']) {\n case 0:\n return 'ID';\n break;\n case 1:\n return 'Address';\n break;\n case 2:\n return 'IBAN';\n break;\n case 3:\n return 'Passport (European Community)';\n break;\n case 4:\n return 'Passport (outside the European Community)';\n break;\n case 5:\n return 'Residence permit';\n break;\n case 6:\n return 'Registry commerce number';\n break;\n case 21:\n return 'SDD mandate';\n break;\n default:\n return 'Others documents';\n break;\n }\n }", "title": "" }, { "docid": "1971d95dccf2a164947cb9f7d8ede950", "score": "0.5786124", "text": "public function getAddDeviceTypeAttribute()\n {\n return $this->attributes['device_type']=='1'?'Apple':'Android';\n }", "title": "" }, { "docid": "a8d40c5a9f446550bf5010b33d6f638a", "score": "0.57519144", "text": "public function getTypeInstance(){\n\t\tif (!$this->_typeInstance){\n\t\t\tif (!$this->getType()){\n\t\t\t\t$type = 'abstract';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$type = $this->getType();\n\t\t\t}\n\t\t\ttry{\n\t\t\t\t$this->_typeInstance = Mage::getModel('modulecreator/attribute_type_'.$type);\n\t\t\t\t$this->_typeInstance->setAttribute($this);\n\t\t\t}\n\t\t\tcatch (Exception $e){\n\t\t\t\tthrow new Ultimate_ModuleCreator_Exception(\"Invalid attribute type: \". $type);\n\t\t\t}\n\t\t}\n\t\treturn $this->_typeInstance;\n\t}", "title": "" }, { "docid": "c8c37597b907d70ca56e01ed0a143ee4", "score": "0.56822413", "text": "public function getVehicleTypeAttribute()\n {\n return optional($this->vehicle)->vehicle_type ?? '';\n }", "title": "" }, { "docid": "290696efc0bdb724266d933d885dd244", "score": "0.5673478", "text": "function fetch_site_attribute_type($site_type) {\n\t$query = \"SELECT s_attribute_type\n\t\t\tFROM \ts_attribute_type\n\t\t\tWHERE \tsite_type = '\" . $site_type . \"'\";\n\t\n\t$results = db_query ( $query );\n\tif ($results && db_num_rows ( $results ) > 0) {\n\t\t$attribute_type_r = db_fetch_assoc ( $results );\n\t\tdb_free_result ( $results );\n\t\t\n\t\treturn $attribute_type_r ['s_attribute_type'];\n\t}\n\t\n\t//else\n\treturn FALSE;\n}", "title": "" }, { "docid": "f9d1295250ea138ca7f8136b786abcbf", "score": "0.5654491", "text": "public function getTypeAttribute()\n {\n return empty($this->company_uuid) ? 'FLB Managed' : 'Organization Managed';\n }", "title": "" }, { "docid": "8d12bdca3fa0ed104afbf85183614ba9", "score": "0.5601573", "text": "public function getType()\r\n {\r\n if (! isset($this->type)) {\r\n $this->type = ($this->getDomElement()->getAttribute($this->getAttributeType()))\r\n ? $this->getDomElement()->getAttribute($this->getAttributeType())\r\n : null;\r\n }\r\n\r\n return $this->type;\r\n }", "title": "" }, { "docid": "3cde43de7d3704fbb5817bf1914f8dd3", "score": "0.5591603", "text": "public function getType(): ?string {\n return $this->attributes()->getValue('type');\n }", "title": "" }, { "docid": "74f3db7cee8605d6b2e3033a7d2fe768", "score": "0.5571101", "text": "public function getApType()\n {\n return $this->ap_type;\n }", "title": "" }, { "docid": "ba4551d46cb0ec641fb84dbdd50c0fd0", "score": "0.5545786", "text": "public function getMachineTypeAttribute() {\r\n return $this->dbConn->queryFirstRow(\"SELECT `machine_type_attributes`.`id`, `machine_type_attributes`.`name` FROM `machine_parameters` LEFT OUTER JOIN `machine_type_attributes` ON `machine_type_attributes`.`id` = `machine_parameters`.`machine_type_attribute_id` WHERE `machine_parameters`.`machine_id` = \".intval($this->machine['id']).\" && `machine_parameters`.`machine_type_attribute_id` = \".intval($this->machineTypeAttribute['id']).\" LIMIT 1\");\r\n }", "title": "" }, { "docid": "580203dee17962031de5c1304bb9d79b", "score": "0.5478173", "text": "public function getTypeAttribute(): string\n {\n //FIXME module\n return $this->mime;\n }", "title": "" }, { "docid": "bd110bc3ca5bf35544b37db34d791b34", "score": "0.54729784", "text": "function getAttribute($ds_id, $type = false) {\n $core_attrs = array('key', 'slug', 'title', 'record_owner');\n if ($type) {\n if (in_array($type, $core_attrs)) {\n $query = $this->db->get_where('data_sources',\n array('data_source_id'=>$ds_id))->first_row(true);\n return ($query && isset($query[$type])) ? $query[$type] : false;\n } else {\n $query = $this->db->get_where('data_source_attributes',\n array('data_source_id'=>$ds_id, 'attribute'=>$type))->first_row(true);\n return ($query && isset($query['value'])) ? $query['value'] : false;\n }\n } else {\n // return all attributes and other things\n $result = array();\n\n //populate the result with attrs core and non core\n return $result;\n }\n }", "title": "" }, { "docid": "23703919aa17486f0190bee1fe252ec8", "score": "0.54718906", "text": "private static function getAttributeTypes()\n {\n $attributes = [];\n foreach (self::ATTRIBURES_ARRAY as $attributeCell) {\n $attributeType = self::$worksheet->getCell($attributeCell . '1')->getValue();\n if (!isset($attributeType, $attributes[$attributeType])) {\n $attributes[$attributeType] = [];\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "86d696f25795db8baa804beb7d48c7d1", "score": "0.5429269", "text": "public function getType() {\r\n\t\treturn $this->getAtributo(\"type\");\r\n\t}", "title": "" }, { "docid": "2c26c0f5ddb0cd1bb9a8d7dcae270de4", "score": "0.53845286", "text": "public function getTypeAttribute()\n {\n switch ($this->event_type) {\n case CategoryWasChangedEvent::class:\n return 'category';\n break;\n case TitleWasChangedEvent::class:\n return 'title';\n break;\n case ConversationWasLockedEvent::class:\n return 'locked';\n break;\n case ConversationWasPinnedEvent::class:\n return 'pinned';\n break;\n case PostWasDeletedEvent::class:\n return 'deleted';\n break;\n default:\n return 'unknown';\n }\n }", "title": "" }, { "docid": "92750b488c1712a24d4301c0135d1658", "score": "0.53615", "text": "public function type( $type ){\r\n\t\treturn self::$attributes[] = array( __FUNCTION__ => $type );\r\n\t}", "title": "" }, { "docid": "2c31c51b5d601195bfbdea1381f74e87", "score": "0.5310913", "text": "public function getType(): string\n {\n\t\tif(!isset($this->attributes['type'])) {\n\t\t\t$this->attributes['type'] = 'text';\n\t\t}\n\t\treturn $this->attributes['type'];\n\t}", "title": "" }, { "docid": "fb79ff9f3757f93f7e40a5d9785b48a8", "score": "0.5298598", "text": "public function getAddUserTypeAttribute()\n {\n return $this->attributes['user_type']=='0'?'Rider':'Driver';\n }", "title": "" }, { "docid": "0cb348e9ff8602ab3a5ca27f4fd284a8", "score": "0.5298046", "text": "public function getImageableTypeAttribute($type)\n {\n $type = strtolower($type);\n\n // to make sure this returns value from the array\n return Arr::get($this->types, $type, $type);\n\n // which is always safe, because new 'class'\n // will work just the same as new 'Class'\n }", "title": "" }, { "docid": "c44b65ddc2e9346a323b7050938ebfff", "score": "0.5296895", "text": "abstract protected function getSupportedAttributes();", "title": "" }, { "docid": "c44b65ddc2e9346a323b7050938ebfff", "score": "0.5296895", "text": "abstract protected function getSupportedAttributes();", "title": "" }, { "docid": "d24df1f04f15b49bcc6783a49f516d41", "score": "0.52958816", "text": "public function getAdType();", "title": "" }, { "docid": "b76acc5532817069ad35cfceb5dbd580", "score": "0.5293108", "text": "public function getTypeAttributesNames(): array;", "title": "" }, { "docid": "b11af9c50c974b0fa54ade8d9ea70ed8", "score": "0.528593", "text": "public function getValueElementType()\n {\n if ($this->getAttribute()==='attribute_set_id') {\n return 'select';\n }\n if (!is_object($this->getAttributeObject())) {\n return 'text';\n }\n switch ($this->getAttributeObject()->getFrontendInput()) {\n case 'select':\n return 'select';\n\n\t\t\t/* MT start */\n case 'textfilter':\n return 'textfilter';\n\t\t\t/* MT end */\n\n case 'multiselect':\n return 'multiselect';\n\n case 'date':\n return 'date';\n\n default:\n return 'text';\n }\n }", "title": "" }, { "docid": "084d4e091d09d3c83caecc76dc908660", "score": "0.5280161", "text": "protected function getType() {\n\t\treturn $this->isSale() ? 1 : 2;\n\t}", "title": "" }, { "docid": "83dfdbb9863f676188eeeace47834ded", "score": "0.52610576", "text": "public function getTypeAttribute()\n {\n return Str::before($this->mime_type, '/') ?? null;\n }", "title": "" }, { "docid": "c63f4f8d31ba00e95060dd01f4b76794", "score": "0.5249326", "text": "private function _parseAttrType(int &$offset): string\n {\n $idx = $offset;\n // dotted OID\n $type = $this->_regexMatch('/^(?:oid\\.)?([0-9]+(?:\\.[0-9]+)*)/i', $idx);\n if (null === $type) {\n // name\n $type = $this->_regexMatch('/^[a-z][a-z0-9\\-]*/i', $idx);\n if (null === $type) {\n throw new \\UnexpectedValueException('Invalid attribute type.');\n }\n }\n $offset = $idx;\n return $type;\n }", "title": "" }, { "docid": "a757734c706a09cdbc1fff46f5d271ad", "score": "0.52330345", "text": "public function getTypeAttributesSerialized(): ?string;", "title": "" }, { "docid": "c8914b46e6830667624c398e77208a55", "score": "0.5228395", "text": "public function getTypeAttributesAsJSON(): ?string;", "title": "" }, { "docid": "b218337b69f58a38d9741f4be103a840", "score": "0.5223631", "text": "public function get_extra_info( $type ) {\n\t\t\t$extra_info_meta = get_post_meta( $this->get_id(), '_lp_' . $type, true );\n\n\t\t\treturn apply_filters( 'learn-press/course-extra-info', $extra_info_meta, $type, $this->get_id() );\n\t\t}", "title": "" }, { "docid": "ff3615345e44edacf79f5e6ad40a236f", "score": "0.521196", "text": "public function getType() { return self::Type; }", "title": "" }, { "docid": "ff3615345e44edacf79f5e6ad40a236f", "score": "0.521196", "text": "public function getType() { return self::Type; }", "title": "" }, { "docid": "ff3615345e44edacf79f5e6ad40a236f", "score": "0.521196", "text": "public function getType() { return self::Type; }", "title": "" }, { "docid": "ff3615345e44edacf79f5e6ad40a236f", "score": "0.521196", "text": "public function getType() { return self::Type; }", "title": "" }, { "docid": "e818a92d0d256cf4b117dba8135d7e8e", "score": "0.52024174", "text": "public function get_type() {\n\t\treturn $this->code->get_prop( 'type' );\n\t}", "title": "" }, { "docid": "b321127720ebe7eaac56b86cf0070b21", "score": "0.5155323", "text": "public function getStatementAttributesByType($type);", "title": "" }, { "docid": "791a3e6b5bbbe7b324264050803b3539", "score": "0.51474714", "text": "public function getTypeNameAttribute()\n {\n $name = '';\n if ($this->type = 'text') {\n $name = 'Texto';\n } elseif ($this->type = 'image') {\n $name = 'imagem';\n } elseif ($this->type = 'document') {\n $name = 'Documento';\n } elseif ($this->type = 'video') {\n $name = 'Vídeo';\n } elseif ($this->type = 'audio') {\n $name = 'Áudio';\n } elseif ($this->type = 'contact') {\n $name = 'Contato';\n }\n return $name;\n }", "title": "" }, { "docid": "3c7409aa4167377ce94b46cb79bd9aec", "score": "0.5141632", "text": "public function model()\n {\n return Attribute::class;\n }", "title": "" }, { "docid": "65e952cf1fb0a18c3b1f07f3b2466046", "score": "0.5136146", "text": "function attribute( $name )\n {\n switch ( $name )\n {\n /*case \"name\" :\n {\n return $this->Name;\n } break;*/\n\n case \"multioption_list\" :\n {\n return $this->Options;\n } break;\n default:\n {\n eZDebug::writeError( \"Attribute '$name' does not exist\", __METHOD__ );\n return null;\n }break;\n }\n }", "title": "" }, { "docid": "5b218420dc3a276a2c3d8c69b7539ec3", "score": "0.5130385", "text": "public function getType()\n {\n $types = Characteristic::types();\n\n return $types[$this->type_id];\n }", "title": "" }, { "docid": "9fc24b5061cb5103bd60a7391ebf0412", "score": "0.5130056", "text": "protected function _getCardType()\n {\n return $this->getInfoInstance()->getAdditionalInformation($this->_cardTypeFieldName);\n }", "title": "" }, { "docid": "f9888e29cc7bf05cf0c0ad7a70484208", "score": "0.5116351", "text": "public function getValueElementType()\r\n {\r\n if ($this->getAttribute() === 'attribute_set_id') {\r\n return 'select';\r\n }\r\n if (!is_object($this->getAttributeObject())) {\r\n return 'text';\r\n }\r\n switch ($this->getAttributeObject()->getFrontendInput()) {\r\n case 'select':\r\n case 'boolean':\r\n return 'select';\r\n\r\n case 'multiselect':\r\n return 'multiselect';\r\n\r\n default:\r\n return 'text';\r\n }\r\n }", "title": "" }, { "docid": "42d68a2903238661864afa50123a7cf1", "score": "0.511628", "text": "function getType() {\n\t\treturn $this->getData('type');\n\t}", "title": "" }, { "docid": "c3b8d1b1a1c85e463f9806c109c13cc0", "score": "0.51132876", "text": "static function getAttributesInfo ()\n {\n return array(\n 'main' => array(\n 'name' => _('Entite'),\n 'attrs' => array(\n new StringAttribute(\n _('Name'), _('The name to write in the ou attribute for this entite'),\n 'ou', TRUE\n )\n )\n ),\n 'admin' => array(\n 'name' => _('Administrative informations'),\n 'attrs' => array(\n new StringAttribute(\n _('Telephone'), _('Phone number for this entite'),\n 'telephoneNumber', FALSE\n ),\n new StringAttribute(\n _('Fax'), _('Fax number for this entite'),\n 'facsimileTelephoneNumber', FALSE\n ),\n new StringAttribute(\n _('Postal address'), _('Postal address of this entite'),\n 'postalAddress', FALSE\n ),\n new TextAreaAttribute(\n _('Description'), _('Short description of this entite'),\n 'description', FALSE\n ),\n )\n ),\n 'supann' => array(\n 'name' => _('SUPANN informations'),\n 'attrs' => array(\n new SelectAttribute(\n _('Entite type'), _('The best SUPANN type that fits this entite'),\n 'supannTypeEntite', FALSE\n ),\n new StringAttribute(\n _('Entite code'), _('The SUPANN code of this entite'),\n 'supannCodeEntite', TRUE,\n '', '', '/[a-z0-9_-]/'.(strict_uid_mode()?'':'i')\n ),\n new SelectAttribute(\n _('Parent entite'), _('The parent entite of this entite'),\n 'supannCodeEntiteParent', FALSE\n ),\n new StringAttribute(\n _('Reference ID'), _('SUPANN reference ID of this entite'),\n 'supannRefId', FALSE\n ),\n )\n )\n );\n }", "title": "" }, { "docid": "8edd208d4c65f9ee00afea2de4c34e81", "score": "0.51039743", "text": "public function getAdditional_manifest_type()\n {\n return isset($this->additional_manifest_type) ? $this->additional_manifest_type : null;\n }", "title": "" }, { "docid": "0253afd2a7e9c98390db3fbea2b3cb21", "score": "0.5101915", "text": "public function getProductType();", "title": "" }, { "docid": "1898325b442d8c24b52ba5d05d0765e1", "score": "0.5099345", "text": "public function getBeaconType()\r\n {\r\n $beacon = $this->getBeacon();\r\n return $beacon['type'];\r\n }", "title": "" }, { "docid": "575521a7b002373ce0c43deb3db022ad", "score": "0.5087011", "text": "public function attributeCustomTypes()\n {\n $flagEnabled = \\common\\components\\Consts::STATUS_ENABLED;\n return array(\n 'id' => array('data-options' => array('checkbox'=>'true'), 'key' => true),\n 'serial' => array('width' => 120),\n 'user_id' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.user_disp; }\"),\n 'type' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(static::getTypesArray()).\" }\"\n ),\n 'bind_id' => array('width' => 120, 'formatter' => \"function(value,row){ return row.order_serial; }\"),\n 'channel_type' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(static::getChannelTypesArray()).\" }\"\n ),\n 'channel_trade_no' => array('width' => 200),\n 'belong_office_id' => array('width' => 100, 'formatter' => \"function(value,row){ return row.belong_office_disp; }\"),\n 'pay_source' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderPayTypeArray()).\" }\"),\n 'sub_type' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderPayTypeArray()).\" }\"),\n 'amount' => array('width' => 100),\n 'receipt_amount' => array('width' => 100),\n 'purchased_at' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'status' => array('width' => 80, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(static::getStatusArray()).\" }\"\n ),\n 'bind_param' => array('width' => 100),\n 'extra_info' => array('width' => 100),\n 'purchase_code' => array('width' => 100),\n 'purchase_msg' => array('width' => 300),\n 'tried_count' => array('width' => 100),\n 'edit_user_id' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.edit_user_disp; }\"),\n 'created_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'updated_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'operation' => array('width' => 160, \n 'buttons' => array(\n ),\n ),\n );\n }", "title": "" }, { "docid": "aa460e9a3932aa1737995501f251ff7c", "score": "0.5066096", "text": "public function getModelType() : int\n {\n $data = $data ?? $this->getStoreAsArray();\n\n switch (true) {\n case isset($data['meta']):\n return self::MODEL_TYPE_PHR;\n case isset($data[0]['proof']):\n return self::MODEL_TYPE_GPR;\n case isset($data[0]['proof_index']):\n return self::MODEL_TYPE_PVR;\n default:\n return 0;\n }\n }", "title": "" }, { "docid": "025823d3e035fa5b42741e3983f13519", "score": "0.5066023", "text": "function numfmt_get_attribute(NumberFormatter $fmt, $attr) { }", "title": "" }, { "docid": "e4d1ca60409b84a6589b11f133a8d203", "score": "0.5057331", "text": "public function getType() { return $this->type; }", "title": "" }, { "docid": "071053f7fa94823da9f0f6c8ef6f14bf", "score": "0.5056819", "text": "abstract public function getTypeInfo1(): string;", "title": "" }, { "docid": "7ed1a2d58619852974d6fd0ee734b831", "score": "0.5056688", "text": "function get_type() \n\t\t{\t\t\n\t\t \t return $this->type;\t\t\n\t\t}", "title": "" }, { "docid": "1ffdbcb7caf86602eb4a6fd6911c72f0", "score": "0.5052931", "text": "protected function attributeType($attribute)\n {\n // We assume that the attributes present in the file array are files so that\n // means that if the attribute does not have a numeric rule and the files\n // list doesn't have it we'll just consider it a string by elimination.\n if ($this->hasRule($attribute, static::$numericRules)) {\n return 'numeric';\n } elseif ($this->hasRule($attribute, ['Array'])) {\n return 'array';\n } elseif (array_key_exists($attribute, $this->files)) {\n return 'file';\n }\n\n return 'string';\n }", "title": "" }, { "docid": "b2c75d1ef9bc889f998a2395f20f1aa3", "score": "0.5048161", "text": "public function getVatType(): string\n {\n return $this->data->vatType;\n }", "title": "" }, { "docid": "66e2dce91dad3d8896298fe60bfd68d2", "score": "0.5047356", "text": "public function getTipoSalaAttribute(){\n if($this->sala){\n return $this->sala->tipo;\n }\n else\n return 'Sin sala';\n }", "title": "" }, { "docid": "88ddada30e274b44ad276278caf1e9dd", "score": "0.5045124", "text": "public function getType(){ \n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "ef58575226f4d7a87cce1ca52986317f", "score": "0.5034344", "text": "function getProductAttributesOfPriceType()\n {\n \treturn array\n \t(\n SALE_PRICE_PRODUCT_ATTRIBUTE_ID => \"\"\n ,LIST_PRICE_PRODUCT_ATTRIBUTE_ID => \"\"\n ,PER_ITEM_SHIPPING_COST_PRODUCT_ATTRIBUTE_ID => \"\"\n ,PER_ITEM_HANDLING_COST_PRODUCT_ATTRIBUTE_ID => \"\"\n \t);\n }", "title": "" }, { "docid": "de43ac60df10ffd254c99ddd4a349ac5", "score": "0.50273836", "text": "public function getType() { return $this->type;\n }", "title": "" }, { "docid": "9a05e0288f69cf657df35ed120968ec4", "score": "0.5024541", "text": "public function getType(){\r\n return $this->type ;\r\n }", "title": "" }, { "docid": "5b008c6c88469e7eaf830ff34811fea2", "score": "0.50144726", "text": "public function getAdditionalAttributes() {\n $vendorAttributeType = Mage::getResourceModel('eav/entity_type_collection')->addFieldToFilter('entity_type_code', 'ves_vendor')->getFirstItem();\n $collection = Mage::getResourceModel('eav/entity_attribute_collection')\n ->addFieldToFilter('entity_type_id', $vendorAttributeType->getId())\n ->addFieldToFilter('is_user_defined', true)\n ->setOrder('sorting_order', 'ASC');\n return $collection;\n }", "title": "" }, { "docid": "055631721fffb9d14691717bf48f1f06", "score": "0.5007336", "text": "public function attributes()\n {\n switch (auth()->user()->type) {\n case User::ADMIN_TYPE:\n return trans('accounts::admins.attributes');\n break;\n case User::CUSTOMER_TYPE:\n default:\n return trans('accounts::customers.attributes');\n break;\n }\n }", "title": "" }, { "docid": "e7b75d72156c3de104d2edfd5bf832ff", "score": "0.5006713", "text": "function getType() { return $this->m_type; }", "title": "" }, { "docid": "9b7ee82ed78050f4afd127a49dd5909d", "score": "0.5002325", "text": "protected function type($type)\n {\n return $this->_attributes['type'] = $type;\n }", "title": "" }, { "docid": "129fe29b97ec0012ec3a706eaaf852b4", "score": "0.49957937", "text": "public function getTypeIconAttribute()\n {\n $icon='';\n\n switch($this->type)\n {\n case self::PAGE_TYPE_STATIC:\n $icon='oc-icon-file-text-o';\n break;\n\n case self::PAGE_TYPE_CMS:\n $icon='oc-icon-magic';\n break;\n\n case self::PAGE_TYPE_ALIAS:\n $icon='oc-icon-link';\n break;\n\n case self::PAGE_TYPE_EXTERNAL:\n $icon='oc-icon-external-link';\n break;\n }\n\n return $icon;\n }", "title": "" }, { "docid": "f72a944b2116c6425fb977eb69593cbe", "score": "0.49906498", "text": "public function getTyp() {\n\t}", "title": "" }, { "docid": "bcd17f0913b144c65cbf86b608351e18", "score": "0.498627", "text": "public function attributes()\r\n {\r\n return array_merge(parent::attributes(), ['printersTypes.types']);\r\n }", "title": "" }, { "docid": "aba0c709659a877a95d3c6047eca3841", "score": "0.49680898", "text": "public function getType(){\n\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "3c102a1eeb9117214779c0cfd57a9d76", "score": "0.49673444", "text": "public function getType(){\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "3c102a1eeb9117214779c0cfd57a9d76", "score": "0.49673444", "text": "public function getType(){\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "3c102a1eeb9117214779c0cfd57a9d76", "score": "0.49673444", "text": "public function getType(){\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "252cb65574092d2402a947ef2806ee60", "score": "0.49505898", "text": "function get_type(){\n return $this->type;\n }", "title": "" }, { "docid": "7d87df0ad67e797d6747d69b44625d3d", "score": "0.49487206", "text": "protected function _getBrandAttributeCode()\n\t{\n\t\treturn 'manufacturer';\n\t}", "title": "" }, { "docid": "663d68e8e08b6719e75e444163f83106", "score": "0.49382672", "text": "private function generateAttribute($attr, $config, $provisioningData, $modelType) {\n $attribute=array();\n\n // Does this attribute support multiple values?\n $multiple = (isset($config['multiple']) && $config['multiple']);\n $targetType = isset($config['type']) ? $config['type'] : '';\n $attropts = isset($config['attropts']) ? $config['attropts'] : FALSE;\n $groupMembers = isset($config['members']) ? $config['members'] : array(); \n $scope_suffix = isset($config['scope']) ? $config['scope'] : '';\n\n // Labeled attribute, used to construct attribute options\n $lattr = $attr;\n \n $group = $modelType == \"CoGroup\";\n $person = $modelType == \"CoPerson\";\n $cou = $modelType == \"Cou\";\n $service = $modelType == \"CoService\";\n $co = $modelType == \"Co\";\n\n $this->dev_log(\"looking for attribute $attr of type $targetType\");\n switch ($attr) {\n // Name attributes\n case 'cn':\n if($cou) {\n $this->dev_log(\"provisioningData for cou is \".json_encode($provisioningData));\n $attribute[$lattr][] = $this->prefix('cou').$provisioningData['Cou']['name'];\n break;\n } \n else if($co) {\n $attribute[$lattr][] = $this->prefix('co').$provisioningData['Co']['name'];\n break;\n } \n else if($group) {\n $attribute[$lattr][] = $this->prefix('group').$provisioningData['CoGroup']['name'];\n break;\n }\n else if($service) {\n $attribute[$lattr][] = $provisioningData['CoService']['name'];\n break;\n }\n // else person, fall through\n case 'givenName':\n case 'sn':\n if($attropts && !empty($provisioningData['PrimaryName']['language'])) {\n $lattr = $lattr . \";lang-\" . $provisioningData['PrimaryName']['language'];\n }\n\n if($attr == 'cn') {\n $attribute[$lattr][] = generateCn($provisioningData['PrimaryName']);\n } else {\n $f = ($attr == 'givenName' ? 'given' : 'family');\n\n // Registry doesn't permit given to be blank, so we can safely\n // assume we're going to populate it. However, Registry does not\n // require a family name. The person schema DOES require sn to be\n // populated, so if we don't have one we have to insert a default\n // value, which for now will just be a dot (.).\n\n if(!empty($provisioningData['PrimaryName'][$f])) {\n $attribute[$lattr][] = $provisioningData['PrimaryName'][$f];\n } else if($person) {\n $attribute[$lattr][] = \".\";\n }\n }\n break;\n case 'displayName':\n case 'eduPersonNickname':\n case 'voPersonAuthorName':\n // Walk through each name\n if($attropts && !empty($n['language'])) {\n $lattr = $lattr . \";lang-\" . $n['language'];\n }\n foreach ($provisioningData['Name'] as $n) {\n if (empty($targetType) || ($targetType == $n['type'])) {\n $attribute[$lattr][] = generateCn($n);\n\n if (!$multiple) {\n // We're only allowed one name in the attribute\n break;\n }\n }\n }\n break;\n\n case 'o':\n // specific use for O: export CO name\n $attribute[$attr]=$provisioningData['Co']['name'];\n break;\n\n // Attributes from CO Person Role\n case 'eduPersonAffiliation':\n case 'eduPersonScopedAffiliation':\n case 'employeeType':\n case 'ou':\n case 'title':\n // a COU always falls under the Groups organizationalUnit\n if($cou || $co || $group || $service) {\n if($attr == 'ou') {\n if($group) $attribute[$attr]='group';\n if($cou) $attribute[$attr]='cou';\n if($co) $attribute[$attr]='co';\n if($service) $attribute[$attr]='service';\n }\n break; \n } \n \n // Map the attribute to the column\n $cols = array(\n 'eduPersonAffiliation' => 'affiliation',\n 'eduPersonScopedAffiliation' => 'affiliation',\n 'employeeType' => 'affiliation',\n 'o' => 'o',\n 'ou' => 'ou',\n 'title' => 'title'\n );\n if ($attr == 'eduPersonScopedAffiliation' && empty($scope_suffix)) {\n // Don't add this attribute since we don't have a scope\n break;\n }\n // Walk through each role\n $found = false;\n\n foreach ($provisioningData['CoPersonRole'] as $r) {\n if (!empty($r[ $cols[$attr] ])) {\n $lrattr = $lattr;\n\n if($attropts) {\n $lrattr = $lattr . \";role-\" . $r['id'];\n }\n\n if ($attr == 'eduPersonAffiliation'\n || $attr == 'eduPersonScopedAffiliation') {\n $affilmap = $this->CoProvisioningTarget->Co->CoExtendedType->affiliationMap($provisioningData['Co']['id']);\n\n if (!empty($affilmap[ $r[ $cols[$attr] ]])) {\n // Append scope, if so configured\n $scope = '';\n\n if ($attr == 'eduPersonScopedAffiliation') {\n $scope = '@' . $scope_suffix;\n }\n\n $attribute[$lrattr][] = $affilmap[ $r[ $cols[$attr] ] ] . $scope;\n }\n } else if($attr == \"employeeType\" ) {\n // if this is a role for a specific COU, scope it with the name of the COU\n $scope = 'CO:'.$provisioningData['Co']['name'];\n\n if($r['cou_id']!== null && $r['Cou']) {\n $scope = 'COU:'.$r['Cou']['name'];\n }\n $attribute[$lrattr][] = $scope . ':'.$r[ $cols[$attr] ];\n } else {\n $attribute[$lrattr][] = $r[ $cols[$attr] ];\n }\n\n $found = true;\n }\n\n if (!$multiple && $found) {\n break;\n }\n }\n break;\n\n // Attributes from models attached to CO Person\n case 'labeledURI':\n if($service) {\n // emit the entitlement_uri\n if(!empty($provisioningData['CoService']['entitlement_uri'])) {\n $attribute[$attr][] = $provisioningData['CoService']['entitlement_uri'];\n }\n }\n else if($co) {\n // find all services attached to this CO and emit the entitlement_uri's\n $args = array();\n $args['conditions']['CoService.co_id'] = $id;\n $args['contain'] = false;\n $services = $this->CoLdapFixedProvisionerDn->CoService->find('all', $args);\n foreach($services as $s) {\n if(!empty($s['entitlement_uri'])) {\n $attribute[$attr][] = $s['entitlement_uri'];\n }\n }\n }\n\n if (!$person) {\n break;\n }\n // else FALL THROUGH\n case 'eduPersonOrcid':\n case 'eduPersonPrincipalName':\n case 'eduPersonPrincipalNamePrior':\n case 'eduPersonUniqueId':\n case 'employeeNumber':\n case 'mail':\n case 'uid':\n case 'voPersonApplicationUID':\n case 'voPersonExternalID':\n case 'voPersonID':\n case 'voPersonSoRID':\n // Map the attribute to the model and column\n $mods = array(\n 'eduPersonOrcid' => 'Identifier',\n 'eduPersonPrincipalName' => 'Identifier',\n 'eduPersonPrincipalNamePrior' => 'Identifier',\n 'eduPersonUniqueId' => 'Identifier',\n 'employeeNumber' => 'Identifier',\n 'labeledURI' => 'Url',\n 'mail' => 'EmailAddress',\n 'uid' => 'Identifier',\n 'voPersonApplicationUID' => 'Identifier',\n 'voPersonExternalID' => 'Identifier',\n 'voPersonID' => 'Identifier',\n 'voPersonSoRID' => 'Identifier'\n );\n\n $cols = array(\n 'eduPersonOrcid' => 'identifier',\n 'eduPersonPrincipalName' => 'identifier',\n 'eduPersonPrincipalNamePrior' => 'identifier',\n 'eduPersonUniqueId' => 'identifier',\n 'employeeNumber' => 'identifier',\n 'labeledURI' => 'url',\n 'mail' => 'mail',\n 'uid' => 'identifier',\n 'voPersonApplicationUID' => 'identifier',\n 'voPersonExternalID' => 'identifier',\n 'voPersonID' => 'identifier',\n 'voPersonSoRID' => 'identifier'\n );\n\n if ($attr == 'eduPersonUniqueId' && empty($scope_suffix)) {\n // Don't add this attribute since we don't have a scope\n break;\n }\n \n if ($attr == 'eduPersonOrcid') {\n // Force target type to Orcid. Note we don't validate that the value is in\n // URL format (http://orcid.org/0000-0001-2345-6789) but perhaps we should.\n $targetType = IdentifierEnum::ORCID;\n }\n\n $scope = '';\n\n if ($attr == 'eduPersonUniqueId') {\n // Append scope if set, skip otherwise\n $scope = '@' . $scope_suffix;\n }\n\n $modelList = null;\n if (isset($config['use_org_value']) && $config['use_org_value']) {\n //$this->dev_log('attribute '.$attr.' uses org value, searching for '.$mods[$attr]);\n // Use organizational identity value for this attribute\n //\n // The structure is something like\n // $provisioningData['CoOrgIdentityLink'][0]['OrgIdentity']['Identifier'][0][identifier]\n if (isset($provisioningData['CoOrgIdentityLink'])) {\n foreach ($provisioningData['CoOrgIdentityLink'] as $lnk) {\n if (isset($lnk['OrgIdentity'][ $mods[$attr] ])) {\n //$this->dev_log('adding orgidentity link to modellist');\n foreach ($lnk['OrgIdentity'][ $mods[$attr] ] as $x) {\n $modelList[] = $x;\n }\n }\n }\n }\n } \n elseif (isset($provisioningData[ $mods[$attr] ])) {\n //$this->dev_log(\"attribute uses CoPerson value\");\n // Use CO Person value for this attribute\n $modelList = $provisioningData[ $mods[$attr] ];\n }\n\n // Walk through each model instance\n $found = false;\n if (isset($modelList)) {\n foreach ($modelList as $m) {\n // If a type is set, make sure it matches\n if (empty($targetType) || ($targetType == $m['type'])) {\n //$this->dev_log(\"found attribute of requested type\");\n // And finally that the attribute itself is set\n if (!empty($m[ $cols[$attr] ])) {\n //$this->dev_log(\"attribute is set to '\".$m[ $cols[$attr] ] . $scope.\"'\");\n // Check for attribute options\n if($attropts && $attr == 'voPersonApplicationUID') {\n // Map the identifier type to a service short label.\n // There can be more than one service linked to a given\n // identifier type, so we may insert more than one copy\n // of the attribute (which is fine, as long as the app\n // labels are different).\n\n // XXX it'd be better to pass this with the provisioning data\n // rather than call it once per identifer, or at least to pull\n // a map once\n $labels = $this->CoProvisioningTarget\n ->Co\n ->CoGroup\n ->CoService\n ->mapIdentifierToLabels($provisioningData['Co']['id'],\n $m['type']);\n\n if(!empty($labels)) {\n foreach($labels as $id => $sl) {\n $lrattr = $lattr . ';app-' . $sl;\n\n $attribute[$lrattr][] = $m[ $cols[$attr] ] . $scope;\n }\n } \n else {\n // There was no matching label, so we won't export the identifier.\n // $attribute[$attr][] = $m[ $cols[$attr] ] . $scope;\n }\n } \n elseif($attr == 'labeledURI' && !empty($m['description'])) {\n // Special case for labeledURI, which permits a description to be appended\n $attribute[$attr][] = $m[ $cols[$attr] ] . \" \" . $m['description'];\n } \n else {\n $this->dev_log(\"setting attr $attr to \".$m[$cols[$attr]]);\n $attribute[$attr][] = $m[ $cols[$attr] ] . $scope;\n }\n $found = true;\n }\n }\n\n if (!$multiple && $found) {\n break;\n }\n }\n\n if (!$multiple && $found) {\n break;\n }\n }\n break;\n\n case 'voPersonPolicyAgreement':\n if(!$attropts) {\n $attribute[$attr] = array();\n }\n if(!isset($provisioningData['CoTAndCAgreement'])) break;\n\n foreach($provisioningData['CoTAndCAgreement'] as $tc) {\n if(!empty($tc['agreement_time'])\n && !( empty($tc['CoTermsAndConditions']['url'])\n && empty($tc['CoTermsAndConditions']['tc_body']))\n && $tc['CoTermsAndConditions']['status'] == SuspendableStatusEnum::Active) {\n\n $url = empty($tc['CoTermsAndConditions']['tc_body'])\n ? $tc['CoTermsAndConditions']['url']\n : Router::url(array(\n \"controller\" => \"CoTermsAndConditions\",\n \"action\" => \"raw_view\",\n $tc['CoTermsAndConditions']['id']\n ), true);\n\n if($attropts) {\n $lrattr = $lattr . \";time-\" . strtotime($tc['agreement_time']);\n $attribute[$lrattr][] = $url;\n } else {\n $attribute[$attr][] = $url;\n }\n }\n }\n\n break;\n case 'voPersonStatus':\n $attribute[$attr] = StatusEnum::$to_api[ $provisioningData['CoPerson']['status'] ];\n\n if($attropts) {\n // If attribute options are enabled, emit person role status as well\n\n foreach($provisioningData['CoPersonRole'] as $r) {\n $lrattr = $lattr . \";role-\" . $r['id'];\n\n $attribute[$lrattr] = StatusEnum::$to_api[ $r['status'] ];\n }\n }\n break;\n case 'sshPublicKey':\n foreach ($provisioningData['SshKey'] as $sk) {\n global $ssh_ti;\n $attribute[$attr][] = $ssh_ti[ $sk['type'] ] . \" \" . $sk['skey'] . \" \" . $sk['comment'];\n }\n break;\n\n case 'userPassword':\n if(!empty($provisioningData['Password'])) {\n foreach($provisioningData['Password'] as $up) {\n // Skip locked passwords\n if(!isset($up['AuthenticatorStatus']['locked']) || !$up['AuthenticatorStatus']['locked']) {\n // There's probably a better place for this (an enum somewhere?)\n switch($up['password_type']) {\n // XXX we can't use PasswordAuthenticator's enums in case the plugin isn't installed\n case 'CR':\n $attribute[$attr][] = '{CRYPT}' . $up['password'];\n break;\n default:\n // Silently ignore other types\n break;\n }\n }\n }\n }\n break;\n case 'voPersonCertificateDN':\n case 'voPersonCertificateIssuerDN':\n if(!$attropts) {\n $attribute[$attr] = array();\n }\n if(!isset($provisioningData['Certificate'])) break;\n foreach($provisioningData['Certificate'] as $cr) {\n // Skip locked certs\n if(!isset($cr['AuthenticatorStatus']['locked']) || !$cr['AuthenticatorStatus']['locked']) {\n $f = ($attr == 'voPersonCertificateDN' ? 'subject_dn' : 'issuer_dn');\n\n if($attropts) {\n $lrattr = $lattr . \";scope-\" . $cr['id'];\n\n $attribute[$lrattr][] = $cr[$f];\n } \n else {\n $attribute[$attr][] = $cr[$f];\n }\n }\n }\n break;\n\n // Attributes from models attached to CO Person Role\n case 'facsimileTelephoneNumber':\n case 'l':\n case 'mobile':\n case 'postalCode':\n case 'roomNumber':\n case 'st':\n case 'street':\n case 'telephoneNumber':\n // Map the attribute to the model and column\n $mods = array(\n 'facsimileTelephoneNumber' => 'TelephoneNumber',\n 'l' => 'Address',\n 'mobile' => 'TelephoneNumber',\n 'postalCode' => 'Address',\n 'roomNumber' => 'Address',\n 'st' => 'Address',\n 'street' => 'Address',\n 'telephoneNumber' => 'TelephoneNumber'\n );\n\n $cols = array(\n 'facsimileTelephoneNumber' => 'number',\n 'l' => 'locality',\n 'mobile' => 'number',\n 'postalCode' => 'postal_code',\n 'roomNumber' => 'room',\n 'st' => 'state',\n 'street' => 'street',\n 'telephoneNumber' => 'number'\n );\n\n // Walk through each role, each of which can have more than one\n $found = false;\n foreach ($provisioningData['CoPersonRole'] as $r) {\n if (isset($r[ $mods[$attr] ])) {\n foreach ($r[ $mods[$attr] ] as $m) {\n // If a type is set, make sure it matches\n if (empty($targetType) || ($targetType == $m['type'])) {\n // And finally that the attribute itself is set\n if (!empty($m[ $cols[$attr] ])) {\n // Check for attribute options\n $lrattr = $lattr;\n\n if($attropts) {\n $lrattr .= \";role-\" . $r['id'];\n\n if(!empty($m['language'])) {\n $lrattr .= \";lang-\" . $m['language'];\n }\n }\n\n if ($mods[$attr] == 'TelephoneNumber') {\n // Handle these specially... we want to format the number\n // from the various components of the record\n $attribute[$lrattr][] = formatTelephone($m);\n } else {\n $attribute[$lrattr][] = $m[ $cols[$attr] ];\n }\n $found = true;\n }\n }\n\n if (!$multiple && $found) {\n break;\n }\n }\n\n if (!$multiple && $found) {\n break;\n }\n }\n }\n break;\n\n // Group attributes (cn is covered above)\n case 'description':\n $attribute[$attr] = $this->createDescription($provisioningData, $modelType);\n break;\n // hasMember and isMember of are both part of the eduMember objectclass, which can apply\n // to both people and group entries. Check what type of data we're working with for both.\n case 'hasMember':\n if ($group) {\n $this->dev_log('generating hasMember for group');\n $attribute[$attr] = $this->CoLdapFixedProvisionerDn->dnsForMembers($groupMembers, false);\n }\n else if ($cou || $co) {\n $this->dev_log('generating hasMember for COU/CO');\n $attribute[$attr] = $this->CoLdapFixedProvisionerDn->dnsForCous($this->targetData, $provisioningData, $groupMembers, false);\n }\n break;\n case 'isMemberOf':\n if ($person) {\n $this->dev_log('isMemberOf for a person record');\n if (!empty($provisioningData['CoGroupMember'])) {\n foreach ($provisioningData['CoGroupMember'] as $gm) {\n //$this->dev_log('checking group member '.json_encode($gm));\n if (isset($gm['member']) && $gm['member']\n && !empty($gm['CoGroup']['name'])) {\n $dt=array_merge($gm,array('Co'=>$provisioningData['Co']));\n //$this->dev_log('calling obtainDn with '.json_encode($dt));\n $dn=$this->CoLdapFixedProvisionerDn->obtainDn($this->targetData, $dt,'group',false);\n //$this->dev_log('dn returns '.json_encode($dn));\n if(!empty($dn['newdn'])) {\n $attribute[$attr][] = $dn['newdn'];\n }\n\n if( isset($gm['CoGroup']['cou_id'])\n && !empty($gm['CoGroup']['cou_id'])\n && ($gm['CoGroup']['group_type'] == GroupEnum::ActiveMembers)\n ) {\n // find the COU and add membership of the COU as well\n $args = array();\n $args['conditions']['Cou.id'] = $gm['CoGroup']['cou_id'];\n $args['contain'] = false;\n $data = $this->CoLdapFixedProvisionerDn->Cou->find('first', $args);\n if(!empty($data)) {\n $dt=array_merge($data,array('Co'=>$provisioningData['Co']));\n //$this->dev_log('calling obtainDn with '.json_encode($dt));\n $dn=$this->CoLdapFixedProvisionerDn->obtainDn($this->targetData, $dt,'cou',false);\n if(!empty($dn['newdn'])) {\n $attribute[$attr][] = $dn['newdn'];\n }\n }\n }\n }\n }\n } else $this->dev_log('no groupmember records found');\n }\n else if($group) {\n $this->dev_log('isMemberOf for a group record');\n if (!empty($provisioningData['CoGroup']['cou_id'])) {\n $args = array();\n $args['conditions']['Cou.id'] = $provisioningData['CoGroup']['cou_id'];\n $args['contain'] = false;\n $parent = $this->CoLdapFixedProvisionerDn->Cou->find('first', $args);\n if(!empty($parent)) {\n $dt=array_merge($parent,array('Co'=>$provisioningData['Co']));\n $this->dev_log('calling obtainDn with '.json_encode($dt));\n $dn=$this->CoLdapFixedProvisionerDn->obtainDn($this->targetData, $dt,'cou',true);\n $this->dev_log('dn returns '.json_encode($dn));\n if(!empty($dn['newdn'])) {\n $attribute[$attr][] = $dn['newdn'];\n }\n }\n }\n else {\n // a member of the CO top group\n $attribute[$attr][]=$this->coDn($provisioningData);\n }\n }\n else if($cou) {\n $this->dev_log('isMemberOf for a COU record');\n if (!empty($provisioningData['Cou']['parent_id'])) {\n $args = array();\n $args['conditions']['Cou.id'] = $provisioningData['Cou']['parent_id'];\n $args['contain'] = false;\n $parent = $this->CoLdapFixedProvisionerDn->Cou->find('first', $args);\n if(!empty($parent)) {\n $dt=array_merge($parent,array('Co'=>$provisioningData['Co']));\n $this->dev_log('calling obtainDn with '.json_encode($dt));\n $dn=$this->CoLdapFixedProvisionerDn->obtainDn($this->targetData, $dt,'cou',true);\n $this->dev_log('dn returns '.json_encode($dn));\n if(!empty($dn['newdn'])) {\n $attribute[$attr][] = $dn['newdn'];\n }\n }\n }\n else {\n // a member of the CO top group\n $attribute[$attr][]=$this->coDn($provisioningData);\n }\n }\n else if ($service) {\n // a service can be part of a CO/COU and have visibility for a specific group\n $groupdn = $this->getGroupDn($provisioningData['CoService']['co_group_id'], $provisioningData);\n if(!empty($groupdn)) {\n $attribute[$attr][] = $groupdn;\n }\n $coudn = $this->getCouDn($provisioningData['CoService']['cou_id'], $provisioningData);\n if(!empty($coudn)) {\n $attribute[$attr][] = $coudn;\n }\n else {\n // service is a member of the top-CO\n $attribute[$attr][]=$this->coDn($provisioningData);\n }\n }\n break;\n case 'member':\n if($group) {\n # groupOfNames\n $attribute[$attr] = $this->CoLdapFixedProvisionerDn->dnsForMembers($groupMembers, FALSE);\n }\n else if($cou || $co) {\n $attribute[$attr] = $this->CoLdapFixedProvisionerDn->dnsForCous($this->targetData, $provisioningData, $groupMembers, FALSE);\n }\n else if ($service) {\n // a service can be part of a COU and have visibility for a specific group\n $groupdn = $this->getGroupDn($provisioningData['CoService']['co_group_id'], $provisioningData);\n if(!empty($groupdn)) {\n $attribute[$attr][] = $groupdn;\n }\n $coudn = $this->getCouDn($provisioningData['CoService']['cou_id'], $provisioningData);\n if(!empty($coudn)) {\n $attribute[$attr][] = $coudn;\n }\n else {\n // service is a member of the top-CO\n $attribute[$attr][]=$this->coDn($provisioningData);\n }\n }\n if (empty($attribute[$attr])) {\n $this->dev_log('group has no members');\n // groupofnames requires at least one member\n // XXX seems like a better option would be to deprovision the group?\n throw new UnderflowException('member');\n }\n break;\n case 'memberUID':\n # posixGroup, which allows empty groups\n if($group) {\n $attribute[$attr] = $this->CoLdapFixedProvisionerDn->dnsForMembers($groupMembers, true);\n } \n else if($cou || $co) {\n $attribute[$attr] = $this->CoLdapFixedProvisionerDn->dnsForCous($this->targetData, $provisioningData, $groupMembers, true);\n }\n break;\n case 'owner':\n if($group) {\n $owners = $this->CoLdapFixedProvisionerDn->dnsForOwners($groupMembers, FALSE);\n if (!empty($owners)) {\n // Can't have an empty owners list (it should either not be present\n // or have at least one entry)\n $attribute[$attr] = $owners;\n }\n }\n else if($cou || $co) {\n $owners = $this->CoLdapFixedProvisionerDn->dnsForAdmins($provisioningData, FALSE);\n if (!empty($owners)) {\n // Can't have an empty owners list (it should either not be present\n // or have at least one entry)\n $attribute[$attr] = $owners;\n }\n }\n break;\n case 'eduPersonEntitlement':\n // eduPersonEntitlement is based on Group memberships\n if (!empty($provisioningData['CoGroupMember'])) {\n $entGroupIds = Hash::extract($provisioningData['CoGroupMember'], '{n}.co_group_id');\n $attribute[$attr] = $this->CoProvisioningTarget\n ->Co\n ->CoGroup\n ->CoService\n ->mapCoGroupsToEntitlements($provisioningData['Co']['id'], $entGroupIds);\n }\n break;\n\n // posixAccount attributes\n case 'gecos':\n // Construct using same name as cn\n $attribute[$attr] = generateCn($provisioningData['PrimaryName']) . \",,,\";\n break;\n case 'homeDirectory':\n case 'uidNumber':\n case 'gidNumber':\n if ($person) {\n // We pull these attributes from Identifiers with types of the same name\n // as an experimental implementation for CO-863.\n foreach ($provisioningData['Identifier'] as $m) {\n if (isset($m['type'])\n && strtolower($m['type']) == strtolower($attr)\n && $m['status'] == StatusEnum::Active) {\n $attribute[$attr] = $m['identifier'];\n break;\n }\n }\n } else if($attr == \"gidNumber\"){\n // generate a group ID number based on the group data\n $this->dev_log(\"creating gid number\");\n $nr = $this->createGidNumber($provisioningData['CoGroup'], $targetType);\n if(!empty($nr)) {\n $attribute[$attr] = $nr;\n }\n }\n break;\n case 'loginShell':\n // XXX hard coded for now (CO-863)\n $attribute[$attr] = \"/bin/tcsh\";\n break;\n\n // Internal attributes\n case 'pwdAccountLockedTime':\n // Our initial support is simple: set to 000001010000Z for\n // expired or suspended Person status\n if ($provisioningData['CoPerson']['status'] == StatusEnum::Expired\n || $provisioningData['CoPerson']['status'] == StatusEnum::Suspended) {\n $attribute[$attr] = '000001010000Z';\n }\n break;\n\n case 'dnQualifier':\n $attribute[$attr] = $provisioningData['Co']['id'];\n break;\n\n default:\n throw new InternalErrorException(\"Unknown attribute: \" . $attr);\n break;\n }\n $this->dev_log(\"attribute is \".json_encode($attribute));\n return $attribute;\n }", "title": "" }, { "docid": "c9c8cced6d1e94fe75778eb62e5e95d6", "score": "0.49375424", "text": "public function type()\n {\n return $this->belongsTo('App\\Models\\AdvertType', 'advert_type_id');\n }", "title": "" }, { "docid": "c879ffa2ccc00feb33d15722cef74205", "score": "0.49350718", "text": "public function getAttributeInfo($attributeCode)\n {\n $entityType = 'catalog_product';\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $entityAttributeObj = $objectManager->create('Magento\\Eav\\Model\\Entity\\Attribute');\n /*echo \"<pre>\";\n print_r(get_class_methods($entityAttributeObj->loadByCode($entityType, $attributeCode)));\n die();*/\n return $entityAttributeObj->loadByCode($entityType, $attributeCode);\n }", "title": "" }, { "docid": "5f194b5e4fc82380eb1490cb4c80fec1", "score": "0.49206212", "text": "protected abstract function getType(): string;", "title": "" }, { "docid": "a0f33773a79cebe31a4e01745e94e195", "score": "0.49130175", "text": "public function getType() {\r\n\treturn $this->type;\r\n }", "title": "" }, { "docid": "802248d0d423583da0e4971e4c71420c", "score": "0.4912432", "text": "public function getAttribute();", "title": "" }, { "docid": "c9bd38e2668ba2a63243e49097c51b99", "score": "0.4910071", "text": "public function getType()\n{\nreturn $this->type;\n}", "title": "" }, { "docid": "38fdd3dab520429e28cb7b971fc428f7", "score": "0.49081662", "text": "public function getTypeTextAttribute(){\n return $this->type_id > count(Type::all()) || $this->state < 0\n ? 'UNKNOWN'\n : Type::where('id', '=', $this->type_id)->first()->name;\n\n }", "title": "" }, { "docid": "a3825ad4c1d55285081731cc16b6045d", "score": "0.49080583", "text": "public function attributeCustomTypes()\n {\n return array(\n 'id' => array('data-options' => array('checkbox'=>'true'), 'key' => true),\n 'serial' => array('width' => 180, 'sortable' => 'true'),\n 'vehicle_model_id' => array('width' => 120, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.vehicle_model_name; }\"),\n 'vehicle_id' => array('width' => 120, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.plate_number; }\"),\n 'flag' => array('width' => 120),\n 'user_id' => array('width' => 120, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.user_name; }\"),\n 'status' => array('width' => 60, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderStatusArray()).\" }\"),\n 'type' => array('width' => 60, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderTypeArray()).\" }\"),\n 'vehicle_color' => array('width' => 80, 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\VehicleModule::getVehicleColorsArray()).\" }\"),\n 'vehicle_oil_label' => array('width' => 100, 'sortable' => 'true'),\n 'vehicle_outbound_mileage' => array('width' => 100),\n 'vehicle_inbound_mileage' => array('width' => 100),\n 'origin_vehicle_id' => array('width' => 100, 'sortable' => 'true'),\n 'channel_serial' => array('width' => 180, 'sortable' => 'true'),\n 'start_time' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'end_time' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'new_end_time' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'rent_days' => array('width' => 60, 'sortable' => 'true'),\n 'belong_office_id' => array('width' => 100, 'formatter' => \"function(value,row){ return row.belong_office_disp; }\"),\n 'office_id_rent' => array('width' => 100, 'formatter' => \"function(value,row){ return row.rent_office_disp; }\"),\n 'office_id_return' => array('width' => 100, 'formatter' => \"function(value,row){ return row.return_office_disp; }\"),\n 'pay_type' => array('width' => 80, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getPriceTypeArray()).\" }\"),\n 'pay_source' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderPayTypeArray()).\" }\"),\n 'total_amount' => array('width' => 100, 'sortable' => 'true'),\n 'price_rent' => array('width' => 100, 'sortable' => 'true'),\n 'paid_amount' => array('width' => 100, 'sortable' => 'true'),\n 'rent_per_day' => array('width' => 100, 'sortable' => 'true'),\n 'rent_per_hour' => array('width' => 100, 'sortable' => 'true'),\n 'price_left' => array('width' => 100, 'formatter' => \"function(value,row){return row.total_amount - row.paid_amount;}\"),\n 'price_overtime' => array('width' => 100, 'sortable' => 'true'),\n 'price_overmileage' => array('width' => 100, 'sortable' => 'true'),\n 'price_designated_driving' => array('width' => 100, 'sortable' => 'true'),\n 'price_designated_driving_overtime' => array('width' => 100, 'sortable' => 'true'),\n 'price_designated_driving_overmileage' => array('width' => 100, 'sortable' => 'true'),\n 'price_oil' => array('width' => 100),\n 'price_oil_agency' => array('width' => 100),\n 'price_car_damage' => array('width' => 100),\n 'price_violation' => array('width' => 100),\n 'price_poundage' => array('width' => 100),\n 'price_basic_insurance' => array('width' => 100),\n 'price_deposit' => array('width' => 100),\n 'price_deposit_violation' => array('width' => 100),\n 'price_optional_service' => array('width' => 100),\n 'price_insurance_overtime' => array('width' => 100),\n 'price_different_office' => array('width' => 100),\n 'price_take_car' => array('width' => 100),\n 'price_return_car' => array('width' => 100),\n 'price_working_loss' => array('width' => 100),\n 'price_accessories' => array('width' => 100),\n 'price_agency' => array('width' => 100),\n 'price_other' => array('width' => 100),\n 'price_preferential' => array('width' => 100),\n 'price_gift' => array('width' => 100),\n 'price_bonus_point_deduction' => array('width' => 100),\n 'unit_price_overtime' => array('width' => 100, 'sortable' => 'true'),\n 'unit_price_overmileage' => array('width' => 100, 'sortable' => 'true'),\n 'unit_price_basic_insurance' => array('width' => 100, 'sortable' => 'true'),\n 'unit_price_designated_driving' => array('width' => 100, 'sortable' => 'true'),\n 'unit_price_designated_driving_overtime' => array('width' => 100, 'sortable' => 'true'),\n 'unit_price_designated_driving_overmileage' => array('width' => 100, 'sortable' => 'true'),\n 'settlement_status' => array('width' => 80, 'sortable' => 'true', 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getSettlementTypeArray()).\" }\"),\n 'preferential_type' => array('width' => 100),\n 'preferential_info' => array('width' => 100),\n 'deposit_pay_source' => array('width' => 100, 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderPayTypeArray()).\" }\"),\n 'paid_deposit' => array('width' => 100, 'sortable' => 'true'),\n 'settlement_pay_source' => array('width' => 100, 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderPayTypeArray()).\" }\"),\n 'optional_service' => array('width' => 100),\n 'optional_service_info' => array('width' => 100),\n 'used_gift_code' => array('width' => 100),\n 'address_take_car' => array('width' => 100),\n 'address_return_car' => array('width' => 100),\n 'source' => array('width' => 80, 'formatter' => \"function(value,row){ \".\\common\\helpers\\CEasyUI::convertComboboxDataToFormatterFunc(\\common\\components\\OrderModule::getOrderSourceArray()).\" }\"),\n 'customer_name' => array('width' => 80),\n 'customer_telephone' => array('width' => 80),\n 'customer_fixedphone' => array('width' => 80),\n 'customer_id_type' => array('width' => 80),\n 'customer_id' => array('width' => 80),\n 'customer_address' => array('width' => 80),\n 'customer_postcode' => array('width' => 80),\n 'customer_operator_name' => array('width' => 80),\n 'customer_driver_license_time' => array('width' => 80),\n 'customer_driver_license_expire_time' => array('width' => 80),\n 'customer_vip_level' => array('width' => 80),\n 'customer_employer' => array('width' => 80),\n 'customer_employer_address' => array('width' => 80),\n 'customer_employer_phone' => array('width' => 80),\n 'customer_employer_postcode' => array('width' => 80),\n 'customer_employer_certificate_id' => array('width' => 80),\n 'emergency_contact_name' => array('width' => 80),\n 'emergency_contact_phone' => array('width' => 80),\n 'refund_account_number' => array('width' => 80),\n 'refund_account_name' => array('width' => 80),\n 'refund_bank_name' => array('width' => 80),\n 'refund_remark' => array('width' => 80),\n 'inv_title' => array('width' => 120),\n 'inv_name' => array('width' => 80),\n 'inv_tax_number' => array('width' => 80),\n 'inv_phone' => array('width' => 80),\n 'inv_amount' => array('width' => 80),\n 'inv_address' => array('width' => 120),\n 'inv_postcode' => array('width' => 80),\n 'remark' => array('width' => 120),\n 'settlement_remark' => array('width' => 120),\n 'edit_user_id' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.edit_user_disp; }\"),\n 'booking_time' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(row.created_at);}\"),\n 'booking_left_time' => array('width' => 100, 'formatter' => \"function(value,row){ return $.custom.utils.secondsToHuman(\".\\common\\components\\OrderModule::ORDER_MAX_WAITING_SECONDS.\" - (Math.floor($.now()/1000) - parseInt(row.created_at)));}\"),\n 'renting_left_time' => array('width' => 100, 'formatter' => \"function(value,row){return $.custom.utils.secondsToHuman(parseInt(row.new_end_time) - Math.floor($.now()/1000));}\"),\n 'violation_left_time' => array('width' => 100, 'formatter' => \"function(value,row){return $.custom.utils.secondsToHuman(\".\\common\\components\\OrderModule::ORDER_VIOLATION_CHECKING_DURATION.\" - (Math.floor($.now()/1000) - parseInt(row.car_returned_at)));}\"),\n 'confirmed_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'car_dispatched_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'car_returned_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'settlemented_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'settlement_user_id' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.settlement_user_disp; }\"),\n 'created_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'updated_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'operation_waiting' => array('width' => 250, \n 'buttons' => array(\n \\Yii::$app->user->can('order/edit') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/edit', 'id'=>'']), 'name' => Yii::t('locale', 'Confirm order'), 'title' => Yii::t('locale', 'Confirm order'), 'paramField' => 'id', 'icon' => 'icon-ok', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/cancel') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['order/cancel', 'id'=>'']), 'name' => Yii::t('locale', 'Cancel order'), 'title' => Yii::t('locale', 'Cancel order'), 'paramField' => 'id', 'icon' => 'icon-delete', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n\t\t\t\n\t\t\n 'operation_booking' => array('width' => 290, \n 'buttons' => array(\n \\Yii::$app->user->can('order/confirm_booked') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['order/confirm_booked', 'id'=>'']), 'condition'=>array(\"{field} == 0\", array('{field}'=>'confirmed_at')), 'name' => Yii::t('locale', 'Confirm'), 'title' => Yii::t('locale', 'Confirm order'), 'paramField' => 'id', 'icon' => '', 'showText'=>true) : null,\n array('type' => 'ajax', 'condition'=>array(\"{field} != 0\", array('{field}'=>'confirmed_at')), 'name' => Yii::t('carrental', 'Confirmed'), 'title' => Yii::t('carrental', 'Confirmed'), 'icon' => '', 'showText'=>true),\n \\Yii::$app->user->can('order/edit') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/edit', 'id'=>'']), 'name' => \\Yii::t('locale', '{name} order', ['name'=>Yii::t('locale', 'Edit')]), 'title' => \\Yii::t('locale', '{name} order', ['name'=>Yii::t('locale', 'Edit')]), 'paramField' => 'id', 'icon' => 'icon-edit', 'showText' => true) : null,\n //\\Yii::$app->user->can('vehicle/validation') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['vehicle/validation', 'purpose'=>'vehicle_dispatch']).\"&order_id=\", 'name' => Yii::t('carrental', 'Dispatch vehicle'), 'title' => Yii::t('carrental', 'Dispatch vehicle'), 'paramField' => 'id', 'icon' => 'icon-ok', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/cancel') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['order/cancel', 'id'=>'']), 'name' => Yii::t('locale', 'Cancel order'), 'title' => Yii::t('locale', 'Cancel order'), 'paramField' => 'id', 'icon' => 'icon-delete', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n 'operation_renting' => array('width' => 200, \n 'buttons' => array(\n \\Yii::$app->user->can('order/order_relet') ? array('type' => 'window', 'url' => \\yii\\helpers\\Url::to(['order/order_relet', 'id'=>'']), 'name' => Yii::t('locale', 'Relet'), 'title' => Yii::t('locale', 'Relet'), 'paramField' => 'id', 'icon' => '', 'showText' => true) : null,\n \\Yii::$app->user->can('order/settlement') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/settlement', 'id'=>'']), 'name' => Yii::t('locale', 'Settlement'), 'title' => Yii::t('locale', 'Settlement'), 'paramField' => 'id', 'icon' => '', 'showText' => true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n 'operation_violation' => array('width' => 210, \n 'buttons' => array(\n \\Yii::$app->user->can('vehicle/violation_info') ? array('type' => 'dialog', 'url' => \\yii\\helpers\\Url::to(['vehicle/violation_info', 'purpose'=>'order']).\"&order_id=\", 'name' => Yii::t('carrental', 'Violation input'), 'title' => Yii::t('carrental', 'Violation input'), 'paramField' => 'id', 'icon' => '', 'showText' => true) : null,\n \\Yii::$app->user->can('order/complete') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['order/complete', 'id'=>'']), 'name' => Yii::t('locale', 'Order completed'), 'title' => Yii::t('locale', 'Order completed'), 'paramField' => 'id', 'icon' => '', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n 'operation_complete' => array('width' => 150, \n 'buttons' => array(\n \\Yii::$app->user->can('vehicle/violation_info') ? array('type' => 'dialog', 'url' => \\yii\\helpers\\Url::to(['vehicle/violation_info', 'purpose'=>'order']).\"&order_id=\", 'name' => Yii::t('carrental', 'Violation input'), 'title' => Yii::t('carrental', 'Violation input'), 'paramField' => 'id', 'icon' => '', 'showText' => true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['order/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ), \n\t\t\t\n\t\t\t\n\t\t\t//单程往返\n\t\t\t'operation_waiting_oneway' => array('width' => 250, \n 'buttons' => array(\n \\Yii::$app->user->can('order/edit') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/edit', 'id'=>'']), 'name' => Yii::t('locale', 'Confirm order'), 'title' => Yii::t('locale', 'Confirm order'), 'paramField' => 'id', 'icon' => 'icon-ok', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/cancel') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['orderhour/cancel', 'id'=>'']), 'name' => Yii::t('locale', 'Cancel order'), 'title' => Yii::t('locale', 'Cancel order'), 'paramField' => 'id', 'icon' => 'icon-delete', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n\t\t\t'operation_booking_oneway' => array('width' => 290, \n 'buttons' => array(\n \\Yii::$app->user->can('order/confirm_booked') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['orderhour/confirm_booked', 'id'=>'']), 'condition'=>array(\"{field} == 0\", array('{field}'=>'confirmed_at')), 'name' => Yii::t('locale', 'Confirm'), 'title' => Yii::t('locale', 'Confirm order'), 'paramField' => 'id', 'icon' => '', 'showText'=>true) : null,\n array('type' => 'ajax', 'condition'=>array(\"{field} != 0\", array('{field}'=>'confirmed_at')), 'name' => Yii::t('carrental', 'Confirmed'), 'title' => Yii::t('carrental', 'Confirmed'), 'icon' => '', 'showText'=>true),\n \\Yii::$app->user->can('order/edit') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/edit', 'id'=>'']), 'name' => \\Yii::t('locale', '{name} order', ['name'=>Yii::t('locale', 'Edit')]), 'title' => \\Yii::t('locale', '{name} order', ['name'=>Yii::t('locale', 'Edit')]), 'paramField' => 'id', 'icon' => 'icon-edit', 'showText' => true) : null,\n \n \\Yii::$app->user->can('order/cancel') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['orderhour/cancel', 'id'=>'']), 'name' => Yii::t('locale', 'Cancel order'), 'title' => Yii::t('locale', 'Cancel order'), 'paramField' => 'id', 'icon' => 'icon-delete', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n\t\t\t'operation_renting_oneway' => array('width' => 200, \n 'buttons' => array(\n \\Yii::$app->user->can('order/settlement') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/settlement', 'id'=>'']), 'name' => Yii::t('locale', 'Settlement'), 'title' => Yii::t('locale', 'Settlement'), 'paramField' => 'id', 'icon' => '', 'showText' => true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n\t\t\t\n\t\t\t'operation_violation_oneway' => array('width' => 210, \n 'buttons' => array(\n \\Yii::$app->user->can('vehicle/violation_info') ? array('type' => 'dialog', 'url' => \\yii\\helpers\\Url::to(['vehicle/violation_info', 'purpose'=>'order']).\"&order_id=\", 'name' => Yii::t('carrental', 'Violation input'), 'title' => Yii::t('carrental', 'Violation input'), 'paramField' => 'id', 'icon' => '', 'showText' => true) : null,\n \\Yii::$app->user->can('order/complete') ? array('type' => 'ajax', 'url' => \\yii\\helpers\\Url::to(['orderhour/complete', 'id'=>'']), 'name' => Yii::t('locale', 'Order completed'), 'title' => Yii::t('locale', 'Order completed'), 'paramField' => 'id', 'icon' => '', 'showText'=>true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n\t\t\t\n\t\t\t'operation_complete_oneway' => array('width' => 150, \n 'buttons' => array(\n \\Yii::$app->user->can('vehicle/violation_info') ? array('type' => 'dialog', 'url' => \\yii\\helpers\\Url::to(['vehicle/violation_info', 'purpose'=>'order']).\"&order_id=\", 'name' => Yii::t('carrental', 'Violation input'), 'title' => Yii::t('carrental', 'Violation input'), 'paramField' => 'id', 'icon' => '', 'showText' => true) : null,\n \\Yii::$app->user->can('order/paymentdetail_index') ? array('type' => 'tab', 'url' => \\yii\\helpers\\Url::to(['orderhour/paymentdetail_index', 'serial'=>'']), 'name' => Yii::t('locale', 'Payment details'), 'title' => Yii::t('locale', 'Order payment details'), 'paramField' => 'serial', 'icon' => 'icon-book_tabs', 'showText'=>true) : null,\n ),\n ),\n\t\t\t\n );\n }", "title": "" }, { "docid": "0cee66599227f46757f9090556ce5f18", "score": "0.49050823", "text": "public function getType()\n {\n\n return substr( get_class( $this ), 15 );\n }", "title": "" }, { "docid": "25432b1d08e1e04ef88cca4acd466e38", "score": "0.48959875", "text": "public function getType()\n {\n return self::TYPE;\n }", "title": "" }, { "docid": "25432b1d08e1e04ef88cca4acd466e38", "score": "0.48959875", "text": "public function getType()\n {\n return self::TYPE;\n }", "title": "" }, { "docid": "7ad1a37ffe83ad28fd7105a969a6848f", "score": "0.4891858", "text": "static private function getType()\n {\n if (extension_loaded('apc') && function_exists('apc_add'))\n return 'Apc';\n //else if (extension_loaded('xcache'))\n //return 'XCache';\n else\n return 'File';\n }", "title": "" }, { "docid": "81943e08723daeda73a00191b5c074a6", "score": "0.4889185", "text": "public function GetDefaultAttributeTypeForMarket()\n\t{\n\t\trequire_once(\"C:\\Users\\jpi\\Zend\\workspaces\\DefaultWorkspace10\\soap_client/lib/soap/model/PlentySoapResponse_GetDefaultAttributeTypeForMarket.class.php\");\n\t\treturn parent::__soapCall(\"GetDefaultAttributeTypeForMarket\",array());\n\t}", "title": "" }, { "docid": "93688cd93c487dbc2f742b5d55a1bdb3", "score": "0.4885589", "text": "public function type() { return $this->_m_type; }", "title": "" }, { "docid": "93688cd93c487dbc2f742b5d55a1bdb3", "score": "0.4885589", "text": "public function type() { return $this->_m_type; }", "title": "" }, { "docid": "22c2d6ef04b0e166fc410564b53f3c68", "score": "0.4881799", "text": "public function getTypeAttribute()\n {\n return 'DEBIT';\n }", "title": "" }, { "docid": "7a7b236ff23f5d7a0e41e077c779aafd", "score": "0.4860374", "text": "public static function getBbTagType();", "title": "" }, { "docid": "efd41a0116b65c4d397ca9e084f5e806", "score": "0.48557955", "text": "function get_type() {\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "994d186df33047177bc20eb342ffde77", "score": "0.48554972", "text": "public function type() {\n return $this->type;\n }", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.48503745", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.48503745", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.48503745", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.48503745", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.48503745", "text": "public function getType(): string;", "title": "" } ]
128c2c418b999cd5d739e28ef453e430
/PUBLIC METHODS Creates the node for the table, using the specified caption string. If a caption node already exists, the old one will be removed and a new one will be created with the new caption string.
[ { "docid": "1bb41ba3a7589045148d853c9573dc46", "score": "0.6101271", "text": "public function setCaption($caption) {\r\n\t\t//remove existing node\r\n\t\t$this->removeElementsByTagName('caption');\r\n\r\n\t\t$element = new Larc_Html_Element('caption', $caption, NULL, $this);\r\n\t\t$this->captionNode = $this->insertFirst($element);\r\n\r\n\t\tif($this->captionClass) {\r\n\t\t\t$this->captionNode->addClassName($this->captionClass);\r\n\t\t}\r\n\t\treturn $this->captionNode;\r\n\t}", "title": "" } ]
[ { "docid": "23d2fa0eb58a8abc6d431ae80de2c8aa", "score": "0.5282601", "text": "public function createNodeFromLabel($label);", "title": "" }, { "docid": "f08c88398e187e5c7a3fa7c3b89a1301", "score": "0.5140902", "text": "public function setCaption($caption);", "title": "" }, { "docid": "ad6a7c2659a586641f7a312bd3a44939", "score": "0.5127343", "text": "protected function createTable(){\n\t\t$columns = array(\n\t\t\t\t'id'\t=>\t'pk',\n\t\t\t\t'name'\t=>\t'string',\n\t\t\t\t'frequency'\t=>\t'int',\n\t\t);\n\t\ttry {\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\t$this->getDbConnection()->getSchema()->createTable($this->tableName(), $columns)\n\t\t\t)->execute();\n\t\t} catch (CDbException $e){\n\t\t\tYii::log($e->getMessage(), 'warning');\n\t\t}\n\t\t$columns = array(\n\t\t\t\t'nid'\t=>\t'int',\n\t\t\t\t'tid'\t=>\t'int',\n\t\t);\n\t\ttry {\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\t$this->getDbConnection()->getSchema()->createTable('{{node_tag}}', $columns)\n\t\t\t)->execute();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\t$this->getDbConnection()->getSchema()->addPrimaryKey('nid_tid', '{{node_tag}}', 'nid,tid')\n\t\t\t)->execute();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\t$this->getDbConnection()->getSchema()->addForeignKey('node', '{{node_tag}}', 'nid', '{{node}}', 'id')\n\t\t\t)->execute();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\t$this->getDbConnection()->getSchema()->addForeignKey('tags', '{{node_tag}}', 'tid', '{{tags}}', 'id')\n\t\t\t)->execute();\n\t\t} catch (CDbException $e){\n\t\t\tYii::log($e->getMessage(), 'warning');\n\t\t}\n\t\t$this->refreshMetaData();\n\t}", "title": "" }, { "docid": "3df6028ae6c713bee150c30e93ae7f1d", "score": "0.5078447", "text": "public function ReplaceCaption($oCXHTableCaption)\n\t{\n\t\t$this->AppendContent($oCXHTableCaption);\n\t}", "title": "" }, { "docid": "db9d446543541aea2b246875403214cb", "score": "0.49579334", "text": "protected function createTable(){\n\t\t$ref = new Block();\n\t\t$columns = array(\n\t\t\t\t'id'\t=>\t'pk',\n\t\t\t\t'root'\t=>\t'int',\n\t\t\t\t'lft'\t=>\t'int',\n\t\t\t\t'rgt'\t=>\t'int',\n\t\t\t\t'level'\t=>\t'int',\n\t\t\t\t'label'\t=>\t'string',\n\t\t\t\t'description'\t=>\t'text',\n\t\t\t\t'url'\t=>\t'string',\n\t\t\t\t'template'\t=>\t'string',\n\t\t\t\t'visible'\t=>\t'boolean',\n\t\t\t\t'icon'\t=>\t'string',\n\t\t\t\t'task'\t=>\t'string',\n\t\t);\n\t\ttry {\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->createTable($this->tableName(), $columns)\n\t\t\t)->execute();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->createIndex('rlrl', $this->tableName(), 'root,lft,rgt,level')\n\t\t\t)->execute();\n\t\t} catch (CDbException $e){\n\t\t\tYii::log($e->getMessage(), 'warning');\n\t\t}\n\t\t$this->refreshMetaData();\n\t}", "title": "" }, { "docid": "560d56d071655f63156db032b7331e33", "score": "0.4858285", "text": "public function getCaptionNode() {\r\n\t\treturn $this->captionNode;\r\n\t}", "title": "" }, { "docid": "efd7f1eadd7a9115531fd1966e54f303", "score": "0.46469602", "text": "public function createTable($tableName){\n \n //A query for a new database table is created\n $query = \"CREATE TABLE \".$tableName.\" (imdbId VARCHAR(10) PRIMARY KEY, json JSON NOT NULL)\"; \n\n //The query is performed\n $result = $this->mysqli->query($query); \n\n if(!($result)){\n $this->error = \"mysqli query failed: \" . htmlspecialchars($this->mysqli->error);\n $this->isError = true;\n }\n \n \n \n }", "title": "" }, { "docid": "894b5de68061c27f534cef33c7f57215", "score": "0.4644292", "text": "protected function createTable(){\n\t\t$columns = array(\n\t\t\t\t'bid'\t=>\t'pk',\n\t\t\t\t'title'\t=>\t'string',\n\t\t\t\t'label'\t=>\t'string',\n\t\t\t\t'description'\t=>\t'text',\n\t\t\t\t'type'\t=>\t'string',\n\t\t\t\t'option'\t=>\t'text',\n\t\t\t\t'status'\t=>\t'boolean',\n\t\t\t\t'url'\t=>\t'text',\n\t\t\t\t'display'\t=>\t'boolean',\n\t\t);\n\t\ttry {\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->createTable($this->tableName(), $columns)\n\t\t\t)->execute();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->addPrimaryKey('id_lang', $this->tableName(), 'id,language')\n\t\t\t)->execute();\n\t\t\t$ref = new Blocktheme();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->addForeignKey('fk_block_blocktheme', $this->tableName(), 'bid', $ref->tableName(), 'block')\n\t\t\t)->execute();\n\t\t} catch (CDbException $e){\n\t\t\tYii::log($e->getMessage(), 'warning');\n\t\t}\n\t\t$this->refreshMetaData();\n\t}", "title": "" }, { "docid": "771f63c51c765526ad6f43edc04c2de2", "score": "0.4638931", "text": "public function setCaption(?string $caption): void\n {\n $this->caption = $caption;\n }", "title": "" }, { "docid": "771f63c51c765526ad6f43edc04c2de2", "score": "0.4638931", "text": "public function setCaption(?string $caption): void\n {\n $this->caption = $caption;\n }", "title": "" }, { "docid": "f22722c8e37cc9c5c9ad88b094f6f34b", "score": "0.463881", "text": "public function createNode($table, $name, $description, $parent_id)\n\t{\n\t\t/**\n\t\t * Fetch the parent node\n\t\t */\n\t\t$parent = $this->getRow($table, \"id\", $parent_id);\n\n\t\t/**\n\t\t * Validate that the parent exists\n\t\t */\n\t\tif(!$parent)\n\t\t{\n\t\t\tthrow new Exceptions\\Store(\"Parent node for ({$node}) does not exists\");\n\t\t}\n\n\n\t\t/**\n\t\t * Repositon the l/r values\n\t\t */\n\t\t$sql = \"UPDATE {$this->prefix}{$table} SET `left` = `left` + 2 WHERE `left` >= ?\";\n\t\t$this->database->prepare($sql)->execute(array($parent->right));\n\n\t\t$sql = \"UPDATE {$this->prefix}{$table} SET `right` = `right` + 2 WHERE `right` >= ?\";\n\t\t$this->database->prepare($sql)->execute(array($parent->right));\n\n\t\t/**\n\t\t * slot hte new node in place\n\t\t * @var PDOStatement\n\t\t */\n\t\t$statement = $this->database->prepare(\"INSERT INTO {$this->prefix}{$table} (name, description, `left`, `right`) VALUES (?, ?, ?, ?)\");\n\n\t\t/**\n\t\t * Execute the statement\n\t\t */\n\t\t$success = $statement->execute(array(\n\t\t\t$name,\n\t\t\t$description,\n\t\t\t$parent->right,\n\t\t\t$parent->right + 1\n\t\t));\n\n\t\treturn $this->database->lastInsertId();\n\t}", "title": "" }, { "docid": "72c3d80d4272db2fdb75ab2b531024aa", "score": "0.45940262", "text": "public function setCaption($caption) {\n\t\t$this->caption = $caption;\n\t}", "title": "" }, { "docid": "72c3d80d4272db2fdb75ab2b531024aa", "score": "0.45940262", "text": "public function setCaption($caption) {\n\t\t$this->caption = $caption;\n\t}", "title": "" }, { "docid": "72c3d80d4272db2fdb75ab2b531024aa", "score": "0.45940262", "text": "public function setCaption($caption) {\n\t\t$this->caption = $caption;\n\t}", "title": "" }, { "docid": "2e2599aa86c9c9fee8f49cd1e66b6872", "score": "0.45187923", "text": "public function setCaption($caption)\n {\n $this->caption = $caption;\n return $this;\n }", "title": "" }, { "docid": "466ab5174716843db841c921c1da0432", "score": "0.45090032", "text": "private function createNode( $nodeName = null, $textValue = null, $attributes = null )\n {\n if( !$nodeName || !is_string($nodeName) )\n {\n $this->fWarn->add(get_class($this) .' Missing information: nodeName must be a string');\n return false;\n }\n\n // Create the holding node.\n\t// cast to string in case we get an object.\n\tif( preg_match(\"/[<>&]/\", strval($textValue)) )\n\t{\n\t\t$node = $this->doc->createElement( $this->sanitizeName($nodeName) );\n\t\t$tmp = $this->doc->createCDATASection( $textValue );\n\t\t$node->appendChild( $tmp );\n\t} else {\n\t\t$node = $this->doc->createElement( $this->sanitizeName($nodeName), $this->escapeText($textValue) );\n\t}\n // If there's not value, remove the text child, which DOM creates by default\n if( !$textValue )\n {\n $node->removeChild( $node->firstChild );\n }\n $this->addAttributes( $node, $attributes );\n return $node;\n }", "title": "" }, { "docid": "b35d0455e34e339384e5da6dc9a4c12b", "score": "0.44997096", "text": "function createTable($tablename)\n {\n $sql = \"CREATE TABLE IF NOT EXISTS $tablename(\n id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n title VARCHAR(500) NOT NULL,\n priority ENUM('LOW','MEDIUM','HIGH') DEFAULT 'LOW',\n isCompleted BOOLEAN DEFAULT FALSE,\n add_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n FULLTEXT(title)\n )\";\n if ($this->conn->query($sql) === false) {\n die(\"Error creating table $tablename: \" . $this->conn->error);\n }\n }", "title": "" }, { "docid": "3891f281d337f9ad347c17d315fb8db8", "score": "0.4442181", "text": "function nodeTable($nodes){\n global $media_dir, $skin, $hierarchy, $album_name_truncate, $row_colors, \n $img_more, $img_email, $img_rate, $img_discuss, $num_other_albums, $img_download_dis;\t\t\t\t\t\n \n if (sizeof($nodes) == 0) return;\n // Let's setup the new display object\n $display = &new jzDisplay();\n \n // Now let's setup the big table to display everything\n $i=0;\n ?>\n <table class=\"jz_track_table\" width=\"100%\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\">\n\t <!--a-->\n\t <?php\n\t $c = -1;\n\t foreach ($nodes as $child) {\n\t \t$path = $child->getPath(\"String\");\n\t \t$c++;\n\t ?>\n\t <tr class=\"<?php echo $row_colors[$i]; ?>\">\n\t <!--\n\t <td width=\"1%\" valign=\"top\" class=\"jz_track_table_songs_td\">\n\t <input class=\"jz_checkbox\" type=\"checkbox\" name=\"track-<?php echo $c; ?>\" value=\"<?php echo $path; ?>\">\n\t </td>\n\t -->\n\t <td width=\"1%\" valign=\"top\" class=\"jz_track_table_songs_td\">\n\t <?php \n\t \techo $display->downloadButton($child); \n\t ?>\n\t </td>\n\t <td width=\"1%\" valign=\"top\" class=\"jz_track_table_songs_td\">\n\t <?php \n\t \t\n\t \techo $display->playButton($child); \n\t ?>\n\t </td>\n\t <td width=\"1%\" valign=\"top\" class=\"jz_track_table_songs_td\">\n\t <a class=\"jz_track_table_songs_href\" href=\"\"><?php echo $img_email; ?></a>\n\t </td>\n\t <td width=\"1%\" valign=\"top\" class=\"jz_track_table_songs_td\">\n\t <a class=\"jz_track_table_songs_href\" href=\"\"><?php echo $img_rate; ?></a>\n\t </td>\n\t <td width=\"1%\" valign=\"top\" class=\"jz_track_table_songs_td\">\n\t <a class=\"jz_track_table_songs_href\" href=\"\"><?php echo $img_discuss; ?></a>\n\t </td>\n\t <td width=\"1%\" align=\"center\" valign=\"top\" class=\"jz_track_table_songs_td\">&nbsp;\n\t \n\t </td>\n\t <td width=\"100%\" valign=\"top\" class=\"jz_track_table_songs_td\">\n\t \n\t <?php \n\t $parent = $child->getNaturalParent();\n\t if ($parent->getLevel() > 0) {\n\t $display->link($parent, $parent->getName(\"String\"), $parent->getName(), \"jz_track_table_songs_href\"); \n\t echo \" / \";\n\t }\n\t echo \"<!--m-->\";\n\t $display->link($child, $child->getName(\"String\"), $child->getName(), \"jz_track_table_songs_href\"); \n\t ?><!--n--></a>\n\t </td>\n\t <td width=\"12%\" class=\"jz_track_table_songs_td\" nowrap>&nbsp;\n\t \n\t </td>\n\t <td width=\"10%\" class=\"jz_track_table_songs_td\" nowrap>\n\t &nbsp; &nbsp;\n\t </td>\n\t <td width=\"10%\" class=\"jz_track_table_songs_td\" nowrap>\n\t </td>\n\t <td width=\"10%\" class=\"jz_track_table_songs_td\" nowrap>\n\t &nbsp; &nbsp;\n\t </td>\n\t <td width=\"10%\" class=\"jz_track_table_songs_td\" nowrap>&nbsp;\n\t \n\t </td>\n\t <td width=\"10%\" class=\"jz_track_table_songs_td\" nowrap>\n\t &nbsp; &nbsp;\n\t </td>\n\t <td width=\"10%\" class=\"jz_track_table_songs_td\" nowrap>\n\t &nbsp; &nbsp;\n\t </td>\n\t </tr>\n\t <?php\t\t\n\t $i = 1 - $i; // cool trick ;)\n\t }\n \n // Now let's set a field with the number of checkboxes that were here\n echo \"<!--z--></table><br>\";\n }", "title": "" }, { "docid": "af24353af6c766be4e5fd9dcaa5f8733", "score": "0.44236293", "text": "public function create_table($row)\n {\n return \"\";\n }", "title": "" }, { "docid": "2e3282fcd7bef00f54c2407a97628d45", "score": "0.43626803", "text": "private function create($node)\n {\n $key = $node->getKey();\n $nodehash = md5($key);\n $this->hashtable->set($key, $nodehash);\n if (!$headhash = $this->hashtable->get('headkey')) {\n $this->hashtable->set('headkey', $nodehash);\n $this->hashtable->set('tailkey', $nodehash);\n\n $this->linkedlist->set($nodehash, $node);\n $this->hashtable->set('counter', 1);\n } else {\n $node = $this->attach($headhash, $node);\n $this->linkedlist->set($nodehash, $node);\n $this->hashtable->increment('counter', 1);\n }\n }", "title": "" }, { "docid": "59e5b574e91a614cd49a23e656a034fc", "score": "0.43358055", "text": "function dbTable( &$parent, $attributes = NULL ) {\n\t\t$this->parent =& $parent;\n\t\t$this->name = $this->prefix($attributes['NAME']);\n\t\t// GS Fix for constraint impl\n\t\tif(isset($attributes['ALTER']))\n\t\t{\n\t\t\t$this->alter = $attributes['ALTER'];\n\t\t}\n\t}", "title": "" }, { "docid": "0d3002734303f8e09a4fff87e112a9bd", "score": "0.43350446", "text": "public function addTable( $table, $label )\n\t{\n\t\t$this->array[$label] = $table;\n\t}", "title": "" }, { "docid": "b2a51c38c4590d018c201250e1be9709", "score": "0.43259057", "text": "public function setCaption($caption)\n\t{\n\t\treturn new JsFunction($this->_bindToGrid.'.jqGrid(\"setCaption\", '.JqGridHelper::json_encode($caption).')');\n\t}", "title": "" }, { "docid": "47902705c42f71aed7bb59b8b163c7db", "score": "0.42930758", "text": "public static function add($caption = '', $url = '')\n\t{\n\t\tself::set($caption, $url, false);\n\t}", "title": "" }, { "docid": "4c48d4fd646be7727f4f1b5383cc1c65", "score": "0.42879528", "text": "function setCaption($caption) {\n\t\t$this->_caption = trim($caption);\n\t}", "title": "" }, { "docid": "b12c164974af7c54f9076733e3ad8cd1", "score": "0.42817113", "text": "private function createTableInDataBase()\n {\n $pdo = $this->connection;\n $sql = \"CREATE TABLE $this->table ( ID int NOT NULL AUTO_INCREMENT, URLParent varchar(255), isHome boolean, URLChild varchar(255), PRIMARY KEY (ID))\";\n $pdo->query($sql);\n }", "title": "" }, { "docid": "fc9c75db22727f47af725e2d392fda2b", "score": "0.42785046", "text": "abstract public function create_table($structure);", "title": "" }, { "docid": "9ac312b41a3db5e5792c9f14bac33a63", "score": "0.42667496", "text": "private function createTable()\n {\n $stmt = 'CREATE TABLE IF NOT EXISTS \"' . $this->name;\n $stmt.= '\" (\"' . $this->keyColumnName . '\" TEXT PRIMARY KEY, \"';\n $stmt.= $this->valueColumnName . '\" TEXT);';\n $this->db->exec($stmt);\n }", "title": "" }, { "docid": "78d085cfa1cfd224bc8cc379ef73448b", "score": "0.4265392", "text": "public function getExampleTable()\n {\n $table = array();\n foreach ($this->tables[0]->getTable() as $k => $v) {\n $table[$k] = $v;\n }\n\n /** @var ExampleTableNode $exampleTableNode */\n $exampleTableNode = new ExampleTableNode($table, $this->tables[0]->getKeyword());\n for ($i = 1; $i < count($this->tables); $i++) {\n $exampleTableNode->mergeRowsFromTable($this->tables[$i]);\n }\n return $exampleTableNode;\n }", "title": "" }, { "docid": "e68de72566070059958a1f3a36d60c6d", "score": "0.426503", "text": "function ch8bt_create_table( $prefix ) {\r\n\t// Prepare SQL query to create database table\r\n\t// using received table prefix\r\n\t$creation_query =\r\n\t\t'CREATE TABLE IF NOT EXISTS ' . $prefix . 'ch8_bug_data (\r\n\t\t\t`bug_id` int(20) NOT NULL AUTO_INCREMENT,\r\n\t\t\t`bug_description` text,\r\n\t\t\t`bug_version` varchar(10) DEFAULT NULL,\r\n\t\t\t`bug_report_date` date DEFAULT NULL,\r\n\t\t\t`bug_status` int(3) NOT NULL DEFAULT 0,\r\n\t\t\tPRIMARY KEY (`bug_id`)\r\n\t\t\t);';\r\n\r\n\tglobal $wpdb;\r\n\t$wpdb->query( $creation_query );\r\n}", "title": "" }, { "docid": "53dd1ce167c62f385781b595dced2451", "score": "0.4248111", "text": "private function create_table(){\n\t\t$sql = 'CREATE TABLE ' . $this->wp_table . ' (\n\t\t\t\tid INT NOT NULL AUTO_INCREMENT,\n\t\t\t\t`order` INT NOT NULL DEFAULT 0,\n\t\t\t\timage VARCHAR( 255 ) NOT NULL,\n\t\t\t\talt VARCHAR( 255 ) NOT NULL,\n\t\t\t\tlink VARCHAR( 255 ) NOT NULL,\n\t\t\t\t`show` BOOLEAN NOT NULL,\n\t\t\tPRIMARY KEY (id),\n\t\t\tUNIQUE (id)\n\t\t)';\n\t\t$this->wpdb->query($sql);\t\t\n\t}", "title": "" }, { "docid": "c5d584fe360a37381b7f0062e31a7c76", "score": "0.4238804", "text": "abstract public function createLabel($nom,$title,$description);", "title": "" }, { "docid": "a40b07f3b600a9119fc953283d08f3df", "score": "0.4226164", "text": "function createGallery($link, $tableName) {\n\t\t$query = \n\t\t\"CREATE TABLE gbphp.{$tableName}\n\t\t( \n\t\t\tid INT(4) NOT NULL AUTO_INCREMENT , \n\t\t\tcaption VARCHAR(100) NOT NULL , \n\t\t\tfilename VARCHAR(256) NOT NULL , \n\t\t\tsize DOUBLE NOT NULL , \n\t\t\tviews INT(8) NOT NULL , \n\t\t\tPRIMARY KEY (id)\n\t\t) ENGINE = InnoDB\";\n\t\tmysqli_query($link, $query);\n\t}", "title": "" }, { "docid": "0bafbdda02d8dee28f9cdff8a464535d", "score": "0.42155766", "text": "function create() {\n\t\tlist($Schema, $table) = $this->_loadSchema();\n\t\t$this->__create($Schema, $table);\n\t}", "title": "" }, { "docid": "f4aad7800d1507f4b8b10db2d12ab041", "score": "0.420818", "text": "function ch8bt_create_table( $prefix ) {\r\n\t// Prepare SQL query to create database table\r\n\t// using received table prefix\r\n\t$creation_query =\r\n\t\t'CREATE TABLE ' . $prefix . 'ch8_bug_data (\r\n\t\t\t`bug_id` int(20) NOT NULL AUTO_INCREMENT,\r\n\t\t\t`bug_description` text,\r\n\t\t\t`bug_version` varchar(10) DEFAULT NULL,\r\n\t\t\t`bug_report_date` date DEFAULT NULL,\r\n\t\t\t`bug_status` int(3) NOT NULL DEFAULT 0,\r\n\t\t\t`bug_title` VARCHAR( 128 ) NULL,\r\n\t\t\tPRIMARY KEY (`bug_id`)\r\n\t\t\t);';\r\n\r\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n\tdbDelta( $creation_query );\r\n}", "title": "" }, { "docid": "00f31aaaf186962df139d33d91eb9e15", "score": "0.42057618", "text": "function createElementWithText($parent, $tag, $text) {\n\n $textNode = $parent ->createTextNode( $text );\n $element = $parent ->createElement ( $tag );\n $element->setAttribute('style', 'color: white;');\n $element ->appendChild ( $textNode );\n $parent ->appendChild ( $element ); \n\n}", "title": "" }, { "docid": "b531d3ad33c4544e609b42ebd66d99f4", "score": "0.42052045", "text": "public function setValue($value)\n {\n $this->set('caption', $value);\n\n return $this;\n }", "title": "" }, { "docid": "ce9b95e73744bebe78604f4e6cafe339", "score": "0.42006648", "text": "public function setCaptionId($captionId) {\n $this->captionId = $captionId;\n }", "title": "" }, { "docid": "a3ad483c66ab48bc5d2c048a300ee992", "score": "0.41980723", "text": "function create_testtemplate_table($id = NULL)\n\t{\n\t\t$CI =& get_instance();\n\t\tbase_table($id);\n\t\t$CI->table->set_heading(lang('test'), lang('language'), lang('template'), lang('actions'));\n\t}", "title": "" }, { "docid": "ba0cb2c6b7430442c51371f4f8baa1b5", "score": "0.41800326", "text": "private function createTableElement($array){\n if(isset($array['rows'])){\n $array['rows'] = json_encode($array['rows']);\n }\n return new TableElement($array);\n }", "title": "" }, { "docid": "37f5fc244ef6637edd58a91bc7003fb1", "score": "0.41428214", "text": "public function create_table() {\n\t\tglobal $wpdb;\n\t\t\n\t\t// Get collation - From /wp-admin/includes/schema.php\n\t\t$charset_collate = '';\n\t\tif ( ! empty( $wpdb->charset ) )\n\t\t\t$charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\n\t\tif ( ! empty( $wpdb->collate ) )\n\t\t\t$charset_collate .= \" COLLATE $wpdb->collate\";\n\t\t\n\t\t// Create table\n\t\t$tablename = $this->get_table_name();\n//\t\t$tablename = $wpdb->prefix . 'answers';\n\t\t$sql = \"CREATE TABLE {$tablename} (\n\t\t\tlog_id BIGINT(20) NOT NULL AUTO_INCREMENT,\n\t\t\tuser_id BIGINT(20) NOT NULL,\n\t\t\tpost_id BIGINT(20) NOT NULL,\n\t\t\tanswer BOOLEAN NOT NULL,\n\t\t\tdate DATETIME NOT NULL,\n\t\t\ttimes BIGINT(20) NOT NULL,\n\n\t\t\tPRIMARY KEY (log_id), \n\t\t\tKEY user_id (user_id),\n\t\t\tKEY post_id (post_id)\n\t\t) {$charset_collate};\";\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $sql );\n\t}", "title": "" }, { "docid": "1f9958638fd2b806d9cc40aea6ddf771", "score": "0.4137835", "text": "function createAnswerTable($db){\n\t\t$cta = $db->exec('CREATE TABLE Answer '.'(\tfldAnswerNumber INTEGER PRIMARY KEY,fldQuestionNumber INTEGER,fldAnswerText TEXT NOT NULL, fldTimesPicked INTEGER DEFAULT 0,FOREIGN KEY (fldQuestionNumber) REFERENCES Question(fldQuestionNumber) ON DELETE CASCADE );');\n\t\tif ($cta){ debug(\"table Answer hadn't been made, but I got it.</br>\");\n\t\t} else { debug(\"Something went wrong with Answer table creation\"); \n\t\t}\n\t}", "title": "" }, { "docid": "61094cb34bd4e997b11e694415eb8e7f", "score": "0.41346464", "text": "function tableTest($temp, $query, $lineNumber){\n\tif($temp->query($query) === true) {\n\t\techo nl2br(\"Created Table. (Line:\".$lineNumber.\")\\n\");\n\t}else{\n\t\techo nl2br(\"Already Made Table. (Line:\".$lineNumber.\")\\n\");\n\t}\n}", "title": "" }, { "docid": "58a19d70b9601250b12301149232d307", "score": "0.4119265", "text": "function new_node(){\r\n\t\t\r\n\t\t$class = get_class($this);\r\n\t\t$node=new $class();\r\n\t\treturn $node;\r\n\t}", "title": "" }, { "docid": "8ef85ee0bd3a9b7a4ae9f60c6301f3bb", "score": "0.4097812", "text": "function setCaption($newvalue)\n {\n return parent::set('piccaption', $newvalue);\n }", "title": "" }, { "docid": "7f3684cb617a6362b23f7a443fdea93a", "score": "0.4090565", "text": "public function getLabel($caption = NULL)\n\t{\n\t\t$label = parent::getLabel($caption);\n\t\t$label->for = NULL;\n\t\treturn $label;\n\t}", "title": "" }, { "docid": "2202c80415c8452732e430576c50fc22", "score": "0.40857467", "text": "protected function createNode()\n {\n return new SpecialNode($this->name);\n }", "title": "" }, { "docid": "5a3b8333eb49bc0edf9b84d10a396351", "score": "0.40820765", "text": "public static function insert($caption = '', $url = '', $index = false)\n\t{\n\t\tself::set($caption, $url, $index, self::BEHAVE_INSERT_AFTER);\n\t}", "title": "" }, { "docid": "34cce0ff9c9c4cab790656ee78470641", "score": "0.40790296", "text": "function taxonomy_create ($tax) {\n\t if ( ! is_array( self::$taxboxes ) || count(self::$taxboxes) == 0 ) { return; }\n\t $t_id = (is_object($tax) ? $tax->term_id : '');\n\t\t?>\n\n\t\t</table><br/><br/>\n\t\t\t<div class=\"protonthemes-opts protonthemes-opts-taxonomy\">\n\t\t\t<?php\n\t\t\t\t\techo $this->OPT_CLASS->render_container($t_id);\n\t\t\t\t\t?>\n\t\t\t</div>\n\t\t<table>\n\n\t\t<?\n\n\t}", "title": "" }, { "docid": "39c4867909c613c66d41c7ba903b97b0", "score": "0.40686604", "text": "function newTable()\n{\n\n global $con;\n\n $sql = \"CREATE TABLE contact(id int NOT NULL PRIMARY KEY AUTO_INCREMENT, firstname varchar(255) NOT NULL, lastname varchar(255) NOT NULL, email varchar(255) NOT NULL, subj varchar(255) NOT NULL, msg varchar(255) NOT NULL)\";\n $res = mysqli_query($con, $sql);\n return $res;\n}", "title": "" }, { "docid": "b0f9a3c280cb7d97f6b947556895064f", "score": "0.40650392", "text": "protected function createBookNode($book_nid, $parent = NULL) {\n // $number does not use drupal_static as it should not be reset since it\n // uniquely identifies each call to createBookNode(). It is used to ensure\n // that when sorted nodes stay in same order.\n static $number = 0;\n\n $edit = [];\n $edit['title[0][value]'] = str_pad($number, 2, '0', STR_PAD_LEFT) . ' - SimpleTest test node ' . $this->randomMachineName(10);\n $edit['body[0][value]'] = 'SimpleTest test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32);\n $edit['book[bid]'] = $book_nid;\n\n if ($parent !== NULL) {\n $this->drupalGet('node/add/book');\n $this->submitForm($edit, 'Change book (update list of parents)');\n\n $edit['book[pid]'] = $parent;\n $this->submitForm($edit, 'Save');\n // Make sure the parent was flagged as having children.\n $parent_node = \\Drupal::entityTypeManager()->getStorage('node')->loadUnchanged($parent);\n $this->assertNotEmpty($parent_node->book['has_children'], 'Parent node is marked as having children');\n }\n else {\n $this->drupalGet('node/add/book');\n $this->submitForm($edit, 'Save');\n }\n\n // Check to make sure the book node was created.\n $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);\n $this->assertNotNull(($node === FALSE ? NULL : $node), 'Book node found in database.');\n $number++;\n\n return $node;\n }", "title": "" }, { "docid": "09d31e12b0299e0b129b9701d7a0b96b", "score": "0.40529278", "text": "protected function _createTestTable($name, $options=array())\n {\n $table = $this->_conn->createTable($name, $options);\n $table->column('name', 'string');\n $table->column('is_college', 'boolean');\n $table->end();\n\n try {\n // make sure table was created\n $sql = \"INSERT INTO $name\n VALUES (1, 'mlb', 'f')\";\n $this->_conn->insert($sql);\n } catch (Exception $e) {}\n }", "title": "" }, { "docid": "bbb83893198192ec2a10807eccc37712", "score": "0.40443757", "text": "public function addTable($details)\n {\n $table = array(\n 'name' => $details['name'],\n 'schema' => $details['schema'],\n 'columns' => array(),\n 'primary_key' => array(),\n 'unique_keys' => array(),\n 'foreign_keys' => array(),\n 'indices' => array()\n );\n $this->setTable(array('schema' => $details['schema'], 'table' => $details['name']), $table);\n }", "title": "" }, { "docid": "dff1322c4e130c46dabdeda7ec9c8365", "score": "0.40399763", "text": "function emarking_table_creator($head, $data, $size){\n\t$buttonstable = new html_table();\n\t$buttonstable->head = $head;\n\t$buttonstable->data = $data;\n\t$buttonstable->size = $size;\t\n\treturn html_writer::table($buttonstable);\n}", "title": "" }, { "docid": "40db9cc9b0dc6e95ada0f07e4fbb8108", "score": "0.40388626", "text": "public function declareTableColumn()\n {\n $this->crud->addColumn([\n 'name' => 'name',\n 'label' => 'Name',\n ]);\n $this->crud->addColumn([\n 'name' => 'grid_size',\n 'label' => 'Grid Size',\n ]);\n $this->crud->addColumn([\n 'name' => 'difficulty',\n 'label' => 'Difficulty',\n ]);\n $this->crud->addColumn([\n 'name' => 'score',\n 'label' => 'Score',\n ]);\n $this->crud->addColumn([\n 'name' => 'penalty',\n 'label' => 'Penalty',\n ]);\n }", "title": "" }, { "docid": "f29ef6662afcf37f9a5e8538ad31d7b2", "score": "0.40385336", "text": "private function createTextNode( $value, $parent ) {\n\t\t\t$this->appendToTree( $value, $parent );\n\t\t\treturn $parent;\n\t\t}", "title": "" }, { "docid": "6ecd681f73a1edfc67cb366c2747cd43", "score": "0.40372792", "text": "public static function createTable($tablename, $criteria, $suffixTableMeta = false)\n\t{\n\t\t$adb = \\PearDatabase::getInstance();\n\n\t\t$org_dieOnError = $adb->dieOnError;\n\t\t$adb->dieOnError = false;\n\t\t$sql = 'CREATE TABLE ' . $adb->quote($tablename, false) . ' ' . $criteria;\n\t\tif ($suffixTableMeta !== false) {\n\t\t\tif ($suffixTableMeta === true) {\n\t\t\t\tif ($adb->isMySQL()) {\n\t\t\t\t\t$suffixTableMeta = ' ENGINE=InnoDB DEFAULT CHARSET=utf8';\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sql .= $suffixTableMeta;\n\t\t}\n\t\t$adb->query($sql);\n\t\t$adb->dieOnError = $org_dieOnError;\n\t}", "title": "" }, { "docid": "87048aba0e497f72dd47a61fd39de035", "score": "0.40361965", "text": "public function changeTableName($details)\n {\n // Use the from details to query for the existing table\n $query = $details['from'];\n $query['table'] = $details['from']['name'];\n $table = $this->getTable($query);\n \n // unset the existing table from the description array\n if ($details['from']['schema'] == '') {\n unset($this->description[\"tables\"][$details['from']['name']]);\n } else {\n unset($this->description['schemata'][$details['from']['schema']][\"tables\"][$details['from']['name']]);\n }\n \n // reassign the existing table to the description array using the to details\n $table['name'] = $details['to']['name'];\n $details['to']['table'] = $table['name'];\n $this->setTable($details['to'], $table);\n }", "title": "" }, { "docid": "28d689cd52d8c47c8299d493f4cc4ec4", "score": "0.40316874", "text": "public function createSchemaTable();", "title": "" }, { "docid": "1604be0f651ec1a57ad1221f254b5c8b", "score": "0.40292773", "text": "public function defaultNodeTitle();", "title": "" }, { "docid": "8ce8af310a071a50e19ddf682a3f91cd", "score": "0.40224507", "text": "public function createNode($nodeName){\n $className = $this->configure->classPrefix . $nodeName . ParserConfigure::NODE_SUFFIX;\n return new $className($nodeName, null);\n }", "title": "" }, { "docid": "a3a0b100b8c02795284816e543069a35", "score": "0.4021785", "text": "static function setupCaption($caption,$lightbox) {\r\n\t\t\tif ($lightbox == \"HIGHSLIDE\") {\r\n\t\t\t\t$return = \"onclick=\\\"return hs.expand(this, { captionText: '$caption' } )\\\" alt='$caption' title='$caption'\";\r\n\t\t\t} else {\r\n\t\t\t\t$return = \"alt=\\\"$caption\\\" title=\\\"$caption\\\"\";\r\n\t\t\t}\r\n\t\t\treturn($return);\r\n\t\t}", "title": "" }, { "docid": "9d2b93e145a531011d77b4bfd55995c6", "score": "0.4018032", "text": "public function caption($action, $attributes = '', $input = '')\n\t{\n\t\treturn $this->newTag('caption', $action, $attributes, $input);\n\t}", "title": "" }, { "docid": "376eac252845fd801c29dfafee77fa4a", "score": "0.40141472", "text": "function add() {\n\t\tif ($this->request->data) {\n\t\t\t$d = $this->request->data;\n\t\t\t$child = array(\n\t\t\t\t'type' => $d['dtype'],\n\t\t\t\t'name' => $d['dname'],\n\t\t\t\t'owner' => $d['owner'],\n\t\t\t);\n\t\t\t$node = Node::create($child);\n\t\t\t$node->save();\n\t\t\t\n\t\t\t$parent = array(\n\t\t\t\t'type' => $d['type'],\n\t\t\t\t'name' => $d['name'],\n\t\t\t\t'owner' => $d['owner'],\n\t\t\t\t'parents' => (string) $node->_id\n\t\t\t);\n\t\t\t\n\t\t\t$node = Node::create($parent);\n\t\t\t$node->save();\n\t\t\t\n\t\t\tif (true) {\n\t\t\t\t$this->_ok();\n\t\t\t} else {\n\t\t\t\t$this->_error();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "06c1583fc39d1414ec196d9a262ae21d", "score": "0.40121225", "text": "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "title": "" }, { "docid": "8e573ae2611e9608e3c6a674f8f6ec01", "score": "0.40038982", "text": "protected function newItem($table, $uid) {\n\t\t$this->renderContentElement($table, $uid);\n\t}", "title": "" }, { "docid": "4094201a4eae7a0b2b5045ee5c81fe10", "score": "0.4001287", "text": "public static function createElement($nodeName, $attributes=null) {\r\n\t\t\t// See if $node is markup\r\n\t\t\tif(is_string($nodeName)) {\r\n\t\t\t\tif(preg_match('/^\\s*<(\\w+).*>$/s', $nodeName)) {\r\n\t\t\t\t\t$nodes = self::parseHTML($nodeName);\r\n\t\t\t\t\t$node = array_shift($nodes);\r\n\t\t\t\t\tif(is_array($attributes)) $node->attributes = $attributes + $node->attributes;\r\n\t\t\t\t\treturn $node;\r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif(class_exists($c=ucfirst($nodeName).\"Node\")) {\r\n\t\t\t\treturn new $c($attributes);\r\n\t\t\t} else {\r\n\t\t\t\treturn new HTMLNode($nodeName, (array) $attributes);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "76cf9ba51a8090814ad8f18f8c060bac", "score": "0.39993325", "text": "function CreateNode($NodeName, $NodeValue)\r\n {\r\n if (!class_exists('XML_Util')) {\r\n require_once E::path('lib/XML/Util.php');\r\n }\r\n\r\n $xml = new XML_Util();\r\n $node = \"<\" . $NodeName . \">\" . $xml->replaceEntities($NodeValue) . \"</\" . $NodeName . \">\";\r\n return $node;\r\n }", "title": "" }, { "docid": "f494638d61f0e8901a08c4f7450ebb42", "score": "0.3999314", "text": "function createTable($DBConnect,$tablename){\n $success = false;\n //brings up the table\n $sql = \"SHOW TABLES LIKE '$tablename'\";\n $result = mysqli_query($DBConnect,$sql);\n //if it doesn't exist it makes it with three colums \n if(mysqli_num_rows($result) === 0){\n echo \"The <strong>$tablename</strong> table does not exist, creating table.<br>\\n\";\n $sql = \"CREATE TABLE $tablename(countID SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY, \n lastName VARCHAR(40), firstName VARCHAR(40))\";\n $result = mysqli_query($DBConnect,$sql);\n //displays error if it doesn't work\n if($result === false){\n $success = false;\n echo \"<p>Unable to create the $tablename table.</p>\";\n }\n //tells the user it already exists\n }else{\n $success = true;\n // echo \"The $tablename table already exists.<br>\\n\";\n }\n return $success;\n}", "title": "" }, { "docid": "ad74bb584b679bf4017054034e5fe5d5", "score": "0.39950734", "text": "public function addNode($dataArray){\n\t\t$rowElement = new DOMElement('row');\n\t\tforeach($dataArray as $key => $value){\n\t\t\t$rowElement->setAttribute($key, $value);\n\t\t}\n\t\t$this->_rootElement->appendChild($rowElement);\n\t}", "title": "" }, { "docid": "81a9e4200c913092ca6b1d114d591cc4", "score": "0.39943033", "text": "public function caption($caption, $options = []) {\n return $this->html->tags('caption', $options, true, $this->convertArrayInString($caption));\n }", "title": "" }, { "docid": "82a012086b10ef0e52933b663c71b70f", "score": "0.39930373", "text": "public function createNode($label = NULL) {\n\t\treturn new ArithBinaryOpTestHelper($this->createMock(Node::class),\n\t\t $this->createMock(Node::class),\n\t\t $label);\n\t}", "title": "" }, { "docid": "1ba70d6b77a185e644a688e343b88981", "score": "0.39844128", "text": "function Element($column_header, $cdata=false) {\n\t\t$this->node = '<td>';\n\t\t$this->node .= $this->contents;\n\t\t$this->node .= '</td>';\n\t\t$this->node .= \"\\n\";\n\t\treturn $this->node;\n\t}", "title": "" }, { "docid": "7db4b1ef0c51668a0278ff92b806cbe4", "score": "0.3977422", "text": "function createTable($conn, $microformat){\n\n\t\tif($microformat == 'rdfa'){\n\t\t\t//Set RDFa Microformat attributes\n\t\t\t$nameData = 'property=\"performer\"';\n\t\t\t$urlNameData = 'property=\"name url\"';\n\t\t\t$eventData = 'vocab=\"http://schema.org/\" typeof=\"Event\"';\n\t\t\t$subEventData = 'property=\"subEvent\" typeof=\"Event\"';\n\t\t\t$personData = 'typeof=\"Person\"';\n\t\t\t$startDate = 'property=\"startDate\" content=\"';\n\t\t\t$endDate = 'property=\"endDate\" content=\"';\n\t\t\t$countryData = 'typeof=\"PostalAddress\"';\n\t\t\t$addressData = 'property=\"addressLocality url\"';\n\t\t\t$locationData = 'property=\"location\"';\n\t\t\t$imageData = 'property=\"image\"';\n\t\t}else if($microformat == 'md'){\n\t\t\t//Set microdata Microformat attributes\n\t\t\t$nameData = 'itemprop=\"performer\"';\n\t\t\t$urlNameData = 'itemprop=\"name url\"';\n\t\t\t$eventData = 'itemscope itemtype=\"http://schema.org/Event\"';\n\t\t\t$subEventData = 'itemprop=\"subEvent\" itemscope itemtype=\"http://schema.org/Event\"';\n\t\t\t$personData = 'itemscope itemtype=\"http://schema.org/Person\"';\n\t\t\t$startDate = 'itemprop=\"startDate\" content=\"';\n\t\t\t$endDate = 'itemprop=\"endDate\" content=\"';\n\t\t\t$countryData = 'itemscope itemtype=\"http://schema.org/PostalAddress\"';\n\t\t\t$addressData = 'itemprop=\"addressLocality url\"';\n\t\t\t$locationData = 'itemprop=\"location\"';\n\t\t\t$imageData = 'itemprop=\"image\"';\n\t\t}else{\n\t\t\t//Empty variables\n\t\t\t$nameData = '';\n\t\t\t$urlNameData = '';\n\t\t\t$eventData = '';\n\t\t\t$subEventData = '';\n\t\t\t$personData = '';\n\t\t\t$startDate = '';\n\t\t\t$endDate = '';\n\t\t\t$countryData = '';\n\t\t\t$addressData = '';\n\t\t\t$locationData = '';\n\t\t\t$imageData = '';\n\t\t}\n\t\t//Get data\n\t\t$result = getPlayerData($conn);\n\t\t//Create table\n\t\t$table = '<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Name</th>\n\t\t\t\t\t\t<th>Year</th>\n\t\t\t\t\t\t<th>Country</th>\n\t\t\t\t\t</tr>';\n\t\t//Reset prev_id\n\t\t$prev_id = '';\n\t\twhile($row = mysqli_fetch_array($result)){\n\t\t\t//Extract returned data\n\t\t\textract($row);\n\n\t\t\tif($prev_id != $id_player){\n\t\t\t//If not first player\n\t\t\t\tif($prev_id != ''){\n\t\t\t\t\t$table .= '</td></tr><tr '.$eventData.'>';\n\t\t\t\t}else{\n\t\t\t\t\t$table .= '<tr '.$eventData.'>';\n\t\t\t\t}\n\n\t\t\t\t$table .= '<td '.$nameData .' '. $personData.'>';\n\t\t\t\t$table .= '<a '.$urlNameData.' href=\"'.$name_url.'\" title=\"'.$full_name.'\" >'.$full_name.'</a></td>';\n\t\t\t\t$table .= '<td>';\n\t\t\t\t//Get date data\n\t\t\t\t$innerResult = getDateData($id_player, $conn);\n\t\t\t\t//Loop through returned data\n\t\t\t\twhile($innerRow = mysqli_fetch_array($innerResult)){\n\t\t\t\t\textract($innerRow);\n\n\t\t\t\t\t$table .= '<div '.$subEventData.'><span '.$startDate.checkDt($start_year).'\">'.$start_year.'</span>';\n\t\t\t\t\t$table .= '-<span '.$endDate.checkDt($end_year).'\">'.$end_year.'</span></div><br>';\n\n\t\t\t\t}\n\t\t\t\t$table .= '</td>';\n\t\t\t\t//Country\n\t\t\t\t$table .= '<td><div ' .$locationData.' '.$countryData.'><img '.$imageData.' src=\"'.$country_flag.'\" width=\"30px\" /><a '.$addressData.' href=\"'.$country_url.'\" title=\"'.$country_name.'\">' . $country_name. '<a/></div>';\n\t\t\t}else{\n\t\t\t\t//Second and third country\n\t\t\t\tif(!$country_flag){\n\t\t\t\t\t$table .= ' (<div ' .$locationData.' '.$countryData.'><a '.$addressData.' href=\"'.$country_url.'\" title=\"'.$country_name.'\">' . $country_name. '<a/></div>)';\n\t\t\t\t}else{\n\t\t\t\t\t$table .= '<br /><div ' .$locationData.' '.$countryData.'><img '.$imageData.' src=\"'.$country_flag.'\" width=\"30px\" /><a '.$addressData.' href=\"'.$country_url.'\" title=\"'.$country_name.'\">' . $country_name. '<a/></div>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$prev_id = $id_player;\n\t\t\t$second_date = '';\n\t\t}\n\t\t$table .= '</td></tr></table>';\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "aa2494c90d517150732506f960e647e6", "score": "0.3975778", "text": "private function _renameTag( DOMElement $oNode, $sTagName ) {\n \n $_oRenamed = $oNode->ownerDocument->createElement( $sTagName );\n\n // foreach ( $oNode->attributes as $attribute ) {\n // $_oRenamed->setAttribute( $attribute->nodeName, $attribute->nodeValue );\n // }\n\n while ( $oNode->firstChild ) {\n $_oRenamed->appendChild( $oNode->firstChild );\n }\n\n return $oNode->parentNode->replaceChild( $_oRenamed, $oNode );\n }", "title": "" }, { "docid": "883dfa2c33713231c053bd8515ffcd5a", "score": "0.3972201", "text": "protected function setUpTable()\n {\n $pdo = $this->getConnection()->getConnection();\n \n $pdo->exec('set sql_mode = \"\"');\n\n $sql = \"CREATE TABLE IF NOT EXISTS guestbook (\n id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n content VARCHAR(50) NOT NULL,\n user VARCHAR(50) NOT NULL,\n created_date DATETIME NOT NULL\n )\";\n\n $pdo->exec($sql);\n \n $pdo->exec('TRUNCATE TABLE guestbook');\n }", "title": "" }, { "docid": "ce96d17372882674ada4b53bc22f3a98", "score": "0.39711797", "text": "function generateHTMLTreeNode($nameString, $countString = '', $in_id = '', $uuid = '', $idLinkFlag = false, $uuidLinkFlag = false) {\r\n if (strlen($countString) > 0) \r\n $text = $nameString . $countString;\r\n else\r\n $text = $nameString;\r\n \r\n //$text .= \" id: $in_id uuid: $uuid\";\r\n \r\n if ($idLinkFlag)\r\n return new HTML_TreeNode(array('text'=>$text, 'link'=>'javascript:inventoryDetailId(\\\\\\''. $in_id .'\\\\\\');'));\r\n else if ($uuidLinkFlag)\r\n return new HTML_TreeNode(array('text'=>$text, 'link'=>'javascript:inventoryDetail(\\\\\\''. $uuid .'\\\\\\');'));\r\n else \r\n return new HTML_TreeNode(array('text'=>$text)); \r\n }", "title": "" }, { "docid": "41548116a1e381392483822d64e10d51", "score": "0.3966244", "text": "public function addHeadText(string $row):void {\r\n\t\t$this->headRows[] = $row;\r\n\t}", "title": "" }, { "docid": "39c756ecc7c4046a7434fd6e55777440", "score": "0.39651415", "text": "public function createNewTable()\n {\n if( ! Http::isAjax() )\n {\n return false;\n }\n\n DatatablesModel\\Table::create();\n }", "title": "" }, { "docid": "9e0ee56560a611aeac304c42c47fa1f7", "score": "0.39640692", "text": "function _create_news_node(){\n /*\n * Create a new node with a default title and redirect to edit-node forms\n *\n */\n $node_obj= new stdClass();\n $node_obj->title = 'New News Article';\n $node_obj->type = 'usgs_node';\n $node_obj->language = 'und';\n node_object_prepare($node_obj);\n node_save($node_obj);\n $node = $node_obj->nid;\n drupal_goto('add-content/news-article/edit-title/'.$node);\n}", "title": "" }, { "docid": "c8ee499f544ddbcd54df06cf4024f064", "score": "0.39617532", "text": "public function createTable(string $name, array $options)\n {\n }", "title": "" }, { "docid": "af3ab45804cccaa50c46e6e5ad6a6b7f", "score": "0.39603865", "text": "protected function createNode($params){\n $columns = implode(\",\",array_keys($params));\n $values = \"\";\n $i = 0;\n foreach($params as $val){\n $values[$i] = \"'\".$val.\"'\";\n $i++;\n }\n $values = implode(\",\",$values);\n $query = \"INSERT INTO nodes ($columns) VALUES ($values)\";\n try{\n $stmt = $this->pdo.prepare($query);\n $stmt.execute();\n $stmt = null;\n return array(true,\"Node created\");\n }catch(Exception $e){\n return array(false,$e->getMessage());\n }\n }", "title": "" }, { "docid": "620bdcc7a494570897f16abe118471ce", "score": "0.3954124", "text": "public function get_caption_element();", "title": "" }, { "docid": "db51e922348aa655dbaf22adc44e0b2d", "score": "0.39532164", "text": "public function lblDescription_Create($strControlId = null) {\n\t\t\t$this->lblDescription = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblDescription->Name = QApplication::Translate('Description');\n\t\t\t$this->lblDescription->Text = $this->objRecipe->Description;\n\t\t\treturn $this->lblDescription;\n\t\t}", "title": "" }, { "docid": "a29c4e2bdba15b8d1cd90cc747b5e090", "score": "0.39499512", "text": "function &HTMLNode($nodeName, $attributes=null) {\r\n\t\tif($attributes) $result = HTMLNode::createElement($nodeName, $attributes);\r\n\t\telse $result = HTMLNode::createElement($nodeName);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "06b1e2d16197a2a808ad5b73e37ee29b", "score": "0.39453736", "text": "public static function createTable();", "title": "" }, { "docid": "1c54ee0586e97d15dee2359a47e1307c", "score": "0.39343575", "text": "function createTable ($DBConnect, $tableName) {\n $success = false;\n $sql = \"SHOW TABLES LIKE '$tableName'\";\n $result = mysqli_query($DBConnect, $sql);\n if (mysqli_num_rows($result) === 0) {\n $sql = \"CREATE TABLE $tableName (interID SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY, interName VARCHAR(80), interPos VARCHAR(80), \" .\n \"caniName VARCHAR(80), commAblty VARCHAR(200), profAppr VARCHAR(200), compSkill VARCHAR(200), busnssKnow VARCHAR(200), \" .\n \"interComment VARCHAR(200), recordDate DATE)\";\n $result = mysqli_query($DBConnect, $sql);\n if (!$result) {\n $success = false;\n } else {\n $success = true;\n }\n } else {\n $success = true;\n }\n return $success;\n }", "title": "" }, { "docid": "4dc7f1621f1c0bdabffe92ee7ebdc5b1", "score": "0.3926311", "text": "public function CreateTable($connection)\n {\n $connection->execute(\"\n CREATE TABLE `categories` (\n `id` INT(10) NOT NULL AUTO_INCREMENT,\n `parent_id` INT(10) NULL,\n `lft` INT(10) NOT NULL,\n `rght` INT(10) NOT NULL,\n `level` INT(10) NOT NULL,\n `layout` VARCHAR(32) NULL,\n `in_menus` TINYINT(1) NOT NULL DEFAULT '1',\n `sort_by` INT(10) NOT NULL DEFAULT '1',\n `created` DATETIME NULL,\n `modified` DATETIME NULL,\n PRIMARY KEY (`id`)\n )\n COLLATE='utf8_unicode_ci'\n ENGINE=InnoDB\n ROW_FORMAT=COMPACT;\n \");\n \n // TODO: UpdateTable() ? With some version parameter, so it can perform changes between versions.\n // If you ever need to update an old database, this one works.\n // (Newest additions comes last in this list)\n // $connection->execute(\"\n // ALTER TABLE `categories` ADD `layout` VARCHAR(32) NULL AFTER `level`;\n // ALTER TABLE `categories` ADD `in_menus` TINYINT(1) NOT NULL DEFAULT '1' AFTER `layout`;\n // ALTER TABLE `categories` ADD `sort_by` INT(10) NOT NULL DEFAULT '1' AFTER `in_menus`;\n \n // \");\n }", "title": "" }, { "docid": "2724a342192f9a8e7a71b53fd734a850", "score": "0.39197204", "text": "function sidora_create_concept_node($pid, $info = NULL, $set_fedora_sync = FALSE, $owner_id = 1){\n if ($info === NULL) {\n return NULL;\n }\n $time_now = strtotime(\"now\");\n // add node properties\n $newNode = (object) NULL;\n $newNode->type = sidora_get_concept_content_type();\n $newNode->title = 'PID_' . $pid;\n node_object_prepare($newNode);\n $newNode->language = LANGUAGE_NONE;\n $newNode->uid = $owner_id;\n $newNode->created = $time_now;\n $newNode->changed = $time_now;\n $newNode->status = 1;\n $newNode->comment = 0;\n $newNode->promote = 0;\n $newNode->moderate = 0;\n $newNode->sticky = 0;\n\n // add field data\n $newNode->field_fedora_pid[$newNode->language][]['value'] = $pid;\n if (!empty($info)){\n $newNode->field_fedora_label[$newNode->language][]['value'] = $info['label'];\n if (array_key_exists('concept_children',$info)) {\n $newNode->field_sidora_concept_children[$newNode->language][]['value'] = $info['concept_children'];\n }\n else {\n $newNode->field_sidora_concept_children[$newNode->language][]['value'] = '';\n }\n if (array_key_exists('resource_children',$info)) {\n $newNode->field_sidora_resource_child_coun[$newNode->language][]['value'] = $info['resource_children'];\n }\n else {\n $newNode->field_sidora_resource_child_coun[$newNode->language][]['value'] = 0;\n }\n\n $newNode->body[$newNode->language][]['value'] = empty($info['description'])?\"\":$info['description'];\n // overwrite the owner info if there is a valid owner listed in the info\n if (!empty($info['owner'])) {\n $owner_user = user_load_by_name($info['owner']);\n if (!empty($owner_user)) {\n $newNode->uid = $owner_user->uid;\n }\n }\n }\n \n if ($set_fedora_sync) {\n//print 'Setting set_fedora_sync:' . $time_now . \"\\n\";\n $newNode->field_sidora_fedora_sync[$newNode->language][]['value'] = $time_now;\n }\n\n // Prepare node for saving\n $newNode = node_submit($newNode); \n // save node\n node_save($newNode);\n return $newNode;\n}", "title": "" }, { "docid": "73d38e257008ba57db575c10d1aff254", "score": "0.39160755", "text": "public static function factory($node)\n {\n \n if ($node->hasAttribute(\"name\")) {\n return new IdaTable($node->getAttribute(\"name\"));\n } else {\n return new IdaRecord($node->tagName);\n }\n\n }", "title": "" }, { "docid": "d70bb0c584b2abcddf075ce1a62365e3", "score": "0.3913217", "text": "public function setTableDefinition()\n {\n foreach($this->_options as $name => $options)\n {\n if(!is_array($options)) $options = array($options);\n \n $options = Doctrine_Lib::arrayDeepMerge($this->defaults, $options);\n \n $this->_options[$name] = $options;\n \n if ($options['alias']) {\n $name .= ' as ' . $options['alias'];\n }\n \n if ($options['sizefield_name'] != false) {\n $this->hasColumn($options['sizefield_name'], 'string', 50, array(\n 'type' => 'string',\n 'notnull' => false,\n 'length' => 50,\n 'default' => 0\n ));\n }\n \n $this->hasColumn($name, $options['type'], $options['size'], $options['options']);\n }\n \n $this->addListener(new DoctrineListenerClusterStorage($this->_options));\n }", "title": "" }, { "docid": "fb8243f408e4c2bca330cb8894876c54", "score": "0.39076525", "text": "function regularNew()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA,$LANG;\n\n\t\t\t// Slight spacer from header:\n\t\t$this->code.='<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/halfline.gif','width=\"18\" height=\"8\"').' alt=\"\" /><br />';\n\n\t\t// New tables INSIDE this category\n\t\tforeach ($this->param as $table=>$param) { \t\t\t\t\n\t\t\tif ($this->showNewRecLink($table)\n\t\t\t\t\t&& $this->isTableAllowedForThisPage($this->pageinfo, $table)\n\t\t\t\t\t&& $BE_USER->check('tables_modify',$table)\n\t\t\t\t\t&& (($v['ctrl']['rootLevel'] xor $this->id) || $v['ctrl']['rootLevel']==-1)\n\t\t\t\t\t)\t{\n\t\t\t\t$val = key($param);\n\t\t\t\t$cmd = ($param[$val]);\n\t\t\t\tswitch ($cmd) {\n\t\t\t\t\tcase 'new': \t\t\n\t\t\t\t\t\t\t// Create new link for record:\n\t\t\t\t\t\t$rowContent = '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/join.gif','width=\"18\" height=\"16\"').' alt=\"\" />'.\n\t\t\t\t\t\t\t\t$this->linkWrap(\n\t\t\t\t\t\t\t\tt3lib_iconWorks::getIconImage($table,array(),$BACK_PATH,'').\n\t\t\t\t\t\t\t\t$LANG->sL($TCA[$table]['ctrl']['title'],1)\n\t\t\t\t\t\t\t,$table\n\t\t\t\t\t\t\t,$this->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Compile table row:\n\t\t\t\t\t\t$tRows[] = '\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap=\"nowrap\">'.$rowContent.'</td>\n\t\t\t\t\t<td>'.t3lib_BEfunc::cshItem($t,'',$BACK_PATH,'',$doNotShowFullDescr).'</td>\n\t\t\t\t</tr>\n\t\t\t\t';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// Compile table row:\n\t\t$tRows[]='\n\t\t\t<tr>\n\t\t\t\t<td><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/stopper.gif','width=\"18\" height=\"16\"').' alt=\"\" /></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t';\n\n\n\t\t\t// Make table:\n\t\t$this->code.='\n\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"typo3-newRecord\">\n\t\t\t'.implode('',$tRows).'\n\t\t\t</table>\n\t\t';\n\n\t\t\t// Add CSH:\n\t\t$this->code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_regular', $GLOBALS['BACK_PATH'],'<br/>');\n\t}", "title": "" }, { "docid": "b05e645f5c32ee122eafe96869e2e133", "score": "0.3906112", "text": "function iod_pk_media_stored_create_table() {\r\n\tglobal $wpdb;\r\n\t$tablename = $wpdb-> prefix . \"iod_pk_media_stored\";\r\n\t$sql = \"CREATE TABLE IF NOT EXISTS `$tablename` (\r\n\t\t\t\t\t `image_id` int(100) NOT NULL AUTO_INCREMENT,\r\n \t\t\t\t\t`content` varchar(500) NOT NULL,\r\n\t\t\t\t\t`image_name` varchar(100) NOT NULL,\r\n \t\t\t\t\t`time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\r\n \t\t\t\t\tPRIMARY KEY (`image_id`)\r\n\t\t\t\t\t);\";\r\n\tinclude_once(ABSPATH . 'wp-admin/includes/upgrade.php');\r\n\tdbDelta($sql);\r\n\t}", "title": "" }, { "docid": "873e883d6bb1c0bfe2530880d4fa4f15", "score": "0.39032543", "text": "public function createNode($name)\r\n\t{\r\n // Validate the node name before creation.\r\n if (preg_match('/^[\\w\\d\\._-]+$/i', $name) === 0)\r\n throw new CException(__CLASS__.': Failed to create node. Name \"'.$name.'\" is invalid.');\r\n\r\n\t\t$node = new CmsNode();\r\n\t\t$node->name = $name;\r\n\t\t$node->save(false);\r\n\t}", "title": "" }, { "docid": "d71c11bc58cb83797d73771c3e89613c", "score": "0.3894326", "text": "public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)\n {\n return new TableNode(json_decode($source, true));\n }", "title": "" }, { "docid": "83a0852c53ab7c0dc1b65e1ac307149c", "score": "0.38928437", "text": "public function _tn(HtmlNode $node, TemplateNode $value) {\n $translate = '';\n $num = 1;\n $params = array();\n $before = array();\n foreach ($node->getChildren() as $child) {\n if ($child instanceof TextNode) {\n $translate .= $child ->text;\n }\n else if ($child instanceof PhpNode and !$child->statement) {\n $translate .= '%' . $num;\n $params[] = $child->code;\n $num++;\n }\n else {\n $translate .= '%' . $num;\n $params[] = PhpNode::expr($child);\n $num++;\n }\n }\n if (count($params) == 0)\n $params = '';\n else\n $params = ', ' . implode(', ', $params);\n $translate = trim($translate);\n $node->clear();\n $phpNode = new PhpNode('tn(' . var_export($translate, true) . ', ' . PhpNode::expr($value)->code . $params . ')');\n $node->append($phpNode);\n }", "title": "" }, { "docid": "280df69dc7412ac8afd9c3fd2017a33c", "score": "0.3889073", "text": "private function createContentTable()\n {\n $sql = '\n CREATE TABLE Content\n (\n id INT AUTO_INCREMENT PRIMARY KEY NOT NULL,\n slug CHAR(80) UNIQUE,\n url CHAR(80) UNIQUE,\n\n type CHAR(80),\n title VARCHAR(80),\n data TEXT,\n filter CHAR(80),\n author CHAR(80),\n\n published DATETIME,\n created DATETIME,\n updated DATETIME,\n deleted DATETIME\n\n ) ENGINE INNODB CHARACTER SET utf8;\n ';\n\n return $this->db->executeQuery($sql);\n }", "title": "" }, { "docid": "9fe2b2e7a3674835cc333c83355a3b06", "score": "0.38890475", "text": "public function addTemplateListNode()\n {\n $treeBuilder = new TreeBuilder();\n $node = $treeBuilder->root('templates');\n\n $node\n ->fixXmlConfig('name')\n ->prototype('array')\n ->children()\n ->scalarNode('title')\n ->isRequired()\n ->info(\"Display name of the template\")\n ->end()\n ->scalarNode('template')\n ->info(\"Path to the template\")\n ->isRequired()\n ->end()\n ->end()\n ->end()\n ->info(\"List of templates if the entity implements TemplateableInterface\")\n ;\n\n return $node;\n }", "title": "" }, { "docid": "cec54b2e09128e0a6d86614b7210ea52", "score": "0.388723", "text": "public function __construct($name, $caption)\n {\n parent::__construct($name, $caption);\n \n $this->dataItems = array();\n \n if (isset($_REQUEST['tree_' . $this->getName() . '_selected']))\n $this->currentItem = $_REQUEST['tree_' . $this->getName() . '_selected'];\n }", "title": "" }, { "docid": "a4826d54735c9829e76d525fcca46194", "score": "0.38856825", "text": "public function add()\n {\n $arguments = func_get_args();\n\n if ($arguments[0] instanceof Node) {\n if (isset($arguments[1])) {\n throw new \\InvalidArgumentException('The second argument must not be specified, when passing a VObject Node');\n }\n $arguments[0]->parent = $this;\n $newNode = $arguments[0];\n } elseif (is_string($arguments[0])) {\n $newNode = call_user_func_array([$this->root, 'create'], $arguments);\n } else {\n throw new \\InvalidArgumentException('The first argument must either be a \\\\Sabre\\\\VObject\\\\Node or a string');\n }\n\n $name = $newNode->name;\n if (isset($this->children[$name])) {\n $this->children[$name][] = $newNode;\n } else {\n $this->children[$name] = [$newNode];\n }\n\n return $newNode;\n }", "title": "" } ]
a3d40a1fa2cd2955ec4b879496516578
> Altera valores de nome/email/password
[ { "docid": "410087d54ab29584d5ed9cb101061e9d", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n\n $data = $request->all();\n\n if ($request->has('username')) {\n $user = User::whereIdUsers($id)->first();\n $user->username = $data['username'];\n $user->save();\n return $this->_result('Username alterado com sucesso');\n }\n\n if ($request->has('email')) {\n $user = User::whereIdUsers($id)->first();\n $user->email = $data['email'];\n $user->save();\n return $this->_result('Email alterado com sucesso');\n }\n\n if ($request->has('password')) {\n $user = User::whereIdUsers($id)->first();\n $user->password = bcrypt($data['password']);\n $user->save();\n return $this->_result('Password alterada com sucesso');\n }\n\n//\n// DB::table('users')\n// ->where('id_users', $id)\n// ->update(['username' => 'nuno']);\n }", "title": "" } ]
[ { "docid": "ca83b8e6c03fa90d46d368711b9bc091", "score": "0.6698508", "text": "public function getUserPassword();", "title": "" }, { "docid": "1178789e0245fbccf1388c7af35a45d5", "score": "0.6600641", "text": "function getPassword();", "title": "" }, { "docid": "5a2954899382bd73e59e020879477d64", "score": "0.6387243", "text": "public function getPassword() {}", "title": "" }, { "docid": "ccbdd0f7c56060a8397acce860f108c4", "score": "0.6383918", "text": "function Usuario( ) {\n $this->ID = \"\";\n $this->CEDULA = \"\";\n $this->ROL = \"\";\n $this->NOMBRE = \"\";\n $this->APELLIDOS = \"\";\n $this->TELEFONO = \"\";\n $this->EMAIL = \"\";\n $this->USUARIO = \"\";\n $this->PASSWORD = \"\";\n }", "title": "" }, { "docid": "6534e9a4b5c38280a3caf0c0dcd84b2e", "score": "0.63816375", "text": "static function password($name,$options){}", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.6381496", "text": "public function getPassword();", "title": "" }, { "docid": "0f0a4bf5e6c5e2f51d196c8d6462af56", "score": "0.62446094", "text": "protected function receber_posts_login() {\n\n\t\t$this->email = $_POST['email'];\n\t\t$this->senha = $_POST['senha'];\n\n\t}", "title": "" }, { "docid": "c1ea0ab77890ff5c87675dcbe16a5585", "score": "0.62140554", "text": "public function login($email,$senha)\r\n {\r\n }", "title": "" }, { "docid": "5f57c140bbab0de1e899e4ea09b6ab7e", "score": "0.61722076", "text": "public function setPassword()\n {\n }", "title": "" }, { "docid": "b764ea4fe1cb71a56bf5b16dc47d7710", "score": "0.61427045", "text": "public function getPassword() { return $this->getSenha(); }", "title": "" }, { "docid": "d33adef71dd81a630725fac636204b0e", "score": "0.6099776", "text": "public function logar($db, $email, $password);", "title": "" }, { "docid": "62a55cf47f62f50f0fd53b5724c4da47", "score": "0.60894847", "text": "public function getPasswordName();", "title": "" }, { "docid": "cbd60480a11e31345d9b54c80347052c", "score": "0.6079568", "text": "public function loginDetails($email, $password){\n $this->email = $email;\n $this->password = $password;\n }", "title": "" }, { "docid": "d9e6e24e04ca01ebae8c13e185da03ab", "score": "0.60638183", "text": "public function getPassword() { return \"\"; }", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.60601735", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.60601735", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.60601735", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.60601735", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "f6c49f530f11b738ebbf2478ddee00a6", "score": "0.604517", "text": "public function MostrarUsuario()\n {\n echo \"alias: $this->alias || clave: $this->clave || Importe: $this->fecha || Importe: $this->mail\";\n }", "title": "" }, { "docid": "98d71143d3597b1e79df1616f911bcfa", "score": "0.6041531", "text": "public function getAuthPassword();", "title": "" }, { "docid": "d36b13a0037497068bc87ccf8c6a8d3f", "score": "0.5999788", "text": "public function getPassword(){return $this->password;}", "title": "" }, { "docid": "f212939d16df718688ebb388ab27b983", "score": "0.59964746", "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": "7650f21fe8bd0093b8e50ed6943ef241", "score": "0.5972979", "text": "function get_passwd($email)\n {\n \t$query = 'SELECT email, passwd from v_adm_tbl WHERE email = ' . '\\'' . $email . '\\'';\n \t$result = mysql_query($query);\n \t$num=mysql_numrows($result);\n\t\t\tif ($num == 1) {\n \t\t$password=mysql_result($result,0,\"passwd\");\n \t} else \n \t{\t\n \t\t$password = 'NULL';\n \t}\n return $password ;\n }", "title": "" }, { "docid": "7fe41aa154190fee9143fd440ee6ce07", "score": "0.59709793", "text": "public function getAuthPassword()\n {\n //\n }", "title": "" }, { "docid": "95bbbcb87e30c79166f34e2d78b080c9", "score": "0.596585", "text": "public function loginProponenteAction()\n {\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n // recebe os dados do formulario via post\n $username = Mascara::delMaskCNPJ(Mascara::delMaskCPF($this->getParam('Login', null)));\n $password = $this->getParam('Senha', null);\n $password = str_replace(\"##menor##\", \"<\", $password);\n $password = str_replace(\"##maior##\", \">\", $password);\n $password = str_replace(\"##aspa##\", \"'\", $password);\n\n try {\n if (empty($username) || empty($password)) {\n # verifica se os campos foram preenchidos\n throw new Exception(\"Senha ou login inv&aacute;lidos\");\n } elseif (strlen($username) == 11 && !Validacao::validarCPF($username)) {\n # verifica se o CPF e valido\n throw new Exception(\"CPF inv&aacute;lido\");\n } elseif (strlen($username) == 14 && !Validacao::validarCNPJ($username)) { // verifica se o CNPJ e valido\n throw new Exception(\"CNPJ inv&aacute;lido\");\n } else {\n\n // realiza a busca do usuario no banco, fazendo a autenticacao do mesmo\n $Usuario = new Autenticacao_Model_Sgcacesso();\n $verificaStatus = $Usuario->buscar(array('cpf = ?' => $username))->toArray();\n if ($verificaStatus) {\n $verificaStatus = array_change_key_case(reset($verificaStatus));\n\n $IdUsuario = $verificaStatus['IdUsuario'];\n $verificaSituacao = $verificaStatus['Situacao'];\n\n $SenhaFinal = EncriptaSenhaDAO::encriptaSenha($username, $password);\n $buscar = $Usuario->loginSemCript($username, $SenhaFinal);\n\n if (!$buscar) {\n throw new Exception(\"Login ou Senha inv&aacute;lidos!\");\n }\n } else {\n $SenhaFinal = addslashes($password);\n $buscar = $Usuario->loginSemCript($username, $SenhaFinal);\n }\n\n if ($buscar) {\n $verificaSituacao = $verificaStatus['Situacao'];\n if ($verificaSituacao == 1) {\n $this->_helper->json(array('status' => 1, 'msg' => 'Voc&ecirc; logou com uma senha tempor&aacute;ria. Por favor, troque a senha.', 'redirect' => \"/autenticacao/index/alterarsenha?idUsuario={$IdUsuario}\"));\n } else {\n $from = $this->getParam('from', '/principalproponente');\n $this->_helper->json(array('status' => 1, 'msg' => 'Login realizado com sucesso!', 'redirect' => $from));\n }\n } else {\n throw new Exception(\"Usu&aacute;rio n&atilde;o cadastrado\");\n }\n }\n } catch (Exception $e) {\n $this->_helper->json(array('status' => false, 'msg' => $e->getMessage()));\n }\n }", "title": "" }, { "docid": "e98e5314cc748b464eb0827d733b3536", "score": "0.5965202", "text": "public function login($_email,$_passwprd)\n {\n }", "title": "" }, { "docid": "25b77c6105f34454206d223596bf1304", "score": "0.5960714", "text": "function __construct($firstname=\"\",$lastname=\"\",$email=\"\",$password=\"\"){\r\n$this->firstname = $firstname;\r\n$this->lastname = $lastname;\r\n$this->email = $email;\r\n$this->password = $password;\r\n\r\n}", "title": "" }, { "docid": "8771441a11d2486b8a31889de70f668a", "score": "0.5949954", "text": "private function verificaCredenziali(){\n }", "title": "" }, { "docid": "cf73e20c1f434b306984fc41a2a799e6", "score": "0.59434193", "text": "private function setLogin() {\n if (!$this->Login || !$this->Senha):\n $this->Error = ['Informe seu Usuário e senha para efetuar o login!', WS_INFOR];\n $this->Result = false;\n elseif (!$this->getUser()):\n $this->Error = ['Os dados informados não são compatíveis!', WS_ALERT];\n $this->Result = false;\n else:\n $this->Execute();\n endif;\n }", "title": "" }, { "docid": "6e873dba93af59376d8b9d51f30898e4", "score": "0.59356457", "text": "function Recordar($email2_form){\r\n\r\n\tglobal $db;\r\n\r\n\t// Cambio # 7\r\n\t$query = $db->prepare(\"SELECT * FROM \"._TBLUSUARIO.\" WHERE email = ? \");\r\n\t$result = $db->Execute($query, array($email2_form)) /* or errorQuery(__LINE__, __FILE__) */;\r\n \r\n /*$query = sprintf(\"SELECT * FROM \"._TBLUSUARIO.\" WHERE email = '%s' \", $email2_form);\r\n\t$result = $db->Execute($query) or errorQuery(__LINE__, __FILE__);*/\r\n\r\n\tif ($result->NumRows() > 0){\r\n\r\n\t\t$row = $result->fields;\r\n\t\tsettype($row, 'object');\r\n\r\n\t\t//Establecemos un hash de recuperación para cuando se realice el enlace\r\n\t\t$hash_recuperacion = sha1($email2_form.$row->username.date('Y-m-d H:i:s'));\r\n\t\t\r\n\t\t//Escribimos el hash de recuperacion del password en la base de datos y la hora en la que se solicito\r\n\t\t//Damos un plazo de 48 horas para recuperar ese password\r\n\t\t\r\n\t\t// Cambio # 8\r\n $fecha_actual = date('Y-m-d H:i:s');\r\n\t\t$row_username = $row->username;\r\n\t\t$query_hash = $db->prepare(\"UPDATE \"._TBLUSUARIO.\" SET timestamp_restauracion = '\".$fecha_actual.\"', hash_restauracion = '\".$hash_recuperacion.\"' where username = ?\");\r\n\t\t$result_hash = $db->Execute($query_hash, array($row_username)) /* or errorQuery(__LINE__, __FILE__) */;\r\n \r\n /*$query_hash = sprintf(\"UPDATE \"._TBLUSUARIO.\" SET hash_restauracion = '\".$fecha_actual.\"', timestamp_restauracion = '\".$hash_recuperacion.\"' where username = '%s'\", $row_username);\r\n\t\t$result_hash = $db->Execute($query_hash) or errorQuery(__LINE__, __FILE__);*/\r\n\t\t\r\n\t\t//Construimos el mensaje de correo\r\n\t\t$mensaje = sprintf(\"Por favor, para restablecer su contraseña dé click en el siguiente enlace \\n %s/index.php?idcategoria=%s&restauracion=%s&username=%s\",_URL,_SRESTAURACION,$hash_recuperacion,$row->username);\r\n\t\t\r\n\t\t$from = \"From:\"._EMAILREGISTRO;\r\n\r\n\t\tif(Funciones::microsmail($row->email,\"Información de acceso a la página web \" . _NOMBRESITIO,$mensaje,$from,'registro.php','4')) {\r\n\t\t\tif($result_hash){ //Se verifica si se pudo escribir en la base de datos\r\n\t\t\t\t$msg = sprintf(\"Su informaci&oacute;n de acceso fu&eacute; enviada a <b>%s</b>\",$row->email);\r\n\t\t\t\t$smarty = new Smarty_Plantilla;\r\n\t\t\t\t$mensajeExito[] = sprintf(\"%s\",$msg);\r\n\t\t\t\t$smarty2 = new Smarty_Plantilla;\r\n\t\t\t\t$smarty2->assign('mostrar' ,\"no\");\r\n\t\t\t\t$smarty2->assign('rotMensaje',_ROT_CONFIRMACION);\r\n\t\t\t\t$smarty2->assign('tipo' ,\"exito\");\r\n\t\t\t\t$smarty2->assign('elementoMenu',$mensajeExito);\r\n\t\t\t\treturn $smarty2->fetch('tpl_display_mensaje.html');\r\n\t\t\t}else{\r\n\t\t\t\t//No se pudo guardar la informacion en la base de datos\r\n\t\t\t\t$msg = sprintf(\"Un nuevo password fue enviado a su correo PERO NO FUE POSIBLE GUARDARLO en nuestra base de datos. \" .\r\n\t\t\t\t\t\t\"Por favor haga caso omiso del correo enviado e intente m&aacute;s tarde o comunique de esto al Webmaster\");\r\n\t\t\t\t$smarty = new Smarty_Plantilla;\r\n\t\t\t\t$mensajeExito[] = sprintf(\"%s\",$msg);\r\n\t\t\t\t$smarty2 = new Smarty_Plantilla;\r\n\t\t\t\t$smarty2->assign('mostrar' ,\"no\");\r\n\t\t\t\t$smarty2->assign('rotMensaje',_ROT_ADVERTENCIA);\r\n\t\t\t\t$smarty2->assign('tipo' ,\"error\");\r\n\t\t\t\t$smarty2->assign('elementoMenu',$mensajeExito);\r\n\t\t\t\treturn $smarty2->fetch('tpl_display_mensaje.html');\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\r\n\t\t$msg = sprintf(\"No existe ninguna cuenta asociada con el email <strong>%s</strong><br>Por favor intente con otro o vuelva a registrarse.\",$email2_form);\r\n\t\t$smarty = new Smarty_Plantilla;\r\n\t\t$mensajeExito[] = sprintf(\"%s\",$msg);\r\n\t\t$smarty2 = new Smarty_Plantilla;\r\n\t\t$smarty2->assign('mostrar' ,\"no\");\r\n\t\t$smarty2->assign('rotMensaje',_ROT_ERROR);\r\n\t\t$smarty2->assign('tipo' ,\"error\");\r\n\t\t$smarty2->assign('elementoMenu',$mensajeExito);\r\n\t\treturn $smarty2->fetch('tpl_display_mensaje.html');\r\n\r\n\t}\r\n}", "title": "" }, { "docid": "4d7c4829b5d82000b0735944b0ec8d08", "score": "0.59331834", "text": "function ro_credentials() {\n\treturn (\"\" . mysql_host() . separator() . mysql_ro_user() . separator() . mysql_ro_pass() . separator() . mysql_db() . \"\");\n}", "title": "" }, { "docid": "9389d4bbd1cfe76f716d92c08a06e2a0", "score": "0.59180444", "text": "public function getNewPassword();", "title": "" }, { "docid": "8a02b225a4b7343600e1749455e98695", "score": "0.5908701", "text": "public function getAuthPassword()\n {\n return $this->Senha;\n }", "title": "" }, { "docid": "5801505f155db60fba2a5dc7786f1d58", "score": "0.5892292", "text": "public function loginWithEmptyEmail()\n {\n $this->browse(function (Browser $browser) {\n $browser\n ->visit('/autentikasi/form-login')\n ->type('password', 'secret')\n ->press('Masuk')\n ->assertPathIs('/autentikasi/form-login')\n ->assertSee('Email perlu diisi!');\n });\n }", "title": "" }, { "docid": "94e45871bc4bb5b914d5f7910e78647f", "score": "0.5885018", "text": "public function loginWithEmptyPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser\n ->visit('/autentikasi/form-login')\n ->type('email', '[email protected]')\n ->press('Masuk')\n ->assertPathIs('/autentikasi/form-login')\n ->assertSee('Kata sandi perlu diisi!');\n });\n }", "title": "" }, { "docid": "ffb0572911a991da083266d48623d9eb", "score": "0.5882779", "text": "function set_data()\n {\n $admin = array('name' => 'admin', 'password' => 123);\n $data = array('response' => '');\n $name = sanitize($_POST['name']);\n $password = $_POST['password'];\n\n if (empty($name) || empty($password)) {\n $data['response'] = 'Заполните все поля.';\n return $data;\n }\n\n if ($name == $admin['name'] && $password == $admin['password']) {\n\n $_SESSION['logged_in'] = true;\n if (isset($_SESSION['logged_in'])) {\n header('Location: /');\n }\n $data['response'] = 'Добро пожаловать.';\n return $data;\n } else {\n $data['response'] = 'Такого пользователя не существует.';\n return $data;\n }\n\n }", "title": "" }, { "docid": "a8589f634cfe29966204cc9b0a9e985f", "score": "0.5881935", "text": "private function username(): string\n {\n return 'email';\n }", "title": "" }, { "docid": "7f5d526171106e424cac35001334371c", "score": "0.58753544", "text": "function Password()\n {\n return array(\n 'primary' => false,\n 'type' => TYPE_PASSWORD,\n 'not_null' => true\n );\n }", "title": "" }, { "docid": "581d06ec95c730fa2df50f28b78d2e9a", "score": "0.5874323", "text": "public static function Create($email, $username, $password, $password_again){\n }", "title": "" }, { "docid": "c17b9ea74b102fe8d3a8595e54ff5373", "score": "0.58734393", "text": "function registerUser($nome, $cognome, $citta, $tel, $email, $password){\n $db = databaseConnection();\n $db -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $email = $db -> quote($email);\n $nome = $db -> quote($nome);\n $password = md5($password);\n $cognome = $db -> quote($cognome);\n $citta = $db -> quote($citta);\n $tel = $db -> quote($tel);\n $query = \"INSERT INTO Utente \n VALUES(NULL, $email, '$password', $nome, $cognome, $tel, $citta);\";\n $db -> query($query);\n}", "title": "" }, { "docid": "052039c58ecaa7006c83e315e9e74dbe", "score": "0.5857871", "text": "public function login($email, $password);", "title": "" }, { "docid": "b8b2b90b43304b397716cfc51fb6067f", "score": "0.5855288", "text": "public function getUserPwd();", "title": "" }, { "docid": "3d18e99442c6dbd2be71a4a172cdf4ed", "score": "0.5848125", "text": "function setCredentials($u, $p) {\r\n $this->username=$u;\r\n $this->password=$p;\r\n }", "title": "" }, { "docid": "f5077107056e39d3329bae9806afa8dc", "score": "0.584656", "text": "public function enviaPasswordMail()\n\t\t{\n\t\t\t\t$message = \"G'Day!\n\t\t\t\t \n\t\t\t\tYour personal account for the Project Web Site\n\t\t\t\thas been created! To log in, proceed to the\n\t\t\t\tfollowing address:\n\t\t\t\t \n\t\t\t\thttp://www.example.com/\n\t\t\t\t \n\t\t\t\tYour personal login ID and password are as follows:\n\t\t\t\t \n\t\t\t\tuserid: $_POST[newid]\n\t\t\t\tpassword: $newpass\n\t\t\t\t \n\t\t\t\tYou aren't stuck with this password! You can change it at any time after you have logged in.\n\t\t\t\t \n\t\t\t\tIf you have any problems, feel free to contact me at <[email protected]>.\n\t\t\t\t \n\t\t\t\t-Your Name\n\t\t\t\tYour Site Webmaster\n\t\t\t\t\";\n\t\t\t\t \n\t\t\t\tmail($_POST['newemail'],\"Your Password for Your Website\",\n\t\t\t\t$message, \"From:Your Name <[email protected]>\");\n\t\t\t\t$newpass = substr(md5(time()),0,6);\n\t\t}", "title": "" }, { "docid": "c4266607a96e6117b94c8bb9e2cb6e50", "score": "0.58431536", "text": "private function passwd() {\n\t\t$username = mysql_real_escape_string($this->in('Username: '));\n\n\t\t$id = $this->Administrator->find('first', array(\n\t\t\t'conditions' => array('username' => $username),\n\t\t\t'fields' => array('id')\n\t\t));\n\n\t\tif(isset($id['Administrator']['id'])) {\n\t\t\t$id = $id['Administrator']['id'];\n\n\t\t\twhile(empty($new)) {\n\t\t\t\t$new = mysql_real_escape_string($this->in('New Password: '));\n\t\t\t\tif(empty($new))\n\t\t\t\t\t$this->out('Password cannot be empty!');\n\t\t\t}\n\n\t\t\t$confirm = mysql_real_escape_string($this->in('Confirm Password: '));\n\t\t\tif($new === $confirm) {\n\t\t\t\t$hash = mysql_real_escape_string(Security::hash($new, null, Configure::read('Security.salt')));\n\t\t\t\t$query = \"UPDATE administrators SET `password`='$hash' WHERE `id`='$id'\";\n\t\t\t\t$this->Administrator->query($query);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->out(\"Administrator '$username' not found.\");\n\t\t}\n\t}", "title": "" }, { "docid": "90637419a9b909b52c522a67cef25bc4", "score": "0.58360666", "text": "private function setUserData()\n {\n $auth = Auth::getInstance();\n $user = $auth->getUser()[\"username\"];\n $result = $this->db->Query(\"SELECT * FROM `tbl_user` WHERE `login`='$user'\");\n\n if ($result == null)\n return;\n\n $user = $result[0];\n $kontostand = number_format($user[\"kontostand\"], \"2\", \",\", \".\") . \"€\";\n $this->tmp->setVar(\"Vorname\", $user[\"vorname\"]);\n $this->tmp->setVar(\"Name\", $user[\"nachname\"]);\n $this->tmp->setVar(\"Login\", $user[\"login\"]);\n $this->tmp->setVar(\"Kontostand\", $kontostand);\n }", "title": "" }, { "docid": "b789d635c3902c269eb6997120ae4e7a", "score": "0.5834366", "text": "public function getPassword(): string|null;", "title": "" }, { "docid": "f2ac2bd761bb7f3929a1515df7d07914", "score": "0.58334076", "text": "public function getUserEmail();", "title": "" }, { "docid": "f6571c9c15abfe8c302c83fe4ac852cf", "score": "0.5826343", "text": "public static function getAuthPasswordName();", "title": "" }, { "docid": "7da5dbb641193ffe63ebe57b3c0e7507", "score": "0.5821448", "text": "function set_info($email, $name, $phone, $username){\n return $this->db->query( \"UPDATE {$this->tb_user} SET email='{$email}', name='{$name}', phone='{$phone}' WHERE username='{$username}';\" );\n }", "title": "" }, { "docid": "cb3e38af15d934cff952c1236a0e802c", "score": "0.58191633", "text": "function input_password($name) {\r\n\t\t// Password input text box properties\r\n\t\t$input_data = array(\"type\" => \"password\", \"name\" => $name, \"id\" => $name);\r\n\r\n\t\t// Add requested properties and generate tag\r\n\t\t$this->input($input_data);\r\n\t}", "title": "" }, { "docid": "bc3ad60bdf42c1c546d8a85e61461f1a", "score": "0.5818894", "text": "public function show($email, $password)\n {\n //\n }", "title": "" }, { "docid": "f61f044d3d98f7662dbad789831a599b", "score": "0.5808188", "text": "function getEmail($username, $password){\n \t$db = connectToGetTutor(); // Variable to connect to DB so that we can start a MYSQL query.\n foreach($db->query('SELECT * FROM credentials WHERE username=\"'.$username.'\" AND password=\"'.$password.'\"') as $row){\n $email = $row['email'];\n return $email;\n }\n }", "title": "" }, { "docid": "b77211f63d8ef818e48c29beb42c7a64", "score": "0.5795909", "text": "function set_data($fn, $ln, $email, $pw)\n\t{\n\t\t$this->first_name = $fn;\n\t\t$this->last_name = $ln;\n\t\t$this->email = $email;\n\t\t$this->create_hash($pw);\n\t}", "title": "" }, { "docid": "c090d463b6b68ebc72775abda5e3f34c", "score": "0.5791799", "text": "public function getPassword()\n{\nreturn $this->Password;\n}", "title": "" }, { "docid": "c3ec39064533214c866109eb6980e4b3", "score": "0.5790766", "text": "function getPassword($mac){\n global $arrLang;\n $pDB = $this->connectDataBase(\"sqlite\",\"endpoint\");\n if($pDB==false)\n return false;\n $query = \"select name, value from parameter where id_endpoint=(select id from endpoint where mac_adress='$mac') and (name='telnet_username' OR name='telnet_password')\";\n $result = $pDB->fetchTable($query,true); //se consulta a la base endpoints\n if(is_array($result) && count($result)>0){\n $credential['user'] = $result[0][\"value\"];\n $credential['password'] = $result[1][\"value\"];\n }\n\n else{\n $credential['user']=\"admin\";\n $credential['password']=\"admin\";\n }\n return $credential;\n\n }", "title": "" }, { "docid": "32c8cc77d3ddc27b85a7586054e94a07", "score": "0.5788421", "text": "public function getUserCredentials();", "title": "" }, { "docid": "b04f8907423dc309dcb6b725acdc59e4", "score": "0.57750046", "text": "public function getdata(){\n $this->username=$this->clear($_POST['username']);\n $this->password=$this->salt($this->clear($_POST['password']));\n $this->email=$this->clear($_POST['email']);\n $this->user_id=(int)($_GET['user_id']) ;\n }", "title": "" }, { "docid": "6e5acced0a8413bc66772c0ecc841c13", "score": "0.5774315", "text": "function suppliedCredentials()\n {\n return isset($_POST['username']) || isset($_POST['password']);\n }", "title": "" }, { "docid": "88b030ec05ee12c69e2bb6dae1e35bdd", "score": "0.577282", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->cuenta=$_POST['cuenta'];\n\t\t$this->numero=$_POST['numero'];\n\t\t$this->titular=$_POST['titular'];\n\t\t$this->rif=$_POST['rif'];\n\t}", "title": "" }, { "docid": "7ebbb91a14b5e56d5ac432fbce72b2a3", "score": "0.5759993", "text": "function _set_fields_passreset() {\n\t\t$this->form_data->user_id = \"\";\n\t\t$this->form_data->email_address = \"\";\n\t\t$this->form_data->username = \"\";\n\t}", "title": "" }, { "docid": "2a51e0498d06ae41cd19d77555ec266e", "score": "0.575982", "text": "function createLogin(){\r\n\t\tparent::setMiddle(\"Username:<input type='text' id='username' name='username' placeholder='Username/Email'/>\\nPassword:<input type='password' id='password' name='password'/>\");\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "9a7a6bf9d85c861b0ec6138a6e8ddd5c", "score": "0.57398087", "text": "public function setPassword($x) { $this->password = $x; }", "title": "" }, { "docid": "a3d4d3507c4844823e9c4900ba0a597b", "score": "0.5734517", "text": "public function getUsername(){\n return $this->email; // parce qu'on va utiliser l'email comme login dans le formulaire de connexion\n }", "title": "" }, { "docid": "8cbc5b2cc4af0cc1cec2f9411a06197b", "score": "0.57309854", "text": "public function getUserInformations(): void\n {\n $this->mail = $_POST['mail'];\n $this->password = $_POST['password'];\n\n if (!empty($this->password) && !empty($this->mail)) {\n $model = $this->model->loginUser($this->mail);\n $connexion_user = $model->fetch();\n\n if (!empty($connexion_user)) {\n if (password_verify($this->password, $connexion_user['password'])) {\n $_SESSION['user'] = $connexion_user;\n\n // Redirect to the index page\n Router::redirectTo('home');\n exit();\n } else {\n array_push($this->errors, \"Vous n'avez pas bien rempli les bons champs, veuillez recommencer\");\n }\n } else {\n array_push($this->errors, \"Vous n'avez pas bien rempli les bons champs, veuillez recommencer\");\n }\n } else {\n array_push($this->errors, \"Vous n'avez pas bien rempli les bons champs, veuillez recommencer\");\n }\n }", "title": "" }, { "docid": "d4963668f1bde8ab4bab8a5179aa7265", "score": "0.5730829", "text": "public function getAuthPassword()\n\t{\n\t\treturn $this->senha;\n\t}", "title": "" }, { "docid": "9a15011464f9960d3dbce73625189ca5", "score": "0.5719748", "text": "function user_verify_login() {\r\n\t$data = stripslashes_deep($_POST);\r\n\t$user = R::findOne('user', 'email=:email AND password=:password', array(\r\n\t\t\t\t'email' => $data['email'],\r\n\t\t\t\t'password' => $data['password']\r\n\t\t\t));\r\n\r\n\tif ($user == null) {\r\n\t\tthrow new Exception('Thông tin đăng nhập không chính xác');\r\n\t}\r\n\r\n\treturn $user;\r\n}", "title": "" }, { "docid": "7c3290a31b217d1ce36bc4bb1fac8ea2", "score": "0.5719456", "text": "public function setUserPassword($password);", "title": "" }, { "docid": "5ce975b82833dc69372762c231be449b", "score": "0.5710223", "text": "function user_user_properties_password(){\r\n\t// editor user properties -> email setting untuk current user\r\n\t// untuk menambahkan field baru, langsung tambahkan saja di form di file template fungsi ini. gunakan nama sesuai table dimana field tsb akan disimpan...[account atau properties]\r\n\t$user_id = $_SESSION['user_id'];\r\n\t$username = $_SESSION['username'];\r\n\t\r\n\tif(!isset($user_id)){\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t// dapatkan data current user dari table Users.Account dan Users.Properties\r\n\t// Users.Account: _id, email, password, username, lilo_id\r\n\t// Users.Properties: _id, user_id (Users.Account.lilo_id), fullname, picture_profile, ...\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Users');\r\n\t$lilo_mongo->selectCollection('Account');\r\n\t$account_data = $lilo_mongo->findOne(array('lilo_id' => $user_id));\r\n//\treturn print_r($account_data, true);\r\n\t$lilo_mongo->selectCollection('Properties');\r\n\t$property_data = $lilo_mongo->findOne(array('lilo_id' => $user_id));\r\n\t\r\n\t$template = new Template();\r\n\t$template->username = $username;\r\n\t$template->user_id = $user_id;\r\n\t$template->account_data = $account_data;\r\n\t$template->property_data = $property_data;\r\n\t$template->basepath = $_SESSION['basepath'];\r\n\r\n\t$html = $template->render(\"modules/001_user_management/templates/user_user_properties_password.php\");\r\n\treturn ui_user_default(NULL, $html);\r\n\t\r\n}", "title": "" }, { "docid": "cb1b715c5bab5baa8ec438ccca9da7c9", "score": "0.57086104", "text": "function validateUserData()\n{ \n if (empty(getFieldValue(\"password\"))) {\n $errors['password'] = \"Password is required\";\n } elseif (!preg_match(REGEX_PASSWORD, getFieldValue(\"password\"))) {\n $errors['password'] = PASSWORD_ERR_MSSG;\n $errors['confirmPassword'] = \"\";\n }\n \n if (empty(getFieldValue(\"confirmPassword\"))) {\n $errors['confirmPassword'] = \"Confirm password is required\";\n } elseif (getFieldValue(\"password\") != getFieldValue(\"confirmPassword\")) {\n $errors['confirmPassword'] = \"Password should be same\";\n }\n\n return isset($errors) ? $errors : null;\n}", "title": "" }, { "docid": "6264f0b9d33a13a7b6bfcca8af27b091", "score": "0.5706763", "text": "function addUsuario($usuario, $nome,$senha,$email,$telefone) {\n}", "title": "" }, { "docid": "69abb36cb6a41240e0a20ed508fdec3b", "score": "0.5706548", "text": "function user_create($name, $lastname, $email, $pass, $role=\"1\", $tel=\"\", $cel=\"\"){\n $sql1 = \"SELECT u.email FROM user u WHERE email = '$email' \";\n $datos1 = $this->cnx->db_select_array($sql1);\n if(sizeof($datos1)>0){\n $msj = \"La dirección de correo suministrado ya se encuentra registrada. Intente logearse o registrarse con una nueva dirección de correo.\";\n $code = 2;\n \n }else{\n\n $mysqli = $this->cnx->connect();\n $name = $mysqli->real_escape_string($name); \n $lastname = $mysqli->real_escape_string($lastname); \n $email = $mysqli->real_escape_string($email); \n $pass = md5($mysqli->real_escape_string($pass)); \n \n //$role = $mysqli->real_escape_string($role); \n $tel = $mysqli->real_escape_string($tel); \n $cel = $mysqli->real_escape_string($cel); \n $spec = $mysqli->real_escape_string($spec); \n mysqli_set_charset($mysqli, \"utf8\");\n \n //$sql = \"INSERT INTO user(name, lastname, email, pass, tel, cel) VALUES ('$name', '$lastname', '$email', '$pass', $role, '$tel', '$cel') \";\n if($name != \"\") $this->cnx->add_string($registro,\"name\",trim($name));\n if($lastname != \"\") $this->cnx->add_string($registro,\"lastname\",trim($lastname));\n if($email != \"\") $this->cnx->add_string($registro,\"email\",trim($email));\n if($pass != \"\") $this->cnx->add_string($registro,\"pass\",trim($pass));\n if($tel != \"\") $this->cnx->add_string($registro,\"tel\",trim($tel));\n if($cel != \"\") $this->cnx->add_string($registro,\"cel\",trim($cel));\n $this->cnx->add_numeric($registro,\"role_id\",trim($role));\n $sql = $this->cnx->query_insert($registro,\"user\");\n $ID = $this->cnx->db_insert($sql,$err);\n if($err){\n $msj = \"ERROR: ocurrió un problema técnico durante el registro, agradecemos intente de nuevo.\".$err;\n $code = 2;\n //return $sql.\" ERROR \".$err;\n }else{\n $msj = $ID;\n $code = 1;\n //return $ID;\n } \n\n\n }\n\n $response = array(\"msj\" => $msj, \"code\" => $code);\n return $response;\n \n }", "title": "" }, { "docid": "7423d725ae0586be00ad2c23fba3f8b2", "score": "0.57058877", "text": "public function __construct(){\n\t\t\t$this->objetjoUsuario=new Usuarios();\n\t\t\t$this->username=$_POST['username'];\n\t\t\t$contrasenia=$_POST['password'];\n\t\t\t$this->password=password_hash($contrasenia, PASSWORD_DEFAULT, array(\"cost\"=>12));\n\t\t\t$this->email=$_POST['email'];\n\t\t\t$this->name=$_POST['name'];\n\t\t\t$this->surname=$_POST['surname'];\n\t\t\t$this->dni=$_POST['dni'];\n\t\t\t$this->birthday=$_POST['birthday'];\n\t\t\t$this->address=$_POST['address'];\n\t\t\t$this->postal=$_POST['postal'];\n\t\t\t$this->town=$_POST['town'];\n\t\t\t$this->province=$_POST['province'];\n\t\t\t$this->mobile=$_POST['mobile'];\n\t\t\t$this->telephone=$_POST['telephone'];\t\t\t\n\t\t}", "title": "" }, { "docid": "a65a538ab407455957a10a99e1c27ad6", "score": "0.5702432", "text": "public function getLogin() {}", "title": "" }, { "docid": "08431ed45964fda00ff23e3157d22d7e", "score": "0.569283", "text": "public function getAuthPassword()\n {\n return 'password';\n }", "title": "" }, { "docid": "c16c3757b95cc355a3a24f1b3bfab1fc", "score": "0.5690923", "text": "public function save($nome,$email,$login,$setor,$matricula){\n $pass = ''.$login.''.$matricula;\n $pwhash = PasswordUtil::hash($pass);\n // Insert the user\n $query = \"Insert into \".$this->table.\" (nome,email,login,setor,matricula,password_hash) values (?,?,?,?,?,?)\";\n $params = array($nome, $email, $login, $setor, $matricula, $pwhash);\n $stmt = $this->db->prepare($query);\n if ($stmt->execute($params) && $stmt->rowCount() > 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "06303125a46184d53274c07fc5c922ef", "score": "0.5676415", "text": "function Password($name,$size=\"20\",$value=\"\",$label=\"\",$labelpos=false)\n\t{\n\t\t$this->settype(\"password\");\n\t\t$this->setname($name);\n\t\t$this->setsize($size);\n\t\t$this->setValue($value);\n\t\t$this->setLabel($label);\n\t\t$this->setlabelPos($labelpos);\n\t\treturn $this->getfield();\n\t}", "title": "" }, { "docid": "3009cd365a092f7ed02a49bfaa7c5495", "score": "0.5673089", "text": "function profesorEmail()\n\t{\n\t\t// las funciones se deben llamar desde la página original\n\t\t$this->Email = dado_Id($this->idprofesor,\"email\",\"tb_profesores\",\"idprofesor\");\n\t\treturn $this->Email;\n\t}", "title": "" }, { "docid": "db8f41ce1d13541595e0f7f392263f38", "score": "0.56728256", "text": "function user($login_name=\"\",$password=\"\"){\n\t\t$checkcookie=0;\n\t\t$this->logged = 0;\n\t\tif ($login_name==\"\"){\n\t\t\tif (isset($_COOKIE[\"lglocal\"])) $login_name = $_COOKIE[\"lglocal\"];\n\t\t}\n\t\tif ($password==\"\"){\n\t\t\tif (isset($_COOKIE[\"wvl_rand\"])) $password = $_COOKIE[\"wvl_rand\"];\n\t\t\t$checkcookie=1;\n\t\t}\n\t\telse{\n\t\t\t//remove \\' if gpc_magic_quote = on\n\t\t\t$password = str_replace(\"\\'\",\"'\",$password);\n\t\t}\n\n\t\tif ($login_name==\"\" && $password==\"\") return;\n\t\t\n\t\t$field_where = \"use_login_name\";\n\t\t//nếu là email thì query ở email\n\t\tif (filter_var($login_name, FILTER_VALIDATE_EMAIL)) {\n\t\t $field_where = \"use_email\";\n\t\t}\n\t\t\n\t\tif (is_numeric(trim($login_name))) {\n\t\t $field_where = \"use_phone\";\n\t\t}\n\n\t\t$db_user = new db_query(\"SELECT *\n\t\t\t\t\t\t\t\t\t\t FROM user\n\t\t\t\t\t\t\t\t\t\t WHERE $field_where = '\" . $this->removequote($login_name) . \"' LIMIT 1\");\n\n\t\tif ($row=mysqli_fetch_assoc($db_user->result)){\n\t\t\t//kiem tra password va use_active\n\t\t\tif($checkcookie == 0)\t$password = md5($password . $row[\"use_secrest\"]);\n\t\t\tif (($password == $row[\"use_password\"] && $row[\"use_active\"] == 1)) {\n\t\t\t\t$this->logged\t\t\t\t= 1;\n\t\t\t\t$this->login_name\t\t\t= trim($row[\"use_login_name\"]);\n\t\t\t\t$this->use_name\t\t\t= trim($row[\"use_fullname\"]);\n\t\t\t\t$this->password\t\t\t= $row[\"use_password\"];\n\t\t\t\t$this->u_id\t\t\t\t\t= intval($row[\"use_id\"]);\n\t\t\t\t$this->use_fullname\t\t= trim($row[\"use_fullname\"]);\n\t\t\t\t$this->useField\t\t\t= $row;\n\t\t\t\t$this->use_avatar\t\t\t= $row['use_avatar'];\n\t\t\t\t$this->use_login\t\t\t= trim($row['use_login_name']);\n\t\t\t\t$this->use_email\t\t\t= trim($row['use_email']);\n $this->use_phone\t\t\t= trim($row['use_phone']);\n\t\t\t\t$this->use_check_friend\t\t\t= $row['use_check_friend'];\n\t\t\t\t$this->use_birthday\t\t= $row['use_birthday'];\n\t\t\t\t$this->use_address\t\t= $row['use_address'];\n\t\t\t\t$this->use_com_id\t\t= $row['use_com_id'];\n\t\t\t}\n\t\t}\n\t\tunset($db_user);\n\n\n\t}", "title": "" }, { "docid": "270a67f3a59aac39e12b9f63c36f4cad", "score": "0.5668037", "text": "protected function getLoginCredentials()\n {\n return [\n \"email\" => Request::get(\"email\"),\n \"password\" => Request::get(\"password\"),\n ];\n }", "title": "" }, { "docid": "04b72b57492dd40e8fcec74e2ad98c3f", "score": "0.5667963", "text": "public function getDefaultPassword(): string|null;", "title": "" }, { "docid": "5d8094a9f4c4292df9f096a5286a7aaf", "score": "0.56613266", "text": "public function testGhetterAndSetterEmail()\n {\n $user = $this->getUser(\"[email protected]\", null);\n $user->setEmail(\"[email protected]\");\n $this->assertEquals(\"[email protected]\",$user->getEmail());\n\n }", "title": "" }, { "docid": "15e6862740c91afb0cc0de26ae217636", "score": "0.566034", "text": "public function changePassword() {}", "title": "" }, { "docid": "209bfe8e427ecab02f53930984f93ed9", "score": "0.5659449", "text": "public function setAuthCredentials($username,$password);", "title": "" }, { "docid": "cab5479c50933b24c4dc7072e3efef04", "score": "0.5658128", "text": "public function username(){\n return 'email';\n }", "title": "" }, { "docid": "54a489ac736d8f9649f5aa0cdcecaf71", "score": "0.56560636", "text": "private function retrieveFields() {\n \n global $dbh;\n \n $stmt = $dbh->prepare(\"\n SELECT *\n FROM `login_users`\n WHERE `user_id` = :user_id\n \");\n \n $stmt->execute([\n ':user_id' => $this->user_id\n ]);\n \n\t\tif ( $stmt->rowCount() < 1 ) {\n\t\t\t$this->error = sprintf('<div class=\"alert alert-warning\">%s</div>', _('Sorry, that user does not exist.') );\n\t\t\tparent::displayMessage($this->error, true);\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ($stmt->fetch(PDO::FETCH_ASSOC) as $field => $value) :\n\t\t\t$this->settings[$field] = parent::secure($value);\n\t\tendforeach;\n\n\t}", "title": "" }, { "docid": "50fe167a2693ac67b1b03bad74ae5422", "score": "0.56523806", "text": "function _init_change_password_details() {\n\t\t\n\t\t$this->old_password = $this->Common_model->safe_html($this->input->post(\"old_password\"));\n\t\t$this->new_password = $this->Common_model->safe_html($this->input->post(\"new_password\"));\n\t\t\n\t}", "title": "" }, { "docid": "d68ec1728e4814d85adb640f77bb0d7f", "score": "0.564482", "text": "public function set_user($username,$password)\n{\n\t$this->username = $username;\n\t$this->password = $password;\n\t\n}", "title": "" }, { "docid": "327648e59a306842f6ef821a0bc28b29", "score": "0.56434864", "text": "public function car_data(){\n\n if(isset($_POST[\"i_mail\"])){\n\n $tabla= \"datos_clientes\";\n $email= \"mail\";\n $valor= $_POST[\"i_mail\"];\n\n $respuesta = EnlacesPaginas::view_personal_data($tabla,$email,$valor);\n\n //si el usuario y la contraseña coinciden imprimir datos\n\n return $respuesta;\n \n }\n\n }", "title": "" }, { "docid": "f155c5a787216b13c81cddd6d6f2513d", "score": "0.56421685", "text": "function register($password, $name, $realname, $language, $email) {\n global $userdb, $page;\n\t if(strlen($name)==0) {\n\t debug(\"USERDB\", \"attempt to register with empty userid\");\n\t return $page->getlocalized(\"invalid_username\");\n\t }\n\t debug(\"USERDB\", \"registering user: \". $name);\n $name = sotf_Utils::clean($name);\n $passwd = sotf_Utils::clean($password);\n\t $query = \"INSERT INTO authenticate (username,passwd) VALUES('$name','$password')\";\n $userdb->query($query);\n $id = $userdb->getOne(\"SELECT auth_id FROM authenticate WHERE username='$name'\");\n //\t $query = \"INSERT INTO user_preferences (RealName,language,last_visit,num_logins) \";\n $query = \"INSERT INTO user_preferences (auth_id, realname, language,last_visit,num_logins) \";\n\t $query .= \"VALUES('$id','\"\n \t . sotf_Utils::clean($realname) . \"','\" \n . sotf_Utils::clean($language) \n\t // . \"','\" . sotf_Utils::clean($email) \n\t . \"','\". db_Wrap::getSQLDate() . \"',1)\";\n\t $userdb->query($query);\n\t}", "title": "" }, { "docid": "d227ff3cd92c8dbb30f0c6e60e1983e9", "score": "0.56375134", "text": "public function getPassword(): ?string;", "title": "" }, { "docid": "9c70427ec1478ce1469d2463cd9dd10d", "score": "0.56309444", "text": "public function getApiPassword(): string;", "title": "" }, { "docid": "07f2fe90b02432c1556d0e92502fc0d3", "score": "0.56232643", "text": "private function addLoginDetailsToPostFields(){\n // add our login values to the postFields structure\n $this->postFields['email'] = $this->username;\n $this->postFields['create'] = 0;\n $this->postFields['password'] = $this->password;\n }", "title": "" }, { "docid": "a992581ea324f9d086be6b958ebaaf12", "score": "0.5621541", "text": "public function register( $first_name, $last_name, $password, $email){\n\n }", "title": "" } ]
67125276834c5508c86f1cb94a92f7b4
Executes a PDO Statement Object an returns nultiple database record as an associative array
[ { "docid": "1c67fb0d049e884053b6051c9dd59644", "score": "0.623227", "text": "public function fetchAll()\n {\n $this->execute();\n return $this->dbStmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" } ]
[ { "docid": "bc469a1002e19d8e777f9c1215382afd", "score": "0.7099756", "text": "public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "9b5ddbcf653f43472b7b6d6fc8bcf0e3", "score": "0.7073596", "text": "public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "985a0a51063f747985f885829e4a1861", "score": "0.7049476", "text": "function db_select_into_array( $statement ) {\n\n $this->db_run_query( $statement );\n\n if( ! is_object( $this->dataset_obj )) return NULL;\n\n while( $this->db_fetch_next_row() ) {\n $this->dataset_array[] = $this->curr_row_array;\n }\n\n $this->dataset_obj->free(); # We don't need this any more as we have all the same data in an array\n\n return $this->dataset_array;\n }", "title": "" }, { "docid": "558481de0432b65c62bf0dd21521a217", "score": "0.70075196", "text": "public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}", "title": "" }, { "docid": "3c8d0d7f501ab094b29a6a103551a7b3", "score": "0.6856313", "text": "function query_array($sql=null)\n{\nglobal $db,$debug;\n \ntry { \n if ($debug) \n $time_start = microtime(true); \n \n $stmt = $this->db['conn']->prepare($sql);\n $stmt->execute();\n \n if ($debug){\n $time = microtime(true)- $time_start; \n echo \"<HR>Executed SQL:<strong> $sql </strong> in <strong>$time</strong> s<HR>\";\n }\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC); //PDO::FETCH_NUM | PDO::FETCH_ASSOC\n return $results ;\n} catch (PDOException $e) {\n $this->fatal_error(\" Database Error!: <strong>\". $e->getMessage() .\"</strong> SQL: $sql <br /> Using DSN \".$this->db['dsn'].\"<br/>\");\n die(); die();\n}\n\n}", "title": "" }, { "docid": "7822aad65b6c3d71bdee05190f2f1bd4", "score": "0.67912143", "text": "public function fetchArray($statement, array $params = array());", "title": "" }, { "docid": "a9f00f3938922bec0c37d2889e8539fb", "score": "0.6767749", "text": "public function queryFetchAllAssoc($statement) {\n return $this->connection->query($statement)->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "a9dc335af7811b5d9fb644e522d3fa26", "score": "0.67059946", "text": "public function queryFetchAllAssoc($statement) {\n return self::$PDOInstance->query($statement)->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "692866c018bed5964b316108133516e3", "score": "0.6696016", "text": "public function getResult() {\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "5b9a4bf12603a05b657f77613d88d279", "score": "0.66942596", "text": "function getResultArray($sql) {\n require_once(\"Y_DB_MySQL.class.php\");\n $db = new My();\n $array = array();\n $db->Query($sql);\n \n while ($db->NextRecord()) {\n array_push($array, $db->Record);\n }\n \n $db->Close();\n return $array;\n }", "title": "" }, { "docid": "264c2968c53f394ca4f1ffb6ca1e1314", "score": "0.66843146", "text": "function execute($sql): array\n {\n $rs = array();\n\n try {\n foreach ($this->connection->query($sql) as $row) {\n $rs[] = $row;\n }\n return $rs;\n } catch (PDOException $e) {\n $message = $e->getCode() . \" \" . $e->getMessage();\n if ($this->debug_mode > 0) {\n $this->addMessage($message);\n }\n throw new ObjetBDDException($message);\n }\n }", "title": "" }, { "docid": "584297a6bbd7f18f03f2d0c625bd640b", "score": "0.6671152", "text": "public function resultSet()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetchAll(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "7d4af165072e68a2f09d1faba6780f71", "score": "0.66326386", "text": "public function execute(): array\n {\n if (!$this->table) {\n return Array();\n }\n $where = $this->getWhere();\n\n $this->statement($where);\n $this->statement($this->order);\n $this->statement($this->limit);\n \n $query = $this->prepare();\n \n if ($query) {\n try {\n $query->execute();\n\n return $query->fetchAll();\n } catch (\\PDOException $e) {\n $this->mydatabase->handleError($e, \"SELECT-EXECUTE\", $this->statement);\n }\n }\n \n return Array();\n }", "title": "" }, { "docid": "c6dcc4ef3a4b3f6b9d4bc36bd0f98479", "score": "0.66066694", "text": "public function queryFetchAll($statement) {\n try{\n return $this->connection->query($statement)->fetchAll();\n }catch(PDOException $e){\n echo 'Connection failed: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "71c9ce116d9153577c7ddd0e6964126f", "score": "0.6603336", "text": "function sql_fetch_array($res)\n {\n $results = array();\n if ($res)\n $results = $res->fetch(PDO::FETCH_BOTH);\n return $results;\n }", "title": "" }, { "docid": "198b6e1f109b179ff70642665fb4de05", "score": "0.65634125", "text": "public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}", "title": "" }, { "docid": "4341b217081b26db4402c2ffe8d2a0b5", "score": "0.65576065", "text": "public function resultaSet(){\n $this->execute();\n return $this->statemet->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f9da6c4325f24cb137f654699b7f1b31", "score": "0.6526335", "text": "public function executeGetRows($result) {\n try { \n if ($result->execute()) return $result->fetchAll(PDO::FETCH_ASSOC);\n else return 0;\n }\n catch (PDOException $e){ $this->reportDBError($e->getMessage().\"<hr>\".$e->getTraceAsString()); } \n }", "title": "" }, { "docid": "9e6bba29313587535f384f5471fdac65", "score": "0.65200204", "text": "public function GetAllRows() : ARRAY\r\n {\r\n return($this->preparedStatement->fetchAll(\\PDO::FETCH_ASSOC));\r\n }", "title": "" }, { "docid": "81c976e3d0bb3e3bcef305d976b2deec", "score": "0.65198904", "text": "function executeQuery($query, $attribute) {\n try {\n // connect to database\n $connString = \"mysql:host=localhost;dbname=knovak18\";\n $user = \"knovak18\";\n $pass = \"web2\";\n\n $pdo = new PDO($connString,$user,$pass);\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n // create query\n $result = $pdo->query($query);\n\n // put query results into array\n $array = array();\n while ($row = $result->fetch()) {\n\n // selects the row based on the pased attribute\n $array[] = $row[$attribute];\n }\n $pdo = null;\n\n // return the results\n return $array;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n return null;\n }\n}", "title": "" }, { "docid": "4246091a7bb0d9491171b88fa3e4e202", "score": "0.65188545", "text": "public function resultSet(){\r\n $this->execute();\r\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\r\n /*PDO::FETCH_OBJ\r\n assim podemos imprimir como objeto exemplo\r\n foreach($users as user){\r\n echo $user->name . '<br>';\r\n ao invés de echo $user['name];\r\n */\r\n }", "title": "" }, { "docid": "7ada18a517b8e253c09285e127cc07cd", "score": "0.65092254", "text": "function SelektoDatabasen(){\n global $db;\n $SqlStmt=$db->prepare(\"select * from p149pm_roombook\");\n try{ $SqlStmt->execute(); } catch (PDOException $e) { die(); }\n while($row = $SqlStmt->fetch(PDO::FETCH_ASSOC)) { $smartRs[] = $row; }\n if ($SqlStmt->rowCount() > 0) {return $smartRs; }\n\n}", "title": "" }, { "docid": "5b43bcb3515ab5e3889b92ec0ed5d092", "score": "0.64918774", "text": "public function fetch(){\n\n $rows = [];\n\n while($row = $this->result->fetch(PDO::FETCH_ASSOC)) {\n $rows[]=$row;\n }\n\n $this->result=null;\n\n return $rows;\n\n }", "title": "" }, { "docid": "6adc0c44ef0a0d13c0d9a031a663b77c", "score": "0.64849013", "text": "public function fetchAll() {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "251710885f90dab7f170c91eb45df5fc", "score": "0.6483409", "text": "public function getAll($sql, $params=[]){\n try \n {\n $stmt = $this->dbh->prepare($sql);\n $stmt->execute($params);\n return $stmt->fetchAll();\n \n } catch (PDOException $e) \n {\n throw new Exception($e->getMessage());\n }\n\n }", "title": "" }, { "docid": "1203b092ec21aa552f73371b7e76ebeb", "score": "0.6470214", "text": "public function queryFetchRowAssoc($statement) {\n return $this->connection->query($statement)->fetch(PDO::FETCH_ASSOC); \n }", "title": "" }, { "docid": "10f07deb8dfd72db27feec9cca26eec8", "score": "0.64676976", "text": "public function query_data($sql) {\n try {\n $result = $this->conn->query($sql);\n return $result->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n die(\"DB ERROR: \".$e->getMessage());\n }\n\n }", "title": "" }, { "docid": "cd1f315888f280c5d8aca54525bc798b", "score": "0.64592576", "text": "public function resultSet()\n {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "3466c27036ff53b2fb930076faf6392e", "score": "0.6455599", "text": "function getData($sqlStr){\n\t$conn= null;\n\t$stmt= null;\n\ttry {\n\t\t$conn = connectMySql();\n\t\t$stmt = $conn->prepare($sqlStr);\n\t\t$obj= new Object();\n\t\t// set the resulting array to associative\n\t\t$stmt->setFetchMode(PDO::FETCH_INTO, $obj);\n\t\t$stmt->execute();\n\t}\n\tcatch(PDOException $e) {\n\t\t// echo \"<script>console.log('[ERROR]\\t\" . $e->getMessage().\"')</script>\";\n\t}finally{\n\t\t$conn= null;\n\t\treturn $stmt;\n\t}\n}", "title": "" }, { "docid": "36c0b1216986b0f90f24a3087e56e651", "score": "0.64392406", "text": "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "title": "" }, { "docid": "6a8b76142fada74e0ad4309584fc27de", "score": "0.6433722", "text": "private function executeAndFetchStatement($select){\n $this->statement = $this->connection->prepare($select);\n $this->statement->execute();\n $result = $this->statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "title": "" }, { "docid": "284dcf1b4a4947853def60a5b0008c11", "score": "0.6432677", "text": "function queryDB($sql,$values,$mode=3){\n global $pdo;\n $stmt = $pdo->prepare($sql);\n foreach($values as $value){\n if(is_array($value)){\n $stmt->bindValue($value[0],$value[1]);}\n else{\n $stmt->bindValue($values[0],$values[1]);\n }\n }\n \n $stmt->execute();\n if($mode==1){\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n return $result;\n }\n elseif($mode==2){\n $result = $stmt->fetchall(PDO::FETCH_ASSOC);\n return $result;\n }\n }", "title": "" }, { "docid": "a50d59a99dd864e78aba84fc3c513a89", "score": "0.64288837", "text": "public function GetSingleRow() : ARRAY\r\n {\r\n return($this->preparedStatement->fetch(\\PDO::FETCH_ASSOC));\r\n }", "title": "" }, { "docid": "5a18c8ae9c03243e2efa6ec55592368a", "score": "0.6425805", "text": "private function execute_query($sql) {\n \n // execute the query\n $result = $this->db->Execute($sql);\n // initialise the data array\n $data = array();\n // convert the resultset into a Moodle style object\n if(!empty($result)) {\n while (!$result->EOF) {\n $obj = new stdClass;\n foreach (array_keys($result->fields) as $key) {\n $obj->{$key} = $result->fields[$key];\n }\n $index = reset($result->fields);\n $data[$index] = $obj;\n $result->MoveNext();\n }\n }\n\n // return an array of objects\n return $data;\n \n }", "title": "" }, { "docid": "1313879cacb4b7745e2b2f49cda6bb18", "score": "0.6421012", "text": "function GrabMoreData($query, $bind)\r\n{\r\n $pdo = connect();\r\n $sql= $query;\r\n $prepare = oci_parse($pdo,$sql);\r\n foreach ($bind as $attribute)\r\n {\r\n oci_bind_by_name($prepare, $attribute[0], $attribute[1]);\r\n/* echo $attribute[0].\" \".$attribute[1];*/\r\n }\r\n if(oci_execute($prepare))\r\n {\r\n $res = oci_fetch_array($prepare,OCI_ASSOC+OCI_RETURN_NULLS);\r\n if ($res != null)\r\n {\r\n return $res;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n $e = oci_error($prepare); \r\n echo $e['message']; \r\n } \r\n}", "title": "" }, { "docid": "68f399121a3aff025d6c1ed0a4ff9be6", "score": "0.64189154", "text": "public function fetch_all(){\n $data = array();\n while( ($obj = oci_fetch_object($this->result)) != false ){\n $data[] = $obj;\n }\n return $data;\n }", "title": "" }, { "docid": "b57ac6bcd584bfbb8707cfb718bcd4a4", "score": "0.6404428", "text": "function fetchAll($sql, $array, $objectName = null);", "title": "" }, { "docid": "2752ba5baa77b4e85dfa61c1c6048d20", "score": "0.6400295", "text": "public function findAll($sql, $array)\n {\n try {\n $sth = $this->pdo->prepare($sql);\n\n if (!$sth) {\n $err = $this->pdo->errorInfo();\n if (is_array($err)) {\n die(\"Execute query error, because: \" . $err[2]);\n } else {\n die(\"Execute query error, because: \" . $this->pdo->errorInfo());\n }\n\n } else {\n if ($sth->execute($array)) {\n\n return $sth->fetchAll();\n } else {\n\n echo \"Unable to read record:\" . print_r($sth->errorInfo(), true);\n exit;\n }\n }\n\n } catch (PDOException $e) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n\n }", "title": "" }, { "docid": "9329496f54b252c4e72a98eaf8fd47d5", "score": "0.63983774", "text": "function pdo_fetch_all(PDOStatement $pdo_statement, $fetch_style = PDO::FETCH_ASSOC)\n {\n return $pdo_statement->fetchAll($fetch_style);\n }", "title": "" }, { "docid": "0a2fecd0618f09a37990f449aadaa712", "score": "0.6389043", "text": "public function fetchAll($statement, array $params = array());", "title": "" }, { "docid": "4bbfea311dfaadd9f516e850bfd3dfb9", "score": "0.6387739", "text": "function query( string $tableName, PDO $db ){\n try{\n // Consulta a realizar\n $query = \"SELECT * FROM \".$tableName; \n // Preparamos la consulta\n $stmt = $db->prepare($query);\n // Ejecutamos\n $stmt->execute();\n //return $stmt->fetchAll( PDO::FETCH_OBJ);\n return $stmt->fetchAll( PDO::FETCH_ASSOC);\n\n }\n catch( Exception $exception ){\n echo \"<br>\";\n echo \"Error inesperado al consultar: \". $exception->getMessage();\n }\n}", "title": "" }, { "docid": "83277c59d45275db2d37cc426ae18a26", "score": "0.6384147", "text": "protected function executeQuery() {\n return array();\n }", "title": "" }, { "docid": "8ee698dd151029fa8a13f6e9d09b7161", "score": "0.63765407", "text": "function getMany($query, array $binds = [], $conn)\n{\n $statement = $conn->prepare($query);\n foreach($binds as $key => $value) {\n $statement->bindValue($key, $value);\n }\n $statement->execute();\n $results = $statement->fetchAll();\n $statement->closeCursor();\n return $results;\n}", "title": "" }, { "docid": "49b612d86b6712040c7440c8b5be1b14", "score": "0.6369402", "text": "public function executeSQL($stmt) {\n try {\n $stmt->execute();\n $rows = $stmt->fetchAll();\n } catch(PDOException $e) {\n die(\"Query failed: \" . $e->getMessage());\n }\n return $rows;\n }", "title": "" }, { "docid": "51f14ceb427a0778ce815a16c6935afb", "score": "0.63676625", "text": "public function getMultipleRecords() {\n $i = 0;\n $output = [];\n $_this = $this;\n while($row = $_this->fetchAssoc()){\n $output[\"data\"][$i] = $row;\n $i++;\n }\n return $output;\n }", "title": "" }, { "docid": "6ad44c77b4a0be147ca0abbe5b241894", "score": "0.6360501", "text": "function stmt($consulta){\n\t\t$resultado = '';\n\t\tif(!empty($consulta)){\n\t\t\t$resultado = New ArrayObject($consulta->fetchAll(PDO::FETCH_CLASS, 'stdClass'));\n\t\t}\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "bb309b2377e36571801211513a4f6982", "score": "0.6354167", "text": "public function read(string $statement, array $parameters = []): array\n {\n $pdoStatement = $this->execute($statement, $parameters);\n\n $records = $pdoStatement->fetchAll(PDO::FETCH_ASSOC);\n\n return $records;\n }", "title": "" }, { "docid": "4cd8869bd19a37c6221a37b3a47ecbb5", "score": "0.63202935", "text": "public function fetch_array()\n\t{\n\t\tif($this->num_rows() < 1)\n\t\t\treturn false;\n\n\t\t$data = $this->result_metadata();\n\t\t$fields = array();\n\t\t$out = array();\n\n\t\t$fields[0] = &$this;\n\t\t$count = 0;\n\n\t\twhile($field = $data->fetch_field()) {\n\t\t\t$fields[$count] = &$out[$field->name];\n\t\t\t$count++;\n\t\t}\n\n\t\tcall_user_func_array(array($this, 'bind_result'), $fields);\n\n\t\treturn ($this->fetch()) ? $out : false;\n }", "title": "" }, { "docid": "606b5c88e94bae55c6660a1d12b16c9b", "score": "0.6318891", "text": "public function get($sql, $array)\n {\n $stmt = $this->db->prepare($sql);\n $stmt->execute($array);\n return $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "5be26840335ac51e0f568f935664dbe3", "score": "0.6316957", "text": "public function result(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetch(PDO::FETCH_ASSOC) ;\n\t}", "title": "" }, { "docid": "aa0fc4fddb65db4b5e24abe76d533e0f", "score": "0.6315165", "text": "public function getAllReturnInfo() {\n $this->selStmt->execute(); // execute SQL statement\n return $this->selStmt->fetchAll(PDO::FETCH_ASSOC); // return fetched result\n }", "title": "" }, { "docid": "8f84c76c2f12f7ab3dfa7e3c588363ed", "score": "0.62968355", "text": "public function fetchAll($sql, $bind){\n $sth = $this->db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n /* example:\n $bind = array(':calories' => 150, ':colour' => 'red');\n */\n $sth->execute($bind);\n return $sth->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "4af70f53969f063c8379a5ffb786df1c", "score": "0.62807506", "text": "public function executeQuery($query) {\n\t\t$stmt = $this->PDO_Connection->prepare($query); \n\t\t$stmt->execute();\n\t\t\n\t\t$result = $stmt->fetchAll();\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "48b258cb030b2f3f26169dc4c1526330", "score": "0.6273438", "text": "function fetchList($db_statement) {\n\t\t$result = array();\n\n\t\tmysqli_stmt_execute($db_statement);\n\n\t\t$db_result = mysqli_stmt_get_result($db_statement);\n\n\t\t/* bind result variables */\n\t\t// mysqli_stmt_bind_result($db_statement, $id, $title, $acceptanceCriteria, $dueDate, $status, $priority);\n\n\t\t/* fetch values */\n\t\twhile ($row = mysqli_fetch_array($db_result, MYSQLI_ASSOC)) {\n\t\t\t$result[] = (object)$row;\n\t\t}\n\n\t\tmysqli_stmt_close($db_statement);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "38b93fba0b44308169ee94bcb1d1f51c", "score": "0.62670684", "text": "public static function execute()\n {\n //bind params\n foreach ( self::$_BINDS as $k => $_b ):\n $type = \\PDO::PARAM_STR;\n if ( $_b['type'] ):\n $type = self::getDataType( $_b['type'] );\n endif;\n\n $length = NULL;\n if ( $_b['size'] ):\n $length = (int) $_b['size'];\n endif;\n $k++;\n self::$stmt->bindParam( $k, $_b['value'], $type, $length );\n endforeach;\n self::$_BINDS = array(); //reset\n return self::$stmt->execute();\n }", "title": "" }, { "docid": "ab731f1a3daf911a8de27a29a6999f81", "score": "0.62667143", "text": "public function resultSet(){\n $this->executeQuery($this->statement);\n return $this->fetchAll($this->statement);\n }", "title": "" }, { "docid": "26f814668d419cbf8a80735db5565b3d", "score": "0.6265237", "text": "public static function fromExecutedStatement(PDOStatement $stmt) {\n\t\t$resultInstances=array();\n\t\twhile($result=$stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$o=new Tchat();\n\t\t\t$o->assignByHash($result);\n\t\t\t$o->notifyPristine();\n\t\t\t$resultInstances[]=$o;\n\t\t}\n\t\t$stmt->closeCursor();\n\t\treturn $resultInstances;\n\t}", "title": "" }, { "docid": "590e9e6242e9eb954880869149fa9c3c", "score": "0.6261601", "text": "public function readRecord(string $statement, array $parameters = []): array\n {\n $pdoStatement = $this->execute($statement, $parameters);\n\n $record = $pdoStatement->fetch(PDO::FETCH_ASSOC);\n\n if (! $record) {\n return [];\n }\n\n return $record;\n }", "title": "" }, { "docid": "2bb5797e0630b6454a2eb79fc5431be1", "score": "0.6258558", "text": "public function getSqlResults() \n\t{\n\t\t$array = $this->getSqlStatments();\n\t\tfor ($i=0; $i < count($array); $i++) {\n\t\t\t$q = $this->connection->prepare($array[$i]);\n\t\t\t$q->execute();\n\t\t\t$r = $q->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$this->sql_query_results[] = $r;\n\t\t}\n\t\treturn $this->sql_query_results;\n\t}", "title": "" }, { "docid": "e3e5be9da0fd30a0ab21accd97ecebf6", "score": "0.6253847", "text": "public function consultarDatos($consultaSQL){\n $conexionBD=$this->conectarBD();\n\n //2.Preparar la consulta que se va a realizar\n $consultaBuscarDatos= $conexionBD->prepare($consultaSQL);\n\n //3. Definir la forma en la que vmos a traer los datos\n // setFetchMode\n $consultaBuscarDatos->setFetchMode(PDO::FETCH_ASSOC);\n\n //4.Ejecutar la consulta\n $consultaBuscarDatos->execute();\n\n //5. Retornar los datos consultados\n return($consultaBuscarDatos->fetchAll());\n\n\n\n}", "title": "" }, { "docid": "dca8a08383a23ff46a6d5cf85a10b86b", "score": "0.62517744", "text": "function fetchAll()\n {\n //select all data\n $query = \"SELECT\n id, tag\n FROM\n \" . $this->table_name . \"\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\n\n return $result;\n }", "title": "" }, { "docid": "f27265cae6df0de7f4780f752fc48379", "score": "0.6249307", "text": "public function query($sqlstr,$paramarray){\n \n $st = $this->exec($sqlstr, $paramarray);\n \n return $st->fetchAll();\n }", "title": "" }, { "docid": "bc40fc4fc0cc2bc3836e175155495751", "score": "0.6234204", "text": "public function readAllStatement(PDOStatement $statement): array|false\n {\n $products = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $id = $row['id'];\n $name = $row['name'];\n $quantity = $row['quantity'];\n $price = $row['price'];\n $msrp = $row['msrp'];\n $product = new Product($name, $quantity, $price, $msrp, $id);\n $products[] = $product;\n }\n return $products;\n }", "title": "" }, { "docid": "eb9c1600d5898d5642462698ebc5897f", "score": "0.622698", "text": "function query($stmt,$values) {\n\t\ttry {\n\t\t $qStmt = $this->dbconn->prepare($stmt);\n\t\t\t$qStmt->execute($values);\n\t\t\treturn $qStmt->fetchAll();\n\t\t} catch(PDOException $e) {\n\t\t\treturn $e;\n\t\t}\n\t}", "title": "" }, { "docid": "9bab48441878cc40968064fccf96c24c", "score": "0.6218294", "text": "public function resultset($bind_array=array());", "title": "" }, { "docid": "f95149cf462ba5054ebc5e389d90567c", "score": "0.62141037", "text": "public function select($sql, $array = array(), $fetchMode = PDO::FETCH_OBJ) {\r\n\r\n $sth = $this->prepare($sql);\r\n\r\n foreach ($array as $key => $value):\r\n $sth->bindValue(\"$key\", $value);\r\n endforeach;\r\n\r\n $sth->execute();\r\n\r\n return $sth->fetchAll($fetchMode);\r\n }", "title": "" }, { "docid": "5b693d1cf7b49e24b266b9fcf34ab08a", "score": "0.6212792", "text": "public function get_records(){\n\t\t$records = array();\n\t\t$this->do_db();\n\t\t$tmps\t = $this->last_result;\n\t\t$db\t\t = $this->db;\n\t\twhile($record\t = $db->fetch_array($tmps)){\n\t\t\t$records[] = $record;\n\t\t}\n\t\treturn $records;\n\t}", "title": "" }, { "docid": "ac1ff761bc6a20f43823c8afbfc07535", "score": "0.62070346", "text": "function db_result_to_array($result) {\n $res_array = array();\n\n for ($count=0; $row = $result->fetch_assoc(); $count++) {\n $res_array[$count] = $row;\n }\n\n return $res_array;\n}", "title": "" }, { "docid": "c2e562788d6d3e862579286a226e6766", "score": "0.6203284", "text": "public function select($query){\n $result =$this->con->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "a3c07ed9c8e351e3c42fb35e31ee3cb5", "score": "0.6200936", "text": "public function resultArray($recordset)\n {\n \n// $result = array();\n// while ($row = mysql_fetch_assoc($recordset))\n// {\n// $result[] = $row; // Inside while loop\n// }\n// return $result;\n $result = $this->sqlAssoc;\n return $result;\n }", "title": "" }, { "docid": "69adaca16aa8329796deecdf3f5bda03", "score": "0.6199488", "text": "function select($q)\n {\n return $this->dbh->query($q, PDO::FETCH_ASSOC)->fetchAll();\n }", "title": "" }, { "docid": "02363d39ae54658a80fe5e5142c9f5e1", "score": "0.6197486", "text": "public function asRow() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_NUM);\n\t}", "title": "" }, { "docid": "4496a2070108f0caa72021fa8e23872b", "score": "0.61939657", "text": "private function fetch_data($stmt) {\n\t\n\t\t$result = array();\n\t\n\t\tif ($stmt) {\n\t\n\t\t\t$metadata = $stmt->result_metadata();\n\t\t\t$fields = $metadata->fetch_fields();\n\t\n\t\t\tfor (;;) {\n\t\t\t\t$pointers = array();\n\t\t\t\t$row = new stdClass();\n\t\t\t\t$pointers[] = $stmt;\n\t\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$fieldname = $field->name;\n\t\t\t\t\t$pointers[] = &$row->$fieldname;\n\t\t\t\t}\n\t\n\t\t\t\tcall_user_func_array('mysqli_stmt_bind_result', $pointers);\n\t\n\t\t\t\tif ( !$stmt->fetch() ) { \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$result[] = $row;\n\t\t\t}\n\t\n\t\t\t$metadata->free();\n\t\t\t\n\t\t} else {\n\t\t\t$this->except( MYSQLI_ERR_FETCH_FAIL );\n\t\t}\n\t\n\t\treturn $result;\n\t\n\t}", "title": "" }, { "docid": "10b2d1b8a1ef0887be0119ccd269ae2a", "score": "0.61875236", "text": "public function fetchPairs(): array {\n\n if($this->database === null) {\n throw new \\Exception('Database connection has not been set.');\n }\n\n $this->queryProperty->setFetchType($this->queryProperty::FETCH_PAIRS);\n\n $cachedResult = $this->checkQueriesCache($this->queryProperty);\n if ($cachedResult !== null) {\n $this->cacheAndResetQueryProperties();\n return $cachedResult;\n }\n\n $task = $this->createTask();\n $result = $task->fetchAll(\\PDO::FETCH_ASSOC | \\PDO::FETCH_UNIQUE);\n $this->cacheAndResetQueryProperties($result);\n return $result;\n }", "title": "" }, { "docid": "6479fd9969a14e7a79c87f074981a1a9", "score": "0.61862737", "text": "public static function fromExecutedStatement(PDOStatement $stmt) {\n\t\t$resultInstances=array();\n\t\twhile($result=$stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$o=new Factuurmaand();\n\t\t\t$o->assignByHash($result);\n\t\t\t$o->notifyPristine();\n\t\t\t$resultInstances[]=$o;\n\t\t}\n\t\t$stmt->closeCursor();\n\t\treturn $resultInstances;\n\t}", "title": "" }, { "docid": "b00f1d2b39a067ad8cb7ef3dd9b3740f", "score": "0.6180756", "text": "public function select($rawQuery, $params = array()):array // este método returna um array\n\t{\n\t\t\t// aqui chamamos a função query para executar está tarefa porque ele é uma função criado com este Obj\n\t\t$stmt = $this->query($rawQuery, $params);\n\n\t\treturn $stmt->fetchAll(PDO::FETCH_ASSOC); /* executar tudo e mostrar dados associativos com PDO::FETCH_ASSOC, dados associativos */\n\t}", "title": "" }, { "docid": "b447646fd07e66e984162c32ec3ada62", "score": "0.6175746", "text": "public static function getAllRecord($query, $params = array()) { \n\n $statement = self::connect()->prepare($query);\n\n foreach($params as $key => $val)\n {\n $statement->bindValue(\":\".$key, $val);\n // print_r($key. \" \".$val);\n }\n\n $statement->execute($params);\n\n $data = $statement->fetchAll();\n return $data;\n \n }", "title": "" }, { "docid": "05e25271349defebda7c1688f128ff1d", "score": "0.6170807", "text": "function DBGetQuery($result) {\n\n\t$arr = array();\n\n\tif (odbc_fetch_row($result)) {\n\t\tfor ($i = 1; $i <= odbc_num_fields($result); $i++) {\n\t\t\t$value = odbc_result($result, $i);\n\t\t\tarray_push($arr, $value);\n\t\t}\n\t}\n\treturn $arr;\n\n}", "title": "" }, { "docid": "6cc4419ac70bc88c0d3085e34a07d855", "score": "0.61706316", "text": "public function fetch_all_array(){\n $data = array();\n while( ($r = oci_fetch_assoc($this->result)) != false ){\n $data[] = $r;\n }\n return $data;\n }", "title": "" }, { "docid": "340b5d0882cb107bcdae8a4fbd549574", "score": "0.6170151", "text": "public function select($statement, $named_placeholder){\n $statement = $this->dbh->prepare($statement);\n\n $statement->execute($named_placeholder);\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n return $result;\n var_dump($result);\n\n }", "title": "" }, { "docid": "b9bd6e705cb3fd8b73945d7a2ff48701", "score": "0.61699104", "text": "function sql_fetch_row($res)\n {\n $results = array();\n if ($res)\n $results = $res->fetch(PDO::FETCH_NUM); \n return $results;\n }", "title": "" }, { "docid": "f7031a3a3022f8b4c700916354d0ea1c", "score": "0.6167895", "text": "public function getResultSet($stmt)\n\t{\n\t\tif($stmt instanceof PDOStatement) {\n\t\t\t$results = array();\n\t\t\t$resultsIdentities = array();\n\t\t\t\n\t\t\t// Set object to fetch results into\n\t\t\t$stmt->setFetchMode(PDO::FETCH_CLASS, $this->rowClass, array());\n\t\t\t\n\t\t\t// Fetch all results into new DataMapper_Result class\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_CLASS)) {\n\t\t\t\t\n\t\t\t\t// Load relations for this row\n\t\t\t\t$relations = $this->getRelationsFor($row);\n\t\t\t\tif($relations && is_array($relations) && count($relations) > 0) {\n\t\t\t\t\tforeach($relations as $relationCol => $relationObj) {\n\t\t\t\t\t\t$row->$relationCol = $relationObj;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Store in array for ResultSet\n\t\t\t\t$results[] = $row;\n\t\t\t\t\n\t\t\t\t// Store primary key of each unique record in set\n\t\t\t\t$pk = $this->getPrimaryKey($row);\n\t\t\t\tif(!in_array($pk, $resultsIdentities) && !empty($pk)) {\n\t\t\t\t\t$resultsIdentities[] = $pk;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Mark row as loaded\n\t\t\t\t$row->loaded(true);\n\t\t\t}\n\t\t\t// Ensure set is closed\n\t\t\t$stmt->closeCursor();\n\t\t\t\n\t\t\treturn new $this->resultSetClass($results, $resultsIdentities);\n\t\t\t\n\t\t} else {\n\t\t\treturn array();\n\t\t\t//throw new $this->exceptionClass(__METHOD__ . \" expected PDOStatement object\");\n\t\t}\n\t}", "title": "" }, { "docid": "e5786986d11148615d256066ad321805", "score": "0.61612666", "text": "protected function dbFetchAll() {\r\n\r\n //@@TODO RESOURCE CHECK IS_A ?\r\n\r\n $return_array = array();\r\n\r\n while ($row = $this->query_result->fetch_array(MYSQLI_ASSOC)) {\r\n $return_array[] = $this->dbOutArray($row);\r\n }\r\n return $return_array;\r\n }", "title": "" }, { "docid": "de1da5e8bfdee23f86765b8211226e85", "score": "0.6159527", "text": "function db_find($db, $statement) {\n $result = mysqli_query($db, $statement);\n $array = array();\n while ($data = mysqli_fetch_assoc($result)) {\n $array[] = $data;\n }\n mysqli_free_result($result);\n return $array;\n}", "title": "" }, { "docid": "d7b064374354ea8c480e50e6c755e072", "score": "0.6152586", "text": "public function dbarray($result) {\n \t$row = $result->fetch_assoc();\n \treturn $row;\n }", "title": "" }, { "docid": "c918af4c1ff92554e5f63e533415ea61", "score": "0.6148539", "text": "public function fetchRow() : array\n\t{\n\t\treturn $this->handle->fetchRow($this->result);\n\t}", "title": "" }, { "docid": "647a4cc455c7bb4df58219aa86267d9b", "score": "0.61438954", "text": "public function fetchAllObjects($statement, array $params = array(), $class = 'stdClass', $args = array());", "title": "" }, { "docid": "af8cf9eb6c682b5c88b3aa4f99d5bcc0", "score": "0.6139134", "text": "public function fetchAll(&$statement)\n {\n return $this->db_handler->fetchAllRows($statement);\n }", "title": "" }, { "docid": "82223b751fdf8d8f6b82ee1cf9ec197f", "score": "0.6133869", "text": "function execute($sth){\n\t\t\n\t\t$exito = $sth->execute();\n\t\t\t\n\t\t$msg='';\n\t\tif ($exito!==true){\n\t\t\t$error=$sth->errorInfo();\t\t\t\n\t\t\t$success=false;\n\t\t\t$msg=$error[2];\t\t\t\t\n\t\t\tif ($msg=='MySQL server has gone away'){\n\t\t\t\t$db=Database::getInstance();\n\t\t\t\t$db->reconectar();\n\t\t\t\treturn $this->execute($sth);\n\t\t\t}\n\t\t\t$datos=array();\n\t\t}else{\n\t\t\t$datos = $sth->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t$success=true;\n\t\t}\n\t\t\n\t\treturn array(\n\t\t\t'success'\t=>$success,\t\t\t\n\t\t\t'datos' \t=>$datos,\n\t\t\t'msg'\t\t=>$msg\n\t\t);\t\t\t\n\t}", "title": "" }, { "docid": "97ffe3d6049e668ce1c1d173f2046098", "score": "0.61332947", "text": "public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }", "title": "" }, { "docid": "adb3e615488d4a94afd5964fa56bac75", "score": "0.61328745", "text": "public static function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM pd_time_series';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute();\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $thePdSeries = new PdSeries($row);\n array_push($arr, $thePdSeries);\n }\n\n return $arr;\n }", "title": "" }, { "docid": "c1b13c608a709fed56d0272b1f2ba355", "score": "0.6131509", "text": "public function getAll() {\n $prepareStatement = $this->pdo->prepare($this->sql);\n $prepareStatement->execute($this->param);\n\n # close connection\n Connection::disconnect();\n\n return $prepareStatement->fetchAll($this->fetch);\n }", "title": "" }, { "docid": "ae2466cb25f3ecd19c985ebaf9768373", "score": "0.61268234", "text": "public function fetchRowset()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "61ffc99c204e390a70de7547d70e0c25", "score": "0.6123535", "text": "function get_all()\n {\n\n $query = \"SELECT * FROM \".$this->table_name;\n //prepare query\n $stmt = $this->conn->prepare($query);\n\n\n try{\n if( $stmt->execute())\n return $stmt;\n\n } catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return false;\n\n }", "title": "" }, { "docid": "720add45461c443760134786a510772f", "score": "0.61168915", "text": "function recuperer_bsm_entier(){\n global $db;\n $sql = \"SELECT * FROM bsm \";\n $req = $db->prepare($sql);\n $req-> execute();\n $results = array();\n while($rows = $req->fetchObject()){\n $results[] = $rows;\n }\n return $results;\n}", "title": "" }, { "docid": "1653a8ce5308bb70a486ce0bb561273d", "score": "0.61163676", "text": "public function fetchAssoc($statement, array $params = array());", "title": "" }, { "docid": "7a531907bf7b3d79ad2d11951834869b", "score": "0.61157274", "text": "function sthFetchObjects($sth) {\r\n\t$out = array();\r\n\twhile($o = $sth->fetchObject()) {\r\n\t\t$out[] = $o;\r\n\t}\r\n\treturn $out;\r\n}", "title": "" }, { "docid": "91d753ad3da4bc6054de8a13751387eb", "score": "0.61131287", "text": "function sql_fetch_assoc($res)\n {\n $results = array();\n if ($res)\n $results = $res->fetch(PDO::FETCH_ASSOC); \n return $results;\n }", "title": "" }, { "docid": "1c871b527506a3228a5ae6a1b32d17af", "score": "0.6103085", "text": "public function fetchQuery(){\n $bag=array();\n while($row=$this->select->fetch_assoc()){\n array_push($bag,$row);\n // or $bag[]=$row\n }\n return $bag;\n }", "title": "" }, { "docid": "501150c45f1a5f09dac6fd0a9e88b91e", "score": "0.6096585", "text": "public function select($sql, $data = array(), $fetchMode = PDO::FETCH_OBJ) {\n $sth = $this->prepare($sql);\n if(is_array($data)) {\n foreach($data as $key => $value) {\n $sth->bindValue(\":$key\", $value);\n }\n }\n $sth->execute();\n\n return $sth->fetchAll($fetchMode);\n }", "title": "" } ]
68d7860cc0651ef8b1e4745c0d2344f4
Sets the download version extractor callable.
[ { "docid": "3c1d26923f8439e7ed160e58e6d8c9a0", "score": "0.4909212", "text": "public function setExtractor($extract = null)\n {\n if ((null !== $extract) && (false === is_callable($extract))) {\n throw new InvalidArgumentException('The extractor is not callable.');\n }\n\n $this->extract = $extract;\n }", "title": "" } ]
[ { "docid": "1f520ff35d1c878fbd76ce06d09d0e7d", "score": "0.53043157", "text": "function fdf_set_version($fdfdoc, $version) {}", "title": "" }, { "docid": "0bf24e7f16bf0ba00cb0b757f4b20296", "score": "0.52579963", "text": "protected function assignVersion()\n {\n\n }", "title": "" }, { "docid": "0bf24e7f16bf0ba00cb0b757f4b20296", "score": "0.52579963", "text": "protected function assignVersion()\n {\n\n }", "title": "" }, { "docid": "960a6a6a5f28e4c130d1e9bcfe782675", "score": "0.5166818", "text": "public function testDetermineRemoteFileNameFromVersion()\n {\n $container = new Container();\n $container->setParameter('tenside.self_update.base_url', 'base-url');\n $container->setParameter('tenside.self_update.phar_name', 'tenside.phar');\n\n $command = new SelfUpdateCommand();\n $command->setContainer($container);\n\n $reflection = new \\ReflectionMethod($command, 'determineRemoteFilename');\n $reflection->setAccessible(true);\n $this->assertEquals('https://base-url/download/1.0.0/tenside.phar', $reflection->invoke($command, '1.0.0'));\n }", "title": "" }, { "docid": "2ab95b626dc48136986714c68d86f14e", "score": "0.5033339", "text": "public function setTargetVersion($val)\n {\n $this->_propDict[\"targetVersion\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "5ccb20eafb97c552a6c43264ab6e4fc4", "score": "0.49777618", "text": "function download($version)\n {\n // Load dependencies\n //------------------\n\n $this->lang->load($this->app_basename);\n $this->load->library($this->version_driver);\n\n // Load view data\n //---------------\n\n try {\n $this->webapp_version_driver->download($version);\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n\n // Reload\n //-------\n\n $this->page->set_message(lang('webapp_version_download_success'), 'info');\n\n redirect('/' . $this->app_basename . '/version');\n }", "title": "" }, { "docid": "00289ce567ff214511acfaaa7efff424", "score": "0.49067274", "text": "public function setDownloadFilename($filename)\n {\n\n $this->downloadFilename = $filename;\n\n }", "title": "" }, { "docid": "71fadd4e2500426e11e660f288597914", "score": "0.48793033", "text": "function url_ver(string $filename)\n {\n return url($filename).'?v='.env('APP_VERSION');\n }", "title": "" }, { "docid": "59aa3658a00a06edd350720d305e7250", "score": "0.4877717", "text": "function get_select_version_url( $version ) {\n\treturn admin_url( 'index.php' ) . \"?version-control=$version\";\n}", "title": "" }, { "docid": "c240e445ba64248222eaf04f7b666575", "score": "0.48642552", "text": "protected function assignVersion()\n {\n $this->version = '1.0.0';\n }", "title": "" }, { "docid": "872161be5cf0829a97eb6568e678fc3e", "score": "0.48417348", "text": "public function onPreFileDownload(PreFileDownloadEvent $event): void\n {\n $packageUrl = $event->getProcessedUrl();\n\n if (!$this->downloadMatcher->matches($packageUrl)) {\n return;\n }\n $downloadInterceptor = $this->downloadInterceptorFactory->build(\n PluginInterface::PLUGIN_API_VERSION,\n $this->composer,\n $this->io\n );\n $downloadInterceptor->intercept(\n $event,\n $this->urlLicenseKeyAppender->append($packageUrl, $this->getLicenseKey())\n );\n }", "title": "" }, { "docid": "a7609044675b7c5c239e1f8eda4b0175", "score": "0.4829762", "text": "function onInit() {\n// this needs to be set in the init section\n\t\t$this->setVersion('0.5.0');\n\t\t$this->setPublicMethod('getVersion');\n\t}", "title": "" }, { "docid": "3c4ca5b31983f64b5efa1586e5358e3b", "score": "0.48187634", "text": "function curl_version() {}", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.47892305", "text": "public function setVersion($version);", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.47892305", "text": "public function setVersion($version);", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.47892305", "text": "public function setVersion($version);", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.47892305", "text": "public function setVersion($version);", "title": "" }, { "docid": "2e00d6dd0a18b602a4f07fa1bdb14d70", "score": "0.47073987", "text": "public function setVersion($version) {\n if ($version) {\n $this->version = floor($version);\n }\n }", "title": "" }, { "docid": "8ddbb15b7ef05ab84118cc12f164d160", "score": "0.4698238", "text": "public function __construct($version = null)\n {\n if ($version !== null) {\n call_user_func_array([$this, 'version'], func_get_args());\n }\n }", "title": "" }, { "docid": "87573dc7a1c391c3d892f3d60d33fcad", "score": "0.46868727", "text": "function autoVer($url){\r\n\t $path = pathinfo($url);\r\n\t $ver = '?ver='.filemtime($_SERVER['DOCUMENT_ROOT'].$url);\r\n\t //echo $path['dirname'].'/'.str_replace('.', $ver, $path['basename']);\r\n\t echo $path['dirname'].'/'.$path['basename'].$ver;\r\n\t \r\n\t}", "title": "" }, { "docid": "3bceaff5f545e933c5c2fbabf687ffb7", "score": "0.46806422", "text": "public function set_version ($version) {\n $this->version = $version;\n }", "title": "" }, { "docid": "77a1e95736ba1311615662027f84266c", "score": "0.46797717", "text": "function autoVer($url)\n {\n $path = pathinfo($url);\n $ver = '.' . filemtime($url) . '.';\n echo $path['dirname'] . '/' . str_replace('.', $ver, $path['basename']);\n }", "title": "" }, { "docid": "b4b7735f728c9ec85377d25d533df280", "score": "0.46622553", "text": "public function setVersion($val)\n {\n $this->_propDict[\"version\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0eaa5ad4afab4bb81d6826b3d9882bc6", "score": "0.46304458", "text": "public function setVersion(string $version = null)\n {\n $this->version = $version ?? \\filemtime($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "79d977b675a0392efe622a62f61eb486", "score": "0.46256083", "text": "public function setVersion($version)\n {\n if (array_key_exists($version, OpenID::$versionMap)) {\n $this->version = $version;\n }\n }", "title": "" }, { "docid": "1fbf79f263cd31dadf42f43bdaf81c2c", "score": "0.4604505", "text": "public function setVersion($val)\n {\n $this->_propDict[\"version\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "1fbf79f263cd31dadf42f43bdaf81c2c", "score": "0.4604505", "text": "public function setVersion($val)\n {\n $this->_propDict[\"version\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "bac86fdc24b6175ce5654a1726ae2bad", "score": "0.4596011", "text": "function setValue($version = 0.0) {\r\n $this->version = $version;\r\n $major = floor($version);\r\n $minor = ($version - $major)*100;\r\n parent::setValue(sprintf('%02.0f%02.0f', $major, $minor));\r\n }", "title": "" }, { "docid": "770823da1c208284cfef2e8092593993", "score": "0.45918253", "text": "public static function set_version($version) {\n self::update_options(array('version' => $version));\n }", "title": "" }, { "docid": "a00de7dfc3d59d82d015faeb9543fc85", "score": "0.458965", "text": "public function setOnChangeAction(callable $callback) : self\n {\n $this->status[\"on_file_change_action\"] = $callback;\n return $this;\n }", "title": "" }, { "docid": "539aa3ce84ca9f4acc8856fc9aa5d5fe", "score": "0.45587337", "text": "public function setCustomOptionDownloadUrl($url)\n {\n $this->_customOptionDownloadUrl = $url;\n return $this;\n }", "title": "" }, { "docid": "0435ee28cd9a03900ee6431314a2be35", "score": "0.45546535", "text": "protected function setVersion()\n\t{\n\t\tglobal $gfpd_version;\n\t\t$this->version = $gfpd_version;\n\t}", "title": "" }, { "docid": "d6908b88e0047a8c9a44b9a6f417daff", "score": "0.4545101", "text": "public function getDownloads()\n {\n if (null === $this->downloads) {\n if (null === $this->extract) {\n throw new LogicException('No version extractor set.');\n }\n\n if (null === $this->match) {\n throw new LogicException('No download matcher set.');\n }\n\n $this->downloads = array();\n\n foreach ($this->makeRequest('downloads') as $download) {\n if (true === call_user_func($this->match, $download)) {\n $download['version'] = new Version(\n call_user_func($this->extract, $download)\n );\n\n $this->downloads[] = $download;\n }\n }\n }\n\n return $this->downloads;\n }", "title": "" }, { "docid": "f9ec42e099913439cd8f0b190bbf385f", "score": "0.45303702", "text": "public function setMothod(){\n\n $this->method = !empty($this->url[3]) ? $this->url[3] : 'exec';\n\n }", "title": "" }, { "docid": "88db9aac9032b990fac92d2a457d50ab", "score": "0.45181942", "text": "public function setTestVersion(string $version): void;", "title": "" }, { "docid": "93f5c9594600c49083290564764bc6da", "score": "0.45171425", "text": "function _makeVersion() {\n $this->version = '2.0';\n }", "title": "" }, { "docid": "2cfcf235a1bc195f0c254c4e45a74a53", "score": "0.4512385", "text": "abstract protected function getLatestVersion();", "title": "" }, { "docid": "03b5793b3b981d4fa7f70aa121d22610", "score": "0.45121077", "text": "public abstract function getVersion();", "title": "" }, { "docid": "455797a298752073e8b9b3362ce576e3", "score": "0.45090324", "text": "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "title": "" }, { "docid": "98b5990341ac9359a63e427e0e4b2771", "score": "0.4477825", "text": "function wpwire_init_download_action() {\r\n // Hooking into init and \"hijack\" the\r\n // request given a query string\r\n if (isset($_GET['___wpwire_download']) && is_admin()) {\r\n wpwire_download_export();\r\n }\r\n}", "title": "" }, { "docid": "0c89bb879f9a77391eae89073612b963", "score": "0.44474217", "text": "abstract protected function getVersion();", "title": "" }, { "docid": "38caba15b54e7ede0cdfa16af82071e4", "score": "0.44370252", "text": "public abstract static function getVersion();", "title": "" }, { "docid": "7d385394f04fb0e6e6fb74c33d1f7d81", "score": "0.4430082", "text": "public function setEngineVersion(?string $value): void {\n $this->getBackingStore()->set('engineVersion', $value);\n }", "title": "" }, { "docid": "2256657d379c12c20517e79e55088e5a", "score": "0.44236767", "text": "public function set_version() {\n if( !get_option( 'kdmfi_version') ) {\n } \n\n update_option( 'kdmfi_version', KdMfi::$version ); \n }", "title": "" }, { "docid": "5b97cc7f2dc367d64dff9195d07b5d12", "score": "0.44207394", "text": "public function setVersion(string $version): void\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "280bf9eb293a133ac24d6791b3f9f175", "score": "0.44171816", "text": "public function setVersion(string $version, $date = null)\n {\n $this->version = $version;\n $this->date = $date;\n }", "title": "" }, { "docid": "70628153a9220a9e78eda3d1797c3570", "score": "0.44085938", "text": "public function setPolicyVersion(?string $value): void {\n $this->getBackingStore()->set('policyVersion', $value);\n }", "title": "" }, { "docid": "7dd0a5edc34ccaf154203c37dfebefda", "score": "0.4399028", "text": "public function setVersion($version)\n {\n $this->_version = $version;\n }", "title": "" }, { "docid": "f4ab9c6e95528ff5f26ee43d5e67b013", "score": "0.43956184", "text": "public function setOsVersion($val)\n {\n $this->_propDict[\"osVersion\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d6b7c162cc5bccd836718f1e31102ba2", "score": "0.43863815", "text": "public function setVersion($version)\n\t{\n\t\t$this->version = $version;\n\t}", "title": "" }, { "docid": "3670f18a31853e17dc3d61842fb33161", "score": "0.43856093", "text": "public function __construct($version)\n {\n $this->plugin_name = 'wordpress-store-locator';\n $this->version = $version;\n\n $this->load_dependencies();\n $this->set_locale();\n $this->define_admin_hooks();\n $this->define_public_hooks();\n }", "title": "" }, { "docid": "a81e666d37bf5a77a2ebd8586528e496", "score": "0.4368818", "text": "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "title": "" }, { "docid": "a81e666d37bf5a77a2ebd8586528e496", "score": "0.4368818", "text": "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "title": "" }, { "docid": "a81e666d37bf5a77a2ebd8586528e496", "score": "0.4368818", "text": "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "title": "" }, { "docid": "a81e666d37bf5a77a2ebd8586528e496", "score": "0.4368818", "text": "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "title": "" }, { "docid": "a81e666d37bf5a77a2ebd8586528e496", "score": "0.4368818", "text": "public function setOsVersion(?string $value): void {\n $this->getBackingStore()->set('osVersion', $value);\n }", "title": "" }, { "docid": "60de2e244357be904d8189584172c041", "score": "0.4364377", "text": "public function __construct() {\n\n\t\t\t// Rebuild version number string.\n\t\t\tglobal $wpdb;\n\t\t\t$row = $wpdb->get_row( 'SELECT * FROM ' . $wpdb->prefix . 'gamedev_jre_user_options' );\n\t\t\t$split_string = explode( '', $row->extensionversions );\n\t\t\t$first_part = $split_string[0];\n\t\t\t$last_part = substr( $split_string[1], 5 );\n\t\t\t$this->new_string = $first_part . '' . _VERSION_NUM . $last_part;\n\n\t\t\t// Now call the function that will update the version number, which will ensure none of these function ever run again until the next update/upgrade.\n\t\t\t$this->_update_version_number_function();\n\n\t\t}", "title": "" }, { "docid": "f051e9337a506ee8d78b68cb18e20d26", "score": "0.43553963", "text": "public function setMethod($val=\"\")\n {\n $this->method= $val;\n }", "title": "" }, { "docid": "b60edacf91eab3de917d146b19d38d18", "score": "0.4353551", "text": "public function setVersion( $version )\n {\n $this->setAttribute('version', $version);\n }", "title": "" }, { "docid": "1db16e145eaa59f3b808408d655c2d9e", "score": "0.43498498", "text": "abstract public function getVersion();", "title": "" }, { "docid": "66dc95257e55e34d266fddae535eecb4", "score": "0.4347578", "text": "public function changer_version($p_url,$p_version)\n\t\t{\n\t\t\t$p_url = str_replace('version='.$this->c_version,'version='.$p_version,$p_url,$nbr_remplacement);\n\t\t\tif($nbr_remplacement == 0)\n\t\t\t{\n\t\t\t\treturn $p_url.'&version='.$p_version;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $p_url;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "67a89c2c3416f8d70caf89000494795f", "score": "0.4347263", "text": "public function downloadArchive( $callback ) {\n $this->update->download( 'master' );\n $callback();\n }", "title": "" }, { "docid": "a7d77b9bf391bcfe2e3cf5a27e7bd3b0", "score": "0.43312117", "text": "function setExportFunction($obj_func)\r\n\t{\r\n\t\t$this->exportFunction = $obj_func;\r\n\t}", "title": "" }, { "docid": "b86a7ac1cd6a82b2fc014b5b0a587ec7", "score": "0.43311167", "text": "public function setVersion($version)\n {\n $this->getConfig()->set('version', $version);\n\n /* Set the Service Definition from the versioned file */\n $file = 'keen-io-' . str_replace('.', '_', $this->getConfig('version')) . '.php';\n $this->setDescription(ServiceDescription::factory(__DIR__ . \"/Resources/{$file}\"));\n }", "title": "" }, { "docid": "db5e6cdeda2aa8f653d7028e267a8419", "score": "0.43296954", "text": "public function setVersion($value)\n\t{\n\t\t$this->version = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4d4e321dcb936283b86ffb89c531c454", "score": "0.43275988", "text": "private function setMethod(array &$url)\n {\n if (isset($url[1])) {\n // Check to see if method exists in controller\n if (method_exists($this->currentController, $url[1])) {\n $this->currentMethod = $url[1];\n // Unsert 1 index\n unset($url[1]);\n } else {\n (new ErrorsController())->pageNotFound();\n exit();\n }\n }\n }", "title": "" }, { "docid": "b999d559316dbcf4018e55d8ace5ddf0", "score": "0.43253574", "text": "public function setVersion($version = true)\n {\n return $this->setParam('version', $version);\n }", "title": "" }, { "docid": "ecdaa6486a8f24e7fd2a6e326638a275", "score": "0.43252826", "text": "public function setVersion($version)\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "ecdaa6486a8f24e7fd2a6e326638a275", "score": "0.43252826", "text": "public function setVersion($version)\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "ecdaa6486a8f24e7fd2a6e326638a275", "score": "0.43252826", "text": "public function setVersion($version)\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "ecdaa6486a8f24e7fd2a6e326638a275", "score": "0.43252826", "text": "public function setVersion($version)\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "f0e0ab13183a1fdebfa162865ffd97f1", "score": "0.43243766", "text": "public function setVersion(?int $version): void\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "f0e0ab13183a1fdebfa162865ffd97f1", "score": "0.43243766", "text": "public function setVersion(?int $version): void\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "f0e0ab13183a1fdebfa162865ffd97f1", "score": "0.43243766", "text": "public function setVersion(?int $version): void\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "1d3eca1974ae881cfc14bbc281a97b49", "score": "0.43188336", "text": "public function executeGetterExtension($entry)\n {\n\n }", "title": "" }, { "docid": "1d18509d95552a7a4c53decd7b790189", "score": "0.4318816", "text": "function action_controller() {\n\t$version = filter_input( INPUT_GET, 'version-control', FILTER_SANITIZE_STRING );\n\n\tif ( ! empty( $version ) ) {\n\t\tupdate_user_option(\n\t\t\tget_current_user_id(),\n\t\t\t'version-control-selected-version',\n\t\t\t$version\n\t\t);\n\t}\n}", "title": "" }, { "docid": "284adf965d6a243abaaf992588b7265a", "score": "0.4315231", "text": "public function testGetVersionUrl(): void\n {\n $result = Cake::getVersionUrl();\n $this->assertRegexp('/\\d+\\.\\d+.\\d+$/', $result, \"getVersionUrl() returned wrong URL for non-specified version\");\n\n // When version is specified, the URL should end with the given version number\n $result = Cake::getVersionUrl('foobar');\n $this->assertEquals('https://github.com/cakephp/cakephp/releases/tag/foobar', $result, \"getVersionUrl() returned wrong URL for specific version\");\n }", "title": "" }, { "docid": "e605f7ca742b7bb52c3ba7213b39f91e", "score": "0.43086874", "text": "public function filename_callback($func)\n {\n if (is_callable($func)) {\n $this->random_cb = $func;\n }\n\n return $this;\n }", "title": "" }, { "docid": "191ed19a124e50b5ee095ff355254f6d", "score": "0.43025857", "text": "public function setVersion(string $version)\n {\n $this->version = $version;\n }", "title": "" }, { "docid": "059ab1b5f2eeddfc2d574881b2d1dc00", "score": "0.43021056", "text": "private static function update_evf_version() {\n\t\tdelete_option( 'everest_forms_version' );\n\t\tadd_option( 'everest_forms_version', EVF()->version );\n\t}", "title": "" }, { "docid": "6dfae3106bda9a3537a5d68236656db4", "score": "0.42982543", "text": "public function setFilename(string $filename): static;", "title": "" }, { "docid": "e5e74861183305e99a2d7cb108fcad49", "score": "0.42947826", "text": "public function download()\n {\n }", "title": "" }, { "docid": "2ab28f4014793d85b856fd73d83245f9", "score": "0.42930603", "text": "public function setup_license()\n {\n if ( ! class_exists( 'NF_Extension_Updater' ) ) return;\n\n new NF_Extension_Updater( self::NAME, self::VERSION, self::AUTHOR, __FILE__, self::SLUG );\n }", "title": "" }, { "docid": "bbacdbf41061a7783f25669641bcf49a", "score": "0.42842016", "text": "public function setDownloadUrl($downloadUrl) {\n $this->downloadUrl = $downloadUrl;\n }", "title": "" }, { "docid": "e0e85c79a1f63c6dde458f2047b227d1", "score": "0.42782563", "text": "public function setExternalObjectVersion(?string $value): void {\n $this->getBackingStore()->set('externalObjectVersion', $value);\n }", "title": "" }, { "docid": "d91735ca324d7750403088dfb23cf04b", "score": "0.42657536", "text": "public function setSourceVersion($version);", "title": "" }, { "docid": "0363fdbef9b0bf64f947758e1ecb27b4", "score": "0.42652348", "text": "public function setInstalledVersion(?string $value): void {\n $this->getBackingStore()->set('installedVersion', $value);\n }", "title": "" }, { "docid": "205dab228be78d0cc8da8c81c2f5920e", "score": "0.42636266", "text": "public function setUpdateVersion($val)\n {\n $this->_propDict[\"updateVersion\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "df347149b7aecf8eb04da03678e6a487", "score": "0.42607823", "text": "protected abstract function version();", "title": "" }, { "docid": "149041e2b6ecb36c3242b39c2db60b76", "score": "0.42589703", "text": "public function get_version();", "title": "" }, { "docid": "f0b86b07e73c1c7075d54ac60deb82fa", "score": "0.42544073", "text": "private function defaultSetFunction()\n {\n return function (Model $model, $attribute, $value, $options) {\n return $model->setAttribute($attribute, $value);\n };\n }", "title": "" }, { "docid": "ae1d4230ee7d90065fe3b72c5d441003", "score": "0.42522913", "text": "public function set_url( $url );", "title": "" }, { "docid": "07a7dfa5791523f60b3cc2903080ae35", "score": "0.4249907", "text": "public function _update_version_number_function() {\n\n\t\t\tglobal $wpdb;\n\t\t\t$data = array(\n\t\t\t\t'extensionversions' => $this->new_string,\n\t\t\t);\n\t\t\t$format = array( '%s' );\n\t\t\t$where = array( 'ID' => 1 );\n\t\t\t$where_format = array( '%d' );\n\t\t\t$wpdb->update( $wpdb->prefix . 'gamedev_jre_user_options', $data, $where, $format, $where_format );\n\t\t}", "title": "" }, { "docid": "6490f65c21060980435f228235be7eeb", "score": "0.42490047", "text": "public static function setMethod(&$argv)\n {\n self::$method = array_shift($argv);\n }", "title": "" }, { "docid": "827d81779156381727224b158818a080", "score": "0.4247274", "text": "public function mark_installed($version) {\n\t$this->installed_version = $version;\n}", "title": "" }, { "docid": "bb422c2197d2f76d09bcb94b2aa14933", "score": "0.42470118", "text": "public function setSignatureVersion(?string $value): void {\n $this->getBackingStore()->set('signatureVersion', $value);\n }", "title": "" }, { "docid": "21aff94a5e146ae6376e6de05af911e9", "score": "0.42447206", "text": "function change_default_version( \\WP_Dependencies $object ) {\n if ( isset( $_SERVER['CURRENT_VERSION_ID'] ) ) {\n $object->default_version .= '-' . $_SERVER['CURRENT_VERSION_ID'];\n }\n }", "title": "" }, { "docid": "a8b9ba5c89834e42a2b271222efc7c04", "score": "0.42431945", "text": "private function _log_version_number () {\n\t\tupdate_option( $this->_token . '_version', $this->_version );\n\t}", "title": "" }, { "docid": "11415a4fa29ad9491d75a4c2799829f7", "score": "0.42403466", "text": "public function setFilename( $new_filename)\r\n\t{\r\n\t\tif (is_string($new_filename))\r\n\t\t{\r\n\t\t\t$this->filename = $new_filename;\r\n\t\t}else{\r\n\t\t\t$this->filename = \"archive.zip\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "686eb5a71f6c5436e71a80b1bc6d00c7", "score": "0.42362338", "text": "function select_download_type() {\n\n $ret = seturl(\"t=noresume\",\"Download file\") . \"<br>\";\n $ret .= seturl(\"t=noresume_speed\",\"Download file (speed limit 100 kbs)\") . \"<br>\";\n $ret .= seturl(\"t=resume\",\"Download file with resume\") . \"<br>\";\n $ret .= seturl(\"t=resume_speed\",\"Download file with resume (speed limit 100 kbs)\") . \"<br>\";\n $ret .= seturl(\"t=data\",\"Download file data\") . \"<br>\";\n $ret .= seturl(\"t=dataresume\",\"Download file data with resume\") . \"<br>\"; \n $ret .= seturl(\"t=auth\",\"Authentication download (user/pass)\") . \"<br>\"; \n $ret .= seturl(\"t=url\",\"URL Download (simple redirect)\") . \"<br>\"; \n\n return ($ret);\n }", "title": "" } ]
8a444f977b441187d8e3ce6eee9941f1
Returns the current database name
[ { "docid": "ecc4ff20ec7762d70246897a7ec9f620", "score": "0.79001737", "text": "function getDatabaseName(){\n $result = false;\n $path = $this->getPath();\n if ($path != null) {\n $ext = $this->toExt();\n $result = basename($path, $ext);\n }\n return $result;\n }", "title": "" } ]
[ { "docid": "601762d5cd6e38ffcf1d957ff2266f1e", "score": "0.87758803", "text": "public function getDatabaseName() {\r\n\t\treturn $this->database;\r\n\t}", "title": "" }, { "docid": "1d16ac2a1ceb1461e02eb59364b2b2f5", "score": "0.8749449", "text": "public function getDatabaseName() {\n\t\treturn $this->database;\n\t}", "title": "" }, { "docid": "37416c4f77fd4916d27149e46ad83dd4", "score": "0.8698415", "text": "public function getDatabaseName()\n {\n return $this->databaseName;\n }", "title": "" }, { "docid": "06ff48e5e877740d8d98e41a475b6410", "score": "0.8646172", "text": "public function getDatabaseName();", "title": "" }, { "docid": "e14f0996a4d4374870b3d7b13b2e952e", "score": "0.8626659", "text": "public function getDatabaseName()\n {\n return $this->_databaseName;\n }", "title": "" }, { "docid": "cb05438b5f9e7b6252f5481fbcb1046e", "score": "0.8578726", "text": "public function getDatabaseName(): string\n {\n return $this->databaseName;\n }", "title": "" }, { "docid": "a5603785b66b3e1733ecba077fa0f2d6", "score": "0.85504466", "text": "protected function getDatabaseName()\n {\n $connType = Config::get('database.default');\n $database = Config::get('database.connections.' . $connType);\n\n return $database['database'];\n }", "title": "" }, { "docid": "37101d4514b3e342ed50084904451a97", "score": "0.8439195", "text": "public function getDatabaseName()\n\t{\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "17161a22dcce39a21a6cc7dac9efbe58", "score": "0.83948404", "text": "public function getDatabaseName()\n {\n $db = Yii::$app->get($this->database_id);\n return preg_replace(\"/.*dbname=/\", \"\", $db->dsn);\n }", "title": "" }, { "docid": "4b1df82d05b446c3c65dd1e9f08f3a38", "score": "0.83541214", "text": "function getDatabaseName() {\r\n\t\t// condition : get live or dev db\r\n\t\treturn $this->getServerState() ? $this->liveDatabaseName : $this->devDatabaseName;\r\n\t}", "title": "" }, { "docid": "ac98528960c5b092713c5b8ed9019587", "score": "0.82868445", "text": "public function getDBName(): string\n {\n return $this->dbName;\n }", "title": "" }, { "docid": "b966d284f52ddcb4a2722da7554f224a", "score": "0.8274183", "text": "protected function getDatabaseNameFromConnection()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "05672ef5b63cdfa9b6502a24c2c17763", "score": "0.81717205", "text": "public function getDatabase(): string\n {\n // http://stackoverflow.com/questions/9322302/how-to-get-database-name-in-pdo\n $res = $this->wrapper->fetch(\"select database()\");\n return current($res);\n }", "title": "" }, { "docid": "6f1aee7bb82d10170ff92971e9b12abc", "score": "0.80568415", "text": "public function getDbName()\n {\n return $this->dbName;\n }", "title": "" }, { "docid": "34e5e406309dabf9feec30ced44ac605", "score": "0.80562896", "text": "public function get_db_name() { return $this->db_name; }", "title": "" }, { "docid": "5071a612824395f40b4cfc9d39fb8490", "score": "0.8045983", "text": "public function getDbName()\n\t{\n\t return $this->dbName;\n\t}", "title": "" }, { "docid": "edd6f63cc75ef84e1308f970ccf00200", "score": "0.7997416", "text": "public static function getDatabase():string\n {\n return self::getVariableDefaultPattern('database');\n }", "title": "" }, { "docid": "889d273f668f5d8589d489aac5271581", "score": "0.79672927", "text": "public function getDbName(): string\n {\n return $this->dbName;\n }", "title": "" }, { "docid": "5b78d86e83e6d8875165e861e113443b", "score": "0.7862223", "text": "protected function laravelGetCurrentDatabase()\n {\n $connection = $this->configDTO->connection;\n $return = config(\"database.connections.$connection.database\");\n return is_string($return) ? $return : '';\n }", "title": "" }, { "docid": "aa76fe3702c641238cbb01adab4dda51", "score": "0.7840464", "text": "public static function dbName()\n {\n return Inflector::camel2id(StringHelper::basename(get_called_class()), '_');\n }", "title": "" }, { "docid": "906ada81a3006869cc5d6fb27b7ee717", "score": "0.7823665", "text": "function GetDBName()\n {\n $pdodb = App::getDBParam($this->ConnString);\n if ($pdodb != false)\n {\n return $pdodb[\"dbname\"];\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "219b25b7f88a0db98063a05a2bc7f309", "score": "0.77987736", "text": "public function getName() : string\n {\n return $this->db_name;\n }", "title": "" }, { "docid": "2d26eeb354e25dae674932d7eac46851", "score": "0.7774941", "text": "function EvaGetCurrentConfigDatabaseName(){\n\t\treturn $this->getDataSource()->config['database'];\n\t}", "title": "" }, { "docid": "77daf2e2da3569b1afef98beeacf748c", "score": "0.77424234", "text": "public function getSelectedDatabase() {\n\t\treturn $this->realConn->getSelectedDatabase();\n\t}", "title": "" }, { "docid": "4ba4e0af7a21a3f0bacdf945c1196003", "score": "0.7512874", "text": "public function getDBName(): ?string\n {\n if (null !== $this->dbName) {\n return $this->dbName;\n }\n return $this->attributes['name'];\n }", "title": "" }, { "docid": "17b1d42fc3f5191bff70e928e77b9527", "score": "0.749409", "text": "public function getQuotesDatabaseName();", "title": "" }, { "docid": "6ab66de0a20f47c6adb143e2ae1044c0", "score": "0.74642396", "text": "protected function getDatabaseName($database = '')\n {\n return $database ?: $this->getDirName();\n }", "title": "" }, { "docid": "1255c6db8066d1a1844fd51a2dbe9feb", "score": "0.7435741", "text": "public function database()\n {\n // sql\n $sql = 'SELECT database()';\n\n return $sql;\n }", "title": "" }, { "docid": "a387740ccf040f2389be514e23d706c1", "score": "0.7433065", "text": "public function getName()\n {\n return 'database';\n }", "title": "" }, { "docid": "5ff5ef7b89dbf63b9d8dfe54fe440096", "score": "0.7429432", "text": "function get_db () {\n\t\treturn $this->db_conn_name;\n\t}", "title": "" }, { "docid": "bcdcdfb3cc305f7c549a5705828fe7b3", "score": "0.7297007", "text": "public function getName()\n {\n return 'db';\n }", "title": "" }, { "docid": "0d5ea27f8113f1717c667c09f4f43e2e", "score": "0.7272626", "text": "public function getDatabaseId()\n {\n return $this->database_id;\n }", "title": "" }, { "docid": "88f732d45f14896a6ea59e22099b670a", "score": "0.72721845", "text": "public static function get_database () {\n\t\t$conn = MongoManager::get_connection ();\n\t\tif (! $conn) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $conn->{conf ('Mongo', 'name')};\n\t}", "title": "" }, { "docid": "3ff899f842ca5c10f88b736bc3bd37ca", "score": "0.72446495", "text": "public function get_database() {\n\t\treturn $this->database;\n\t}", "title": "" }, { "docid": "c4d590a3c73d418c8bed1e867fb487b0", "score": "0.72040266", "text": "public function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "c4d590a3c73d418c8bed1e867fb487b0", "score": "0.72040266", "text": "public function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "c4d590a3c73d418c8bed1e867fb487b0", "score": "0.72040266", "text": "public function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "c4d590a3c73d418c8bed1e867fb487b0", "score": "0.72040266", "text": "public function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "c4d590a3c73d418c8bed1e867fb487b0", "score": "0.72040266", "text": "public function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "5dfa09ec8ceb17019fb58980820f40c0", "score": "0.71880805", "text": "public function getDatabase()\r\n {\r\n return $this->database;\r\n }", "title": "" }, { "docid": "7c403fecbc0bff461877d15f3fb1ac75", "score": "0.7159627", "text": "public function getDbName(): ?string\n {\n return $this->dbName;\n }", "title": "" }, { "docid": "c0600c16cb2ca6d8de1e8104177970ee", "score": "0.7127636", "text": "public static function get_database(): string;", "title": "" }, { "docid": "758ebfc1b70431d4a79cf1cf5eff6bd9", "score": "0.7106228", "text": "public function getDatabase ()\n {\n return $this->database;\n }", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "26f80c1b2250ef537e00f9e7b2bd9aa9", "score": "0.70811135", "text": "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "title": "" }, { "docid": "253b6e4cecf7f6741ae3bf2b21557946", "score": "0.7066133", "text": "public function DB() {\n return 'DB';\n }", "title": "" }, { "docid": "333f75d27115f7642ac8659d2b1a5ec9", "score": "0.7012964", "text": "function selected_database() {\n return $this->selected_database;\n }", "title": "" }, { "docid": "98926a46b67c0d9f8a562cc1f0f58063", "score": "0.69932", "text": "public function getCurrentDatabase() {\n\t\treturn (array)$this->databases[$this->currentDatabase];\n\t}", "title": "" }, { "docid": "add6294e661ea7f7505e5b1111c7778b", "score": "0.6991852", "text": "public function getDatabase(): string|null\n {\n if (!$this->hasDatabase()) {\n $this->setDatabase($this->getDefaultDatabase());\n }\n return $this->database;\n }", "title": "" }, { "docid": "97ffc2068357c5657ba5aeaf10db6d4d", "score": "0.69558185", "text": "public function getIdDatabase()\n {\n return $this->idDatabase;\n }", "title": "" }, { "docid": "fd345e62b60de09bc986d83d4d7bfb6f", "score": "0.69317234", "text": "public function getDatabase() { \n return $this->database; \n }", "title": "" }, { "docid": "ef3beaf400433017287ba176c7dcbcfd", "score": "0.6901161", "text": "public function getConnectionName()\n {\n $connName = config('webpush.db_connection');\n return $connName ?: config('database.default');\n }", "title": "" }, { "docid": "0de1340cb9f8f1101f0ea98370911875", "score": "0.6861342", "text": "public function getDatabase() {\n return $this->db;\n }", "title": "" }, { "docid": "4707464230d9abf08cc842ea995c8264", "score": "0.68585646", "text": "protected function getDatabase()\n {\n return $this->getMetaModel()->getServiceContainer()->getDatabase();\n }", "title": "" }, { "docid": "989afe333cfd16080526265733524454", "score": "0.6856341", "text": "static protected function database() {\n return $GLOBALS['app']->getContainer()->database;\n }", "title": "" }, { "docid": "cd92d1760bad0a2fe7d631f9800b7408", "score": "0.6843402", "text": "public function getDatabase()\n\t{\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "51e2907a21b1d1c27c02a150de7abad6", "score": "0.6841554", "text": "public static function getDb($db_name='')\n {\n return $db_name ? Yii::$app->$db_name : Yii::$app->db;\n }", "title": "" }, { "docid": "3d1a55a0eefc2357815ac78b5908fc52", "score": "0.68266106", "text": "protected function db($name) {\n\t\treturn $this->databases[$name];\n\t}", "title": "" }, { "docid": "39f2e06d7a0826d2a1af58e2b308ae22", "score": "0.68189913", "text": "public static function get_db(){\n\t\treturn Config::get('database.main_db');\n\t\t//return \"fusarung\";\n\t}", "title": "" }, { "docid": "9bd0f2e6fea8b1fbc7be5ae8055a8bbb", "score": "0.68027854", "text": "protected function get_db()\n\t{\n\t\treturn $this->connections['primary'];\n\t}", "title": "" }, { "docid": "d2ad0b3b53dd7670eb2d9108119dc265", "score": "0.6801065", "text": "protected function magicDatabase(): string|null\n {\n return $this->get('magic_database');\n }", "title": "" }, { "docid": "2025f194a497439a49f254971dca6243", "score": "0.67941076", "text": "protected function fetchDefaultDatabaseName()\n {\n if (preg_match('/^mongodb:\\\\/\\\\/.+\\\\/([^?&]+)/s', $this->dsn, $matches)) {\n return $matches[1];\n } else {\n throw new InvalidConfigException(\"Unable to determine default database name from dsn.\");\n }\n }", "title": "" }, { "docid": "f7a402d7e35d1a6e7525ed1ba9288336", "score": "0.67667574", "text": "public function getDatabase()\n {\n if ($this->isEmbeddable()) {\n return null;\n }\n\n return $this->builder->databaseAlias($this->property('database'));\n }", "title": "" }, { "docid": "0fc769af9352dc08666e3a285d7d43bf", "score": "0.6756631", "text": "public function getDatabaseUrl()\n {\n return $this->databaseUrl;\n }", "title": "" }, { "docid": "8e77216576d8b41f007b7d0682369277", "score": "0.6738825", "text": "public function getDbPrefix() {\r\n return static::DB_PREFIX;\r\n }", "title": "" }, { "docid": "95de25c6f9f6cb1f1fcd5b494f90268f", "score": "0.6730656", "text": "public static function getDatabase($name = null)\n\t{\n\t\tif ($name == null)\n\t\t\t$name = \"database_connection\";\n\t\treturn \\Oranges\\MasterContainer::get($name);\n\t}", "title": "" }, { "docid": "e90b5be9d664410f2a93cf5dcd5bcb60", "score": "0.67190117", "text": "public function getConnectionName()\n {\n return config('shopify.database.connection') ?? $this->connection;\n }", "title": "" }, { "docid": "aa2285975affb97e3394f1381ed4f69b", "score": "0.6717163", "text": "public function __toString()\n {\n return $this->_databaseName;\n }", "title": "" }, { "docid": "0cba36439d7e8ae0d344f33ae4537202", "score": "0.67069817", "text": "public function getDBAName()\n {\n return isset($this->DBAName) ? $this->DBAName : null;\n }", "title": "" }, { "docid": "dbaa534dce38a189b151eeb7d67c09cf", "score": "0.6706744", "text": "protected function getDb() {\n return self::$server->$db;\n }", "title": "" }, { "docid": "290d0a2e54937cb51175cc686acfc594", "score": "0.6705764", "text": "public function databases()\n { \n $sql = \"SELECT datname FROM pg_catalog.pg_database\";\n\n return $sql;\n }", "title": "" }, { "docid": "1976a97c40934bf5fcd0cc59418ae242", "score": "0.6677782", "text": "public static function databaseName(string $project, string $instance, string $database): string\n {\n return self::getPathTemplate('database')->render([\n 'project' => $project,\n 'instance' => $instance,\n 'database' => $database,\n ]);\n }", "title": "" }, { "docid": "4f9c7ab1e400557cd029dd5d6fa7ee0e", "score": "0.66758794", "text": "public function databasePath()\n {\n return $this->paths->get('database');\n }", "title": "" }, { "docid": "d7a02a15cc7c342354b44b97d5f01f49", "score": "0.6655217", "text": "protected final function getDatabase() {\n return $this->db;\n }", "title": "" }, { "docid": "5bff56002795ae0fa5e7627d5beae5ad", "score": "0.66234446", "text": "protected function getStaticDatabaseTableName() {\r\n $paramDbPrefix=Parameter::getGlobalParameter('paramDbPrefix');\r\n return $paramDbPrefix . self::$_databaseTableName;\r\n }", "title": "" }, { "docid": "425966ec2ce524bd3ca104df8ac597a9", "score": "0.662145", "text": "public function getDBTableName() {\n return $this->_name;\n }", "title": "" }, { "docid": "a578dc562191886012a4e58f64dea98f", "score": "0.65890634", "text": "public function get_rdbms_name()\n {\n return \"PostgreSQL Server\";\n }", "title": "" }, { "docid": "7c09182fc6b3d4db9ba49c1f4a472191", "score": "0.65842885", "text": "public function databasePath()\n {\n return $this->get('path.database');\n }", "title": "" }, { "docid": "d25a7256aa10b6f7537265fc81201fc5", "score": "0.6582083", "text": "function getDB() {\n\t\treturn wfGetDB( DB_MASTER );\n\t}", "title": "" }, { "docid": "c686158c830d6d411478b39e74b26532", "score": "0.65786237", "text": "function get_tenant_db_name($tenantCode)\n {\n $project = \\App\\Model\\Project\\Project::where('code', $tenantCode)->first();\n\n return env('DB_DATABASE').'_'.strtolower($project->code);\n }", "title": "" }, { "docid": "56caca25d7486a581dc4604b2a35ff27", "score": "0.65499014", "text": "public function getDatabaseSourceName(): string\n {\n $port = (!empty($this->getPort())) ? \"port={$this->getPort()};\" : \"\";\n return 'pgsql:dbname=' . $this->getDatabaseName() . ';host=' . $this->getHostname() . ';' . $port;\n }", "title": "" }, { "docid": "57108a2a4736e181ace0da93ac34e153", "score": "0.65494925", "text": "protected function getStaticDatabaseTableName() {\r\n global $paramDbPrefix;\r\n return $paramDbPrefix . self::$_databaseTableName;\r\n }", "title": "" }, { "docid": "89ebfb63cac11ae28b7294a31dd7fd90", "score": "0.652853", "text": "public function getDatabase()\n {\n return $this->_databaseConnection;\n }", "title": "" }, { "docid": "3903a8ec0685c2a232885274e2c9b576", "score": "0.6522223", "text": "public function setDatabaseName($v)\n {\n $this->databaseName = $v;\n }", "title": "" }, { "docid": "bcb5fb7be8e6434b3a96293a3143eba6", "score": "0.64918953", "text": "protected function getSystemDatabase()\n {\n return $this->systemDatabase;\n }", "title": "" }, { "docid": "e9ad2f59bcdb98ac774c6fd288ce67d3", "score": "0.6486909", "text": "function database($name = null) : Database\n {\n return Dan::database($name);\n }", "title": "" }, { "docid": "24f3bf6b7bb37d5f21ce75788590973a", "score": "0.6458677", "text": "function select_database($name) {\n $this->selected_database = $name;\n }", "title": "" }, { "docid": "2418bc9ab383653de39dd208ae9e261a", "score": "0.6454481", "text": "public function getDatabaseFilePath()\n {\n if (null === $this->databaseFilePath) {\n return static::DEFAULT_DATABASE_FILE_PATH;\n }\n\n return $this->databaseFilePath;\n }", "title": "" }, { "docid": "83edba463a30917c00d0f493a1902a23", "score": "0.6453815", "text": "function selectDatabase($name);", "title": "" }, { "docid": "8b238a0592c6b9b50d14fb3567e28301", "score": "0.6420112", "text": "public function getDatabase()\n {\n if ($this->database === null) {\n $this->database = Db::getInstance();\n }\n\n return $this->database;\n }", "title": "" } ]
6ed5a2998399666b7c90d923044fb2a1
Get the console command options.
[ { "docid": "a48b29169bd71933d89887358a5f0972", "score": "0.0", "text": "protected function getOptions()\n {\n return [\n [\n 'table',\n 't',\n InputOption::VALUE_OPTIONAL,\n 'Table',\n false\n ]\n ];\n }", "title": "" } ]
[ { "docid": "6e72713b6b229d5a69c8e2bfeb84bf52", "score": "0.780034", "text": "protected function getOptions() {\n return [\n ['env', null, InputOption::VALUE_OPTIONAL, 'The environment the command should run under.', null],\n ];\n }", "title": "" }, { "docid": "aea9d0c9f7469f0f45225de279ea81c0", "score": "0.7758775", "text": "protected function getOptions()\n {\n return [\n ['command', null, InputOption::VALUE_OPTIONAL],\n ];\n }", "title": "" }, { "docid": "ba6ef7d3fec9979238f9fa3ba6484976", "score": "0.7621999", "text": "protected function getOptions()\n {\n return [\n [\n 'command',\n null,\n InputOption::VALUE_OPTIONAL,\n 'The terminal command that should be assigned.',\n 'command:name',\n ],\n ];\n }", "title": "" }, { "docid": "1c496825482904ed64f1e7137cde9f7d", "score": "0.7614994", "text": "public static function options()\n {\n return $GLOBALS[GLOBAL_NS]->options;\n }", "title": "" }, { "docid": "048f8c2e41883b97c390f9d0b7f9a069", "score": "0.7477305", "text": "public static function getOptions()\n {\n return self::$options;\n }", "title": "" }, { "docid": "48150425c9ce80a968b1ad2c758186f2", "score": "0.7442398", "text": "private function getOptionsCLI(){\n $aOptions = [\n 'client_encoding' => 'UTF8',\n 'datestyle' => 'SQL,DMY',\n 'timezone' => 'America/Sao_Paulo'\n ];\n $sOptions = implode(';', array_filter($aOptions, function(&$sValue, $sOption) {\n $sValue = \"--{$sOption}={$sValue}\";\n return true;\n }, ARRAY_FILTER_USE_BOTH));\n return $sOptions;\n }", "title": "" }, { "docid": "274bacd88c0757d8acbf546eff3f793f", "score": "0.7374983", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('bench', null, InputOption::VALUE_OPTIONAL, 'Run command in workbench'),\n\t\t\tarray('no-entities', null, InputOption::VALUE_NONE, 'Add translation without converting characters to entities'),\n\t\t);\n\t}", "title": "" }, { "docid": "1d5eef0dbf82f44c71fc4bd333ed95c9", "score": "0.7373072", "text": "protected function getOptions()\n {\n $options = [];\n\n // Here we will gather all of the command line options that have been specified with\n // the double hyphens in front of their name, with or without a value.\n foreach ($_SERVER['argv'] as $argument) {\n preg_match('/^\\-\\-(.*?)(=(.*))*$/', $argument, $match);\n\n if (count($match) > 0) {\n $options[$match[1]] = isset($match[3]) ? $match[3] : '';\n }\n }\n\n return $options;\n }", "title": "" }, { "docid": "ac613c3000b0f95a11134c3d838838bb", "score": "0.7279262", "text": "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],\n ];\n }", "title": "" }, { "docid": "536463cb1b40e5652b6fb90b65c99e7e", "score": "0.72650766", "text": "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['module', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run while in production.'],\n ];\n }", "title": "" }, { "docid": "c94f9b0c43a33314206d6345eeac747d", "score": "0.7234105", "text": "protected function getOptions()\n {\n return [\n ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the generator already exists'],\n ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'make:name'],\n ];\n }", "title": "" }, { "docid": "936477b78c247663e954c32b7275bc7e", "score": "0.722443", "text": "protected function getOptions()\r\n {\r\n return [\r\n ['deamon', null, InputOption::VALUE_OPTIONAL, 'Deamon mode.', true],\r\n ];\r\n }", "title": "" }, { "docid": "feeb731b3fec9dc246777ce005f13b61", "score": "0.7214341", "text": "public static function getOptions()\n {\n return Parser::getOptions();\n }", "title": "" }, { "docid": "cb4b6d8b426b56ba77e03efcb6a901a4", "score": "0.7187016", "text": "protected function getOptions()\n {\n return [\n ['lines', null, InputOption::VALUE_OPTIONAL, 'output the last K lines, instead of the last 50', 50],\n ];\n }", "title": "" }, { "docid": "d3a5f047a57bedd4cc090de4a02defc1", "score": "0.71820486", "text": "public function getCommandlineOptions()\n {\n $wd = './';\n $options['workingdir'] = new Option('w','working-dir',Getopt::REQUIRED_ARGUMENT);\n $options['workingdir']->setDescription('the working directory');\n $options['workingdir']->setDefaultValue($wd);\n $options['once'] = new Option('o','once',Getopt::IS_FLAG);\n $options['once']->setDescription(\"run once and exit\");\n $options['once']->setDefaultValue(false);\n $options['verbose'] = new Option('v','verbose',Getopt::OPTIONAL_ARGUMENT);\n $options['verbose']->setDescription(\"the level of information to log\");\n $loglevel = getenv('XINC_LOGLEVEL');\n if($loglevel === false) {\n $loglevel = Logger::DEFAULT_LOG_LEVEL;\n }\n else {\n $loglevel = intval($loglevel);\n }\n $options['verbose']->setDefaultValue($loglevel);\n $options['projectdir'] = new Option('p','project-dir',Getopt::REQUIRED_ARGUMENT);\n $options['projectdir']->setDescription('directory with project configurations');\n $options['statusdir'] = new Option('s','status-dir',Getopt::REQUIRED_ARGUMENT);\n $options['statusdir']->setDescription('internal (writable) status directory');\n $options['statusdir']->setDefaultValue(\"$wd\".Xinc::DEFAULT_STATUS_DIR.\"/\");\n $options['logfile'] = new Option('l','log-file',Getopt::REQUIRED_ARGUMENT);\n $options['logfile']->setDescription('the main log file');\n $options['logfile']->setDefaultValue(\"$wd\".'xinc.log');\n $options['pidfile'] = new Option('i','pid-file',Getopt::REQUIRED_ARGUMENT);\n $options['pidfile']->setDescription('place to store the process id');\n $options['pidfile']->setDefaultValue(\"$wd\".'.xinc.pid');\n return $options;\n }", "title": "" }, { "docid": "edb3ca1b942de426decc6a44bb28e286", "score": "0.71728873", "text": "protected function get_options() {\n\t\treturn get_option( self::OPTION_NAME );\n\t}", "title": "" }, { "docid": "1a334cb57889f6e27dabc992a164d6a7", "score": "0.7140937", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "1a334cb57889f6e27dabc992a164d6a7", "score": "0.7140937", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.713727", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.713727", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.713727", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.713727", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "752da8125e2b39fd5c840063b1f01ef3", "score": "0.7136242", "text": "protected function getOptions(): array\n {\n return [\n ['command', null, InputOption::VALUE_OPTIONAL],\n ];\n }", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.7110364", "text": "public function getOptions();", "title": "" }, { "docid": "4c654562577346e077e2a71b08d14875", "score": "0.7100512", "text": "public function getOptions() {}", "title": "" }, { "docid": "bbf94dcfd0f43e4a36b8a2e41a9019b2", "score": "0.70938146", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t[\n\t\t\t\t'database',\n\t\t\t\tnull,\n\t\t\t\tInputOption::VALUE_OPTIONAL,\n\t\t\t\t'The database connection to use.',\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "3c6126adef50ffac480a8ef1ca2858ac", "score": "0.7073065", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Overwrite existing files with generated ones.'],\n ['translated', 't', InputOption::VALUE_NONE, 'Generate translation ready files.'],\n ];\n }", "title": "" }, { "docid": "a2274552f437a6e94af5b99348a7359a", "score": "0.7053347", "text": "protected function getOptions()\n {\n return [\n ['directory', 'D', InputOption::VALUE_OPTIONAL, 'Directory to transfer.', base_path('docs')],\n ['output-file', 'O', InputOption::VALUE_OPTIONAL, 'File name to transfer.', 'docs.md'],\n ];\n }", "title": "" }, { "docid": "48764fa8c974cff55f3e4490ac908fac", "score": "0.70406723", "text": "public function options()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48764fa8c974cff55f3e4490ac908fac", "score": "0.70406723", "text": "public function options()\n {\n return $this->options;\n }", "title": "" }, { "docid": "7a20237de430f05d07c7b3da05c562ab", "score": "0.70334995", "text": "protected function getOptions()\n {\n return [\n ['oc', null, InputOption::VALUE_NONE, 'Package uses the oc- prefix.'],\n ['from', 'f', InputOption::VALUE_REQUIRED, 'Provide a custom source.'],\n ['want', 'w', InputOption::VALUE_REQUIRED, 'Provide a custom version.'],\n ['no-migrate', null, InputOption::VALUE_NONE, 'Do not run migration after install.'],\n ['no-update', null, InputOption::VALUE_NONE, 'Do not run composer update after install.'],\n ];\n }", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.703143", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.703143", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.703143", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.703143", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "eb0173e0d864cbe3d1b75638f8e8be98", "score": "0.7031321", "text": "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],\n ['realpath', null, InputOption::VALUE_OPTIONAL, 'The absolute path to migration files.', null],\n ['path', null, InputOption::VALUE_OPTIONAL, 'The path to migration files.', null],\n ['package', null, InputOption::VALUE_OPTIONAL, 'The package to migrate.', null],\n ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'],\n ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'],\n ['step', null, InputOption::VALUE_NONE, 'Force the migrations to be run so they can be rolled back individually.'],\n ];\n }", "title": "" }, { "docid": "36895c7af11a246b353f8564ef56088c", "score": "0.702982", "text": "public static function getOptions() : array;", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.7023164", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "bef81a67ba806f6e2ca92bfa3f20b94d", "score": "0.7019967", "text": "protected function get_options() {\n\t\treturn [\n\t\t\t'verbose,v' => 'Be verbose.',\n\t\t\t'help' => 'Display this help.',\n\t\t];\n\t}", "title": "" }, { "docid": "1e6bfd99f467d99be9c42414907dc492", "score": "0.70197195", "text": "protected function getOptions()\n\t{\n\t\t// return array(\n\t\t// \tarray('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),\n\t\t// );\n\t\treturn array();\n\t}", "title": "" }, { "docid": "14b97b6d22a9d3f33432ffc93a2de575", "score": "0.7013077", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run.'],\n ];\n }", "title": "" }, { "docid": "3d6d3fac492ec24119d80b0f2d659563", "score": "0.700939", "text": "public function options()\n {\n return get_option($this->optionName(), []);\n }", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70086473", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70086473", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "6d3aec18dfa2b4529f0f037d82106805", "score": "0.70041734", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['list', 'l', InputOption::VALUE_NONE, 'List saved backups'],\n\t\t\t['restore', 'r', InputOption::VALUE_REQUIRED, 'Restore a backup'],\n\t\t\t['force', 'f', InputOption::VALUE_NONE, 'Do not prompt for confimation when restoring a backup'],\n\t\t\t['connection', 'c', InputOption::VALUE_REQUIRED, 'Database connection name', config('database.default')],\n\t\t];\n\t}", "title": "" }, { "docid": "4cbadb089a84fb62154193b7a206b541", "score": "0.70026785", "text": "public function getOptions()\n\t{\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "4cbadb089a84fb62154193b7a206b541", "score": "0.70026785", "text": "public function getOptions()\n\t{\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "2cca228d1c0b4a2b017b1cf13dcacf10", "score": "0.7001731", "text": "protected function getOptions()\n {\n return [\n ['database', null, 'The database connection to use.'],\n ];\n }", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.69998246", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.69998246", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.69998246", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "ef4a280ffc3702b516a622a64986a4bb", "score": "0.6995543", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['list', 'l', InputOption::VALUE_NONE, 'List all available connections'],\n\t\t\t['password', 'p', InputOption::VALUE_NONE, 'Instead of using the connection password prompt for a new one'],\n\t\t];\n\t}", "title": "" }, { "docid": "277c7ff0969878400f819b05fc45ab44", "score": "0.69935596", "text": "protected function getOptions()\n {\n return [\n [\n 'class',\n null,\n InputOption::VALUE_OPTIONAL,\n 'The class name of the root seeder'\n ],\n [\n 'database',\n null,\n InputOption::VALUE_OPTIONAL,\n 'The database connection to seed.'\n ],\n [\n 'force',\n null,\n InputOption::VALUE_NONE,\n 'Force the operation to run when in production.'\n ]\n ];\n }", "title": "" }, { "docid": "4d8b87e34c873a4725862b41fd003ee0", "score": "0.6993489", "text": "protected function getOptions()\n {\n return [\n ['cron', null, InputOption::VALUE_NONE, 'Show output cron style', null],\n ];\n }", "title": "" }, { "docid": "7eb0f6a6aaf35facc701fea1f4ad3f8c", "score": "0.6984327", "text": "protected function getOptions()\n {\n return [\n [\n 'fresh',\n '--fresh',\n InputOption::VALUE_OPTIONAL,\n 'Fresh all cache files.',\n false,\n ],\n ];\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.6975668", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "e53dd150405edb52ade020ed865b0ad3", "score": "0.6972897", "text": "protected function getOptions()\n {\n return [\n ['no-clear', null, InputOption::VALUE_NONE, 'Clear previously generated files', null],\n ['no-compile', null, InputOption::VALUE_NONE, \"Don't compile PO files to MO\", null],\n ];\n }", "title": "" }, { "docid": "19101ab5c614c44c7b153c5992e937b1", "score": "0.69625723", "text": "public function getOptions() {\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "19101ab5c614c44c7b153c5992e937b1", "score": "0.69625723", "text": "public function getOptions() {\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "da2a6473bf7afc9e2f8a35fca841d5d3", "score": "0.69610703", "text": "public function get_options() {\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "540f5e882ddbb5245b7b0492fa243ed2", "score": "0.6959542", "text": "public function getOptions () {\n\t\treturn $this->options;\n\t}", "title": "" } ]
095fac8ed75b89959aeda691a7aecd04
Waits for Drupal to accept requests.
[ { "docid": "d0e0709ac0f1fa27c37acf8d4d134e11", "score": "0.6439613", "text": "protected function waitForDrupal()\n {\n return $this->taskExec('sleep 30s');\n }", "title": "" } ]
[ { "docid": "847f4ff4e2a8bd692543f1b1ca0fdb55", "score": "0.6170952", "text": "public function wait();", "title": "" }, { "docid": "b45e2196f47537915eeb867e9d614294", "score": "0.5888239", "text": "public function wait(){ }", "title": "" }, { "docid": "1347d3b52ebd2fcde06c2ced3e15e817", "score": "0.57309306", "text": "private function wait() {\n\t\t$now = microtime(true);\n\n\t\tif (!is_null($this->lastReq)) {\n\t\t\tif ($this->lastReq > ($now - 1000000)) {\n\t\t\t\tusleep($now - $this->lastReq);\n\t\t\t\t$this->lastReq = microtime(true);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->lastReq = $now;\n\t\t}\n\t}", "title": "" }, { "docid": "53a7a46b1bf58ee5d55977c0463e34c5", "score": "0.57211006", "text": "public function wait(): void {}", "title": "" }, { "docid": "f278a2f62ed10213d2ae748650857bdc", "score": "0.5558574", "text": "public function processRequests();", "title": "" }, { "docid": "9a1e18de89c08bf53307f5366940c341", "score": "0.54557157", "text": "private function checkForCompletedRequests()\n {\n\n // Since something's waiting, give curl a chance to process it\n do {\n $mrc = curl_multi_exec($this->multi_handle, $active);\n } while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\n // Now grab the information about the completed requests\n while ($info = curl_multi_info_read($this->multi_handle)) {\n\n $ch = $info['handle'];\n $ch_array_key = (int) $ch;\n\n if (!isset($this->outstanding_requests[$ch_array_key])) {\n die(\"Error - handle wasn't found in requests: '$ch' in \" .\n print_r($this->outstanding_requests, true));\n }\n\n $request = $this->outstanding_requests[$ch_array_key];\n\n $url = $request['url'];\n $content = curl_multi_getcontent($ch);\n // var_dump($content);\n $response = $this->responseParser($content, $ch);\n\n $callback = $request['callback'];\n $user_data = $request['user_data'];\n\n call_user_func($callback, $response, $url, $ch, $user_data);\n\n unset($this->outstanding_requests[$ch_array_key]);\n\n curl_multi_remove_handle($this->multi_handle, $ch);\n\n curl_close($ch);\n }\n\n /*\n // Call select to see if anything is waiting for us\n if (curl_multi_select($this->multi_handle, 0.0) === -1)\n return;\n */\n }", "title": "" }, { "docid": "79116f5bada22aa3626c00df05878f0b", "score": "0.5418038", "text": "protected function wait() {\n while (count($this->channel->callbacks)) {\n $this->channel->wait(\n null,\n $this->config['wait_non_blocking'],\n $this->config['wait_timeout']);\n }\n }", "title": "" }, { "docid": "92ccb2562efbbaafc21bcc068f601ad4", "score": "0.53873116", "text": "private function waitForIndexCompletion()\n {\n while(!$this->noIndexersRunning()) {\n sleep(5);\n }\n }", "title": "" }, { "docid": "27cde7eb98ac35f034ddbc40023fb515", "score": "0.5371712", "text": "public function poll();", "title": "" }, { "docid": "f415e518c076515dab858046c8937c37", "score": "0.533011", "text": "protected function waitUntilServerIsStarted(Guzzle $guzzle, int $limit = 100): void\n {\n for ($i = 0; $i < $limit; $i++) {\n try {\n $guzzle->send(new Request('HEAD', '/'));\n\n return;\n } catch (\\GuzzleHttp\\Exception\\GuzzleException $e) {\n \\usleep(30_000);\n }\n }\n\n $this->fail(\"Server was not started\");\n }", "title": "" }, { "docid": "49e544c0e280553b7112b46e0da77df0", "score": "0.52526104", "text": "public function testWait() {}", "title": "" }, { "docid": "3e3df6f33651fc8a4763f178cc01cea4", "score": "0.5196921", "text": "public function sleepServer () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\t return $this->request(array('req' => 'sleepserver'));\r\n\t}", "title": "" }, { "docid": "31758a94f158d77ebe0e1cab4a5de6ac", "score": "0.5190857", "text": "public static function processRequest()\n {\n $response = self::instance()->match();\n\n if ($response && $response->getStatusCode() !== Response::HTTP_NOT_FOUND) {\n $response->send();\n self::shutdown();\n }\n\n return;\n }", "title": "" }, { "docid": "9d7362b73430a659f4c7fb2421ee93c0", "score": "0.512053", "text": "public function waitForAjax($timeLimit = 10000000) // 10 seconds\n {\n usleep(200000);\n $timeExp = 0;\n $timeRem = $timeLimit;\n while (true) {\n echo $this->ajaxActiveRequests().' = ';\n\n $timeExp = (($timeLimit - $timeRem) / 10000);\n if ($timeRem <= 0 || $this->ajaxStop() == true) {\n echo $timeExp.\" => OK\\n\";\n break;\n }\n usleep(50000); // half of a half a second\n $timeRem = $timeRem - 50000;\n }\n }", "title": "" }, { "docid": "4a4330bc28d448de812fd0f2f723446b", "score": "0.5074637", "text": "public function check_external_blocking() {\r\n\t\t// show notice if external requests are blocked through the WP_HTTP_BLOCK_EXTERNAL constant\r\n\t\tif( defined( 'WP_HTTP_BLOCK_EXTERNAL' ) && WP_HTTP_BLOCK_EXTERNAL === true ) {\r\n\r\n\t\t\t// check if our API endpoint is in the allowed hosts\r\n\t\t\t$host = parse_url( $this->upgrade_url, PHP_URL_HOST );\r\n\r\n\t\t\tif( ! defined( 'WP_ACCESSIBLE_HOSTS' ) || stristr( WP_ACCESSIBLE_HOSTS, $host ) === false ) {\r\n\t\t\t\t?>\r\n\t\t\t\t<div class=\"error\">\r\n\t\t\t\t\t<p><?php printf( __( '<b>Warning!</b> You\\'re blocking external requests which means you won\\'t be able to get %s updates. Please add %s to %s.', 'api-manager-wri_text' ), $this->ame_software_product_id, '<strong>' . $host . '</strong>', '<code>WP_ACCESSIBLE_HOSTS</code>'); ?></p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<?php\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5ccfe61864aa2892b8b7e6cc5b458b5b", "score": "0.5072018", "text": "public function executePending(sfWebRequest $request)\n {\n // nothing to do here.\n }", "title": "" }, { "docid": "d337d6088f8d9033be832870dc33ed6f", "score": "0.5049507", "text": "function user_in_queue()\r\n\t{\r\n\t\t$db=open_db(\"db/system.sqlite\",SQLITE3_OPEN_READONLY);\r\n\t\t$queue=get_setting($db,\"multireq\");\r\n\t\tclose_db($db);\r\n\t\t$db=open_db(\"db/music.sqlite\",SQLITE3_OPEN_READONLY);\r\n\t\t$ip=extract_ids(get_requests_by_ip($db,$_SERVER['REMOTE_ADDR']));\r\n\t\t$open=array_merge(extract_ids(get_requests_by_status($db,0)),extract_ids(get_requests_by_status($db,1)));\r\n\t\t$requests=array_intersect($ip,$open);\r\n\t\tclose_db($db);\r\n\t\tif($queue == \"y\" || count($requests) <= 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "fe790f1e06cd9f722cc7a1f74d92077a", "score": "0.5044453", "text": "public function testClientWaitingForLimit(): void\n {\n $mock = new MockHandler([\n new Response(200, [], '{\"ok\":true,\"result\":{}}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n\n $telegram_client_bot = new TelegramClientBot($handler);\n $telegram_client_bot->clientWaitingForLimit(\n 'Петров Пётр Петрович',\n '79097391754',\n 'ИП «Петров П.П.»',\n 3000,\n 1\n );\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "2eec565d8fba7e9a3731b7f38c0aeb0b", "score": "0.503788", "text": "function drupal_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3, $timeout = 30.0) {\n global $db_prefix;\n\n $result = new stdClass();\n\n // Parse the URL and make sure we can handle the schema.\n $uri = parse_url($url);\n\n if ($uri == FALSE) {\n $result->error = 'unable to parse URL';\n $result->code = -1001;\n return $result;\n }\n\n if (!isset($uri['scheme'])) {\n $result->error = 'missing schema';\n $result->code = -1002;\n return $result;\n }\n\n timer_start(__FUNCTION__);\n\n switch ($uri['scheme']) {\n case 'http':\n case 'feed':\n $port = isset($uri['port']) ? $uri['port'] : 80;\n $host = $uri['host'] . ($port != 80 ? ':'. $port : '');\n $fp = @fsockopen($uri['host'], $port, $errno, $errstr, $timeout);\n break;\n case 'https':\n // Note: Only works for PHP 4.3 compiled with OpenSSL.\n $port = isset($uri['port']) ? $uri['port'] : 443;\n $host = $uri['host'] . ($port != 443 ? ':'. $port : '');\n $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, $timeout);\n break;\n default:\n $result->error = 'invalid schema '. $uri['scheme'];\n $result->code = -1003;\n return $result;\n }\n\n // Make sure the socket opened properly.\n if (!$fp) {\n // When a network error occurs, we use a negative number so it does not\n // clash with the HTTP status codes.\n $result->code = -$errno;\n $result->error = trim($errstr);\n\n // Mark that this request failed. This will trigger a check of the web\n // server's ability to make outgoing HTTP requests the next time that\n // requirements checking is performed.\n // @see system_requirements()\n\n //Locke\n //variable_set('drupal_http_request_fails', TRUE);\n\n return $result;\n }\n\n // Construct the path to act on.\n $path = isset($uri['path']) ? $uri['path'] : '/';\n if (isset($uri['query'])) {\n $path .= '?'. $uri['query'];\n }\n\n // Create HTTP request.\n $defaults = array(\n // RFC 2616: \"non-standard ports MUST, default ports MAY be included\".\n // We don't add the port to prevent from breaking rewrite rules checking the\n // host that do not take into account the port number.\n 'Host' => \"Host: $host\",\n 'User-Agent' => 'User-Agent: Drupal (+http://drupal.org/)',\n );\n\n // Only add Content-Length if we actually have any content or if it is a POST\n // or PUT request. Some non-standard servers get confused by Content-Length in\n // at least HEAD/GET requests, and Squid always requires Content-Length in\n // POST/PUT requests.\n $content_length = strlen($data);\n if ($content_length > 0 || $method == 'POST' || $method == 'PUT') {\n $defaults['Content-Length'] = 'Content-Length: '. $content_length;\n }\n\n // If the server url has a user then attempt to use basic authentication\n if (isset($uri['user'])) {\n $defaults['Authorization'] = 'Authorization: Basic '. base64_encode($uri['user'] . (!empty($uri['pass']) ? \":\". $uri['pass'] : ''));\n }\n\n // If the database prefix is being used by SimpleTest to run the tests in a copied\n // database then set the user-agent header to the database prefix so that any\n // calls to other Drupal pages will run the SimpleTest prefixed database. The\n // user-agent is used to ensure that multiple testing sessions running at the\n // same time won't interfere with each other as they would if the database\n // prefix were stored statically in a file or database variable.\n if (is_string($db_prefix) && preg_match(\"/^simpletest\\d+$/\", $db_prefix, $matches)) {\n $defaults['User-Agent'] = 'User-Agent: ' . $matches[0];\n }\n\n foreach ($headers as $header => $value) {\n $defaults[$header] = $header .': '. $value;\n }\n\n $request = $method .' '. $path .\" HTTP/1.0\\r\\n\";\n $request .= implode(\"\\r\\n\", $defaults);\n $request .= \"\\r\\n\\r\\n\";\n $request .= $data;\n\n $result->request = $request;\n\n // Calculate how much time is left of the original timeout value.\n $time_left = $timeout - timer_read(__FUNCTION__) / 1000;\n if ($time_left > 0) {\n stream_set_timeout($fp, floor($time_left), floor(1000000 * fmod($time_left, 1)));\n fwrite($fp, $request);\n }\n\n // Fetch response.\n $response = '';\n while (!feof($fp)) {\n // Calculate how much time is left of the original timeout value.\n $time_left = $timeout - timer_read(__FUNCTION__) / 1000;\n if ($time_left <= 0) {\n $result->code = HTTP_REQUEST_TIMEOUT;\n $result->error = 'request timed out';\n return $result;\n }\n stream_set_timeout($fp, floor($time_left), floor(1000000 * fmod($time_left, 1)));\n $chunk = fread($fp, 1024);\n $response .= $chunk;\n }\n fclose($fp);\n\n // Parse response.\n list($split, $result->data) = explode(\"\\r\\n\\r\\n\", $response, 2);\n $split = preg_split(\"/\\r\\n|\\n|\\r/\", $split);\n\n list($protocol, $code, $status_message) = explode(' ', trim(array_shift($split)), 3);\n $result->protocol = $protocol;\n $result->status_message = $status_message;\n\n $result->headers = array();\n\n // Parse headers.\n while ($line = trim(array_shift($split))) {\n list($header, $value) = explode(':', $line, 2);\n if (isset($result->headers[$header]) && $header == 'Set-Cookie') {\n // RFC 2109: the Set-Cookie response header comprises the token Set-\n // Cookie:, followed by a comma-separated list of one or more cookies.\n $result->headers[$header] .= ','. trim($value);\n }\n else {\n $result->headers[$header] = trim($value);\n }\n }\n\n $responses = array(\n 100 => 'Continue', 101 => 'Switching Protocols',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content',\n 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed',\n 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported'\n );\n // RFC 2616 states that all unknown HTTP codes must be treated the same as the\n // base code in their class.\n if (!isset($responses[$code])) {\n $code = floor($code / 100) * 100;\n }\n\n switch ($code) {\n case 200: // OK\n case 304: // Not modified\n break;\n case 301: // Moved permanently\n case 302: // Moved temporarily\n case 307: // Moved temporarily\n $location = $result->headers['Location'];\n $timeout -= timer_read(__FUNCTION__) / 1000;\n if ($timeout <= 0) {\n $result->code = HTTP_REQUEST_TIMEOUT;\n $result->error = 'request timed out';\n }\n elseif ($retry) {\n $result = drupal_http_request($result->headers['Location'], $headers, $method, $data, --$retry, $timeout);\n $result->redirect_code = $result->code;\n }\n $result->redirect_url = $location;\n\n break;\n default:\n $result->error = $status_message;\n }\n\n $result->code = $code;\n return $result;\n}", "title": "" }, { "docid": "7a76da021cbd5d859b5ff9a4eea56384", "score": "0.49816278", "text": "public function takeRequests(): void {\n $requests = $this->spider->getLinks();\n foreach($requests as $request) {\n if(in_array($request, $this->requests) == false && in_array($request, $this->sentRequests) == false) { \n $this->requests[] = $request; //Check if this is a repeat request, if not, then add it\n }\n }\n\n }", "title": "" }, { "docid": "cef63ec0da32e89fea2c6103ce6ff732", "score": "0.49752682", "text": "private function listen()\n\t{\n\t\t$connected = true;\n\n\t\twhile ($connected)\n\t\t{\n\t\t\t$this->process();\n\t\t\tusleep(1000);\n\t\t}\n\t}", "title": "" }, { "docid": "84ce6e12f6487ed3baea28eb931409bc", "score": "0.49712938", "text": "public function wait($timeout = 0)\n {\n\n }", "title": "" }, { "docid": "546c592bb00fbcd0e5450a02b67559db", "score": "0.4971123", "text": "public function wait() {\n $seconds = ceil($this->getSecondsRemaining());\n\n if ($seconds > 0) {\n sleep($seconds);\n }\n }", "title": "" }, { "docid": "2fb88d52aaabba6cafb1f11de96335fa", "score": "0.496381", "text": "function waitUntilPageLoaded()\n {\n sleep(1);\n $resourceCount = -1;\n for ($i = 0; $i < 30; $i++) {\n $newResourceCount = $this->executeJS(\"return window.performance.getEntriesByType('resource').length;\");\n if ($newResourceCount != $resourceCount) {\n sleep(1);\n $resourceCount = $newResourceCount;\n continue;\n }\n $cmsSpinnerExists = $this->executeJS(\"return document.querySelector('.cms-content-loading-spinner') ? 1 : 0;\");\n if ($cmsSpinnerExists) {\n sleep(1);\n continue;\n }\n $resourcesLoaded = $this->executeJS(<<<EOT\n try {\n var resources = window.performance.getEntriesByType('resource');\n for (var i = 0; i < resources.length; i++) {\n var resource = resources[i];\n if (!resource.responseEnd) {\n return 0;\n }\n }\n } catch (e) {\n return 0;\n }\n return 1;\nEOT\n );\n sleep(1);\n if ($resourcesLoaded) {\n return;\n }\n }\n\n Logger::get()->warn(\"Page did not fully load after 30 seconds\");\n }", "title": "" }, { "docid": "b737042b43e9ce413b8c6fbd442c3c2f", "score": "0.49559474", "text": "function wait_for_user_input() {\n\t$fp = fopen( 'php://stdin', 'r' );\n\n\tif ( $fp ) {\n\t\t/**\n\t\t * The program will stuck here until a user press a key.\n\t\t */\n\t\tfgets( $fp );\n\n\t\tfclose( $fp );\n\t}\n}", "title": "" }, { "docid": "640f5a2564000af3d204406848c16408", "score": "0.49395368", "text": "public function __sleep() {\n\t\t$this->close();\n\t\treturn array('request_key', 'host', 'port', 'compression');\n\t}", "title": "" }, { "docid": "4efee40ee44cc7cea63f77a057e2ea0d", "score": "0.49383837", "text": "public function run() {\n $this->_start = time();\n foreach($this->_parsers as &$parser) {\n $parser['obj']->configure();\n $this->addLinks($parser['obj']->getStartupURLs());\n }\n\n while(1) {\n $waiting = $this->_process->getWaitingJobs();\n $queue = count($this->_links);\n if ( $waiting == 0 && $queue == 0 ) break; \n else if ( $waiting >= Config::get('max_threads') ) sleep(1);\n else if ( $queue > 0 ) $this->sendJob();\n else { sleep(1); }\n }\n }", "title": "" }, { "docid": "24e1480761aeff015d72777a78fb09f5", "score": "0.492619", "text": "public function go() \r\n {\r\n while (count($this->requests) > 0 || count($this->timeouts) > 0) {\r\n \r\n //echo count($this->requests) . ' / ' . count($this->timeouts) . \" - r/t \\n\";\r\n // check timeouts...\r\n $i = 0;\r\n $ts = microtime(true);\r\n while ($i < count($this->timeouts)) {\r\n $t = $this->timeouts[$i];\r\n if ($t['from'] + $t['delay'] < $ts) {\r\n $t = $this->timeouts[$i];\r\n array_splice($this->timeouts, $i, 1);\r\n\r\n $args = array();//?\r\n call_user_func_array($t['callback'], $args);\r\n\r\n usleep(1000);\r\n continue 2; //!\r\n }\r\n $i++;\r\n }\r\n //...\r\n\r\n $active = 1;\r\n while ($active > 0) {\r\n $i = count($this->requests);\r\n while ($i > 0 && $active > 0) {\r\n $i--;\r\n $mrc = curl_multi_exec($this->requests[$i]->multiHandle, $active);\r\n }\r\n if ($active > 0) {\r\n usleep(1000);\r\n continue 2; //!\r\n }\r\n }\r\n\r\n $completed = $this->requests[$i];\r\n $content = curl_multi_getcontent($completed->handle);\r\n \r\n // http://stackoverflow.com/questions/4017911/curl-and-redirects-returning-multiple-headers\r\n $curlInfo = curl_getinfo($completed->handle);\r\n $headerSize = $curlInfo[\"header_size\"];\r\n $responseHeaders = substr($content, 0, $headerSize);\r\n $content = substr($content, $headerSize);\r\n //?\r\n\r\n curl_multi_remove_handle($completed->multiHandle, $completed->handle);\r\n curl_multi_close($completed->multiHandle);\r\n\r\n $this->requests[$i] = $this->requests[count($this->requests) - 1];\r\n array_pop($this->requests);\r\n\r\n if ((count($this->requests) < $this->maxRequests) && (count($this->queue) > 0)) {\r\n $x = array_pop($this->queue);\r\n $this->_request($x); \r\n }\r\n\r\n if (curl_error($completed->handle)) {\r\n $completed->emit(self::ERROR, curl_error($completed->handle), $completed->url, $completed->handle);\r\n } else {\r\n $completed->emit(self::SUCCESS, $content, $completed->url, $completed->handle); \r\n }\r\n $completed->emit(self::COMPLETE, $content, $completed->url, $completed->handle, $responseHeaders);\r\n\r\n curl_close($completed->handle);\r\n }\r\n }", "title": "" }, { "docid": "1464fc1cd4cf2c1b57de1043a2323342", "score": "0.4923993", "text": "public function listen()\n {\n asyncCall(function () {\n $server = Server::listen($this->uri);\n\n while (null !== $socket = yield $server->accept()) {\n $this->handleNewClient($socket);\n }\n });\n }", "title": "" }, { "docid": "7ac6d208ad70cb65486ac1817a14c571", "score": "0.49101043", "text": "function process() {\r\n\t\t\tif ( ! $this->isXmlRpcRequest() ) {\r\n\t\t\t\t$this->requestNotXmlRpc();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t$this->_server->serve();\r\n\t\t}", "title": "" }, { "docid": "a71a1ec1b5a8cfbb2ab2513032dbef6c", "score": "0.4877787", "text": "public function poll()\n\t{\n\t\t$still_running = 0; // number of requests still running.\n\n\t\tdo\n\t\t{\n\t\t\t$result = curl_multi_exec($this->_handle, $still_running);\n\n\t\t\tif ($result == CURLM_OK)\n\t\t\t{\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\t$messages_in_queue = 0;\n\t\t\t\t\t$info = curl_multi_info_read($this->_handle, $messages_in_queue);\t\n\t\t\t\t\tif ($info && isset($info['handle']) && isset($this->_curls[(int)$info['handle']]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$callback_info = $this->_curls[(int)$info['handle']];\n\n\t\t\t\t\t\t$curl_data = curl_multi_getcontent($info['handle']);\n\t\t\t\t\t\t$curl_info = curl_getinfo($info['handle']);\n\n\t\t\t\t\t\tcall_user_func($callback_info['callback'], $curl_info, $curl_data, $callback_info['callback_data']);\n\n\t\t\t\t\t\t$this->removeHandle($info['handle']);\n\t\t\t\t\t\tcurl_close($info['handle']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile($messages_in_queue > 0);\n\t\t\t}\n\t\t}\n\t\twhile ($result == CURLM_CALL_MULTI_PERFORM && $still_running > 0);\n\n\t\t// don't trust $still_running, as user may have added more urls\n\t\t// in callbacks\n\t\treturn (boolean)$this->_curls;\n\t}", "title": "" }, { "docid": "344d9992785d8298ce4b52ea2bf58f2c", "score": "0.48713902", "text": "public function wait($seconds = 0);", "title": "" }, { "docid": "935c7622e609e1d97ac35bc52a25e13f", "score": "0.48440146", "text": "private function __sleep() {}", "title": "" }, { "docid": "935c7622e609e1d97ac35bc52a25e13f", "score": "0.48440146", "text": "private function __sleep() {}", "title": "" }, { "docid": "935c7622e609e1d97ac35bc52a25e13f", "score": "0.48440146", "text": "private function __sleep() {}", "title": "" }, { "docid": "05336c36a1f1372a18acc2680fe13cd8", "score": "0.48340502", "text": "protected function waitLoadForm()\n {\n $rootElement = $this->_rootElement;\n $selector = $this->loadsForm;\n $this->browser->waitUntil(\n function () use ($rootElement, $selector) {\n $inputs = $rootElement->getElements($selector);\n $i = 0;\n foreach ($inputs as $input) {\n if ($input->isVisible()) {\n ++$i;\n }\n }\n return $i == 1 ? true : null;\n }\n );\n }", "title": "" }, { "docid": "3abd0ba71e31ce97a5b6c2fc2a6117a0", "score": "0.4829889", "text": "protected function block()\n {\n curl_multi_select($this->handle);\n return true;\n }", "title": "" }, { "docid": "48c046e2d33051169713396c2b4a2324", "score": "0.48211223", "text": "public function isWaiting()\n {\n\n }", "title": "" }, { "docid": "73a06bfd50830c378912cc24f4f703fa", "score": "0.48058814", "text": "function process_request()\n {\n }", "title": "" }, { "docid": "1d024089a9a450db52dfce158d410413", "score": "0.47985122", "text": "public function whenStartLongWaiting()\n {\n // do nothing, maybe you want to write logs\n }", "title": "" }, { "docid": "d94f8c748c4c6f07765e92fdb8031c80", "score": "0.4774498", "text": "private function __sleep()\r\n\t{\r\n\t}", "title": "" }, { "docid": "a56cebb62da7be519c4cebd10d31ba21", "score": "0.4772832", "text": "function getAcceptCountRequests();", "title": "" }, { "docid": "e888f852ce25aa73dcc49db6671975fe", "score": "0.47718284", "text": "public function handlerNeedsRequest();", "title": "" }, { "docid": "7029ab0334fffed3f7935b9cc7ebc5cc", "score": "0.47559655", "text": "protected function wait_for_ok($f) {\n\t\t$response = \"\";\n\t\tdo {\n\t\t\t$response = $this->get_string($f);\n\t\t\t$this->result[] = $response;\n\t\t} while ($response != \"OK\");\n\t}", "title": "" }, { "docid": "e2128d5cbdc7c53a3af30ff66a50e25e", "score": "0.47444692", "text": "protected function url_grab($url){\n\t\t$count=0;\n\t\twhile(true){\n\t\t\t$html = $this->geneanet->get($url);\n\t\t\t$this->delay();\n\t\t\tif($html !== false){\n\t\t\t\tif(! $this->check_incorrect($html))\n\t\t\t\t\treturn $html;\n\n\t\t\t\techo \"# incorrect request : $url\\n\";\n\n\t\t\t\t$count++;\n\t\t\t\tif($count > 10){\n\t\t\t\t\techo \"# giving up for : $url\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tsleep(5);\n\n\t\t\t}\n\t\t\tsleep(5);\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "5a9fc628bedbe22d78a8912ed5c0eb9c", "score": "0.47031578", "text": "public static function request()\n {\n }", "title": "" }, { "docid": "af96eee44c625918131a48f02888c0f7", "score": "0.4682862", "text": "private function waitForBroker(string $bname) {\n $api = $this->apis[$bname];\n for ($resp=null, $i=0 ; $i<10 ; $i++) {\n usleep(500000);\n $resp = $api->sendRequest('ping');\n if (isset($resp))\n break;\n }\n $this->tc->assertEquals(\"pong\", $resp['result'], \"Broker \" . $bname . \" does no more respond correctly\");\n }", "title": "" }, { "docid": "0204400ef53d43ca744ee97784d0d572", "score": "0.46776116", "text": "public function finishAllRequests()\n {\n $this->waitForOutstandingRequestsToDropBelow(1);\n }", "title": "" }, { "docid": "32ab3925a4a2148fcda4c57adaa1fbef", "score": "0.46722037", "text": "function drupal_http_request($url, array $options = array()) {\n // implementation.\n $override_function = variable_get('drupal_http_request_function', FALSE);\n if (!empty($override_function) && function_exists($override_function)) {\n return $override_function($url, $options);\n }\n\n $result = new stdClass();\n\n // Parse the URL and make sure we can handle the schema.\n $uri = @parse_url($url);\n\n if ($uri == FALSE) {\n $result->error = 'unable to parse URL';\n $result->code = -1001;\n return $result;\n }\n\n if (!isset($uri['scheme'])) {\n $result->error = 'missing schema';\n $result->code = -1002;\n return $result;\n }\n\n timer_start(__FUNCTION__);\n\n // Merge the default options.\n $options += array(\n 'headers' => array(),\n 'method' => 'GET',\n 'data' => NULL,\n 'max_redirects' => 3,\n 'timeout' => 30.0,\n 'context' => NULL,\n );\n\n // Merge the default headers.\n $options['headers'] += array(\n 'User-Agent' => 'Drupal (+http://drupal.org/)',\n );\n\n // stream_socket_client() requires timeout to be a float.\n $options['timeout'] = (float) $options['timeout'];\n\n // Use a proxy if one is defined and the host is not on the excluded list.\n $proxy_server = variable_get('proxy_server', '');\n if ($proxy_server && _drupal_http_use_proxy($uri['host'])) {\n // Set the scheme so we open a socket to the proxy server.\n $uri['scheme'] = 'proxy';\n // Set the path to be the full URL.\n $uri['path'] = $url;\n // Since the URL is passed as the path, we won't use the parsed query.\n unset($uri['query']);\n\n // Add in username and password to Proxy-Authorization header if needed.\n if ($proxy_username = variable_get('proxy_username', '')) {\n $proxy_password = variable_get('proxy_password', '');\n $options['headers']['Proxy-Authorization'] = 'Basic ' . base64_encode($proxy_username . (!empty($proxy_password) ? \":\" . $proxy_password : ''));\n }\n // Some proxies reject requests with any User-Agent headers, while others\n // require a specific one.\n $proxy_user_agent = variable_get('proxy_user_agent', '');\n // The default value matches neither condition.\n if ($proxy_user_agent === NULL) {\n unset($options['headers']['User-Agent']);\n }\n elseif ($proxy_user_agent) {\n $options['headers']['User-Agent'] = $proxy_user_agent;\n }\n }\n\n switch ($uri['scheme']) {\n case 'proxy':\n // Make the socket connection to a proxy server.\n $socket = 'tcp://' . $proxy_server . ':' . variable_get('proxy_port', 8080);\n // The Host header still needs to match the real request.\n $options['headers']['Host'] = $uri['host'];\n $options['headers']['Host'] .= isset($uri['port']) && $uri['port'] != 80 ? ':' . $uri['port'] : '';\n break;\n\n case 'http':\n case 'feed':\n $port = isset($uri['port']) ? $uri['port'] : 80;\n $socket = 'tcp://' . $uri['host'] . ':' . $port;\n // RFC 2616: \"non-standard ports MUST, default ports MAY be included\".\n // We don't add the standard port to prevent from breaking rewrite rules\n // checking the host that do not take into account the port number.\n $options['headers']['Host'] = $uri['host'] . ($port != 80 ? ':' . $port : '');\n break;\n\n case 'https':\n // Note: Only works when PHP is compiled with OpenSSL support.\n $port = isset($uri['port']) ? $uri['port'] : 443;\n $socket = 'ssl://' . $uri['host'] . ':' . $port;\n $options['headers']['Host'] = $uri['host'] . ($port != 443 ? ':' . $port : '');\n break;\n\n default:\n $result->error = 'invalid schema ' . $uri['scheme'];\n $result->code = -1003;\n return $result;\n }\n\n if (empty($options['context'])) {\n $fp = @stream_socket_client($socket, $errno, $errstr, $options['timeout']);\n }\n else {\n // Create a stream with context. Allows verification of a SSL certificate.\n $fp = @stream_socket_client($socket, $errno, $errstr, $options['timeout'], STREAM_CLIENT_CONNECT, $options['context']);\n }\n\n // Make sure the socket opened properly.\n if (!$fp) {\n // When a network error occurs, we use a negative number so it does not\n // clash with the HTTP status codes.\n $result->code = -$errno;\n $result->error = trim($errstr) ? trim($errstr) : t('Error opening socket @socket', array('@socket' => $socket));\n\n // Mark that this request failed. This will trigger a check of the web\n // server's ability to make outgoing HTTP requests the next time that\n // requirements checking is performed.\n // See system_requirements().\n variable_set('drupal_http_request_fails', TRUE);\n\n return $result;\n }\n\n // Construct the path to act on.\n $path = isset($uri['path']) ? $uri['path'] : '/';\n if (isset($uri['query'])) {\n $path .= '?' . $uri['query'];\n }\n\n // Only add Content-Length if we actually have any content or if it is a POST\n // or PUT request. Some non-standard servers get confused by Content-Length in\n // at least HEAD/GET requests, and Squid always requires Content-Length in\n // POST/PUT requests.\n $content_length = strlen($options['data']);\n if ($content_length > 0 || $options['method'] == 'POST' || $options['method'] == 'PUT') {\n $options['headers']['Content-Length'] = $content_length;\n }\n\n // If the server URL has a user then attempt to use basic authentication.\n if (isset($uri['user'])) {\n $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : ':'));\n }\n\n // If the database prefix is being used by SimpleTest to run the tests in a copied\n // database then set the user-agent header to the database prefix so that any\n // calls to other Drupal pages will run the SimpleTest prefixed database. The\n // user-agent is used to ensure that multiple testing sessions running at the\n // same time won't interfere with each other as they would if the database\n // prefix were stored statically in a file or database variable.\n $test_info = &$GLOBALS['drupal_test_info'];\n if (!empty($test_info['test_run_id'])) {\n $options['headers']['User-Agent'] = drupal_generate_test_ua($test_info['test_run_id']);\n }\n\n $request = $options['method'] . ' ' . $path . \" HTTP/1.0\\r\\n\";\n foreach ($options['headers'] as $name => $value) {\n $request .= $name . ': ' . trim($value) . \"\\r\\n\";\n }\n $request .= \"\\r\\n\" . $options['data'];\n $result->request = $request;\n // Calculate how much time is left of the original timeout value.\n // FIXME MIGUEL\n $timeout = $options['timeout'] - timer_read(__FUNCTION__) / 1000;\n //$timeout = 0;\n\n if ($timeout > 0) {\n stream_set_timeout($fp, floor($timeout), floor(1000000 * fmod($timeout, 1)));\n fwrite($fp, $request);\n }\n\n // Fetch response. Due to PHP bugs like http://bugs.php.net/bug.php?id=43782\n // and http://bugs.php.net/bug.php?id=46049 we can't rely on feof(), but\n // instead must invoke stream_get_meta_data() each iteration.\n $info = stream_get_meta_data($fp);\n $alive = !$info['eof'] && !$info['timed_out'];\n $response = '';\n\n while ($alive) {\n // Calculate how much time is left of the original timeout value.\n // FIXME\n $timeout = $options['timeout'] - timer_read(__FUNCTION__) / 1000;\n //$timeout = 0;\n if ($timeout <= 0) {\n $info['timed_out'] = TRUE;\n break;\n }\n stream_set_timeout($fp, floor($timeout), floor(1000000 * fmod($timeout, 1)));\n $chunk = fread($fp, 1024);\n $response .= $chunk;\n $info = stream_get_meta_data($fp);\n $alive = !$info['eof'] && !$info['timed_out'] && $chunk;\n }\n fclose($fp);\n\n if ($info['timed_out']) {\n $result->code = HTTP_REQUEST_TIMEOUT;\n $result->error = 'request timed out';\n return $result;\n }\n // Parse response headers from the response body.\n // Be tolerant of malformed HTTP responses that separate header and body with\n // \\n\\n or \\r\\r instead of \\r\\n\\r\\n.\n list($response, $result->data) = preg_split(\"/\\r\\n\\r\\n|\\n\\n|\\r\\r/\", $response, 2);\n $response = preg_split(\"/\\r\\n|\\n|\\r/\", $response);\n\n // Parse the response status line.\n $response_status_array = _drupal_parse_response_status(trim(array_shift($response)));\n $result->protocol = $response_status_array['http_version'];\n $result->status_message = $response_status_array['reason_phrase'];\n $code = $response_status_array['response_code'];\n\n $result->headers = array();\n\n // Parse the response headers.\n while ($line = trim(array_shift($response))) {\n list($name, $value) = explode(':', $line, 2);\n $name = strtolower($name);\n if (isset($result->headers[$name]) && $name == 'set-cookie') {\n // RFC 2109: the Set-Cookie response header comprises the token Set-\n // Cookie:, followed by a comma-separated list of one or more cookies.\n $result->headers[$name] .= ',' . trim($value);\n }\n else {\n $result->headers[$name] = trim($value);\n }\n }\n\n $responses = array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Time-out',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Large',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested range not satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Time-out',\n 505 => 'HTTP Version not supported',\n );\n // RFC 2616 states that all unknown HTTP codes must be treated the same as the\n // base code in their class.\n if (!isset($responses[$code])) {\n $code = floor($code / 100) * 100;\n }\n $result->code = $code;\n\n switch ($code) {\n case 200: // OK\n case 201: // Created\n case 202: // Accepted\n case 203: // Non-Authoritative Information\n case 204: // No Content\n case 205: // Reset Content\n case 206: // Partial Content\n case 304: // Not modified\n break;\n case 301: // Moved permanently\n case 302: // Moved temporarily\n case 307: // Moved temporarily\n $location = $result->headers['location'];\n $options['timeout'] -= timer_read(__FUNCTION__) / 1000;\n if ($options['timeout'] <= 0) {\n $result->code = HTTP_REQUEST_TIMEOUT;\n $result->error = 'request timed out';\n }\n elseif ($options['max_redirects']) {\n // Redirect to the new location.\n $options['max_redirects']--;\n $result = drupal_http_request($location, $options);\n $result->redirect_code = $code;\n }\n if (!isset($result->redirect_url)) {\n $result->redirect_url = $location;\n }\n break;\n default:\n $result->error = $result->status_message;\n }\n\n return $result;\n}", "title": "" }, { "docid": "b14cfdcf2896936b908270aa24b62965", "score": "0.46706843", "text": "public function readyRead();", "title": "" }, { "docid": "745524ad8fb93fdcf1d36624dc684fb3", "score": "0.46706712", "text": "protected function accept()\n {\n Reactor::getInstance()->add($this->server, Reactor::ALL, $this->createConn());\n Reactor::getInstance()->loop();\n }", "title": "" }, { "docid": "e14f973c4ca40e4d63d7572296b8829d", "score": "0.46642715", "text": "public function ping()\n\t{\n\t\tif ($this->callback_url) {\n\t\t\t$ch = curl_init($this->callback_url);\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 2);\n\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, false);\n\t\t\tcurl_exec($ch);\n\t\t\tcurl_close($ch);\n\t\t}\n\t}", "title": "" }, { "docid": "ba8e767a651efea71501eb125d5cae4c", "score": "0.46605694", "text": "public function awaitInspectNodeRequested(ContextInterface $ctx): InspectNodeRequestedEvent;", "title": "" }, { "docid": "5d53813d7f5b0ef3e6ef5e8df4197a19", "score": "0.46504536", "text": "function NeedToWait(WFCase\\WFCaseItem $caseItem, $input, $from)\n {\n return true; // Don't continue\n }", "title": "" }, { "docid": "7b167551ae6793a85657eafc49f07b11", "score": "0.46176004", "text": "public function isBlocking()\n {\n return false;\n }", "title": "" }, { "docid": "541c13af2fb2930e143174709c4c31fc", "score": "0.4615208", "text": "public function __sleep() {}", "title": "" }, { "docid": "431e72108b03f6c6aabbb61baaf0f452", "score": "0.46109033", "text": "protected function waitForAjaxRequestsFinished()\n {\n $this->driver->wait()->until(function(){\n return $this->driver->executeScript(\n 'if (window.angular === undefined) {\n\n return true\n } else {\n return angular.element(\\'[ng-app=\"mapcont\"]\\')\n .injector().get(\\'$http\\').pendingRequests.length === 0}'\n );\n }, 'Ajax requests not finished before the timeout');\n }", "title": "" }, { "docid": "027bd0efe1983b651a2e30c2531ad076", "score": "0.46107283", "text": "public function waitForAll( $pos ) {\n\t\twfProfileIn( __METHOD__ );\n\t\t$this->mWaitForPos = $pos;\n\t\t$serverCount = count( $this->mServers );\n\t\tfor ( $i = 1; $i < $serverCount; $i++ ) {\n\t\t\tif ( $this->mLoads[$i] > 0 ) {\n\t\t\t\t$this->doWait( $i, true );\n\t\t\t}\n\t\t}\n\t\twfProfileOut( __METHOD__ );\n\t}", "title": "" }, { "docid": "1dfcb566abd9d591b3e1cc04784a838f", "score": "0.46095333", "text": "function wait($n=1)\n {if(!is_int($n)){$n=1;}; if($n<1){$n=1;}; $t=($n*1000); usleep($t);}", "title": "" }, { "docid": "da775bd724c61b157392b09737c2a61f", "score": "0.4609065", "text": "protected function processDelayed() {\n $offset = (int) $this->client->getOption('http.restTimeOffset', 0);\n if($offset > 0) {\n $offset = $offset / 1000;\n \n $this->client->addTimer($offset, function () {\n $this->process();\n });\n \n return;\n }\n \n $this->process();\n }", "title": "" }, { "docid": "3e9d240fb6aae82bf25c7c70751ffbd0", "score": "0.46055904", "text": "public function active(): ExtendedPromiseInterface\n {\n return $this->http->get(Endpoint::bind(Endpoint::GUILD_THREADS_ACTIVE, $this->vars['guild_id']))\n ->then(function ($response) {\n return $this->handleThreadPaginationResponse($response);\n });\n }", "title": "" }, { "docid": "e7074362191cdd7da885bda5a9604236", "score": "0.45950577", "text": "public static function menu_blocking() {\n\t}", "title": "" }, { "docid": "ef35436ea63608d48850a7b24e279c8c", "score": "0.45939374", "text": "public function __sleep() {\n\t\tif($this->isValid()) {\n\t\t\t$this->_xmlString = $this->_xmlElement->asXml();\n\t\t}\n\t\telse {\n\t\t\t$this->_xmlString = '';\n\t\t}\n\t\treturn array('_xmlString', '_httpResponse', '_service');\n\t}", "title": "" }, { "docid": "31b11c1e1801ea0a947d0a4006d400e6", "score": "0.45921338", "text": "protected function isReachable()\n {\n try\n {\n $this->transport->get($this->server_url, array('_probe' => true));\n \n return true;\n }\n catch (Exception $e)\n {\n return false;\n }\n }", "title": "" }, { "docid": "7b67be555db77fc44b4c62a0f3618d67", "score": "0.45876712", "text": "private function doReq() {\n\n\t\t$ch = curl_init();\n\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->url);\n\t\tcurl_setopt($ch, CURLOPT_FAILONERROR, 1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 15);\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Lalicious/1.0');\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, $this->user .':' .$this->password);\n\n\t\t$counter = 0;\n\t\tdo {\n\t\t\t$this->wait();\n\t\t\t$response = curl_exec($ch);\n\t\t\t$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\t\t++$counter;\n\t\t\tif($httpcode == 500 or $httpcode == 999) {\n\t\t\t\tthrow new DeliciousConnectionException('Delicious has throttled the application. Attempts: ' . $counter . '. HTTP code: \"' . $httpcode . '\". URL: ' . $this->url);\n\t\t\t}\n\t\t} while(!$response and $counter < 10);\n\n\t\tif($response) {\n\t\t\treturn $response;\n\t\t} else {\n\t\t\tthrow new DeliciousConnectionException('No response from Delcious after ' . $counter . ' attempts. URL: ' . $this->url . 'User: ' . $this->user . '. Password: ' . substr($this->password, 0, 1) . '...' . substr($this->password, -1));\n\t\t}\n\n\t}", "title": "" }, { "docid": "6e1eed521ef7e95f8c7a819d32b7368a", "score": "0.45828855", "text": "public function accept()\n {\n $msgtype = $message = null;\n $success = msg_receive($this->id, 1, $msgtype, 100, $message, true, MSG_NOERROR);\n return $success;\n }", "title": "" }, { "docid": "94890686fc4fb1ee39bc9e2479a3e51e", "score": "0.45805103", "text": "public function __sleep()\n {\n return array('_nodesById');\n }", "title": "" }, { "docid": "031b7b03e54df4e5b5471a1a2e9efd78", "score": "0.45802683", "text": "public function requestPerPage()\n {\n foreach ($this->nb_per_page as $i) {\n $content = $this->guzzle->get('https://google.com/search?q=' . $this->search . '&start=' . $i);\n $this->content = $content->getBody()->getContents();\n $this->extractPerPage();\n sleep(6);\n }\n }", "title": "" }, { "docid": "f4f2db89efffb2eb7d92bfbbf924a0a2", "score": "0.4567624", "text": "public function wait(): Either;", "title": "" }, { "docid": "3ff5752359c389be2a3a6c86dfa5b50c", "score": "0.45654252", "text": "public function sleep()\n\t{\n\t}", "title": "" }, { "docid": "616851a16fb7c739ad84443d6656cc38", "score": "0.45624036", "text": "public function recieveNotification()\n {\n $this->waitForElementVisible(objectMap::$notificationForm,30);\n }", "title": "" }, { "docid": "c55e5b3c88489397f9cb7e314e13673a", "score": "0.45557055", "text": "function BusyWait($seconds) {\n $start = time();\n while (time() - $start < $seconds);\n}", "title": "" }, { "docid": "29a5523d94a07495818da458bb685890", "score": "0.45469227", "text": "public function testVisitavailable()\n {\n $response = $this->call('GET', '/');\n $this->assertEquals(200, $response->status());\n }", "title": "" }, { "docid": "5f578d23280d7ea75cc173bb63303e8f", "score": "0.4546019", "text": "public function idle(): Promise;", "title": "" }, { "docid": "2cf6b3fdd3d8d8fa4614fb6988e975bf", "score": "0.45348734", "text": "public function hangup() \n\t{\n\t\t$this->response->hangup();\n\t}", "title": "" }, { "docid": "fc33ca81cf741b2d4dcf0b5a546a2269", "score": "0.45254686", "text": "abstract protected function result_is_ready();", "title": "" }, { "docid": "110c2c18e16095863cc16998cb723cc7", "score": "0.45143387", "text": "private function request() {\n\n return $this->ping->getrq();\n\n }", "title": "" }, { "docid": "b59cd7a1915b41a62813ce8fa2f33c44", "score": "0.45108488", "text": "public function __test_request__pre_http_request( $preempt, $r, $url ) {\n\n\t\t$this->http_requests[] = array( 'r' => $r, 'url' => $url );\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4c498ae25917dd7a428f6df246b72b90", "score": "0.4509731", "text": "public function schedule()\n {\n // Loop through each request\n foreach ($this as $Request) {\n if (($Response = $this->getInfo()) instanceof IResponse) {\n\n // Is request Running? next.\n if (isset($Response['Running']) ? (bool) $Response['Running'] : false) {\n continue;\n\n // Is request Finished? next.\n } elseif (isset($Response['Finished']) ? (bool) $Response['Finished'] : false) {\n continue;\n\n // Retrieve resources\n } elseif (is_resource($Handle = $this->_lock($Request->URI['host']))) {\n // Start request\n $this->_start($Request, $Handle);\n }\n }\n }\n }", "title": "" }, { "docid": "a63e6567982d94d703309f3eb69dbd75", "score": "0.44982043", "text": "private function ___sleep( $sRequestURI ) {\n\n $_sAPIRequestLock = AmazonAutoLinks_Registry::TRANSIENT_PREFIX . '_LOCK_APIREQUEST';\n $_iIteration = 0;\n while( $this->getTransient( $_sAPIRequestLock ) && $_iIteration < 3 ) {\n sleep( 1 );\n $_iIteration++;\n }\n $this->setTransient(\n $_sAPIRequestLock,\n $sRequestURI, // any data will be sufficient\n 1 // one second\n );\n }", "title": "" }, { "docid": "fcd0969036f8bedf6d9276d0b358d112", "score": "0.44977853", "text": "public function wait(Promise $promise);", "title": "" }, { "docid": "13689805daa7bd48f3b87f1dda51b8f0", "score": "0.4491959", "text": "public function sendInstalledReq()\n {\n $pageViewParams = [\n 'dl' => self::GA_PAGEVIEW_URL . self::FASTLY_INSTALLED_FLAG,\n 'dh' => preg_replace('#^https?://#', '', rtrim(self::GA_PAGEVIEW_URL,'/')),\n 'dp' => '/'.self::FASTLY_INSTALLED_FLAG,\n 'dt' => ucfirst(self::FASTLY_INSTALLED_FLAG),\n 't' => self::GA_HITTYPE_PAGEVIEW\n ];\n\n $this->_sendReqToGA($pageViewParams, self::GA_HITTYPE_PAGEVIEW);\n\n $eventParams = [\n 'ec' => self::GA_FASTLY_SETUP,\n 'ea' => 'Fastly '.self::FASTLY_INSTALLED_FLAG,\n 'el' => $this->getWebsiteName(),\n 'ev' => 0,\n 't' => self::GA_HITTYPE_EVENT\n ];\n\n $result = $this->_sendReqToGA(array_merge($pageViewParams, $eventParams));\n\n return $result;\n }", "title": "" }, { "docid": "a336fa5a2fe0e55d53df7a36aaf026ab", "score": "0.44912454", "text": "public function gatherMatches(){\n\t\t// Do first lookup on last 100 matches or so\n\t\t$page = $this->lookupUser(0);\n\t\t\n\t\t// Counts number of matches found\n\t\t$num_matches = 0;\n\t\t$test = 0;\t// Used to prevent bugs\\infinite loops for now\n\t\t// Loop while theres still more matches to gather\n\t\twhile($page->result->results_remaining > 1 && $test<7){\n\t\t\t$i = 0;\n\t\t\t// Itterate through match results TODO: (check that it's actually hitting all matches)\n\t\t\twhile($i < $page->result->num_results){\n\t\t\t\tarray_push($this->matches, $page->result->matches[$i]->match_id);\n\t\t\t\t$i++;\n\t\t\t\t$num_matches++;\n\t\t\t}\n\t\t\t// Request another page\n\t\t\t$page = $this->lookupUser($this->matches[$num_matches-1]);\t\n\t\t\t// Pop last entry off to prevent duplicats from start_match\n\t\t\tarray_pop($this->matches);\n\t\t\t$num_matches--;\n\t\t\t//echo \">> \" . count($this->matches) . \"<br>\";\n\t\t\t//echo \"Matches Remaining: \" . $page->result->results_remaining . \"<br>\";\n\t\t\tsleep(1);\t// Dont kill valve servers yet\n\t\t\t$test++;\n\t\t}\n\t}", "title": "" }, { "docid": "5bc39936e4f637f86ac8bae4c3bde94a", "score": "0.4490561", "text": "public function isNoWait();", "title": "" }, { "docid": "468c50138b4c82a145869217126c29ed", "score": "0.4485203", "text": "public function sendRequest(): void {\n if(count($this->requests) > 0) {\n $this->pages[] = $this->downloader->request($this->requests[0]);\n $this->sentRequests[] = $this->requests[0];\n array_splice($this->requests, 0, 1); //Cut off the now sent request\n }\n }", "title": "" }, { "docid": "3153ca8ba961c0c92378d56cf0150629", "score": "0.44808483", "text": "function __sleep()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "138316b32c188553ca5169fa480a50bf", "score": "0.44757265", "text": "public function __sleep()\n {\n if ($this->contextManager) {\n $this->fallbackContext = $this->contextManager->getContext();\n }\n if ($this->translator) {\n $this->fallbackLabel = $this->getLabel();\n }\n $this->getChildren(); // Trigger the storage of children families before discarding the familyRegistry\n\n return SleepUtility::sleep(__CLASS__, ['translator', 'familyRegistry', 'contextManager']);\n }", "title": "" }, { "docid": "d9b3516e0e516b0b565fd8ad23fe7df0", "score": "0.44704342", "text": "public function active(): ExtendedPromiseInterface\n {\n return $this->http->get(Endpoint::bind(Endpoint::CHANNEL_THREADS_ACTIVE, $this->vars['channel_id']))\n ->then(function ($response) {\n return $this->handleThreadPaginationResponse($response);\n });\n }", "title": "" }, { "docid": "6407cbd704568cbd8d261986502cba16", "score": "0.44658458", "text": "protected function sleepBeforeRequest()\n {\n $sleepUSeconds = rand(\n self::$sleepBeforeSecondRequest[0] * 1000000,\n self::$sleepBeforeSecondRequest[1] * 1000000\n );\n $sleepSeconds = floor($sleepUSeconds / 1000000);\n $this->dump(\" wait {$sleepSeconds}s before next request\", '');\n while ($sleepSeconds > 0) {\n sleep(1);\n $this->dump('.', '');\n $sleepSeconds--;\n $sleepUSeconds -= 1000000;\n }\n usleep($sleepUSeconds);\n $this->dump('');\n }", "title": "" }, { "docid": "c25d3585288e37c5e3bbebd2a3dda509", "score": "0.44649434", "text": "function http() {\n /*\n Seconds to attempt socket connection before giving up.\n */\n $this->connect_timeout = 30; \n \n /*\n Seconds to wait for stream to do its thing and return.\n In my experience, if you do nothing, this defaults to 60 seconds.\n Now here is the kicker--if you set this to 10 seconds and the request\n actually takes 83 seconds, your script will sit and wait the entire 83\n seconds before returning the failure! So I'm not sure what the real\n point is. For example, if it takes 83 seconds and does in fact succeed,\n but you had the timeout set at 60, you will return a failure even though\n the communication worked. Point is, set this higher than anything you\n think you'll need. Either way you have to wait!\n */\n $this->stream_timeout = 60;\n\n $this->clean(); \n\n return true;\n }", "title": "" }, { "docid": "221ee8f1082d5e7ee23f6450f6e313a1", "score": "0.4464254", "text": "public function test_a_user_can_browse_all_threads()\n {\n $response = $this->get('/threads');\n $response->assertSee($this->thread->title);\n }", "title": "" }, { "docid": "78b164aa15542a85661ee2db5e0f1bcb", "score": "0.44622743", "text": "function kiko(){\r\n\tif (file_exists('mostafa.txt')) {\r\n\t\techo \"good file is found\".'<br>';\r\n\t}\r\n\telse{\r\n\t\tsleep(5);\r\n\t\tkiko();\r\n\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "c475b5ac7fec7cacf0cd7f9d65ff075b", "score": "0.44598308", "text": "private function keepTransactionAlive() {\n $ch = curl_init();\n curl_setopt_array($ch, [\n CURLOPT_URL => $this->txUrl . '/fcr:tx',\n CURLOPT_POST => 1,\n CURLOPT_FAILONERROR => 1,\n CURLOPT_SSL_VERIFYPEER => 0,\n CURLOPT_SSL_VERIFYHOST => 0,\n CURLOPT_HTTPAUTH => CURLAUTH_BASIC,\n CURLOPT_USERPWD => RC::get('fedoraUser') . ':' . RC::get('fedoraPswd'),\n ]);\n $flag = true;\n while ($flag) {\n sleep($this->txKeepAlive);\n curl_exec($ch);\n $code = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $flag = !in_array($code, [410, 500]);\n }\n }", "title": "" }, { "docid": "50b30f6f53a7d63f78819cb957ead6fa", "score": "0.4454748", "text": "public function waitForPageLoad(Browser $browser)\n {\n $browser->waitFor($this->inputSearchBox);\n }", "title": "" }, { "docid": "40848ac1507ca5dab8bbb3939f65181a", "score": "0.4452773", "text": "private function waitForToken( $name ) {\n\t\t$now = microtime( true );\n\n\t\t$timeSinceLastToken = $now - $this->buckets[ $name ]['lastTokenTakenAt'];\n\t\t$intervalWait = max( $this->minTakeInterval - $timeSinceLastToken, 0 );\n\n\t\t$requiredTokens = max( 1 - $this->buckets[ $name ]['tokens'], 0 );\n\t\t$refillWait = $requiredTokens / $this->getFillRate();\n\n\t\t$totalWait = max( $intervalWait, $refillWait );\n\t\tif ( $totalWait > 0 ) {\n\t\t\tusleep( $totalWait * self::MICROSECONDS_PER_SECOND );\n\t\t}\n\n\t\t$this->refillBucket( $name );\n\t\treturn;\n\t}", "title": "" }, { "docid": "3ea57067964cc7e5c6414b677d5e6f10", "score": "0.4448594", "text": "abstract protected function request();", "title": "" }, { "docid": "7d6b7cffab43eaded36a7484f313656e", "score": "0.44310865", "text": "public function acquire() {}", "title": "" }, { "docid": "570b39323e4d282d7f55ca50ce655884", "score": "0.44286853", "text": "public function __sleep(){\n\t\t$this->close();\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9010f5719b50c737f426bda0a77affab", "score": "0.44277105", "text": "public function request();", "title": "" }, { "docid": "9010f5719b50c737f426bda0a77affab", "score": "0.44277105", "text": "public function request();", "title": "" } ]
d7a55a52fa73545cac80601cd7edccab
Metodo que sirve para registrar usuarios
[ { "docid": "5e47540cbe7773874c3b8ccb8b73f241", "score": "0.65210396", "text": "public static function registrar($usuario)\n {\n $query = \"INSERT INTO usuarios (nombre,email,usuario,password,privilegio) VALUES (:nombre,:email,:usuario,:password,:privilegio)\";\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->bindParam(\":nombre\", $usuario['nombre']);\n $resultado->bindParam(\":email\", $usuario['email']);\n $resultado->bindParam(\":usuario\", $usuario['usuario']);\n $resultado->bindParam(\":password\", $usuario['password']);\n $resultado->bindParam(\":privilegio\", $usuario['privilegio']);\n\n if ($resultado->execute()) {\n return true;\n }\n\n return false;\n }", "title": "" } ]
[ { "docid": "6bd305158ddc51facd264e98edd46be7", "score": "0.76911414", "text": "public function registrar(){\n\t\t$usuario = new Usuario();\n\t\t$usuario ->setTipoDocumento($_POST[\"tipoDocumento\"]);\n\t\t$usuario ->setNumeroDocumento($_POST[\"numeroDocumento\"]);\n\t\t$usuario ->setNombres($_POST[\"nombres\"]);\n\t\t$usuario ->setApellidos($_POST[\"apellidos\"]);\n\t\t$usuario ->setNombreUsuario($_POST[\"nombreUsuario\"]);\n\t\t$usuario ->setClave($_POST[\"clave\"]);\n\n\t\t\n\t\t$rta = self::$usuarioServicio -> registrarUsuario($usuario);\n\n\t\t$mensaje = $rta ? \"Usuario registrado correctamente\" : \"Error registrando el usuario\";\n\n\t\t$tiposDocumentos = self::$tdServicio -> consultarTodos();\n\n\t\tself::$template->render(\n\t\t\tDIR_VIEW.\"usuario/registro.php\",\n\t\t\t[\"titulo\"=>\"Usuarios - Registro\", \"tiposDocumentos\"=>$tiposDocumentos, \"mensaje\"=>$mensaje]);\t\n\t}", "title": "" }, { "docid": "8e90f4b3f0133995319b3bd2ec329d81", "score": "0.74906707", "text": "function register(){\r\n\t$camposValidos=true;\r\n\tif(!isset($_POST['phone'])){\r\n\t\taddNotificacion('El numero de telefono no es correcto', 'danger');\r\n\t\t$camposValidos=false;\r\n\t}\r\n\tif(!isset($_POST['email'])){\r\n\t\taddNotificacion('El email no es correcto', 'danger');\r\n\t\t$camposValidos=false;\r\n\t}\r\n\tif($camposValidos){\r\n\t\t$user = new User();\r\n\t\t$user->register(array(\r\n\t\t\t'name' => $_POST['name'],\r\n\t\t\t'username' => $_POST['username'],\r\n\t\t\t'password' => $_POST['password'],\r\n\t\t\t'role' => 'popular',\r\n\t\t\t'phone' => $_POST['phone'],\r\n\t\t\t'email' => $_POST['email']\r\n\t\t\t\r\n\t\t));\t\r\n\t}else{\r\n\t\taddNotificacion('No se creo el usuario', 'danger');\r\n\t}\r\n\t\r\n\t\r\n\tredirecionar($GLOBALS['INDEX']);\r\n}", "title": "" }, { "docid": "b9d4e5d376d6e7b0e6c96b04563e43d8", "score": "0.7383433", "text": "public function new_user_registration(){\n //Verifique validação para a entrada do usuário em forma Sign Up\n \n }", "title": "" }, { "docid": "d6b55c130f741015fc4fdf69bfc103f8", "score": "0.73590505", "text": "public function register()\n {\n\n $datos = [];\n $datos[\"nombre\"] = $this->sanitizeValue($_POST[\"name_input\"]);\n $datos[\"apellido\"] = $this->sanitizeValue($_POST[\"surname_input\"]);\n $datos[\"email\"] = $this->sanitizeValue($_POST[\"email_input\"]);\n $datos[\"password\"] = $this->sanitizeValue($_POST[\"password_input\"]);\n //TODO: SACAR HARCODEO\n $datos[\"rol\"] = \"null\" ;\n\n // Instancio y seteo los valores\n $this->model->set($datos);\n\n $row = $this->model->existsUser();\n\n // Valido si el usuario ya existe?\n if (empty($row)) {\n\n // Hasheo la password\n $hash = $this->model->passwordHash();\n $this->model->setPassword($hash);\n\n // Inserto en DB\n $this->model->insert();\n\n } else {\n throw new UserExistsException(\"El usuario ya existe\");\n }\n\n $titulo = \"Registro Exitoso\";\n $this->twigLoader(\"index.view.twig\", compact(\"titulo\"));\n }", "title": "" }, { "docid": "7bec57495b0668590287e8c62836672a", "score": "0.7344328", "text": "public function regUser(){\n\t\t//defino campos requeridos\n\t\t$required_fields = array('nombre','email','tipo_usuario','telefono','password','password2');\n\t\t//si todos los campos requeridos estan continuamos\n\t\tif($this->campos_requeridos($required_fields,true) == true){\n\t\t\t$this->validar_email(true);\t\t\t\t\t\t//email valido y no existe(true)\n\t\t\t$this->validar_passwords();\t\t\t\t\t//pasword existen y coinciden\n\t\t\t$this->validar_telefono($_POST['telefono'],true);\t//telefono valido y no existe\n\t\t\t$this->validar_empresa();\t\t\t\t\t\t//es empresa, verificaciones extra\n\t\t}else{\n\t\t\treturn $this->error;\t\t\t\t\t//deben completarse los campos requeridos\n\t\t}\n\n\t\tif(is_null($this->error)){\n\n\t\t\t$email = $_POST['email'];\n\t\t\t$tipo \t = $_POST['tipo_usuario'];\n\t\t\t$password = $_POST['password'];\n\t\t\t$tel\t = $_POST['telefono'];\n\n\t\t\t//5-encriptado de contraseña (Cuidado de no pasarte)\n\t\t\t$random_salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true));\n\t\t\t$password \t = hash('sha512', $password.$random_salt);\n\t\t\t//datos que van a tabla usuarios\n\t\t\t$campos = array('salt'\t => $random_salt, \t'ip' \t\t => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\t\t \t'pass' \t => $password,\t\t'tipo_usuario' => $tipo,\n\t\t\t\t\t\t \t'user_telefono' => $tel,\t\t'user_email' \t => $_POST['email'],\n\t\t\t\t\t\t \t'user_nombre' => $_POST['nombre'], 'fecha_alta' => $this->now);\n\n\t\t\t//6-si inserto el nuevo user en usuarios\n\t\t\t$this->last_id = $this->insert('usuarios',$campos);\n\n\t\t\tif(!is_null($this->last_id)){\n\t\t\t\t//aqui ha registrado al usuario en tabla usuarios\n\t\t\t\t\n\t\t\t\tif($tipo == 'particular'){ \t \t\t\t\t\t\n\t\t\t\t\t//si se registra como particular\n\t\t\t\t\t$paquete = 1;\n\t\t\t\t\t$tabla_destino = 'perfiles_par';\n\t\t\t\t\t$cols2 = array('id' => $this->last_id);\n\t\t\t\t}else if($tipo == 'empresa'){\n\t\t\t\t\t//si se registra como empresa\n\t\t\t\t\t$paquete = 10;\n\t\t\t\t\t$tabla_destino = 'perfiles_emp';\n\t\t\t\t\t//datos que van a tabla empresas\n\t\t\t\t\t$cols2 = array('id' \t\t\t => $this->last_id,\n\t\t\t\t\t\t\t\t 'empresa'\t\t => $_POST['nombre_empresa'],\n\t\t\t\t\t\t\t\t 'empresa_telefono' => $_POST['empresa_telefono'],\n\t\t\t\t\t\t\t\t 'tipo_empresa' \t => $_POST['tipo_empresa'],\n\t\t\t\t\t\t\t\t 'nif' \t\t\t => $_POST['nif'],\n\t\t\t\t\t\t\t\t 'user_telefono'\t => $tel);\n\t\t\t\t\t\n\t\t\t\t\t$this->reg_banners_catalogo();//7-empresa, fila en banners_catalogo\n\t\t\t\t\t$this->reg_empresa_fondo();\t\t//fila en empresa_fondo\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->insert($tabla_destino, $cols2);\t\t\t//8-reparte a particulares o empresa \n\t\t\t\t$this->reg_paquete($this->last_id,$paquete);\t//9-reg primer paquete de anuncios del user\n\t\t\t\t$this->reg_registro();\t\t\t\t\t\t\t//10-estadisticas de conexion\n\t\t\t\t\n\t\t\t\t$_SESSION['new_user'] = $this->last_id;\t\t\t//11 final\n\t\t\t\t\n\t\t\t\t//y le enviamos email de verificacion siiiii\n\t\t\t\theader('location:index.php?accion=val&validation='.$random_salt);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn $this->errores[10];\n\t\t\t}\n\t\t}else{\n\t\t\treturn $this->error;\n\t\t}\n\n\t}", "title": "" }, { "docid": "bf7c282431da7637874c5dc3057c91f6", "score": "0.7321409", "text": "function registrasi(){}", "title": "" }, { "docid": "64ccd7068d50d0adb1dd81100b7f5ebb", "score": "0.72759855", "text": "public function registrar(){\n \n $codigo = $_POST['codigo'];\n $password = password_hash($_POST['password'], PASSWORD_BCRYPT);\n $nombre = $_POST['nombre'];\n $apellido = $_POST['apellido'];\n $correo = $_POST['correo'];\n $telefono = $_POST['telefono'];\n $fechaingreso = $_POST['fechaingreso'];\n $tipo = $_POST['tipo'];\n $estado = $_POST['estado'];\n \n //2. Crear un objeto Estudiante y enviar a actualizar\n $usuarios = new usuarios(0,$codigo,$password,$nombre,$apellido,$correo,$telefono,$fechaingreso,$tipo,$estado); \n \n //3. llamar al modelo para registar un Estudiante\n $this->model->registrarUsuario($usuarios);\n \n //4. redirección index. \n $mensaje= \"Usuario Registrado de Manera Correcta!\";\n Util::mostarAlerta($mensaje);\n }", "title": "" }, { "docid": "4060563098c4faa1df4ac5ce85cf7fe4", "score": "0.72474647", "text": "public static function registrar_usuario(){\n\n\n\t\t\t$Persona = new Persona($_POST['nombres'],$_POST['apellidos'],$_POST['cedula'],$_POST['sexo']);\n\n\t\t\t$Usuario = new Usuario($_POST['usuario'],$_POST['contrasena'],$_POST['permisos'],1);\n\t\t\n\t\t\tif (($Persona->crearPersona()) AND ($Usuario->crearUsuario())){\n\t\t\t\tif($Persona->enlazar_usuario($Usuario->getUsuario())){\n\t\t\t\t\tif ($_POST['permisos']=='0001') {\n\t\t\t\t\t\t$Usuario->enlazar_profesor();\n\t\t\t\t\t\theader('Location:./?mod=login/usuarios&reg=1');\n\t\t\t\t\t}\n\t\t\t\t\t\theader('Location:./?mod=login/usuarios&reg=1');\n\t\t\t\t\t\t//Si el usuario es creado correctamente\n\t\t\t\t}else{\n\t\t\t\t\t$con = new Conexion;\n\t\t\t\t\t$id_usu = $con->extraer('Select id from usuario where usuario = :usuario',['usuario'=>$Usuario->getUsuario()]);\n\t\t\t\t\t$id_per = $con->extraer('Select id from persona where cedula = :cedula',['cedula'=>$Persona->getCedula()]);\n\n\t\t\t\t\theader('Location:./?mod=login/usuarios&reg=2&code=2.'.$id_usu[0]['id'].'.'.$id_per[0]['id']);\n\t\t\t\t\t//Usuario y persona creados pero no enlazados\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\theader('Location:./?mod=login/usuarios&reg=0');\n\t\t\t\t//Usuario o Persona no fueron creados\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "25fe91150446ec420a534b47d5936d20", "score": "0.72071636", "text": "public function registrar() {\n\t\t$usuario = Container::getModel('Usuario');\n\n\t\tif(file_exists($_FILES['imagem_perfil']['tmp_name'])){\n\t\t\t$usuario->imagem_perfil = $_FILES['imagem_perfil'];\n\t\t}\n\t\t$usuario->__set('nome', $_POST['nome']);\n\t\t$usuario->__set('telefone', $_POST['telefone']);\n\t\t$usuario->__set('email', $_POST['email']);\n\t\t$usuario->__set('senha', md5($_POST['senha']));\n\n\t\tif($usuario->validarCadastro() && count($usuario->getUsuarioPorEmail()) == 0){\n\t\n\t\t\tif($usuario->salvar()){\n\t\t\t\theader('Location: /login');\n\t\t\t}\n\n\t\t}else{\n\t\t\t$this->view->usuario = array(\n\t\t\t\t'nome' => $_POST['nome'],\n\t\t\t\t'telefone' => $_POST['telefone'],\n\t\t\t\t'email' => $_POST['email'],\n\t\t\t\t'senha' => $_POST['senha']\n\t\t\t);\n\t\t\t$this->view->erroCadastro = true;\n\t\t\t$this->render('inscreverse');\n\t\t}\n\t}", "title": "" }, { "docid": "1cf7a70379a6bfeb355faa44c392a136", "score": "0.7172292", "text": "public function regUsuario(){\n\t\textract($_POST);\n\t\t$respuesta = usuario_modelo::mdl_regUsuario($nombre,$correo,$telefono);\n\t\tif ($respuesta==1) {\n\t\t\techo \"<br /> se a registrado un usuario\";\n\t\t}else{\n\t\t\techo \"<br /> error al registrar\";\n\t\t}\n\t}", "title": "" }, { "docid": "66e796c63b6933e57778513f97c655d4", "score": "0.7110081", "text": "function do_register() {\n global $config;\n \n $this->vars['title'] = 'Nutzerkonto anlegen';\n\n if (!empty($_POST)) {\n $rs = mysql_query('SELECT id FROM users WHERE mail = '\n . \"'\" . mysql_real_escape_string($_POST['mail']) . \"'\");\n if (mysql_fetch_object($rs)) { \n $this->message('Dieses Konto existiert bereits', 'error');\n }\n else {\n if ($user_id = $this->save()) {\n $this->message(\"Herzlich willkommen, {$_POST['vorname']}. Ihr Nutzerkonto muss noch freigeschaltet werden.\");\n\n mail($config['admin_email'], \"[pipinstrasse.de] Neuer Nutzer {$_POST['mail']}\", \n \"Nutzer #{$user_id} freischalten: http://{$_SERVER['HTTP_HOST']}/admin/user\"\n );\n\n $this->redirect('/user/login');\n }\n else {\n $this->message(mysql_error());\n }\n }\n }\n $this->render('user_edit');\n }", "title": "" }, { "docid": "e1c0d9fd42b4b8730691b8f81c9e83f5", "score": "0.704969", "text": "public function register()\n {\n //Sanitize Post\n $post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n if($post['submit'])\n {\n\n $this->CreateQuery('INSERT INTO users (username, email, password) VALUES(:username, :email, :password)');\n $this->bind(':username', $post['username']);\n $this->bind(':email', $post['email']);\n $this->bind(':password', password_hash($post['password'], PASSWORD_BCRYPT));\n $this->Execute();\n\n if($this->lastInsertID())\n {\n $this->LogMessage(LoggerCodes::Info, \"User \".$post['username'].\" registered account.\");\n header('Location: '.ROOT_URL.\"/\");\n }\n }\n }", "title": "" }, { "docid": "407298327091317ccaebb9ad05361f57", "score": "0.70283616", "text": "function RegistroUsuario ($email, $pass, $nom, $user) {\r\n\t\t\r\n\t\t\r\n\t\t// valida datos y los inserta en la base de datos para el alta de un nuevo usuario.\r\n\t\t$comp=$this->validarEmaliUser ($email, $user);\r\n\t\tif ($comp['email']) {\r\n\t\t\treturn \"<span class='error'> El e-mail ya esta en uso </span>\";\r\n\t\t}elseif ($comp['user']) {\r\n\t\t\treturn \"<span class='error'> El usuario ya esta en uso </span>\";\r\n\t\t}else{\r\n\t\t\t$this->conexion->connect();\r\n\t\t\t$query = \"INSERT INTO usuarios (email, contrasena, nombre , nombre_usuario , fotoperfil ) VALUES ('$email' , '$pass', '$nom', '$user', -1 )\";\r\n\t\t\t$this->idusuario = $this->conexion->query($query);\r\n\t\t\techo \"<span class='exito'> Registrado con exito</span>\";\t\r\n\t\t\t$album = new Album();\r\n\t\t\t$album->CrearAlbum ($this->idusuario , $user);\r\n\t\t\t$this->conexion->close();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "de7cad5541bc1d0f7181d529e1970d3d", "score": "0.70104194", "text": "public function register() {\n if (isset($_GET['user'])) {\n\n if (isset($_GET['add-new'])) {\n $this->showAddNew();\n } else if (isset($_GET['edit']) && isset($_GET['id'])) {\n $this->showEdit($_GET['id']);\n } else {\n $this->getMain(\"Пользователи\");\n }\n\n }\n }", "title": "" }, { "docid": "a09b447d3bcf733c5f67a625da8d5698", "score": "0.7009736", "text": "public function register_user()\n {\n \n return true;\n \n }", "title": "" }, { "docid": "b52590c9c46c49cfb2727a7c0cbf81dd", "score": "0.7005401", "text": "public function registraUsuario($nombre,$email,$usuario,$password){\r\n try { \r\n $query = $this->dbh->prepare(\"insert into usuario values(null, :nombre, :email, :usuario,:password, 'bloqueado')\");\r\n $query->bindParam(':nombre', $nombre);\r\n $query->bindParam(':email', $email);\r\n $query->bindParam(':usuario', $usuario);\r\n $password = md5($password);\r\n $query->bindParam(':password', $password);\r\n $query->execute();\r\n //Añadimos la clave de firmas.\r\n $idUsuario = $this->dbh->lastInsertId();\r\n $this->set_claves($idUsuario);\r\n \r\n $this->dbh = null;\r\n } catch (PDOException $e) {\r\n $e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "2a0bfba169a3c4119403f70d6a2049ec", "score": "0.70029813", "text": "public function registrar(){\n\t\tif(Base::checkAuthToken()){\n\t\t\theader('Location: /');\n\t\t}\n\n\t\t//Instancia um usuário para tratar os dados recebidos do fomulário\n\t\t$user = Container::getModel('Usuario');\n\t\t$user->__set('login', $_POST['login']);\n\t\t$user->__set('senha', password_hash(md5($_POST['senha']), PASSWORD_ARGON2I));\n\t\t$user->__set('email', $_POST['email']);\n\n\t\t//Verifica se os dados do usuario são válidos\n\t\tif($user->validarCadastro()){\n\t\t\t//verifica se existe um usuario com o mesmo login desejado\n\t\t\tif(count($user->getUsuarioPorLogin()) == 0){\n\t\t\t\t//verifica se existe um usuario com o mesmo email desejado\n\t\t\t\tif(count($user->getUsuarioPorEmail()) == 0){\n\t\t\t\t\t//Realiza o cadastro do usuario no bd e carrga a view de login\n\t\t\t\t\t$user->salvar();\n\t\t\t\t\t$this->view->cadastroRealizado = true;\n\t\t\t\t\t$this->view->dados = Array(\n\t\t\t\t\t\t'login' => '',\n\t\t\t\t\t\t'senha' => ''\t\n\t\t\t\t\t\t);\n\t\t\t\t\t$this->view->erroLogin = '';\n\t\t\t\t\t$this->view->erroCadastro = '';\n\t\t\t\t\t$this->render('login');\n\t\t\t\t}else{ //erro \"email ja cadastrado\"\n\t\t\t\t\t$this->view->dados = array(\n\t\t\t\t\t\t'login' => $_POST['login'],\n\t\t\t\t\t\t'email' => $_POST['email'],\n\t\t\t\t\t\t'senha' => $_POST['senha'],\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->view->cadastroRealizado = false;\n\t\t\t\t\t$this->view->erroCadastro = 'email_existente';\n\t\t\t\t\t$this->view->erroLogin = '';\n\t\t\t\t\t$this->render('login');\n\t\t\t\t}\n\t\t\t}else{ // erro \"login ja cadastrado\"\n\t\t\t\t$this->view->dados = array(\n\t\t\t\t\t'login' => $_POST['login'],\n\t\t\t\t\t'email' => $_POST['email'],\n\t\t\t\t\t'senha' => $_POST['senha'],\n\t\t\t\t);\n\n\t\t\t\t$this->view->cadastroRealizado = false;\n\t\t\t\t$this->view->erroCadastro = 'login_existente';\n\t\t\t\t$this->view->erroLogin = '';\n\t\t\t\t$this->render('login');\n\t\t\t}\n\t\t\t\n\t\t}else{ // erro \"dados do formulario não sao válidos\"\n\n\t\t\t$this->view->dados = array(\n\t\t\t\t'login' => $_POST['login'],\n\t\t\t\t'email' => $_POST['email'],\n\t\t\t\t'senha' => $_POST['senha'],\n\t\t\t);\n\n\t\t\t$this->view->cadastroRealizado = false;\n\t\t\t$this->view->erroCadastro = $user->__get('erro');\n\t\t\t$this->view->erroLogin = '';\n\t\t\t$this->render('login');\n\t\t}\n\t}", "title": "" }, { "docid": "5c695f09dab981b42c41bd71033a5f7d", "score": "0.6975335", "text": "private function registerNewUser()\n {\n if($_POST['secret'] !== 'ferramentas') {\n $this->errors[] = \"Palavra secreta vazia ou errada\";\n } elseif (empty($_POST['user_name'])) {\n $this->errors[] = \"Nome de usuário vazio\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Senha vazia\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"A senha e a verificação de senha não coincidem\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Senha tem menos de 6 caracteres\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Nome de usuário não pode ter menos de 2 ou mais de 64 caracteres\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Nome de usuário não está conforme o padronizado: apenas a-Z ou números são permitidos, de 2 a 64 caracteres\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email não pode ser vazio\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email não pode ser maior que 64 caracteres\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"O seu email não está em um formato válido\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_name = '\" . $user_name . \"' OR user_email = '\" . $user_email . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"Desculpe, mas este nome de usuário / email já foi usado.\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_password_hash, user_email)\n VALUES('\" . $user_name . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"Sua conta foi criada com sucesso. Você pode agora efetuar login.\";\n } else {\n $this->errors[] = \"Desculpe, seu registro falhou. Por favor retorne e tente novamente.\";\n }\n }\n } else {\n $this->errors[] = \"Desculpe, sem conexão com o banco de dados. Favor checar conexão de internet.\";\n }\n } else {\n $this->errors[] = \"Aconteceu um erro desconhecido\";\n }\n }", "title": "" }, { "docid": "991d999668b41632dfa77ee2ef7a7f27", "score": "0.69669527", "text": "public function registerNewUser()\n\t{\n\t\t$Request= new Request();\n\t\t$Server=$Request->getAsInt(\"i_Server\");\n\t\t$Controler_Main= Controler_Main::getInstance();\n\t\t$Controler_Main->setDataBaseId($Server);\n\t\t$ErrorString=\"\";\n\t\tif(strlen($Request->getAsString(\"tb_Name\"))<3){$ErrorString.=\":T_REGISTER_ERROR1: <br />\";}\n\t\tif(strlen($Request->getAsString(\"tb_Pass\"))<5){$ErrorString.=\":T_REGISTER_ERROR2: <br />\";}\n\t\tif(strlen($Request->getAsString(\"tb_Pass\"))===$Request->getAsString(\"tb_PassConfirme\")){$ErrorString.=\":T_REGISTER_ERROR3:<br />\";}\n\t\t$UserFinder= new UserFinder();\n\t\tif(strlen($Request->getAsString(\"tb_Mail\"))>3)\n\t\t{\n\t\t\t$User=$UserFinder->findByMail($Request->getAsString(\"tb_Mail\"));\n\t\t\tif($User->getId()!=0)\n\t\t\t{\n\t\t\t\t$ErrorString.=\":T_REGISTER_ERROR4: <br />\";\n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t$ErrorString.=\":T_REGISTER_ERROR5: <br />\";\n\t\t}\t\n\t\tif(strlen($Request->getAsString(\"tb_Mail\"))===$Request->getAsString(\"tb_MailConfirme\")){$ErrorString.=\":T_REGISTER_ERROR6:<br />\";}\n\t\tif(strlen($Request->getAsString(\"tb_Name\")))\n\t\t{\n\t\t\t$User=$UserFinder->findByName($Request->getAsString(\"tb_Name\"));\n\t\t\tif($User->getId()!=0){$ErrorString.=\":T_REGISTER_ERROR7: <br />\";}\n\t\t}\n\t\t\n\t\t\n\t\tif(!$this->isMailCorrect($Request->getAsString(\"tb_Mail\")))\n\t\t{\n\t\t\t$ErrorString.=\":T_REGISTER_ERROR8: <br />\";\n\t\t}\t\n\t\t\n\t\t/*if(strtolower($_SESSION['Captcha'])!=(strtolower($Request->getAsString(\"tb_Captcha\"))))\n\t\t{\n\t\t\t$ErrorString.=\":T_REGISTER_ERROR9: <br />\";\n\t\t}*/\n\t\t\n\t\tif(strlen($Request->getAsString(\"email\")))\n\t\t{\n\t\t\t$ErrorString.=\":T_REGISTER_ERROR9: <br />\";\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(strlen($ErrorString)!=0)\n\t\t{\n\t\t\t$this->showRegister($ErrorString);\n\t\t\t//$this->setCaptchaCode();\n\t\t\treturn false;\n\t\t}\n\t\t$User= new User(0,$Request->getAsString(\"tb_Name\"),$Request->getAsString(\"tb_Pass\"),$Request->getAsString(\"tb_Mail\"),0,1,0,0);\t\n\t\t$UserManager= new UserManager();\n\t\t$UserManager->insertUser($User);\n\t\t$User->setId($UserManager->getLastInsertId());\n\t\t\n\t\tif(!$UserManager->getLastInsertId())\n\t\t{\n\t\t\t$this->showRegister($ErrorString);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$UserManager->insertUserToForumDataBase($User,$Server);\n\t\t//var_dump($Server);\n\t\t\n\t\t$this->setUserToMap($User);// setzt den spieler auf die karte und generiert im notfall sonnen systeme \n\t\t// erste schiffe setzten\n\t\t$UnitManager= new UnitManager();\n\t\t$TempString1=\"d:0;sh:50;hh:0;b:0;bs:0\";\n\t\t$TempString2=\"d:0;sh:0;hh:50;b:0;bs:0\";\n\t\t$TempString3=\"d:50;sh:0;hh:0;b:0;bs:0\";\n\t\t$ShipFinder= new ShipFinder();\n\t\t$Ship1=$ShipFinder->findById(3);\n\t\t$Ship2=$ShipFinder->findById(4);\n\t\t$Ship3=$ShipFinder->findById(2);\t\n\t\t$TempDMG1=$Ship1->getDMG()*50;\n\t\t$TempDMG2=$Ship2->getDMG()*50;\n\t\t$TempDMG3=$Ship3->getDMG()*50;\n\t\t$Storage1=$Ship1->getStorage()*50;\n\t\t$Storage2=$Ship2->getStorage()*50;\n\t\t$Storage3=$Ship3->getStorage()*50;\n\t\t$Healts1=$Ship1->getHealth()*50;\n\t\t$Healts2=$Ship2->getHealth()*50;\n\t\t$Healts3=$Ship3->getHealth()*50;\n\t\t$Stored=\"t:500;m:0;b:0;c:0;\";\n\t\t$PlanetFinder = new PlanetFinder();\n\t\t$Planet = $PlanetFinder->findByUserId($User->getId())->getByIndex(0);\n\t\t$X = mt_rand($Planet->getX()-50, $Planet->getX()+50);\n\t\t$Y = mt_rand($Planet->getY()-50, $Planet->getY()+50);\n\t\t$NewUnit1= new Unit(0,\"Hunter\",$TempString1,$TempDMG1,$Ship1->getAmor(),$Ship1->getSpeed(),$Healts1,$User,0,0,$X,$Y,1,$Storage1,$Stored,0,0,new Task());\n\t\t$UnitManager->insertUnit($NewUnit1);\n\t\t$X = mt_rand($Planet->getX()-50, $Planet->getX()+50);\n\t\t$Y = mt_rand($Planet->getY()-50, $Planet->getY()+50);\n\t\t$NewUnit2= new Unit(0,\"Heavy Hunter\",$TempString2,$TempDMG2,$Ship2->getAmor(),$Ship2->getSpeed(),$Healts2,$User,20,0,$X,$Y,1,$Storage2,$Stored,0,0,new Task());\n\t\t$UnitManager->insertUnit($NewUnit2);\n\t\t$X = mt_rand($Planet->getX()-50, $Planet->getX()+50);\n\t\t$Y = mt_rand($Planet->getY()-50, $Planet->getY()+50);\n\t\t$NewUnit3= new Unit(0,\"Probe\",$TempString3,$TempDMG3,$Ship3->getAmor(),$Ship3->getSpeed(),$Healts3,$User,10,0,$X,$Y,1,$Storage3,$Stored,0,0,new Task());\n\t\t$UnitManager->insertUnit($NewUnit3);\t\n\n\n\t\t// STATS anlegen\n\t\t$Statsmanger = new StatsManager();\n\t\t$Statsmanger->createStats($User);\n\t\t\n\t\t\n\t\t//$this->showLogin();\n\t\t\n\t\t// wenn von einem freund geworben dann dem werber ein level schenken\n\t\tif($_SESSION['FriendID']) // wenn der Spieler (neuer Spieler) von einem anderen spieler (werber) geworben wurde die Id des Werbers\n\t\t{\n\t\t\t// User ziehen \n\t\t\t// ein Level schencken\n\t\t\t$Friend=$UserFinder->findById($_SESSION['FriendID']);\n\t\t\t$EXP=$Friend->getExpForNextLevel()+1;\n\t\t\t//$Friend->addExperience($EXP);\n\t\t\t$UserManager->addExperiance($Friend->getId(),$EXP);\n\t\t\t$UserManager->updateUserCredits($Friend->getCredits()+USER_FRIEND_UINVTE_CREDITS,$Friend->getId());// dem werbenten freund 100k Credits gut schreiben\n\t\t\t//$UserManager->updateFriendID($User->getId(),$Friend->getId());\n\t\t\t// nachrichten verschicken an den werber das er ein Level bekommen hat und ein Level geschenkt bekommen hat\n\t\t\t$Controler_Message= new Controler_Message();\n\t\t\t$Controler_Message->sendMessage(\"\",\"Administrator\",\"Spieler: \".$Friend->getName().\", Mail: \".$Friend->getMail().\" hat Credits und Level erhalten - Server: \".$_SESSION['DataBase'],\"Neuer User geworben\");\n\t\t\t$Controler_Message->sendMessage(\"System\", $Friend->getName(),\":T_REGISTER_MSG1_PART1: \".$User->getName().\" :T_REGISTER_MSG1_PART2:\",\":T_REGISTER_MSG1_PART3:\");\t\n\t\t}\n\t\t\n\t\t\n\t\t// Willkommensnachricht\n\t\t$Controler_Message= new Controler_Message();\n\t\t$Controler_Message->sendMessage(\"\",\"Administrator\",\"Spieler: \".$User->getName().\", Mail: \".$User->getMail().\" hat sich angemeldet - Server: \".$_SESSION['DataBase'],\"Neuer User\");\n\n\t\t$Controler_Message->sendMessage(\"System\", $User->getName(),\":T_REGISTER_MSG1_PART4:\",\":T_REGISTER_MSG1_PART5:\");\n\t\t\n\t\t//$this->addPlanets();// fügt planeten auf die karte\n\t\t$this->userLogin();\n\t}", "title": "" }, { "docid": "f8191fe2c1ba5fe8d533a5e819684bd3", "score": "0.6933025", "text": "public function post_add_users() {\n\t\tif(!post::agree()) {\n\t\t\tdebug_lib::fatal(\"[[please agree the regulation]]\");\n\t\t} \n\t\t\n\t\tif(isset($_SESSION['load_captcha']) && $_SESSION['load_captcha']) {\n\t\t\tif(post::captcha() != $_SESSION['CAPTCHA_GNA']){\n\t\t\t\tdebug_lib::fatal(\"captcha incorrect\");\n\t\t\t}\n\t\t}\n\n\t\t$this->sql(\"loginCounter.register\", \"register\");\n\n\t\tlist($users, $person) = $this->makeQuery();\n\t\t$users->setPassword(md5(post::nationalcode()));\n\t\t$sqlUsers = $users->insert();\n\t\t$users_id = $sqlUsers->LAST_INSERT_ID();\n\t\t$sqlPerson = $person\n\t\t->setUsers_id($users_id)->insert();\n\t\t$username = \t$this->sql()->tableUsers()->whereId($users_id)->limit(1)->select()->assoc(\"username\");\n\t\t\n\t\t$sqlBridge = $this->sql()->tableBridge()->setUsers_id($users_id)->setTitle(\"mobile\")->setValue(post::mobile())->insert();\n\n\t\t$this->commit(function($username = false) {\n\t\t\tdebug_lib::msg(\"ثبت نام شما با موفقیت انجام شد ، نام کاربری شما $username و کلمه عبور شما کد ملی یا شماره گذر نامه شما می باشد.\");\n\t\t\tdebug_lib::true(\"ثبت نام شما با موفقیت انجام شد ، نام کاربری شما $username و کلمه عبور شما کد ملی یا شماره گذر نامه شما می باشد.\");\n\t\t\t// debug_lib::true(\"[[insert users successful]]\");\n\t\t}, $username);\t\t\t\n\t\t$this->rollback(function() {\n\t\t\tdebug_lib::fatal(\"[[insert users failed]]\");\n\t\t});\n\t}", "title": "" }, { "docid": "a1910d820b8b700c10ace4135c5e094c", "score": "0.6913739", "text": "function crearUsuario($usr,$psw,$nombre,$apellidos){\n $this->conectar();\n if(!$this->validarUsuario($usr,\"\",1)){\n if($this->altaUsuario($usr,$psw,$nombre,$apellidos)){\n $this->msg = \"Ok: Se creó el usuario.\";\n }else{\n $this->msg += \"Error: No se puede crear el usuario.\";\n }\n }else{\n $this->msg = \"Error: El usuario ya existe.\";\n }\n $this->desconectar();\n }", "title": "" }, { "docid": "49dfcc5a982adb74c765b10276949774", "score": "0.690393", "text": "public function registrarNuevoUsuario(){\n\n\t\t//--Se obtienen los valores del formulario con POST--//\n\t\t$nombre=$this->input->post('nombre',TRUE);\n\t\t$apellidos=$this->input->post('apellidos',TRUE);\n\t\t$telefono=$this->input->post('telefono',TRUE);\n\t\t$direccion=$this->input->post('direccion',TRUE);\n\t\t$correo=$this->input->post('correo',TRUE);\n\t\t$contraseña=$this->input->post('contraseña',TRUE);\n\n\t\t//--Se hace un arreglo con los datos para enviarlos al modelo y registrar al usuario--/\n\t\t$data = [\n\t\t\t'nombre' => $nombre,\n\t\t\t'apellidos' => $apellidos,\n\t\t\t'telefono' => $telefono,\n\t\t\t'direccion' => $direccion,\n\t\t\t'correo' => $correo,\n\t\t\t'contraseña' => $contraseña\n\t\t];\n\n\t\t$this->modelo->agregarUsuario($data);\n\n\t\tredirect(\"Principal/vistaInicial\");\n\t}", "title": "" }, { "docid": "0320543a027d9d5cd4dd6c79e7efc93f", "score": "0.6882566", "text": "function createUserRegistrated()\n {\n $friendObj=$this->createSpecialUser( \"Registrated Platform Users\", \"registrated\", 0 );\n return $friendObj;\n }", "title": "" }, { "docid": "526e195814858038b84b0ffdf538ce2b", "score": "0.6853494", "text": "public function register()\n {\n $validation = new Validation();\n if ($_POST ['send']) {\n\n //Holen der Benutzereingabe und Validation\n $_POST['userdata']['nickname']=htmlspecialchars($_POST['nickname']);\n $nickname = htmlspecialchars($_POST['nickname']);\n $nicknameOK = $validation->stringLenght(3, 25, $nickname);\n\n $_POST['userdata']['email']=htmlspecialchars($_POST['email']);\n $email = htmlspecialchars($_POST['email']);\n $emailOK = $validation->email($email);\n\n $_POST['userdata']['passwort']=htmlspecialchars($_POST['passwort']);\n $passwort = htmlspecialchars($_POST['passwort']);\n $_POST['userdata']['passwort2']=htmlspecialchars($_POST['passwort2']);\n $passwortOK = $validation->stringLenght(8, 25, $passwort);\n $passwordOKAndValid =$validation->validatePassword($_POST['userdata']['passwort']);\n $passwort2 = htmlspecialchars($_POST['passwort2']);\n\n $loginRepository = new LoginRepository();\n\n $nicknameDuplicate = $this->isNicknameADublicate();\n $emailDuplicate = $this->isEmailADublicate();\n\n //Überprüfung ob das Passwort zweimal gleich eingegeben wurde und ob die Validation fehlerfrei durchgelaufen ist.\n if ($_POST['userdata']['passwort'] === $_POST['userdata']['passwort2'] && $emailOK && $passwortOK && $nicknameOK && !$nicknameDuplicate && !$emailDuplicate && $passwordOKAndValid) {\n\n $loginRepository->create($nickname, $email, $passwort);\n unset($_SESSION['errors']);\n $functions= new Functions();\n $InfoLog= \"\\nRegistration \\n User:\".$nickname.\"\\n E-Mail:\".$email.\"\\n Datum & Uhrzeit:\".$functions->dateAndTime();\n file_put_contents(\"../lib/log.txt\",$InfoLog,FILE_APPEND);\n //Weiterleitung zum Login wenn alles funktioniert hat\n $this->index();\n\n } else {\n if ($nicknameDuplicate) {\n\n $_SESSION['errors']= \"Username nicht verfügbar, bitte wählen sie einen anderen Usernamen\";\n }\n if (!$nicknameOK) {\n\n $_SESSION['errors']= \"Username muss mindestens 3 Zeichen und maximal 25 Zeichen lang sein\";\n }\n if ($emailDuplicate) {\n\n $_SESSION['errors']= \"Email schon vorhanden. Registrieren Sie sich mit einer Email die noch nicht registriert wurde\";\n }\n if (!$emailOK) {\n\n $_SESSION['errors']= \"Geben Sie eine gültige Email-Adresse ein.\";\n }\n if (!$passwortOK) {\n\n $_SESSION['errors']= \"Geben Sie ein gültiges Passwort ein, min. 8 Zeichen und max. 25 Zeichen\";\n }\n if (!$passwort === $passwort2) {\n\n $_SESSION['errors']= \"Geben Sie die Passwörter identisch ein.\";\n }\n\n }\n if(isset($_SESSION['errors']))\n {\n $errorhandling = new Functions();\n $_POST['userdata']['nickname'] = $nickname;\n $_POST['userdata']['email'] = $email;\n $functions= new Functions();\n $InfoLog= \"\\nRegistrations-Error \\n E-Mail:\".$_POST['userdata']['email'].\"\\n Datum & Uhrzeit:\".$functions->dateAndTime();\n file_put_contents(\"../lib/log.txt\",$InfoLog,FILE_APPEND);\n $errorhandling->displayErrors($_SESSION['errors'], \"/login/registration\", $_POST['userdata']) ;\n }\n }\n }", "title": "" }, { "docid": "794a2fe6d807433b00e6e10709c88b0a", "score": "0.6837377", "text": "public function add_usuario()\n\t{\n\t\tif(empty($_POST[\"perfil_usuario\"]) or empty($_POST[\"nombre_usuario\"]) or empty($_POST[\"login_usuario\"]) or empty($_POST[\"password\"]) or empty($_POST[\"password2\"]) or empty($_POST[\"email_usuario\"]) or Configuracion::valida_correo($_POST[\"email_usuario\"]) == false)\n\t\t{\n\t\t\theader(\"Location: \" . Configuracion::ruta() . \"?controlador=add_usuario&msj=1\");\n\t\t\texit;\n\t\t}\n\t\t\n\t\t/*\n\t\t$error_password = \"\";\t\t\n\t\tif(self::validar_password($_POST[\"password\"], &$error_password) == false)\n\t\t{\n\t\t\t//header(\"Location: \" . Configuracion::ruta() . \"?controlador=add_usuario&msj=7&passerror=\" . $mierror_password);\n\t\t\theader(\"Location: \" . Configuracion::ruta() . \"?controlador=add_usuario&msj=6\");\n\t\t\texit;\t\t\n\t\t}*/\n\n\t\t\t\t/*verificamos primero que el nombre no este ya en la DB*/\n\t\t\t\t$sqlconsulta2 = \"select count(*) from usuarios where nombre = ?\";\t\n\t\t\t\t$PDOsoporte2 = $this->conexionPDO->prepare($sqlconsulta2);\n\t\t\t\t$elnombre2 = Configuracion::guerreras_magicas($_POST[\"nombre\"]);\n\t\t\t\t$PDOsoporte2->bindValue(1,$elnombre2,PDO::PARAM_STR);\n\t\t\t\t$PDOsoporte2->execute();\n\t\t\t\t\n\t\t\t\t/*si el nombre es nuevo en la DB entonces iniciamos la insercion del nvo registro*/\n\t\t\t\tif($PDOsoporte2->fetchColumn() == 0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tself::set_names_UTF8();\t\n\t\t\t\t\t$sqlconsulta = \"insert into usuarios values (null, ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t$PDOsoporte = $this->conexionPDO->prepare($sqlconsulta);\n\t\t\t\t\t\n\t\t\t\t\t/*filtramos con guerreras magicas() para evitar ataques xsl*/\n\t\t\t\t\t$elidperfil = Configuracion::guerreras_magicas($_POST[\"perfil_usuario\"]);\n\t\t\t\t\t$elnombre = Configuracion::guerreras_magicas($_POST[\"nombre_usuario\"]);\n\t\t\t\t\t$ellogin = Configuracion::guerreras_magicas($_POST[\"login_usuario\"]);\n\t\t\t\t\t$elpassword = Configuracion::guerreras_magicas($_POST[\"password\"]);\n\t\t\t\t\t$elpassword2 = md5(Configuracion::guerreras_magicas($_POST[\"password\"]));\n\t\t\t\t\t$elemail = Configuracion::guerreras_magicas($_POST[\"email_usuario\"]);\n\t\t\t\t\t\n\t\t\t\t\t$PDOsoporte->bindValue(1,$elidperfil,PDO::PARAM_INT);\n\t\t\t\t\t$PDOsoporte->bindValue(2,$elnombre,PDO::PARAM_STR);\n\t\t\t\t\t$PDOsoporte->bindValue(3,$ellogin,PDO::PARAM_STR);\n\t\t\t\t\t$PDOsoporte->bindValue(4,$elpassword,PDO::PARAM_STR);\n\t\t\t\t\t$PDOsoporte->bindValue(5,$elpassword2,PDO::PARAM_STR);\n\t\t\t\t\t$PDOsoporte->bindValue(6,$elemail,PDO::PARAM_STR);\n\t\t\t\t\t\n\t\t\t\t\tif($PDOsoporte->execute())\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$this->conexionPDO=null;\n\t\t\t\t\t\theader(\"Location: \" . Configuracion::ruta() . \"?controlador=add_usuario&msj=3\");\t\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$this->conexionPDO=null;\n\t\t\t\t\t\theader(\"Location: \" . Configuracion::ruta() . \"?controlador=add_usuario&msj=2\");\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\theader(\"Location: \" . Configuracion::ruta() . \"?controlador=add_usuario&msj=4\");\n\t\t\t\t\texit;\t\t\t\t\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "bd1f0905f343ec9e572e9ed3c745b198", "score": "0.68360317", "text": "public function register(){\n\t\t$data = $this->checkExist();\n\n\t\t//$data will be 0 if no existing user was found so we can about inserting new user.\n\t\tif(sizeof($data) == 0){\n\n\t\t\t$conn = new sConnect();\n\t\t\t$conn->connect();\n\t\t\t$conn->prepare(\"INSERT INTO users (email, password) VALUES (?, ?)\");\n\t\t\t@$conn->bind( array(\"ss\", $this->data->email, Util::hash($this->data->password)) );\n\t\t\t$conn->executeStmt();\n\t\t\t$conn->close();\n\t\t} else return \"duplicate\";\n\t}", "title": "" }, { "docid": "d7aa469ac3c469b15deef1e843ac0ca6", "score": "0.6828126", "text": "public function register()\n {\n $user = $this->Users->newEntity($this->request->data);\n if ($this->request->is('post')) {\n $user->set('group_id', 1);\n if ($this->Users->save($user)) {\n $this->Flash->success(__d('wasabi_core', 'The user has been saved.'));\n $this->redirect(['action' => 'register']);\n return;\n }\n $this->Flash->error($this->formErrorMessage);\n }\n $this->set('user', $user);\n $this->viewBuilder()->layout('Wasabi/Core.support');\n }", "title": "" }, { "docid": "644bdc34c7db9196daa28489956b27e9", "score": "0.68204993", "text": "public function processRegistration() {\n\t\t$valid = \\BBStandards\\PluginManager::hookAnd(\"plugins.authservice.register.action.validate\");\n\n\t\tif ($valid) {\n\t\t\t$name = stripslashes(htmlentities($_POST[\"username\"]));\n\t\t\t$email = htmlentities($_POST[\"email\"]);\n\t\t\t$password = create_hash($_POST[\"password\"]);\n\n\t\t\t$table = \\BBStandards\\Database::table(\"users\");\n\t\t\t\\BBStandards\\Database::execute(\"INSERT INTO \".$table.\" (name, email, password) VALUES(?, ?, ?)\", array($name, $email, $password));\n\n\t\t\t\\BBStandards\\PluginManager::hookAction(\"plugins.authservice.login.perform\", array(\"id\" => \\BBStandards\\Database::lastInsertId()));\n\t\t}\n\t}", "title": "" }, { "docid": "cfdae531845219774900bf66ca64aa5a", "score": "0.6818411", "text": "public function creaUsr(){\n if($this->sePuedeAccederASeccion('usuario_new')){\n $parametros['roles'] = RolesModel::getInstance()->listadoDeRoles();\n $this->formularioUsuarios($parametros);\n }else{\n $this->cerrarSesion();\n IndexController::getInstance()->index();\n }\n }", "title": "" }, { "docid": "9690f23a5ec13c3cffbafbf775726cc5", "score": "0.68130684", "text": "public function register()\n {\n $emptyspace = '';\n $date = date('Y-m-d H:i:s');\n $type = 'verifyEmail';\n $hash = password_hash( $this->password, PASSWORD_BCRYPT );\n $email_code = $this->randomPassword();\n\n $sql = \"CALL proc_newUser(?,?,?,?,?,?)\";\n $data = array(\"id\" => $emptyspace, \"email\" => $this->email, \"email_code\" => $email_code, \"password\" => $hash, \"type\" => $type, \"timestamp\" => $date);\n $format = array('isssss');\n\n $type = \"create\";\n\n ( new Service( $type, $this->database ) )->dbAction( $sql, $data, $format );\n\n }", "title": "" }, { "docid": "16d8e211b5c8c42594c6aecc87ed9e9f", "score": "0.6809594", "text": "function register_new_user($p1, $p2, $p3, $p4, $p5, $p6, $p7){ \n $user_exists = DAO_user::DAO_user_exist($p1);\n \n $ans ='0';\n if( $user_exists == 1 ){\n $registered = DAO_user::DAO_insert_register($p1, $p2, $p3, $p4, $p5, $p6, $p7);\n if( $registered == 1 )\n $ans = '1';\n }\n \n return $ans;\n }", "title": "" }, { "docid": "05d51146fc3794addf4f83855782b516", "score": "0.68046427", "text": "public function add(){\n\t\tif (Database::record_exist('USERS','USERNAME',$this->username) or Database::record_exist('USERS','EMAIL',$this->email) ) {\n\t\t\treturn 'Username or email taken';\n\t\t}else{\n\t\t\tDatabase::add('USERS',array($this->first_name,$this->last_name,$this->email,$this->username,$this->password,$this->user_type));\n\t\t\treturn 'Registration succesfull';\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "6ee87145e2c3e7db43b41cfba4e1d614", "score": "0.680256", "text": "public function registerAction()\n\t{\n\t\t$user = new Users();\n $postPost = $this->request->getPost();\n/**\n * Store and check for errors\n * \n * \n */\n\n\t\t$postPost = array(\n\t\t\t'first_usr' => $postPost['name'],\n\t\t\t'email_usr' => $postPost['email'],\n\t\t\t'pw_usr' => $postPost['password']\n\t\t);\n\t\t \n try {\n $success = $user->create($postPost, array('first_usr', 'email_usr', 'pw_usr'));\n if ($success) {\n $this->flash->success(\"Success! New user added!\");\n }\n } catch(Exception $e) {\n $errorMessage = $e->getMessage();\n \n if ( strpos( $errorMessage, 'uplicate' )) {\n $this->flash->error(\"Account already exists: \" . $postPost[\"email\"] . \"<p>\" . $errorMessage . \"</p>\"); \n \n } else { \n $this->flash->notice( \"Sorry, the following problems occurred: \" );\n $this->flash->error( $errorMessage );\n }\n\t\t\t\n } \n\n\t}", "title": "" }, { "docid": "ae63c68354f23ecc6849d5a88fb7b543", "score": "0.67984176", "text": "public function register()\n {\n if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login']) && !empty($_POST['password'])){\n $mdl = new ModelUser();\n\n $login = Nettoyer::nettoyerString($_POST['login']);\n $password = Nettoyer::nettoyerString($_POST['password']);\n\n try {\n $mdl->register($login,$password);\n }catch (PDOException $e){\n $error = $e->getMessage().'Login invalide, veuillez en entrer un nouveau svp.';\n require_once ('views/error.php');\n }\n\n $resco = $mdl->connection($login,$password);\n\n if(!$resco){\n $error = 'Impossible de se connecter.';\n require_once ('views/error.php');\n }else{\n header(\"Location: /\");\n }\n }\n else{\n require_once('views/register.php');\n }\n\n }", "title": "" }, { "docid": "0908b6e4e1cb0675c816eceace357dfa", "score": "0.6797758", "text": "public function register() {\n\n $postData = $this->postData();\n\n $login = $postData['login'];\n $userName = $postData['username'];\n $password = $this->hash($postData['password']);\n $email = $postData['email'];\n $role = $postData['role'];\n\n $query = \"INSERT INTO users (\n login, \n password, \n username,\n email,\n role\n ) \n VALUES (\n '{$login}',\n '{$password}',\n '{$userName}',\n '{$email}',\n {$role}\n )\";\n // lg($query);\n\n $result = $this->db->exec($query);\n return array('status' => $result);\n }", "title": "" }, { "docid": "acfe0f81b29c719ef9f4cc77f956f108", "score": "0.6778747", "text": "public function registerUser($userInput);", "title": "" }, { "docid": "f81e0d0a3de64c6ec348e778df0049e8", "score": "0.6775049", "text": "public function register () {\n // check for required params\n $this->verifyRequiredParams(array('name', DB_FIELD_USER_ID, 'password', 'account_type', 'device_id', 'device_name', 'app_id' ));\n\n // reading post params\n $name = $this->app->request->post('name');\n $user_id = $this->app->request->post(DB_FIELD_USER_ID);\n $password = $this->app->request->post('password');\n $account_type = $this->app->request->post('account_type');\n $device_id = $this->app->request->post('device_id');\n $device_name = $this->app->request->post('device_name');\n $app_id = $this->app->request->post('app_id');\n\n // validating email address\n $this->validateEmail($user_id);\n\n $ret = $this->db_handler->createUser($name, $user_id, $password, $account_type, $device_id, $device_name, $app_id);\n if ($ret == ERROR_CODE_SUCCESS) {\n $message = \"You are successfully registered\";\n } else if ($ret == ERROR_CODE_USER_CREATE_FAILED) {\n $message = \"Oops! An error occurred while registereing\";\n } else if ($ret == ERROR_CODE_USER_ALREADY_EXISTED) {\n $message = \"Sorry, this email already existed\";\n }\n // echo json response\n $this->echoResponse(200, $ret, $message);\n }", "title": "" }, { "docid": "ae86595fbc1401173eee87efa4f154aa", "score": "0.6763004", "text": "public function createUser($nombre,$email,$contrasenia,$id_rol,$id_supervisor,$carteras)\n {\n //si la contrasenia no esta vacia guarda la introdusida.\n if($contrasenia != \"\")\n {\n $contra = md5($contrasenia);\n } \n else//si no tiene valor la variable $contrasenia se pone por default 123456\n {\n $contra = md5('123456');\n } \n \n $consulta = \"INSERT INTO Usuarios(nombre,email,contrasenia,id_rol,id_supervisor) VALUES('$nombre', '$email', '$contra','$id_rol', '$id_supervisor')\";\n $resultado = mysql_query($consulta) or print(\"Cartera Repetida<br>\");\n \n //obtiene el nuevo usuario con el id nuevo.\n $this->getUser(mysql_insert_id());\n $errores = $this->setCarteras($carteras);\n return $resultado && count($errores) <= 0;\n }", "title": "" }, { "docid": "29868d41b00d5a5878723741388a2ab9", "score": "0.6759175", "text": "public function register()\n {\n $status = $this->validator->checkPost($_POST);\n if (is_string($status)) {\n HtmlRender::viewRegister($status);\n\n return;\n }\n $username = trim(strtolower($_POST[\"username\"]));\n $email = $_POST[\"email\"];\n $pass = $_POST[\"password\"];\n $user = $this->model->checkIfExists($username, $email);\n if ($user) {\n $status = $this->validator->isAny($user->username, $username, $user->email, $email);\n HtmlRender::viewRegister($status);\n\n return;\n }\n $this->model->register($username, $email, sha1($pass));\n $status = \"Successfully registered\";\n HtmlRender::viewRegister($status);\n }", "title": "" }, { "docid": "94e556a6bc07cdd4da6c21421b287e0b", "score": "0.67577213", "text": "public function registrarUsuario(\n $login, $password, $nombre, $apellido, $email){\n $query = mysql_query(\"INSERT INTO usuarios(login, \n password, nombre, apellido, email) VALUES \n ('$login','$password','$nombre','$apellido','$email')\");\n }", "title": "" }, { "docid": "61221216e0b9ea9caea15eee6857d549", "score": "0.67481774", "text": "function registerUser() {\n global $con, $name, $username, $password, $serial, $guestpw;\n\t\t\n\t\t// We are taking in the data above and INSERTING them into the SQL database\n $statement = mysqli_prepare($con, \"INSERT INTO user_id (name, username, password, serial, guestpw) VALUES (?, ?, ?, ?, ?)\");\n mysqli_stmt_bind_param($statement, \"sssss\", $name, $username, $password, $serial, $guestpw);\n mysqli_stmt_execute($statement);\n mysqli_stmt_close($statement); \n }", "title": "" }, { "docid": "115836059d9fe622d80a94a45c638b64", "score": "0.67332304", "text": "function register() {\n // if (empty($_GET['act'])) {\n // show_404($this->uri->uri_string);\n // }\n // REMARK hanya yang memiliki code\n\n if ($_POST) {\n if ($this->_validate()) {\n $data = array(\n 'username' => $_POST['username'],\n 'password' => $_POST['password'],\n 'email' => $_POST['email'],\n 'first_name' => $_POST['first_name'],\n 'last_name' => $_POST['last_name'],\n );\n $this->_model()->register($data);\n\n $this->load->library('xmailer');\n $data = array(\n 'first_name' => $_POST['first_name'],\n 'last_name' => $_POST['last_name'],\n 'username' => $_POST['username'],\n );\n $this->xmailer->send('register', $data, $_POST['email']);\n\n $_POST['login'] = $_POST['username'];\n $this->login();\n }\n }\n }", "title": "" }, { "docid": "4c343ab44187f03145f62fffc450935c", "score": "0.67240626", "text": "public function registerAction()\n {\n $name = $this->request->getPost(\"name\", \"string\");\n $email = $this->request->getPost(\"email\", \"email\");\n\n // Stop execution and show a backtrace\n return xdebug_print_function_stack(\"stop here!\");\n\n $user = new Users();\n $user->name = $name;\n $user->email = $email;\n\n // Store and check for errors\n $user->save();\n }", "title": "" }, { "docid": "da0e42c017837b413c291bdd7e1062cd", "score": "0.6715401", "text": "function the_user_can_register()\n\t{\n\n\t\t$user = Factory::attributesFor(User::class);\n\n\t\t$this->visit('regisztracio')\n\t\t\t->type($user['name'], 'name')\n\t\t\t->type($user['email'], 'email')\n\t\t\t->type($user['password'], 'password')\n\t\t\t->type($user['password'], 'password_confirmation')\n\t\t\t->press(trans('user.create.submit'))\n\t\t\t->see($user['name']);\n\t}", "title": "" }, { "docid": "8d42b2cfaefa02460340565f974da9df", "score": "0.6704347", "text": "public function registration_post() {\n $first_name = strip_tags($this->post('first_name'));\n $last_name = strip_tags($this->post('last_name'));\n $email = strip_tags($this->post('email'));\n $password = $this->post('password');\n $phone = strip_tags($this->post('phone'));\n \n // Validate the post data\n if(!empty($first_name) && !empty($last_name) && !empty($email) && !empty($password)){\n \n // Check if the given email already exists\n $con['returnType'] = 'count';\n $con['conditions'] = array(\n 'email' => $email,\n );\n $userCount = $this->user->getRows($con);\n \n if($userCount > 0){\n // Set the response and exit\n $this->response(\"L'email donné existe déjà.\", REST_Controller::HTTP_BAD_REQUEST);\n }else{\n // Insert user data\n $userData = array(\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'password' => sha256($password),\n 'phone' => $phone\n );\n $insert = $this->user->insert($userData);\n \n // Check if the user data is inserted\n if($insert){\n // Set the response and exit\n $this->response([\n 'status' => TRUE,\n 'message' => 'L\\'utilisateur a été ajouté avec succès.',\n 'data' => $insert\n ], REST_Controller::HTTP_OK);\n }else{\n // Set the response and exit\n $this->response(\"Quelques problèmes sont survenus, veuillez réessayer.\", REST_Controller::HTTP_BAD_REQUEST);\n }\n }\n }else{\n // Set the response and exit\n $this->response(\"Fournissez des informations complètes sur l'utilisateur à ajouter.\", REST_Controller::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "6275d2575d6cd22d900e0c6f12254cb0", "score": "0.66911966", "text": "private function registrar()\n {\n $body = file_get_contents('php://input');\n $usuario = json_decode($body);\n $rut = $usuario->rut;\n $serial = $usuario->serial;\n\n //determinamos si el usuario ya existe\n $usuarioenDB = self::obtenerUsuarioPorRut($rut);\n if ($usuarioenDB == NULL)\n {\n //determinamos si el serial ya esta registrado\n $serialenDB = self::checkserial($serial);\n if ($serialenDB == NULL)\n {\n $nombre = $usuario->nombre;\n $correo = $usuario->correo;\n $password = $usuario->password;\n $respuesta = array();\n $comando = \"INSERT INTO \" . self::NOMBRE_TABLA . \" (\"\n . self::NOMBRES . \", \"\n . self::CORREO . \", \"\n . self::RUT . \", \"\n . self::LOGIN . \", \"\n . self::PASSWORD . \")\"\n . \"VALUES (?,?,?,?,?)\";\n try\n {\n $sentencia = ConexionBD::obtenerInstancia()->obtenerBD()->prepare($comando);\n $sentencia->bindParam(1, $nombre);\n $sentencia->bindParam(2, $correo);\n $sentencia->bindParam(3, $rut);\n $sentencia->bindParam(4, $rut);\n $sentencia->bindParam(5, $password);\n $sentencia->execute();\n } catch (PDOException $exception) {\n throw new ExcepcionApi(10, $exception->getMessage());\n }\n //una vez ejecutado el insert en la tabla de usuarios, obtenemos que id le corresponde\n //y se ejecuta el insert en la tabla de seriales\n $id_usuario = self::obtenerUsuarioPorRut($rut);\n seriales::crear($id_usuario['id_usuarios'], $serial);\n http_response_code(200);\n $respuesta[\"rut\"] = $id_usuario[\"rut\"];\n $respuesta[\"nombres\"] = $id_usuario[\"nombres\"];\n $respuesta[\"apellidos\"] = $id_usuario[\"apellidos\"];\n return [\"rut\" => $respuesta[\"rut\"], \"mensaje\" => \"Usuario creado de forma exitosa\"];\n } else {\n throw new ExcepcionApi(5, \"El serial ya existe en el sistema\");\n }\n } else {\n throw new ExcepcionApi(5, \"El rut del usuario ya existe en el sistema\");\n }\n }", "title": "" }, { "docid": "0658fc80740ba13210fa41023a2c98a9", "score": "0.668378", "text": "public function registrar()\r\n\t{\r\n\t\tif (Conexion::getEstatusConexion()) { //verificamos que la conexion esta activa\r\n\t\t\t$strSql = 'INSERT INTO usuario (nombre, direccion, clave, apellido, cedula, telefono, correo) VALUES (:nombre, :direccion, :clave, :apellido, :cedula, :telefono, :correo )'; //realizamos una cadena de texto con la instruccion sql a realizar\r\n\t\t\t$respuestaArreglo = ''; //definimos la variable a retornar los datos de la ejecucion de la instruccion sql\r\n\t\t\ttry {\r\n\t\t\t\t$strExec = Conexion::prepare($strSql); // preparamos la sentencia\r\n\t\t\t\t// http://php.net/manual/es/pdo.prepare.php\r\n\t\t\t\t$strExec->bindValue(':nombre', $this->nombre); // Vincula un valor a un parámetro\r\n\t\t\t\t$strExec->bindValue(':direccion', $this->direccion); // Vincula un valor a un parámetro\r\n\t\t\t\t$strExec->bindValue(':clave', $this->clave); // Vincula un valor a un parámetro\r\n\t\t\t\t$strExec->bindValue(':apellido', $this->apellido); // Vincula un valor a un parámetro\r\n\t\t\t\t$strExec->bindValue(':cedula', $this->cedula); // Vincula un valor a un parámetro\r\n\t\t\t\t$strExec->bindValue(':telefono', $this->telefono); // Vincula un valor a un parámetro\r\n\t\t\t\t$strExec->bindValue(':correo', $this->correo); // Vincula un valor a un parámetro\r\n\t\t\t\t$strExec->execute(); //ejecutamos la instruccion sql\r\n\t\t\t\t$respuestaArreglo = $strExec->fetchAll(); //retornamos todos los datos de la ejecucion\r\n\t\t\t\t$respuestaArreglo += ['estatus' => true];\r\n\t\t\t} catch (PDOException $e) { //si hay un error en la instruccion sql entramos en el catch\r\n\t\t\t\t$errorReturn = ['estatus' => false];\r\n\t\t\t\t$errorReturn += ['info' => \"error sql:{$e}\"];\r\n\r\n\t\t\t\treturn $errorReturn; //retornamos el contenido de esa variable\r\n\t\t\t}\r\n\t\t\t$respuestaI = Conexion::lastInsertId(); //obtenemos ID (clave primaria de la tabla) para implementarlo en otros registros\r\n\t\t\treturn $respuestaArreglo; //retornamos los datos del arreglo\r\n\t\t} else { //sino hay conexion\r\n\t\t\t$errorReturn = ['estatus' => false];\r\n\t\t\t$errorReturn += ['info' => 'error sql:'.Conexion::getErrorConexion()];\r\n\r\n\t\t\treturn $errorReturn; //retorno el mensaje de error generado\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5027efc3fc0f83fd31cd35aa9bf53f36", "score": "0.6678607", "text": "public function register() {\t\t\r\n\t\t$time = time();\r\n\t\t$this->pw = sha1($this->pw);\r\n\t\t\r\n\t\tif(DBHandler::getDB()->query(\"INSERT INTO account (username, password, email, createTime) VALUES (?, ?, ?, ?)\", array($this->id, $this->pw, $this->email, $time))) {\r\n return true;\r\n\t }\r\n else {\r\n Error::$error[] = \"Es ist ein Fehler aufgetreten.\";\r\n return false;\r\n }\r\n\t\r\n\t\r\n }", "title": "" }, { "docid": "d5f31c380654c8fa1b05f236aed53345", "score": "0.6677901", "text": "function register() {\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['registreer_gebruikersnaam']) && isset($_POST['registreer_wachtwoord']) && isset($_POST['registreer_email'])) {\n\t\t\tmysql_select_db(MYSQL_DB, $con);\n\t\t\t$u = $_POST['registreer_gebruikersnaam'];\n\t\t\t$p = md5($_POST['registreer_wachtwoord']);\n\t\t\t$e = $_POST['registreer_email'];\n\t\t\t$res = mysql_query(\"SELECT COUNT(*) FROM wg_user WHERE naam = '$u' \");\n\t\t\t$row = mysql_fetch_row($res);\n\t\t\tif ($row[0] == 0) {\n\t\t\t\tmysql_query(\"INSERT INTO wg_user (naam, wachtwoord, email) VALUES ('$u', '$p', '$e')\");\n\t\t\t} else {\n\t\t\t\techo \"Helaas, die gebruikersnaam is al bezet.<br />Tip: Wees origineel\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3aa8edf5bdf8268997d579a19b46f2a3", "score": "0.66726804", "text": "public function registerAction() {\n\t\ttry{\n\t\t\t$this->view->title = \"Create User\";\n\t\t\t$params = $this->_getAllParams();\t\n\t\t\t$this->_helper->layout->setLayout('default/empty_layout');\n\t\t\t$request = $this->getRequest();\n\t\t\t$Request_Values = $request->getPost();\n\t\t\tif ($request->isPost()) {\n\t\t\t\tif(!$this->signup -> createUser($params)) {\n\t\t\t\t\techo \"Registration Failed! Try Again.\";\n\t\t\t\t} else {\n\t\t\t\t\t$toemail = $params['email_id'];\n\t\t\t\t\t$mailbody = \"Thanks for registration with Getlinc. We will keep you update.\";\n\t\t\t\t\t$emailsubject = \"Registered with Getlinc.\";\n\t\t\t\t\tApplication_Model_DataBaseOperations::insertEmailQueue($toemail,$mailbody,$emailsubject);\n\t\t\t\t\techo $this->session->success;\n\t\t\t\t\techo \"Successfully Registered. Please login with your account.\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo \"Data not received from Origin Place.\";exit;\n\t\t\t}\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "8b67520189cae42b5b72ed3c8cafd86a", "score": "0.6669024", "text": "public function register() {\n //1. get access info like HV_LP (completely same)\n //2. get info of user's form\n //3. $this->Service_account->register_account($param)\n //4. send email for register\n //5. rediect complete page\n }", "title": "" }, { "docid": "f22f60859303fb5a2d8d20d3e0e8c782", "score": "0.6665345", "text": "function addUsuario(){\r\n $this->conexion = new Conexion();\r\n $this->conexion = $this->conexion->conectar();\r\n if( $this->conexion){\r\n $sentencia = $this->conexion->prepare(\"INSERT INTO usuarios (usuario,password) VALUES (:nombre,:password)\");\r\n $sentencia->bindParam(':nombre', $this->nombre);\r\n $sentencia->bindParam(':password', $this->password);\r\n $sentencia->execute();\r\n return $sentencia;\r\n }\r\n // Cierra la conexion\r\n $this->conexion = $this->conexion->closeConnection();\r\n }", "title": "" }, { "docid": "9b98a213ba6374248f60d9ab922ab1f6", "score": "0.66613275", "text": "public function registrar_usuario() {\r\n $nombre_usuario = $this->input->post('nombre_usuario');\r\n $ci = $this->input->post('ci');\r\n $telefono = $this->input->post('telefono_referencia');\r\n $nombre = $this->input->post('nombre');\r\n $apellidos = $this->input->post('apellidos');\r\n \r\n if($this->consultas->existe_usuario($nombre_usuario)){\r\n $this->mensaje = \"Ya existe el nombre de usuario: $nombre_usuario. \"\r\n . \"Por favor escoja otro\";\r\n $this->vista_registro();\r\n }\r\n else{\r\n $usuario = array(\r\n 'Nombre' => $nombre,\r\n 'CarnetIdentidad' => $ci,\r\n 'TelefonoReferencia' => $telefono,\r\n 'Apellidos' => $apellidos,\r\n 'NombreUsuario' => $nombre_usuario,\r\n 'Rol' => self::CLIENTE\r\n );\r\n $this->consultas->registrar_usuario($usuario);\r\n $this->iniciar_sesion($nombre_usuario, $ci);\r\n }\r\n \r\n }", "title": "" }, { "docid": "3d971c6500982435e41c388489a735dc", "score": "0.6649612", "text": "function registration(){\n\n // Vérification de la validité des informations\n $admin = 0;\n $pseudo = htmlspecialchars($_POST['pseudo']);\n // Hachage du mot de passe\n $pass_hache = password_hash($_POST['pass'], PASSWORD_DEFAULT);\n $mail = htmlspecialchars($_POST['mail']);\n \n $str = strlen($_POST[\"pass\"]);\n\n $req = new UserManager;\n $pseudodouble = $req -> pseudodouble($pseudo);\n $count = $pseudodouble -> rowCount();\n $pseudodouble -> closeCursor();\n\n $request = new UserManager;\n $maildouble = $request -> maildouble($mail);\n $countmail = $maildouble -> rowCount();\n $maildouble -> closeCursor();\n //Test pseudo déjà utilisé\n \n if(!$count > 0){\n if(!$countmail > 0){\n //Test mot de passe + de 10 caractère\n if($str > 10){\n \n $requ = new UserManager;\n $infoRegist = $requ -> registration($pseudo, $pass_hache, $mail);\n //$infoRegist -> closeCursor();\n \n header ('Location: index.php');\n exit();\n }\n else{\n throw new Exception(\"Votre mot de passe doit contenir au minimum 10 caractère.\");\n header ('Location: index.php');\n exit();\n }\n }\n else{\n throw new Exception(\"Votre mail est déjà utilisé.\");\n }\n \n }\n else{\n throw new Exception(\"Votre pseudo est déjà utilisé.\");\n \n }\n \n}", "title": "" }, { "docid": "e266ae05dfaa786ad4bbba02275ecc21", "score": "0.663095", "text": "function user_registration($usuario)\n{\n\n\t$nameStr = $usuario[\"name\"].\" \".$usuario[\"surname\"];\n\t$conexion = Database::instance();\n\tif (!$conexion)\n\t\techo \"Ha ocurrido un error conectando con la base de datos\";\n\ttry {\n\t\t$consulta = \"CALL REGISTRARUSUARIO_PARAM(:username, :pass, :email, :name, :phone)\";\n\t\t$stmt = $conexion->prepare($consulta);\n\t\t$stmt->bindParam(':username', $usuario[\"user\"]);\n\t\t$stmt->bindParam(':pass', password_hash($usuario[\"pass\"], PASSWORD_DEFAULT)); // salt password here\n\t\t$stmt->bindParam(':email', $usuario[\"email\"]);\n\t\t$stmt->bindParam(':name', $nameStr);\n\t\tif (isset($usuario['phone']))\n\t\t{\n\t\t\t$stmt->bindParam(':phone', $usuario['phone']);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$stmt->bindValue(':phone', \"1111\");\n\t\t}\n\t\t\n\n\t\t$stmt->execute();\n\n\t\treturn \"success\";\n\t} catch (PDOException $e) {\n\t\t$msg = $e->getMessage();\n\t\tif (strpos($msg, \"ORA-06512\") !== false)\n\t\t{\n\t\t\treturn \"unique\";\n\t\t}\n\t\t//$e->err\n\t\treturn \"error\";\n\t\t\n\t}\n}", "title": "" }, { "docid": "9c023b128ca3ce41fa6db6a9d7421947", "score": "0.6630875", "text": "protected function register() {\n\n\t\t// If they are already logged in, send them to the postloginredirect location\n\t\tif($this->isLoggedIn() === true) {\n\t\t\t$this->postLoginRedirect();\n\t\t}\n\t\t// Init\n\t\t$oForm = new PPI_Model_Form();\n\t\t$oUser = new APP_Model_User();\n\t\t$oForm->init('user_register', '', 'post');\n\t\t$oForm->setFormStructure($oUser->_registerFormStructure);\n\n\t\t// If the form has been submitted and has been validated\n\t\tif($oForm->isSubmitted() && $oForm->isValidated()) {\n\n\t\t\t// Get the info from the form and pass it to the usermodel for insertion\n\t\t\t$oUser->putRecord($oForm->getSubmitValues());\n\n\t\t\t// Redirect to the login page\n\t\t\t$this->redirect('user/login');\n\n\t\t}\n\n\t\t$this->addStylesheet('formbuilder.css');\n\t\t$this->addJavascript('jquery-validate/jquery.validate.min.js');\n\n\t\t// show our registration page\n\t\t$this->load('user/register', array('formBuilder' => $oForm->getRenderInformation()));\n\n\t}", "title": "" }, { "docid": "cac893d7610254883d59b625e7c25d23", "score": "0.6629129", "text": "function ibase_add_user($service_handle, $user_name, $password, $first_name = null, $middle_name = null, $last_name = null) {}", "title": "" }, { "docid": "f414309ab2e0eeba449a1d74447eda3d", "score": "0.66270506", "text": "function DB_addUsuario($db,$datos) {\n\t\t$res = mysqli_query($db, \"SELECT COUNT(*) FROM usuarios\n\t\tWHERE name='{$datos['name']}'\");\n\t\t$num = mysqli_fetch_row($res)[0];\n\t\tmysqli_free_result($res);\n\t\tif ($num>0)\n\t\t\t$info[] = 'Ya existe un usuario con ese nombre';\n\t\telse {\n\n\t\t\t//Filtrado de entradas\n\t\t\t$username = trim($datos['name']);\n\t\t\t$username = strip_tags($username);\n\t\t\t$username = htmlspecialchars($username);\n\n\t\t\t$especialidad = trim($datos['especialidad']);\n\t\t\t$especialidad = strip_tags($especialidad);\n\t\t\t$especialidad = htmlspecialchars($especialidad);\n\n\t\t\t$direccion = trim($datos['direccion']);\n\t\t\t$direccion = strip_tags($direccion);\n\t\t\t$direccion = htmlspecialchars($direccion);\n\n\t\t\t$hobbies = trim($datos['hobbies']);\n\t\t\t$hobbies = strip_tags($hobbies);\n\t\t\t$hobbies = htmlspecialchars($hobbies);\n\n\t\t\t$pass = trim($datos['password']);\n\t\t\t$pass = strip_tags($pass);\n\t\t\t$pass = htmlspecialchars($pass);\n\t\t\t\n\t\t\t$pass = hash(\"sha256\", $pass);\n\n\t\t\t$res = mysqli_query($db, \"INSERT INTO usuarios (name,especialidad,direccion,hobbies,password) VALUES ('$username','$especialidad','$direccion','$hobbies','$pass')\");\n\t\t\tif (!$res) {\n\t\t\t\t$info[] = 'Error en la consulta '.__FUNCTION__;\n\t\t\t\t$info[] = mysqli_error($db);\n\t\t\t}\n\t\t}\n\t\tif (isset($info))\n\t\t\treturn $info;\n\t\telse\n\t\t\treturn true; // OK\n\t}", "title": "" }, { "docid": "fff6329f9b426be9c31e18644e1287d4", "score": "0.6614867", "text": "function register_user($db, $email, $password, $first, $last) {\n \n global $log;\n $log->log(\"$email, $first, $last\");\n $hash = password_hash($password, PASSWORD_DEFAULT);\n \n $query = 'INSERT INTO administrators (email, password, firstName, lastName) \n VALUES (:email, :password, :first, :last);';\n \n $statement = $db->prepare($query);\n \n $statement->bindValue(':email', $email);\n $statement->bindValue(':password', $hash);\n $statement->bindValue(':first', $first);\n $statement->bindValue(':last', $last);\n \n $statement->execute();\n $statement->closeCursor();\n \n }", "title": "" }, { "docid": "3a95d3fd22c4db84ded04b745857ad46", "score": "0.65997773", "text": "function userNew($user_name='', $user_mail='', $user_password='') { return null; }", "title": "" }, { "docid": "6a44c015e994ad16ba6aff136e03c2c9", "score": "0.65950584", "text": "public function registrationAction() {\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t\t$form = $this->createForm(new CreateAccountForm());\n\t\t$request = $this->getRequest();\n\t\tif ($request->getMethod() == 'POST') {\n\t\t\t$form->bindRequest($request);\n\t\t\tif ($form->isValid()) {\n\t\t\t\t$paramArray = $request->request->all();\n\t\t\t\t$name = $paramArray['createAccount']['name'];\n\t\t\t\t$surname = $paramArray['createAccount']['surname'];\n\t\t\t\t$username = $paramArray['createAccount']['username'];\n\t\t\t\t$password = $paramArray['createAccount']['password'];\n\t\t\t\t$email = $paramArray['createAccount']['email'];\n\t\t\t\t$sex = $paramArray['createAccount']['sex'];\n\t\t\t\t$birthDate = $paramArray['createAccount']['birthDate'];\n\t\t\t\n\t\t\t\t$users = $em->getRepository('ZSIZizenBundle:User')->findAll();\n\t\t\t\t\t$maxId = 0;\n\t\t\t\t\tforeach ($users as $item) {\n\t\t\t\t\t\tif ($item->getUserId() > $maxId) {\n\t\t\t\t\t\t\t$maxId = $item->getUserId();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$userExists = $em->getRepository('ZSIZizenBundle:User')->findOneBy(array('username' => $username));\n\t\t\t\t\tif(isset($userExists))\n\t\t\t\t\t\treturn $this->redirect($this->generateUrl('ZSIZizenBundle_mainPageIndex'));\n\t\t\t\t\t$user = new User();\n\t\t\t\t\t$user->setUserId($maxId + 1);\n\t\t\t\t\t$user->setName($name);\n\t\t\t\t\t$user->setSurname($surname);\n\t\t\t\t\t$user->setUsername($username);\n\t\t\t\t\t$factory = $this->get('security.encoder_factory');\n\t\t\t\t\t$encoder = $factory->getEncoder($user);\n\t\t\t\t\t$passwd = $encoder->encodePassword($password, $user->getSalt());\n\t\t\t\t\t$user->setPassword($passwd);\n\t\t\t\t\t$user->setEmail($email);\n\t\t\t\t\t$user->setSex($sex);\n\t\t\t\t\t$dateString = $birthDate['year'] . \"-\" . $birthDate['month'] . \"-\" . $birthDate['day'] ;\n\t\t\t\t\t$user->setBirthDate(new \\DateTime($dateString));\n\t\t\t\t\t$user->setRole(\"ROLE_USER\");\n\t\t\t\t\t$em->persist($user);\n\t\t\t\t\t$em->flush();\n\t\t\t\treturn $this->redirect($this->generateUrl('ZSIZizenBundle_mainPageIndex'));\n\t\t\t}\n\t\t}\n\t\treturn $this->render('ZSIZizenBundle:Form:createAccountForm.html.twig', array('form' => $form->createView()));\n }", "title": "" }, { "docid": "8f9c2a18d2a8551559d38aa7ce7b614a", "score": "0.6593098", "text": "public function siguienteRegistro();", "title": "" }, { "docid": "78c24238b78b2f4bd49df8d7ad7d1ba0", "score": "0.6591187", "text": "public function register_handler()\n\t{\n\t\t// Grab the user info from the form.\n\t\t$userdata = array(\n\t\t\t'type' => array(1), // users go into the default (admin) group\n\t\t\t'username' => $this->input->post('username', TRUE),\n\t\t\t'password' => $this->input->post('password', TRUE),\n\t\t\t'firstname' => $this->input->post('firstname', TRUE),\n\t\t\t'lastname' => $this->input->post('lastname', TRUE)\n\t\t);\n\n\t\t// Register the user.\n\t\t$this->quickauth->register($userdata);\n\n\t\t// Redirect to home.\n\t\tredirect(\"/\");\n\t}", "title": "" }, { "docid": "6fe229768419200cf36a994d7c44a313", "score": "0.6588395", "text": "function registerUser ($login, $email, $password){\n\t$return = 2;\n\t//var_dump(dbCon(0));\n\t//get connection to db\n\tif ($dbAdmin = dbCon(0)){\n\n\t\t//check if user exists\n\t\t$exists = query_escaped($dbAdmin, \"SELECT id FROM user WHERE login = '$login' OR email = '$email' LIMIT 1;\");\n\t\tif (mysqli_num_rows($exists) == 1){\n\t\t\t$return = 1;\n\t\t} else {\n\t\t\t//user don't exist and connection OK, register user\n\n\t $pas = hash('sha256', mysqli_real_escape_string($dbAdmin, $password));\n\n\t\t\tif (query_escaped($dbAdmin, \"INSERT INTO user (email, login, password) VALUES ('$email', '$login', '$pas')\")){\n\t\t\t\t//insert user OK\n\t\t\t\t$userId = mysqli_insert_id($dbAdmin);\n\t\t\t\t\n\t\t\t\tif ($dbTemplate = dbCon(2)){\n\t\t\t\t\t//copiar files de l'espai d'usuari a la BD\n\t\t\t\t\t$copyQueries = \"INSERT INTO hortapp_user.planta (id, nom_comu, nom_cientific, grup, familia, sembra_ini, sembra_fi, marc_ample, marc_llarg, produccio, sembra, cultiu, collita, user) SELECT planta.id, planta.nom_comu, planta.nom_cientific, planta.grup, planta.familia, planta.sembra_ini, planta.sembra_fi, planta.marc_ample, planta.marc_llarg, planta.produccio, planta.sembra, planta.cultiu, planta.collita, $userId FROM planta; INSERT INTO hortapp_user.plaga (id, nom_comu, nom_cientific, descripcio, tractament, user) SELECT plaga.id, plaga.nom_comu, plaga.nom_cientific, plaga.descripcio, plaga.tractament, $userId FROM plaga; INSERT INTO hortapp_user.remei (id, nom, descripcio, preparacio, user) SELECT remei.id, remei.nom, remei.descripcio, remei.preparacio, $userId FROM remei; INSERT INTO hortapp_user.afectada ( id_planta, id_plaga, detalls, user) SELECT afectada.id_planta ,afectada.id_plaga ,afectada.detalls ,$userId FROM afectada; INSERT INTO hortapp_user.tractada ( id_plaga, id_remei, descripcio, user) SELECT tractada.id_plaga, tractada.id_remei, tractada.descripcio, $userId FROM tractada; INSERT INTO hortapp_user.img_bancal ( id_foto, id_bancal, titol, detalls, user) SELECT img_bancal.id_foto, img_bancal.id_bancal, img_bancal.titol, img_bancal.detalls, $userId FROM img_bancal; INSERT INTO hortapp_user.img_plaga ( id_foto, id_plaga, titol, detalls, user) SELECT img_plaga.id_foto,img_plaga.id_plaga,img_plaga.titol,img_plaga.detalls, $userId FROM img_plaga; INSERT INTO hortapp_user.img_planta ( id_foto, id_planta, titol, detalls, user) SELECT img_planta.id_foto,img_planta.id_planta,img_planta.titol,img_planta.detalls, $userId FROM img_planta; INSERT INTO hortapp_user.tasca_fixa ( mes, nom, descripcio, user) SELECT tasca_fixa.mes, tasca_fixa.nom, tasca_fixa.descripcio, $userId FROM tasca_fixa; INSERT INTO hortapp_user.tasca_planta ( id_planta, nom, dies, descripcio, user) SELECT tasca_planta.id_planta, tasca_planta.nom, tasca_planta.dies, tasca_planta.descripcio, $userId FROM tasca_planta; INSERT INTO hortapp_user.tasca_remei ( id_remei, nom, dies, descripcio, user) SELECT tasca_remei.id_remei, tasca_remei.nom, tasca_remei.dies, tasca_remei.descripcio, $userId FROM tasca_remei;\";\n\t\t\t\t\t$copyQueries = explode(\";\", $copyQueries);\n\t\t\t\t\tforeach ($copyQueries as $key => $query) {\n\t\t\t\t\t\tif (!strcmp($query, \"\") == 0){\n\t\t\t\t\t\t\tquery_escaped($dbTemplate, $query);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//arreglar referències entre files\n\t\t\t\t\tif ($dbUser = dbCon(1)){\n\n\t\t\t\t\t\t//arregla plantes\n\t\t\t\t\t\t$plantes = query_escaped($dbUser, \"SELECT id FROM planta WHERE user = $userId\");\n\t\t\t\t\t\twhile ($planta = mysqli_fetch_assoc($plantes)){\n\t\t\t\t\t\t\t$oldId = $planta['id'];\n\n\t\t\t\t\t\t\t//insert planta 1\n\t\t\t\t\t\t \tif (!query_escaped($dbUser, \"INSERT INTO planta (nom_comu, nom_cientific, grup, familia, sembra_ini, sembra_fi, marc_ample, marc_llarg, produccio, sembra, cultiu, collita, user) SELECT planta.nom_comu, planta.nom_cientific, planta.grup, planta.familia, planta.sembra_ini, planta.sembra_fi, planta.marc_ample, planta.marc_llarg, planta.produccio, planta.sembra, planta.cultiu, planta.collita, planta.user FROM planta WHERE id = $oldId;\")){\n\t\t\t\t\t\t \t\t//ERROR:\n\t\t\t\t\t\t \t\techo \"can't duplicate planta to get new id\";\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t \t//capturem ID\n\t\t\t\t\t\t \t$newId = mysqli_insert_id($dbUser);\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \t//taules a actualitzar\n\t\t\t\t\t\t \t$tablesToUpdate = array(\"img_planta\", \"tasca_planta\", \"afectada\");\n\t\t\t\t\t\t \tforeach ($tablesToUpdate as $key => $table) {\n\t\t\t\t\t\t \t\tif (!query_escaped($dbUser, \"UPDATE $table SET id_planta = $newId WHERE id_planta = $oldId;\")){\n\t\t\t\t\t\t \t\t\t//cannot update table $table\n\t\t\t\t\t\t \t\t\techo \"<br>can't upddate table $table <br>\";\n\t\t\t\t\t\t \t\t\tdie (\"can't update table\");\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\t\t//eliminem fila antiga\n\n\t\t\t\t\t\t\tif (!query_escaped($dbUser, \"DELETE FROM planta WHERE id = $oldId\")){\n\t\t\t\t\t\t\t\t//ERROR\n\t\t\t\t\t\t\t\techo \"cannot delete old planta\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//fin while (planta = mysqlfetcasoc(plantes))\n\n\t\t\t\t\t\t//arregla plagues\n\t\t\t\t\t\t$plagues = query_escaped($dbUser, \"SELECT id FROM plaga WHERE user = $userId\");\n\t\t\t\t\t\twhile ($plaga = mysqli_fetch_assoc($plagues)){\n\t\t\t\t\t\t\t$oldId = $plaga['id'];\n\n\t\t\t\t\t\t\t//insert plaga 1\n\t\t\t\t\t\t \tif (!query_escaped($dbUser, \"INSERT INTO plaga (nom_comu, nom_cientific, descripcio, tractament, user) SELECT plaga.nom_comu, plaga.nom_cientific, plaga.descripcio, plaga.tractament, plaga.user FROM plaga WHERE id = $oldId;\")){\n\t\t\t\t\t\t \t\t//ERROR:\n\t\t\t\t\t\t \t\techo \"can't duplicate plaga to get new id\";\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t \t//capturem ID\n\t\t\t\t\t\t \t$newId = mysqli_insert_id($dbUser);\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \t//taules a actualitzar\n\t\t\t\t\t\t \t$tablesToUpdate = array(\"img_plaga\", \"tractada\", \"afectada\");\n\t\t\t\t\t\t \tforeach ($tablesToUpdate as $key => $table) {\n\t\t\t\t\t\t \t\tif (!query_escaped($dbUser, \"UPDATE $table SET id_plaga = $newId WHERE id_plaga = $oldId;\")){\n\t\t\t\t\t\t \t\t\t//cannot update table $table\n\t\t\t\t\t\t \t\t\techo \"<br>can't upddate table $table <br>\";\n\t\t\t\t\t\t \t\t\tdie (\"can't update table\");\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\t\t//eliminem fila antiga\n\n\t\t\t\t\t\t\tif (!query_escaped($dbUser, \"DELETE FROM plaga WHERE id = $oldId\")){\n\t\t\t\t\t\t\t\t//ERROR\n\t\t\t\t\t\t\t\techo \"cannot delete old plaga\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//fin while (plaga = mysqlfetcasoc(plantes))\n\n\t\t\t\t\t\t//arregla remeis\n\t\t\t\t\t\t$remeis = query_escaped($dbUser, \"SELECT id FROM remei WHERE user = $userId\");\n\t\t\t\t\t\twhile ($remei = mysqli_fetch_assoc($remeis)){\n\t\t\t\t\t\t\t$oldId = $remei['id'];\n\n\t\t\t\t\t\t\t//insert remei 1\n\t\t\t\t\t\t \tif (!query_escaped($dbUser, \"INSERT INTO remei (nom, descripcio, preparacio, user) SELECT remei.nom, remei.descripcio, remei.preparacio, remei.user FROM remei WHERE id = $oldId;\")){\n\t\t\t\t\t\t \t\t//ERROR:\n\t\t\t\t\t\t \t\techo \"can't duplicate remei to get new id\";\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t \t//capturem ID\n\t\t\t\t\t\t \t$newId = mysqli_insert_id($dbUser);\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \t//taules a actualitzar\n\t\t\t\t\t\t \t$tablesToUpdate = array( \"tasca_remei\", \"tractada\");\n\t\t\t\t\t\t \tforeach ($tablesToUpdate as $key => $table) {\n\t\t\t\t\t\t \t\tif (!query_escaped($dbUser, \"UPDATE $table SET id_remei = $newId WHERE id_remei = $oldId;\")){\n\t\t\t\t\t\t \t\t\t//cannot update table $table\n\t\t\t\t\t\t \t\t\techo \"<br>can't upddate table $table <br>\";\n\t\t\t\t\t\t \t\t\tdie (\"can't update table\");\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\t\t//eliminem fila antiga\n\n\t\t\t\t\t\t\tif (!query_escaped($dbUser, \"DELETE FROM remei WHERE id = $oldId\")){\n\t\t\t\t\t\t\t\t//ERROR\n\t\t\t\t\t\t\t\techo \"cannot delete old remei\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//fin while (remei = mysqlfetcasoc(remeis))\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tmysqli_close($dbUser);\n\n\t\t\t\t\t\t//fin arreglo files noves\n\n\t\t\t\t\t\t$return = 0; //success!\n\t\t\t\t\t}\n\n\t\t\t\t\t//enviar dades al correu de l'usuari\n\n\t\t\t\t}\t\t\t\n\t\t\t}else {\n\t\t\t\t$return = 2;\n\t\t\t}\n\t\t}\n\t}\n\tmysqli_close($dbAdmin);\n\treturn $return;\n}", "title": "" }, { "docid": "224dd64c37a395d4db78984d2146442d", "score": "0.6573352", "text": "function insertarUsuario(){\n echo \"<h2> inserto </h2>\";\n $ObjUsuarios = new DAOUsuarios($this->mysqli);\n //obtiene los datos mediante el metodo de post y los envia a la funcion de insertar\n $ObjUsuarios->agregarNuevoUsuario('Jean','Vega,', 'Díaz','jeanvegad','pass','[email protected]','89526825','1998-5-07');\n }", "title": "" }, { "docid": "ec6cd9c06ba00cf5e9328695fb18b61e", "score": "0.65727246", "text": "public function registerNewUserAction()\n\t{\n\t\tif ($this->getRequest()->isPost()){\n\t//\t\tif ($form->isValid($this->getRequest()->getPost())){\n\t\t\t\t$values = $this->getRequest()->getPost();\n\t\t\t\t\n\t/*\t\t\t$this->user->username = $values['username'];\n\t\t\t\t$this->user->user_type = $values['usertypes'];\n\t\t\t\t$this->user->profile->first_name = $values['firstname'];\n\t\t\t\t$this->user->profile->last_name = $values['lastname'];\n\t\t\t\t$this->user->profile->email = $values['email'];\n\t\t\t\t$this->user->profile->contact_phone = $values['phone'];\n\t\t\t\t$this->user->profile->contact_address = $values['address'];\n\n\t\t\t\tif ($this->user->userNameExists($values['username'])){\n\t\t\t\t\t$form->addError('Username is already exists');\n\t\t \t\t\t$this->view->error = $form->getErrorMessages();\n\t\t\t\t}\n\t\t\t\telseif ($values['usertypes'] == 'rad' && strlen($values['radio']) == 0){\n\t\t\t\t\t$form->addError('Please give the name of the radio station');\n\t\t\t\t\t$this->view->error = $form->getErrorMessages();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// save the user info\n\t\t\t\t\t$this->user->profile->radiostation = $values['radio'];\n\t\t\t\t\t$this->user->save();\n\t\t\t\t\t$this->_helper->getHelper('FlashMessenger')\n\t\t\t\t ->addMessage('Your registration successful.');\n\t\t\t\t\t$this->_redirect('/account/success');\n\t\t\t\t} */\n\t\t//\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e5664578cb1b8776af755a2dc719298f", "score": "0.65711606", "text": "public function register()\n {\n if ($this->validate())\n {\n $user = new User();\n $user->attributes = [\n 'user_login' => $this->username,\n 'user_email' => $this->email,\n 'password' => $this->password\n ];\n if( $user->save() )\n {\n Yii::trace('register success');\n $this->activeCode = $user->getActiveCode();\n $event = new MyEvent();\n $event->context = $this;\n Yii::$app->myEvent->trigger(EventHandler::MY_EVENT_AFTER_REGISTER,$event);\n if( Yii::$app->user->login($user) )\n {\n return 1;\n }\n else\n {\n //login error, return 0\n return 0;\n }\n }\n else\n {\n $this->addErrors( $user->getErrors() );\n return -1;\n }\n\n }\n else\n {\n return -1;\n }\n }", "title": "" }, { "docid": "280c95718c46d15f76e0e6ba4a098f66", "score": "0.65629226", "text": "function user_registration($user_id) {\n if(isset($_POST['role']) && $_POST['role'] == 'owner')\n $this->create_pizzeria($user_id);\n }", "title": "" }, { "docid": "e4f6a0fc84cfea46254a388d94c03bbd", "score": "0.65606827", "text": "function storeUser()\r\n {\r\n global $TYPO3_DB;\r\n\r\n // some additional values:\r\n $this->fe_usersValues['pid'] = $this->conf['usersPid'];\r\n $this->fe_usersValues['tx_sociallogin2t3_service_provider'] = $this->serviceProvider;\r\n\r\n // if there is no username defined in constants, set email as username (if existent), else service provider id\r\n if (!isset($this->fe_usersValues['username'])) $this->fe_usersValues['username'] = $this->fe_usersValues['mail'] ? $this->fe_usersValues['mail'] : $this->serviceUserId;\r\n $this->fe_usersValues['tstamp'] = time();\r\n $this->fe_usersValues['usergroup'] = $this->conf['userGroup'];\r\n\r\n $where = 'tx_sociallogin2t3_id=\"' . $TYPO3_DB->quoteStr($this->fe_usersValues['tx_sociallogin2t3_id'], $this->tableName) . '\"';\r\n\r\n $result = $TYPO3_DB->exec_SELECTquery('uid', $this->tableName, $where, '', '', '');\r\n if ($TYPO3_DB->sql_num_rows($result) > 0) $TYPO3_DB->exec_UPDATEquery($this->tableName, $where, $this->fe_usersValues);\r\n else\r\n {\r\n $this->fe_usersValues['password'] = md5($this->fe_usersValues['name'] . time());\r\n $this->fe_usersValues['crdate'] = time();\r\n\r\n $TYPO3_DB->exec_INSERTquery($this->tableName, $this->fe_usersValues);\r\n }\r\n\r\n $this->loginUser();\r\n }", "title": "" }, { "docid": "fc19abc7d32e9a92edd23b61ed75c256", "score": "0.6551889", "text": "public function register(string $email, string $password):void{\r\n // \r\n //Create an sql/view to retrieve the password from user table. \r\n //the user with the given email \r\n $sql = \"select password \"\r\n . \"from user \"\r\n . \"where email= '$email' \";\r\n //\r\n //Execute the query and retrieve the password\r\n $users= $this->get_sql_data($sql);\r\n //\r\n //Get the entity on which to do the insert this will aid in string \r\n //processing since entities and columns have their string equivalent\r\n $entity=$this->entities[\"user\"];\r\n //\r\n //if no user create the user's instance\r\n if(count($users)===0){\r\n // \r\n //Formulate the sql to insert from first principle \r\n //insert statement \r\n $smt = \"INSERT \\n\"\r\n //\r\n //Get the entity to insert \r\n . \"INTO {$entity} \\n\"\r\n //\r\n //Insert the two columns email and password\r\n . \"(\"\r\n . \"{$entity->columns[\"email\"]->to_str()},\"\r\n . \"{$entity->columns[\"password\"]->to_str()} \"\r\n . \")\\n\"\r\n //\r\n //Insert the given values.\r\n . \"VALUES (\"\r\n . \"'{$email}','\" .password_hash($password, PASSWORD_DEFAULT).\"'\"\r\n . \")\\n\";\r\n //\r\n //Execute the insert query\r\n $this->query($smt);\r\n //\r\n //Stop any further execution \r\n return;\r\n }\r\n //\r\n //This user exists if there \r\n //\r\n //User exists with a null password. \r\n if(is_null($users[0][\"password\"])){\r\n $stmt=\"UPDATE \\n\"\r\n //\r\n //Update this entity\r\n . \"{$entity} \\n\"\r\n . \"SET \\n\"\r\n //\r\n //Update the password from the null to the hashed version. \r\n . \"{$entity->columns[\"password\"]}='\"\r\n .password_hash($password, PASSWORD_DEFAULT). \"'\\n\"\r\n //\r\n //Update only the given emailed user.\r\n . \"WHERE {$entity->columns[\"email\"]}='$email'\\n\";\r\n //\r\n //execute\r\n $this->query($stmt);\r\n \r\n //\r\n //stop any futher excecution \r\n return;\r\n }\r\n //\r\n //We have a user who has a password already \r\n throw new Exception(\"Your email $email already exists have an account with please log in \"\r\n . \"with your password\");\r\n \r\n }", "title": "" }, { "docid": "0d1b05c2fae6c64427906546d7426cc7", "score": "0.6550167", "text": "public function registerUser(Core\\Request $req){\n if(!isset($req->params[\"submitReg\"])){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"no data send...\"], 403);\n }\n\n\n $username = htmlspecialchars($req->params['username']);\n $pwd=$req->params['pwd'];\n $pwdcheck=$req->params['pwdcheck'];\n $name=htmlspecialchars($req->params['name']);\n $address=htmlspecialchars($req->params['address']);\n $city=htmlspecialchars($req->params['city']);\n $email=$req->params['email'];\n //shorthand manier om te controlleren of alles bestaat\n if(!isset($username,$pwd,$pwdcheck,$name,$address,$city,$email)){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"all fields are required\"], 401);\n }\n\n\n //controle op valide email address\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"invalid email\"], 401);\n }\n\n if(strlen($pwd) < 8){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"Password must be atleast 8 characters long\"], 401);\n }\n\n if(strlen($username) < 6){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"Username must be atleast 6 characters long\"], 401);\n }\n\n //ophalen van een database instance.\n $conn = Core\\Database::getInstance();\n\n //controlleren of er een al een account is met de gegeven username.\n $found = $conn->columnQuery(\"SELECT COUNT(id) FROM user WHERE username = ?\", [$username]);\n $found = intval($found);\n if($found){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"username already is in use\"], 409);\n }\n\n //controleren of email adres al word gebruikt.\n\n $found = $conn->columnQuery(\"SELECT COUNT(id) FROM user WHERE email = ?\", [$email]);\n if($found !== 0){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"email already is in use\"], 409);\n }\n\n //wachtwoord match controlleren\n\n if($pwd !== $pwdcheck){\n return $this->json([\"error\"=>\"true\", \"message\"=>\"given passwords are not the same\"], 401);\n }\n //wachtwoord hashen met bcrypt\n $passwordHashed = password_hash($pwd, PASSWORD_BCRYPT);\n $conn->query(\"INSERT INTO user (email, username, password, name, address, city) VALUES (?,?,?,?,?,?)\", \n [$email, $username, $passwordHashed, $name, $address, $city]); //insert de gebruiker in de database.\n\n return $this->json([\"account created\"=>true]);\n\n }", "title": "" }, { "docid": "ab96e15b578b8e484844fed3fd5ee4a4", "score": "0.65391654", "text": "public function register()\n {\n $this->validation['password_reg']['match'][] = $this->password;\n $this->username_exists();\n if (!$this->validate() || $this->username_reg) {\n throw new ValidationException('Invalid registration info!');\n }\n \n $db = DB::conn();\n $md5 = md5($this->password);\n\n $db->query(\n 'INSERT INTO user SET username = ?, password = ?',\n array($this->username, $md5)\n );\n }", "title": "" }, { "docid": "fb96074996fcf2bd3003d9fff9adf98f", "score": "0.6536888", "text": "public function signup();", "title": "" }, { "docid": "7a738d20b4094f321b76ae4cecf5e96e", "score": "0.65278393", "text": "public function register(){\n// \\YII::$app->db->createCommand ($query)->execute();\n $newUser = new Accounts();\n $newUser->name= $this->login;\n $newUser->passwd=$this->pass;\n $newUser->Email=$this->email;\n $newUser->save ();\n\n }", "title": "" }, { "docid": "e4d7c381b6923e89a01ae1f3c39526a8", "score": "0.6522442", "text": "public function registerUser(){\n \n //Save in students table\n \n //Assign to class\n \n //Assign to program \n }", "title": "" }, { "docid": "9479e7b032fafd4c290477e171b83366", "score": "0.652241", "text": "public static function CrearUsuario(){\n $usNuevo = new self();\n $usNuevo->nombre = $_POST[\"nombre\"];\n $usNuevo->clave = $_POST[\"clave\"];\n $usNuevo->GuardarUsuario();\n return \"Usuario Guardado\";\n }", "title": "" }, { "docid": "cce5adc4b4faf38a70fd4a4db7b2ee66", "score": "0.6521073", "text": "public static function registrarUsuario ($nombre, $telefono, $email, $contrasena, $rol, $cif){\n self::conectar();\n $contrasena = md5($contrasena);\n $consulta = \"INSERT INTO usuarios VALUES ('$nombre', $telefono, '$email', '$contrasena', '$rol', '$cif')\";\n $filas = self::$conexion->exec($consulta);\n self::$conexion=null;\n if ($filas == 0){\n return false;\n }\n else{\n return true;\n }\n \n }", "title": "" }, { "docid": "1c892fec098b6227a8097a4454ded9c5", "score": "0.65202665", "text": "function register(){\n if (isset($_POST['ok'])){\n if($_POST['username'] == \"\")\n {\n $error = \"Chưa nhập username\";\n } else if ($_POST['password'] == \"\")\n {\n $error = \"Chưa nhập mật khẩu\"; \n } else if($_POST['re-password'] == \"\")\n {\n $error = \"Chưa nhập lại mật khẩu\";\n } else if ($_POST['fullname'] == \"\")\n {\n $error = \"Chưa nhập họ tên\";\n } else if($_POST['password'] != $_POST['re-password']){\n $error = \"Xác thực mật khẩu không đúng\";\n } else{\n insertUser($_POST['username'],\n $_POST['password'], $_POST['fullname'],\n $_POST['year'], $_POST['info']);\n \n // Chuyen sang trang login\n redirect(\"?controller=user&action=login\");\n \n }\n }\n \n include \"view/user/register.php\";\n }", "title": "" }, { "docid": "8ab50e0174649098332304de2fa7912b", "score": "0.65132", "text": "function createUserAccount(){\n\n\t\t\t}", "title": "" }, { "docid": "2ed4e1fa35ba75ec44a5d1b2e7357b17", "score": "0.6511933", "text": "private function registerUser() {\n $userObj = json_decode(stripslashes($this->getJsonData()));\n\n\n $user = new User();\n //public function setAll($id, $name, $surname, $nickName,\n //$password, $mail, $birthDate, $registerDate,$userType ) {\n $user->setAll(0, $userObj->name, $userObj->surname, $userObj->nickName, $userObj->password, $userObj->mail, date($userObj->birthDate), date(\"Y-m-d\"), 1);\n $outPutData = array();\n $outPutData[] = true;\n $user->setId(UserADO::create($user));\n\n //the senetnce returns de id of the user inserted\n $outPutData[] = array($user->getAll());\n //$outPutData[]= date(\"Y-m-d\");\n\n return $outPutData;\n }", "title": "" }, { "docid": "8777d0988d29b9f8d93319b935b65bad", "score": "0.6505828", "text": "private function registerUser()\n {\n $userForm = new UserForm();\n $userForm->setScenario('create');\n $userForm->load($this->toArray(), '');\n $userForm->email = $this->ldapAuth->getUserEmail($this->username);\n $userForm->status = User::STATUS_ACTIVE;\n return $userForm->save();\n }", "title": "" }, { "docid": "dc8cef09da50104cc5d673217bda1ace", "score": "0.6502627", "text": "public function registrarUsuario($aDatos) {\r\n\t\t\t$resultado = -1;\t\r\n\t\t\t// Fecha actual.\r\n\t\t\t$fecha = date(\"Y-m-d H:i:s\");\t\t\t\r\n\t\t\t$error=array();\r\n\t\t\tif($aDatos['email']==\"\"){\r\n\t\t\t\t$error[]=\"Debe introducir un email\";\r\n\t\t\t}\r\n\t\t\tif($aDatos['password']==\"\"){\r\n\t\t\t\t$error[]=\"Debe introducir una contraseña\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif($aDatos['password']!=$aDatos['password2']){\r\n\t\t\t\t\t$error[]=\"Las contraseñas deben coincidir\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($this->estaUsuarioRegistrado($aDatos['email'])){\r\n\t\t\t\t$error[]=\"Ya existe un usuario con ese email\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(count($error)==0){\r\n\t\t\t\t\r\n\t\t\t\t//Generamos un código de activación único\r\n\t\t\t\t$existe_codigo=true;\r\n\t\t\t\twhile($existe_codigo){\r\n\t\t\t\t\t$codigo_activacion=\"\";\r\n\t\t\t\t\tfor ($i=0; $i<40; $i++) {\r\n\t\t\t\t\t $d=rand(1,30)%2;\r\n\t\t\t\t\t $codigo_activacion.= $d ? chr(rand(65,90)) : chr(rand(48,57));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$sql=\"SELECT * FROM \".$this->sTablaUsuario.\" WHERE codigo_activacion='$codigo_activacion'\";\r\n\t\t\t\t\t$rs=$this->oBD->Execute($sql);\r\n\t\t\t\t\t$codigos_similares=$rs->GetRows();\r\n\t\t\t\t\tif(count($codigos_similares)==0){\r\n\t\t\t\t\t\t$existe_codigo=false;\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\t// Encriptamos la clave pasada como parámtro usando el \"salt\" generado aleatoriamente.\r\n\t\t\t\t$clave_encriptada = md5($aDatos['password']);\r\n\t\t\t\t// Insertamos la información en la base de datos.\r\n\t\t\t\t$consulta_sql = \"INSERT INTO \".$this->sTablaUsuario.\" (codigo_activacion,permiso_acceso,id_rol, nombre, email, password, fecha_alta, privado,id_pais) \";\r\n\t\t\t\t$consulta_sql .= \" VALUES('$codigo_activacion',0,\".ID_ROL_USUARIO.\", '\".$aDatos['nombre'];\r\n\t\t\t\t$consulta_sql .= \"', '\".$aDatos['email'].\"', '\".$clave_encriptada.\"','\".$fecha.\"','0', '\".$aDatos['select_pais'].\"')\";\r\n\t\t\t\t\r\n\t\t\t\tif (!$this->oBD->Execute($consulta_sql)){\r\n\t\t\t\t\t$resultado = -2;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$resultado=$this->oBD->Insert_ID();\r\n\t\t\t\t\t//AQUI REGISTRAMOS UN PAGO FICTICIO PARA SIMULAR EL PAGO DE LA SUSCRIPCION DE 0 euros\r\n\t\t\t\t\t$fecha_actual = date(\"Y-m-d\");\r\n\t\t\t\t\t$sql_pago=\"INSERT INTO \".TB_PAGO_USUARIO.\" (id_usuario, id_paypal,id_tipo_pack,fecha_inicio) VALUES ($resultado, 3, 3,'$fecha_actual')\";\r\n\t\t\t\t\t$this->oBD->Execute($sql_pago);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$resultado=$error;\r\n\t\t\t}\t\r\n\r\n\t\t\t\r\n\t\t\treturn $resultado;\t \r\n\t\t}", "title": "" }, { "docid": "374b078716c77ae85ad038b3142d4a49", "score": "0.6497139", "text": "function register($username, $email, $password) {\n global $conn;\n\n if (username_exists($username)) {\n print_danger_raw(\"Benutzername existiert bereits.\");\n return;\n }\n\n if (email_exists($email)) {\n print_danger_raw(\"Email-Adresse existiert bereits.\");\n return;\n }\n\n if (strlen($password) <= 8) {\n print_danger_raw(\"Passwort muss mind. 8 Zeichen enthalten.\");\n return;\n }\n\n $password = password_hash($password, PASSWORD_DEFAULT);\n\n $statement = $conn->prepare(\"INSERT INTO accounts(username, email, password) VALUES(?, ?, ?)\");\n $statement->bind_param(\"sss\", $username, $email, $password);\n \n if ($statement->execute()) print_success_raw(\"Account erstellt. Melden Sie sich an.\");\n else print_danger_raw(\"Account konnte nicht erstellt werden.\");\n}", "title": "" }, { "docid": "21e652e9482703055018b54444e0c11e", "score": "0.6492751", "text": "function registo()\n\t{\n\t\tif ( ! $this->dx_auth->is_logged_in())\n\t\t{\t\n\t\t\t$val = $this->form_validation;\n\t\t\t\n\t\t\t// Set form validation rules\n\t\t\t$val->set_rules('username', 'Numero de Utente', 'trim|required|min_length['.$this->min_username.']|max_length['.$this->max_username.']|callback_username_check|alpha_dash');\n\t\t\t$val->set_rules('password', 'Senha', 'trim|required|min_length['.$this->min_password.']|max_length['.$this->max_password.']|matches[confirm_password]');\n\t\t\t$val->set_rules('confirm_password', 'Confirme a Senha', 'trim|required');\n\t\t\t$val->set_rules('email', 'Email', 'trim|required|valid_email|callback_email_check');\n $val->set_rules('data_nascimento','Data Nascimento','trim|required');\n $val->set_rules('nome_completo', 'Nome_Completo', 'trim|required');\n \n \n\n // Run form validation and register user if it's pass the validation\n if ($val->run() AND $this->dx_auth->register($val->set_value('username'), $val->set_value('password'), $val->set_value('email'),$val->set_value('nome_completo'),$val->set_value('data_nascimento')))\n {\t\n // Set success message accordingly\n if ($this->dx_auth->email_activation)\n {\n $data['auth_message'] = 'Foi registado com sucesso. Verifique o seu email para activar a sua conta.';\n }\n else\n {\t\t\n\t\t\t\t\t\t\t\t\techo '<br>Foi registado com sucesso.<br>';\n\t\t\t\t\t\t\t\t\techo 'Vai ser redireccionado em 3 segundos...<br>';\n\t\t\t\t\t\t\t\t\theader('Refresh: 3; URL=https://www.portaldasaude.click/');\n }\n\n\n }\n else\n {\n // Load registration page\n $this->load->view('header');\n $this->load->view('formulario_registo');\n //$this->load->view('Auth/register_form');\n }\n }\n elseif ( ! $this->dx_auth->allow_registration)\n {\n $data['auth_message'] = 'Registration has been disabled.';\n $this->load->view($this->dx_auth->register_disabled_view, $data);\n }\n else\n {\n redirect(index_page(), 'refresh'); \n }\n\t}", "title": "" }, { "docid": "b10ad9f571fa54e086c84d2763734a5f", "score": "0.64919513", "text": "public function register(Owner $user)\n {\n\n }", "title": "" }, { "docid": "15b0949cd362e8539fe8e6ccd16f1c68", "score": "0.64841986", "text": "public static function registerUserController(){\r\n\t\t //se valida que todos los campos esten inicializados\r\n if(isset($_POST[\"nombre\"]) && isset($_POST[\"apellido\"]) && isset($_POST[\"email\"]) && isset($_POST[\"rfc\"]) && isset($_POST[\"curp\"])){\r\n //se prepara un array asociativo con todos los datos\r\n $datos = array( \"nombre\"=>$_POST[\"nombre\"], \"apellido\"=>$_POST[\"apellido\"],\r\n \"email\"=>$_POST[\"email\"], \"date\"=>date(\"Y-m-d h:i:s\"), \"rfc\"=>$_POST[\"rfc\"], \"curp\"=>$_POST[\"curp\"]);\r\n $respuesta = new DatosProd();\r\n //se envian los datos al modelo para registrar un nuevo proveedor\r\n $respuesta->registerUserModel(\"proveedores\",$datos);\r\n //se valida la respuesta\r\n if($respuesta){\r\n //en caso de ser registrado se muestra un mensaje de exito y se redirecciona\r\n echo \"<script>\r\n swal({\r\n type:'success',\r\n title: 'Proveedor registrado exitosamente!',\r\n showConfirmButton: false,\r\n timer:2500\r\n },\r\n function () {\r\n window.location.href = 'index.php?action=usuarios';\r\n tr.hide();\r\n });\r\n </script>\";\r\n }else{\r\n //en caso de error se muestra el mensaje y se redirecciona\r\n echo \"<script>\r\n swal({\r\n type:'error',\r\n title: 'Hubo un error al registrar el proveedor!',\r\n showConfirmButton: false,\r\n timer:2500\r\n },\r\n function () {\r\n window.location.href = 'index.php?action=usuarios';\r\n tr.hide();\r\n });\r\n </script>\";\r\n }\r\n\r\n }\r\n }", "title": "" }, { "docid": "68c3cff4c00432c2f52d0e677ac6f731", "score": "0.64821166", "text": "public function registerAction() {\n $nickname = $this->request->getpost(\"nickname\", \"string\");\n $password = $this->request->getpost(\"password\");\n $email = $this->request->getpost(\"email\", \"email\");\n \n $user = new User();\n $user->email = $email;\n $user->password = md5($email .\" \".$password);\n $user->nickname = $nickname;\n $user->time = date('Y-m-d H:i:s');\n $user->points = 0;\n $user->role = 0;\n $user->headpic = \"default\";\n $user->intro = \"\";\n $user->status = 0;\n\n if($user->save() == true) {\n $flag = true;\n $goodAt = explode(\",\", $this->request->getpost(\"goodAt\", \"string\"));\n foreach($goodAt as $item) {\n $newGoodAt = new UserTag();\n $newGoodAt->uid = $user->uid;\n $newGoodAt->tid = intval($item);\n if(!$newGoodAt->save()) {\n $flag = false;\n break;\n }\n }\n if($flag) {\n $this->session->set('auth', array(\n 'uid' => $user->uid,\n 'role' => $user->role\n ));\n echo json_encode(array('fbCode' => 1, 'message' => '注册成功' ));\n } else {\n $user->delete();\n echo json_encode(array('fbCode' => -1, 'message' => '标签添加失败' ));\n }\n } else {\n echo json_encode(array('fbCode' => -1, 'message' => '注册失败' ));\n }\n }", "title": "" }, { "docid": "b6811f6e30214ea46f627b7f2cc05af9", "score": "0.6472126", "text": "public function save_user()\r\n\t{\r\n\t\t$first_name = $_POST['first_name'];\r\n\t\t$last_name = $_POST['last_name'];\r\n\t\t$username = $_POST['username'];\r\n\t\t$password = $_POST['password'];\r\n\t\t$role = $_POST['role_id'];\r\n\r\n\t\t$enc_pass = password_hash($password , PASSWORD_BCRYPT);\r\n\t\t$username_exists = Users::get_user_by_username($username);\r\n\t\t\r\n\t\tif ($username_exists) {\r\n\t\t\theader('Location: '.URLROOT.'/admin/add_user?err=Korisnik sa ovim username-om već postoji!');\r\n\t\t} else {\r\n\t\t\t$add_new_user = Users::add_new_user($first_name, $last_name, $username, $enc_pass, $role);\r\n\t\t\tif ($add_new_user) {\r\n\t\t\t\t\t$_SESSION['msg'] = 'Uspešno ste dodali korisnika!';\r\n\t\t\t\t\theader('Location: '.$_SERVER['HTTP_REFERER'].'');\r\n\t\t\t\t\texit();\r\n\t\t\t} else {\r\n\t\t\t\t$_SESSION['err'] = 'Nije uspelo, pokušajte ponovo!';\r\n\t\t\t\theader('Location: '.$_SERVER['HTTP_REFERER'].'');\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "a36d30ddbbf0fe57c9e8ff0594fab947", "score": "0.6470565", "text": "public function IngresarInfoUsuario()\n\t{\n\t}", "title": "" }, { "docid": "a837719e4f03ef5740af5f2b48da4a7c", "score": "0.6465957", "text": "public function registrar_usuario(){\n \n extract($_POST); \n\n $arrayData = array(\n 'nombres'=>strtoupper($nombres),\n 'apellidos'=>strtoupper($apellidos),\n 'correo'=>strtoupper($correo),\n 'usuario'=>strtoupper($usuario),\n 'clave'=>md5($clave),\n 'telefono'=>$telefono,\n\n //'ip'=>$this->getRealIP(); \n );\n $this->Consultas_usuarios_model->usuarios_guardar($arrayData); \n }", "title": "" }, { "docid": "c65ceca8a72a32f28a55913f5d42c70d", "score": "0.6465251", "text": "function createUser($user,$pwd,$name,$mail,$grps=null){\n }", "title": "" }, { "docid": "987a41a62372071a8c9e04503fdd0ff1", "score": "0.6465095", "text": "public function register() {\n\t\tif ($this->Auth->user()) {\n\t\t\t$this->Session->setFlash(__d('users', 'You are already registered and logged in!', true));\n\t\t\t$this->redirect('/');\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\t\t\t$user = $this->User->register($this->data);\n\t\t\tif ($user !== false) {\n\t\t\t\t$this->set('user', $user);\n\t\t\t\t$this->_sendVerificationEmail($user[$this->modelClass]['email']);\n\t\t\t\t$this->Session->write('Auth.redirect', $this->Auth->loginRedirect);\n\t\t\t\t$this->Session->setFlash(__d('users', 'Your account has been created. You should receive an e-mail shortly to authenticate your account. Once validated you will be able to login.', true));\n\t\t\t\t$this->redirect(array('action'=> 'login'));\n\t\t\t} else {\n\t\t\t\tunset($this->data[$this->modelClass]['password']);\n\t\t\t\tunset($this->data[$this->modelClass]['temppassword']);\n\t\t\t\t$this->Session->setFlash(__d('users', 'Your account could not be created. Please, try again.', true), 'default', array('class' => 'message warning'));\n\t\t\t}\n\t\t}\n\n\t\t$this->_setLanguages();\n\t}", "title": "" }, { "docid": "1ec3b29d5464f8a7edcd5094ab8a1ffa", "score": "0.64471316", "text": "public function action_register()\n {\n // Set Title\n $this->template->title = 'User :: Register';\n\n // If logged in - redirect to startpage\n if (User::auth()->logged_in() === TRUE)\n {\n Request::initial()->redirect();\n }\n\n // Open Validation for POST\n $post = Validation::factory($_POST);\n\n // Set rules\n $post->bind(':password', Arr::get($_POST, 'password'));\n $post->rule('username', 'not_empty');\n $post->rule('username', 'Controller_Frontend_User::login', array(':validation', ':field', ':value', ':password'));\n\n // If POST is valid\n if ($post->check())\n {\n // Redirect\n Request::initial()->redirect(Arr::get($_POST, 'redirect'));\n }\n else\n {\n // No POST - no errors\n if (count($_POST) == 0)\n {\n $errors = array();\n $data = array();\n }\n else\n {\n // Get all errors and POST-Data\n $errors = array('errors' => $post->errors('validation'));\n $data = $_POST;\n }\n\n // Call template\n $this->template->content = View::factory('frontend/user/login', array('errors' => $errors, 'data' => $data));\n }\n }", "title": "" }, { "docid": "e2c1ee9e0acdcc70cd861be48c790d32", "score": "0.6446045", "text": "public static function addUser($username, $password){\n }", "title": "" }, { "docid": "73cf069b701fb3a7d9c7bc9b5380d1f3", "score": "0.64415705", "text": "public function agregarUsuario($datos){\n $sql = \"INSERT INTO usuario (nombre, mail, pass) VALUES ('\" . $datos['nombre'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t '\" . $datos['mail'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t PASSWORD('\" . $datos['pass'] . \"'))\";\n $resultado=@mysql_query($sql);\n\t\t@mysql_free_result($resultado);\n }", "title": "" }, { "docid": "88409653061cb92ddf5b2c08b95425f9", "score": "0.6439727", "text": "public function executeRegister()\n {\n if ($this->getUser()->isAuthenticated()) {\n $this->error = 'You are already logged in. You can not register again.';\n return sfView::ERROR;\n }\n if (!$this->hasRequestParameter('name') || !$this->hasRequestParameter('email') \n || !$this->hasRequestParameter('password')) {\n $this->error = 'Invalid Request.';\n return sfView::ERROR;\n }\n\n $this->requestedUserType = '1';\n //Create and populate the User object\n $user = new User();\n\n $userName = str_replace(' ','',strtolower($this->getRequestParameter('name')));\n $user->setName($this->getRequestParameter('name'));\n $user->setEmail($this->getRequestParameter('email'));\n $user->setPassword($this->getRequestParameter('password'));\n\n $_SESSION['question'] = $this->getRequestParameter('question');\n\n //$user->setPoints('10.11');\n $user->setTypeUnconfirmed($this->requestedUserType);\n\n /* Username Duplication Check */\n $unamequery = mysql_query(\"select * from user where username='\".$userName.\"'\");\n $unamecount = mysql_num_rows($unamequery);\n\n $dupval = 2;\n duplicationCheck:\n if($unamecount>=1)\n {\n \t$newUsername = $userName.$dupval;\n \t$unamequery = mysql_query(\"select * from user where username='\".$newUsername.\"'\");\n \t$unamecount = mysql_num_rows($unamequery);\n \tif($unamecount>=1)\n \t{\n \t\t$dupval++;\n \t\tgoto duplicationCheck;\n \t}\n \telse\n \t{\n \t\t$userName = $newUsername;\n \t}\n }\n $user->setUsername($userName);\n\n //Try to save the User... throw an exception if something messes up\t\t\n if(!$user->save())\n throw new PropelException('User creation failed');\n\n mysql_query(\"insert into expert_category(user_id,category_id) values('\".$user->getId().\"','1')\") or die(mysql_error());\n\n mysql_query(\"insert into user_score(user_id,score) values('\".$user->getId().\"','1')\") or die(mysql_error());\n\n $this->sendConfirmationEmail( $user, $_SESSION['question'] );\n\n $this->user = $user;\n\n $this->forward('quickreg', 'confirmationcode');\n\n //$this->redirect(sfConfig::get('app_rayku_url').\"/quickreg/confirmationcodesent\");\n }", "title": "" }, { "docid": "ed2f546726b1c9a6a00cff28cf3c2edb", "score": "0.64383477", "text": "public function register()\n {\n $rules = [\n 'name' => 'required',\n 'email' => 'required|min_length[6]|max_length[50]|valid_email|is_unique[user.email]',\n 'password' => 'required|min_length[8]|max_length[255]'\n ];\n\n \t\t$input = $this->getRequestInput($this->request);\n\n if (!$this->validateRequest($input, $rules)) \n\t\t{\n return $this->getResponse(\n \t$this->validator->getErrors(),\n \tResponseInterface::HTTP_BAD_REQUEST\n \t);\n }\n\n $userModel = new UserModel();\n \t$userModel->save($input);\n \n\t\treturn $this\n ->getJWTForUser(\n $input['email'],\n ResponseInterface::HTTP_CREATED\n );\n\n }", "title": "" }, { "docid": "65a48959c713504cac4eac1fc21d3739", "score": "0.643758", "text": "public function register() {\n\t\t$userId = $this->UserAuth->getUserId();\n\t\tif ($userId) {\n\t\t $this->Session->setFlash(__('已经登录,跳转到用户主页,请先退出登录后再注册'));\n\t\t\t$this->redirect(\"/dashboard\");\n\t\t}\n\t\tif (SITE_REGISTRATION) {\n\t\t\t$userGroups=$this->UserGroup->getGroupsForRegistration();\n\t\t\t$this->set('userGroups', $userGroups);\n\t\t\tif ($this->request -> isPost()) {\n\t\t\t\tif(USE_RECAPTCHA && !$this->RequestHandler->isAjax()) {\n\t\t\t\t\t$this->request->data['User']['captcha']= (isset($this->request->data['recaptcha_response_field'])) ? $this->request->data['recaptcha_response_field'] : \"\";\n\t\t\t\t}\n\t\t\t\t$this->User->set($this->data);\n\t\t\t\tif ($this->User->RegisterValidate()) {\n\t\t\t\t\tif (!isset($this->data['User']['user_group_id'])) {\n\t\t\t\t\t\t$this->request->data['User']['user_group_id']=DEFAULT_GROUP_ID;\n\t\t\t\t\t} elseif (!$this->UserGroup->isAllowedForRegistration($this->data['User']['user_group_id'])) {\n\t\t\t\t\t\t$this->Session->setFlash(__('请选择群组'));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$this->request->data['User']['active']=1;\n\t\t\t\t\tif (!EMAIL_VERIFICATION) {\n\t\t\t\t\t\t$this->request->data['User']['email_verified']=1;\n\t\t\t\t\t}\n\t\t\t\t\t$ip='';\n\t\t\t\t\tif(isset($_SERVER['REMOTE_ADDR'])) {\n\t\t\t\t\t\t$ip=$_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t}\n\t\t\t\t\t$this->request->data['User']['ip_address']=$ip;\n\t\t\t\t\t$salt=$this->UserAuth->makeSalt();\n\t\t\t\t\t$this->request->data['User']['salt'] = $salt;\n\t\t\t\t\t$this->request->data['User']['password'] = $this->UserAuth->makePassword($this->request->data['User']['password'], $salt);\n\t\t\t\t\t$this->User->save($this->request->data, false);\n\t\t\t\t\t$userId=$this->User->getLastInsertID();\n\t\t\t\t\t$user = $this->User->findById($userId);\n\t\t\t\t\tif (SEND_REGISTRATION_MAIL && !EMAIL_VERIFICATION) {\n\t\t\t\t\t\t$this->User->sendRegistrationMail($user);\n\t\t\t\t\t}\n\t\t\t\t\tif (EMAIL_VERIFICATION) {\n\t\t\t\t\t\t$this->User->sendVerificationMail($user);\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($this->request->data['User']['email_verified']) && $this->request->data['User']['email_verified']) {\n\t\t\t\t\t\t$this->UserAuth->login($user);\n\t\t\t\t\t\t$this->redirect('/');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->Session->setFlash(__('验证邮件已发到您的信箱,请前往确认。'));\n\t\t\t\t\t\t$this->redirect('/register');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Oops,当前网站还没有开放注册。'));\n\t\t\t$this->redirect('/login');\n\t\t}\n\t}", "title": "" }, { "docid": "fa497df0e0dd27b5e985928c2bdca681", "score": "0.6436684", "text": "public function userCreate(){\r\n $userdata = $this->getUserData();\r\n $check = $this->userCheck();\r\n if($check == 0){\r\n if(strstr($userdata['name'], \" \") !== false){\r\n $firstname = strstr($userdata['name'], \" \", true);\r\n $lastname = ltrim(strstr($userdata['name'], \" \"));\r\n }\r\n else{\r\n $firstname = $lastname = $userdata['name'];\r\n }\r\n $user_data = array('user' => array('login' => $userdata['user'], \r\n 'firstname' => $firstname, \r\n 'lastname' => $lastname, \r\n 'mail' => $userdata['email'], \r\n 'password' => chili_passCreate()\r\n ));\r\n $this->request($this->url . 'users.json', 'POST', json_encode($user_data));\r\n }\r\n }", "title": "" }, { "docid": "033876a8b12f8615d9d561e16e8f12b8", "score": "0.6436544", "text": "function register_user($register_data) {\n\tarray_walk($register_data, 'array_sanitiser' );\n\t$register_data['password'] = md5($register_data['password']);\n\t$fields = '`' . implode ('`, `', array_keys($register_data)) . '`';\n\t$data = '\\'' . implode('\\', \\'', $register_data) . '\\'';\n\tmysql_query(\"INSERT INTO users ($fields) VALUES ($data)\");\n}", "title": "" } ]
dfbb392171793aebf629a895652de43b
////////////////////////////////////////////////////////////////////////// getSliderValues (min_year, max_year, min_price, max_price)
[ { "docid": "91a04399b8c481cf8b07d5ee80216064", "score": "0.84450924", "text": "public function getSliderValues() {\n $sql = 'SELECT MIN(year) as min_year, MAX(year) as max_year, MIN(price_brut) as min_price, MAX(price_brut) as max_price ';\n $sql .= 'FROM {{%trans}} WHERE cat_id = ' .(int)$this->id;\n $values = Yii::$app->db->createCommand($sql)->queryOne();\n\n if (empty($values['min_year']))\n $values = ['min_year' => self::MIN_YEAR_DEFAULT, 'max_year' => self::MAX_YEAR_DEFAULT, 'min_price' => self:: MIN_PRICE_DEFAULT, 'max_price' => self::MAX_PRICE_DEFAULT];\n else { // To avoid problems in the reason of slider JS-ceiling\n $values['min_price'] = round($values['min_price'], -3);\n $values['max_price'] = round($values['max_price'], -3);\n }\n\n if ($values['min_price'] == $values['max_price']) {\n $values['min_price'] = ($values['min_price'] < 1000) ? 0 : $values['min_price'] - 1000;\n $values['max_price'] = $values['max_price'] + 1000;\n }\n\n if ($values['min_year'] == $values['max_year']) {\n $values['min_year'] = $values['min_year'] - 1;\n $values['max_year'] = $values['max_year'] + 1;\n }\n\n $this->updateAttributes($values);\n return true;\n }", "title": "" } ]
[ { "docid": "59d84997043d05422f83477cf9ec7dfd", "score": "0.61829334", "text": "protected function getOptions() {\n try {\n $min = $this->getYear($this->getSetting('min'));\n }\n catch (\\Exception $e) {\n $min = 2000;\n }\n\n try {\n $max = $this->getYear($this->getSetting('max'));\n }\n catch (\\Exception $e) {\n $max = 2050;\n }\n $range = range($min, $max);\n return array_combine($range, $range);\n }", "title": "" }, { "docid": "2f2888b968f2f36896c7dbc340c48d1b", "score": "0.59471846", "text": "public function vehiclesYear($category,$subcategory,$minYear,$maxYear) // Fetch items between min nad max price and category only\n {\n $statement = (\"SELECT * FROM `ads` WHERE main_cat='{$category}' AND subcategory='$subcategory' AND year BETWEEN '{$minYear}' AND '{$maxYear}' AND status=1 order by datetime desc\");\n return $statement;\n }", "title": "" }, { "docid": "e93acc5c031d1086655428377d1b85e3", "score": "0.5871395", "text": "public function get_price_ranges() {\n\n\t\treturn $this->get_filter( \n\n\t\t/* $fields */ array( 'R.range_id', 'R.price_range' ), \n\n\t\t/* $table */ array( 'tableName' => 'price_ranges', 'prefix' => 'R' ), \n\n\t\t/* $join */ array( 'joinTable' => 'CubeCart_inventory', 'prefix' => 'I', 'leftMatch' => 'R.range_id', 'rightMatch' => 'I.price_range' ) );\n\n\t\t}", "title": "" }, { "docid": "890a13265d8f2bd7cfdb075b452b6510", "score": "0.5818241", "text": "function fl_sliderrange_field ( $name , $value , $field ) {\n\n $field = array_merge(\n array( 'settings' => array(\n 'min' => 0 ,\n 'max' => 10 ,\n 'defmin' => 0 ,\n 'defmax' => 10 ,\n 'value' => '0|10' ,\n 'step' => 1 ,\n 'color' => '#666666'\n )\n ) , $field );\n\n\tif ( sizeof( $value = explode( '|' , $value ) ) !== 2 ) {\n $value = array ( $field[ 'settings' ][ 'defmin' ], $field[ 'settings' ]['defmax' ] );\n }\n?>\n<script>\n( function( $ ) {\n $( function() {\n $( \"#slider-range-<?php echo $name ; ?>\" ).slider( {\n range: true,\n min: <?php echo $field[ 'settings' ][ 'min' ]; ?>,\n max: <?php echo $field[ 'settings' ][ 'max' ];?>,\n values: <?php echo ('['. $value[0]. ',' .$value[1] . ']');?> ,\n <?php if ( $field[ 'settings' ][ 'step' ] != null ) {\n ?>\n step: <?php echo $field[ 'settings' ][ 'step' ]; ?>,\n <?php\n }\n ?>\n slide: function( event, ui ) {\n $( \"#slid<?php echo $name ; ?>\" ).val( ui.values[ 0 ] + \" - \" + ui.values[ 1 ] );\n $( \"#<?php echo $name ; ?>\" ).val( ui.values[ 0 ] + \"|\" + ui.values[ 1 ] );\n },\n });\n $( \"#slid<?php echo $name ; ?>\" ).val( $( \"#slider-range-<?php echo $name ; ?>\" ).slider( \"values\", 0 ) + \" - \" + $( \"#slider-range-<?php echo $name ; ?>\" ).slider( \"values\", 1 ) );\n });\n})(jQuery);\n</script>\n<div class=\"slider-field\">\n <div class=\"slider-field-flex\">\n <div class=\"flex-item slider-value\"><input type=\"text\" id=\"slid<?php echo $name; ?>\" readonly style=\"border:0; color:<?php echo (isset($field['settings']['color']))?$field['settings']['color']:'#f6931f';?>; font-weight:bold;\"></div>\n <div class=\"flex-item slider-slider\"><div id=\"slider-range-<?php echo $name ; ?>\"></div>\n </div>\n <input type=\"hidden\" name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" value=\"<?php echo $value[0].\"|\".$value[1];?>\">\n</div>\n<?php\n}", "title": "" }, { "docid": "1136d3ae4a0e594f4aa80c2494505ccf", "score": "0.5767957", "text": "public function findAllBetweenMinPriceAndMaxPrice($minPrice,$maxPrice): array\n {\n // the \"p\" is an alias you'll use in the rest of the query\n $qb = $this->createQueryBuilder('a')\n ->where('a.price >= :minPrice')\n ->AndWhere('a.price <= :maxPrice')\n ->setParameter('minPrice', $minPrice)\n ->setParameter('maxPrice', $maxPrice)\n ->orderBy('a.price', 'ASC');\n\n\n\n $query = $qb->getQuery();\n\n return $query->execute();\n\n // to get just one result:\n // $product = $query->setMaxResults(1)->getOneOrNullResult();\n }", "title": "" }, { "docid": "12634a5d61171b5673b47c5b2a558858", "score": "0.57495207", "text": "public function get_data_to_display_year(){ \n //group by year\n $query = \"SELECT YEAR, CAST(AVG(VALUE)AS DECIMAL(16,3)) AS AVERAGE, MIN(VALUE) AS MINIMUM, MAX(VALUE) AS MAXIMUM\n FROM VW_DATA\n GROUP BY YEAR\n ORDER BY YEAR\";\n $data = oci_parse ($this->con, $query);\n oci_execute ($data);\n return $data;\n }", "title": "" }, { "docid": "22bd248c1af4267a900eefb135dd4de9", "score": "0.5737553", "text": "public function getSlider():array\n {\n return $this->findAll\n (\n \"SELECT id,src,alt,published,poids\n FROM slider\"\n );\n }", "title": "" }, { "docid": "ea61ade97ed6246a904879bf90cb5cdd", "score": "0.57002467", "text": "protected function getYearsOptions(int $minYear, int $maxYear): array\n {\n $result = [];\n for ($i = $maxYear; $i >= $minYear; --$i) {\n $result[$i] = $i;\n }\n\n return $result;\n }", "title": "" }, { "docid": "577d328816c755ebb30ff00220003116", "score": "0.5694774", "text": "private function get_range_options($args)\r\n\t{\r\n\t\t$options = array();\r\n\t\t$name = $args['name_sf'];\r\n\r\n\t\tglobal $searchandfilter;\r\n\t\t$searchform = $searchandfilter->get($this->sfid);\r\n\t\t$this->auto_count = $searchform->settings(\"enable_auto_count\");\r\n\t\t$this->auto_count_deselect_emtpy = $searchform->settings(\"auto_count_deselect_emtpy\");\r\n\t\t\r\n\t\t\r\n\t\t$min = $args['min'];\r\n\t\t$max = $args['max'];\r\n\t\t$step = $args['step'];\r\n\t\t$thousand_seperator = $args['thousand_seperator'];\r\n $decimal_point = $args['decimal_seperator'];\r\n\t\t$decimal_places = $args['decimal_places'];\r\n\r\n\t\t$value = $min;\r\n\r\n\t\t//for($value=$min; $value<=$max; $value+=$step)\r\n\t\tfor($value=$min; $value<=$max+$step; $value+=$step)\r\n\t\t{\r\n\t\t\t$value_formatted = number_format( (float)$value, $decimal_places, $decimal_point, $thousand_seperator );\r\n\t\t\t\r\n\t\t\t$option = new stdClass();\r\n\t\t\t$option->label = $value_formatted;\r\n\t\t\t$option->attributes = array(\r\n\t\t\t\t'class' => SF_CLASS_PRE.'level-0 '\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$option->value = $value;\r\n\t\t\tarray_push($options, $option);\r\n\t\t}\r\n\r\n\t\t\r\n\t\t/*if(($value-$step)!=$max)\r\n\t\t{\r\n\t\t\t$option = new stdClass();\r\n\r\n\t\t\t$option->attributes = array(\r\n\t\t\t\t'class' => SF_CLASS_PRE.'level-0 '\r\n\t\t\t);\r\n\r\n $value_formatted = number_format( (float)$max, $decimal_places, $decimal_point, $thousand_seperator );\r\n $option->label = $value_formatted;\r\n $option->value = $max;\r\n\t\t\tarray_push($options, $option);\r\n\t\t}*/\r\n\r\n\t\t\r\n\t\treturn $options;\r\n\t}", "title": "" }, { "docid": "a8fb72229b562d4ee30f6996457aedfa", "score": "0.56551147", "text": "public function getCoreSlider()\n {\n return [\n [\n 'label' => __('Slider Evolution Default'),\n 'value' => Slider::STYLESLIDE_EVOLUTION_ONE,\n ],\n [\n 'label' => __('Slider Evolution Caborno'),\n 'value' => Slider::STYLESLIDE_EVOLUTION_TWO,\n ],\n [\n 'label' => __('Slider Evolution Minimalist'),\n 'value' => Slider::STYLESLIDE_EVOLUTION_THREE,\n ],\n [\n 'label' => __('Slider Evolution Fresh'),\n 'value' => Slider::STYLESLIDE_EVOLUTION_FOUR,\n ],\n [\n 'label' => __('Note display on all pages'),\n 'value' => Slider::STYLESLIDE_SPECIAL_NOTE,\n ],\n [\n 'label' => __('Slider'),\n 'value' => Slider::STYLESLIDE_FLEXSLIDER_ONE,\n ],\n [\n 'label' => __('FlexSlider 2'),\n 'value' => Slider::STYLESLIDE_FLEXSLIDER_TWO,\n ],\n [\n 'label' => __('FlexSlider 3'),\n 'value' => Slider::STYLESLIDE_FLEXSLIDER_THREE,\n ],\n [\n 'label' => __('FlexSlider 4'),\n 'value' => Slider::STYLESLIDE_FLEXSLIDER_FOUR,\n ],\n ];\n }", "title": "" }, { "docid": "ac860b05965b55c5633df3609706f468", "score": "0.5635246", "text": "private function CalcMinMaxSumValues()\n {\n list($this->min_sum_value, $this->max_sum_value) =\n $this->values->GetMinMaxSumValues();\n }", "title": "" }, { "docid": "0c47d681a5d158ebf6a1e77b0df9b21f", "score": "0.5543188", "text": "public function getPrices();", "title": "" }, { "docid": "25a27c0498dce0698c0e8cf0accdef00", "score": "0.5502518", "text": "protected function _getItemsData()\n {\n\t\t$select = $this->getLayer()->getProductCollection()->getSelect();\n\t\t$where = $select->getPart(Zend_Db_Select::WHERE);\n\t\t//$select->reset(Zend_Db_Select::WHERE);\n\n $data = array();\n if (Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_CALCULATION) == self::RANGE_CALCULATION_IMPROVED) {\n $data = $this->_getCalculatedItemsData();\n } else {\n\t\t\t$range = $this->getPriceRange();\n\t\t\t$dbRanges = $this->getRangeItemCounts($range);\n\t\t\tif (!empty($dbRanges)) {\n\t\t\t\t$lastIndex = array_keys($dbRanges);\n\t\t\t\t$lastIndex = $lastIndex[count($lastIndex) - 1];\n\n\t\t\t\tforeach ($dbRanges as $index => $count) {\n\t\t\t\t\t$fromPrice = ($index == 1) ? '' : (($index - 1) * $range);\n\t\t\t\t\t$toPrice = ($index == $lastIndex) ? '' : ($index * $range);\n\n\t\t\t\t\t$data[] = array(\n\t\t\t\t\t\t'label' => $this->_renderRangeLabel($fromPrice, $toPrice),\n\t\t\t\t\t\t'value' => $fromPrice . '-' . $toPrice,\n\t\t\t\t\t\t'count' => $count,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n // restore price condition\n\t\t$select->setPart(Zend_Db_Select::WHERE, $where);\n return $data;\n }", "title": "" }, { "docid": "a4f16a2a5552eb036dc587839dccd7c9", "score": "0.5481741", "text": "public function limits()\n\t{\n\t\t$GlobalMin = PHP_INT_MIN;\n\t\t$GlobalMax = PHP_INT_MAX;\n\t\tforeach($this->Data[\"Series\"] as $Key => $Value) {\n\t\t\tif ($this->Data[\"Abscissa\"] != $Key && $this->Data[\"Series\"][$Key][\"isDrawable\"]) {\n\t\t\t\tif ($GlobalMin > $this->Data[\"Series\"][$Key][\"Min\"]) {\n\t\t\t\t\t$GlobalMin = $this->Data[\"Series\"][$Key][\"Min\"];\n\t\t\t\t}\n\n\t\t\t\tif ($GlobalMax < $this->Data[\"Series\"][$Key][\"Max\"]) {\n\t\t\t\t\t$GlobalMax = $this->Data[\"Series\"][$Key][\"Max\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->Data[\"Min\"] = $GlobalMin;\n\t\t$this->Data[\"Max\"] = $GlobalMax;\n\t\treturn [$GlobalMin,$GlobalMax];\n\t}", "title": "" }, { "docid": "ad34cda0085fd221fb3a3b933440037a", "score": "0.546183", "text": "public function prepareFacetDatesSlider() {\n $facet_field = $this->facet_field;\n $settings = $this->settings;\n $results = $this->results;\n $format = self::getDateFormat();\n $needed_solr_call = self::$needed_solr_call;\n if (!isset($this->sliderKey)) {\n $this->sliderKey = self::$range_slider_key++;\n }\n $range_slider_key = $this->sliderKey;\n\n $date_results = array();\n // Grab gap and end, and strip all non-buckets in results.\n $results_gap = $results['gap'];\n $results_end = $results['end'];\n foreach (self::$exclude_range_values as $exclude) {\n unset($results[$exclude]);\n }\n\n // Strip empty buckets top and bottom when no date range filters are set.\n if (!in_array($facet_field, $needed_solr_call)) {\n // Strip top.\n foreach ($results as $bucket => $count) {\n if ($count == 0) {\n unset($results[$bucket]);\n }\n else {\n break;\n }\n }\n // Reverse and strip other side.\n $results = array_reverse($results);\n $new_end = array();\n foreach ($results as $bucket => $count) {\n if ($count == 0) {\n unset($results[$bucket]);\n $new_end = array('bucket' => $bucket, 'count' => $count);\n }\n else {\n break;\n }\n }\n // Reverse to normal order.\n $results = array_reverse($results);\n\n // Add end date.\n if (isset($new_end['count']) AND $new_end['count'] == 0) {\n $end_bucket = $new_end['bucket'];\n $results[$end_bucket] = NULL;\n }\n else {\n $results[$results_end] = NULL;\n }\n }\n // Do not strip empty buckets left and right when filters are set.\n else {\n // Add end date.\n $results[$results_end] = NULL;\n }\n\n // If values are available.\n if (count($results) <= 1) {\n return array();\n }\n\n // Calculate gap.\n $calc_from = strtotime(key($results));\n next($results);\n $calc_to = strtotime(key($results));\n // Calculate difference between from and to date.\n $calc_diff = abs($calc_from - $calc_to);\n\n // Total difference in days.\n $calc_total_days = floor($calc_diff / 60 / 60 / 24);\n\n // @todo Could be done nicer?\n // @todo $date_format configurable.\n // Get gap based on total days diff.\n $gap = NULL;\n $date_format = 'Y';\n if ($calc_total_days < 7) {\n $gap = t('days');\n $date_format = 'M j, Y';\n }\n elseif ($calc_total_days >= 7 && $calc_total_days <= 28) {\n $gap = t('weeks');\n $date_format = 'M j, Y';\n }\n elseif ($calc_total_days >= 28 && $calc_total_days <= 32) {\n $gap = t('months');\n $date_format = 'M Y';\n }\n elseif ($calc_total_days >= 360 && $calc_total_days <= 370) {\n $gap = t('years');\n $date_format = 'Y';\n }\n elseif ($calc_total_days >= 720 && $calc_total_days <= 740) {\n $gap = t('2 years');\n $date_format = 'Y';\n }\n elseif ($calc_total_days >= 1800 && $calc_total_days <= 1850) {\n $gap = t('5 years');\n $date_format = 'Y';\n }\n elseif ($calc_total_days >= 3600 && $calc_total_days <= 3700) {\n $gap = t('decades');\n $date_format = 'Y';\n }\n elseif ($calc_total_days >= 36000 && $calc_total_days <= 37000) {\n $gap = t('centuries');\n $date_format = 'Y';\n }\n elseif ($calc_total_days >= 360000 && $calc_total_days <= 370000) {\n $gap = t('millennia');\n $date_format = 'Y';\n }\n\n // Create a nice array with our data.\n $data = array();\n foreach ($results as $bucket => $count) {\n $bucket_formatted = format_date(strtotime(trim($bucket)) + 1, 'custom', $date_format, 'UTC');\n\n $bucket_formatted = str_replace(' ', '&nbsp;', $bucket_formatted);\n $data[] = array(\n 'date' => $bucket,\n 'bucket' => $bucket_formatted,\n 'count' => $count,\n );\n }\n\n // Add range slider color.\n if (isset($settings['solr_field_settings']['range_facet_slider_color']) &&\n !empty($settings['solr_field_settings']['range_facet_slider_color'])) {\n $slider_color = $settings['solr_field_settings']['range_facet_slider_color'];\n }\n else {\n $slider_color = '#edc240';\n }\n\n $elements = array(\n 'data' => $data,\n 'facet_field' => $facet_field,\n 'slider_color' => $slider_color,\n 'gap' => $gap,\n 'date_format' => $date_format,\n 'form_key' => $range_slider_key,\n );\n\n return $elements;\n }", "title": "" }, { "docid": "f6e650b02ac1c5ed81a71b054e059b9d", "score": "0.54528964", "text": "function getMinMax(/*. return .*/ & $min, /*. return .*/ & $max)\n\t{\n\t\t$min = $this->min;\n\t\t$max = $this->max;\n\t}", "title": "" }, { "docid": "a6d4b8dcd0666380c5946d6f95f1dd9b", "score": "0.5441049", "text": "function filter_by_years()\n\t{\n\t\t$min_year=$this->input->get('from');\n\t\t$max_year=$this->input->get('to');\n\n\t\tif (!is_numeric($min_year) || !is_numeric($max_year))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//get filtered list of countries and min/min years\n\t\t$data=$this->Search_helper_model->filter_by_years($min_year, $max_year);\n\n\t\tif (!isset($data[\"topics\"]))\n\t\t{\n\t\t\t$data['topics']=array('NULL');\n\t\t}\n\t\tif (!isset($data[\"countries\"]))\n\t\t{\n\t\t\t$data['countries']=array('NULL');\n\t\t}\n\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "e02df1ab7a5a470f7b2f8ee110da67d1", "score": "0.5423858", "text": "public function getMappedValues()\n\t{\n\t\tif($this->incomeArr[\"currency\"] == $this->dollarCurrency)\n\t\t{\n\t\t\t$imin = $this->incomeArr[\"minID\"];\n\t\t\t$imax = $this->incomeArr[\"maxID\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$imin = $this->incomeArr[\"minIR\"];\n\t\t\t$imax = $this->incomeArr[\"maxIR\"];\n\t\t}\n\t\tif(!$imin)\n\t\t\t$mappedMin = $imin;\n\t\telse\n\t\t{\n\t $min_arr = $this->getIncomeDrop(array('MIN_VALUE'=>$imin),null,array('MAPPED_MIN_VAL'=>''),'');\n\t $mappedMin = $min_arr['MAPPED_MIN_VAL'];\n\t\t}\n\t\tif($imax==19)\n\t\t\t$mappedMax=$imax;\n\t\telse\n\t\t{\n\t\n\t $max_arr = $this->getIncomeDrop(array('MAX_VALUE'=>$imax),null,array('MAPPED_MAX_VAL'=>''),'');\n\t $mappedMax=$max_arr['MAPPED_MAX_VAL'];\n\t\t}\n\t\tif($this->incomeArr[\"currency\"] == $this->dollarCurrency)\n\t\t{\n\t\t\tif($this->incomeArr[\"minID\"]>0)\n \t$this->removeIncomeFlag=1;\n \t$this->incomeArr[\"minIR\"] = $mappedMin;\n \t$this->incomeArr[\"maxIR\"] = $mappedMax;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->incomeArr[\"minIR\"]>0)\n \t$this->removeIncomeFlag=1;\n \t$this->incomeArr[\"minID\"] = $mappedMin;\n \t$this->incomeArr[\"maxID\"] = $mappedMax;\n\t\t}\n\t}", "title": "" }, { "docid": "7589618b8f87316b52651082e6e7a63a", "score": "0.5410415", "text": "public function appFilter3($min,$max)\n {\n $statement = $this->pdo->prepare(\"SELECT * FROM `ads` WHERE value BETWEEN '{$min}' AND '{$max}' AND status='1' ORDER by datetime desc LIMIT 20\");\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_CLASS);\n }", "title": "" }, { "docid": "86aff26bffab9a9d3cf8e67b2eec63ec", "score": "0.537021", "text": "function _get_years_options() {\n for ($i = UT_YEAR_START; $i <= UT_YEAR_END; $i++) {\n $options[$i] = $i;\n }\n return $options;\n}", "title": "" }, { "docid": "a6c52de615d513cf31f3545bca6371b7", "score": "0.53546757", "text": "function GetBarMinMax() {\r\n\t$max=$this->scale->NormalizeDate($this->iObj[0]->GetMaxDate());\r\n\t$min=$this->scale->NormalizeDate($this->iObj[0]->GetMinDate());\r\n\tfor($i=1; $i<count($this->iObj); ++$i) {\r\n\t $max=Max($max,$this->scale->NormalizeDate($this->iObj[$i]->GetMaxDate()));\r\n\t $min=Min($min,$this->scale->NormalizeDate($this->iObj[$i]->GetMinDate()));\r\n\t}\r\n\t$minDate = date(\"Y-m-d\",$min);\r\n\t$min = strtotime($minDate);\r\n\t$maxDate = date(\"Y-m-d\",$max);\r\n\t$max = strtotime($maxDate);\t\r\n\treturn array($min,$max);\r\n }", "title": "" }, { "docid": "13b6d92e00e3848ecdf089a1a2d073fd", "score": "0.5342409", "text": "public function getMinMaxPrice() {\n $numRooms = array_keys($this->arRooms);\n sort($numRooms);\n $this->numRooms = $numRooms;\n\n //var_dump($numRooms);\n //var_dump($this->arRooms);\n\n //Retreive min and max for each rooms\n\n foreach ($this->arRooms as $key => $arRoom) {\n\n\n $firstKey = key($arRoom);\n\n //Convert SimpleXMLObject to array\n $default = (array) $arRoom[$firstKey];\n\n\n $tmp = $default['arMinMaxPrice'];\n\n $this->minPrice = $default['arMinMaxPrice']['min'];\n $this->maxPrice = $default['arMinMaxPrice']['max'];\n $this->minTotalPrice = $default['arMinMaxPrice']['minTotal'];\n $this->maxTotalPrice = $default['arMinMaxPrice']['maxTotal'];\n\n foreach ($arRoom as $value) {\n\n //Convert SimpleXMLObject to array\n $toArray = (array) $value;\n $tmp['min'] = min($toArray['arMinMaxPrice']['min'], $tmp['min']);\n $tmp['max'] = max($toArray['arMinMaxPrice']['max'], $tmp['max']);\n $tmp['minTotal'] = min($toArray['arMinMaxPrice']['minTotal'], $tmp['minTotal']);\n $tmp['maxTotal'] = max($toArray['arMinMaxPrice']['maxTotal'], $tmp['maxTotal']);\n $this->minPrice = min($toArray['arMinMaxPrice']['min'], $this->minPrice);\n $this->maxPrice = max($toArray['arMinMaxPrice']['max'], $this->maxPrice);\n $this->minTotalPrice = min($toArray['arMinMaxPrice']['minTotal'], $this->minTotalPrice);\n $this->maxTotalPrice = max($toArray['arMinMaxPrice']['maxTotal'], $this->maxTotalPrice);\n }\n\n $this->arMinMaxPrice[$key] = $tmp;\n }\n\n }", "title": "" }, { "docid": "e54dfa022b18650083f4860d9f2abfba", "score": "0.5289068", "text": "function filterContractsByYear($contracts, $minYear, $maxYear, $includeAuction) {\n \t$filteredContracts = array();\n \tforeach ($contracts as $contract) {\n \t if (($contract->getEndYear() >= $minYear) && ($contract->getStartYear() <= $maxYear)\n \t && ($includeAuction || ($contract->getType() != Contract::AUCTION_TYPE))) {\n\t $filteredContracts[] = $contract;\n \t }\n \t}\n \treturn $filteredContracts;\n }", "title": "" }, { "docid": "5707fbf26d8893c7c383d1a946f47b4f", "score": "0.5284828", "text": "public static function getSliderList(){\n return [\n 'schrank' => [\n 'img' => 'portfolio-logo-schrank.png',\n 'url' => 'https://www.schrankspezialist.ch/',\n 'title' => 'Der Schrank-Spezialist',\n 'alt' => 'der-schrank-spezialist'\n ],\n 'cook4you' => [\n 'img' => 'portfolio-logo-cook4you.png',\n 'url' => '',\n 'title' => 'Cook4you',\n 'alt' => 'cook-for-you'\n ],\n 'chesselhuus' => [\n 'img' => 'portfolio-graphic-chesselhuus.png',\n 'url' => 'https://www.chesselhuus.ch/',\n 'title' => 'Chesselhuus',\n 'alt' => 'chesselhuus'\n ],\n 'photovoltaik' => [\n 'img' => 'portfolio-graphic-photovoltaik.png',\n 'url' => 'https://photovoltaik-beratung.ch/',\n 'title' => 'Photovoltaik Beratung',\n 'alt' => 'photovoltaik'\n ],\n 'spinart' => [\n 'img' => 'portfolio-graphic-spinart.png',\n 'url' => 'https://spinart.ch/',\n 'title' => 'Spinart',\n 'alt' => 'spinart'\n ],\n 'langolo' => [\n 'img' => 'portfolio-graphic-langolo.png',\n 'url' => '',\n 'title' => 'L\\'Angolo Italiano',\n 'alt' => 'langolo-italiano'\n ],\n 'chimichanga' => [\n 'img' => 'portfolio-graphic-chimi-changa.png',\n 'url' => '',\n 'title' => 'Chimi-Changa Pfäffikon',\n 'alt' => 'chimi-changa pffäffikon'\n ],\n 'burgring' => [\n 'img' => 'portfolio-graphic-burgring.png',\n 'url' => 'https://burgring.ch/',\n 'title' => 'Burgring',\n 'alt' => 'burging'\n ],\n 'chesselhuus-two' => [\n 'img' => 'portfolio-graphic-chesselhuus-two.png',\n 'url' => 'https://www.chesselhuus.ch/',\n 'title' => 'Chesselhuus',\n 'alt' => 'chesselhuus'\n ],\n 'flipflop' => [\n 'img' => 'portfolio-graphic-flipflop.png',\n 'url' => 'https://grass-flipflop.com/',\n 'title' => 'Grass FlipFlop',\n 'alt' => 'grass-flipflop'\n ]\n ];\n }", "title": "" }, { "docid": "07fc06ec1f6b90db60240631ef578b08", "score": "0.528452", "text": "function makeSlider($min,$max,$i_name,$i_id,$i_val,$text) {\n\t$html = '<label for=\"'.$i_id.'\"><strong>'.$text.'</strong></label>';\n\t$html .= '<input type=\"range\" name=\"'.$i_name.'\" id=\"'.$i_id.'\" value=\"'.$i_val.'\" min=\"'.$min.'\" max=\"'.$max.'\" />';\n\treturn $html;\n}", "title": "" }, { "docid": "4a446dbd10d2bc14d4b9ab1fc7857259", "score": "0.5282006", "text": "public function getSelecedPrice($min = false, $max = false) {\n $queryString = str_replace('url=', '', $_SERVER['QUERY_STRING']);\n $filters = explode(\"/\", $queryString);\n\n $filters = $this->getSelectedFilters($filters);\n\n if (isset($filters['min_price']) && isset($filters['max_price'])) {\n return $filters['min_price'][0] . ',' . $filters['max_price'][0];\n }\n else\n return $min . \",\" . $max;\n }", "title": "" }, { "docid": "7f5346e121d00c48e3b7a1a8be186625", "score": "0.5237088", "text": "public function valueProvider()\n {\n return [\n 'All Values' => [\n [\n 'minimum_price' => '1',\n 'maximum_price' => '2',\n 'minimum_rent' => '3',\n 'maximum_rent' => '4'\n ],\n ],\n 'Price Only' => [\n [\n 'minimum_price' => '1',\n 'maximum_price' => '2',\n 'minimum_rent' => '',\n 'maximum_rent' => ''\n ],\n ],\n 'No Values' => [\n [\n 'minimum_price' => '',\n 'maximum_price' => '',\n 'minimum_rent' => '',\n 'maximum_rent' => ''\n ],\n ],\n ];\n }", "title": "" }, { "docid": "41c291865aa3e06e69fb6d087b9b8ab6", "score": "0.5234909", "text": "function getListOfAllYearsFromInitialTrade($tradeYears){\n $listOfYears = array();\n if(!empty($tradeYears)){\n $startYear = min($tradeYears);\n $currentYear = date(\"Y\");\n for($year=$startYear; $year<=$currentYear; $year++) {\n $listOfYears [] = $year;\n }\n }\n return $listOfYears;\n }", "title": "" }, { "docid": "2b4b39f51644c31564729c2a2c20521b", "score": "0.5230813", "text": "function filterBallsByYear($balls, $minYear, $maxYear) {\n $filteredBalls = array();\n foreach ($balls as $ball) {\n if (($ball->getYear() >= $minYear) && ($ball->getYear() <= $maxYear)) {\n $filteredBalls[] = $ball;\n }\n }\n return $filteredBalls;\n }", "title": "" }, { "docid": "c72262767d42ebdad44bc8a734eb4a9f", "score": "0.5223184", "text": "protected function _getItemsData()\n {\n if ($this->getRequestVar() != 'price' && Mage::helper('amshopby')->isVersionLessThan(1, 4)){\n return parent::_getItemsData(); \n }\n \n if (!Mage::getStoreConfig('amshopby/general/use_custom_ranges')){\n return parent::_getItemsData();\n }\n \n $key = $this->_getCacheKey();\n\n $data = $this->getLayer()->getAggregator()->getCacheData($key);\n if ($data === null) {\n $ranges = $this->_getCustomRanges();\n $counts = $this->_getResource()->getFromToCount($this, $ranges);\n $data = array();\n \n foreach ($counts as $index => $count) {\n if (!$index) // index may be NULL if some products has price out of all ranges\n continue;\n \n $from = $ranges[$index][0];\n $to = $ranges[$index][1];\n $data[] = array(\n 'label' => $this->_renderFromToItemLabel($from, $to),\n 'value' => $from . ',' . $to,\n 'count' => $count,\n 'pos' => $from,\n );\n }\n usort($data, array($this, '_srt')); \n\n $tags = array(\n Mage_Catalog_Model_Product_Type_Price::CACHE_TAG,\n );\n $tags = $this->getLayer()->getStateTags($tags);\n $this->getLayer()->getAggregator()->saveCacheData($data, $key, $tags);\n }\n return $data;\n }", "title": "" }, { "docid": "7e681fce75b5bbcc55d8076af696b798", "score": "0.5222256", "text": "public function getValueRange()\n {\n return $this->valueRange;\n }", "title": "" }, { "docid": "7e681fce75b5bbcc55d8076af696b798", "score": "0.5222256", "text": "public function getValueRange()\n {\n return $this->valueRange;\n }", "title": "" }, { "docid": "c53ffb4697b2f314cd3e2105553febe1", "score": "0.5204741", "text": "public function getValues(){\n $arr = array();\n $arr[\"Current\"] = $this->getCurrent();\n $arr[\"CurrentMin\"] = $this->getCurrentMin();\n $arr[\"CurrentMax\"] = $this->getCurrentMax();\n $arr[\"Voltage\"] = $this->getVoltage();\n $arr[\"VoltageMin\"] = $this->getVoltageMin();\n $arr[\"VoltageMax\"] = $this->getVoltageMax();\n $arr[\"Active\"] = $this->getActivePower();\n $arr[\"ActiveMin\"] = $this->getActivePowerMin();\n $arr[\"ActiveMax\"] = $this->getActivePowerMax();\n $arr[\"Reactive\"] = $this->getReactivePower();\n $arr[\"ReactiveMin\"] = $this->getReactivePowerMin();\n $arr[\"ReactiveMax\"] = $this->getReactivePowerMax();\n $arr[\"Apparent\"] = $this->getApparentPower();\n $arr[\"ApparentMin\"] = $this->getApparentPowerMin();\n $arr[\"ApparentMax\"] = $this->getApparentPowerMax();\n return $arr;\n }", "title": "" }, { "docid": "42be8fd9780083e6dda59df6b3b291cc", "score": "0.51774126", "text": "function get_prices($width, $height, $product_id = 0, $options_array) {\n\tglobal $wc_price_table, $wpdb;\n\n\t$price = 0.0;\n\t$groupprice = 0.0;\n\t$result = array('product_price' => null);\n\t$width = (float) $width;\n\t$height = (float) $height;\n\t$result['options_array'] = $options_array;\n\tif ($width > 0 && $height > 0) {\n\t\t$out_of_range_option = get_option(WC_Price_Table_Hooks::OUT_OF_RANGE_OPTION_KEY, WC_Price_Table_Hooks::DEFAULT_OUT_OF_RANGE_OPTION);\n\t\t//Get product price by measurements\n\t\tif ($product_id) {\n/*\n\t\t\t$term_id = array();\n\t\t\t$category_terms = wp_get_post_terms($product_id, 'product_cat');\n\t\t\tforeach ($category_terms as $term) {\n\t\t\t\t$term_id[] = (int) $term->term_id;\n\t\t\t}\n*/\n\t\t\t$cost_multiplier_number_field = (int)get_post_meta($product_id, 'cost_multiplier_number_field', true);\n\t\t\t$retail_multiplier_number_field = (int)get_post_meta($product_id, 'retail_multiplier_number_field', true);\n\t\t\t//$msrp_number_field = (int)get_post_meta($product_id, 'msrp_number_field', true);\n\n\n \t\t\t$term_id = WC_Price_Table::get_product_category_id($product_id);\n\t\t\t$category_term_id = (string)implode(', ', $term_id); //$category_terms[0]->term_id;\n\t\t\t$price = $wpdb->get_var($wpdb->prepare(\n\t\t\t\t\"SELECT price FROM {$wc_price_table->cat_price_table_name}\n\t\t\t\t WHERE term_id IN ({$category_term_id}) AND width >= %f AND height >= %f\n\t\t\t\t ORDER BY width ASC, height ASC\",\n\t\t\t\t$width, $height)\n\t\t\t);\n\t\t\t// RF //\n\t\t\tif (!$price){\n\t\t\t\t$price = $wpdb->get_var($wpdb->prepare(\n\t\t\t\t\t\"SELECT price FROM {$wc_price_table->product_price_table_name}\n\t\t\t\t\t WHERE product_id = {$product_id} AND width >= %f AND height >= %f\n\t\t\t\t\t ORDER BY width ASC, height ASC\",\n\t\t\t\t\t$width, $height)\n\t\t\t\t);\n\t\t\t\t$price = $price * ($cost_multiplier_number_field / 100) * ($retail_multiplier_number_field / 100);\n\t\t\t\t$groupprice = $price + $option_total;\n\t\t\t}\n\n\t\t\t// RF //\n\t\t\t//If out of range get nearest value\n\t\t\tif (!$price && $out_of_range_option == WC_Price_Table_Hooks::OUT_OF_RANGE_OPTION_A) {\n\t\t\t\t$price = $wpdb->get_var($wpdb->prepare(\n\t\t\t\t\t\"SELECT price FROM {$wc_price_table->cat_price_table_name}\n\t\t\t\t\t WHERE term_id IN ({$category_term_id})\n\t\t\t\t\t ORDER BY ABS(width - %f) ASC, ABS(height - %f) ASC\",\n\t\t\t\t\t$width, $height)\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\n\n\t\t$result['product_price'] = (float) $price;\n\t\t$result['group_price'] = (float) $groupprice;\n\t\t$result['selected_option_price'] = $option_total;\n\t\t//Get prices for addons by measurements\n\t\t$result['addon_prices'] = array();\n\t\t$addons = WC_Price_Table::get_addons2();\n\t\tforeach ($addons as $taxonomy => $addon) {\n\t\t\tforeach ($addon['terms'] as $term) {\n\t\t\t\t$addon_price = $wpdb->get_var($wpdb->prepare(\n\t\t\t\t\t\"SELECT price FROM {$wc_price_table->addon_price_table_name}\n\t\t\t\t\t WHERE field_label = %s AND choice = %s AND width >= %f AND height >= %f\n\t\t\t\t\t ORDER BY width ASC, height ASC\",\n\t\t\t\t\t$taxonomy, $term->slug, $width, $height)\n\t\t\t\t);\n\t\t\t\t//If out of range get nearest value\n\t\t\t\tif (!$addon_price && $out_of_range_option == WC_Price_Table_Hooks::OUT_OF_RANGE_OPTION_A) {\n\t\t\t\t\t$addon_price = $wpdb->get_var($wpdb->prepare(\n\t\t\t\t\t\t\"SELECT price FROM {$wc_price_table->addon_price_table_name}\n\t\t\t\t\t\t WHERE field_label = %s AND choice = %s\n\t\t\t\t\t\t ORDER BY ABS(width - %f) ASC, ABS(height - %f) ASC\",\n\t\t\t\t\t\t$taxonomy, $term->slug, $width, $height)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//Check if found a price table for addon\n\t\t\t\tif ($addon_price) {\n\t\t\t\t\t$result['addon_prices'][$taxonomy][$term->slug] = array(\n\t\t\t\t\t\t'name' => $term->name,\n\t\t\t\t\t\t'price' => (float) $addon_price\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "824d313a64825df37e7fda72c0cabd37", "score": "0.5164502", "text": "public function getValues()\n\t{\n\n\t\t$this->getCalculateTotal();\n\n\t\treturn parent::getValues();\n\n\t}", "title": "" }, { "docid": "dbacf78b8bc8eb04c01c561e37717e1a", "score": "0.51523167", "text": "function range_slider(){\r\n$STRING = '<link rel=\"stylesheet\" href=\"//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css\">';\r\n$STRING .= '<script src=\"//code.jquery.com/ui/1.11.1/jquery-ui.js\"></script>';\r\n$STRING .= '<script>\r\njQuery( document ).ready(function() {\r\njQuery(function() {\r\n\t\tjQuery( \"#slider-range\" ).slider({\r\n\t\t\trange: \"max\",\r\n\t\t\tmin: 0,\r\n\t\t\tmax: 100,\r\n\t\t\tvalue: 10,\r\n\t\t\tslide: function( event, ui ) {\r\n\t\t\t\tjQuery( \"#amount\" ).val( ui.value );\r\n\t\t\t}\r\n\t\t});\r\n\t\tjQuery( \"#amount\" ).val( jQuery( \"#slider-range\" ).slider( \"value\" ) );\r\n\t});\r\n});\t\r\n</script>';\r\n$STRING .= '<input type=\"text\" size=\"1\" id=\"amount\" name=\"radius\" style=\"border: none;width: 2em;\">miles<div id=\"slider-range\"></div>';\r\nreturn $STRING;\r\n}", "title": "" }, { "docid": "452d8e7e18a458c404cd483919c3ae6c", "score": "0.5149576", "text": "protected function calculateRange($data)\n {\n $data_range = array_fill(0, count(current($data)), ['min' => null, 'max' => null]);\n foreach ($data as $observation) {\n $key = 0;\n foreach ($observation as $value) {\n if ($data_range[$key]['min'] === null || $data_range[$key]['min'] > $value) {\n $data_range[$key]['min'] = $value;\n }\n if ($data_range[$key]['max'] === null || $data_range[$key]['max'] < $value) {\n $data_range[$key]['max'] = $value;\n }\n $key++;\n }\n }\n\n return $data_range;\n }", "title": "" }, { "docid": "9267c803df7c7a2b410122ec10f432f2", "score": "0.51375014", "text": "function getAllSliders($limit, $offset=0) {\n $this->db->select(\"*\");\n\t\t$this->db->limit($limit, $offset);\n $query = $this->db->get('esic_slider');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "title": "" }, { "docid": "7afe29cc1b20a9b6f996d6000462f148", "score": "0.51217633", "text": "function getDateRange(DrupalSolrQueryInterface $query) {\n $return = NULL;\n $gap = NULL;\n\n // Attempts to get next gap from passed date filters.\n foreach ($this->adapter->getActiveItems($this->facet) as $item) {\n if ($gap = facetapi_get_date_gap($item['start'], $item['end'])) {\n $next_gap = facetapi_get_next_date_gap($gap, FACETAPI_DATE_SECOND);\n if ($next_gap == $gap) {\n $next_gap = NULL;\n return NULL;\n }\n $return = array(\n \"{$item['start']}/$next_gap\",\n \"{$item['end']}+1$next_gap/$next_gap\",\n \"+1$next_gap\",\n );\n }\n }\n\n // If no filters were passed, get default range.\n if (NULL === $return) {\n\n // Builds SQL that gets minimum and maximum values from node table.\n $minimum = $maximum = FALSE;\n if ($this->facet['min callback'] && is_callable($this->facet['min callback'])) {\n $minimum = $this->facet['min callback']($this->facet);\n }\n if ($this->facet['max callback'] && is_callable($this->facet['max callback'])) {\n $maximum = $this->facet['max callback']($this->facet);\n }\n\n // Gets the default gap.\n //$gap = FACETAPI_DATE_YEAR;\n if ($minimum && $maximum) {\n $gap = facetapi_get_timestamp_gap($minimum, $maximum);\n $minimum = facetapi_isodate($minimum, $gap);\n $maximum = facetapi_isodate($maximum, $gap);\n $return = array(\n \"$minimum/$gap\",\n \"$maximum+1$gap/$gap\",\n \"+1$gap\",\n );\n }\n }\n // Returns the range information.\n return $return;\n }", "title": "" }, { "docid": "2ccf19c51671e28cf86b79f37b0ff086", "score": "0.51185066", "text": "protected function _setPriceSelectorValues()\n {\n if ($this->d3GetSet()->getValue('sExtSearch_PriceSelectorsDispType') == 'jqslider' && is_array(\n $this->aPriceSelector\n )\n ) {\n $this->addTplParam(\n 'submpriceselectors',\n array('min' => $this->aPriceSelector['min'] * 100, 'max' => $this->aPriceSelector['max'] * 100)\n );\n $this->addTplParam('priceselector', implode('-', $this->aPriceSelector));\n $this->_sD3AdditionalParams .= \"&amp;priceselector=\" . urlencode(implode('-', $this->aPriceSelector));\n $this->addTplParam(\n 'additionalparams',\n $this->getViewDataElement('additionalparams') . \"&amp;priceselector=\" . urlencode(\n implode('-', $this->aPriceSelector)\n )\n );\n } elseif ($this->sPriceSelector) {\n $this->addTplParam('priceselector', $this->sPriceSelector);\n $this->_sD3AdditionalParams .= \"&amp;priceselector=\" . urlencode($this->sPriceSelector);\n $this->addTplParam(\n 'additionalparams',\n $this->getViewDataElement('additionalparams') . \"&amp;priceselector=\" . urlencode($this->sPriceSelector)\n );\n }\n }", "title": "" }, { "docid": "65d0b8c05dbaddb65f7b8cf8d79e2220", "score": "0.5109111", "text": "protected function _getDateRange()\n {\n if (null === $this->_dateRange) {\n $this->_dateRange = [];\n $rules = $this->getAttributeObject()->getValidateRules();\n if (isset($rules[self::MIN_DATE_RANGE_KEY])) {\n $this->_dateRange[self::MIN_DATE_RANGE_KEY] = $rules[self::MIN_DATE_RANGE_KEY];\n }\n if (isset($rules[self::MAX_DATE_RANGE_KEY])) {\n $this->_dateRange[self::MAX_DATE_RANGE_KEY] = $rules[self::MAX_DATE_RANGE_KEY];\n }\n }\n return $this->_dateRange;\n }", "title": "" }, { "docid": "1c1c54e01a4d9676449d6466e369be27", "score": "0.50973135", "text": "public function getAllSlider()\n {\n $data = Slider::orderBy('pss_created_at', 'desc')->get();\n return $data;\n }", "title": "" }, { "docid": "38baa417bae78315b72209b6a13b2073", "score": "0.5075869", "text": "public function calcValues()\n {\n if (gettype($this->arr) != \"array\" || $this->arr == []) {\n echo \"calcValues(): set correct array <br>\";\n return;\n }\n \n $this->sum = 0; \n $this->min = $this->arr[0];\n $this->max = $this->arr[0];\n $this->cnt = 0;\n \n foreach ($this->arr as $value) {\n $this->sum += $value;\n $this->cnt += 1;\n\n if ($value < $this->min) {\n $this->min = $value;\n }\n\n if ($value > $this->max) {\n $this->max = $value;\n }\n }\n\n $this->avg = $this->sum / $this->cnt;\n }", "title": "" }, { "docid": "43467eac25f4390c58736c5ba29bc150", "score": "0.50698346", "text": "public function get_max_min($field,$p_fechaini,$p_fechafinal,$p_portafolios){\n// $this->db->from('resultados');\n// $this->db->where_in('portafolios',$p_portafolios);\n// $this->db->where('fecha >=',$p_fechaini);\n// $this->db->where('fecha <=',$p_fechafinal);\n// $this->db->group_by(array(\"month(fecha)\", \"year(fecha)\"));\n// $this->db->order_by(\"year(fecha)\");\n// $this->db->order_by(\"month(fecha)\");\n $sql = \"year(fecha) year, month(fecha) month, sum(valorMax) max, sum(valorMin) min\n FROM(\n SELECT resultados.fecha, max(valor) valorMax,min(valor) valorMin, portafolios\n FROM trackingstocks.resultados resultados\n INNER JOIN trackingstocks.portafolios portafolios\n on resultados.portafolios = portafolios.idportafolios\n where portafolios.active = 'X'\n \n and fecha between '%s' and '%s'\n and portafolios.idportafolios in (%s)\n group by year(resultados.fecha),\n month(resultados.fecha),\n resultados.portafolios\n ) MAXVALUES\n group by year(fecha),\n month(fecha)\";\n $sql = sprintf($sql,$p_fechaini,$p_fechafinal,$p_portafolios);\n $this->db->select($sql);\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "59744790a7da105d52011e88348fb862", "score": "0.5067226", "text": "public function local_cities_API($year = 2015)\n {\n// $minValue = DB::select(\"SELECT addData.id,addData.mainCategory,addData.year, addData.outcome,addData.unit, entities.name, entities.id as qalaqiID\n// FROM addData, entities\n// WHERE mainCategory = 2\n// AND year = 2015\n// AND addData.unit = entities.id\n// ORDER BY addData.outcome ASC\");\n//\n $maxValue = DB::select(\"SELECT addData.id,addData.mainCategory,addData.year, addData.outcome,addData.unit, entities.name, entities.id as qalaqiID\n FROM addData, entities\n WHERE mainCategory = 2\n AND year = $year\n AND addData.unit = entities.id\n ORDER BY addData.outcome DESC\n LIMIT 1\");\n $this->chartFiles['max_value'] = $maxValue[0]->outcome;\n\n// $this->chartFiles['count'] = count($minValue);\n// $this->chartFiles['MINIMAL-VALUE'] = (int) $minValue[0]->outcome;\n// if (count($minValue) > 20) {\n//\n// $this->range = ($maxValue[0]->outcome - $minValue[0]->outcome) / 20;\n// $this->chartFiles['range_min'] = $this->range;\n// } else {\n// $this->range = ($maxValue[0]->outcome - $minValue[0]->outcome) / count($minValue);\n// $this->chartFiles['range_min'] = $this->range;\n//\n// }\n// $this->start = $this->chartFiles['MINIMAL-VALUE'];\n//\n// for ($i = 0; $i < count($minValue); $i++) {\n//\n// if ($i == 0) { $this->end = $this->end + $this->range + $this->chartFiles['MINIMAL-VALUE']; } else { $this->end = $this->end + $this->range; }\n// if ($i == (count($minValue) - 1)) $this->end = $maxValue[0]->outcome;\n\n $this->chartFiles[] = DB::select(\"SELECT addData.id,addData.mainCategory,addData.year, addData.outcome as value,addData.unit,\n entities.name, entities.id as qalaqiID\n FROM addData, entities\n WHERE mainCategory = 2\n AND year = $year\n AND addData.unit = entities.id\n ORDER BY addData.outcome DESC\n \n \");\n\n// $this->start = $this->start + $this->range;\n// // 1925 + // 1925\n//\n// }\n//\n// $this->chartFiles['range_max'] = (int) $this->end;\n return $this->chartFiles;\n\n }", "title": "" }, { "docid": "ad452c93e859dc70e2bf8e808e48082f", "score": "0.5039853", "text": "function get_financial_year_by_date_range($from_date, $to_date) {\n $ci = & get_instance();\n $ci->load->model('admin/financialyearmodel');\n $financial_year = get_financial_year();\n if (!$from_date || !$to_date) {\n $from_date = date(\"Y-m-d\", strtotime(current($financial_year)));\n $to_date = date(\"Y-m-t\", strtotime(end($financial_year)));\n }\n $from_date_arr = explode('-', $from_date);\n $to_date_arr = explode('-', $to_date);\n $m = isset($from_date_arr[1]) ? $from_date_arr[1] : 4;\n if ($m > date(\"m\")) {\n// $year = date(\"Y\") - 1;\n $year = date('Y', strtotime(current($financial_year))) - 1;//sudip@23042018\n } else {\n// $year = date(\"Y\");\n $year = date('Y', strtotime(current($financial_year)));//sudip@23042018\n }\n $finance_arr = [];\n $n = (isset($to_date_arr[0]) && $to_date_arr[0] > $year) ? 12 : $to_date_arr[1];\n for ($i = $m; $i <= $n; $i++) {\n if (isset($from_date_arr[0]) && $from_date_arr[0] == $year) {\n $finance_arr[] = $year . '-' . $i;\n } else {\n $finance_arr[] = ($year + 1) . '-' . $i;\n }\n }\n for ($i = 1; $i <= $to_date_arr[1]; $i++) {\n if (isset($to_date_arr[0]) && $to_date_arr[0] > $year) {\n $finance_arr[] = ($year + 1) . '-' . $i;\n }\n }\n return $finance_arr;\n }", "title": "" }, { "docid": "e4187e8a58bdf8f97b6b50a478ff7ffa", "score": "0.50365615", "text": "private function getViableYears()\n {\n $yearChoices = array();\n $currentYear = (int) date(\"Y\");\n\n for ($i = 0; $i <= 20; $i++) {\n $yearChoices[$currentYear + $i] = $currentYear + $i;\n }\n\n return $yearChoices;\n }", "title": "" }, { "docid": "1f99d78c8ca97ab766c9dde1dad4ba7f", "score": "0.5025672", "text": "protected function getSelectionPriceValue()\n {\n return [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'componentType' => Form\\Field::NAME,\n 'dataType' => Form\\Element\\DataType\\Price::NAME,\n 'formElement' => Form\\Element\\Input::NAME,\n 'label' => __('Price'),\n 'dataScope' => 'selection_price_value',\n 'value' => '0.00',\n 'imports' => [\n 'visible' => '!ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked'\n ],\n 'sortOrder' => 80,\n ],\n ],\n ],\n ];\n }", "title": "" }, { "docid": "f0d8af4754f87e02fcbf8dd428f54058", "score": "0.5013786", "text": "abstract public function getRange ();", "title": "" }, { "docid": "82cec5e3f5c3f30d27fd53626c43e32a", "score": "0.50128907", "text": "protected function doClean($values)\n {\n if (ShippingRatePeer::CALCULATION_TYPE_PRICE_RANGE == $values['calculation_type'])\n {\n // if the value for range max is smaller than that of range min\n // and it is not set to 0 (which we interpret as infinity)\n if ( ($values['price_range_max'] < $values['price_range_min'])\n && 0 != $values['price_range_max'] )\n {\n // throw an error about wrong price range\n $errorSchema = new sfValidatorErrorSchema($this);\n $errorSchema->addError(\n new sfValidatorError($this, 'max_higher_than_min', array(\n 'price_range_min' => $values['price_range_min'],\n 'price_range_max' => $values['price_range_max'],\n )),\n 'price_range_max' // the field that the error is added to\n );\n\n throw $errorSchema;\n }\n\n // if neither extreme is set\n if (0 == $values['price_range_max'] && 0 == $values['price_range_min'])\n {\n // throw an error about price range required\n $errorSchema = new sfValidatorErrorSchema($this);\n $error = new sfValidatorError($this, 'price_range_required');\n\n // add the error to both fields\n $errorSchema->addError($error, 'price_range_min');\n $errorSchema->addError($error, 'price_range_max');\n\n throw $errorSchema;\n }\n }\n // if calculation type is not price range\n else\n {\n // sometimes the price range fields will not be available;\n // in this case there is no reason to check it they have values\n if (!(isset($values['price_range_min']) && isset($values['price_range_max'])))\n {\n return $values;\n }\n\n // and one of the price range extremes is set\n if (0 != $values['price_range_max'] || 0 != $values['price_range_min'])\n {\n // throw an error about price range not required\n $errorSchema = new sfValidatorErrorSchema($this);\n $error = new sfValidatorError($this, 'price_range_not_required');\n\n // add the error to both fields\n $errorSchema->addError($error, 'price_range_min');\n $errorSchema->addError($error, 'price_range_max');\n\n throw $errorSchema;\n }\n }\n\n return $values;\n }", "title": "" }, { "docid": "17a7e02c535d6e8f33b3b0a78fd2f261", "score": "0.5008557", "text": "function wppb_ul_faceted_range( $faceted_filter_options, $meta_values, $wppb_manage_fields ){\r\n $filter = '';\r\n if( !empty( $meta_values ) ) {\r\n foreach ($meta_values as $value => $count) {\r\n if (!is_numeric($value))\r\n unset($meta_values[$value]);\r\n }\r\n\r\n /* we might have nothing left */\r\n if( !empty( $meta_values ) ) {\r\n ksort($meta_values, SORT_NUMERIC);\r\n\r\n $i = 1;\r\n foreach ($meta_values as $value => $count) {\r\n if ($i == 1) $first_value = $value;\r\n if ($i == count($meta_values)) $last_value = $value;\r\n $i++;\r\n }\r\n\r\n $first_current_value = $first_value;\r\n $last_current_value = $last_value;\r\n\r\n\r\n $current_value = wppb_ul_get_current_filter_value($faceted_filter_options['facet-meta']);\r\n if (!empty($current_value)) {\r\n $current_value = explode('-', $current_value);\r\n $first_current_value = $current_value[0];\r\n $last_current_value = $current_value[1];\r\n }\r\n\r\n if (!isset($first_value) || !isset($last_value) || !isset($first_current_value) || !isset($last_current_value))\r\n return '';\r\n\r\n $filter .= '<div class=\"wppb-ul-range-values ' . esc_attr($faceted_filter_options['facet-meta']) . '\">' . $first_current_value . '-' . $last_current_value . '</div>';\r\n $filter .= '<div class=\"wppb-ul-slider-range ' . esc_attr($faceted_filter_options['facet-meta']) . '\" value=\"\" data-meta-name=\"' . esc_attr($faceted_filter_options['facet-meta']) . '\" data-filter-behaviour=\"' . esc_attr($faceted_filter_options['facet-behaviour']) . '\" data-current-page=\"' . esc_attr(get_query_var('page')) . '\"></div>\r\n <script type=\"text/javascript\">\r\n jQuery(function(){\r\n wppbRangeFacet( \"' . esc_attr($faceted_filter_options['facet-meta']) . '\", ' . $first_value . ', ' . $last_value . ', ' . $first_current_value . ', ' . $last_current_value . ' );\r\n });\r\n </script>';\r\n }\r\n }\r\n\r\n if( $filter == '' )\r\n $filter = wppb_get_facet_no_options_message( $faceted_filter_options );\r\n\r\n return $filter;\r\n\r\n}", "title": "" }, { "docid": "77195c60ea472e02a5359e45d100bc64", "score": "0.49997935", "text": "function get_prices($product_id, $town_id, $days)\n\t{\n\t\tif($days > 29)\n\t\t{\n\t\t\t$dateformat = \"%b/%y\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$dateformat = \"%d/%b\";\n\t\t}\n\n\t\t$Q ='SELECT product_name,crop_weight,avg(crop_price) as avg_price,crop_unit,crop_date,DATE_FORMAT(crop_date,\"'.$dateformat.'\") as m_date\n\t\t\t\t\tFROM prices\n\t\t\t\t\tJOIN products on products.id = prices.product_id\n\t\t\t\t\tWHERE crop_date < (SELECT max(crop_date) FROM prices)\n\t\t\t\t\tAND crop_date > ((SELECT max(crop_date) FROM prices) - INTERVAL \"'.$days.'\" DAY)\n\t\t\t\t\tAND prices.product_id = \"'.$product_id.'\"\n\t\t\t\t\tAND location_id = \"'.$town_id.'\"\n\t\t\t\t\tAND prices.status = \"live\"\n\t\t\t\t\tAND prices.deleted = 0\n\t\t\t\t\tGROUP BY prices.product_id,m_date\n\t\t\t\t\tORDER BY crop_date ASC';\n\t\treturn $this->db->query($Q)->result();\n\t}", "title": "" }, { "docid": "5fcb2de2ee006e2745b3abfb9cf5396e", "score": "0.4994243", "text": "public function getRangeItemCounts($range)\n {\n \n $helper = Mage::helper('solr');\n $attribute = $this->getAttributeModel();\n //$collection = $this->getLayer()->getProductCollection();\n $inputType = $attribute->getFrontend()->getInputType();\n $typeConverter = $this->getTypeConverter($inputType);\n $fieldName = $typeConverter->solr_index_prefix.'index_'.$this->_requestVar;\n $rangeKey = 'range_item_counts_' . $range;\n $items = $this->getData($rangeKey);\n if (is_null($items)) {\n $collection = $this->getLayer()->getProductCollection();\n if ($collection instanceof DMC_Solr_Model_SolrServer_Adapter_Product_Collection) {\n $items = array();\n $fselect = clone $collection->getSelect($helper->catalogCategoryMultiselectEnabled());\n $fselect->param('facet', 'true', true);\n $fselect->param('facet.field', $fieldName, true);\n $min = 0;\n $max = $range-1;\n $maxPrice = $this->getMaxPriceInt();\n //while($max<=$range*10) {\n while($min <= $maxPrice) {\n $rangeQuery = $fieldName.':['.$min.' TO '.$max.'.99]';\n $fselect->param('facet.query', $rangeQuery);\n $min = $max+1;\n $max = $max+$range;\n }\n $responce = Mage::helper('solr')->getSolr()->fetchAll($fselect);\n $valueArray = get_object_vars($responce->__get('facet_counts')->facet_queries);\n $int = 1;\n foreach($valueArray as $value) {\n if((int)$value !== 0) $items[$int] = $value;\n $int++;\n }\n }\n else {\n $items = $this->_getResource()->getCount($this, $range);\n }\n $this->setData($rangeKey, $items);\n }\n return $items;\n }", "title": "" }, { "docid": "80812564009dc13efe9f7a6c4624882a", "score": "0.49846518", "text": "protected function _getItemsData()\n\t{\n\t\t$items = array();\n\n\t\tforeach($this->_searchSpringFacet->values as $value) {\n\t\t\t$item = array(\n\t\t\t\t'label' => $value->label,\n\t\t\t\t'count' => $value->count,\n\t\t\t\t'type' => $value->type\n\t\t\t);\n\n\t\t\tif($value->type == 'value') {\n\t\t\t\t$item['value'] = $value->value;\n\t\t\t} else if($value->type == 'range') {\n\t\t\t\t$value = 'RANGE:' . $value->low . ' TO ' . $value->high;\n\t\t\t\t/*\t'low' => $value->low,\n\t\t\t\t\t'high' => $value->high\n\t\t\t\t);*/\n\t\t\t\t$item['value'] = $value;\n\t\t\t}\n\t\t\t$items[] = $item;\n\t\t}\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "6da2193a41e010bd04c3a27a4dd60d07", "score": "0.4984309", "text": "function fn_getYMMOptions($params,$ymm_type) \n {\n switch($ymm_type)\n {\n case 'year' : \n $options = \"<option value=''>--select year--</option>\";\n $filter_array = array();\n $ymm_qry = \"select group_concat(v.prodstartyear separator '~') as prodstartyear , group_concat(v.prodendyear separator '~') as prodendyear from [|PREFIX|]products p LEFT JOIN [|PREFIX|]import_variations AS v ON v.productid = p.productid where p.prodvisible='1' \";\n if( isset($params['make']) && $GLOBALS['UniversalCat'] == 0 )\n $ymm_qry .= \" and prodmake = '\".$params['make'].\"' \";\n if( isset($params['model']) && (!isset($params['model_flag']) || $params['model_flag'] == 1) && $GLOBALS['UniversalCat'] == 0 )\n $ymm_qry .= \" and prodmodel = '\".$params['model'].\"' \";\n\n $ymm_qry .= \" group by p.productid \"; \n $ymm_res = $GLOBALS['ISC_CLASS_DB']->Query($ymm_qry);\n while($ymm_row = $GLOBALS['ISC_CLASS_DB']->Fetch($ymm_res))\n {\n $grp_startyear = explode(\"~\",$ymm_row['prodstartyear']); \n $grp_endyear = explode(\"~\",$ymm_row['prodendyear']);\n for($g=0;$g<count($grp_startyear);$g++)\n {\n $prod_start_year = $grp_startyear[$g];\n $prod_end_year = $grp_endyear[$g]; \n\n if(is_numeric($prod_start_year) && is_numeric($prod_end_year)) \n {\n $prod_year_diff = $prod_end_year - $prod_start_year;\n for($i=0;$i\n<=$prod_year_diff;$i++)\n {\n $actual_year = $prod_start_year + $i;\n if(in_array($actual_year,$filter_array)) {\n $count_filter_array[$actual_year]++; \n } else {\n $filter_array[] = $actual_year;\n $count_filter_array[$actual_year] = 1;\n }\n }\n }\n }\n }\n rsort($filter_array);\n foreach($filter_array as $key => $value)\n {\n $selected = \"\";\n if ( isset($params['year']) && strcasecmp($params['year'], $value) == 0 )\n $selected = \" selected\";\n\n $options .= \"\n<option value='\".MakeURLSafe(strtolower($value)).\"'$selected>$value</option>\n\";\n }\n break;\n case 'make' : \n $options = \"\n<option value=''>--select make--</option>\n\";\n $filter_array = array();\n $ymm_qry = \"select group_concat(DISTINCT v.prodmake separator '~') as prodmake from [|PREFIX|]products p LEFT JOIN [|PREFIX|]import_variations AS v ON v.productid = p.productid where p.prodvisible='1' \";\n $ymm_res = $GLOBALS['ISC_CLASS_DB']->Query($ymm_qry);\n while($ymm_row = $GLOBALS['ISC_CLASS_DB']->Fetch($ymm_res))\n {\n $filters = explode('~',$ymm_row['prodmake']);\n for($j=0;$j<count($filters);$j++) \n {\n $filter_value = $filters[$j]; \n if(strtoupper($filter_value) != \"NON-SPEC VEHICLE\" && strtolower($filter_value) != \"all\")\n {\n if(in_array($filter_value,$filter_array)) {\n $count_filter_array[$filter_value]++;\n } else {\n $filter_array[] = $filter_value;\n $count_filter_array[$filter_value] = 1;\n }\n }\n }\n }\n sort($filter_array);\n $all_makes = array('CHEVROLET', 'GMC', 'FORD', 'DODGE', 'TOYOTA', 'NISSAN', 'HONDA', 'JEEP', 'HYUNDAI','CHRYSLER', 'INFINITI', 'LEXUS');\n $temp_arr = array_diff($filter_array,$all_makes);\n\n foreach($all_makes as $key => $value) \n {\n $selected = \"\";\n if ( isset($params['make']) && strcasecmp($params['make'], $value) == 0 )\n $selected = \" selected\"; \n \n $options .= \"\n<option value='\".MakeURLSafe(strtolower($value)).\"'$selected>$value</option>\n\"; \n }\n\n foreach($temp_arr as $key => $value ) \n {\n $selected = \"\";\n if ( isset($params['make']) && strcasecmp($params['make'], $value) == 0 )\n $selected = \" selected\"; \n\n $options .= \"\n<option value='\".MakeURLSafe(strtolower($value)).\"'$selected>$value</option>\n\";\n }\n break;\n case 'model' : \n $options = \"\n<option value=''>--select model--</option>\n\";\n if(isset($params['make']))\n { \n $filter_array = array();\n $ymm_qry = \"select distinct prodmodel from [|PREFIX|]products p LEFT JOIN [|PREFIX|]import_variations AS v ON v.productid = p.productid where p.prodvisible='1' \";\n if( isset($params['make']) )\n $ymm_qry .= \" and prodmake = '\".$params['make'].\"' \";\n if( isset($params['year']) && $GLOBALS['UniversalCat'] == 0 )\n $ymm_qry .= \" and \".$params['year'].\" between prodstartyear and prodendyear \";\n\n //$ymm_qry .= \" group by p.productid \"; \n $ymm_res = $GLOBALS['ISC_CLASS_DB']->Query($ymm_qry);\n while($ymm_row = $GLOBALS['ISC_CLASS_DB']->Fetch($ymm_res))\n {\n if(!empty($ymm_row['prodmodel']) && $ymm_row['prodmodel'] != '~') {\n $filters = explode('~',$ymm_row['prodmodel']);\n for($j=0;$j<count($filters);$j++) \n {\n $filter_value = ucwords(strtolower($filters[$j]));\n if(strtolower($filter_value) != \"all\")\n {\n if(in_array($filter_value,$filter_array)) {\n } else {\n $filter_array[] = $filter_value;\n }\n }\n }\n }\n }\n sort($filter_array);\n foreach($filter_array as $key => $value)\n {\n $selected = \"\";\n if ( isset($params['model']) && strcasecmp($params['model'], $value) == 0 )\n $selected = \" selected\";\n\n $options .= \"\n<option value='\".MakeURLSafe(strtolower($value)).\"'$selected>$value</option>\n\";\n }\n }\n break;\n }\n return $options;\n }", "title": "" }, { "docid": "582d9a12b90af807bb3bab5eb85dde16", "score": "0.49730104", "text": "public function Price($MinPrice=-1, $MaxPrice=-1) {\n if ( $MinPrice == -1 )\n $MinPrice = $this->Filters['Price']['Min'];\n if ( $MaxPrice == -1 )\n $MaxPrice = $this->Filters['Price']['Max'];\n\n $this->Filters['Price']['Min'] = $MinPrice;\n $this->Filters['Price']['Max'] = $MaxPrice;\n\n if ( $MinPrice == -1 && $MaxPrice == -1 )\n return ['min'=>$this->Filters['Price']['Min'], 'max'=>$this->Filters['Price']['Max']];\n\n return $this;\n }", "title": "" }, { "docid": "c764bb00d78282097db6e994a26717f6", "score": "0.49637902", "text": "private function get_range_single_options($args)\r\n\t{\r\n\t\t$options = array();\r\n\t\t$name = $args['name_sf'];\r\n\t\t\t\t\r\n\t\tglobal $searchandfilter;\r\n\t\t$searchform = $searchandfilter->get($this->sfid);\r\n\t\t$this->auto_count = $searchform->settings(\"enable_auto_count\");\r\n\t\t$this->auto_count_deselect_emtpy = $searchform->settings(\"auto_count_deselect_emtpy\");\r\n\t\t\r\n\t\t\r\n\t\t$min = $args['min'];\r\n\t\t$max = $args['max'];\r\n\t\t$step = $args['step'];\r\n\t\t$thousand_seperator = $args['thousand_seperator'];\r\n $decimal_point = $args['decimal_seperator'];\r\n\t\t$decimal_places = $args['decimal_places'];\r\n\t\t\r\n\t\t$value_prefix = $args['prefix'];\r\n\t\t$value_postfix = $args['postfix'];\r\n\t\t\r\n\t\t/*if(isset($all_items_label))\r\n\t\t{\r\n\t\t\tif($all_items_label!=\"\")\r\n\t\t\t{//check to see if all items has been registered in field then use this label\r\n\t\t\t\t$returnvar .= '<option class=\"level-0\" value=\"\">'.esc_html($all_items_label).'</option>';\r\n\t\t\t}\r\n\t\t}*/\r\n\t\t\r\n\t\t\r\n\t\t$show_option_all_sf = $args['show_option_all_sf'];\r\n\t\t$show_default_option_sf = $args['show_default_option_sf'];\r\n\t\t\r\n\t\tif((isset($show_option_all_sf))&&($show_default_option_sf==true))\r\n\t\t{\r\n\t\t\t$default_option = new stdClass();\r\n\t\t\t$default_option->label = $show_option_all_sf;\r\n\t\t\t$default_option->attributes = array(\r\n\t\t\t\t'class' => SF_CLASS_PRE.'level-0 '.SF_ITEM_CLASS_PRE.'0'\r\n\t\t\t);\r\n\t\t\t$default_option->value = \"\";\r\n\t\t\t\r\n\t\t\tarray_push($options, $default_option);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$value = $min;\r\n\r\n\t\tif ( $step > 0 ) {\r\n\t\t\tfor($value=$min; $value<=$max; $value+=$step)\r\n\t\t\t{\r\n\t\t\t\t$min_val = (float) $value;\r\n\t\t\t\t$max_val = (float) $min_val + $step;\r\n\r\n\t\t\t\t/*if($max_val>$max)\r\n\t\t\t\t{\r\n\t\t\t\t\t$max_val = (float) $max;\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\t$min_label = number_format( (float)$min_val, $decimal_places, $decimal_point, $thousand_seperator );\r\n\t\t\t\t$max_label = number_format( (float)$max_val, $decimal_places, $decimal_point, $thousand_seperator );\r\n\t\t\t\t\r\n\t\t\t\t$option = new stdClass();\r\n\t\t\t\t$option->label = $value_prefix.$min_label.$value_postfix.\" - \".$value_prefix.$max_label.$value_postfix;\r\n\t\t\t\t$option->attributes = array(\r\n\t\t\t\t\t'class' => SF_CLASS_PRE.'level-0 '\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$option->value = $min_val.'+'.$max_val;\r\n\t\t\t\tarray_push($options, $option);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $options;\r\n\t}", "title": "" }, { "docid": "4a01ac6ae27b51c6bf1914aef9bafab4", "score": "0.49616328", "text": "public function getPriceLists();", "title": "" }, { "docid": "654316c2f9fecd56ee2b0c0f6af5d705", "score": "0.4953876", "text": "private function checkPriceRangesForFilterForm() {\n\t\t$displayedWidgetFields = t3lib_div::trimExplode(\n\t\t\t',',\n\t\t\t$this->objectToCheck->getConfValueString(\n\t\t\t\t'displayedSearchWidgetFields', 's_searchForm'\n\t\t\t),\n\t\t\tTRUE\n\t\t);\n\t\tif (!in_array('priceRanges', $displayedWidgetFields)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->checkRegExp(\n\t\t\t'priceRangesForFilterForm',\n\t\t\tTRUE,\n\t\t\t's_searchForm',\n\t\t\t'This value defines the ranges to be displayed in the filter ' .\n\t\t\t\t'form\\'s selectbox for prices. With an invalid configuration, ' .\n\t\t\t\t'price ranges will not be displayed correctly.',\n\t\t\t'/^(((\\d+-\\d+|-\\d+|\\d+-), *)*(\\d+-\\d+|-\\d+|\\d+-))$/'\n\t\t);\n\t}", "title": "" }, { "docid": "68b5878c6891f2f9ebb8af1059e09c17", "score": "0.49506754", "text": "public function getAnnualDateRange($start_year,$end_year){\n \n $starts_years = array();\n $ends_years = array();\n for($i=$start_year; $i<=$end_year; $i++){\n $start_date = $i.\"-01-01\";\n $end_date = $i.\"-12-31\";\n array_push($starts_years,$start_date);\n array_push($ends_years,$end_date);\n }\n return array($starts_years,$ends_years);\n }", "title": "" }, { "docid": "0c5793aee996ae5f24b4d61fed958f6d", "score": "0.493722", "text": "public function get_reg_dates($year) {\n if (! empty($this->reg[$year])) {\n $reg_dates = $this->reg[$year]->get('field_registration_year')->getValue();\n return [$reg_dates[0]['value'], $reg_dates[0]['end_value']];\n }\n }", "title": "" }, { "docid": "dc7b5779cbe3a615761ac641da6d4e26", "score": "0.49222773", "text": "public function getValues()\n {\n $this->getCalculateTotal();\n\n return parent::getValues();\n }", "title": "" }, { "docid": "1d6e6c2bbfe407bdf4035d809f2987d4", "score": "0.4919545", "text": "public function getSliderProductCollection($cat_ids){\n\t\t$type1 = ''; \n\t\t$type2 = '';\n\t\t$type3 = '';\n\t\t$type4 = ''; \n\t\t$type5 = ''; \n\t\t$type6 = ''; \n\t\t\n\t\t$configProductTypes= Mage::getStoreConfig('producslider/display/product_type');\n\t\t$product_types = explode(\",\", $configProductTypes);\n\t\tforeach ($product_types as $type) {\n\t\t\tif($type == 0)\n\t\t\t\t$type1 = 'simple';\n\t\t\telse if($type == 1)\n\t\t\t\t$type2 = 'configurable';\n\t\t\telse if($type == 2)\n\t\t\t\t$type3 = 'grouped';\n\t\t\telse if($type == 3)\n\t\t\t\t$type4 = 'bundle';\n\t\t\telse if($type == 4)\n\t\t\t\t$type5 = 'downloadable';\n\t\t\telse if($type == 5)\n\t\t\t\t$type6 = 'virtual';\n\t\t\telse\n\t\t\t\t$type1 = 'simple';\t\t//default product type\t\n\t\t}\t\n\t\t\n\t\t$catfilters = explode(\",\", $cat_ids);\n\t\t$collection = Mage::getModel('catalog/product')->getCollection()\n\t\t\t\t\t ->addAttributeToSelect('*')\n\t\t\t\t\t ->addAttributeToFilter('status', 1)\n\t\t\t\t\t ->addAttributeToFilter('visibility', 4)\n\t\t\t\t\t ->addAttributeToFilter('is_saleable', TRUE)\n\t\t\t\t\t ->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED))\n\t\t\t\t\t ->addAttributeToFilter('type_id', array('in' => array($type1,$type2,$type3,$type4,$type5,$type6)))\n\t\t\t\t\t ->joinTable('catalog_category_product', 'product_id=entity_id', array('category_id'=>'category_id'), null, 'left')\n\t\t\t\t\t ->addAttributeToFilter('category_id', array('in' => array('finset' => $catfilters)));\n\t\t$collection->getSelect()->group('e.entity_id');\n\t\treturn $collection; \n }", "title": "" }, { "docid": "ab7f7f0ae48c1156ea320ccf29975ab4", "score": "0.48987213", "text": "public function appFilter6($category,$min,$max)\n {\n $statement = $this->pdo->prepare(\"SELECT * FROM `ads` WHERE main_cat='{$category}' OR subcategory='{$category}' AND value BETWEEN '{$min}' AND '{$max}' AND status='1' ORDER by datetime desc LIMIT 20\");\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_CLASS);\n }", "title": "" }, { "docid": "a91750b747b3bbfa8c213564a30295f3", "score": "0.4898429", "text": "public function getPrices() : array\n {\n return $this->prices;\n }", "title": "" }, { "docid": "6ea4d28049296c6dd7d7fa54254008bb", "score": "0.4893776", "text": "public function yearList($fromYear = 2016, $toYear = null, $format = '%s')\n {\n $toYear = is_null($toYear) ? intval(date('Y') + 1) : $toYear;\n\n # combine years and match to IDs\n return array_combine($range = range((int) $fromYear, (int) $toYear), $range);\n }", "title": "" }, { "docid": "891947e976a035c6c7a0327995b003c8", "score": "0.48869604", "text": "public function getSliderValue(){\n\t $slider_id = '';\t\n\t if ($this->hasData('slider_id')) \n {\n\t\t\t$slider_id = $this->getData(\"slider_id\");\n\t }\n return $slider_id;\n }", "title": "" }, { "docid": "cbdc6a876eccb447b510d235e5f2abfe", "score": "0.4884527", "text": "public function getRange()\n {\n return [\n 'skip' => $this->skip,\n 'max' => $this->max\n ];\n }", "title": "" }, { "docid": "965c6c52190bc2d2c40f79548b1e7993", "score": "0.48819622", "text": "protected function years_list($max_tahun = null)\n {\n $min_tahun = collect(Penduduk::select(DB::raw('YEAR(created_at) as tahun'))->get());\n $min_tahun = $min_tahun->min('tahun') ?? date('Y');\n\n $daftar_tahun = [];\n for ($y = $min_tahun; $y <= ($max_tahun ?? date('Y')); $y++) {\n $daftar_tahun[] = $y;\n }\n return $daftar_tahun;\n }", "title": "" }, { "docid": "498f4b5e2de824d614f3f39c11ce71c9", "score": "0.4877762", "text": "public function getRange()\n {\n return [\n 'skip' => $this->skip,\n 'max' => $this->max\n ];\n }", "title": "" }, { "docid": "a4dabdcc604d3269f45ba2a4b5afcfb3", "score": "0.48740628", "text": "public function chart($start, $end) {\n // The result array\n $result = array();\n\n // Gets all the universities\n $universities = $this->University->find('all');\n\n // Gets the values involved in the chart\n $d58_d59 = array();\n for ($i = 58; $i <= 59; $i++) {\n array_push($d58_d59, $this->Data->findByNombre('D' . $i));\n }\n\n // Does the year by year calculation\n for ($year = $start; $year <= $end; $year++) {\n // The grades\n $grades = array();\n for ($i = 58; $i <= 59; $i++) {\n array_push($grades, 0);\n }\n\n // Does the calculation for each university in the current year\n foreach ($universities as $university) {\n $uy_d58_d59 = array();\n\n // Gets all the data\n foreach ($d58_d59 as $data_d_) {\n $uy_d_ = $this->UniversityYearData->findByDato_iddatoAndUniversidad_iduniversidadAndAnho($data_d_['Data']['iddato'], $university['University']['iduniversidad'], $year);\n\n // Checks the obtained data and saves it\n if (!empty($uy_d_)) {\n array_push($uy_d58_d59, $uy_d_['UniversityYearData']['valor']);\n } else {\n array_push($uy_d58_d59, 0);\n }\n }\n\n // Checks all the data and does the calculation\n if (!empty($uy_d58_d59)) {\n foreach ($grades as $index => $grade) {\n $grades[$index] = $grade + $uy_d58_d59[$index];\n }\n }\n }\n\n // Saves the current year result\n $rh007_13 = array();\n $rh007_13['year'] = $year;\n $rh007_13['value'] = $grades;\n\n array_push($result, $rh007_13);\n }\n\n // Gets the series and ticks\n $series = array();\n $ticks = array();\n foreach ($result as $year_result) {\n array_push($ticks, $year_result['year']);\n array_push($series, $year_result['value']);\n }\n\n // Gets the grades\n $grades = array();\n foreach ($d58_d59 as $data_d_) {\n array_push($grades, $data_d_['Data']['descripcion']);\n }\n\n // Saves the final result\n $result = array();\n $result['ticks'] = $ticks;\n $result['series'] = $series;\n $result['grades'] = $grades;\n $result['view'] = 'rh007_14';\n\n // Returns\n return $result;\n }", "title": "" }, { "docid": "49ffca13d9603611334da9c2402a2e8f", "score": "0.486897", "text": "public function get_appslider()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('app_slider');\n\t\t$this->db->where(\"status = 'A'\");\n\t\t$query = $this->db->get();\n if($query->num_rows() > 0):\n \treturn $query->result_array();\n\t\tendif;\n\t}", "title": "" }, { "docid": "1ce05a1c6a6c01e318d677d9beb5bb23", "score": "0.48632106", "text": "public function appFilter14($listing_sel,$category,$min,$max)\n {\n $statement = $this->pdo->prepare(\"SELECT * FROM `ads` WHERE listing_type='{$listing_sel}' AND main_cat='{$category}' OR subcategory='{$category}' AND value\n BETWEEN '{$min}' AND '{$max}' AND status='1' ORDER by datetime desc LIMIT 20\");\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_CLASS);\n }", "title": "" }, { "docid": "cb7580636c16d0edaadded5193c188f8", "score": "0.4859213", "text": "function getValutes($valuteID, $dateFrom, $dateTo){\n $db = currencyConnect();\n // The SQL statement\n /*categoryId, */\n $sql = 'SELECT * FROM currency WHERE valuteID=:valuteID AND (date BETWEEN :dateFrom AND :dateTo)';\n // The next line creates the prepared statement using the acme connection\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':valuteID', $valuteID, PDO::PARAM_STR);\n $stmt->bindValue(':dateFrom', $dateFrom, PDO::PARAM_INT);\n $stmt->bindValue(':dateTo', $dateTo, PDO::PARAM_INT);\n $stmt->execute();\n $valutes = $stmt->fetchall(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $valutes;\n}", "title": "" }, { "docid": "f3fed8fbe9ce7ba609b56fca07619703", "score": "0.48529032", "text": "public function get_data_to_display_quarter($year){\n //group by quarter and year\n $query = \"SELECT YEAR, QUARTER, CAST(AVG(VALUE)AS DECIMAL(16,3)) AS AVERAGE, MIN(VALUE) AS MINIMUM, MAX(VALUE) AS MAXIMUM\n FROM vw_data\n WHERE YEAR = '$year'\n GROUP BY YEAR, QUARTER\n ORDER BY YEAR, QUARTER\";\n $data = oci_parse ($this->con, $query);\n oci_execute ($data);\n return $data;\n }", "title": "" }, { "docid": "a22d5f2a58127e82fc084350c7175a94", "score": "0.4847407", "text": "private function getPrices(): array\n {\n $half23 = Server::fetchPriceFromURL\n (\n 'https://www.carmeltunnels.co.il/rates/',\n \"'<td tabindex=\\\"0\\\" class=\\\"t-b s-14\\\" style=\\\"background-color: #dfe0e2;\\\">(.*?)&nbsp;<span>&nbsp;₪</span></td>'\"\n );\n\n return [\n Server::GAS_TYPES['petrol'] => Server::fetchPriceFromURL\n (\n 'https://www.gov.il/he/Departments/General/fuel_prices_xls',\n \"'<td class=\\\"rtecenter\\\">(.*?) ש\\\"ח</td>'\"\n ),\n Server::GAS_TYPES['diesel'] => Server::fetchPriceFromURL\n (\n 'https://www.delek.co.il/Fuel-prices',\n \"'<div class=\\\"field field-name-field-solr field-type-number-decimal field-label-hidden\\\">\" .\n \"<div class=\\\"field-items\\\"><div class=\\\"field-item even\\\">(.*?)</div>'\"\n ),\n Server::GAS_TYPES['electric'] => 0.47,\n '6 צפון' => Server::fetchPriceFromURL\n (\n 'https://www.kvish6.co.il/taarif.aspx',\n \"'<td id=\\\"contentMain_rptTolls_td8_1\\\" class=\\\"RowActive\\\">(.*?) ש\\\"ח</td>'\"\n ),\n '6 יקנעם' => Server::fetchPriceFromURL\n (\n 'https://6cn.co.il/prices',\n \"'<span id=\\\"lblRushHourYokneam\\\" aria-hidden=\\\"true\\\">(.*?)</span>'\"\n ),\n 'מנהרות הכרמל (חלקי)' => $half23,\n 'מנהרות הכרמל (מלא)' => 2 * $half23\n ];\n }", "title": "" }, { "docid": "32f90acf664cf718a2eaa809bda6c152", "score": "0.48378956", "text": "public function getHeaderSlider() {\n\t\t$data = array (\n\t\t\t\t'slider1.png',\n\t\t\t\t'slider2.png',\n\t\t\t\t'slider3.png',\n\t\t\t\t'slider4.png',\n\t\t\t\t'slider4.png' \n\t\t);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "94765d7164f48ebfe45c58e863c26e78", "score": "0.48336568", "text": "public function input_range($min, $max, $options);", "title": "" }, { "docid": "2a4a914a063e818ad258724a25057287", "score": "0.48273748", "text": "public static function slider()\n {\n global $json_api;\n\n try {\n $arr = array();\n\n if (!isset($json_api->query->cat)) {\n $category = $json_api->query->cat;\n $arr['category__in'] = $category;\n }\n\n if (!isset($json_api->query->country)) {\n $country = $json_api->query->country;\n // $arr['category__in'] = $category;\n }\n\n $reward_listing = new RewardListing($arr);\n api_handler::outSuccessDataWeSoft($reward_listing->getResultArr());\n } catch (Exception $e) {\n api_handler::outFail($e->getCode(), $e->getMessage());\n }\n /* return array(\n \"result\" => \"success\",\n \"data\" => array_values(vslider::preset_sliders()\n ));*/\n }", "title": "" }, { "docid": "e517039b38cde9730f90bfa901fe3587", "score": "0.48133522", "text": "function topFilters($currShopsInput,$currStarsInput,$rangeMin,$rangeMax,$keywords) {\n\t\tglobal $baseURL, $db;\n\t\t\n\t\t\t$shopArray = Array();\n\t\t\t$shopArray = explode('-',$currShopsInput);\n\t\t\n\t\t\t$select0 = '';\n\t\t\t$select1 = '';\n\t\t\t$select2 = '';\n\t\t\t$select3 = '';\n\t\t\t$select4 = '';\n\t\t\t$select5 = '';\n\t\t\t\n\t\t\tswitch ($currStarsInput) {\n\t\t\t\tcase 0:\n\t\t\t\t\t$select0 = 'checked=\"checked\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$select1 = 'checked=\"checked\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$select2 = 'checked=\"checked\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$select3 = 'checked=\"checked\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$select4 = 'checked=\"checked\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t$select5 = 'checked=\"checked\"';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$select0 = 'checked=\"checked\"';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\techo '\n\t\t<div id=\"filterDivTopWrapper\">\n\t\t\t<form id=\"filterForm\" method=\"get\">\n\t\t\n\t\t\t<div class=\"filterDivTop\" id=\"filterDivTopPrice\">\n\t\t\t\t<div class=\"filterHeader\">Price Range</div>\n\t\t\t\t<div class=\"filterBox\">\n\t\t\t\t\t\t<div class=\"priceBox\">\n\t\t\t\t\t\t\t<input type=\"hidden\" id=\"minPrice\" name=\"min\" value=\"'. $rangeMin .'\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" id=\"maxPrice\" name=\"max\" value=\"'. $rangeMax .'\" />\n\t\t\t\t\t\t\t<div id=\"slider-range\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"priceBox\">\n\t\t\t\t\t\t\t<label for=\"amount\" hidden=\"hidden\">Price range</label>\n\t\t\t\t\t\t\t<input type=\"text\" id=\"amount\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style=\"clear: both;\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"clear: both;\"></div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"filterDivTop\" id=\"filterDivTopStars\">\n\t\t\t\t<div class=\"filterHeader\">Min. Stars</div>\n\t\t\t\t<div class=\"filterBox\">\n\t\t\t\t\t<input type=\"radio\" name=\"stars\" value=\"0\" '. $select0 .' /><img src=\"'. $baseURL .'img/stars/0stars.png\" /> - \n\t\t\t\t\t<input type=\"radio\" name=\"stars\" value=\"1\" '. $select1 .' /><img src=\"'. $baseURL .'img/stars/1stars.png\" /> - \n\t\t\t\t\t<input type=\"radio\" name=\"stars\" value=\"2\" '. $select2 .' /><img src=\"'. $baseURL .'img/stars/2stars.png\" /> - \n\t\t\t\t\t<input type=\"radio\" name=\"stars\" value=\"3\" '. $select3 .' /><img src=\"'. $baseURL .'img/stars/3stars.png\" /> - \n\t\t\t\t\t<input type=\"radio\" name=\"stars\" value=\"4\" '. $select4 .' /><img src=\"'. $baseURL .'img/stars/4stars.png\" /> - \n\t\t\t\t\t<input type=\"radio\" name=\"stars\" value=\"5\" '. $select5 .' /><img src=\"'. $baseURL .'img/stars/5stars.png\" />\n\t\t\t\t</div>\n\t\t\t\t<div style=\"clear: both;\"></div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"filterDivTop\" id=\"filterDivTopShops\">\n\t\t\t\t<div class=\"filterHeader\">Shops</div>\n\t\t\t\t<div class=\"filterBox\">\n\t\t\t';\n\t\t\n\t\t\t\t$statement = $db->prepare(\"SELECT `id`,`name` FROM `sources` WHERE `active` = '1' AND `current` = '1' ORDER BY `rank` ASC\");\n\t\t\t\t$statement->execute();\n\t\t\t\t$statement->store_result();\n\t\t\t\t$statement->bind_result($id, $name);\n\t\t\t\t\n\t\t\t\twhile($statement->fetch()) {\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif ($currShopsInput != '') {\n\t\t\t\t\t\tforeach($shopArray as $key => $shop) {\n\t\t\t\t\t\t\tif ($id == $shop) {\n\t\t\t\t\t\t\t\t$selected = 'checked=\"checked\"';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$selected = 'checked=\"checked\"';\n\t\t\t\t\t}\n\t\t\t\t\techo '<div class=\"shopSelect\"><input type=\"checkbox\" name=\"inclShop[]\" value=\"'. $id .'\" '. $selected .'> '. $name .'</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$statement->free_result();\n\t\t\t\t$statement->close();\n\t\t\t\n\t\t\techo '<div style=\"clear: both;\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"clear: both;\"></div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"filterDivTop\" id=\"filterDivTopText\">\n\t\t\t\t<div class=\"filterHeader\">Text Filter</div>\n\t\t\t\t<div class=\"filterBox\">\n\t\t\t\t\t<input type=\"text\" name=\"textFilter\" id=\"textfilter\" value=\"'. HtmlSpecialChars($keywords) .'\" />\n\t\t\t\t</div>\n\t\t\t\t<div style=\"clear: both;\"></div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"filterDivTop\" id=\"filterDivTopApply\">\n\t\t\t\t<div class=\"filterHeader\">&nbsp;</div>\n\t\t\t\t<div class=\"filterBox\">\n\t\t\t\t\t<div class=\"applyBox\">\n\t\t\t\t\t\t\t<input id=\"priceApply\" type=\"submit\" value=\"Apply\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"clear: both;\"></div>\n\t\t\t</div>\n\t\t\t\n\t\t\t</form>\n\n\t\t\t<div style=\"clear: both;\"></div>\n\t\t</div>';\n\t}", "title": "" }, { "docid": "6fccb34ba508cbb03cae06ceb65b71d3", "score": "0.48094285", "text": "private function getPrices(): array\n {\n return [\n \"Under €10\",\n \"€11-20\",\n \"€21-30\",\n \"€31-40\",\n \"Over €40\",\n ];\n }", "title": "" }, { "docid": "72e1c29db99388b4f73f61c5de0e5a78", "score": "0.48064137", "text": "public function appFilter11($min,$max,$location,$category)\n {\n $statement = $this->pdo->prepare(\"SELECT * FROM `ads` WHERE value BETWEEN '{$min}' AND '{$max}' AND region='{$location}' OR city_town='{$location}' AND main_cat='{$category}' OR subcategory='{$category}' AND status='1' ORDER by datetime desc LIMIT 20\");\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_CLASS);\n }", "title": "" }, { "docid": "ab8b8eaafb401d7d0ebf0c0983f06320", "score": "0.48002315", "text": "public function getInsurancePrices() {\r\n $url = \"/insuranceprices/\";\r\n return $this->getData($url, 3600);\r\n }", "title": "" }, { "docid": "a47c37c11f7e5b25f7bcee2edc2f8c15", "score": "0.47978565", "text": "function get_deltaFuelArr() {\n $priceCurr = $_SESSION['ABH_fuel'];\n\n /*\n Get all the year/price pairs from table bid_fuelSurvey which\n have a month value of six (6). Put them into an array called\n yearData.\n */\n $query = \"SELECT year, price\n FROM bid_fuelSurvey\n WHERE month=6\";\n $result = mysql_query($query);\n if (!$result) {\n form_destroy();\n die('Query failed. Err: 683774294. -Programmer.');\n }\n $yearData = array();\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n $yearData[] = $row;\n }\n if (empty($yearData)) {\n form_destroy();\n die('Err: 883574154. -Programmer.');\n }\n\n // generate $deltaFuel array\n $deltaFuel = array();\n $priceCurr = $priceCurr * 100; // we don't want this inside the loop\n foreach($yearData as $record) {\n $year = $record['year'];\n $price = $record['price'];\n \n $price = $price * 100;\n \n $delta = $priceCurr - $price;\n $delta = round($delta);\n $delta = $delta / 5;\n $delta = floor($delta);\n $delta = $delta / 100;\n \n $deltaFuel[$year] = $delta;\n }\n\n if (empty($deltaFuel)) {\n form_destroy();\n die('Err: 993574181. -Programmer.');\n }\n\n $_SESSION['ABH_deltaFuel'] = $deltaFuel;\n return;\n}", "title": "" }, { "docid": "dfc890bced8d8d1410b011e2f1206cad", "score": "0.4789238", "text": "public function appFilter10($min,$max,$location)\n {\n $statement = $this->pdo->prepare(\"SELECT * FROM `ads` WHERE value BETWEEN '{$min}' AND '{$max}' AND region='{$location}' OR city_town='{$location}' AND status='1' ORDER by datetime desc LIMIT 20\");\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_CLASS);\n }", "title": "" }, { "docid": "4c30c776adb78fc2db62e5dda2dc831a", "score": "0.478884", "text": "public static function getAllPrices($share) \n {\n $priceShareData = [];\n $shareColor = [\n \"#007bff\", \"#003D80\", \"#003D80\",\"#FF8400\",\"#CC5100\",\n \"#000000\", \n \"#007BFF\", \"#0400FF\",\"#8400FF\",\"#3f51b5\",\"#FF00FB\", \"#FF007B\",\"#FF0400\",\n \"#009688\",\"#4caf50\",\"#8bc34a\",\"#cddc39\",\n \"#ffeb3b\", \"#ffc107\", \"#ff9800\",\"#ff5722\",\"#795548\",\"#9e9e9e\",\n \"#607d8b\",\n \"#EBDEF0\",\"#D4E6F1\",\"#D1F2EB\",\"#FCF3CF\",\"#EDBB99\",\n \"#C0392B\", \"#9B59B6\", \"#2980B9\",\"#1ABC9C\",\"#F1C40F\",\"#E67E22\",\n \"#D98880\",\"#EBDEF0\",\"#D4E6F1\",\"#D1F2EB\",\"#FCF3CF\",\"#EDBB99\",\n ];\n $indexShareColor = 0;\n\n // get share data prices, min, max, buy and sales\n $prices = PriceShares::where(\"share_id\", $share->id)->orderBy(\"date\")->get();\n if ($prices->count() == 0) return $priceShareData;\n \n $day = $prices[0]->date->day;\n $month = $prices[0]->date->month;\n $year = $prices[0]->date->year;\n $minMonth = $prices[0]->close;\n $maxMonth = $prices[0]->close;\n \n foreach ($prices as $key => $price) {\n if ($month == $price->date->month) {\n // still the samme month, we update min & max\n if ($minMonth > $price->close) $minMonth = $price->close;\n if ($maxMonth < $price->close) $maxMonth = $price->close;\n $day = $price->date->day;\n } else {\n // we change of month, we initialize min & max + month and save value to the array\n $priceShareData[\"min\"][$year . \"-\" . str_pad($month, 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad($day, 2, \"0\", STR_PAD_LEFT)] = $minMonth;\n $priceShareData[\"max\"][$year . \"-\" . str_pad($month, 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad($day, 2, \"0\", STR_PAD_LEFT)] = $maxMonth;\n\n $minMonth = $price->close;\n $maxMonth = $price->close;\n $day = $price->date->day;\n $month = $price->date->month;\n $year = $price->date->year;\n }\n $priceShareData[\"price\"][$price->date->toDateString()] = $price->close;\n }\n // we save the last month\n $priceShareData[\"min\"][$year . \"-\" . str_pad($month, 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad($day, 2, \"0\", STR_PAD_LEFT)] = $minMonth;\n $priceShareData[\"max\"][$year . \"-\" . str_pad($month, 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad($day, 2, \"0\", STR_PAD_LEFT)] = $maxMonth;\n\n $orders = $share->orders;\n foreach ($orders as $order) {\n $year = $order->passedOn->year;\n $month = $order->passedOn->month;\n $day = $order->passedOn->day;\n $priceShareData[$order->type][$year . \"-\" . str_pad($month, 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad($day, 2, \"0\", STR_PAD_LEFT)] = $order->price;\n }\n \n // create history data\n $lastKey = array_key_last($priceShareData[\"price\"]);\n $today = carbon::today();\n\n foreach(['1er Janvier' => 0, '1 semaine' => 5, '1 mois' => 30, '3 mois' => 91, '6 mois' => 182, '1 an' => 365] as $key => $gap) {\n $lastDate = Carbon::createFromFormat('Y-m-d', $lastKey);\n $lastPrice = $priceShareData[\"price\"][$lastKey];\n \n if ($gap == 0) \n $nextDate = Carbon::createFromFormat('Y-m-d', $lastDate->year - 1 . \"-12-31\");\n else \n $nextDate = $lastDate->subDay($gap);\n\n if ($nextDate->isWeekend()) $nextDate = $nextDate->previousWeekday();\n \n if (isset($priceShareData[\"price\"][$nextDate->year . \"-\" . str_pad($nextDate->month, 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad($nextDate->day, 2, \"0\", STR_PAD_LEFT)]))\n $newPrice = $priceShareData[\"price\"][$nextDate->year . \"-\" . str_pad($nextDate->month, 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad($nextDate->day, 2, \"0\", STR_PAD_LEFT)];\n else\n $newPrice = 0;\n if ($newPrice != 0) {\n $priceShareData[\"history\"][\"value\"][$key] = $newPrice;\n $priceShareData[\"history\"][\"percent\"][$key] = ($lastPrice - $newPrice) / $newPrice * 100;\n } else {\n $priceShareData[\"history\"][\"value\"][$key] = \"-\";\n $priceShareData[\"history\"][\"percent\"][$key] = \"-\";\n }\n }\n $lastPrice = end($priceShareData[\"price\"]);\n $previousPrice = prev($priceShareData[\"price\"]);\n $priceShareData[\"history\"][\"value\"][\"Veille\"] = $previousPrice;\n $priceShareData[\"history\"][\"percent\"][\"Veille\"] = ($lastPrice - $previousPrice) / $previousPrice * 100; \n //dd($previousPrice);\n //dd($priceShareData[\"price\"]);\n\n // get CAC 40\n $indice = Share::where(\"codeISIN\", \"FR0003500008\")->first();\n $indicePrices = PriceShares::where(\"share_id\", $indice->id)->orderBy(\"date\")->get();\n foreach ($indicePrices as $indicePrice) {\n $priceShareData[\"cac\"][$indicePrice->date->toDateString()] = $indicePrice->close;\n }\n\n // we add color\n $priceShareData[\"color\"]['prices'] = $shareColor[0];\n $priceShareData[\"color\"]['min'] = $shareColor[1];\n $priceShareData[\"color\"]['max'] = $shareColor[2];\n $priceShareData[\"color\"]['Achat'] = $shareColor[3];\n $priceShareData[\"color\"]['Vente'] = $shareColor[4];\n $priceShareData[\"color\"]['cac'] = $shareColor[5];\n $indexShareColor = 6;\n\n // get all shares of the same type for comparison\n $priceShareData[\"index\"] = [];\n $sameShares = Share::where(\"type\", $share->type)->orderBy(\"name\")->get();\n foreach ($sameShares as $sameShare) {\n array_push($priceShareData[\"index\"],$sameShare->id);\n $priceShareData[\"name\"][$sameShare->id] = $sameShare->name;\n $priceShareData[\"color\"][$sameShare->id] = $shareColor[$indexShareColor];\n $indexShareColor++;\n $sameSharePrices = PriceShares::where(\"share_id\", $sameShare->id)->orderBy(\"date\")->get();\n foreach ($sameSharePrices as $sameSharePrice) {\n $priceShareData[\"same\"][$sameShare->id][$sameSharePrice->date->toDateString()] = $sameSharePrice->close;\n }\n }\n\n $currentShareIndex = array_search($share->id, $priceShareData[\"index\"]);\n if (count($priceShareData[\"index\"]) == 1) {\n $priceShareData[\"previous\"] = $priceShareData[\"index\"][$currentShareIndex];\n $priceShareData[\"next\"] = $priceShareData[\"index\"][$currentShareIndex];\n } elseif($currentShareIndex == 0) {\n // first share in the list\n $priceShareData[\"previous\"] = $priceShareData[\"index\"][count($priceShareData[\"index\"])-1];\n $priceShareData[\"next\"] = $priceShareData[\"index\"][$currentShareIndex+1];\n } elseif ($currentShareIndex == count($priceShareData[\"index\"])-1) {\n // last share in the list\n $priceShareData[\"previous\"] = $priceShareData[\"index\"][$currentShareIndex-1];\n $priceShareData[\"next\"] = $priceShareData[\"index\"][0];\n } else {\n $priceShareData[\"previous\"] = $priceShareData[\"index\"][$currentShareIndex-1];\n $priceShareData[\"next\"] = $priceShareData[\"index\"][$currentShareIndex+1];\n }\n \n //dd($priceShareData);\n return $priceShareData;\n }", "title": "" }, { "docid": "73288a067821a9ebe246270b97a85b1a", "score": "0.4784664", "text": "public function getIntervals();", "title": "" }, { "docid": "081efb9e45df7da13fcd454eeacfca70", "score": "0.47821468", "text": "private function getSortbyValues()\n\t{\n\t\tif($this->incomeArr[\"minIR\"]==0 || $this->incomeArr[\"maxIR\"]==0 || $this->incomeArr[\"minID\"]==0 || $this->incomeArr[\"maxID\"]==0)\n\t\t\t$this->noIncomeCase = 1;\n\t\telse\n\t\t\t$this->noIncomeCase = 0;\n\n\t\t$tempSortArr=$this->getIncomeDrop(array('MIN_VALUE'=>$this->incomeArr['minIR'],'TYPE'=>'RUPEES','VISIBLE'=>'Y'), array('SORTBY'=>0),array('SORTBY'=>''));\n\t\t$sort_arr[\"minIR\"] = $tempSortArr[\"SORTBY\"];\n\t\t$tempSortArr=$this->getIncomeDrop(array('MAX_VALUE'=>$this->incomeArr['maxIR'],'TYPE'=>'RUPEES','VISIBLE'=>'Y'),null,array('SORTBY'=>''));\n\t\t$sort_arr[\"maxIR\"] = $tempSortArr[\"SORTBY\"];\n\t\t$tempSortArr=$this->getIncomeDrop(array('MIN_VALUE'=>$this->incomeArr['minID'],'TYPE'=>'DOLLARS',), array('SORTBY'=>0),array('SORTBY'=>''));\n\t\t$sort_arr[\"minID\"] = $tempSortArr[\"SORTBY\"];\n\t\t$tempSortArr=$this->getIncomeDrop(array('MAX_VALUE'=>$this->incomeArr['maxID'],'TYPE'=>'DOLLARS',), array('SORTBY'=>0),array('SORTBY'=>''));\n\t\t$sort_arr[\"maxID\"] = $tempSortArr[\"SORTBY\"];\n\t\t$sort_arr[\"currency\"] = $this->bothCurrency;\n\t\treturn $sort_arr;\n\t}", "title": "" }, { "docid": "a52484c93ea198829a663fba25af9dcb", "score": "0.47766784", "text": "public function getSlider(){\n $this->db->from('slider');\n $this->db->where('status = 1');\n return $this->db->get()->result();\n }", "title": "" }, { "docid": "729721d69cc0b5b8cd6e6a749332fe14", "score": "0.4770011", "text": "public function getMonthlyDateRange($start_month,$start_year,$end_month,$end_year){\n $year_diff = $end_year-$start_year;\n $starts_years = array();\n $ends_years = array();\n if($year_diff==0){\n $month_limit = $end_month;\n for($i=$start_month;$i<=$month_limit;$i++){\n $i = $this->check_length_add_one($i);\n $start_date = $end_year.\"-\".$i.\"-01\";\n $end_date = $end_year.\"-\".$i.\"-31\";\n array_push($starts_years,$start_date);\n array_push($ends_years,$end_date);\n \n }\n \n }else{\n for($r=$start_year;$r<=$end_year;$r++){\n if($r==$start_year){\n $month_start = $start_month;\n \n }else{\n $month_start = \"01\";\n }\n \n if($r==$end_year){\n $month_limit = $end_month;\n }\n else{\n $month_limit = \"12\";\n }\n \n for($i=$month_start;$i<=$month_limit;$i++){\n $i = $this->check_length_add_one($i);\n $start_date = $r.\"-\".$i.\"-01\";\n $end_date = $r.\"-\".$i.\"-31\";\n array_push($starts_years,$start_date);\n array_push($ends_years,$end_date);\n }\n \n }\n \n \n }\n return array($starts_years,$ends_years);\n \n }", "title": "" }, { "docid": "7a0153796a51a6a4b3e1e295c6d65c2f", "score": "0.47680047", "text": "public function getData($minDate, $maxDate) {\n\t\t$data = array();\n\t\t$data['id'] = (int) $this->id;\n\t\t$data['measurements'] = $this->measurements($minDate, $maxDate);\n\t\t$data['value'] = $this->summary($minDate, $maxDate);\n\t\t$data['quantity'] = $this->quantity($minDate, $maxDate);\t\t\t\n\t\t$data['path'] = CellPath::where('cell_id', $this->id)->get();\n\t\tforeach ($data['path'] as $point) {\n\t\t\t$point->lat = (float) $point->lat;\n\t\t\t$point->lng = (float) $point->lng;\n\t\t}\n\n\t\treturn array('data' => $data);\n\t}", "title": "" }, { "docid": "83f6b4dc2b8f92a4654cab3c6a1fb71d", "score": "0.47576597", "text": "function getYearList($selected = '') {\r\n $options = '';\r\n for ($i = 2015; $i <= 2025; $i++) {\r\n $selectedOpt = ($i == $selected) ? 'selected' : '';\r\n $options .= '<option value=\"' . $i . '\" ' . $selectedOpt . ' >' . $i . '</option>';\r\n }\r\n return $options;\r\n}", "title": "" }, { "docid": "be41c02d3406349cd4488b82135166be", "score": "0.4757544", "text": "function random_values($min, $max, $limit) {\n\t\t\n\t\t// Numbers?\n\t\tif(!is_numeric($min) or !is_numeric($max)) {\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// Get the accurate min and max\n\t\t$min = min($min, $max);\n\t\t$max = max($min, $max);\n\t\t\n\t\t// Go home\n\t\tif($min == $max) return array($min);\n\t\t\n\t\t// is the limit ok?\n\t\t$minmax_limit = abs($max - $min);\n\t\tif($limit > $minmax_limit) {\n\t\t\t$limit = $minmax_limit;\n\t\t}\n\t\t\n\t\t\n\t\t$array = Array();\n\t\tfor($i = 0; $i < $limit; $i++) {\n\t\t\t$rand = rand($min,$max);\n\t\t\twhile(in_array($rand,$array)) {\n\t\t\t $rand = mt_rand($min,$max);\n\t\t\t}\n\t\t\t$array[$i] = $rand;\n\t\t} \n\t\treturn $array;\n\t}", "title": "" }, { "docid": "446310e220a86884206c527926094882", "score": "0.47553855", "text": "function pp_slider(){\r\n\r\n\tprint pp_get_slider();\r\n}", "title": "" }, { "docid": "269a18206f4f80ca8588a49ec848141a", "score": "0.47538605", "text": "public function getPrices()\n {\n return $this->prices;\n }", "title": "" }, { "docid": "1eb627ac7070f6c38d0a871f91f8885f", "score": "0.47501245", "text": "function glz_format_ranges($arr_values, $custom_set_name) {\n //initialize $out\n $out = '';\n foreach ( $arr_values as $key => $value ) {\n $out[$key] = ( strstr($custom_set_name, 'range') ) ?\n glz_custom_fields_range($value, $custom_set_name) :\n $value;\n }\n return $out;\n}", "title": "" }, { "docid": "df5b08149a8a1a948d718cf74d841d62", "score": "0.4745316", "text": "function NauNet_Domain_GetPrice($Settings,$DomainName,$DomainZone){\r\n\t#-------------------------------------------------------------------------------\r\n\treturn Array();\r\n\t#-------------------------------------------------------------------------------\r\n}", "title": "" }, { "docid": "2b9de9781dab94f3039f6519b7de801e", "score": "0.47393587", "text": "function get_years($page_content) {\n\t$content_array = explode(\"\\n\", $page_content);\n\t$years = array();\n\t$index = 0;\n\tforeach ($content_array as $line) {\n\t\t$is_year_list = preg_match(\"/<option value=(.)*[0-9]{4}(.)*>([0-9]{4})<(.)*/\", $line, $year);\n\t\tif ($is_year_list) {\n\t\t\t$years[$index++] = $year[3];\n\t\t}\n\t}\n\treturn $years;\n}", "title": "" }, { "docid": "de63e5ad58b6f74a7bfe5f9dab0e3213", "score": "0.4737506", "text": "public function getSales()\n {\n return [['price' => 12000],['price' => 21000],['price' => 20000],['price' => 10000]];\n }", "title": "" }, { "docid": "de63e5ad58b6f74a7bfe5f9dab0e3213", "score": "0.4737506", "text": "public function getSales()\n {\n return [['price' => 12000],['price' => 21000],['price' => 20000],['price' => 10000]];\n }", "title": "" } ]
09e505d20329f88f72cbd8f600fd5145
generateTestCode Get numeric index of last test with given id
[ { "docid": "263213a39de844ebf674b48e04ce7ac2", "score": "0.70860183", "text": "protected function getLastTestIndex($sTestId){\r\n\t\t\t\r\n\t\t\treturn isset($this->aTests[$sTestId]) ? count($this->aTests[$sTestId]) - 1 : 0;\r\n\t\t\t\r\n\t\t}", "title": "" } ]
[ { "docid": "9be834bcd77b76de67dd8268e4163727", "score": "0.68762267", "text": "function generateNextTestId($db)\n{\n\t$query = \"SELECT MAX(id) FROM tests\";\n\t$result = $db->query($query);\n\tif(!$result)\n\t\treturn $result;\n\t\n\t$row = $result->fetch_array();\n\t\n\t$maxId = $row[0] + 1;\n\t//$maxId = $row->id;//or else $row->MAX(id)\n\treturn $maxId;\n}", "title": "" }, { "docid": "a697e7e9db530e8177291cd9a2f2cc5b", "score": "0.6260682", "text": "public function testFinished($id)\n\t{\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "73d9ec89ae1b86787c57bf0c2b466a6d", "score": "0.61423427", "text": "public function get_test_id () {\n\t\treturn $this->test_id;\n\t}", "title": "" }, { "docid": "17da87da3d15a386ede7511889934b3d", "score": "0.58665806", "text": "function __getUniqueId() {\n\t\tglobal $adb;\n\t\t$result = $adb->query(\"SELECT MAX(tabid) AS max_seq FROM vtiger_tab\");\n\t\t$maxseq = $adb->query_result($result, 0, 'max_seq');\n\t\treturn ++$maxseq;\n\t}", "title": "" }, { "docid": "53ab18676efddfd9a1974fa0a9d0558b", "score": "0.5862601", "text": "public function lastId() : int;", "title": "" }, { "docid": "853cdffba2e885a1bd950731f3c905d8", "score": "0.5643434", "text": "function _lookupObjIdForTestId($a_test_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$result = $ilDB->queryF(\"SELECT obj_fi FROM tst_tests WHERE test_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($a_test_id)\n\t\t);\n\n\t\t$row = $ilDB->fetchAssoc($result);\n\t\treturn $row[\"obj_fi\"];\n\t}", "title": "" }, { "docid": "9280f9dd31cdb4572bdf478187a74617", "score": "0.56027126", "text": "private function lastId()\n {\n $lastData = $this->all(1, 0, \"COD_ARQUIVO\", \"COD_ARQUIVO DESC\");\n return ($lastData ? $lastData[0]->COD_ARQUIVO + 1 : 1);\n }", "title": "" }, { "docid": "d64f88372ae4dd0522006c24bf9a8faa", "score": "0.55717605", "text": "public static function getNextId()\n {\n\n return 'tb' . self::$_counter++;\n }", "title": "" }, { "docid": "25058ec55826a47220085f4be90bc321", "score": "0.5545471", "text": "private function getLastIndex(){\n \t$query = (new Stage)->newQuery();\n \t$query = $query->orderBy('position','desc');\n \t$obj = $query->first();\n \tif (is_null($obj)){\n \t\treturn 0;\n\t }\n\t return ($obj->position * 1);\n }", "title": "" }, { "docid": "be19cf2b211ea231c73e0df62bc528db", "score": "0.5499735", "text": "public function get_new_id()\n {\n $query = \"select MAX(id) as id from job\";\n $res = $this->db->query($query);\n $res->result_array();\n $last_id = ($res->result()[0]->id) + 1;\n return $last_id;\n }", "title": "" }, { "docid": "feebfc173df44bf074153d31af2faaca", "score": "0.5490003", "text": "public function get_next_id() {\n $result_id = $this->db->query('SELECT getNextSeq(\"company_seq as id\");');\n $last_id = $result_id[0]['id'];\n //\n /* print \"<pre>\";\n print_r($last_id);\n print \"</pre>\";\n exit();*/\n return $last_id;\n }", "title": "" }, { "docid": "3bc8e573e39d4db8340c36314dd7c421", "score": "0.5482151", "text": "private function _getNextSuiteId()\n {\n\treturn $this->_getNextId(false);\n }", "title": "" }, { "docid": "38571d3948b6e2f9d82c608fe1c24816", "score": "0.54813623", "text": "public static function id_generator($table,$id){\n\n\t\t$query = $table::withTrashed()->lists($id)->last();\n\t\tif($query!=null)\n\t\t{\n\t\t\treturn $query+1;\t\n\t\t}\t\n\t\telse {\n\t\t\treturn 1;\n\t\t} \n\t}", "title": "" }, { "docid": "80f4750a092650f2bbe094b481c52201", "score": "0.5472228", "text": "function __getNextSequence() {\n\t\tglobal $adb;\n\t\t$result = $adb->pquery(\"SELECT MAX(tabsequence) AS max_tabseq FROM vtiger_tab\", array());\n\t\t$maxtabseq = $adb->query_result($result, 0, 'max_tabseq');\n\t\treturn ++$maxtabseq;\n\t}", "title": "" }, { "docid": "14cbba294a4325fbff8099c15503a40c", "score": "0.54677397", "text": "public function nextId(){\n $json = file_get_contents($this->getBaseJson());\n $usuarios = json_decode($json,true);\n $ultimoUsuario = array_pop($usuarios['usuarios']);\n $ultimoId = $ultimoUsuario['id'];\n if($ultimoId != 0){\n return $ultimoId + 1;\n }else{\n return 1;\n }\n }", "title": "" }, { "docid": "5012bbb7c66c09382725e95ad00c0f93", "score": "0.54665846", "text": "public function generateResetCode(): int;", "title": "" }, { "docid": "1e4ab5de143e69e7f66da42b1ebc412a", "score": "0.54614305", "text": "public function sequenceNumber(): int;", "title": "" }, { "docid": "d79510c279efb8a8ba5cc15a42b264af", "score": "0.54612464", "text": "public function getMainFromTarget(int $target): int;", "title": "" }, { "docid": "244f53f69e3d546de650c011997e4192", "score": "0.54392934", "text": "public function getLastRecordCapitalDetail(){\r\n \t$db = $this->getAdapter();\r\n \t$sql = \" SELECT id FROM `cs_capital_detail` ORDER BY id DESC LIMIT 1 \";\r\n \t$num = $db->fetchOne($sql);\r\n \tif(empty($num)){\r\n \t\t$num = 0;\r\n \t}\r\n \treturn ($num+1);\r\n }", "title": "" }, { "docid": "3e448550e83d3fef3ac3a526f8fcc16b", "score": "0.54329765", "text": "function getNextTupoksi(){\r\n $this->ekin = $this->ci->load->database('ekin234', TRUE);\r\n\r\n $sql = \"SELECT MAX(tupoksi_id)+1 tupoksi_id FROM ref_tupoksi\";\r\n $query = $this->ekin->query($sql)->row(); \r\n\r\n return $query->tupoksi_id;\r\n }", "title": "" }, { "docid": "8cb6e5c9bff69822fa2d7ae2645ef12c", "score": "0.54298", "text": "public function lastStep(): int\n {\n return $this->steps->keys()->filter(function ($value) {\n return is_int($value);\n })->max() ?? 1;\n }", "title": "" }, { "docid": "9ff091484147a9bb197fe31c5f1310b7", "score": "0.541862", "text": "protected function _keyTest($id)\n\t{\n\t\treturn 'getTest_' . $id;\n\t}", "title": "" }, { "docid": "e1fef46ab497949219c219e4811fcdcf", "score": "0.541407", "text": "abstract public function getLastId();", "title": "" }, { "docid": "2176609ef3d96064c08e0d8e74ff7c01", "score": "0.5403195", "text": "public function getLastTimeID()\r\n {\r\n\t $connection = Yii::app()->db;\r\n\t $sql = \"SELECT MAX(id) as id from kilt_time\";\r\n\t $command = $connection->createCommand($sql);\r\n\t $data = $command->queryScalar(); \r\n\t if ($data == \"\")\r\n\t\t $data = -1;\r\n\t return $data;\r\n }", "title": "" }, { "docid": "fd455777c1bd7d5fae00cf2215185a60", "score": "0.5335535", "text": "protected function _lastItemId()\n {\n $item = Item::newInstance()->dao->query('select pk_i_id from '.DB_TABLE_PREFIX.'t_item order by pk_i_id DESC limit 0,1');\n $aItem = $item->result();\n return $aItem[0]['pk_i_id'];\n }", "title": "" }, { "docid": "f74e9a7356efba0eb8ea6a0ef8cc4bc1", "score": "0.5331046", "text": "public function retrieve_training_index($id) {\n $index = -1;\n foreach ($this->trainings as $i => $t) {\n if ($t->get_categoryid() == $id) {\n $index = $i;\n break;\n }\n }\n return $index;\n }", "title": "" }, { "docid": "337cf153d4e93e525a3d1d84076536a4", "score": "0.53201133", "text": "function getNewId(){\n\n $lastId = 0;\n try{\n $file = fopen($this->database_folder . \"recipe_index.txt\", \"r\");\n $lastId = unserialize(fgets($file));\n fclose($file);\n } catch(Exception $e){\n \n }\n \n $nextId = $lastId + 1;\n\n $file = fopen($this->database_folder . \"recipe_index.txt\", \"w\");\n fseek($file,0);\n fwrite($file,serialize($nextId));\n\n fclose($file);\n\n return $nextId;\n }", "title": "" }, { "docid": "027dd99a96c38356063310a38d139189", "score": "0.53148186", "text": "function get_next_key()\n {\n $get_last_pelanggan = $this->Db_model->get_last_pelanggan();\n if($get_last_pelanggan != false)\n { \n $tmp = explode('-',$get_last_pelanggan);\n $cur_id = $tmp[count($tmp)-1];\n $next_id = $cur_id + 1;\n return 'cust-' . date('Ym-') . str_pad($next_id, 3, \"0\", STR_PAD_LEFT);\n \n }\n }", "title": "" }, { "docid": "6fd33b813289253022cd19c373553afe", "score": "0.5297079", "text": "public function getLastPageIndex(): int;", "title": "" }, { "docid": "0ff3727e847a7f133513d3b241cecf07", "score": "0.52905333", "text": "function GetLastResultId()\n\t{\n\t\treturn $this->db->lastresult;\n\t}", "title": "" }, { "docid": "8a22ca09baf72248299871336b507504", "score": "0.5288076", "text": "function &_getTestData($test_id)\n\t{\n\t\tglobal $ilDB;\n\t\t$result = $ilDB->queryF(\"SELECT * FROM tst_tests WHERE test_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($test_id)\n\t\t);\n\t\tif (!$result->numRows())\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn $ilDB->fetchAssoc($result);\n\t}", "title": "" }, { "docid": "f4c19fcf27f43c3cfd45780c68b82dab", "score": "0.5275847", "text": "public function getLastId();", "title": "" }, { "docid": "f4c19fcf27f43c3cfd45780c68b82dab", "score": "0.5275847", "text": "public function getLastId();", "title": "" }, { "docid": "c96eed2f590671fdc3328ebe9bcef8c5", "score": "0.526656", "text": "function id(): int;", "title": "" }, { "docid": "fc25314c3f3f3320f77617f579e3c242", "score": "0.5260511", "text": "function getCode(): int;", "title": "" }, { "docid": "bf99561a1d00c3d5a058405e52f15bff", "score": "0.5255734", "text": "final function last_gen(): int {\r\n \treturn (int) $this->get_option('last_gen');\r\n }", "title": "" }, { "docid": "afbd0c122e4a4bb4bbb72c0cfe85f388", "score": "0.5255496", "text": "public function getLastId() :int {\n return $this->db->lastId();\n }", "title": "" }, { "docid": "ab74b6c11fa1b995fa90b1eb98323b01", "score": "0.5254685", "text": "public function nowGenerating(): int;", "title": "" }, { "docid": "144179b4eacbf1582298223f56dd1365", "score": "0.52502257", "text": "public function getLastId()\r\n {\r\n $data = $this->select()\r\n ->from($this->_name, array('poi_id'))\r\n ->order('poi_id DESC')\r\n ->limit(1, 0);\r\n $report = $this->fetchRow($data);\r\n $return = $report->toArray();\r\n return $return;\r\n }", "title": "" }, { "docid": "23a0c304b56be6614cbc291236a7b0d9", "score": "0.5248396", "text": "function getNewLastRank( $id_text, $table )\n {\n $sql = \"\n SELECT\n rank\n FROM\n {$this->config->dbTablePrefix}{$table} \n WHERE\n id_text={$id_text}\n ORDER BY \n rank DESC\n LIMIT 1\";\n \n $stmt = $this->model->dba->query($sql);\n\n if($stmt->numRows() == 1)\n {\n $row = $stmt->fetchAssoc();\n return ++$row['rank'];\n }\n return 1; \n }", "title": "" }, { "docid": "81007d44d3d1633c8e6be5aa90edde11", "score": "0.5238699", "text": "function get_id_max_ins()\n\t{\n\t\t$kode = 'INS';\n\t\t$sql = \"SELECT MAX(id_instansi) as max_id FROM tb_instansi\";\n\t\t$row = $this->db->query($sql)->row_array();\n\t\t$max_id = $row['max_id'];\n\t\t$max_no = (int) substr($max_id,4,8);\n\t\t$new_no = $max_no + 1;\n\t\t$new_id_instansi = $kode.sprintf(\"%05s\",$new_no);\n\t\treturn $new_id_instansi;\n\t}", "title": "" }, { "docid": "fe87b946bbb2a21179c8a38171cef3d9", "score": "0.5234819", "text": "public function getLastId() {\n return $this->objDB->insert_id;\n }", "title": "" }, { "docid": "a3517a706e1d41a54a0dd2c3ce2a8984", "score": "0.5233498", "text": "function getUniqueID(){\n\n $maxID = $this->Model->maxFrom('id','tbl_sukarelawan');\n\n return (int) $maxID;\n }", "title": "" }, { "docid": "536eae45a7733d148dd4f516ad958f58", "score": "0.5228658", "text": "public function getCode(): int;", "title": "" }, { "docid": "536eae45a7733d148dd4f516ad958f58", "score": "0.5228658", "text": "public function getCode(): int;", "title": "" }, { "docid": "854951273fe1621f8230c921920b9a1f", "score": "0.5225905", "text": "function getId(int $lastId);", "title": "" }, { "docid": "3232d28810cfb87ebecc9afa25eae485", "score": "0.52029604", "text": "function _getNextSequence( $id_poll ) {\n\t\t\n\t\t\n\t\t//select max sequence number\n\t\tlist($seq) = sql_fetch_row(sql_query(\"\n\t\tSELECT MAX(sequence)\n\t\tFROM \".$GLOBALS['prefix_lms'].\"_pollquest \n\t\tWHERE id_poll = '\".$id_poll.\"'\"));\n\t\treturn ($seq + 1);\n\t}", "title": "" }, { "docid": "8870c8763b12816af2bd7141eaf4749d", "score": "0.52003324", "text": "public function LastID()\r\n {\r\n global $db;\r\n \r\n $Sql = \"SELECT MAX(Id) 'Id' FROM \".$this->TableName;\r\n \r\n try{\r\n $query = $db->prepare($Sql);\r\n $query->execute();\r\n $result['err'] = false;\r\n $result['rows'] = $query->fetch(PDO::FETCH_ASSOC);\r\n \r\n }catch(PDOException $e){\r\n \r\n $result['err'] = true;\r\n $result['msg'] = $e->getMessage();\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "a11a470238a307b6299ad5b0c444f743", "score": "0.51901835", "text": "protected function getUniqueId() {\n $newId = 0;\n for($i = 0;$i < count($this->TaskDataSource);$i++)\n {\n if(isset($this->TaskDataSource[$i])){\n if($this->TaskDataSource[$i]->TaskId >= $newId){\n $newId = $this->TaskDataSource[$i]->TaskId + 1;\n }\n }\n }\n return $newId; // Placeholder return for now\n }", "title": "" }, { "docid": "2f4254468daa3ad0934b8f7988d9a163", "score": "0.5178235", "text": "private function addOrGetTestLabel(){\n $test = Tag::where('name', 'test')->first();\n // if we don't have one add it\n if (!count($test)) {\n $test = Tag::create([\n 'name' => 'test',\n ]);\n }\n\n return $test->id;\n }", "title": "" }, { "docid": "b1f491da1032bab7abbcc9b21610394c", "score": "0.51762897", "text": "function getId() {\n $arr = file_get_contents('../orders.json');\n $arr = json_decode($arr, true); // decode the JSON into an associative array\n $lastId = $arr[count($arr) - 1]['id'];\n return $lastId + 1; // Increments id\n }", "title": "" }, { "docid": "ed9e17501d8b0cbdbe99d8479c78178d", "score": "0.5168563", "text": "public function obtenerUltimoId();", "title": "" }, { "docid": "37d4fbcc36deb28c28610e2ae27718a7", "score": "0.51640797", "text": "function getUniqueID(){\n\n\t\t$maxID = $this->Model->maxFrom('id_kampanye','infokampanye');\n\n\t\treturn (int) $maxID;\n}", "title": "" }, { "docid": "64c1a6b0d538cbede4f771a52237ad22", "score": "0.5161611", "text": "public function getLastId()\n\t{\n\t\treturn $this->adaptor()->getlastId();\n\t}", "title": "" }, { "docid": "7184a776b768c2f519ab664e4aee14d2", "score": "0.5161375", "text": "public function getSrcId(){\n if(!Book::checkIfSrcExists($this))\n {\n $sql = \"SELECT MAX(srcId) AS id \";\n $sql .= \"FROM sources \";\n $sql .= \"WHERE srcType ='\". $this->srcType . \"'\";\n $result = self::$database->prepare($sql);\n $result->execute();\n if(!$result) {\n exit(\"Database query failed.\");\n }\n $result->setFetchMode(PDO::FETCH_ASSOC); \n while($record = $result->fetch()) {\n $srcId = $record['id'];\n }\n return $srcId + 1;\n }else{\n return $this->retrieveSrcID();\n } \n }", "title": "" }, { "docid": "4983e1ba9c5cc99c976742083b73298b", "score": "0.51578134", "text": "function generate_id() {\n $this->last_image_id ++;\n return $this->last_image_id;\n }", "title": "" }, { "docid": "040cf8b3976f02d170a777962e0981c7", "score": "0.5142777", "text": "public function get_last_id($table){\r\n\r\n\t\t #make the initial query\r\n\t\t$link = $this->mydb_connect();\r\n\t\t \r\n\t\t /* Auto field[0] */\r\n\t\t $sql = \"SELECT * FROM \" . $table;\r\n\t\t$ret = pg_query($link, $sql);\r\n\t\t$idseq = pg_field_name($ret, 0);\r\n\t\t\r\n\t\t /* last item */\r\n\t\t$sql = \"SELECT MAX(\".$idseq.\") FROM \".$table.\"\";\r\n\t \r\n\t\t#exec\r\n\t\t$retorno = pg_query($link, $sql);\r\n\t\t\r\n\t\tif(pg_num_rows($ret)>0){\r\n\t\t\t\r\n\t\t\t\t$data = pg_fetch_row($retorno);\r\n\t\t\treturn $data[0]; \r\n\t\t\t\t\r\n\t\t} else {\r\n\t\t\t#case error, returns false\r\n\t\t\treturn false;\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "5e7bd1776bfb93a418ffa0d205af2a21", "score": "0.5141896", "text": "function nextID($table, $id)\n {\n $result = $this->query('SELECT MAX('.$id.') as current_id FROM '.$table);\n $row = $this->fetchObject($result);\n return ($row->current_id + 1);\n }", "title": "" }, { "docid": "68c1ac0a7cfd06893d1f36e500d44486", "score": "0.5141502", "text": "public function obtenerUltimoId(){\n\t\t$this->db = Database::getInstance();\n\t\t$sql=\"SELECT MAX(idNino) AS id FROM nino\";\n\t\t$result = $this->db->get_data($sql);\n\t\treturn $result['DATA'][0]['id'];\n\t}", "title": "" }, { "docid": "0a6b1fca46720089485cdedce00041da", "score": "0.51336354", "text": "function getMaintenanceeLastId(){\n $sql = \"SELECT idMain FROM maintenance ORDER BY idMain ASC\";\n $bornes = pg_query($sql); \n while($maintenance = pg_fetch_object($bornes)):\n $lastid = $maintenance->idMain;\n endwhile;\n return $lastid;\n \n }", "title": "" }, { "docid": "4c697a25e3013cd1b4a6a7bc77e7491f", "score": "0.5133551", "text": "public function getidadmin()\n {\n $query = $this->db->query(\"SELECT max(id_admin) AS max_code FROM tb_admin\");\n $row = $query->row_array();\n\n $max_id = $row['max_code'];\n $max_fix = (int) substr($max_id, 1, 2);\n\n $max_new = $max_fix + 1;\n\n $id = \"A\".sprintf(\"%02s\", $max_new);\n return $id;\n }", "title": "" }, { "docid": "0309a6f3806ef15180d19a5da0ed054e", "score": "0.51218116", "text": "public function getLastId($field,$table){\n try\n {\n $query = \"SELECT \".$field.\" FROM \".$table.\" ORDER BY \".$field.\" DESC LIMIT 1\";\n $result_set = $this->executeQuery($query);\n $number_of_rows = $this->getNumRows($result_set);\n\n if ($number_of_rows==0){\n $last_id = 0;\n return $last_id;\n }\n else{\n //echo $number_of_rows;\n //$result_set->data_seek($number_of_rows-1);\n $last_id_row = $result_set->fetch_row();\n $last_id = $last_id_row[0];\n $last_id_no = substr($last_id,3,strlen($last_id)-1);\n return $last_id_no;\n }\n } catch(Exception $e){\n echo $e;\n }\n\n }", "title": "" }, { "docid": "77bd39aaeaa6340c7e7ecbba38ee4467", "score": "0.51164615", "text": "public function getSolutionId()\n {\n $latestId = 0;\n\n $query = sprintf('\n SELECT\n MAX(solution_id) AS solution_id\n FROM\n %sfaqdata',\n PMF_Db::getTablePrefix()\n );\n\n $result = $this->_config->getDb()->query($query);\n\n if ($result && $row = $this->_config->getDb()->fetchObject($result)) {\n $latestId = $row->solution_id;\n }\n\n if ($latestId < PMF_SOLUTION_ID_START_VALUE) {\n $nextSolutionId = PMF_SOLUTION_ID_START_VALUE;\n } else {\n $nextSolutionId = $latestId + PMF_SOLUTION_ID_INCREMENT_VALUE;\n }\n\n return $nextSolutionId;\n }", "title": "" }, { "docid": "87cf04c95641cec669a27f81afc2a069", "score": "0.5111061", "text": "function _getLastId()\n\t{\n\t\t$query = 'SELECT MAX(id)'\n\t\t\t\t. ' FROM #__flexicontent_fields'\n\t\t\t\t;\n\t\t$this->_db->setQuery($query);\n\t\t$lastid = $this->_db->loadResult();\n\t\t\n\t\treturn (int)$lastid;\n\t}", "title": "" }, { "docid": "f0f05dc2118f4165f3a93d11d7e01e03", "score": "0.5110911", "text": "public function getMaxId(): int\n {\n $sql = 'SELECT max(id) FROM src_table';\n return $this->dbFactory->getSingleNumber('src', $sql);\n }", "title": "" }, { "docid": "53b32fb978ec67a7381c53d74821aa6d", "score": "0.51020014", "text": "public function generateElementId(): int\n\t{\n\t\treturn $this->next_element_id++;\n\t}", "title": "" }, { "docid": "2c350c07370ca4e624c22910914c1776", "score": "0.50899774", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'SAP_ACTIVITY_LOG'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "75d6808c5c068dd9856d860676d4044a", "score": "0.50859696", "text": "public function getLastNr($url)\n {\n $pieces_array = explode('/', $url);\n $end_piece = end($pieces_array);\n $id_pieces = explode('-', $end_piece);\n $last_piece = end($id_pieces);\n $videoId = preg_replace(\"/[^0-9]/\", \"\", $last_piece);\n return $videoId;\n }", "title": "" }, { "docid": "0a2e500f494e9d29ebb65669362ab4ba", "score": "0.50836897", "text": "public function testNextEntryById()\n {\n }", "title": "" }, { "docid": "b1b0a2e210899f97b2ceb2d2c2581c83", "score": "0.5075938", "text": "public function getInsertID() {\n $sqlQuery = 'SELECT MAX(id)+1 from results';\n\n $pdoStatement = $this->dbh->prepare($sqlQuery);\n $pdoStatement->execute();\n $result = $pdoStatement->fetch();\n\n return $result[0];\n }", "title": "" }, { "docid": "393d44df4e42e47917391d895381b4c3", "score": "0.5074553", "text": "function get_next_id() {\n\t\t//$query = \"select count(*) as num from ec_maillists\";\n\t\t//$result = $this->db->query($query);\n\t\t//$num = $this->db->query_result($result,0,'num') + 1;\n\t\t$num = $this->db->getUniqueID(\"ec_maillists\");\n\t\tif($num > 99) return $num;\n\t\telseif($num > 9) return \"0\".$num;\n\t\telse return \"00\".$num;\n\t}", "title": "" }, { "docid": "b149a61b922afea4aa1fa3044922b833", "score": "0.5070984", "text": "public function getTestsIds(){\r\n\t\t\t\r\n\t\t\treturn array_keys($this->aTests);\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "1ee2423820ba1a361c1e70f42d81fe53", "score": "0.50665766", "text": "public function alternative_cpp($id)\n {\n $this->sql = \" SELECT $this->column_id_increment FROM \" . TABLE_ALTERNATIVE_URI;\n $this->result = $this->db->query($this->sql) or die(mysqli_error($this->db));\n while($this->row = mysqli_fetch_array($this->result))\n {\n $this->row[$this->column_id_increment];\n $this->id_cpp++;\n }\n return (int)$this->id_cpp;\n }", "title": "" }, { "docid": "013e2937ccd2934105605b0599b461d4", "score": "0.5064687", "text": "public function getNewNoEolAtEofIdx(): int\n {\n return $this->finalize()->newNoEolAtEofIdx;\n }", "title": "" }, { "docid": "7784e1bf3acba1e931645f49cc1a9cce", "score": "0.50626856", "text": "function getNextId()\n\t{\n\t\t$ids = $this->getCronIDs();\n\t\tif(count($ids) == 0) return 1; // If there are no scripts, use #1\n\t\tasort($ids);\n\t\treturn array_pop($ids)+1;\n\t}", "title": "" }, { "docid": "811a1b2611f349cbf2aaf7121f46a0fe", "score": "0.5051929", "text": "function get_latest_ab_test_id() {\n\t$cache_key = 'variant_latest_id';\n\t$variant_id = get_transient( $cache_key );\n\n\t// We have a cache hit, so lets use that.\n\tif ( false !== $variant_id ) {\n\t\treturn (int) $variant_id;\n\t}\n\n\t$variant_query = new \\WP_Query(\n\t\t[\n\t\t\t'post_type' => 'variant',\n\t\t\t'posts_per_page' => 1,\n\t\t]\n\t);\n\n\tif ( ! empty( $variant_query->posts[0] ) && $variant_query->posts[0] instanceof \\WP_Post ) {\n\t\t$variant_id = $variant_query->posts[0]->ID;\n\t}\n\n\t// Save this to the cache.\n\tset_transient( $cache_key, $variant_id, DAY_IN_SECONDS );\n\n\treturn (int) $variant_id;\n}", "title": "" }, { "docid": "74d8bb29473e61e7db0c31f3e6c55081", "score": "0.50495374", "text": "private function getTaskId(string $fn)\n {\n $class = str_replace('test', '', $fn);\n $class = str_replace('GetResultsByTaskId', '', $class);\n $class = \"BoolXY\\\\DataForSEO\\\\Requests\\\\KeywordsData\\\\\" . $class . \"\\\\GetCompletedTasksRequest\";\n\n do {\n $result = $this->dfs\n ->setRequest($class::create())\n ->get();\n } while (!isset($result->results[0]));\n\n return $result->results[0]->task_id;\n }", "title": "" }, { "docid": "5a1770c078793b4e007049eda2992cb9", "score": "0.5047401", "text": "public function getLastTokenId();", "title": "" }, { "docid": "c2b5d115d791705921f836d162f7bb81", "score": "0.5039591", "text": "public function getLastId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "dc1b8644419f6a86ee57fcb0b8ca4fa9", "score": "0.5038745", "text": "function get_next_id($dbc) {\n\t$query = \"SELECT id FROM stuff ORDER BY id DESC\";\n\t$results = mysqli_query($dbc, $query);\n\tif (!$results)\n\t\treturn 0;\n\t$row = mysqli_fetch_array($results, MYSQLI_ASSOC);\n # Return the id one greater than the highest in the table\n\treturn $row['id'] + 1;\n}", "title": "" }, { "docid": "548c25c877bea9f7a8d40cd31b1c9595", "score": "0.503724", "text": "public function getMainFromSource(int $sourceId): int;", "title": "" }, { "docid": "f5aa07ac52a1367952e213f598e57984", "score": "0.5036532", "text": "abstract public function getTestCount(): int;", "title": "" }, { "docid": "26ebe99402de49a9c174bd4cb2ee6d02", "score": "0.50298244", "text": "public function getId(){\n $id = Cantones::whereRaw('id > ? or deleted_at <> null', [0])->get();\n $next = count($id);\n if($next > 0 ){\n $next+=1;\n }else\n $next =1;\n return $next;\n }", "title": "" }, { "docid": "771808b43d39e513bcebe5577ba40634", "score": "0.50220466", "text": "public static function getRandomID()\n {\n $code = DataHelper::getRandomNumber();\n $model = (new \\yii\\db\\Query())\n ->from('m_repository_report')\n ->where('code='. $code)\n ->one();\n if (!$model) {\n return $code;\n }\n return RepositoryReportHelper::getRandomID();\n }", "title": "" }, { "docid": "7bbcd6c1e464ad39953d1e27feb960c0", "score": "0.5016407", "text": "function getNextRequestID(){\n\tglobal $DB;\n\t\n\tif($DB->query(\"SELECT counter FROM id_counter WHERE idType = '0'\")){\n\t\treturn $DB->results();\n\t}\n\t\n\telse{\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "35af2d42511d4b9162b2eaa98789780f", "score": "0.4998091", "text": "public function getLastId()\n {\n return $this->brandMapper->getMaxId();\n }", "title": "" }, { "docid": "abd8a59245d23e58870a73cd35bd76ba", "score": "0.49910277", "text": "public function getUltimoIdResultado(){\r\n\t\r\n\t\t//Preparacion del query\r\n\t\t//echo \"pasa\";\r\n\t\t$sql=\"SELECT id_resultados FROM resultados ORDER by id_resultados DESC\";\r\n\t\t$result=$this->vConexion->ExecuteQuery($sql);\r\n\t\t$row=$this->vConexion->GetArrayInfo($result);\r\n\t\treturn $row['id_resultados'];\r\n\t\t\r\n\t\r\n\t}", "title": "" }, { "docid": "b77f067914531e4fd46181fd293c4c79", "score": "0.49856412", "text": "private function genRefno()\n {\n $code = time() . mt_rand(0, 1000000);\n return sha1($code);\n }", "title": "" }, { "docid": "7bb010d0b85bd9948409bce208a52528", "score": "0.49841073", "text": "public function getNextTestFromQueue()\n {\n $query = QueueModel::join('tddd_tests', 'tddd_tests.id', '=', 'tddd_queue.test_id')\n ->where('tddd_tests.enabled', true)\n ->where('tddd_tests.state', '!=', Constants::STATE_RUNNING);\n\n if (!$queue = $query->first()) {\n return;\n }\n\n return $queue->test;\n }", "title": "" }, { "docid": "477e9d6906ca9d47803a33ab133b422c", "score": "0.49725607", "text": "public function getLastInsertId(): string;", "title": "" }, { "docid": "ed26884eecf617928030585874a86504", "score": "0.4971596", "text": "protected function _getIdentifier() {\n\t\t$this->_mhtmlLocationIndex++;\n\t\treturn $this->_indexToChars($this->_mhtmlLocationIndex);\n\t}", "title": "" }, { "docid": "1480875487896a2a67fb04f5e527ba9b", "score": "0.49697348", "text": "public function getFailedTestsCount(): int;", "title": "" }, { "docid": "9b5d898f11b5727b501d039e227ab9f3", "score": "0.4961456", "text": "public function getCode() : int\n\t{\n\t}", "title": "" }, { "docid": "bd84d92b7a0aecb51f3ff36cb7787f7f", "score": "0.4961347", "text": "public function get_next_id()\n {\n $sql = 'SELECT MAX(itemID)+1 FROM '.PERCH_DB_PREFIX.'collection_revisions';\n $r = $this->db->get_count($sql);\n \n if ($r==0) $r++;\n \n return $r;\n }", "title": "" }, { "docid": "3c7485127dd2d12218967b720bbe3e9c", "score": "0.4956967", "text": "public function getLastId()\n {\n try {\n $rq = $this->adodb->prepare('SELECT LASTVAL()');\n $rq->execute();\n\n return $rq->fetchColumn();\n }\n catch (ADODB_Exception $e) {\n return 0;\n }\n }", "title": "" }, { "docid": "af6d6d1566a09240b8958370905ba3f7", "score": "0.4952205", "text": "public function setTrialNumber()\n {\n $matrixset = matrix::where('id','1')->first();\n $lastnumber = $matrixset->trial_number;\n $newnumber = $lastnumber+1;\n //set new trial number\n matrix::where('id',1)->update([\n 'trial_number' => $newnumber\n ]);\n return $newnumber;\n }", "title": "" }, { "docid": "c8b1a4a5c1de65cda4bbfb280116684f", "score": "0.49510416", "text": "function getLastContest()\n{\n\t$ipNum = getIPNumber($_SERVER['REMOTE_ADDR']);\t\t\n\t\t\n\t// get the country code\n\t$cc = getCountryCode($ipNum);\n\t$db = DBConnect();\n\t$sql = \"SELECT `ID` from `contest` WHERE `country`=\" . safe($cc) . \" AND `winnerChosen`=1 ORDER BY `dateClosed` DESC LIMIT 1\";\n\t\n\t$result = mysql_query($sql, $db);\n\tif ($result)\n\t{\n\t\t$row=mysql_fetch_array($result);\n\t\t$contestID = $row[\"ID\"];\n\t}\n\telse\n\t{\n\t\t$contestID = 0;\n\t}\n\treturn $contestID;\n}", "title": "" }, { "docid": "a2ed57a277e6120fe5d0fa4e3cb5f327", "score": "0.4949757", "text": "public function getIdentifyingTest()\n {\n return $this->identifyingTest;\n }", "title": "" }, { "docid": "f8ceab6bf99a5923234af70821d536db", "score": "0.49497426", "text": "public function lastId()\n {\n return $this->lastId;\n }", "title": "" }, { "docid": "1662d61ddacbc6b5c605927848c662ec", "score": "0.49489474", "text": "public static function lastFindIndex($index = null)\n {\n if ($index !== null) {\n static::$_index = $index;\n }\n return static::$_index;\n }", "title": "" } ]
284660cf202de72ce3e3f706ba353771
checks existence of properties and related components
[ { "docid": "f568f534324df4ac96eacf411009f8e2", "score": "0.0", "text": "public function hasRelation($fieldName)\n {\n if (isset($this->_data[$fieldName]) || isset($this->_id[$fieldName])) {\n return true;\n }\n return $this->_table->hasRelation($fieldName);\n }", "title": "" } ]
[ { "docid": "6f51105c485683b66e81e4ed1e0e7bf1", "score": "0.7448841", "text": "public function hasProperties();", "title": "" }, { "docid": "ec81a7505b979ac1d9f686a4b928ab46", "score": "0.721319", "text": "public function hasPropertyContent();", "title": "" }, { "docid": "9fdf8bbfe6dbede309e2671956210fb8", "score": "0.7044548", "text": "public function has_prop() { return true; }", "title": "" }, { "docid": "670c2cddec2bc6a17a9388f78492eb83", "score": "0.6705659", "text": "function property_exists($class, $property)\n{\n}", "title": "" }, { "docid": "12de3f19571b555130508032f96836b5", "score": "0.6649201", "text": "public function hasProperty($name){}", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.6537894", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.6537894", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.6537894", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.6537894", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "7012c1fc1242ec0baaf24adc5537680f", "score": "0.63545", "text": "public function hasProperty(string $name): bool;", "title": "" }, { "docid": "2561b67ded1d958301f22f66fe392c09", "score": "0.6352154", "text": "public function hasProperty($name) {\n return $this->test('properties', $name);\n }", "title": "" }, { "docid": "a86720a8c2b43930dc7dbb9147924a66", "score": "0.6292138", "text": "private function has_the_attribute($key){\r\n $object_properties = get_object_vars($this);//zwraca tablice \r\n return array_key_exists($key,$object_properties);//Sprawdzenie które wyżuca false lub true\r\n }", "title": "" }, { "docid": "df7a86256e18a079ea09604e5df7d44f", "score": "0.6250489", "text": "public function has($key) { return property_exists($this, $key); }", "title": "" }, { "docid": "6ce10d1241dfcd45ece416290907f7a3", "score": "0.6170878", "text": "private function isNeededProperty($property) {\n /* Unreadable:\n $is_set = isset($this->NEEDED_PROPERTIES);\n return $is_set === FALSE || ($is_set === TRUE\n && in_array($property['name'], $this->NEEDED_PROPERTIES));\n */\n\n /* Readable: */\n if(!isset($this->NEEDED_PROPERTIES) || !$this->NEEDED_PROPERTIES) {\n // No needed properties where specified, therefore ALL properties are needed\n return true;\n } else {\n // Needed properties is not set, then check\n return in_array($property['name'], $this->NEEDED_PROPERTIES);\n }\n }", "title": "" }, { "docid": "08d0f2a1763afa64b583bd786b8ca3bd", "score": "0.61459947", "text": "private static function _verifyProperties($obj = null) {\r\n $obj = null === $obj ? self::_instantiateThisObject() : $obj;\r\n return property_exists($obj, '_dbTable') && property_exists($obj, '_dbMap') && property_exists($obj, '_dbPrimaryKey');\r\n }", "title": "" }, { "docid": "6d2173633dbafb21c140620e11e0f817", "score": "0.6127964", "text": "public static function doesPropertyExist(PropertyExistenceProviderEvent $event): ?bool;", "title": "" }, { "docid": "0701b708bc8e8a1762c8576c969abe57", "score": "0.60967124", "text": "public function has(string ...$props): bool\n {\n foreach ($props as $prop) {\n if (!array_key_exists(strtolower($prop), $this->props)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "c5d61f063611dc4f49691a779ebb9a37", "score": "0.60926247", "text": "public function hasProperty($propertyIdent);", "title": "" }, { "docid": "61540e144e9ec9bd37806ee22aa76c68", "score": "0.60877305", "text": "private function checkMetadataUsage() {\n $propertyList = $this->doc->xpath('//item/properties/property');\n\n $errorMsg = '';\n \n // Check the values set to the properties\n foreach ($propertyList as $property) {\n $item_nodes = $property->xpath('../..');\n $item_name = $item_nodes[0]->properties->title;\n $title = (string)$property['title'];\n \n if (isset($this->metadataMap[$title])) {\n $metadataDef = $this->metadataMap[$title];\n $type = $metadataDef['type'];\n switch ($type) {\n case PLUGIN_DOCMAN_METADATA_TYPE_LIST:\n $values = $property->value;\n\n // Check if the defined values exist\n foreach ($values as $value) {\n if (!isset($metadataDef['values'][(string)$value])) {\n $errorMsg .= \"Item '$item_name':\\tThe list property '$title' is set to an incorrect value: '$value'\".PHP_EOL;\n }\n }\n\n // Check that just one value is given to a list that allow only one value\n if (count($values) > 1 && !$metadataDef['isMultipleValuesAllowed']) {\n $errorMsg .= \"Item '$item_name':\\tThe list property '$title' allows only one value, but \".count($values).\" values are given.\".PHP_EOL;\n }\n // Check if no value is given to a list that require a value\n else if (count($values) == 0 && !$metadataDef['isEmptyAllowed']) {\n $errorMsg .= \"Item '$item_name':\\tThe list property '$title' is required, but no <value> element is found.\".PHP_EOL;\n }\n }\n } else {\n $errorMsg .= \"Item '$item_name':\\tThe property '$title' is not defined in a 'propdef' element.\".PHP_EOL;\n }\n }\n\n // Check if no value is set to a property that require a value\n $propertiesList = $this->doc->xpath(\"//item[@type!='folder']/properties\");\n\n // Build the list of all required properties\n $requiredProperties = array();\n foreach ($this->metadataMap as $metadataName => $metadataDef) {\n if (!$metadataDef['isEmptyAllowed']) {\n $requiredProperties[] = $metadataName;\n }\n }\n\n // Iterate over the required properties\n foreach ($requiredProperties as $requiredProperty) {\n // Iterate over the <properties> nodes (folders are not included)\n foreach ($propertiesList as $properties) {\n $item_name = $properties->title;\n $searchedProperty = $properties->xpath(\"property[@title='$requiredProperty']\");\n if (count($searchedProperty) == 0) {\n $errorMsg .= \"Item '$item_name':\\tThe required property '$requiredProperty' is not set.\".PHP_EOL;\n } else if ((string)$searchedProperty[0] == '') {\n $errorMsg .= \"Item '$item_name':\\tThe required property '$requiredProperty' is set to an empty value.\".PHP_EOL;\n }\n }\n }\n\n if ($errorMsg != '') {\n $this->exitError($errorMsg);\n }\n }", "title": "" }, { "docid": "1f55abd2021eed1ab9255ec120d8ba81", "score": "0.60761803", "text": "public function hasProp($props, $name) {\n $prop = $this->getProp($props, $name, null);\n return !is_null($prop) && !empty($prop);\n }", "title": "" }, { "docid": "881aa4bc72ad53955960786be3d0c267", "score": "0.60594356", "text": "public function hasProperty($property);", "title": "" }, { "docid": "58ff18d828129a478fe5ef7c85b9c964", "score": "0.6005084", "text": "function hasProperty($property)\n\t{\n\t\treturn property_exists($this,$property);\n\t}", "title": "" }, { "docid": "7483dce66ef741d97aff60fe7f2eb189", "score": "0.60035914", "text": "protected function checkRequirements() {\n $required_properties = array('apiVersion', 'coreVersion', 'makeFile');\n foreach ($required_properties as $required_property) {\n if (empty($this->$required_property)) {\n throw new \\BuildException(\"Missing required property '$required_property'.\");\n }\n }\n }", "title": "" }, { "docid": "92996315bbfe5c5c421498c442f32237", "score": "0.5968355", "text": "public function has($property) : bool;", "title": "" }, { "docid": "66cdaf782729b3ea1e77237d36bef76c", "score": "0.59545916", "text": "public function hasPropertyFilter(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "99828372e8058fd29e70ff9be3fbb530", "score": "0.59470254", "text": "public function __isset($prop) {\n return isset($this->{$prop}) || isset($this->container[$prop]);\n }", "title": "" }, { "docid": "8ad12d9308f23be8f2de5360b4cbc0c1", "score": "0.59443617", "text": "public function __isset($property) { return isset($this->bundles[$property]); }", "title": "" }, { "docid": "0d62454afd9a0e93c265bcfb561bcc42", "score": "0.5926109", "text": "abstract protected function properties();", "title": "" }, { "docid": "0d62454afd9a0e93c265bcfb561bcc42", "score": "0.5926109", "text": "abstract protected function properties();", "title": "" }, { "docid": "35b8c416cdf45aa93b80d7029397a542", "score": "0.592206", "text": "function object_contains_property($prop, $obj) {\n\n if (!$obj[$prop]) {\n\n return false;\n\n }\n\n return true;\n\n}", "title": "" }, { "docid": "77aa8cf9da29f3e1372cf49a5a4868df", "score": "0.5914114", "text": "public function __isset($property_name);", "title": "" }, { "docid": "e0627efdc38865377f0d09ba830d9958", "score": "0.5897489", "text": "protected abstract function properties();", "title": "" }, { "docid": "2d18222d80e6bdedef5fdfdcd0405bef", "score": "0.589503", "text": "public function hasProperty($property)\r\n {\r\n return (array_key_exists($property, get_object_vars($this)));\r\n }", "title": "" }, { "docid": "c8aba71cbba23028560f21a45c852983", "score": "0.5860208", "text": "public function hasPropertiesFilter() {\n\t\treturn !is_null($this->propertiesFilters);\n\t}", "title": "" }, { "docid": "bfa2517b4033cb01f0afb900664e3b6b", "score": "0.58509046", "text": "private function _checkSetup()\n\t{\n\t\t$this->_checkMember('_entityClass');\n\t\t$this->_checkMember('_dataMapperClass');\n\t\t$this->_checkMember('_primaryKey');\n\t\t$this->_checkMember('_singular');\n\t\t$this->_checkMember('_plural');\n\t}", "title": "" }, { "docid": "138c5b9a9743a95776116903ba143076", "score": "0.58457583", "text": "public function hasProperty(string $key): bool\n {\n return array_key_exists($key, $this->properties);\n }", "title": "" }, { "docid": "0148ecec3815786090a67ac630d3812d", "score": "0.5845727", "text": "public function valid(): bool {\n return false !== current($this->props);\n }", "title": "" }, { "docid": "461a7108f04a1045ea90c1061de9a271", "score": "0.5825841", "text": "public function __isset( $prop ) {\n return isset( $this->{$prop} ) || isset( $this->container[ $prop ] );\n }", "title": "" }, { "docid": "62b441bf8a6956207d43ba06f0e888d7", "score": "0.58118033", "text": "function checkInitializedAndInitMissing();", "title": "" }, { "docid": "39a5e9ef044756f7e8ee75cdfa01bad7", "score": "0.5772074", "text": "private function hasProperty($name)\n {\n $this->canGetProperty();\n return $this->reflector->hasProperty($name);\n }", "title": "" }, { "docid": "00f99b047fa7bcb23b228a9d7c939793", "score": "0.57718325", "text": "protected final function _propertyExists($property)\n {\n return array_key_exists($property, $this->_getObjectVars());\n }", "title": "" }, { "docid": "27ad38d14d8d488ae54debca02338d8e", "score": "0.5761034", "text": "public function __isset( $objProp ) {\n if( '_file_template_year' === $objProp ) {\n return ( isset( $this->_file_template_year ) );\n }\n\n if( '_additional_js_urls' === $objProp\n || '_additional_js' == $objProp\n ) {\n return ( 0 === count( $this->_additional_js_urls ) ) ? false : true;\n }\n\n if( '_additional_css_urls' === $objProp\n || '_additional_css' == $objProp\n ) {\n return ( 0 === count( $this->_additional_css_urls ) ) ? false : true;\n }\n\n if( 'include_header' === $objProp ) {\n return true;\n }\n\n if( 'include_footer' === $objProp ) {\n return true;\n }\n \n // body content\n if( '_content_to_render' === $objProp ) {\n return ( 0 === count( $this->_content_to_render ) ) ? false : true;\n }\n else {\n // to check for a value in CSS or JS, pass in an array; e.g.: \n // array( 'css' => \"url\",\n // 'js' => \"url\" )\n if( true === is_array( $objProp ) ) {\n reset( $objProp );\n while( list( $key, $value ) = each( $objProp ) ) {\n switch( $key ) {\n case 'js' :\n case '_additional_js' :\n return ( true === is_string( $value ) )\n ? ( in_array( $value, $this->_additional_js_urls ) )\n : false ;\n break;\n case 'css' :\n case '_additional_css' :\n return ( true === is_string( $value ) )\n ? ( in_array( $value, $this->_additional_css_urls ) )\n : false ;\n break;\n default :\n return $this->__isset( $key );\n break;\n }\n }\n }\n else {\n return ( false === array_key_exists( strtolower( \"$objProp\" ), $this->_content_to_render ) )\n ? false : true;\n }\n }\n }", "title": "" }, { "docid": "5b7025db6e8c9f5a3b10314daf9ce5e4", "score": "0.57538956", "text": "private function has_the_attribute($the_attribute){\n \n $object_properties = get_object_vars($this); //Function get_object_vars\n \n return array_key_exists($the_attribute, $object_properties);\n }", "title": "" }, { "docid": "94b88d681233669022e536230a3659f0", "score": "0.57538825", "text": "public function __isset($property) {\n switch ($property) {\n case 'url':\n case 'title':\n case 'sublinks':\n case 'selected':\n return true;\n default:\n return $this->has_sublink($property);\n }\n }", "title": "" }, { "docid": "ba6878eb8305305f9ae8574fafa5ce4c", "score": "0.5750067", "text": "public function __isset($key)\n {\n return array_key_exists($key, $this->properties);\n }", "title": "" }, { "docid": "d6b7220226a66c8251438d5cf659e8dc", "score": "0.5741333", "text": "function getProperty($name, $property) {return false;}", "title": "" }, { "docid": "00dfa55410c8c8dfcf8c4fdbb0160038", "score": "0.57361233", "text": "protected function isPropertyAvailable($property, $data)\n {\n return isset($data[$property]) && $data[$property] !== '';\n }", "title": "" }, { "docid": "d224f7ad648020faabc4052937a68995", "score": "0.57249296", "text": "public function hasProperty($name) {\n\t\treturn isset($this->properties[$name]);\n\t}", "title": "" }, { "docid": "e4e548df00b8b2ed459bb9d638f8964f", "score": "0.5709809", "text": "protected function hasProperty($prop) {\n return property_exists( $this->studentSessionDetails, $prop);\n }", "title": "" }, { "docid": "1bbbe2317a99c1dfcf89104bf93c5b3b", "score": "0.57094204", "text": "public function hasProperty(string $name): bool\n {\n return isset($this->properties[$name]);\n }", "title": "" }, { "docid": "76464ce1e03873bad41502742b8c28bb", "score": "0.56979394", "text": "private function checkRequiredProperties(array $properties, \\stdClass $schema, $path)\n {\n if (isset($schema->required))\n {\n foreach ((array)$schema->required as $property)\n {\n if (!array_key_exists($property, $properties))\n {\n $this->reason['details'][] = 'Object \"' . $path . '\" does not have the required property \"' . $property . '\".';\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "a7b6f489c0e267e5001872cbfe9a6393", "score": "0.56976044", "text": "function check_component()\n\t{\n\t\t$this->db->where('name', $this->data['name']);\n\t\t$query = $this->db->get('salary');\n\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "1bad631f554ccf0939a889ee4d419597", "score": "0.56881136", "text": "protected function hasProperty($property)\n {\n return property_exists($this->properties, $property) || property_exists($this->properties, \"U_$property\");\n }", "title": "" }, { "docid": "311cb5590c9dde3bb88efca70ee7429e", "score": "0.5687886", "text": "public function hasProperty(string $property): bool {\n return isset($this->props[$property]);\n }", "title": "" }, { "docid": "b4cd737384907ef32b1cf49ba59591a0", "score": "0.568081", "text": "protected function componentExists()\n {\n return $this->files->exists($this->componentPath());\n }", "title": "" }, { "docid": "87cc879999244968c2b829cbc277c30c", "score": "0.56749445", "text": "private function isProperty(Node $node): bool\n {\n return (bool) ($node instanceof Node\\Stmt\\PropertyProperty);\n }", "title": "" }, { "docid": "ace46e2190e330bbf8eb1966e09ad9d2", "score": "0.56668276", "text": "protected function validateProperties(){\n // Trim string based on table schema\n $this->trimProperties();\n\n $this->isValid($this::getPropertySettings());\n }", "title": "" }, { "docid": "5037dbe4ff9aa7c65e4c832ad11db4b7", "score": "0.566574", "text": "private function _checkExists()\n {\n global $beanList;\n if (isset($beanList[$this->_name])) {\n // existing relationship\n throw new Exception($this->_name . \" module already exists in this sugar instance \\n\");\n }\n }", "title": "" }, { "docid": "2693248410e7840bc83f1a754dc28557", "score": "0.5665427", "text": "public static function hasDynamicProperty($name);", "title": "" }, { "docid": "ad722d372c18bf6002cacb79a5fd25ab", "score": "0.5658874", "text": "#[@test]\n public function hasSection() {\n $p= Properties::fromString('\n[section]\nfoo=bar\n ');\n \n $this->assertTrue($p->hasSection('section'));\n $this->assertFalse($p->hasSection('nonexistant'));\n }", "title": "" }, { "docid": "a4cac118cecb3d65a6f23890f4d2affe", "score": "0.5650528", "text": "public function __isset($property) {\n switch ($property) {\n case 'title':\n case 'menu':\n return true;\n default:\n return false;\n }\n }", "title": "" }, { "docid": "41bfa9541fd189d0d5a41d71ede78919", "score": "0.56452066", "text": "public function checkIfPropertyExists($property, $class)\n {\n $message = \"EkStripePayment Exception: Unknown property '$property'. \";\n $message .= \"To list valid properties, open SetGetContract class\"; \n\n if (!isset($class->{$property})) {\n throw new StripeException($message); \n } \n \n return true;\n }", "title": "" }, { "docid": "bfb523d100a1f0df361429951bb1d07c", "score": "0.56313646", "text": "public function __isset($key)\n\t{\n\t\treturn array_key_exists($key, $this->props);\n\t}", "title": "" }, { "docid": "ba21281a0e60411b5ae222f391c5b725", "score": "0.56300545", "text": "protected function isPropertyInitialized(DataModelProperty $property)\n {\n $propName = $property->getName();\n\n if (isset($this->{$propName})) {\n return true;\n }\n\n // this will result in either a null value or not initialized error\n try {\n if (is_null($this->{$propName})) {\n return true;\n }\n } catch (Error) {\n return false;\n }\n }", "title": "" }, { "docid": "a6f05fe30fcf9df8f04aaf23a99ea62f", "score": "0.5615231", "text": "public function hasProperty($name) {\n return isset($this->export[$name]);\n }", "title": "" }, { "docid": "ad67bd65697029471d27303565fdd9b6", "score": "0.56044704", "text": "function hasProperty($property, $value = null)\r\n\t{\r\n\t\t$ret= $this->model->findFirstMatchingStatement($this,$property,$value);\r\n\t\t\r\n\t\treturn ($ret!==null);\t\r\n\t}", "title": "" }, { "docid": "e58d5a3d9ecafb3115ab1ab47378f425", "score": "0.5597347", "text": "public function __isset($key)\n {\n if (!array_key_exists($key, $this->properties)) {\n return false;\n }\n return !is_null($this->properties[$key][0]);\n }", "title": "" }, { "docid": "0e96e420e9e598d5dcfd5d536383f4f9", "score": "0.55855334", "text": "public function hasPath() {\n return $this->components['path'] !== '';\n }", "title": "" }, { "docid": "de934dd527ad23086954d425ea026b94", "score": "0.55826694", "text": "function __isset($property)\n\t{\n\t\t$retval = FALSE;\n\n\t\tif (property_exists($this, $property)) {\n\t\t\t$retval = isset($this->$property);\n\t\t}\n\t\telseif ($this->is_wrapper() && property_exists($this->_wrapped_instance, $property)) {\n\t\t\t$retval = isset($this->$property);\n\t\t}\n\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "3b5dc09b5bbf28ae56f2ad4645236aa5", "score": "0.5570869", "text": "public function HasProperty(IProperty $Property);", "title": "" }, { "docid": "65827a74448f5ba33855de26f923b04f", "score": "0.5568572", "text": "public function check( $property = null )\n\t{\n\t\t//the full property is the global check, that something exists\n\t\tif (is_null($property))\n\t\t{\n\t\t\t$property = 'full';\n\t\t}\n\t\t\n\t\t//checking the property values\n\t\tif (!isset($this->$property)) return false;\n\t\tif (is_null($this->$property)) return false;\n\t\tif (strlen(trim($this->$property)) < 1) return false;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7a2bfc74e5d793b5ce6bc79da21c81aa", "score": "0.55458087", "text": "public function hasProperty($key) {\n if ( array_key_exists($key, $this->_data))\n return true;\n\n return false;\n }", "title": "" }, { "docid": "32ac87b5f14f15cfb8c6323cb9b50258", "score": "0.5542118", "text": "private function checkProperties(array $properties, \\stdClass $schema, $path)\n {\n $validProperties = [];\n if (isset($schema->patternProperties))\n {\n foreach ((array)$schema->patternProperties as $pattern => $newSchema)\n {\n foreach ($properties as $property => $value)\n {\n if (preg_match($pattern, $property) && empty($validProperties[$property])) $validProperties[$property] = $newSchema;\n }\n }\n }\n foreach ($properties as $property => $value)\n {\n if (isset($schema->properties) && property_exists($schema->properties, $property)) \n {\n if (!$this->checkType($value, $this->resolveRef($schema->properties->{$property}), $path . '.' . $property)) return false;\n }\n else if (isset($validProperties[$property]))\n {\n if (!$this->checkType($value, $this->resolveRef($validProperties[$property]), $path . '.' . $property)) return false;\n }\n else if (isset($schema->additionalProperties))\n {\n if ($schema->additionalProperties === false)\n {\n $this->reason['details'][] = 'Property \"' . $path . '.' . $property . '\" is not defined and the definition does not allow additional properties.';\n return false;\n }\n if (is_object($schema->additionalProperties))\n {\n if (!$this->checkType($value, $this->resolveRef($schema->additionalProperties), $path . '.' . $property)) return false; \n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "71a915bc452cbc11ac754791c270b162", "score": "0.55399394", "text": "public function offsetExists($property_name){}", "title": "" }, { "docid": "078fb41db3940c7f4ac015c236c1ab2d", "score": "0.5538946", "text": "private function has(string $property): bool\n {\n return $this->resolveProperty($property) !== null;\n }", "title": "" }, { "docid": "ea45dfa5877300ef9c4ad854bf04ded5", "score": "0.5524982", "text": "public function valid()\n {\n\n if ($this->container['property_code'] === null) {\n return false;\n }\n if ($this->container['property_name'] === null) {\n return false;\n }\n if ($this->container['location'] === null) {\n return false;\n }\n if ($this->container['total_price'] === null) {\n return false;\n }\n if ($this->container['min_daily_rate'] === null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "fdc7e41381c90f633fa13263570dbb8e", "score": "0.55248797", "text": "public function testGetNonExistantProperty()\n {\n $ref = new \\ReflectionProperty(get_class($this->app), 'container');\n $ref->setAccessible(true);\n\n $container = $ref->getValue($this->app);\n\n $this->assertSame($container['console'], $this->app->console);\n\n $this->setExpectedException(\n \\RuntimeException::class,\n 'Getting a non-existant property on ' . \\Lemon\\Cli\\App::class\n );\n\n $this->app->nonExistantProperty;\n }", "title": "" }, { "docid": "9b2271dee1ed01f238116653bc721975", "score": "0.55051863", "text": "function getProperties(){}", "title": "" }, { "docid": "496ac6335118997551dde12e8838a6c2", "score": "0.5497814", "text": "public function isProperty($name) {\n\t\treturn array_key_exists($name, $this->definition->getColumnMap());\n\t}", "title": "" }, { "docid": "fdbe69c5352019865854d76110899caf", "score": "0.54977334", "text": "public function __isset($prop)\n\t{\n\t\treturn isset($this->attributes[$pro]);\n\t}", "title": "" }, { "docid": "d42ad04ba8a62cef1a40fdef9f9fff23", "score": "0.5495452", "text": "public function testValidProperty(): void\n {\n // First time the object must be created.\n $dl1 = $this->kernel->DL;\n self::assertInstanceOf(\\stdClass::class, $dl1);\n\n // Second time must return the same object.\n $dl2 = $this->kernel->DL;\n self::assertSame($dl1, $dl2);\n\n // Getter must be called only once.\n self::assertSame(1, $this->kernel->dlCount);\n }", "title": "" }, { "docid": "a5f01fd66ea058c691428e5a663bbc60", "score": "0.549333", "text": "public function isPropertyRequired($name, $type);", "title": "" }, { "docid": "a5f01fd66ea058c691428e5a663bbc60", "score": "0.549333", "text": "public function isPropertyRequired($name, $type);", "title": "" }, { "docid": "80f90fc5887eb6a183cbf42d5c582640", "score": "0.5489104", "text": "public function __isset($property) {\n switch ($property) {\n case 'attrs':\n case 'attributes':\n return true;\n default:\n return method_exists($this, \"get_$property\") || isset($this[$property]);\n }\n }", "title": "" }, { "docid": "f16c0e2f1bffbe321a8e07e50f2e640f", "score": "0.5475524", "text": "public function hasValueProperties()\n {\n return $this->get(self::VALUE_PROPERTIES) !== null;\n }", "title": "" }, { "docid": "9a9112dc5f24cf8c79a4367eb72f56bd", "score": "0.54660237", "text": "public function testHasOwnProperty() {\r\n $this->assertTrue($this->_config->hasOwnProperty('root'));\r\n $this->assertFalse($this->_config->hasOwnProperty('test'));\r\n }", "title": "" }, { "docid": "f006f6f7057ae9be7aacaa49b5723249", "score": "0.5465238", "text": "public function __isset($property)\r\n {\r\n return (in_array($property, $this->attributes, true));\r\n }", "title": "" }, { "docid": "5e2fb0a20112c5f54f687a83fe4bae36", "score": "0.54627144", "text": "public function testConfigHas()\n {\n $result = \\Barebone\\Config::exists('I_DONT_EXIST');\n $this->assertFalse($result);\n\n // property exists = true\n $result = \\Barebone\\Config::exists('mysql');\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "85cb11118c76ab438e99df2e65420402", "score": "0.5460309", "text": "protected function is_valid( $property = 'all' ) {\n return true;\n }", "title": "" }, { "docid": "7701c61a6ea2fab99dc28448db224c98", "score": "0.54589885", "text": "public function isPropFind()\n\t{\n\t\treturn ($this->method === self::METHOD_PROPFIND);\n\t}", "title": "" }, { "docid": "51d9000a4cc1bb55c89458e1b994cf30", "score": "0.5455857", "text": "public function isEmptyOnTranslate(\\ReflectionProperty $property): bool\n {\n return [] !== $property->getAttributes(EmptyOnTranslate::class, \\ReflectionAttribute::IS_INSTANCEOF);\n }", "title": "" }, { "docid": "3e56925672cf55ec355d0864e044bb90", "score": "0.5452094", "text": "public function exists($key)\n\t{\n\t\treturn property_exists($this, $key);\n\t}", "title": "" }, { "docid": "af8d078f56d6a232f6d38a0037be34ea", "score": "0.54443014", "text": "public static function hasGetter ($phpClassName, $property) {\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:110: lines 110-111\r\n\t\tif (!(\\class_exists($phpClassName) || \\interface_exists($phpClassName))) {\r\n\t\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:111: characters 4-16\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:113: characters 3-19\r\n\t\t$has = false;\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:114: characters 3-72\r\n\t\t$phpClassName1 = $phpClassName;\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:115: lines 115-118\r\n\t\twhile (true) {\r\n\t\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:116: characters 4-55\r\n\t\t\t$has = isset(Boot::$getters[$phpClassName1][$property]);\r\n\t\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:117: characters 4-56\r\n\t\t\t$phpClassName1 = \\get_parent_class($phpClassName1);\r\n\t\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:115: lines 115-118\r\n\t\t\tif (!(!$has && ($phpClassName1 !== false) && \\class_exists($phpClassName1))) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/Boot.hx:120: characters 3-13\r\n\t\treturn $has;\r\n\t}", "title": "" }, { "docid": "138c8093cbb96c69d760e00e837a3327", "score": "0.54327893", "text": "public function valid()\n {\n\n if ($this->container['count'] === null) {\n return false;\n }\n if ($this->container['label'] === null) {\n return false;\n }\n if ($this->container['icon'] === null) {\n return false;\n }\n if ($this->container['is_new'] === null) {\n return false;\n }\n if ($this->container['route'] === null) {\n return false;\n }\n if ($this->container['url'] === null) {\n return false;\n }\n if ($this->container['target'] === null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "65b3018e44bd1902c204471c0ab72f21", "score": "0.54234684", "text": "public function __isset($arg_property_name) {\r\n\t\treturn isset($this->__properties[$arg_property_name]);\r\n\t}", "title": "" }, { "docid": "b5704a2867f9aa66629ca43455273e92", "score": "0.5420417", "text": "public function valid()\n {\n\n if ($this->container['involved_object'] === null) {\n return false;\n }\n if ($this->container['metadata'] === null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "16412dbfc1237e405fb60a1b0a6f7f94", "score": "0.5416127", "text": "public function __isset($key)\n {\n return isset($this->_properties[$key]);\n }", "title": "" }, { "docid": "4b36c3a9b5472dfad5983680083c526a", "score": "0.5410882", "text": "public function test_form_getPropertyTypes() {\n $propertyTypes = MMFormHelper::getPropertyTypes();\n\n $this->assertCount(3, $propertyTypes);\n\n $this->assertContains('-- Select --', $propertyTypes);\n $this->assertContains('Apartment', $propertyTypes);\n $this->assertContains('Shop', $propertyTypes);\n\n $this->assertArrayHasKey('apartment', $propertyTypes);\n $this->assertArrayHasKey('shop', $propertyTypes);\n unset($propertyTypes);\n }", "title": "" }, { "docid": "c97e888111de79090fcebe14c54581fb", "score": "0.5403", "text": "public function testForProperties(): void\n {\n $attributes = $this->attributes->forProperties(AttributedClass::class, Attribute::class);\n\n self::assertCount(6, $attributes);\n $this->testsForStaticProperty($attributes[0], $attributes[1], $attributes[2]);\n $this->testsForProperty($attributes[3], $attributes[4], $attributes[5]);\n }", "title": "" }, { "docid": "29214970e27337e03d59744aaf543961", "score": "0.5391522", "text": "public function testProperties()\n {\n $orderDetails = $this->getTestOrderDetails();\n $this->validateOrderDetails($orderDetails);\n }", "title": "" }, { "docid": "4b5ecd55c4d675185a2ee76078377efc", "score": "0.5390653", "text": "public function testForProperty(): void\n {\n $attributes = $this->attributes->forProperty(\n AttributedClass::class,\n self::STATIC_PROPERTY_NAME,\n Attribute::class\n );\n\n $this->testsForStaticProperty(...$attributes);\n\n $attributes = $this->attributes->forProperty(\n AttributedClass::class,\n self::PROPERTY_NAME,\n Attribute::class\n );\n\n $this->testsForProperty(...$attributes);\n }", "title": "" } ]
0664a664f7c98a30d06e2a3ac2914c37
Get repositories by user id from github.
[ { "docid": "7cb42a634511c039d765d5711308e5ce", "score": "0.69328994", "text": "public function getRepositoriesContributedByUserId($userId)\n {\n //TODO: implement github api logic\n return [];\n }", "title": "" } ]
[ { "docid": "c0c1ecd6a67d5d3c87711605a20ee26e", "score": "0.6473688", "text": "public function list_repos($user)\n\t{\n\t\t$this->url = GH_REPO_API.'/show/'.$user;\n\n\t\treturn $this->connect();\n\t}", "title": "" }, { "docid": "c35df7e236e77a17e19e927986e981d1", "score": "0.6297946", "text": "public function repositoryById(string $id)\n {\n $idx = \\bbn\\X::find($this->repositories, ['id' => $id]) ?: null;\n if ($idx !== null) {\n return $this->repositories[$idx];\n }\n\n return [];\n }", "title": "" }, { "docid": "43002ea104bba4bbe21e8c91962a8e1d", "score": "0.6236678", "text": "public function getRepositories()\n {\n $token = Config::getInstance()->get('phpci.github.token');\n\n if (!$token) {\n die(json_encode(null));\n }\n\n $cache = Cache::getCache(Cache::TYPE_APC);\n $rtn = $cache->get('phpci_github_repos');\n\n if (!$rtn) {\n $orgs = $this->makeRequest('/user/orgs', array('access_token' => $token));\n\n $params = array('type' => 'all', 'access_token' => $token);\n $repos = array();\n $repos['user'] = $this->makeRequest('/user/repos', $params);\n\n\n foreach ($orgs as $org) {\n $repos[$org['login']] = $this->makeRequest('/orgs/'.$org['login'].'/repos', $params);\n }\n\n $rtn = array();\n foreach ($repos as $repoGroup) {\n foreach ($repoGroup as $repo) {\n $rtn['repos'][] = $repo['full_name'];\n }\n }\n\n $cache->set('phpci_github_repos', $rtn);\n }\n\n return $rtn;\n }", "title": "" }, { "docid": "e2b7bda6ece3b87974311843a6a01cb1", "score": "0.6113828", "text": "public function getUserRepos($username)\n {\n $response = $this->api->get('repos/show/'.urlencode($username));\n\n return $response['repositories'];\n }", "title": "" }, { "docid": "6e82a954d91ce0998d15c8ffbe6291f7", "score": "0.5962796", "text": "function getProjects($userId);", "title": "" }, { "docid": "f76f26d4fed9090c699db23faa83193d", "score": "0.59533125", "text": "public function getAllRepositories()\n {\n //TODO: implement github api logic\n return [];\n }", "title": "" }, { "docid": "3bfa9f1849e12e04e160e1d15291859a", "score": "0.59532136", "text": "public function repo_info($user, $repo)\n\t{\n\t\t$this->url = GH_REPO_API.'/show/'.$user.'/'.$repo;\n\n\t\treturn $this->connect();\n\t}", "title": "" }, { "docid": "69f9fa26aa9986cf162748906de9dd02", "score": "0.5923211", "text": "public function getById($id)\n {\n $query = 'SELECT id, name, description, github, image, content, status';\n $query.= ' FROM opensource';\n $query.= ' WHERE id = :id';\n\n $stmt = $this->dbConnection->prepare($query);\n $stmt->execute(['id' => $id]);\n\n $result = $stmt->fetch();\n if (!$result) {\n return false;\n }\n\n $this->getFromGitHub([\n $result['id'] => 'https://api.github.com/repos/' . $result['github'] . $this->getOauthInfo(),\n ]);\n\n $parsedProjects = $this->parse([$result]);\n\n return reset($parsedProjects);\n }", "title": "" }, { "docid": "2a4cef1bb8bdd46b8e7b22da36f12e31", "score": "0.5886007", "text": "public function getUserRepos($username)\n {\n $response = $this->get('users/'.urlencode($username).'/repos');\n return $response;\n }", "title": "" }, { "docid": "f4771e82209008b468857d6a93f93ede", "score": "0.58191997", "text": "public function get()\n {\n $projects = $this->getFromLocal();\n\n $repos = [];\n foreach ($projects as $project) {\n $repos[$project['id']] = 'https://api.github.com/repos/' . $project['github'] . $this->getOauthInfo();\n }\n\n $this->getFromGitHub($repos);\n\n return $this->parse($projects);\n }", "title": "" }, { "docid": "b8523e0561271f27f19f23538b738a2a", "score": "0.5815671", "text": "public function show($username, $repo)\n {\n $response = $this->api->get('repos/show/'.urlencode($username).'/'.urlencode($repo));\n\n return $response['repository'];\n }", "title": "" }, { "docid": "a612fde07e9eec330688f7325c04070d", "score": "0.5796096", "text": "public function github() {\n $user = Socialize::with('github')->user();\n // Do your stuff with user data.\n print_r($user);die;\n }", "title": "" }, { "docid": "2f8f6aee08c969ee884178d1cdd03c24", "score": "0.5673404", "text": "public function getGitHub()\n {\n return $this->getApi('github');\n }", "title": "" }, { "docid": "fae60faf8b1cfd28ad7bb650c8f37c81", "score": "0.56484324", "text": "public function show($username, $repo)\n {\n $response = $this->get('repos/show/'.urlencode($username).'/'.urlencode($repo));\n\n return $response['repository'];\n }", "title": "" }, { "docid": "b98dd35f77d9a864a4ce9ad94a4924eb", "score": "0.56374073", "text": "private function saveGitHubData($repos, $user){\n\n //load ip address\n $ipService = new IPService();\n\n //save search query and get its id\n $queryId = $this->searchQuery->insert(\n ['query' => $user,\n 'ip' => $ipService->getIP()]\n );\n\n //each repository save to db\n foreach ($repos as $repo){\n $this->repo->insert(\n ['name' => $repo->name,\n 'description' => $repo->description,\n 'url' => $repo->svn_url,\n 'stargazers_count' => $repo->stargazers_count,\n 'language' => $repo->language,\n 'created_at' => $repo->created_at,\n 'query_id' => $queryId]\n );\n }\n\n //return repos to controller var\n $this->repos = $this->repo->getByQueryId($queryId);\n }", "title": "" }, { "docid": "45c75b7836520247706d54c9ca1f015c", "score": "0.56058383", "text": "public function getRepositories();", "title": "" }, { "docid": "8ea5b301b0cbb21b4b1c3e88386877f5", "score": "0.55910707", "text": "public function getUser()\n {\n return $this->hasOne(GithubUser::class, ['id' => 'user_id']);\n }", "title": "" }, { "docid": "27f302529ae3f03193070ee3993d4f27", "score": "0.55892664", "text": "abstract protected function getRepos();", "title": "" }, { "docid": "323a0b1df2416e14964b4f0e073c46d2", "score": "0.5520391", "text": "public function getIssue(Authenticatable $user, $id)\n {\n // Get the user projects\n $projects = $user->project()->get()->pluck('id');\n\n // Filter issue from given project id\n return Issue::whereIn('project_id', $projects)->findOrFail($id);\n }", "title": "" }, { "docid": "9742ee1a71bbdac84d5903ca60624291", "score": "0.5432738", "text": "function findGitHubUser($fullname)\n{\n // Possible todo: Allow users to customize this via master/people.\n return false;\n $username = getDOMNodeFrom(\"http://github.com/api/v2/xml/user/search/\" . urlencode($fullname), \"username\");\n if (!$username) {\n return;\n }\n\n $content = file_get_contents(\"http://github.com/api/v2/xml/user/show/\" . $username->nodeValue);\n\n $r = new XMLReader;\n $r->XML($content);\n\n $retval = array();\n while($r->read()) {\n if ($r->nodeType == XMLReader::ELEMENT) {\n $key = $r->name;\n } elseif ($r->nodeType == XMLReader::TEXT) {\n $retval[$key] = $r->value;\n }\n }\n return $retval;\n}", "title": "" }, { "docid": "41cad544671ebb459078195676a018c9", "score": "0.542806", "text": "public function get($user_id);", "title": "" }, { "docid": "301951038cb6eaf2259a1e92f9864070", "score": "0.5422493", "text": "public function readUserProjects($userId) {\n $readQuery = 'SELECT * FROM projects WHERE StudentId = :id';\n $readStmt = $this->db->prepare($readQuery);\n $readStmt->bindValue(':id', $userId, PDO::PARAM_INT);\n $readStmt->execute();\n return $readStmt->fetchall(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "8a7177b0a729615638d987b37e036723", "score": "0.5402648", "text": "public function listOwn() {\n\t\treturn $this->request('/user/repos');\n\t}", "title": "" }, { "docid": "c10e96b79787f3e99483a6e89ac94592", "score": "0.5383031", "text": "public function getUser($id = 0);", "title": "" }, { "docid": "c8c2261a09554c90bd80754087ff84c6", "score": "0.53813", "text": "protected function getPullRequestCommits($user, $merge_request_iid, $pr_id) {\n $url = self::BASE_URL . '/projects/' . $pr_id . './merge_requests/'\n . $merge_request_iid . '/commits';\n $ch = $this->getConfiguredCURL($url, $user);\n $response = $this->performCURL($ch);\n return $response;\n }", "title": "" }, { "docid": "15703f7a3487a923e77d6fe93c02c581", "score": "0.53777224", "text": "public function findByUser($user, $id = null);", "title": "" }, { "docid": "4d21dc7486447e1c1289eff6b39b2982", "score": "0.5366193", "text": "function detailsForUser($searchString) {\n $GitHubResponse = basicCurl(\"https://api.github.com/users/\".$searchString);\n $jsonResult = json_decode($GitHubResponse, true);\n if ($jsonResult['message']!=\"Not Found\") {\n $returnString = \"Here are the details for the user \".$searchString.\": <br />\";\n $returnString = $returnString.\"Login: \".$jsonResult['login'].\"<br />Real name: \".$jsonResult['name'].\"<br />GitHub url: <a href='\".$jsonResult['html_url'].\"'>\".$jsonResult['html_url'].\"</a><br />User Bio:<br />\".$jsonResult['bio'];\n return $returnString;\n } else {\n return \"The user couldn't be found! :(\";\n } \n}", "title": "" }, { "docid": "5acc3d62e6f334bffd898cd3aa91ee9e", "score": "0.53495544", "text": "protected function fetch_symfony_users()\n\t{\n\t\t$client = new Client();\n\t\t$users = $client->api('user')->repositories('symfony');\n\t\t\n\t\t// for debugging\n\t\t$this->line(\"Total repositories found: \" . count($users));\n\t\t\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "dffd8009639283fb35d35e6fd5d7e926", "score": "0.5338038", "text": "public function getUserById($id);", "title": "" }, { "docid": "033298079c62ccde2d876fff8e0f8e23", "score": "0.5320638", "text": "public function getUserProjects( $id_or_username, $params = array(), $assoc = false ) {\n\n $endpoint = self::ENDPOINT_USERS . '/' . $id_or_username . '/projects';\n $results = $this->_getDecodedJson( $endpoint, $params, 'projects', $assoc );\n\n // IMPORTANT: Ensure this will always return an array\n return ( empty( $results ) )\n ? array()\n : $results;\n\n }", "title": "" }, { "docid": "a17c828b0de524cd46f3e5c25ad12b73", "score": "0.52878433", "text": "public function repository(string $org, string $id)\n {\n /** @var Organization $organization */\n $organization = Organization::query()->where('name', $org)->firstOrFail();\n\n $repositories = $organization->repositories()->where('name', $id)->get();\n if (0 === \\count($repositories)) {\n abort(404);\n }\n\n return response(json_encode($this->constructManifest($repositories)), 200);\n }", "title": "" }, { "docid": "ebc716af091d300d2dfe3549326ad3fb", "score": "0.5245727", "text": "public function getProjectById( $id )\n\t{\n\t\treturn $this->model->with('users')->find($id);\n\t}", "title": "" }, { "docid": "4063dc403eae31e7f260e156f243d1bc", "score": "0.5241844", "text": "function getOwner($group_id, $user_id) {\n\t\tif( $group_id == -1 ) {\n\t\t\t$owner = $this->user->get($user_id);\n\t\t\treturn [ 'name' => $owner['username'], 'link' => 'users/profile/'.$owner[\"username\"] ];\n\t\t} else {\n\t\t\t$owner = $this->user->getGroup($group_id);\n\t\t\treturn [ 'name' => $owner['name'], 'link' => \"\" ]; // ~~~\n\t\t}\n\t}", "title": "" }, { "docid": "b4c557221974e75bcc0b53f5b9f32c5e", "score": "0.5241209", "text": "protected function getPullRequestComments($user, $repo, $pr_id) {\n }", "title": "" }, { "docid": "ce8fbe6826af3353f7dbe33a716d5d96", "score": "0.52225655", "text": "private function getFromGitHub(array $repos)\n {\n $onResponse = function($requestKey, HttpResponse $response) {\n $this->responses[$requestKey] = json_decode($response->getBody(), true);\n };\n\n $onError = function($requestKey, Exception $error) {\n echo 'Error: (', $requestKey, ') ', get_class($error), \"\\n\";\n };\n\n $this->httpClient->requestMulti($repos, $onResponse, $onError);\n }", "title": "" }, { "docid": "c5fbf125bffd2d31d1928f6d9f29a48f", "score": "0.5217291", "text": "public function getUser($id)\n {\n return $this->getRepository(UserRepository::class)->get($id);\n }", "title": "" }, { "docid": "076126912857ac53bd758872cd30cc43", "score": "0.5217075", "text": "protected function repo(string $name)\n {\n return $this->container->get('repo.' . $name);\n }", "title": "" }, { "docid": "aabec06c88ac6337fb5b17f608e3c1e9", "score": "0.52012193", "text": "function _set_repo($data = array()) {\n\t\tif(empty($data)) {\n\t\t\treturn array(false, null);\n\t\t}\n\t\t\n\t\tif(isset($data['repo_url'])) {\n\t\t\t$repo = $this->Repository->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'Repository.url' => $data['repo_url']\n\t\t\t\t),\n\t\t\t\t'recursive' => -1,\n\t\t\t));\n\t\t} elseif(isset($data['repo_id'])) {\n\t\t\t$repo = $this->Repository->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'Repository.id' => $data['repo_id']\n\t\t\t\t),\n\t\t\t\t'recursive' => -1,\n\t\t\t));\n\t\t}\n\t\t\n\t\tif(!empty($repo)) {\n\t\t\t$this->setRepositorySession($repo);\t\t\t\n\t\t\treturn array(true, $repo);\n\t\t} else {\n\t\t\treturn array(false, null);\n\t\t}\n\t\t\t\t\t\n\t}", "title": "" }, { "docid": "3dd287cdca262e454b7ba14712c9d35f", "score": "0.52001125", "text": "public function listUser($username) {\n\t\treturn $this->request('/users/'.$username.'/repos');\n\t}", "title": "" }, { "docid": "7056ab732490d3bd1292471cec7a81bc", "score": "0.5192031", "text": "public function getById($id)\n {\n return $this->userRepository->find($id);\n }", "title": "" }, { "docid": "954fa66ccf0af62b42104a51b5341a7f", "score": "0.517682", "text": "public function get( $chunks ) {\n\t\tglobal $database, $userid;\n\t\tif ( $userid == null ) {\n\t\t\tController::error(401, 'Please login.');\n\t\t}\n\t\t$id = array_shift( $chunks );\t\t\n\t\tif ( isEmpty( $id ) ) {\n\t\t\t// Could return a list of users here.\n\t\t\t$id = $userid;\n\t\t} \n\t\t\t\t\n\t\tif ($userid == null || $id != $userid ) {\n\t\t\tController::error(401, 'Can only retrieve your own user info.');\n\t\t}\n\t\t\n\t\t$um = new UserManager( $database );\n\t\t$u = $um->get( $id );\n\t\treturn $u;\n\t}", "title": "" }, { "docid": "5228131e9bef455aa3390051390988b9", "score": "0.51677495", "text": "public function getUser($id){\n $sql = $this->bdd()->prepare('SELECT * FROM users WHERE id =:id');\n $sql->execute([':id' => $id]);\n $donnees = $sql->fetch(PDO::FETCH_ASSOC);\n return $donnees;\n }", "title": "" }, { "docid": "e6f3f5fb1e1296c7aa291a2fd51e0b76", "score": "0.51609087", "text": "public function getCommitComment($user, $repo, $id)\n {\n // Build the request path.\n $path = '/repos/' . $user . '/' . $repo . '/comments/' . $id;\n\n // Send the request.\n $response = $this->client->get($this->fetchUrl($path));\n\n // Validate the response code.\n if ($response->code != 200) {\n // Decode the error response and throw an exception.\n $error = json_decode($response->body);\n throw new DomainException($error->message, $response->code);\n }\n\n return json_decode($response->body);\n }", "title": "" }, { "docid": "30037ab09b263b8b8a5150f26eb859ea", "score": "0.51473415", "text": "public function get_user_allowed_repositories($user_id = null)\n {\n // We pass the argument directly to get_user_group_cnt\n $user_group_id = $this->get_user_group_cnt ($user_id);\n // From this group id, extract the allower scan_filesets_list\n $this->CI->db->select('scan_filesets_list');\n $this->CI->db->where('cnt', \"\".$user_group_id);\n $q = $this->CI->db->get('users_groups');\n\n if ($q->num_rows() != 1)\n {\n $this->CI->klsecurity->log('warn','global_functions/get_user_allowed_repositories','User group doesn\\'t exist: '.print_r ($user_group_id, true));\n return array();\n }\n // We now have an aswer\n // We have 1 result. Let's see it!\n $entry = $q->result_array();\n $scan_filesets_json = $entry[0]['scan_filesets_list'];\n $scan_filesets_array = json_decode($scan_filesets_json);\n if (is_null($scan_filesets_array))\n {\n $this->CI->klsecurity->log('warn','global_functions/get_user_allowed_repositories','scan_fileset_list JSON invalid: '.print_r ($scan_filesets_json, true));\n return array();\n }\n return $scan_filesets_array;\n }", "title": "" }, { "docid": "9468b05febd29905ce8c8a0e87bac983", "score": "0.5146086", "text": "public function getUserById($user_id){\n return $this->where('id', $user_id)->get();\n }", "title": "" }, { "docid": "bf8502f7f799cabf21a5e066a42569f7", "score": "0.51400656", "text": "public function getProjectsByUser($user_id)\n {\n $sql = \"SELECT p.project_id, p.submit_date, p.user_id, p.timeline, p.descr, p.post_code_id, \n p.subcategory_id, p.subsubcategory_id, p.active, p.deleted, pc.post_code, s.name AS subcategory_name\n FROM project p\n JOIN subcategory s ON s.subcategory_id = p.subcategory_id \n JOIN post_code pc ON pc.post_code_id = p.post_code_id\n WHERE user_id = :user_id AND deleted = 0\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':user_id' => $user_id));\n\n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }", "title": "" }, { "docid": "7fa2b39a1a923c22178bc0327f438844", "score": "0.51335984", "text": "public function getWithUser($id) {\n \n return $this->createQueryBuilder('n')\n ->select('n, u')\n ->join('n.user', 'u')\n ->where('n.id = :id')\n ->setParameter('id', $id)\n ->getQuery()\n ->getOneOrNullResult();\n }", "title": "" }, { "docid": "ba58b952f9d5397f6d1f222ebe4d7ecf", "score": "0.5129496", "text": "public function addRepository(User $user, $repositoryId)\n {\n $existentRepository = $this\n ->repositoryRepository\n ->findOneBy([\n 'user' => $user,\n 'id' => $repositoryId\n ]);\n\n if ($existentRepository instanceof Repository) {\n return $existentRepository;\n }\n\n $specificRepository = null;\n $allOrganizations = $this\n ->repositoryApiManager\n ->loadAllRepositoriesFromGithubApi($user);\n\n foreach ($allOrganizations as $organization) {\n\n if (is_array($organization)) {\n\n foreach ($organization as $repository) {\n\n if ($repository['id'] === $repositoryId) {\n\n $specificRepository = $repository;\n break 2;\n }\n }\n }\n }\n\n /**\n * Repository not found\n */\n if (empty($specificRepository)) {\n\n throw new Exception('Repository not found');\n }\n\n $repository = $this\n ->repositoryFactory\n ->create($specificRepository['id'])\n ->setUrl($specificRepository['html_url'])\n ->setSshUrl($specificRepository['ssh_url'])\n ->setGitUrl($specificRepository['git_url'])\n ->setOwner($specificRepository['owner']['login'])\n ->setName($specificRepository['name'])\n ->setUser($user);\n\n $this->repositoryObjectManager->persist($repository);\n $this->repositoryObjectManager->flush($repository);\n\n return $repository;\n }", "title": "" }, { "docid": "a446bfa6c60bd758daf0dc12d286edca", "score": "0.5126782", "text": "public function getRepositories() {\n return $this->withCache('repositories', strtotime('+1 hour'), function () {\n return $this->loadRepositories();\n });\n }", "title": "" }, { "docid": "5a86128d79b2c45d6c215fb321d3ee2e", "score": "0.5124255", "text": "public function get_projects_user($user_id)\r\n {\r\n\r\n $this->db\r\n ->select('projects.project_id, projects.name, user_project.position') \r\n ->join('user_project', 'user_project.project_id = projects.project_id', 'inner' ) \r\n ->where('user_project.user_id', $user_id);\r\n \r\n $data = $this->plugin_handler->trigger('users_model_projects_user', array($user_id, $this->db) );\r\n $this->db = $data[1];\r\n \r\n return $this->db->get('projects')\r\n ->result_object();\r\n\r\n }", "title": "" }, { "docid": "976b8fc1626bf82a219032866a045789", "score": "0.5124131", "text": "function newRepo($payload)\n{\n\tglobal $_config;\n\n\tif(in_array($payload->repository->name, $_config->auth_repos))\n\t{\n\t\treturn array(\n\t\t\t\"name\" => $payload->repository->name,\n\t\t\t\"full_name\" => $payload->repository->full_name,\n\t\t\t\"private\" => $payload->repository->private,\n\t\t\t\"users\" => array(newUser($payload))\n\t\t);\n\t}\n\telse\n\t\tdie(\"Repo not authorized to be added.\");\n}", "title": "" }, { "docid": "2bef2c85a5236c0b20c519c59c7fb96e", "score": "0.51167643", "text": "public function find($id, $idUser=null) {\n $sql = $this->createQueryBuilder('a');\n $sql->select('a')\n ->andWhere('a.id = :idAlbum')\n ->setParameter('idAlbum', $id);\n\n /*if(!empty($idUser)) {\n $sql->leftJoin('Application\\Entity\\Share', 'sh', 'WITH', 'sh.album = a.id')\n ->leftJoin('sh.users', 'shu')\n ->leftJoin('sh.groups', 'shg')\n ->andWhere('(a.visibility = :public OR (a.visibility = :private AND a.user = :idUser) OR shu.id = :idUser)')\n ->setParameter('idUser', $idUser)\n ->setParameter('public', \"public\")\n ->setParameter('private', \"private\");\n }*/\n\n if(!empty($idUser)) {\n $sql->leftJoin('a.shareUsers', 'shu')\n //->leftJoin('a.shareGroups', 'shg')\n ->andWhere('(a.visibility = :public OR (a.visibility = :private AND a.user = :idUser) OR shu.id = :idUser)')\n ->setParameter('idUser', $idUser)\n ->setParameter('public', \"public\")\n ->setParameter('private', \"private\");\n }\n\n return $sql->getQuery()->getOneOrNullResult();\n }", "title": "" }, { "docid": "71c7257504a2228a58edc43d8021bf7a", "score": "0.5111693", "text": "public function show($username, $repository, $id)\n {\n return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/assets/'.rawurlencode($id));\n }", "title": "" }, { "docid": "656ab5ee0de131b5094f5482408f41d8", "score": "0.5105154", "text": "public function getLeadRepo($site_id)\n\t{\n\t //check more than one lead repo\n\t\t //if yes slect best usernam efrom that\n\t\t $best_lead_repo = \"select a.username from order_assign_rule a where a.lead_repo = 1 and a.site_id = $site_id and a.rule_type = '3'\";\n\t\t\t $sql_best_lead_repo = $this->opasa->query($best_lead_repo);\n\t\t\t if($sql_best_lead_repo->num_rows() == 1) //if only one user match the rule\n\t\t {\n\t\t $best_user_row = $sql_best_lead_repo->row();\n\t\t\t $assigned_user = $best_user_row->username;\n\t\t\t //$this->assign($site_id,$order_id,$assigned_user);\n\t\t }\n\t\t\t //conflict \n\t\t else if($sql_best_lead_repo->num_rows() > 1)\n\t\t {\n\t\t //convert to array\n\t\t\t $user_array = array();\n\t\t\t foreach($sql_best_lead_repo->result() as $user)\n\t\t\t {\n\t\t\t $user_array[] = $user->username;\n\t\t\t }\n\t\t\t $assigned_user = $this->solveConflict($user_array,$site_id);\n\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t $assigned_user = 0;\n\t\t\t }\n\t\t\t return $assigned_user;\n\t}", "title": "" }, { "docid": "8886c62d5446a553ce57bcfe7c84f352", "score": "0.51038134", "text": "protected function get($username, $repo, $id)\n {\n return $this->processResponse(\n $this->requestGet(\"repos/$username/$repo/issues/events/$id\")\n );\n }", "title": "" }, { "docid": "73f676e09c51bf38157363169b047b7d", "score": "0.5098844", "text": "public function get($username, $repository, $id) {\n\t\treturn $this->request('/repos/'.$username.'/'.$repository.'/issues/events/'.$id);\n\t}", "title": "" }, { "docid": "6ce66c310dd716dcba2b470334492c5a", "score": "0.5077743", "text": "private function getRepo($target)\n {\n if (isset($this->targetInfoCache[$target])) {\n $res = $this->targetInfoCache[$target];\n } else {\n $res = $this->client->get(sprintf(\n self::GITHUB_REPO_ENDPOINT,\n $this->cleanTarget($target)\n ), [\n 'auth' => [null, $this->token]\n ]);\n\n $this->targetInfoCache[$target] = $res;\n }\n\n return $res;\n }", "title": "" }, { "docid": "c4e17e5ed5895136bb74f27992152ac3", "score": "0.5070099", "text": "function get( $user_id = 0 )\n\t{\n\t\t$data = array (\n\t\t\t'id' => $user_id\n\t\t);\n\t\t\n\t\t$query = $this->db->get_where('users', $data);\n\t\t$user = array();\n\t\t\n\t\tforeach ( $query->result() as $item )\n\t\t{\n\t\t\t$item->group_name = $this->Group->group_name ( $item->group_id );\n\t\t\tarray_push ( $user, $item );\n\t\t}\n\t\t\n\t\treturn $user[0];\n\t\n\t}", "title": "" }, { "docid": "34fcbbe8dc3c09a14e5679cf8c081ba9", "score": "0.50694877", "text": "public function loginWithGithub() {\n $code = Input::get( 'code' );\n\n $GitHubService = OAuth::consumer('GitHub');\n\n if ( !empty( $code ) ) {\n\n // This was a callback request from linkedin, get the token\n $token = $GitHubService->requestAccessToken( $code );\n // Send a request with it. Please note that XML is the default format.\n $result = json_decode($GitHubService->request('user'), true);\n\n if(!empty($token)){\n\n try{\n // Find the user using the user id\n $user = Sentry::findUserByLogin($result['email']);\n\n // Log the user in\n Sentry::login($user, false);\n\n return Redirect::route('home');\n }\n catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n {\n // Register the user\n $user = Sentry::register(array(\n ##check if has facebook token\n 'activated' => 1,\n 'email' => $result['email'],\n ##normal signup\n 'password' => Hash::make(uniqid(time())),\n 'first_name' => $result['name'],\n 'avatar' => $result['avatar_url'],\n 'country' => (!empty($result['location'])) ? $result['location'] : false\n ));\n\n $usergroup = Sentry::getGroupProvider()->findById(2);\n $user->addGroup($usergroup);\n\n Sentry::login($user, false);\n\n return Redirect::route('account');\n }\n\n }\n\n }// if not ask for permission first\n else {\n // get linkedinService authorization\n $url = $GitHubService->getAuthorizationUri();\n\n // return to linkedin login url\n return Redirect::to( (string)$url );\n }\n }", "title": "" }, { "docid": "cf4675d891cdca1ea56cd848e9a774f1", "score": "0.5064905", "text": "public static function getUser($name){\n $user = GitHub::users()->show($name);\n $user['title']= 'User';\n $user['show_repo_user'] = false;\n\n //check liked\n self::addLikeAttributes($user, true);\n\n return $user;\n }", "title": "" }, { "docid": "63b0ab78290e385e9c772ac26c01711f", "score": "0.5061705", "text": "public function getById($id = null)\n {\n return $this->getUserRepo()->findObjectById($id);\n }", "title": "" }, { "docid": "7931feca0b0471715e4fa956c310d166", "score": "0.50587374", "text": "public function repositoryFromUrl(string $url, bool $obj = false)\n {\n //search repository\n if (\n is_array($this->repositories)\n && count($this->repositories)\n ) { //if in url name of repository break loop\n foreach ($this->repositories as $i => $d) {\n if ((strpos($url, $i) === 0)) {\n $repository = $i;\n break;\n }\n }\n\n //if there is name repository or total info\n if (!empty($repository)) {\n return empty($obj) ? $repository : $this->repositories[$repository];\n }\n }\n\n return false;\n //return $this->projects->repositoryFromUrl($url, $obj);\n }", "title": "" }, { "docid": "b72f97963516300165e21c8964b8f7b8", "score": "0.5047537", "text": "private function getUser($id = '') {\n // get the Author profile name\n $myArray = array();\n //select dataset from database Table\n $query = $this->db->prepare(\"SELECT display_name, user_url FROM $this->userTable WHERE ID=:user\");\n $query->bindParam(':user', $id);\n $query->execute();\n $query->setFetchMode(PDO::FETCH_ASSOC);\n if($query->rowCount() > 0){\n while($row = $query->fetch()) {\n $myArray[] = array_merge($row, $this->getReal($id,'first_name'), $this->getReal($id,'last_name'));\n }\n return $myArray;\n }\n }", "title": "" }, { "docid": "0ece130a5ab6e980687a8b3fcf2ff43e", "score": "0.5038114", "text": "public function getUserById(int $id): array;", "title": "" }, { "docid": "fdda50c78e9755f381c5033563bd14b8", "score": "0.5034804", "text": "public static function retrievePagerByUserStarred($user_id, $page = 1, $max = null)\n {\n if ($max == null) $max = sfConfig::get('app_pager_project_max');\n\n $c = new Criteria();\n $c->add(StarPeer::USER_ID, $user_id);\n $c->add(StarPeer::STARRED_MODEL, 'Project');\n $c->addAscendingOrderByColumn(StarPeer::STARRED_MODEL);\n sfContext::getInstance()->getLogger()->info('Grab starred project records...');\n $stars = StarPeer::doSelect($c);\n\n $c = new Criteria();\n $projects = array();\n\n sfContext::getInstance()->getLogger()->info('build project ids for query');\n foreach ($stars as $star)\n {\n $projects[] = $star->getStarredId();\n }\n\n sfContext::getInstance()->getLogger()->info('ID List Built! '.print_r($projects, true));\n\n $c->add(self::ID, $projects, Criteria::IN);\n\n sfContext::getInstance()->getLogger()->info('init starred pager');\n $pager = new sfPropelPager('Project', $max);\n $pager->setCriteria($c);\n $pager->setPage($page);\n $pager->init();\n\n sfContext::getInstance()->getLogger()->info('got starred pager');\n return $pager;\n }", "title": "" }, { "docid": "83afc2836bc310481f1aee4cb521b47b", "score": "0.5034477", "text": "public function get($id)\n {\n // Response variables\n $result = true;\n $error = null;\n $object = null;\n\n // Operations\n try{\n $object = Guardian::find($id);\n }\n catch (\\Exception $e){\n $error = $e;\n $result = false;\n }\n\n // Response\n $resp = new RepositoryResponse($result, $object, $error);\n return $resp;\n }", "title": "" }, { "docid": "bd817be36d0be3e815c7f3fa3ab857ae", "score": "0.5032263", "text": "public function getForUser($userId);", "title": "" }, { "docid": "59ae31ae7b55538e0315f06728ee88bd", "score": "0.50241536", "text": "public function find_user($id) {\n return $this->users[$id];\n }", "title": "" }, { "docid": "cd57c84d57e55d2634447b5381aec8f7", "score": "0.50094426", "text": "public function getProjectsByUserId(int $userId) : array\n {\n $cacheKey = 'ProjectRepository.getProjectsByUserId' . $userId;\n\n return $this->cache($this->cacheTags, $cacheKey, $this->cacheInterval, function () use ($userId) {\n $projectIds = DB::table('user_project')->where('userid', '=', $userId)->pluck('projectid');\n return $this->toArray(ProjectEloquent::whereIn('projectid', $projectIds)\n ->orWhere('leaderid', $userId)->get());\n });\n }", "title": "" }, { "docid": "68eba7e0541856d80d0722f6bddc0269", "score": "0.49912325", "text": "public function getByUser($user);", "title": "" }, { "docid": "4bf4e78fb26b95867c58eeb84e728c3a", "score": "0.49905878", "text": "public function handle(GithubService $github)\n {\n $label = $this->argument('label');\n $language = $this->option('lang');\n $search = $this->option('search');\n $page = $this->option('page');\n\n $this->info(\"Fetching Issues from Github...\");\n\n $response = $github->getIssues($search, $label, $language, $page);\n\n if ($response['code'] != 200) {\n $this->error('An error ocurred: ' . $response['body']);\n exit;\n }\n\n $json = json_decode($response['body'], true);\n\n $this->info(\"Total items received: \" . count($json['items']));\n\n foreach ($json['items'] as $raw_issue) {\n //tries to locate existing issue with this id\n $issue = Issue::find($raw_issue['id']);\n\n if ($issue === null) {\n $this->info('Creating new Issue: ' . $raw_issue['title']);\n $issue = new Issue();\n\n /************************************\n * ISSUE AUTHOR\n ************************************/\n //gets author\n $author = User::find($raw_issue['user']['id']);\n\n if ($author === null) {\n //creates new user\n $this->info('Creating new Author: ' . $raw_issue['user']['login']);\n\n $author = new User();\n $author->id = $raw_issue['user']['id'];\n $author->username = $raw_issue['user']['login'];\n $author->avatar = $raw_issue['user']['avatar_url'];\n\n $author->save();\n }\n\n $issue->user()->associate($author);\n\n /******************************************\n * ISSUE PROJECT\n ******************************************/\n $repository_url = $raw_issue['repository_url'];\n\n $parsedUrl = parse_url($repository_url);\n $project_name = str_replace('/repos/', '', $parsedUrl['path']);\n\n //check if project already exists\n $project = Project::where('full_name', $project_name)->first();\n\n if ($project === null) {\n //creates new Project\n $this->info('Creating new Project: ' . $project_name);\n\n $project_info = $github->getRaw($repository_url);\n\n if ($project_info['code'] == 200) {\n $project = new Project();\n $raw_project = json_decode($project_info['body'], true);\n\n $project->id = $raw_project['id'];\n $project->name = $raw_project['name'];\n $project->description = $raw_project['description'];\n $project->language = $raw_project['language'];\n $project->html_url = $raw_project['html_url'];\n $project->full_name = $raw_project['full_name'];\n $project->stars = $raw_project['stargazers_count'];\n\n $project->save();\n } else {\n $this->error('Error fetching project info: ' . $project_info['body']);\n exit;\n }\n } else {\n $this->info('Using Existing Project: ' . $project_name);\n }\n\n $issue->project()->associate($project);\n\n /******************************************\n * ISSUE CONTENT\n *****************************************/\n $issue->id = $raw_issue['id'];\n $issue->number = $raw_issue['number'];\n $issue->html_url = $raw_issue['html_url'];\n $issue->title = $raw_issue['title'];\n $issue->body = $raw_issue['body'];\n $issue->project_language = $project instanceof Project ? $project->language : null;\n $issue->original_created_at = (new \\DateTime($raw_issue['created_at']))->format('Y-m-d H:i:s');\n $issue->original_updated_at = (new \\DateTime($raw_issue['updated_at']))->format('Y-m-d H:i:s');\n $issue->save();\n\n /******************************************\n * ISSUE LABELS\n *****************************************/\n $issue_labels = [];\n foreach ($raw_issue['labels'] as $raw_label) {\n $label_slug = Str::slug($raw_label['name']);\n\n $label = Label::where('slug', $label_slug)->first();\n\n if ($label === null) {\n //creates new label\n $this->info('Creating new Label: ' . $raw_label['name']);\n\n $label = new Label();\n $label->name = $raw_label['name'];\n $label->slug = $label_slug;\n $label->save();\n }\n\n $issue_labels[] = $label->id;\n }\n\n\n $issue->labels()->sync($issue_labels);\n } else {\n $this->info('Skipping already imported issue: ' . $issue->title);\n }\n }\n\n $this->info(\"Finished.\");\n }", "title": "" }, { "docid": "318b73f69c7dbdfc2f2b3361499e9568", "score": "0.49858814", "text": "private function getRepoReleaseInfo() {\n // Check if we already have fetched releases\n if (!empty($this->githubAPIResult)) {\n return;\n }\n\n // Set the url to use the GitHub API\n $url = \"https://api.github.com/repos/{$this->username}/{$this->repo}/releases\";\n \n // If we have an access token, let's add it to the request url\n if (!empty($this->accessToken)) {\n $url = add_query_arg(array(\"access_token\" => $this->accessToken), $url);\n }\n \n // Fetch the result of the API call\n $this->githubAPIResult = wp_remote_retrieve_body(wp_remote_get($url));\n if (!empty($this->githubAPIResult)) {\n $this->githubAPIResult = @json_decode($this->githubAPIResult);\n }\n\n // Use only the latest release\n if (is_array($this->githubAPIResult)) {\n $this->githubAPIResult = $this->githubAPIResult[0];\n }\n }", "title": "" }, { "docid": "2f87201ee8ea85f66a7155291571ad08", "score": "0.49748868", "text": "public function githubGetClient() {\n return $this->client;\n }", "title": "" }, { "docid": "1b7e2c378c111c96da9d083be5299347", "score": "0.49728662", "text": "public function getPushableRepos()\n {\n $response = $this->get('repos/pushable');\n\n return $response['repositories'];\n }", "title": "" }, { "docid": "70c87a9a6a0384a7af00b6f8dba55982", "score": "0.49682373", "text": "public function findSocialUserById($id){\n //return $socialMapper->findById($id);\n return $this->mapper->findSocialUserById($id);\n }", "title": "" }, { "docid": "ae07f3e2688230e00145907b797c305f", "score": "0.49679458", "text": "public function getRepository($name);", "title": "" }, { "docid": "7cb29fac7520ed0e15315b66bcc0c24f", "score": "0.4956687", "text": "public function getUserById($id) {\r\n\t\t// We don't have ID's so ID=login in the UserFileDao.\r\n\t\treturn $this->getUserByLogin($login);\r\n\t}", "title": "" }, { "docid": "8cfe50167df646e5fd7fb9b60411b28d", "score": "0.4952378", "text": "public function setRepoInfo($username, $repo, $values)\n {\n $response = $this->post('repos/show/'.urlencode($username).'/'.urlencode($repo), array('values' => $values));\n\n return $response['repository'];\n }", "title": "" }, { "docid": "6530967721b05710fe62639fd25362c5", "score": "0.494191", "text": "public function getRepoAndFindOneByAnyId($repoNameOrObject, $anyId, $secureRepo = false) { // DEPRECATED, use findDoc instead\n if(is_string($repoNameOrObject)) {\n $repoNameOrObject = $secureRepo ? $this->getSecureRepo($repoNameOrObject) : $this->getRepo($repoNameOrObject);\n }\n return $this->isUnid($anyId) ? $repoNameOrObject->findOneBy(['unid' => $anyId]) : $repoNameOrObject->find($anyId);\n }", "title": "" }, { "docid": "99b56894804ecfc7f807881d8e4da238", "score": "0.49236372", "text": "public function getCommit(array $params) {\n if ($params['userInfo']) {\n $user = $params['userInfo'];\n // The ID of a project.\n $id = $params['id_proyect'];\n $url = self::BASE_URL . '/projects/' . $id . '/repository/commits';\n $ch = $this->getConfiguredCURL($url, $user);\n $repos = $this->performCURL($ch);\n $response = [];\n foreach ($repos as $repo) {\n $repo['parent'] = $repo['parent'] ? TRUE : FALSE;\n array_push(\n $response, $this->buildResponse($repo, self::COMMIT)\n );\n }\n return $response;\n }\n }", "title": "" }, { "docid": "9193cdb35bae91927f2d77e56f31d861", "score": "0.4920236", "text": "public function getAuthors($id);", "title": "" }, { "docid": "5f8097ac1bd222912bc76f86d8aa2e03", "score": "0.49156564", "text": "public function getIssues($repoName);", "title": "" }, { "docid": "383ab2895445ce27da976aab90c71c23", "score": "0.49024034", "text": "public function getRepositoryInfo();", "title": "" }, { "docid": "5e228c16ed3be32f166c6a1741be8892", "score": "0.48906112", "text": "public static function findContractorByUserId($id) {\n\n $sql = \"SELECT * FROM contractor WHERE users_id='$id'\";\n $data = self::query($sql);\n\n return $data;\n }", "title": "" }, { "docid": "d6e9f1e548f202479f9fcab58349443c", "score": "0.48876953", "text": "public function getRepositories()\n {\n return $this->repositories;\n }", "title": "" }, { "docid": "8132783186dcfa7016d4ae38e9eda40f", "score": "0.48853034", "text": "abstract protected function getRepoInfo($repo);", "title": "" }, { "docid": "a05435180befde4a5573705ddc222bd6", "score": "0.48840186", "text": "public static function get_repository_data() {\n if( self::authorize() === false ) {\n return false;\n }\n $update = false;\n // 1.1: Build request URI\n $request_uri = sprintf( 'https://api.github.com/repos/%s/%s/releases', self::USERNAME, self::REPOSITORY );\n // 1.2: Append access token to URI\n $request_uri = add_query_arg( 'access_token', self::authorize(), $request_uri );\n // 1.3: Get json response from github and parse it\n $response = json_decode( wp_remote_retrieve_body( wp_remote_get( $request_uri ) ), true );\n // 1.4: If we didn't get a good response, we can bail\n if( !is_array( $response ) || !isset( $response[0]['id'] ) ) {\n return false;\n }\n // Try to get response for current major release\n foreach( $response as $release ) {\n \tif( intval( $release['tag_name'] ) === intval( parent::$theme_version ) ) {\n \t\t$update = $release;\n \t\t$update['zipball_url'] = add_query_arg( 'access_token', self::authorize(), $release['zipball_url'] );\n \t}\n \tbreak;\n }\n \t// Give response back...\n return $update;\n }", "title": "" }, { "docid": "b297e07d8fcf7ff776e8b62b51ce757d", "score": "0.48831356", "text": "public function fake_and_true_github_repo_urls() {\n $return = array();\n $return['true'] = ['https://api.github.com/repos/YOURLS/YOURLS/zipball/1.2.3', true];\n $return['not github'] = ['https://api.g1thub.com/repos/YOURLS/YOURLS/zipball/1.2.3', false];\n $return['not YOURLS'] = ['https://api.github.com/repos/Y0URL5/YOURLS/zipball/1.2.3', false];\n $return['not URL'] = ['nope', false];\n\n return $return;\n }", "title": "" }, { "docid": "89e5e9b7fc5aa79c358b9ccebdb90ed9", "score": "0.48797685", "text": "public function getUserById($id)\n {\n $list = User::find($id);\n return $list;\n }", "title": "" }, { "docid": "3ed7e147b5e408e69fcd42bc38690f94", "score": "0.48787674", "text": "public function getRepositories(string $project_name = ''): array\n {\n $cats = [];\n $repositories = [];\n if (strlen($project_name) === 0) {\n $project_name = $this->name;\n }\n\n $roots = $this->options->fullTree($this->options->fromCode('path', $project_name, 'list', 'project', 'appui'));\n if (!empty($roots) && !empty($roots['items'])) {\n $roots = $roots['items'];\n foreach ($roots as $root) {\n $paths = $this->options->fullTree($root['id']);\n if (isset($paths['items']) && count($paths['items'])) {\n foreach ($paths['items'] as $repository) {\n if (empty($repository['id_alias'])) {\n $this->log(['No id alias for repo', $repository, $project_name]);\n continue;\n }\n\n $name = $paths['code'] . '/' . $repository['code'];\n if (!isset($cats[$repository['id_alias']])) {\n if (isset($repository['alias'])) {\n unset($repository['alias']['cfg']);\n $cats[$repository['id_alias']] = $repository['alias'];\n }\n }\n\n unset($repository['cfg']);\n unset($repository['alias']);\n $repositories[$name] = $repository;\n $repositories[$name]['title'] = $repository['text'];\n $repositories[$name]['root'] = $paths['code'];\n $repositories[$name]['name'] = $name;\n $repositories[$name]['alias_code'] = $cats[$repository['id_alias']]['code'];\n if (!empty($cats[$repository['id_alias']]['tabs'])) {\n $repositories[$name]['tabs'] = $cats[$repository['id_alias']]['tabs'];\n } elseif (!empty($cats[$repository['id_alias']]['extensions'])) {\n $repositories[$name]['extensions'] = $cats[$repository['id_alias']]['extensions'];\n } elseif (!empty($cats[$repository['id_alias']]['types'])) {\n $repositories[$name]['types'] = $cats[$repository['id_alias']]['types'];\n }\n\n unset($repositories[$name]['alias']);\n }\n }\n }\n }\n\n return $repositories;\n }", "title": "" }, { "docid": "36a8c75eef3a39d188c20e76e534ea1f", "score": "0.4868212", "text": "function get_user($id_user)\n {\n return $this->db->get_where('user', array('id_user' => $id_user))->row_array();\n }", "title": "" }, { "docid": "a23778a1f7f2061c5ab183ad5c1737d6", "score": "0.4862932", "text": "public function fetchRepositoryData(string $vendor, string $package): array\n {\n if ($vendor == 'laravel' && $package == 'laravel') {\n return [\n [\n 'name' => 'taylorotwell',\n 'avatar_url' =>\n 'https://avatars3.githubusercontent.com/u/463230',\n 'contributions' => 2953\n ],\n [\n 'name' => 'GrahamCampbell',\n 'avatar_url' =>\n 'https://avatars0.githubusercontent.com/u/2829600',\n 'contributions' => 40\n ],\n [\n 'name' => 'themsaid',\n 'avatar_url' =>\n 'https://avatars0.githubusercontent.com/u/4332182',\n 'contributions' => 16\n ]\n ];\n } else if ($vendor == 'phalcon' && 'cphalcon') {\n return [\n [\n 'name' => 'sjinks',\n 'avatar_url' =>\n 'https://avatars2.githubusercontent.com/u/7810770?v=3',\n 'contributions' => 1645\n ]\n ];\n } else if ($vendor == 'mrpiatek' && $package == 'repo-lookup') {\n return [\n [\n 'name' => 'mrpiatek',\n 'avatar_url' =>\n 'https://avatars1.githubusercontent.com/u/12552488',\n 'contributions' => 6\n ]\n ];\n }\n\n throw new RepositoryNotFoundException();\n }", "title": "" }, { "docid": "34b9e65b7f376f5ea701d820d79276e7", "score": "0.48627707", "text": "public function get_user_projects($user_id, $order_by, $order_format, $start='', $limit=''){\n \n $q = \"SELECT projects.*, pr_categories.name as 'category_name'\n FROM projects \n INNER JOIN pr_categories \n ON projects.category_id=pr_categories.id\n WHERE projects.user_id = ? ORDER BY $order_by $order_format\";\n \n $run_q = $this->db->query($q, [$user_id]);\n \n if($run_q->num_rows()){\n return $run_q->result();\n }\n \n else{\n return FALSE;\n }\n }", "title": "" }, { "docid": "20f87b623e220ae7449dde2302a954cf", "score": "0.48543516", "text": "public function show($id)\n {\n $user = Project::query()->find($id);\n if(!is_null($user)){\n return response()->json($user::query()->find($id), 200);\n }else{\n return response()->json(['message' => 'Not Found'], 404);\n }\n }", "title": "" }, { "docid": "9c3270f747662e6f34c8bd5267af35ac", "score": "0.48539147", "text": "public function get_user_portfolio_by_id($uId = null)\r\r\n {\r\r\n $user_portfolio = array();\r\r\n \r\r\n if (empty($uId))\r\r\n return FALSE;\r\r\n \r\r\n $this->db->select('*');\r\r\n $this->db->from('user_portfolio_list');\r\r\n $this->db->where('user_id', $uId);\r\r\n $query = $this->db->get();\r\r\n $result = $query->result();\r\r\n if (!empty($result)) {\r\r\n return $result;\r\r\n } else {\r\r\n return array();\r\r\n }\r\r\n \r\r\n }", "title": "" }, { "docid": "17fbd6ac63a22ffdbcee97e55af772fe", "score": "0.48420492", "text": "public function findUser($id) {\n\n\t}", "title": "" }, { "docid": "6647282526a788c4bf4a23b7d49a9ec2", "score": "0.48401088", "text": "public function get($user, $repo, $ref)\n\t{\n\t\t// Build the request path.\n\t\t$path = '/repos/' . $user . '/' . $repo . '/git/refs/' . $ref;\n\n\t\t// Send the request.\n\t\t$response = $this->client->get($this->fetchUrl($path));\n\n\t\t// Validate the response code.\n\t\tif ($response->code != 200)\n\t\t{\n\t\t\t// Decode the error response and throw an exception.\n\t\t\t$error = json_decode($response->body);\n\t\t\tthrow new \\DomainException($error->message, $response->code);\n\t\t}\n\n\t\treturn json_decode($response->body);\n\t}", "title": "" }, { "docid": "07d8f3fbe18ab181dd70fb0eba5a1d13", "score": "0.483944", "text": "private function getAuthCredsForUser($user_id)\n\t{\n\t\t$this->EE->db->select('oauth');\n\t\t$this->EE->db->where(\"member_id = \" . $user_id );\n\t\t$this->EE->db->where('app_id', $this->_appID);\n\t\t$this->EE->db->limit(1);\n\t\t$query = $this->EE->db->get('ig_picpuller_oauths');\n\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t$oauth = $row->oauth;\n\t\t}\n\t\tif (isset($oauth)){\n\t\t\treturn $oauth;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "99c7c55a6c2b66f0267b55c7ba2d4b48", "score": "0.48346263", "text": "function zg_fetch_user_by_id($id) {\n $user = zg_fetch_users_by_ids([$id]);\n if (is_array($user)) {\n zg_slack($user[0], 'debug', 'game user', $user[0]);\n return $user[0];\n }\n return NULL;\n}", "title": "" }, { "docid": "6362bb925b15c7d917590247eefee461", "score": "0.48339337", "text": "public function getList($user, $repo, $page = 0, $limit = 0)\n {\n // Build the request path.\n $path = '/repos/' . $user . '/' . $repo . '/commits';\n\n // Send the request.\n $response = $this->client->get($this->fetchUrl($path, $page, $limit));\n\n // Validate the response code.\n if ($response->code != 200) {\n // Decode the error response and throw an exception.\n $error = json_decode($response->body);\n throw new DomainException($error->message, $response->code);\n }\n\n return json_decode($response->body);\n }", "title": "" } ]
3f9146206e72c11a2f2c01194d623f9a
Collect Visitor information so we can store i with the visitor.
[ { "docid": "1ae5daaeb7b325515f5d01de547cf187", "score": "0.4563402", "text": "public function collect(): array\n {\n $request = request();\n \n return [\n 'ip' => $request->ip(),\n 'user_id' => $request->user()->id ?? 0,\n 'user_agent' => $request->userAgent(),\n 'is_mobile' => (int) $this->dd->isMobile(),\n 'is_desktop' => (int) $this->dd->isDesktop(),\n 'is_bot' => (int) $this->dd->isBot(),\n 'bot' => $this->dd->getBot()['name'] ?? '',\n 'os' => $this->dd->getOs('name'),\n 'browser_version' => $this->dd->getClient('version'),\n 'browser' => $this->dd->getClient('name')\n ];\n }", "title": "" } ]
[ { "docid": "6172a8c8220f0fa1ef85710ef9979f45", "score": "0.609761", "text": "abstract public function getVisitor(): VisitorInterface;", "title": "" }, { "docid": "66b6334856921724ab9335bd4d39135d", "score": "0.60599923", "text": "static function getVisitors(){\n return self::$visitors;\n }", "title": "" }, { "docid": "384b882bb2c0c2a652c655244008b329", "score": "0.5982137", "text": "public function accept(IVisitor $visitor) {\n $visitor->visit( $this );\n }", "title": "" }, { "docid": "2c91b074784a0db671401d6435e051dc", "score": "0.59485364", "text": "protected function collectInformation() {}", "title": "" }, { "docid": "c1640e240f9f93588d3e108c09ed67e2", "score": "0.5908589", "text": "public function getVisitorItems();", "title": "" }, { "docid": "2cdec5b4386efa9e08cb32aa113c5e6d", "score": "0.578532", "text": "abstract public function accept($visitor);", "title": "" }, { "docid": "3c55c74a159307a3627d81f8dc2fc0e9", "score": "0.5693025", "text": "function __construct(){\n self::$visitors++;\n }", "title": "" }, { "docid": "b5bc74b35f9e34ed4da89076304e04a8", "score": "0.5635209", "text": "private function recognizeTheVisitor()\n\t{\n\t\t$this->visitorKnown = false;\n\n\t\t$this->cookieLog = new Piwik_LogStats_Cookie( $this->getCookieName() );\n\t\t/*\n\t\t * Case the visitor has the piwik cookie.\n\t\t * We make sure all the data that should saved in the cookie is available.\n\t\t */\n\n\t\tif( false !== ($idVisitor = $this->cookieLog->get( Piwik_LogStats_Controller::COOKIE_INDEX_IDVISITOR )) )\n\t\t{\n\t\t\t$timestampLastAction = $this->cookieLog->get( Piwik_LogStats_Controller::COOKIE_INDEX_TIMESTAMP_LAST_ACTION );\n\t\t\t$timestampFirstAction = $this->cookieLog->get( Piwik_LogStats_Controller::COOKIE_INDEX_TIMESTAMP_FIRST_ACTION );\n\t\t\t$idVisit = $this->cookieLog->get( Piwik_LogStats_Controller::COOKIE_INDEX_ID_VISIT );\n\t\t\t$idLastAction = $this->cookieLog->get( Piwik_LogStats_Controller::COOKIE_INDEX_ID_LAST_ACTION );\n\n\t\t\tif(\t\t$timestampLastAction !== false && is_numeric($timestampLastAction)\n\t\t\t\t&& \t$timestampFirstAction !== false && is_numeric($timestampFirstAction)\n\t\t\t\t&& \t$idVisit !== false && is_numeric($idVisit)\n\t\t\t\t&& \t$idLastAction !== false && is_numeric($idLastAction)\n\t\t\t)\n\t\t\t{\n\t\t\t\t$this->visitorInfo['visitor_idcookie'] = $idVisitor;\n\t\t\t\t$this->visitorInfo['visit_last_action_time'] = $timestampLastAction;\n\t\t\t\t$this->visitorInfo['visit_first_action_time'] = $timestampFirstAction;\n\t\t\t\t$this->visitorInfo['idvisit'] = $idVisit;\n\t\t\t\t$this->visitorInfo['visit_exit_idaction'] = $idLastAction;\n\n\t\t\t\t$this->visitorKnown = true;\n\n\t\t\t\tprintDebug(\"The visitor is known because he has the piwik cookie (idcookie = {$this->visitorInfo['visitor_idcookie']}, idvisit = {$this->visitorInfo['idvisit']}, last action = \".date(\"r\", $this->visitorInfo['visit_last_action_time']).\") \");\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * If the visitor doesn't have the piwik cookie, we look for a visitor that has exactly the same configuration\n\t\t * and that visited the website today.\n\t\t */\n\t\tif( !$this->visitorKnown )\n\t\t{\n\t\t\t$userInfo = $this->getUserSettingsInformation();\n\t\t\t$md5Config = $userInfo['config_md5config'];\n\n\t\t\t$visitRow = $this->db->fetch(\n\t\t\t\t\t\t\t\t\t\t\" SELECT \tvisitor_idcookie,\n\t\t\t\t\t\t\t\t\t\t\t\t\tUNIX_TIMESTAMP(visit_last_action_time) as visit_last_action_time,\n\t\t\t\t\t\t\t\t\t\t\t\t\tUNIX_TIMESTAMP(visit_first_action_time) as visit_first_action_time,\n\t\t\t\t\t\t\t\t\t\t\t\t\tidvisit,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvisit_exit_idaction\n\t\t\t\t\t\t\t\t\t\tFROM \".$this->db->prefixTable('log_visit').\n\t\t\t\t\t\t\t\t\t\t\" WHERE visit_server_date = ?\n\t\t\t\t\t\t\t\t\t\t\tAND idsite = ?\n\t\t\t\t\t\t\t\t\t\t\tAND config_md5config = ?\n\t\t\t\t\t\t\t\t\t\tORDER BY visit_last_action_time DESC\n\t\t\t\t\t\t\t\t\t\tLIMIT 1\",\n\t\t\t\t\t\t\t\t\t\tarray( $this->getCurrentDate(), $this->idsite, $md5Config));\n\t\t\tif($visitRow\n\t\t\t\t&& count($visitRow) > 0)\n\t\t\t{\n\t\t\t\t$this->visitorInfo['visitor_idcookie'] = $visitRow['visitor_idcookie'];\n\t\t\t\t$this->visitorInfo['visit_last_action_time'] = $visitRow['visit_last_action_time'];\n\t\t\t\t$this->visitorInfo['visit_first_action_time'] = $visitRow['visit_first_action_time'];\n\t\t\t\t$this->visitorInfo['idvisit'] = $visitRow['idvisit'];\n\t\t\t\t$this->visitorInfo['visit_exit_idaction'] = $visitRow['visit_exit_idaction'];\n\n\t\t\t\t$this->visitorKnown = true;\n\n\t\t\t\tprintDebug(\"The visitor is known because of his userSettings+IP (idcookie = {$visitRow['visitor_idcookie']}, idvisit = {$this->visitorInfo['idvisit']}, last action = \".date(\"r\", $this->visitorInfo['visit_last_action_time']).\") \");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fe1bbe6fa75665b924a9c729c8cbc536", "score": "0.5536245", "text": "public function __construct($visitor) {\n $this->visitor = $visitor;\n }", "title": "" }, { "docid": "0e3f7e0ee9aa8d606c09b0b98cd7f497", "score": "0.5521197", "text": "public function getVisitorId()\n {\n return $this->visitor_id;\n }", "title": "" }, { "docid": "d39026a7f2d7951670aa53dd239b4d77", "score": "0.5461823", "text": "public function addVisitor() {\n\t\tif(!DataBase::read($this->_table, array(\"fields\" => array(\"ip\"), \"conditions\" => array(\"ip\" => $_SERVER['REMOTE_ADDR'])))) {\n\t\t\tDataBase::insert($this->_table, array(\n\t\t\t\t\"fields\" => array(\n\t\t\t\t\t\"ip\" => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\t\"first_visit\" => \"NOW()\"\n\t\t\t\t),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "96c186fa55464b968d90a412208fd61f", "score": "0.5421685", "text": "public function getVisitors()\n {\n return (int) $this->getProperty('visitors');\n }", "title": "" }, { "docid": "6db297c64c52b57eca48809cd06c3d8f", "score": "0.5386197", "text": "public function getVisitorId();", "title": "" }, { "docid": "4850236b309a67d2ab6ee73aa291f056", "score": "0.53150725", "text": "public function accept(Ast\\Visitor $visitor)\n {\n $visitor->visit($this);\n }", "title": "" }, { "docid": "5b4b4384b9870aa17561d302d534a263", "score": "0.5311569", "text": "public function visits()\n {\n return $this->morphMany(\n $this->configSettings['page_visit_model'],\n 'visitable'\n );\n }", "title": "" }, { "docid": "935fb1dc44c08a7fd418bba88364ee21", "score": "0.52963215", "text": "public function show(VisitorInfo $visitorInfo)\n {\n //\n }", "title": "" }, { "docid": "bac8c3bdcae999afd9e6e6ed39a72038", "score": "0.5197742", "text": "private static function initVisitorMethodByType(): void\n {\n if (self::$VISITOR_METHOD_BY_TYPES === null) {\n self::$VISITOR_METHOD_BY_TYPES = [];\n\n $class = new \\ReflectionClass(FieldVisitorInterface::class);\n $methods = $class->getMethods();\n\n foreach ($methods as $method) {\n if (\n strpos($method->getName(), 'visit') === 0\n && $method->getNumberOfParameters() > 0\n ) {\n $parameter = $method->getParameters()[0];\n self::$VISITOR_METHOD_BY_TYPES[$parameter->getType()->getName()] = $method->getName();\n }\n }\n }\n }", "title": "" }, { "docid": "fa155c05b65ee2aa9761484cb365f9ea", "score": "0.5095701", "text": "protected function _collectInfo() {\r\n\t\tob_start();\r\n\t\techo \"<pre>\";\r\n\t\techo var_dump($_POST['fields']);\r\n\t\techo \"</pre>\";\r\n\t\t$post = ob_get_contents();\r\n\t\tob_end_clean();\r\n\r\n\t\t$memberID = Members::getMemberID();\r\n\t\t// gets member information from the member id ($_POSTS['fields']['owner'])\r\n\t\t$this->_member = Members::initialiseMemberObject($memberID);\r\n\t\t\r\n\t\t\r\n\t\t$this->_info['member-name'] = $this->memberName();\r\n\t\t\r\n\t\t// timestamp for log\r\n\t\t$this->_info['activity_date'] = date('Y-m-d h:i:s');\r\n\r\n\r\n\t\t$this->_info['member-username'] = $this->memberUsername();\r\n\r\n\r\n\t\t// pulls the member name (Last, First) from the _data[47]['value'] array address\r\n\t\t$this->_info['post-array'] = General :: Sanitize($post);\r\n\r\n\t\t$this->_info['activity'] = General :: Sanitize(key($_POST['action']));\r\n\t\t$this->_info['request-uri'] = $_SERVER['REQUEST_URI'];\r\n\t\t$this->_info['referring-page'] = $_SERVER['HTTP_REFERRER'];\r\n\t\t$this->_info['browser-info'] = $_SERVER['HTTP_USER_AGENT'];\r\n\t\t$this->_info['ip-address'] = $_SERVER['REMOTE_ADDR'];\r\n\t\t$this->_info['remote-host'] = $_SERVER['REMOTE_HOST'];\r\n\t\t$this->_info['remote-port'] = $_SERVER['REMOTE_PORT'];\r\n\t}", "title": "" }, { "docid": "c8c9cafd81b6b49a38c631c287daa576", "score": "0.5074488", "text": "public function accept(Visitor $visitor)\n {\n return null;\n }", "title": "" }, { "docid": "a7744cf9340ed64ddeffdf4a1d795155", "score": "0.50636005", "text": "protected function callAdditionalTrackers(Visitor $visitor): void\n {\n /** @noinspection PhpParamsInspection */\n $authTracker = $this->objectManager->get(FrontenduserAuthenticationTracker::class, $visitor);\n $authTracker->trackByFrontenduserAuthentication();\n /** @noinspection PhpParamsInspection */\n $luxletterTracker = $this->objectManager->get(\n LuxletterlinkAttributeTracker::class,\n $visitor,\n AttributeTracker::CONTEXT_LUXLETTERLINK\n );\n $luxletterTracker->trackFromLuxletterLink();\n }", "title": "" }, { "docid": "24337dacf0f39f21c4c3b505f6734e36", "score": "0.50633645", "text": "public function acceptVisitor($visitee_in, $visitor_in)\n {\n $visitee_in->accept($visitor_in);\n }", "title": "" }, { "docid": "4a7fe80f625f04697465e82e4dc60832", "score": "0.49406227", "text": "private function handleNewVisit()\n\t{\n\t\tprintDebug(\"New Visit.\");\n\n\t\t/**\n\t\t * Get the variables from the REQUEST\n\t\t */\n\n\t\t// Configuration settings\n\t\t$userInfo = $this->getUserSettingsInformation();\n\n\t\t// General information\n\t\t$localTime\t\t\t\t= Piwik_Common::getRequestVar( 'h', $this->getCurrentDate(\"H\"), 'numeric')\n\t\t\t\t\t\t\t.':'. Piwik_Common::getRequestVar( 'm', $this->getCurrentDate(\"i\"), 'numeric')\n\t\t\t\t\t\t\t.':'. Piwik_Common::getRequestVar( 's', $this->getCurrentDate(\"s\"), 'numeric');\n\t\t$serverDate \t= $this->getCurrentDate();\n\t\t$serverTime \t= $this->getCurrentTimestamp();\n\n\t\tif($this->isVisitorKnown())\n\t\t{\n\t\t\t$idcookie = $this->visitorInfo['visitor_idcookie'];\n\t\t\t$returningVisitor = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$idcookie = $this->getVisitorUniqueId();\n\t\t\t$returningVisitor = 0;\n\t\t}\n\n\t\t$defaultTimeOnePageVisit = Piwik_LogStats_Config::getInstance()->LogStats['default_time_one_page_visit'];\n\n\t\t// Location information\n\t\t$country \t\t= Piwik_Common::getCountry($userInfo['location_browser_lang']);\n\t\t$continent\t\t= Piwik_Common::getContinent( $country );\n\n\t\t//Referer information\n\t\t$refererInfo = $this->getRefererInformation();\n\n\t\t/**\n\t\t * Init the action\n\t\t */\n\t\t$action = new Piwik_LogStats_Action( $this->db );\n\n\t\t$actionId = $action->getActionId();\n\n\t\tprintDebug(\"idAction = $actionId\");\n\n\n\t\t/**\n\t\t * Save the visitor\n\t\t */\n\t\t$informationToSave = array(\n\t\t\t//'idvisit' => ,\n\t\t\t'idsite' \t\t\t\t=> $this->idsite,\n\t\t\t'visitor_localtime' \t=> $localTime,\n\t\t\t'visitor_idcookie' \t\t=> $idcookie,\n\t\t\t'visitor_returning' \t=> $returningVisitor,\n\t\t\t'visit_first_action_time' => $this->getDatetimeFromTimestamp($serverTime),\n\t\t\t'visit_last_action_time' => $this->getDatetimeFromTimestamp($serverTime),\n\t\t\t'visit_server_date' \t=> $serverDate,\n\t\t\t'visit_entry_idaction' \t=> $actionId,\n\t\t\t'visit_exit_idaction' \t=> $actionId,\n\t\t\t'visit_total_actions' \t=> 1,\n\t\t\t'visit_total_time' \t\t=> $defaultTimeOnePageVisit,\n\t\t\t'referer_type' \t\t\t=> $refererInfo['referer_type'],\n\t\t\t'referer_name' \t\t\t=> $refererInfo['referer_name'],\n\t\t\t'referer_url' \t\t\t=> $refererInfo['referer_url'],\n\t\t\t'referer_keyword' \t\t=> $refererInfo['referer_keyword'],\n\t\t\t'config_md5config' \t\t=> $userInfo['config_md5config'],\n\t\t\t'config_os' \t\t\t=> $userInfo['config_os'],\n\t\t\t'config_browser_name' \t=> $userInfo['config_browser_name'],\n\t\t\t'config_browser_version' => $userInfo['config_browser_version'],\n\t\t\t'config_resolution' \t=> $userInfo['config_resolution'],\n\t\t\t'config_color_depth' \t=> $userInfo['config_color_depth'],\n\t\t\t'config_pdf' \t\t\t=> $userInfo['config_pdf'],\n\t\t\t'config_flash' \t\t\t=> $userInfo['config_flash'],\n\t\t\t'config_java' \t\t\t=> $userInfo['config_java'],\n\t\t\t'config_director' \t\t=> $userInfo['config_director'],\n\t\t\t'config_quicktime' \t\t=> $userInfo['config_quicktime'],\n\t\t\t'config_realplayer' \t=> $userInfo['config_realplayer'],\n\t\t\t'config_windowsmedia' \t=> $userInfo['config_windowsmedia'],\n\t\t\t'config_cookie' \t\t=> $userInfo['config_cookie'],\n\t\t\t'location_ip' \t\t\t=> $userInfo['location_ip'],\n\t\t\t'location_browser_lang' => $userInfo['location_browser_lang'],\n\t\t\t'location_country' \t\t=> $country,\n\t\t\t'location_continent' \t=> $continent,\n\t\t);\n\n\n\t\t$fields = implode(\", \", array_keys($informationToSave));\n\t\t$values = substr(str_repeat( \"?,\",count($informationToSave)),0,-1);\n\n\t\t$this->db->query( \"INSERT INTO \".$this->db->prefixTable('log_visit').\n\t\t\t\t\t\t\" ($fields) VALUES ($values)\", array_values($informationToSave));\n\n\t\t$idVisit = $this->db->lastInsertId();\n\n\t\t// Update the visitor information attribute with this information array\n\t\t$this->visitorInfo = $informationToSave;\n\t\t$this->visitorInfo['idvisit'] = $idVisit;\n\n\t\t// we have to save timestamp in the object properties, whereas mysql eats some other datetime format\n\t\t$this->visitorInfo['visit_first_action_time'] = $serverTime;\n\t\t$this->visitorInfo['visit_last_action_time'] = $serverTime;\n\n\t\t/**\n\t\t * Save the action\n\t\t */\n\t\t$action->record( $idVisit, 0, 0 );\n\n\t}", "title": "" }, { "docid": "96eb5e0d5befbe098b432e02e6832827", "score": "0.49355948", "text": "public function __construct(Visit $visit)\n {\n $this->visit = $visit;\n }", "title": "" }, { "docid": "4644ea8b9a5a3b167c0770397651fbe3", "score": "0.49297696", "text": "public function getVisited(): CollectionInterface;", "title": "" }, { "docid": "0e4fafdffdda1516d8c32c9dbbf48b00", "score": "0.48743024", "text": "public function CollectorInformation()\r\n {\r\n $this->MagentoInfo();\r\n $this->CacheInfo();\r\n $this->IndexInfo();\r\n $this->ExtraneousModulesInfo();\r\n $this->MySqlInfo();\r\n $this->ConfigInfo();\r\n $this->ExtensionsInfo();\r\n\r\n return $this->getTableInformation();\r\n }", "title": "" }, { "docid": "53551b04c8676e5bcd70bee4250c8800", "score": "0.48691183", "text": "public function setVisitorId($var)\n {\n GPBUtil::checkString($var, True);\n $this->visitor_id = $var;\n\n return $this;\n }", "title": "" }, { "docid": "0e8169b6147f3fb9c1c5ffdcb339f889", "score": "0.48665038", "text": "public function getVisits();", "title": "" }, { "docid": "a3f78582544f2b5d631e55f0773ba1df", "score": "0.48502773", "text": "private function __visitorProcesses()\n\t{\n\t\tglobal $MySmartBB;\n\t\t\n\t\t// ... //\n\t\t\n\t\t$MySmartBB->_CONF[ 'member_permission' ] = false;\n\t\t\n\t\t// ... //\n\t\t\n\t\t// Get the visitor's group info and store it in _CONF['group_info']\n\t\t// TODO : Visitors group id should be dynamic.\n\t\t$MySmartBB->rec->table = $MySmartBB->table[ 'group' ];\n\t\t$MySmartBB->rec->filter = \"id='7'\";\n\t\t\n\t\t$MySmartBB->_CONF[ 'group_info' ] = $MySmartBB->rec->getInfo();\n\t\t\n\t\t// ... //\n\t\t\n\t\t// Insert the visitor into online table\n\t\t$MySmartBB->online->onlineVisitor();\n\t\t\n\t\t// ... //\n\t\t\t\t\n\t\t// Get visitor's style\n\t\t// Check first if the visitor selected a specific style, otherwise set the default style to show.\n\t\t$style_id = (int) ( $MySmartBB->func->isCookie( $MySmartBB->_CONF[ 'style_cookie' ] ) ) ? $MySmartBB->_COOKIE[ $MySmartBB->_CONF[ 'style_cookie' ] ] : $MySmartBB->_CONF[ 'info_row' ][ 'def_style' ];\n\t\t\n\t\t$MySmartBB->rec->table = $MySmartBB->table[ 'style' ];\n\t\t$MySmartBB->rec->filter = \"id='\" . $style_id . \"'\";\n\t\t\n\t\t$MySmartBB->_CONF[ 'style_info' ] = $MySmartBB->rec->getInfo();\n\t\t\n\t\tif ( !$MySmartBB->_CONF[ 'style_info' ] )\n\t\t{\n\t\t\tsetcookie( $MySmartBB->_CONF[ 'style_cookie' ], '' );\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t// ... //\n\t\t\n\t\t$this->_setStyleInformation();\n\t\t\n\t\t// ... //\n\t\t\n\t\t// Sorry visitor you can't visit this forum today :(\n\t\tif ( !$MySmartBB->_CONF[ 'info_row' ][ $MySmartBB->_CONF[ 'day' ] ] )\n \t\t\t$MySmartBB->func->error( $MySmartBB->lang_common[ 'visitor_pervented' ] );\n\t}", "title": "" }, { "docid": "068451d039709a1845158dd2d9bda773", "score": "0.48470023", "text": "public function __construct(WebsiteVisitors $visitor)\n {\n $this->visitor = $visitor;\n }", "title": "" }, { "docid": "b0600d0f2dd127febc9e23b772c2057c", "score": "0.48456374", "text": "public function render(): array\n {\n $pagevisits = [];\n /** @var Visitor $visitor */\n $visitor = $this->arguments['visitor'];\n /** @var Pagevisit $pagevisit */\n foreach ($visitor->getPagevisits() as $pagevisit) {\n if ($pagevisit->getPage() !== null) {\n if ((int)$this->arguments['pageIdentifier'] === $pagevisit->getPage()->getUid()) {\n $pagevisits[] = $pagevisit;\n }\n }\n }\n return $pagevisits;\n }", "title": "" }, { "docid": "cb00713633df5c7f39297c0789d54df8", "score": "0.48330963", "text": "public function visitors ()\n { \n $data = $op = [];\t \n $data['supplier_id'] = $this->userSess->supplier_id; \n if (!empty($data['supplier_id']))\n {\n $op['total_visitors'] = $this->widgetObj->visitors_counts($data,[],true);\t\t\t\t\n $op['visitors_ratio'] = $this->widgetObj->visitors_counts($data,['filter'=>'day','days'=>30],false);\t\t\t\t\n $this->statusCode = $this->config->get('httperr.SUCCESS');\n }\n else\n {\n $op['msg'] = trans('general.no_datas_found');\n $op['status'] = 'error';\n $this->statusCode = $this->config->get('httperr.PARAMS_MISSING');\n }\n return $op;\n }", "title": "" }, { "docid": "998179b3059a0542519e4797e3eca066", "score": "0.48310813", "text": "function getAllVisit($iIdUSer){\n\t\t$aGetArray=Array();\n\t\t$aVectorVisit=Array();\n\t\t#get visiting\n\t\t$sSQL_Select = GenerateSelect($this->sFields, SITE_DB_TB_SystemLatestPeople, \"id_user='$iIdUSer'\");\n\t\t$DB_Result \t = $this->oDBLP->Query($sSQL_Select);\n\t\t$aGetArray\t = $this->oDBLP->FetchRowAssoc($DB_Result);\n\t\t$aVectorVisit =unserialize($aGetArray['latest_people']);\n\t\n\t\t#retorna el vector de latest people\n\t\treturn $aVectorVisit; \n\t}", "title": "" }, { "docid": "8987c96e81829e6a77ea7c443642ad65", "score": "0.48103726", "text": "public function edit(Visitor $visitor)\n {\n //\n }", "title": "" }, { "docid": "d89af01e330e6d718e48b6e8dc037c3a", "score": "0.47999692", "text": "public function setVisitorId($visitorId);", "title": "" }, { "docid": "c17514ad8fc1e52818f69e4cbbce4df0", "score": "0.47981924", "text": "public function visit(NodeVisitorInterface $visitor)\n {\n foreach ($this->children as $child)\n {\n $child->visit($visitor);\n }\n }", "title": "" }, { "docid": "132da83f2fafcf5e309a7b37e3d46648", "score": "0.47480306", "text": "public function addVisit()\n {\n $visitClass = $this->configSettings['page_visit_model'];\n\n $visit = new $visitClass();\n $visit->visitable_id = $this->id;\n $visit->visitable_type = get_class($this);\n $this->visits()->save($visit);\n\n return $visit;\n }", "title": "" }, { "docid": "5a4aab74538a8021a92e299dfb53863d", "score": "0.4729496", "text": "public function record()\n\t{\n\t\t// Ignore CLI requests\n\t\tif (is_cli())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Check for ignored AJAX requests\n\t\tif (Services::request()->isAJAX() && $this->config->ignoreAjax)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$visits = new VisitModel();\n\t\t$visit = new Visit();\n\n\t\t// start the object with parsed URL components (https://secure.php.net/manual/en/function.parse-url.php)\n\t\t$visit->fill(parse_url( current_url() ));\n\n\t\t// add session/server specifics\n\t\t$visit->session_id = $this->session->session_id;\n\t\t$visit->user_id = $this->session->{$this->config->userSource} ?? null;\n\t\t$visit->user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';\n\t\t$visit->ip_address = $_SERVER['REMOTE_ADDR'] ?? null;\n\n\t\t// check for an existing similar record\n\t\tif ($similar = $visit->getSimilar($this->config->trackingMethod, $this->config->resetMinutes)):\n\t\t\t// increment number of views and update\n\t\t\t$similar->views++;\n\t\t\t$visits->save($similar);\n\t\t\treturn $similar;\n\t\tendif;\n\n\t\t// create a new visit record\n\t\t$visits->save($visit);\n\t\treturn $visit;\n\t}", "title": "" }, { "docid": "071a7d084dc5de175c91fddc7590832c", "score": "0.47264355", "text": "public function edit(VisitorInfo $visitorInfo)\n {\n //\n }", "title": "" }, { "docid": "2e4ade7559c2fa1ccfcb2ef8aab67c5e", "score": "0.472457", "text": "public function startVisiting(&$data, Type $type, Context $context): void;", "title": "" }, { "docid": "15cd69c54db7d33dfca67196b4b3fa5d", "score": "0.47233063", "text": "public function accept(Iml_Tree_Visitor_Interface $visitor)\n {\n $visitor->visit($this);\n $this->getRootNode()->accept($visitor);\n }", "title": "" }, { "docid": "352780bb906a3c36b59984e213c0e474", "score": "0.47162318", "text": "abstract protected function collect();", "title": "" }, { "docid": "e31a8df49e25082794b13dcd0880caea", "score": "0.47133458", "text": "public function setVisitor(ElementVisitorInterface $visitor);", "title": "" }, { "docid": "4729737e5c9de8a1d60943c85d870aaa", "score": "0.47046825", "text": "public function accept(ElementVisitorInterface $visitor)\n\t{\n\t\t$visitor->visitFile($this);\n\t}", "title": "" }, { "docid": "3d2579f9d7efe4ba24bdd9aec3d14153", "score": "0.46881744", "text": "public function setVisitorStatut()\n\t{\n\t\tsession()->put('statut', 'visitor');\n\t}", "title": "" }, { "docid": "ccaa7a3bb85df5672c4288f86e057020", "score": "0.46447673", "text": "protected function allVisits(){\n $query = $this->conn()->prepare(\"SELECT * FROM visitors\");\n $query->execute();\n $data = $this->allResults($query);\n return $data;\n }", "title": "" }, { "docid": "6c72b4df0dcd192e0428e5b947f14666", "score": "0.46377683", "text": "public function getNodeVisitors()\n {\n return [];\n }", "title": "" }, { "docid": "a5b4b5f74416776da5b3351cd37f9b4e", "score": "0.46334195", "text": "public function viewVisitors()\n {\n // get user id\n $user_id = Gateman::where([\n \t['gateman_id', $this->user->id],\n \t['request_status', 1],\n ])->pluck('user_id');\n\n // get visitors with the user_id\n $visitors = Visitor::whereIn('user_id', $user_id)\n \t->with('user')\n \t->get();\n\n // list out visitors details\n if ($visitors){\n return response()->json([\n 'visitors' => $visitors->count(),\n 'visitor' => $visitors,\n 'status' => true\n ], 200);\n }\n else {\n return response()->json([\n 'message' => 'No Visitors found',\n 'status' => false\n ], 404);\n }\n }", "title": "" }, { "docid": "de9d6f10a6aae5e1e59360ca5aef864e", "score": "0.46264386", "text": "public function manageVisitors(array $params = [])\n {\n $vd = H_visitors::getVisitorData($params['ip'] ?? '91.173.88.22');\n if (Cookies::exists(VISITOR_COOKIE_NAME)) {\n $query_data = [\n 'where' => ['cookies' => Cookies::get(VISITOR_COOKIE_NAME), 'ipAddress' => $params['ip']],\n 'op' => 'OR',\n 'return_mode' => 'class'\n ];\n $v_data = $this->getAllItem($query_data);\n if ($v_data->count() == 0) {\n return $this->add_new_visitor($vd);\n // $v_data->ipAddress = $v_data->ipAddress != $params['ip'] ? $params['ip'] : $v_data->ipAddress;\n } elseif ($v_data->count() === 1) {\n $v_data = current($v_data->get_results());\n $v_data->id = $v_data->{$this->_colID};\n $v_data->hits = $v_data->hits + 1;\n if (is_array($vd) && count($vd) > 0) {\n $fields = H::getObjectProperties($v_data);\n $vd = $this->container->make(Request::class)->transform_keys($vd, H_visitors::new_IpAPI_keys());\n if (!$fields == $vd) {\n $v_data->assign($vd);\n $v_data->useragent = $v_data->useragent != Session::uagent_no_version() ? Session::uagent_no_version() : $v_data->useragent;\n }\n } else {\n $v_data->ipAddress = $vd;\n }\n if ($save = $v_data->save()) {\n return $save;\n }\n } else {\n $this->clean_visitor_database('ip');\n }\n }\n return $this->add_new_visitor($vd);\n }", "title": "" }, { "docid": "20acf7c9002bc370286f6b9bad95c1ce", "score": "0.4616415", "text": "public function renderIcons($visitorDetails)\n {\n }", "title": "" }, { "docid": "6a703fc4904b87a459978459b0ecb81d", "score": "0.45807838", "text": "function LoadVisitorData()\n {\n // Get the path of the plugin\n $this->mPluginDir = dirname(__FILE__) . '/';\n $this->mPluginUrl = '';\n \n // Include MaxMind's API\n /*include( '/home/content/08/10374308/html/lp/wp-content/plugins/visitor-country/geoip.inc');*/\n \n // Get the visitor IP\n $iIp = $_SERVER[ 'REMOTE_ADDR' ];\n if ( !empty( $_SERVER[ 'HTTP_CLIENT_IP' ] ) ) \n { \n // check ip from share internet\n $iIp = $_SERVER[ 'HTTP_CLIENT_IP' ];\n } elseif ( !empty( $_SERVER[ 'HTTP_X_FORWARDED_FOR'] ) )\n {\n // to check ip is pass from proxy\n $iIp = $_SERVER[ 'HTTP_X_FORWARDED_FOR' ];\n }\n $iIpList = explode(\",\", $iIp);\n $this->mIP=$iIpList[0];\n \n // Connect to MaxMind's GeoIP\n $iGeoIP = geoip_open( $this->mPluginDir . 'GeoIP.dat', GEOIP_STANDARD);\n \n // Get the country id\n $iCountryID = geoip_country_id_by_addr( $iGeoIP, $this->mIP );\n \n if ( $iCountryID !== false ) {\n // Lookup country code and name\n $this->mCode = $iGeoIP->GEOIP_COUNTRY_CODES[$iCountryID];\n $this->mName = $iGeoIP->GEOIP_COUNTRY_NAMES[$iCountryID]; \n }\n \n // Close MaxMind's connection\n geoip_close($iGeoIP);\n }", "title": "" }, { "docid": "0827b2fad124c89dd21d3a7dacd1ef97", "score": "0.4575569", "text": "public function accept(cartVisitor $visitor)\n {\n $visitor->visitFruit($this);\n }", "title": "" }, { "docid": "5e3ad6bcbf92eed71b866943212e0699", "score": "0.45717704", "text": "public function setInfo(\\Serializable $i)\n {\n $this->info = $i;\n }", "title": "" }, { "docid": "dc46922807fd9b3b7553042913181d06", "score": "0.4559083", "text": "public function addPageVisitor( Request $request ) {\n\t\t$ip = $this->getUserIP();\n\t\t$pageVisitor = PageVisitor::where( 'page_id', $request->input( 'page_id' ) )->where( 'ip_address', $ip )->first();\n\t\tif ( ( ! empty( $pageVisitor ) ) && $pageVisitor->count() > 0 ) {\n\t\t\t$pageVisitor = PageVisitor::find( $pageVisitor->id );\n\t\t} else {\n\t\t\t$pageVisitor = new PageVisitor();\n\t\t}\n\n\t\t$pageVisitor->page_id = $request->input( 'page_id' );\n\t\t$pageVisitor->ip_address = $ip;\n\t\t$pageVisitor->visits = $pageVisitor->visits + 1;\n\t\t$pageVisitor->save();\n\t}", "title": "" }, { "docid": "0c94d59ce3a02bc0950ebea15d378b55", "score": "0.45547894", "text": "public function visitor()\n {\n $this->paging['per_page'] = 20;\n $limit = $this->paging['per_page'];\n if ($this->uri->segment(3) != '' && $this->uri->segment(4) != '') {\n\n $offset = ($this->uri->segment(5) != '') ? $this->uri->segment(5) : 0;\n\n $sortby = $this->uri->segment(3);\n\n $orderby = $this->uri->segment(4);\n\n } else {\n\n $offset = ($this->uri->segment(3) != '') ? $this->uri->segment(3) : 0;\n\n $sortby = 'user_id';\n\n $orderby = 'desc';\n\n }\n\n $this->data['offset'] = $offset; \n\n \n $sql = \"SELECT COUNT(*) AS visitor,DATE_FORMAT(insert_date,'%Y-%m-%d') AS visit_date FROM ailee_user_visit GROUP BY DATE_FORMAT(insert_date,'%Y-%m-%d') ORDER BY visit_date DESC LIMIT $offset,$limit\";\n $this->data['site_visitor'] = $this->db->query($sql)->result_array();\n\n $tot_sql = \"SELECT COUNT(*) AS visitor,DATE_FORMAT(insert_date,'%Y-%m-%d') AS visit_date FROM ailee_user_visit GROUP BY DATE_FORMAT(insert_date,'%Y-%m-%d') ORDER BY visit_date DESC\";\n $total_rows = $this->db->query($tot_sql)->result_array();\n // This is userd for pagination offset and limoi End\n\n //echo \"<pre>\";print_r($this->data['users'] );die();\n\n //This if and else use for asc and desc while click on any field start\n if ($this->uri->segment(3) != '' && $this->uri->segment(4) != '') {\n\n $this->paging['base_url'] = site_url(\"user_manage/visitor/\" . $short_by . \"/\" . $order_by);\n\n } else {\n\n $this->paging['base_url'] = site_url(\"user_manage/visitor/\");\n\n }\n\n if ($this->uri->segment(3) != '' && $this->uri->segment(4) != '') {\n\n $this->paging['uri_segment'] = 5;\n\n } else {\n\n $this->paging['uri_segment'] = 3;\n\n }\n //This if and else use for asc and desc while click on any field End\n\n $contition_array = array('is_delete =' => '0');\n $this->paging['total_rows'] = count($total_rows);\n\n $this->data['total_rows'] = $this->paging['total_rows'];\n\n $this->data['limit'] = $limit;\n\n $this->pagination->initialize($this->paging);\n $this->load->view('users/user_visit', $this->data);\n }", "title": "" }, { "docid": "37df53179bbee3d3d3478fc0597fd424", "score": "0.4549322", "text": "public function ipReport()\n {\n return Visit::query()->toBase()->select([\n 'ip',\n 'visits' => 'COUNT(*)',\n ])->get();\n }", "title": "" }, { "docid": "13285289ce6b3adedaece1757b028e23", "score": "0.45464748", "text": "function Count_visitors() {\n $this->referer = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : \"\";\n $_SERVER['HTTP_HOST'] = \"www.\".ltrim($_SERVER['HTTP_HOST'], \"www.\");\n }", "title": "" }, { "docid": "3b2e3bfe95c5ba774e6384dbcb508725", "score": "0.4535812", "text": "protected function afterAction(Visitor $visitor): array\n {\n $result = $this->signalDispatch(__CLASS__, 'afterTracking', [$visitor, $this->actionMethodName, [], []]);\n return $result[2];\n }", "title": "" }, { "docid": "42e24b5977c14c66c98139e5eeee0227", "score": "0.4503809", "text": "private function handleKnownVisit()\n\t{\n\t\tprintDebug(\"Visit known.\");\n\n\t\t/**\n\t\t * Init the action\n\t\t */\n\t\t$action = new Piwik_LogStats_Action( $this->db );\n\n\t\t$actionId = $action->getActionId();\n\n\t\tprintDebug(\"idAction = $actionId\");\n\n\t\t$serverTime \t= $this->getCurrentTimestamp();\n\t\t$datetimeServer = $this->getDatetimeFromTimestamp($serverTime);\n\n\t\t$this->db->query(\"UPDATE \". $this->db->prefixTable('log_visit').\"\n\t\t\t\t\t\t\tSET visit_last_action_time = ?,\n\t\t\t\t\t\t\t\tvisit_exit_idaction = ?,\n\t\t\t\t\t\t\t\tvisit_total_actions = visit_total_actions + 1,\n\t\t\t\t\t\t\t\tvisit_total_time = UNIX_TIMESTAMP(visit_last_action_time) - UNIX_TIMESTAMP(visit_first_action_time)\n\t\t\t\t\t\t\tWHERE idvisit = ?\n\t\t\t\t\t\t\tLIMIT 1\",\n\t\t\t\t\t\t\tarray( \t$datetimeServer,\n\t\t\t\t\t\t\t\t\t$actionId,\n\t\t\t\t\t\t\t\t\t$this->visitorInfo['idvisit'] )\n\t\t\t\t);\n\t\t/**\n\t\t * Save the action\n\t\t */\n\t\t$timespentLastAction = $serverTime - $this->visitorInfo['visit_last_action_time'];\n\n\t\t$action->record( \t$this->visitorInfo['idvisit'],\n\t\t\t\t\t\t\t$this->visitorInfo['visit_exit_idaction'],\n\t\t\t\t\t\t\t$timespentLastAction\n\t\t\t);\n\n\n\t\t/**\n\t\t * Cookie fields to be updated\n\t\t */\n\t\t$this->visitorInfo['visit_last_action_time'] = $serverTime;\n\t\t$this->visitorInfo['visit_exit_idaction'] = $actionId;\n\n\n\t}", "title": "" }, { "docid": "a4c4a7ab9149ffa1da16c495a93bb847", "score": "0.44973522", "text": "public function __debugInfo()\n {\n $infos = array_filter(get_object_vars($this), static function ($var) {\n return $var;\n });\n\n foreach (['dumpProperties', 'constructedObjectId', 'constructed'] as $property) {\n if (isset($infos[$property])) {\n unset($infos[$property]);\n }\n }\n\n $this->addExtraDebugInfos($infos);\n\n return $infos;\n }", "title": "" }, { "docid": "7f2940b83ff01f93ca950113310ec63a", "score": "0.44907454", "text": "private function trackVisits()\n {\n $dateTime = $this->dateTime;\n $idSite = $this->idSite;\n\n // Visit 1: keyword and few URLs\n $t = self::getTracker($idSite, $dateTime, $defaultInit = true, $useThirdPartyCookie = 1);\n $t->setUrlReferrer('http://bing.com/search?q=Hello world');\n\n // Generate a few page views that will be truncated\n $t->setUrl('http://example.org/category/Page1');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/category/Page2');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/category/Page3');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/category/Page3');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/category/Page4');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/category/Page4');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/category/Page4');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/category.htm');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/page.htm');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/index.htm');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/page.htm');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/page.htm');\n self::checkResponse($t->doTrackPageView('Hello'));\n $t->setUrl('http://example.org/contact.htm');\n self::checkResponse($t->doTrackPageView('Hello'));\n\n // VISIT 2 = Another keyword\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(1)->getDatetime());\n $t->setUrlReferrer('http://www.google.com.vn/url?q=Salut');\n self::checkResponse($t->doTrackPageView('incredible title!'));\n\n // Visit 3 = Another keyword\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(2)->getDatetime());\n $t->setUrlReferrer('http://www.google.com.vn/url?q=Kia Ora');\n self::checkResponse($t->doTrackPageView('incredible title!'));\n\n // Visit 4 = Kia Ora again\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(3)->getDatetime());\n $t->setUrlReferrer('http://www.google.com.vn/url?q=Kia Ora');\n self::checkResponse($t->doTrackPageView('incredible title!'));\n\n // Visit 5 = Another search engine\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(4)->getDatetime());\n $t->setUrlReferrer('http://nz.search.yahoo.com/search?p=Kia Ora');\n self::checkResponse($t->doTrackPageView('incredible title!'));\n\n // Visit 6 = Another search engine\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(5)->getDatetime());\n $t->setUrlReferrer('http://images.search.yahoo.com/search/images;_ylt=A2KcWcNKJzF?p=Kia%20Ora%20');\n self::checkResponse($t->doTrackPageView('incredible title!'));\n\n // Visit 7 = Another search engine\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(6)->getDatetime());\n $t->setUrlReferrer('http://nz.bing.com/images/search?q=+++Kia+ora+++');\n self::checkResponse($t->doTrackPageView('incredible title!'));\n }", "title": "" }, { "docid": "cc2a32bea9e1d6efc852a97c059217a9", "score": "0.44662422", "text": "function _get_visit_users() {\n if (!$this->user->can('manage_vusers')) $this->_error('No access');\n }", "title": "" }, { "docid": "5b9afa3ff2a1a473c6b28ece7c98d930", "score": "0.44447553", "text": "protected function getVisitorIdCookie() : void {\n if (isset($_COOKIE['delayedCoupons_visitorId'])) {\n $this->visitorIdCookie = $_COOKIE['delayedCoupons_visitorId'];\n }\n }", "title": "" }, { "docid": "070cc0ec19bf47d69744990f967a01ee", "score": "0.44381887", "text": "public function visitas() {\n return $this->hasMany(Visita::class);\n }", "title": "" }, { "docid": "9174a2542bf2511b19a3960d2dc120a3", "score": "0.44341782", "text": "abstract function visitSoftware(SoftwareVisitee $softwareVisitee_In);", "title": "" }, { "docid": "03a327e4ae357c6199ecdefd7057e1a0", "score": "0.44266903", "text": "public function getVisitas()\n {\n return $this->hasMany(Visita::className(), ['idAnimal' => 'id']);\n }", "title": "" }, { "docid": "aea0df2a86914648889d838998f5339f", "score": "0.4418023", "text": "public function index()\n {\n return Visit::all();\n }", "title": "" }, { "docid": "31b6adc371aff4f0867f045df742537f", "score": "0.44149625", "text": "public function __toString() {\n\t\t\treturn sprintf('Visitor Object %s', $this->intId);\n\t\t}", "title": "" }, { "docid": "6023c8317b8020ff590553d2125d6208", "score": "0.4395348", "text": "function collect() {}", "title": "" }, { "docid": "cbefaa3a294a8f05f62752e30e690e2d", "score": "0.43850464", "text": "protected function callAdditionalTrackers(Visitor $visitor, array $arguments): void\n {\n $authTracker = GeneralUtility::makeInstance(\n FrontenduserAuthenticationTracker::class,\n $visitor,\n AttributeTracker::CONTEXT_FRONTENDUSER,\n (int)$arguments['pageUid']\n );\n $authTracker->trackByFrontenduserAuthentication();\n\n $luxletterTracker = GeneralUtility::makeInstance(\n LuxletterlinkAttributeTracker::class,\n $visitor,\n AttributeTracker::CONTEXT_LUXLETTERLINK,\n (int)$arguments['pageUid']\n );\n $luxletterTracker->trackFromLuxletterLink();\n }", "title": "" }, { "docid": "d36bf85b634fb538a0393346d8c0b6a3", "score": "0.43690127", "text": "public function onNewVisit(Request $request, Visitor $visitor, $action)\n {\n $headers = [];\n \n foreach ($_SERVER as $key => $value) {\n \n // skip all none HTTP_* headers!\n if (substr($key, 0, 5) !== 'HTTP_') {\n continue;\n }\n \n $headers[$key] = $value;\n }\n \n return serialize($headers);\n }", "title": "" }, { "docid": "bd0b404a29ca5b4cbe6d9bd68bd21d58", "score": "0.43666232", "text": "private function GetVisitorIP() {\r\n if (getenv('HTTP_X_FORWARDED_FOR')) {\r\n $pipaddress = getenv('HTTP_X_FORWARDED_FOR');\r\n $ipaddress = getenv('REMOTE_ADDR');\r\n Logger::LogInformation(\"GetVisistorIP()## IP address is : \" . $pipaddress . \"(via $ipaddress)\");\r\n } else {\r\n $ipaddress = getenv('REMOTE_ADDR');\r\n Logger::LogInformation(\"GetVisistorIP()## Your IP address is : $ipaddress\");\r\n }\r\n return $ipaddress;\r\n }", "title": "" }, { "docid": "07ea4ab416e880c027b27f31013d9dea", "score": "0.4354817", "text": "private function trackVisits()\n {\n $dateTime = $this->dateTime;\n $idSite = $this->idSite;\n $t = self::getTracker($idSite, $dateTime, $defaultInit = true, $useThirdPartyCookie = 1);\n\n // Also testing to record this as a bot while specifically allowing bots\n $t->setUserAgent('Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');\n $t->DEBUG_APPEND_URL .= '&bots=1';\n $t->DEBUG_APPEND_URL .= '&forceIpAnonymization=1';\n // VISIT 1 = Referrer is \"Keyword not defined\"\n // Alsotrigger goal to check that attribution goes to this keyword\n $t->setUrlReferrer('http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CC&url=http%3A%2F%2Fpiwik.org%2F&ei=&usg=');\n $t->setUrl('http://example.org/this%20is%20cool!');\n self::checkResponse($t->doTrackPageView('incredible title!'));\n $idGoal = Piwik_Goals_API::getInstance()->addGoal($idSite, 'triggered js', 'manually', '', '');\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(0.3)->getDatetime());\n self::checkResponse($t->doTrackGoal($idGoal, $revenue = 42));\n\n // VISIT 2 = Referrer has keyword, but the URL should be rewritten\n // in Live Output to point to google search result page\n $t->setForceVisitDateTime(Piwik_Date::factory($dateTime)->addHour(2)->getDatetime());\n $t->setUrlReferrer('http://www.google.com.vn/url?sa=t&rct=j&q=%3C%3E%26%5C%22the%20pdo%20extension%20is%20required%20for%20this%20adapter%20but%20the%20extension%20is%20not%20loaded&source=web&cd=4&ved=0FjAD&url=http%3A%2F%2Fforum.piwik.org%2Fread.php%3F2%2C1011&ei=y-HHAQ&usg=AFQjCN2-nt5_GgDeg&cad=rja');\n\n\t // Test with empty title, that the output of Live is valid\n self::checkResponse($t->doTrackPageView(''));\n\n }", "title": "" }, { "docid": "d46ce27e1aea5f08300bcf7f378f451f", "score": "0.43529728", "text": "public function getvisitServiceFilter()\n {\n return $this->visitservicefilter;\n }", "title": "" }, { "docid": "6b6529e9b2ce37e50f1be3d2ae6965bc", "score": "0.4352647", "text": "public function onVisitExpression(VisitExpressionListenerInterface $listener): void\n {\n if (null === $this->listeners) {\n $this->listeners = new \\SplObjectStorage();\n }\n $this->listeners->attach($listener);\n }", "title": "" }, { "docid": "fd92eb98ec2c5e4cbbe75fa62ccc24fb", "score": "0.43425322", "text": "protected function mergePagevisits(Visitor $newVisitor): void\n {\n $connection = DatabaseUtility::getConnectionForTable(Pagevisit::TABLE_NAME);\n $connection->executeQuery(\n 'update ' . Pagevisit::TABLE_NAME . ' set visitor = ' . (int)$this->getFirstVisitor()->getUid() . ' ' .\n 'where visitor = ' . (int)$newVisitor->getUid()\n );\n }", "title": "" }, { "docid": "bbdb524446b420d44385b82687686e10", "score": "0.43423423", "text": "public function getNodeVisitors()\n {\n return [\n new GetAttrAdjuster\n ];\n }", "title": "" }, { "docid": "b0626608bd65ffeffb54b08b85895250", "score": "0.4337082", "text": "public function infos_reserv() {\r\n\t\tinclude_once 'class/info_reserv.php';\r\n\t\t$info = new info_reserv(intval($_GET['id']));\r\n\t\t$info->req_cout();\r\n\t\t$this->cout = $info->get_cout();\r\n\t}", "title": "" }, { "docid": "ee2588f941ad297d360ad4d353d08ccd", "score": "0.4333557", "text": "protected function initVisitorId()\n\t{\n\t\t$vid = null;\n\t\tif (!empty($_COOKIE[self::COOKIE_NAME_VISITOR_ID])) {\n\t\t\t$vid = $_COOKIE[self::COOKIE_NAME_VISITOR_ID];\n\t\t}\n\t\treturn $vid;\n\t}", "title": "" }, { "docid": "b119cab6d6befcbe55607ef217e86310", "score": "0.43282813", "text": "public function addVisitAndCountAll()\n {\n $this->addVisit();\n\n return $this->getTotalVisitsCountAttribute();\n }", "title": "" }, { "docid": "6185fb8cab06c4358fe037cf770e5a74", "score": "0.43200472", "text": "public function __debugInfo() {\n\t\n\t\t$info = array(\n\t\t\t'count' => $this->count(),\n\t\t\t'items' => array(),\n\t\t);\n\t\t\n\t\t$info = array_merge($info, parent::__debugInfo());\n\t\t\n\t\tif(count($this->data)) {\n\t\t\t$info['items'] = array();\n\t\t\tforeach($this->data as $key => $value) {\n\t\t\t\tif(is_object($value) && $value instanceof Wire) $key = $value->className() . \":$key\";\n\t\t\t\t$info['items'][$key] = $this->debugInfoItem($value);\n\t\t\t}\n\t\t}\n\n\t\tif(count($this->extraData)) $info['extraData'] = $this->extraData;\n\t\t\n\t\t$trackers = array(\n\t\t\t'itemsAdded' => $this->itemsAdded, \n\t\t\t'itemsRemoved' => $this->itemsRemoved\n\t\t);\n\t\t\n\t\tforeach($trackers as $key => $value) {\n\t\t\tif(!count($value)) continue;\n\t\t\t$info[$key] = array();\n\t\t\tforeach($value as $k => $v) {\n\t\t\t\t$info[$key][] = $this->debugInfoItem($v); \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "a2bcaea887385a5ca3fff60577cec9fd", "score": "0.43051833", "text": "public function update(Request $request, VisitorInfo $visitorInfo)\n {\n //\n }", "title": "" }, { "docid": "09777fb323b49170ab4c574d9cd0672d", "score": "0.43037042", "text": "public function traverse(callable $visitor)\n {\n if ($this->_query) {\n return;\n }\n\n if (!$this->_castedExpressions) {\n $this->_processExpressions();\n }\n\n foreach ($this->_values as $v) {\n if ($v instanceof ExpressionInterface) {\n $v->traverse($visitor);\n }\n if (!is_array($v)) {\n continue;\n }\n foreach ($v as $column => $field) {\n if ($field instanceof ExpressionInterface) {\n $visitor($field);\n $field->traverse($visitor);\n }\n }\n }\n }", "title": "" }, { "docid": "466bf0aa4d82337ca970b51d61a5dfa4", "score": "0.4291276", "text": "abstract protected function createCollector();", "title": "" }, { "docid": "14efdb0ea7784570a6e255d44ec20b90", "score": "0.42814317", "text": "public function apply(ConstraintVisitorInterface $visitor);", "title": "" }, { "docid": "8ad9198742d0c8b6fe48bd6f2c270a25", "score": "0.42750192", "text": "public function run()\n {\n\n Visitor::truncate();\n\n Visitor::create([\n 'page' => 'page-example-1',\n 'ip' => '111.111.111.111',\n 'date_access'=> now()\n ]);\n\n Visitor::create([\n 'page' => 'page-example-2',\n 'ip' => '111.111.111.111',\n 'date_access'=> now()\n ]);\n\n Visitor::create([\n 'page' => 'page-example-1',\n 'ip' => '222.222.222.222',\n 'date_access'=> now()\n ]);\n\n Visitor::create([\n 'page' => 'page-example-2',\n 'ip' => '222.222.222.222',\n 'date_access'=> now()\n ]);\n }", "title": "" }, { "docid": "5830979de45b164f92bd8482c6025988", "score": "0.4273825", "text": "public function itineraries(){\n \t$itineraries = Visitdate::with('destination')\n \t -> where('user_id',$this ->id)\n \t ->get();\n \treturn $itineraries;\n }", "title": "" }, { "docid": "10cc53f96e49a56e10a71ba1847cd510", "score": "0.426374", "text": "abstract function visitBook(BookVisitee $bookVisitee_In);", "title": "" }, { "docid": "f4adc4fc5171341f42f0f87c07c48936", "score": "0.42591965", "text": "function _get_visit() {\n $rows = $this->db->pq(\"SELECT TO_CHAR(r.starttimestamp, 'DD-MM-YYYY HH24:MI:SS') as st, r.status, r.actiontype, r.containerlocation, r.dewarlocation, r.samplebarcode, r.message, (CAST(r.endtimestamp AS DATE)-CAST(r.starttimestamp AS DATE))*86400 as time FROM ispyb4a_db.v_run vr INNER JOIN ispyb4a_db.blsession s ON (s.startdate BETWEEN vr.startdate AND vr.enddate) INNER JOIN ispyb4a_db.proposal p ON (p.proposalid = s.proposalid) INNER JOIN ispyb4a_db.robotaction r ON (r.blsessionid = s.sessionid) WHERE p.proposalcode || p.proposalnumber || '-' || s.visit_number LIKE :1 AND (r.actiontype = 'LOAD' OR r.actiontype='UNLOAD') ORDER BY r.starttimestamp DESC\", array($this->arg('visit')));\n \n if (!$rows) $this->error('No Data', 'No data associated with that visit');\n \n $times = array();\n $ticks = array();\n foreach ($rows as $i => $r) {\n array_push($times, array(sizeof($rows) - 1 - $i, round($r['TIME'], 1)));\n array_push($ticks, array(sizeof($rows) - 1 - $i, $r['ST']));\n }\n\n \n list($info) = $this->db->pq(\"SELECT s.sessionid, s.beamlinename as bl, vr.run, vr.runid FROM ispyb4a_db.v_run vr INNER JOIN ispyb4a_db.blsession s ON (s.startdate BETWEEN vr.startdate AND vr.enddate) INNER JOIN ispyb4a_db.proposal p ON (p.proposalid = s.proposalid) WHERE p.proposalcode || p.proposalnumber || '-' || s.visit_number LIKE :1\", array($this->arg('visit')));\n \n # Get breakdown of dewar usage for visit\n $dp = $this->db->pq(\"SELECT count(case when r.status='CRITICAL' then 1 end) as ccount, count(case when r.status!='SUCCESS' then 1 end) as ecount, count(case when r.status!='SUCCESS' then 1 end)/count(r.status)*100 as epc, count(case when r.status='CRITICAL' then 1 end)/count(r.status)*100 as cpc, count(r.status) as total, r.dewarlocation from robotaction r INNER JOIN blsession s on r.blsessionid=s.sessionid INNER JOIN ispyb4a_db.v_run vr ON (s.startdate BETWEEN vr.startdate AND vr.enddate) WHERE s.sessionid=:1 AND r.actiontype LIKE 'LOAD' AND r.dewarlocation != 99 GROUP BY r.dewarlocation ORDER BY r.dewarlocation\", array($info['SESSIONID']));\n \n \n $profile = array(array(\n array('label' => 'Total', 'data' => array()),\n array('label' => '% Errors', 'data' => array(), 'yaxis' => 2),\n array('label' => '% Critical', 'data' => array(), 'yaxis' => 2),\n ),\n array());\n \n foreach ($dp as $e) {\n array_push($profile[0][0]['data'], array($e['DEWARLOCATION'], $e['TOTAL']));\n array_push($profile[0][2]['data'], array($e['DEWARLOCATION'], $e['CPC']));\n array_push($profile[0][1]['data'], array($e['DEWARLOCATION'], $e['EPC']));\n }\n \n \n $p = array($info['BL'], $info['RUN'], $this->arg('visit'));\n $l = array('bl/' . $info['BL'], 'run/' .$info['RUNID'], '');\n \n $this->template('Visit: ' . $this->args['visit'], $p, $l);\n\n $this->t->js_var('dewar', $profile);\n $this->t->js_var('avg_time', $times);\n $this->t->js_var('avg_ticks', $ticks);\n $this->t->js_var('url', 0);\n \n $this->t->rows = $rows;\n $this->t->visit = $this->arg('visit');\n \n $this->render('robot_visit', 'robot_list');\n\n }", "title": "" }, { "docid": "009b2d4395d411f9875f86326c67ff2b", "score": "0.42586505", "text": "abstract public function write(VisitInfo $visitInfo): bool;", "title": "" }, { "docid": "ab89639dc54fb9ead4b1b03a0ad94738", "score": "0.42472914", "text": "public function prepare() {\n $this->visitor()->clear();\n }", "title": "" }, { "docid": "6ec719908fae5daab9f6c2c24d5b98bd", "score": "0.4236811", "text": "public function guidedVisit(){\n $scenes = Scene::all();\n $visits = GuidedVisit::all();\n $visitsScenes = SceneGuidedVisit::orderBy('position')->get();\n $hotsRel = HotspotType::all();\n $allHots = Hotspot::all();\n $subtitle = $this->getSubtitle();\n $info = array('scenes'=>$scenes, 'visits'=>$visits, 'visitsScenes'=>$visitsScenes, 'hotspotsRel'=>$hotsRel, 'allHots'=>$allHots, 'subtitle'=> $subtitle);\n\n //Agregar opciones al recuperadas a la vista\n $info= array_merge($info, $this->getOptions());\n return view('frontend.guidedvisit', $info);\n }", "title": "" }, { "docid": "a9b5ef4537fc404d92358c26352c0b59", "score": "0.42356217", "text": "public function inspect($fv) {\n\t\t\n\t}", "title": "" }, { "docid": "52b5f92530e734b786d4b4ef9c946a37", "score": "0.4234837", "text": "public function visitInterface(PHP_Depend_Code_Interface $interface)\n {\n // Empty visit method, we don't want interface metrics\n }", "title": "" }, { "docid": "91c1e2c8818491a99030edf311c051fe", "score": "0.4223263", "text": "public function _add_incident_filters()\n\t{\n\t\t$params = Event::$data;\n\t\t$params = array_merge($params, $this->params);\n\t\tEvent::$data = $params;\n\t}", "title": "" }, { "docid": "2bc5e363ea8aa19eefc1501a9ad0cec6", "score": "0.42217037", "text": "public function statistics()\n {\n $inputs = Request::all();\n if(!isset($inputs['scope']) || empty($inputs['scope'])){\n return $this->all();\n }\n\n list($title, $description) = $this->getTitleDescription($inputs);\n\n $visitor_stats = Visitor::statistics($inputs['scope']);\n return view('visitor.statistics',compact('visitor_stats','title','description'));\n }", "title": "" }, { "docid": "9793cd45920a24c49b3e4fd25708bd6a", "score": "0.42067704", "text": "public static function insert ( $visitor = false ) {\n\n\t\tif ( ! empty ( $visitor ) ) {\n\t\t\t$insert = array (\n\t\t\t\t'visitor_ip' => static::escape($visitor->visitor_ip),\n\t\t\t\t'user_agent' => static::escape($visitor->user_agent),\n\t\t\t\t'visits' => ( isset($visitor->visits) ? (int) $visitor->visits : 1 )\n\t\t\t);\n\n\t\t\treturn parent::insert ( $insert );\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7093aa4944557defdb0ba17c4186f2d2", "score": "0.4206168", "text": "function getVisitor(){\n global $db;\n if (!isset($employee_id)) {\n $employee_id = filter_input(INPUT_GET, 'employee_id', \n FILTER_VALIDATE_INT);\n if ($employee_id == NULL || $employee_id == FALSE) {\n $employee_id= 1;\n }\n }\n $query2 = 'SELECT * FROM visitorss WHERE employeeID = :employeeID '\n . 'ORDER BY visitorEmail;';\n $statement2 = $db->prepare($query2);\n $statement2->bindValue(\":employeeID\", $employee_id);\n try {\n $count = $statement2->execute(); \n } catch (Exception $ex){\n include('./database_error.php');\n exit();\n } \n if ($count < 1){\n include('./database_error.php');\n exit();\n }\n $visitors = $statement2;\n\n return $visitors;\n }", "title": "" }, { "docid": "8705798b9dec0b2d4d3ddf1b769bf3a8", "score": "0.42055875", "text": "protected function _collectVars() {\n\n\t\t// collect vars in objects\n\t\t$this->ep_cached_vars = array_keys(get_object_vars($this->ep_object));\n\n // add private/protected vars in case missed out\n\t\tif ($this->ep_cm) {\n\n\t\t\t// has __get() or __set() in class?\n\t\t\t$has__get = in_array('__get', $this->ep_cached_methods);\n\t\t\t$has__set = in_array('__set', $this->ep_cached_methods);\n\n\t\t\t// get all vars from class map\n\t\t\t$vars = array_keys($this->ep_cm->getAllFields());\n\n\t\t\t// go through all vars and collect accessible non-public vars\n\t\t\t// 'accessible' means a var has both public getter and setter\n\t\t\tforeach ($vars as $var) {\n\n\t\t\t\t// skip if already collected\n\t\t\t\tif (in_array($var, $this->ep_cached_vars)) {\n\t\t\t\t\tcontinue;\n }\n\n\t\t\t\t// does it have public g/setter?\n\t\t\t\t$hasGetter = $has__get ||\n\t\t\t\t\tin_array('get' . ucfirst($var), $this->ep_cached_methods);\n\t\t\t\t$hasSetter = $has__set ||\n\t\t\t\t\tin_array('set' . ucfirst($var), $this->ep_cached_methods);\n\n\t\t\t\t// collect it if publically accessible\n\t\t\t\tif ($hasGetter && $hasSetter) {\n\t\t\t\t\t$this->ep_cached_vars[] = $var;\n\t\t\t\t}\n }\n }\n }", "title": "" }, { "docid": "bd06ba515feca8f58a5704fe750e8bf2", "score": "0.41952342", "text": "public function getType(): VisitType\n {\n return $this->type();\n }", "title": "" }, { "docid": "debe7e30acb637ff9beba4d5da2cf2f0", "score": "0.41908577", "text": "public function __construct()\n {\n // EfikasVisitors::visitorsLog();\n // $this->middleware('auth');\n }", "title": "" } ]
393004b8e210143ee6bce2202845e2ab
(array( 'vars' => $vars, ))
[ { "docid": "1cbe0fbc7c8500e6a0780b4661b09d8c", "score": "0.0", "text": "protected function _getVarsItem($arr)\n\t{\n\t\tglobal $varsPluginAccountingAccount;\n\n\t\t$varsDepartment = $this->_getVarsDepartment(array(\n\t\t\t'numFiscalPeriod' => $varsPluginAccountingAccount['numFiscalPeriodCurrent'],\n\t\t));\n\n\t\t$arrSubAccountTitle = $this->_getVarsSubAccountTitle(array(\n\t\t\t'numFiscalPeriod' => $varsPluginAccountingAccount['numFiscalPeriodCurrent'],\n\t\t));\n\n\t\t$arrAccountTitle = $this->_getAccountTitle(array(\n\t\t\t'arrSubAccountTitle' => $arrSubAccountTitle,\n\t\t\t'numFiscalPeriod' => $varsPluginAccountingAccount['numFiscalPeriodCurrent'],\n\t\t));\n\n\t\t$varsEntityNation = $this->_getVarsEntityNation(array(\n\t\t\t'numFiscalPeriod' => $varsPluginAccountingAccount['numFiscalPeriodCurrent'],\n\t\t));\n\n\t\t$arrayFSList = $this->_getFSList(array(\n\t\t\t'numFiscalPeriod' => $varsPluginAccountingAccount['numFiscalPeriodCurrent'],\n\t\t));\n\n\t\t$varsFlagAttest = $this->_getVarsFlagAttest(array(\n\t\t\t'vars' => &$arr['vars'],\n\t\t));\n\n\t\t$varsFlagReverse = $this->_getVarsFlagReverse(array(\n\t\t\t'vars' => &$arr['vars'],\n\t\t));\n\n\t\t$data = array(\n\t\t\t'arrSubAccountTitle' => $arrSubAccountTitle,\n\t\t\t'arrAccountTitle' => $arrAccountTitle,\n\t\t\t'varsDepartment' => $varsDepartment,\n\t\t\t'varsEntityNation' => $varsEntityNation,\n\t\t\t'arrayFSList' => $arrayFSList,\n\t\t\t'varsFlagAttest' => $varsFlagAttest,\n\t\t\t'varsFlagReverse' => $varsFlagReverse,\n\t\t);\n\n\t\treturn $data;\n\n\t}", "title": "" } ]
[ { "docid": "2221b1770b8a5ba1153860d70a05f29f", "score": "0.6725795", "text": "function vars($vars = array(), $val = '')\n\t{\n\t\tif ($val != '' AND is_string($vars))\n\t\t{\n\t\t\t$vars = array($vars => $val);\n\t\t}\n\t\n\t\t$vars = $this->_sc_object_to_array($vars);\n\t\n\t\tif (is_array($vars) AND count($vars) > 0)\n\t\t{\n\t\t\tforeach ($vars as $key => $val)\n\t\t\t{\n\t\t\t\t$this->_sc_cached_vars[$key] = $val;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "228582e49b9b8a3ea07b4404b599142d", "score": "0.66855806", "text": "public function __construct(){\n\t\t$this->vars = array();\n\t}", "title": "" }, { "docid": "9e266519896641a4a02e2c96e1e5d910", "score": "0.66355", "text": "public function vars(): array;", "title": "" }, { "docid": "2aca48cc033dd0037b9f1e3b70da23d0", "score": "0.65959436", "text": "public function withVars(...$vars): VarDumpInterface;", "title": "" }, { "docid": "5d3fc4f8ad9e8c5f41c287119e409e93", "score": "0.6579277", "text": "public function query_vars( $vars ) {\r\n\r\n\t\t\t$vars[] = 'key';\r\n\t\t\t$vars[] = 'token';\r\n\t\t\t$vars[] = 'format';\r\n\t\t\t$vars[] = 'query';\r\n\t\t\t$vars[] = 'type';\r\n\t\t\t$vars[] = 'data';\r\n\t\t\t$vars[] = 'fields';\r\n\t\t\t$vars[] = 'value';\r\n\t\t\t$vars[] = 'number';\r\n\t\t\t$vars[] = 'id';\r\n\t\t\t$vars[] = 'email';\r\n\t\t\t$vars[] = 'orderby';\r\n\t\t\t$vars[] = 'order';\r\n\t\t\t$vars[] = 'include';\r\n\t\t\t$vars[] = 'exclude';\r\n\r\n\t\t\t$this->vars = $vars;\r\n\r\n\t\t\treturn $vars;\r\n\t\t}", "title": "" }, { "docid": "65226d1fc700e663d8a245fa5bf0fddf", "score": "0.6486035", "text": "function vars($vars = array(), $val = '')\n {\n if ($val != '' AND is_string($vars))\n {\n $vars = array($vars => $val);\n }\n\n $vars = $this->_ci_object_to_array($vars);\n\n if (is_array($vars) AND count($vars) > 0)\n {\n foreach ($vars as $key => $val)\n {\n $this->_ci_cached_vars[$key] = $val;\n }\n }\n }", "title": "" }, { "docid": "3b87211d24bbb6b4da6745ab50910ed6", "score": "0.64548504", "text": "protected function vars(){\r\n\r\n\t\t\t$script = \"['x'\";\r\n\t\t\tforeach ($this->vars as $value) {\r\n\t\t\t\t$script .= \", '\".$value.\"'\";\r\n\t\t\t}\r\n\r\n\t\t\t$script .= \"],\\n\";\r\n\r\n\t\t\treturn $script;\r\n\t\t}", "title": "" }, { "docid": "3934dc7e1f9cbeda64c084fd88b3ca8c", "score": "0.6434016", "text": "function create($vars)\n\t{\n\t}", "title": "" }, { "docid": "3fa5137d3503554a58a3205ce3212cb3", "score": "0.6336432", "text": "function getVarsFromParams(&$vars) {\n }", "title": "" }, { "docid": "d4eab811110ba6ee35787891f440a993", "score": "0.62073", "text": "public function add_var_array($vars=array()){\n\t\t\tforeach($vars as $key => $var){\n\t\t\t\t$this->add_var($key,$var);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1ac5dc6f215ed4754c6c65bcf735cc09", "score": "0.61885124", "text": "function PackageParams ($vars) {\n\tglobal $msg, $error;\n\tglobal $LINK;\n\n\tif (isset ($vars['Params']) && is_array($vars['Params'])) {\n\t\t$params = $vars['Params'];\n\t} else {\n\t\t$params = array ();\n\t}\n\n\treset ($vars);\n\tforeach ($vars as $k => $v) {\n\t\tif (substr($k,0,6) == \"param_\" && strlen($k) == 8) {\n\t\t\t$pk = substr($k, 6,2);\n\t\t\t$params[$pk] = $v;\n\t\t\tunset ($vars[$k]);\n\t\t}\n\t}\n\t$params && $vars['Params'] = $params;\n\treturn $vars;\n}", "title": "" }, { "docid": "39e94e21af26850407550eb24e827ad0", "score": "0.61720836", "text": "public function assignAll($vars);", "title": "" }, { "docid": "3f9c276de02c97688a3ba05f3098db73", "score": "0.6164301", "text": "protected function prepare($vars = []) {\n \n }", "title": "" }, { "docid": "d233ab96e2da4454747b3fb25b65b95f", "score": "0.60959065", "text": "function mongabay_query_var( $vars ) {\n\n $vars[] = 'section';\n $vars[] = 'nc1';\n $vars[] = 'nc2';\n return $vars;\n\n}", "title": "" }, { "docid": "e6877eb53e858aefe80bd54225bb10e4", "score": "0.6075533", "text": "function varInfo(...$vars)\n {\n return '';// (new VarDump(...$vars))->toString();\n }", "title": "" }, { "docid": "dcfee4bcac4eb5160198b194806eb518", "score": "0.6054928", "text": "public function postVars()\n\t{\n\t\t$args = func_get_args();\n\t\t$values = array();\n\t\tforeach ($args as $arg)\n\t\t{\n\t\t\t$values[$arg] = $this->postVar($arg);\n\t\t}\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "15259b43ba6334641c24db172faad1fe", "score": "0.60547775", "text": "function queryVars($vars) {\n $vars[] = 'ubiquity';\n\n return $vars;\n }", "title": "" }, { "docid": "6247bae53ebf6ea240c3cbf2b79ee06d", "score": "0.6053991", "text": "function render($template,$vars = array()){\r\n\r\n // This will create variables from the array:\r\n extract($vars);\r\n include \"views/$template.php\";\r\n \r\n}", "title": "" }, { "docid": "843b72b503b90657e24615bc9326d0ca", "score": "0.6039334", "text": "function my_insert_query_vars( $vars )\n\t\t{\n\t\t array_push($vars, 'url');\n\t\t return $vars;\n\t\t}", "title": "" }, { "docid": "60a4acaafb4248be9bf35fbd8c78a495", "score": "0.59985274", "text": "protected function viewVars(): array\n {\n return ['input' => $this];\n }", "title": "" }, { "docid": "f95cbd6c43c9124b36830f0b75e902b9", "score": "0.59942317", "text": "function player_query_vars($vars) {\n $vars[] = 'player';\n return $vars;\n}", "title": "" }, { "docid": "c60091a6036a1bb0af10f795e98d55d1", "score": "0.59714335", "text": "public function setVars($vars){\n\n $this->vars = $vars; \n }", "title": "" }, { "docid": "1c6ca5957ee5806f75df581a4cc8aa04", "score": "0.5971085", "text": "function parameter_queryvars( $qvars ) {\n $qvars[] = 'chalet';\n return $qvars;\n}", "title": "" }, { "docid": "190ac42de9ef40446b645b6142d52a5a", "score": "0.5965482", "text": "public function addVars(array $vars) {\n\n\t\tforeach ($vars as $key => $val) {\n\t\t\t$this->vars[$key] = $val;\n\t\t}\n\t}", "title": "" }, { "docid": "2f8d474374a1d19d6b378326f156c72f", "score": "0.5960149", "text": "public function vars(): string {}", "title": "" }, { "docid": "9c711efd0991db312017685cb9b233fb", "score": "0.5951541", "text": "function pnBlockVarsToContent($vars)\r\n{\r\n return (serialize($vars));\r\n}", "title": "" }, { "docid": "4dd5c8d263039daae299eea3f68da401", "score": "0.59515387", "text": "public function ajaxVars($vars)\r\n\t{\r\n\t\t$data['do'] = 'ajaxVars';\r\n\t\tif(is_array($vars)) {\r\n\t\t\t$vars = http_build_query($vars);\r\n\t\t}\r\n\t\t$data['vars'] = $vars;\r\n\t\t$this->xml($data);\r\n\t}", "title": "" }, { "docid": "fc25fa4a5daa4a4d707851f82590e1f8", "score": "0.5946747", "text": "public function extraVars($extraVars = '');", "title": "" }, { "docid": "a879c142e53bf0e4c52639b3c845336b", "score": "0.5933416", "text": "public function fc_query_vars($vars) {\n\t $vars[] = \"playerID\";\n\t return $vars;\n\t}", "title": "" }, { "docid": "9c8092815c9544d52033207a7f3357c2", "score": "0.5925101", "text": "public function extraVars()\n {\n return [\n 'zaaImageUpload' => $this->zaaImageUpload($this->getVarValue('zaaImageUpload'), false, true),\n 'zaaImageArrayUpload' => $this->zaaImageArrayUpload($this->getVarValue('zaaImageArrayUpload'), false, true),\n 'zaaFileUpload' => $this->zaaFileUpload($this->getVarValue('zaaFileUpload'), true),\n 'zaaFIleArrayUpload' => $this->zaaFileArrayUpload($this->getVarValue('zaaFIleArrayUpload'), true),\n ];\n }", "title": "" }, { "docid": "36d983bf3ed22fa0f9a04fac7456d00a", "score": "0.59240717", "text": "function sm_register_query_vars( $vars ) {\n\tglobal $meta_search_fields;\n\tforeach ($meta_search_fields as $metakey=>$value) {\n\t\t$vars[] = $metakey;\n\t}\n\treturn $vars;\n}", "title": "" }, { "docid": "4f397a56e6f1bc1255d8a3b8ef38f642", "score": "0.5907866", "text": "public function getVars()\n {\n return $this->vars;\n }", "title": "" }, { "docid": "4f3f6dfab7481cca92b15b1978fe9731", "score": "0.5907332", "text": "public function query_var_register( $vars ) {\n $vars[] = 'pagename';\n $vars[] = 'rating_post_id';\n\n return $vars;\n }", "title": "" }, { "docid": "96b75d0e34e70138868c18c5ef46a8ff", "score": "0.59066474", "text": "function get_get_vars()\n\t{\n\t\tif ($this->cms->mod_free == 1 || $this->cms->mod_surls == 1) {\n\t\t\t/*\n\t // Hinweis: Dürfte bei der Suche nicht klappen, was ist mit den Suchfeldern?\n\t // Alternativen: Alle mv-Parameter zwecks Identifizierung vereinheitlichen, z. B. beginen mit \"mv_\". Nachteil: Hoher Änderungsaufwand.\n\t // Oder ein array erstellen, das die Parameter enthält, die nict zur Flex gehören und diese dann in der unten deaktivierten Routine\n\t // überspringen. Nachteil: Neue Papoo-Parameter müssen eingepflegt werden.\n\t // Bsp. eines solchen arrays:\n\t #$skip_keys = array(\"var1\",\"var2\",\"var3\",\"template2\",\"stylepost\",\"msgid\",\"formmenuid\",\"forumid_tmpl\",\"formforumid\",\"rootid\",\"formmsgid\",\"reporeid\",\"mv/templates/mv_search_front_onemv.html\",\"forumid\",\"spamcode\");\n\t $url=\"menuid=\".$this->checked->menuid;\n\t $url.=\"&template=\".$this->checked->template;\n\t $url.=\"&mv_id=\".$this->checked->mv_id;\n\t $url.=\"&onemv=\".$this->checked->onemv;\n\t $url.=\"&search_mv=\".$this->checked->search_mv;\n\n\t $url.=\"&sort_feld=\".$this->checked->sort_feld;\n\t # $url.=\"menuid=\".$this->checked->menuid;\n\t return $url;\n\t\t*/\n\n\n\t\t\t$parameters = array_filter([\n\t\t\t\t\"menuid\" => (int)$this->checked->menuid,\n\t\t\t\t\"template\" => (string)$this->checked->template,\n\t\t\t\t\"mv_id\" => (int)$this->checked->mv_id,\n\t\t\t\t'mv_submit' => (string)$this->checked->mv_submit,\n\t\t\t\t\"onemv\" => (string)$this->checked->onemv,\n\t\t\t\t\"search_mv\" => (string)$this->checked->search_mv,\n\t\t\t\t\"sort_feld\" => (string)$this->checked->sort_feld\n\t\t\t], function ($value, $name) {\n\t\t\t\treturn strlen($value) > 0 || !in_array($name, [\n\t\t\t\t\t'mv_submit',\n\t\t\t\t]);\n\t\t\t}, ARRAY_FILTER_USE_BOTH);\n\n\t\t\t// $this->cms->template_lang wird nach einem Seitenwechsel ueber die Pagination ploetzlich nicht mehr definiert...\n\t\t\t$menuId = (int)$this->checked->menuid;\n\t\t\t$langId = (int)$this->cms->lang_id;\n\t\t\t$menuLink = $this->db->get_var(\"SELECT menulinklang FROM {$this->cms->tbname[\"papoo_menu_language\"]} WHERE menuid_id = $menuId AND lang_id = $langId\");\n\n\t\t\tif (strpos($menuLink, \"plugin:\") === 0) {\n\t\t\t\t$menuLinkParameters = explode(\"&\", trim(str_replace(\"plugin:\", \"template=\", $menuLink)));\n\t\t\t\t$parameters = array_reduce($menuLinkParameters, function ($parameters, $param) {\n\t\t\t\t\t$param = explode(\"=\", $param, 2);\n\t\t\t\t\t$parameters[$param[0]] = count($param) == 2 ? $param[1] : \"\";\n\t\t\t\t\treturn $parameters;\n\t\t\t\t}, $parameters);\n\t\t\t}\n\n\t\t\t$flexId = $parameters['mv_id'] = (int)$parameters['mv_id'];\n\n\t\t\t// Append the user input of a flex search to the parameters\n\t\t\tif ($flexId) {\n\t\t\t\t$searchColumn = defined('admin') ? 'mvcform_search_back' : 'mvcform_search';\n\t\t\t\t$searchableFlexFields = array_map(function (array $row) {\n\t\t\t\t\treturn \"{$row['mvcform_name']}_{$row['mvcform_id']}\";\n\t\t\t\t}, $this->db->get_results(\n\t\t\t\t\t\"SELECT mvcform_id, mvcform_name \".\n\t\t\t\t\t\"FROM {$this->cms->tbname['papoo_mvcform']} \".\n\t\t\t\t\t\"WHERE mvcform_form_id = {$flexId} AND mvcform_aktiv = 1 \".\n\t\t\t\t\t\"AND {$searchColumn} = 1\", ARRAY_A)\n\t\t\t\t);\n\n\t\t\t\tforeach ($searchableFlexFields as $fieldName) {\n\t\t\t\t\tif (strlen($value = $this->checked->$fieldName ?? '') > 0) {\n\t\t\t\t\t\t$parameters[$fieldName] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn urldecode(http_build_query($parameters, null, \"&\"));\n\t\t}\n\n\t\t$drinurl = \"\";\n\t\tforeach ($_GET as $key => $value) {\n\t\t\tforeach ($this->checked as $key2 => $value2) {\n\t\t\t\tif ($key == $key2) {\n\t\t\t\t\tif ($key2 == \"page\") continue;\n\t\t\t\t\tif ($key2 == \"submitlang\") continue;\n\t\t\t\t\tif ($key2 == \"search_mv\") $value2 = urlencode($value2);\n\t\t\t\t\t$inurl[$key2] = $value2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$counturl = count($inurl);\n\t\tif (is_array($inurl)) {\n\t\t\tforeach ($inurl as $key => $value) {\n\t\t\t\t$drinurl .= $key . \"=\" . $value;\n\t\t\t\t$k++;\n\t\t\t\tif ($k < $counturl) $drinurl .= \"&\";\n\t\t\t}\n\t\t}\n\t\treturn $drinurl;\n\t}", "title": "" }, { "docid": "56aa1cd7c28212d59b83db477a89adda", "score": "0.5889016", "text": "function parse_variables($_tagdata, $vars) { //dump_var($vars, 1);\n\t\t\t$output = ''; //output\t\n\t\t\t$count = 0; //counter\n\t\t\tforeach ($vars as $list) {\n\t\t\t\t$count++;\n\n\t\t\t\t$tagdata = $_tagdata;\n\n\t\t\t\t/** ----------------------------------------\n\t\t\t\t /** parse {switch} variable\n\t\t\t\t /** ---------------------------------------- */\n\t\t\t\tif (preg_match('#{(switch(.*?))}#s', $tagdata, $_match) == TRUE) {\n\t\t\t\t\t$sparam = $this->EE->functions->assign_parameters($_match[1]);\n\n\t\t\t\t\t$sw = '';\n\n\t\t\t\t\tif (isset($sparam['switch'])) {\n\t\t\t\t\t\t$sopt = @explode(\"|\", $sparam['switch']);\n\n\t\t\t\t\t\t$sw = $sopt[($count + count($sopt) - 1) % count($sopt)];\n\t\t\t\t\t}\n\n\t\t\t\t\t$tagdata = $this->EE->TMPL->swap_var_single($_match[1], $sw, $tagdata);\n\t\t\t\t}\n\n\t\t\t\t/** ----------------------------------------\n\t\t\t\t /** Others tag\n\t\t\t\t /** ---------------------------------------- */\n\t\t\t\tif (is_array($list))\n\t\t\t\t\tforeach ($list as $tag => $value) {\n\t\t\t\t\t\t//if array ...\n\n\t\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\t\tpreg_match_all('~{' . $tag . '([^}]*?)}(.*?){/' . $tag . '}~s', $tagdata, $matches);\n\n\t\t\t\t\t\t\tforeach ($matches[0] as $i => $match) {\n\t\t\t\t\t\t\t\t//fetch params for variable_pairs tag\n\n\t\t\t\t\t\t\t\t$paramsString = str_replace('\"', \"'\", $matches[1][$i]);\n\n\t\t\t\t\t\t\t\t$params = array();\n\t\t\t\t\t\t\t\tpreg_match_all(\"/([^']*?)='([^']*?)'/\", $paramsString, $paramsMatches);\n\n\t\t\t\t\t\t\t\tif (isset($paramsMatches[0]))\n\t\t\t\t\t\t\t\t\tforeach ($paramsMatches[0] as $pm_index => $pm) {\n\t\t\t\t\t\t\t\t\t\tif (trim($paramsMatches[1][$pm_index])) {\n\t\t\t\t\t\t\t\t\t\t\t$params[trim($paramsMatches[1][$pm_index])] = trim($paramsMatches[2][$pm_index]);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t//offset (rebuild array)\n\n\t\t\t\t\t\t\t\tif ((int) @$params[\"offset\"]) {\n\t\t\t\t\t\t\t\t\t//rebuild array\n\n\t\t\t\t\t\t\t\t\t$new_value = array();\n\t\t\t\t\t\t\t\t\t$skipped = 0;\n\n\t\t\t\t\t\t\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t\t\t\t\t\t\t$skipped++;\n\n\t\t\t\t\t\t\t\t\t\tif ($skipped >= (int) @$params[\"offset\"]) {\n\t\t\t\t\t\t\t\t\t\t\t$new_value[] = $v;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$value = $new_value;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t//limit (rebuild array)\n\n\t\t\t\t\t\t\t\tif ((int) @$params[\"limit\"]) {\n\t\t\t\t\t\t\t\t\t//rebuild array\n\n\t\t\t\t\t\t\t\t\t$new_value = array();\n\t\t\t\t\t\t\t\t\t$printed = 0;\n\n\t\t\t\t\t\t\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t\t\t\t\t\t\t$printed++;\n\n\t\t\t\t\t\t\t\t\t\tif ($printed <= (int) @$params[\"limit\"]) {\n\t\t\t\t\t\t\t\t\t\t\t$new_value[] = $v;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$value = $new_value;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t//recursive call\t...\t\t\n\t\t\t\t\t\t\t\t$pattern = $this->parse_variables($matches[2][$i], $value);\n\n\t\t\t\t\t\t\t\t//... apply recursive data\n\t\t\t\t\t\t\t\t$tagdata = str_replace($matches[0][$i], $pattern, $tagdata);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//... or single variable\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$tagdata = str_replace('{' . $tag . '}', $value, $tagdata);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t//count\n\t\t\t\t$tagdata = str_replace('{count}', $count, $tagdata);\n\t\t\t\t$tagdata = str_replace('{cnt}', $count, $tagdata);\n\t\t\t\t$tagdata = str_replace('{total_count}', count($vars), $tagdata);\n\n\t\t\t\t//conds\n\n\t\t\t\t$conds = array();\n\n\t\t\t\tif (is_array($list))\n\t\t\t\t\tforeach ($list as $tag => $value) {\n\t\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\t\t$conds[$tag] = count($value) ? 1 : 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$conds[$tag] = ($value) ? $value : 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$conds['count'] = $count;\n\t\t\t\t\t\t$conds['cnt'] = $count;\n\t\t\t\t\t\t$conds['total_count'] = count($vars);\n\t\t\t\t\t\t$conds['first'] = (int) $count === 1 ? 1 : 0;\n\t\t\t\t\t\t$conds['last'] = (int) $count === (int) count($vars) ? 1 : 0;\n\t\t\t\t\t\t$conds['odd'] = ((int) $count % 2 == 0) ? 1 : 0;\n\t\t\t\t\t}\n\n\t\t\t\t$output .= $this->EE->functions->prep_conditionals($tagdata, $conds);\n\t\t\t}\n\n\t\t\t//cleanup\n\n\t\t\t/*\n\t\t\t $output = preg_replace('~<ul([^>])*'.'>\\s*</ul>~s', '', $output);\n\t\t\t */\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "603c40dd44c42e990a65c6e932abe990", "score": "0.5885753", "text": "public function get_vars()\n {\n return $this->_vars;\n }", "title": "" }, { "docid": "75cdeb728fce682e22bd0e106a3dbbba", "score": "0.5880832", "text": "public function queryVars($vars)\n {\n $vars[] = 'rddownloads_subpage';\n $vars[] = 'download_id';\n\n return $vars;\n }", "title": "" }, { "docid": "182aa6c68d150e1b74333e4d21deed0b", "score": "0.58780384", "text": "protected function prepareVars()\n {\n }", "title": "" }, { "docid": "6e0a36c8675129a12ffa00cc6fe097f4", "score": "0.58664846", "text": "public static function set_template_vars($vars) {\n $rc = rc::get_instance();\n if(!is_array(self::$template_vars)) self::$template_vars = array();\n if(!is_array(self::$template_vars['wp948jtjw3tjsggj5894g'])) \n self::$template_vars['wp948jtjw3tjsggj5894g'] = array();\n self::$template_vars['wp948jtjw3tjsggj5894g'] = array_merge(self::$template_vars['wp948jtjw3tjsggj5894g'], $vars);\n }", "title": "" }, { "docid": "8eefb55c7e72e74470e018728496a7f9", "score": "0.58621675", "text": "function setArray($array){\n $this->vars = array_merge($this->vars,$array);\n }", "title": "" }, { "docid": "786e82595e9b218659258f052cd8530a", "score": "0.58534724", "text": "function purdyvars_init_variables($fields, $prefix='field_', $suffix='') {\n \n $variables = array();\n \n foreach($fields as $name => $data) {\n $field_name = $prefix.str_replace(PURDYVARS_TARGET, '', $name).$suffix;\n $variables[$field_name] = new purdyvars_variable($fields[$name]['data']);\n $variables[$field_name]->label = $fields[$field_name]['settings']['label'];\n $variables[$field_name]->render = $fields[$field_name]['settings']['render'];\n \n }\n\n return $variables; \n }", "title": "" }, { "docid": "c1d924e4af89148bf6a84b52a929fed9", "score": "0.5847009", "text": "function vitasa_add_query_vars_filter( $vars ){\r\n $vars[] = \"vitasa_action\";\r\n //$vars[] = \"nextvar\";\r\n return $vars;\r\n}", "title": "" }, { "docid": "c4c84a2dadd6327bfbaa7df4fb5790be", "score": "0.5836827", "text": "public function setVars($vars){\n\t\tforeach($vars as $key=>$value){\n\t\t\t$this->vars[$key] = $value;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "aad73a9fc45d843ebc052f7bb64d873f", "score": "0.5831583", "text": "public function get_vars(){\n return $this->tpl_vars;\n }", "title": "" }, { "docid": "16644c679188aebdbe4d61452c84a967", "score": "0.5829998", "text": "function pnVarPrepForStore()\n{\n $resarray = array();\n foreach (func_get_args() as $ourvar) {\n if (!get_magic_quotes_runtime() && !is_array($ourvar)) {\n $ourvar = addslashes($ourvar);\n }\n // Add to array\n array_push($resarray, $ourvar);\n }\n // Return vars\n if (func_num_args() == 1) {\n return $resarray[0];\n } else {\n return $resarray;\n }\n}", "title": "" }, { "docid": "cc73a8992a894293d78dd9948b2c1a43", "score": "0.5823511", "text": "public static function add(array $vars){\n self::$vars = array_merge(self::$vars,$vars);\n }", "title": "" }, { "docid": "26908d9555beddc54aaf61c1e7e0da41", "score": "0.5820787", "text": "function pnBlockVarsToContent($vars)\n{\n return (serialize($vars));\n}", "title": "" }, { "docid": "cb41907a6fffb8ff9846ba3179a184a5", "score": "0.5819073", "text": "function smp_query_vars($query_vars){\n\t$query_vars[] = SMP_QUERY_VAR;\n\t$query_vars[] = SMP_VERSION_QUERY_VAR;\n\t$query_vars[] = SMP_ACTION_QUERY_VAR;\n\t$query_vars[] = SMP_SCREENSHOT_QUERY_VAR;\n\t$query_vars[] = SMP_SECTION_QUERY_VAR;\n\treturn $query_vars;\n}", "title": "" }, { "docid": "76e1c0789bcd09bdcaa9ccf5db556133", "score": "0.5816697", "text": "public function setVars(array $vars = null) { $this->vars = $vars; }", "title": "" }, { "docid": "8a1a27c1a992bca05d2753349b10f536", "score": "0.58118314", "text": "public function addVars(array $vars)\n {\n $this->vars = array_merge($this->vars, $vars);\n }", "title": "" }, { "docid": "e9f5ca39ade09684a6b646d3c13ce905", "score": "0.57995474", "text": "function xd(...$vars)\n {\n (new VarDump(writers()->out(), ...$vars))->withShift(1)->stream();\n }", "title": "" }, { "docid": "14bc97eb3c26728fa7efcafe618bdd41", "score": "0.5797464", "text": "public static function query_vars($vars) {\n $vars[] = 'delivery_time';\n return $vars;\n }", "title": "" }, { "docid": "2fffc25216ba4baf1a3b47da6edd5263", "score": "0.5794333", "text": "function add_query_vars($aVars) {\n $aVars[0] = \"ajax-id\";\n $aVars[1] = \"ajax-tax\";\n $aVars[2] = \"ajax-paged\";\n return $aVars;\n}", "title": "" }, { "docid": "a29ef13aafc1748609939e4a48f27d93", "score": "0.57769275", "text": "function queryVars($queryvars) {\n $queryvars[] = 'salmon';\n $queryvars[] = 'salmonpress';\n return $queryvars;\n }", "title": "" }, { "docid": "752fed8f96e8122457aa01b6f272e2a1", "score": "0.5774439", "text": "public function get_all_vars() {\n return $this->vars;\n }", "title": "" }, { "docid": "ed48f134f50461864bfad263a7f5d0f3", "score": "0.57706136", "text": "public function prepareVars()\n {\n $this->vars['indexName'] = self::INDEX_PREFIX.$this->formField->getName(false).'[]';\n $this->vars['prompt'] = $this->prompt;\n $this->vars['formWidgets'] = $this->formWidgets;\n }", "title": "" }, { "docid": "4dfecc18044c1c220ef2ef60f8c7a85e", "score": "0.5767578", "text": "public function params();", "title": "" }, { "docid": "203ad44c2e3b7e85c842071faff6ab25", "score": "0.57491", "text": "public function inject_variables($tpl_obj, $vars) {\r\n\t\tif(!empty($vars) && is_array($vars)) {\r\n\t\t\tforeach ($vars as $ind => $val) {\r\n\t\t\t\tif(is_array($val)) {\r\n\t\t\t\t\tif(!isset($tpl_obj->{$ind})) {\r\n\t\t\t\t\t\tglobal $user_vars;\r\n\t\t\t\t\t\t$tpl_obj->{$ind} = (!isset($user_vars['loops'][$ind])) ? array() : $user_vars['loops'][$ind];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach($tpl_obj->{$ind} as $ev_i => $ev_v) {\r\n\t\t\t\t\t\tforeach ($val as $ni => $nv) {\r\n\t\t\t\t\t\t\tif(is_int($ni)){continue;}\r\n\t\t\t\t\t\t\t$tpl_obj->{$ind}[$ev_i]->{$ni} = $nv;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$tpl_obj->{$ind} = $val;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $tpl_obj;\r\n\t}", "title": "" }, { "docid": "e451efba44753d0d46855e26fcb19954", "score": "0.57409865", "text": "public function makeVars() {\n\t\treturn array_merge($this->vars, [\n\t\t\tself::RESOURCE_KEY => $this->resources\n\t\t]);\n\t}", "title": "" }, { "docid": "632238508688ae6cdc15989eddc646f1", "score": "0.5729076", "text": "public function getVars()\n\t{\n\t\t$args = func_get_args();\n\t\t$values = array();\n\t\tforeach ($args as $arg)\n\t\t{\n\t\t\t$values[$arg] = $this->getVar($arg);\n\t\t}\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "93eaa7ecd080de7ea608b265dcde5458", "score": "0.572508", "text": "function assign_vars($vararray)\n\t{\n\t\t$this->_tpldata['.'][0] = array_merge(empty($this->_tpldata['.'][0]) ? array() : $this->_tpldata['.'][0], $vararray);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1e326905ffd5ad6aea84b1367411c379", "score": "0.5719855", "text": "public function getPostVariables();", "title": "" }, { "docid": "12dfd324fd64837f89676f33a5df2ebd", "score": "0.5714657", "text": "public function getVariables() {\n\t\t$loaded = self::$_loaded;\n\t\tself::$_loaded = true;\n\t\t\n\t\treturn array(\n\t\t\t'panels'\t\t=> $this->_panels,\n\t\t\t'position'\t\t=> $this->_position,\n\t\t\t'loaded'\t\t=> $loaded,\n\t\t\t'options'\t\t=> $this->_options,\n\t\t\t'attributes' \t=> $this->_attributes,\n\t\t\t'theme' \t\t=> $this->_theme);\n\t}", "title": "" }, { "docid": "b182e3f0b05fd85f146a56dd69c0ad81", "score": "0.57074744", "text": "private function createVariablesArray() {\n return [\n 'test' => 'success',\n 'reference' => 'first',\n ];\n }", "title": "" }, { "docid": "40e9e09e62730b18f206647d0fe0bc3c", "score": "0.57074314", "text": "public static function vars(array $vars) : void\n {\n self::$vars = array_merge(self::$vars, $vars);\n }", "title": "" }, { "docid": "5183ca95f3b65a9ec8e5cafdebdbe4ba", "score": "0.56941414", "text": "public function prepareVars()\n {\n $this->vars['fieldName'] = $this->formField->fieldName;\n }", "title": "" }, { "docid": "d3f9005dab9ec0e6b4307c1d678439eb", "score": "0.5691247", "text": "protected function assignVars() {}", "title": "" }, { "docid": "122853a6e98ed6f922d2904f387a78fa", "score": "0.5689476", "text": "function purdyvars_inject_variables(&$node, $variables) {\n foreach($variables as $name => $data) {\n $node[$name] = $data;\n }\n }", "title": "" }, { "docid": "7ad80f242801772a62090d41e243a6f0", "score": "0.5688748", "text": "function get_local_vars(){\r\n $vars = array();\r\n $vars['zoom'] = (get_field('zoom', 'options'))? get_field('zoom', 'options') : '12'; \r\n $vars['address'] = get_field('address', 'options');\r\n\r\n return $vars;\r\n }", "title": "" }, { "docid": "b9e694363a723c03c4f15b70da3b730d", "score": "0.56882924", "text": "protected function merge_vars() { \n\n\tforeach ($this->vars as $key => $value) {\n\t\t$this->tpl_code = str_ireplace(\"~$key~\", $value, $this->tpl_code);\n\t}\n\n\n}", "title": "" }, { "docid": "ceec9d6f60018cc679a6247a0056c814", "score": "0.5677178", "text": "function getAll() {\n return $this->vars;\n }", "title": "" }, { "docid": "7006b2454cd74484be4340f7e6b32f93", "score": "0.56658924", "text": "public function setVars(array $vars)\n\t{\n\t\t$this->vars = $vars;\n\t}", "title": "" }, { "docid": "c9b56c65f2e53e5ab23e6c361a388a71", "score": "0.566287", "text": "public function getVars(): array\n {\n return $this->response;\n }", "title": "" }, { "docid": "cdabc53164bd1082b572918a171503c5", "score": "0.5642274", "text": "private static function dumpvars($parms){\r\n\t\tif(!empty($parms))\r\n//\t\t\t$parms = var_export($parms,1);\r\n\t\t\t$parms = DEBUG::vars($parms);\r\n\t\telse\r\n\t\t\t$parms = null;\r\n\r\n\t\treturn $parms;\r\n\t}", "title": "" }, { "docid": "7e70ec58ef1d9ebd831d57ab149e0a4d", "score": "0.5634242", "text": "function componentVars() : array\n {\n return ['slot' => trim(ob_get_clean())] + $this->slot[$component = $this->component() + 1] + $this->component[$component];\n }", "title": "" }, { "docid": "ba2ee4ce52a74935f9245c1c865b6bb3", "score": "0.56309295", "text": "function replace_vars($vars) {\n\t\t foreach ($vars as $k => $v) {\n\t\t\t $this->template = str_replace(\"<!--#$k#-->\", $v, $this->template); // adds hidden stuff\n\t\t\t $this->template = str_replace(\"#$k#\", $v, $this->template);\n\t\t } \n\t }", "title": "" }, { "docid": "338ea91fe9d84800ea1aecb09df43b91", "score": "0.5630357", "text": "function ArrayToJavascriptVars($arr, $prefix = \"FPVARS_\") {\n\t$script = \"<script type=\\\"text/javascript\\\" language=\\\"javascript\\\">\\n\";\n\t$row = \"\";\n\treset ($vars);\n\tforeach ($vars as $k => $v) {\n\t\t$row .= \"$k = $v;\\n\";\n\t}\n\t$script .= $row . \"\\n</script>\\n\";\n\treturn $script;\n}", "title": "" }, { "docid": "b7d5b7e230b383de516c345cd27ed684", "score": "0.5630315", "text": "public function getVars()\n {\n return [\n 'get' => $this->get,\n 'session' => $this->session,\n ];\n }", "title": "" }, { "docid": "a196243809617ab7a5f02effb5863d3f", "score": "0.56242794", "text": "function getVariables():array\n {\n return $this->variables; \n }", "title": "" }, { "docid": "17257a826ded84500eecdb45f3ffe978", "score": "0.56147456", "text": "public function searchVariables( $qvars )\r\n{\r\n $qvars[] = 'issue';\r\n $qvars[] = 'searchpage';\r\n return $qvars;\r\n}", "title": "" }, { "docid": "9187653f2851176bf5c0533bcdd51829", "score": "0.5602826", "text": "public function getVars()\n {\n return $this->vars;\n }", "title": "" }, { "docid": "9187653f2851176bf5c0533bcdd51829", "score": "0.5602826", "text": "public function getVars()\n {\n return $this->vars;\n }", "title": "" }, { "docid": "9187653f2851176bf5c0533bcdd51829", "score": "0.5602826", "text": "public function getVars()\n {\n return $this->vars;\n }", "title": "" }, { "docid": "9187653f2851176bf5c0533bcdd51829", "score": "0.5602826", "text": "public function getVars()\n {\n return $this->vars;\n }", "title": "" }, { "docid": "27224ab10975f4481f73ec980154a045", "score": "0.559904", "text": "private function parseVars()\n\t{\n\t\t// assign a placeholder var\n\t\t$this->assign('var', '');\n\t\t$this->assign('timestamp', time());\n\t}", "title": "" }, { "docid": "4af29b73710f73c7785f5d2b44be329f", "score": "0.55958474", "text": "function process($input){\n\t\t$this->vars = $input;\n\t}", "title": "" }, { "docid": "18448e19c8f66d5e409b839e2f89e8ad", "score": "0.5593205", "text": "function printFormVars()\r\n{\r\n global $g_request_vars;\r\n echo \"%\" . \"%<pre>\";\r\n print_r($g_request_vars);\r\n echo \"</pre>\";\r\n}", "title": "" }, { "docid": "3580e73191d838effab898212c20b55c", "score": "0.55790967", "text": "function buildRequestVars() {\n\t\t$oFilterManager = new utilityInputManager(utilityInputManager::LOOKUPGLOBALS_POST);\n\t\t$oFilterManager->addFilter('action', utilityInputFilter::filterString());\n\t\tforeach ( $this->getProperties() as $propertyName ) {\n\t\t\t$oFilterManager->addFilter($propertyName, utilityInputFilter::filterString());\n\t\t}\n\t\t$vars = $oFilterManager->doFilter();\n\t\t\n\t\tif ( count($vars) == 0 ) {\n\t\t\t$oFilterManager->setlookupGlobals(utilityInputManager::LOOKUPGLOBALS_GET);\n\t\t\t$vars = $oFilterManager->doFilter();\n\t\t}\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "6744fe91621baae841f70e3c00297e6d", "score": "0.55724764", "text": "private function asignaVariables() {\n\t\tforeach (get_object_vars($this) as $_nombre => $_valor )\n\t\t\t$$_nombre = $_valor;\n\t}", "title": "" }, { "docid": "6611ac6c266ca20de5cc4156697a1e72", "score": "0.55685157", "text": "public function set_vars($_vars)\n {\n $this->_vars = $_vars;\n\n return $this;\n }", "title": "" }, { "docid": "416b5a72a85a5d7a9f148ce0f6b8c7dc", "score": "0.5553", "text": "public function setVarsFromGlobalCache($vars) {}", "title": "" }, { "docid": "c9ca6f972e790f66b33af8269f24bbca", "score": "0.55520654", "text": "abstract public function getVariables(): array;", "title": "" }, { "docid": "faa033af923c6686f008534bc5dc272e", "score": "0.55452734", "text": "function toArray() {\n\t\t$ret = array ();\n\t\t$vars = $this->getVars ();\n\t\tforeach ( array_keys ( $vars ) as $i ) {\n\t\t\t$ret [$i] = $this->getVar ( $i );\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "c3261a297a8d977c46881e72553aee62", "score": "0.5543056", "text": "public function parse($global_vars = array());", "title": "" }, { "docid": "4d7739ca63944ffc9856cd6493ff935a", "score": "0.5541166", "text": "function setVars($vars, $clear = false){\n\t\t$this->pageTemplate->setVars($vars,$clear);\n\t}", "title": "" }, { "docid": "8617b434bae3ddc2a6d8d61f17b2e2b1", "score": "0.55406433", "text": "function assign_vars($vararray)\r\n {\r\n reset ($vararray);\r\n while (list($key, $val) = each($vararray))\r\n {\r\n $this->_tpldata['.'][0][$key] = $val;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "b01a83524d6e4086e9ad16d0037201b5", "score": "0.5534215", "text": "public function add_query_vars($vars) {\n\t\t$vars[] = 'select';\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "4ee613905aa45d1886fc9cf8eff31883", "score": "0.55313736", "text": "function aa_itinerary_query_var( $vars ) {\n\tif( isset( $vars['itinerary'] ) ) $vars['itinerary'] = true;\n\treturn $vars;\n}", "title": "" }, { "docid": "1ab3fa488878b797f8da71691749ece4", "score": "0.55268615", "text": "function bpdw_query_vars( $vars ) {\n\t$vars[] = 'bpdw_is_wiki';\n\t$vars[] = 'bpdw_is_wiki_home';\n\treturn $vars;\n}", "title": "" }, { "docid": "56fd98621b08e76bae622fe0fd81c2fa", "score": "0.5508788", "text": "function push_vals_to_fields($VARS, &$fields)\n {\n foreach($fields as $k=>$v)\n {\n if(isset($VARS[$k]))\n {\n $fields[$k]['value'] = $VARS[$k];\n }\n }\n }", "title": "" }, { "docid": "fabf2c5de5984269f2a0de0f0cdb356a", "score": "0.5505907", "text": "public function getVariables();", "title": "" } ]
7f88c13995c71a3e132da2be41c48bf8
Gets the maximum length of the field data.
[ { "docid": "30aa938f4b02e85a2733afa748627f5e", "score": "0.88352364", "text": "public function getMaxLength()\n {\n return $this->get(self::MAX_LENGTH);\n }", "title": "" } ]
[ { "docid": "e220592820c8de8a91b9a895af147609", "score": "0.8754096", "text": "public function getMaxLength() {\n return $this->maxLength;\n }", "title": "" }, { "docid": "747fbb8fc42f172dea102cfae3ca5eab", "score": "0.8713116", "text": "public function getMaxLength() {\n return $this->max_length;\n }", "title": "" }, { "docid": "9cc8a462f5590d623a4a5d8b24adab3f", "score": "0.85749394", "text": "public function getMaxLength()\n {\n return (isset($this->schema['maxLength'])) ? $this->schema['maxLength'] : false;\n }", "title": "" }, { "docid": "b2b0441e6c2348739cfbd247251b0cfe", "score": "0.8532498", "text": "public function getMaxlength() {\r\n\t\treturn $this->getAtributo(\"maxlength\");\r\n\t}", "title": "" }, { "docid": "c65bc6a4495a6b24cf464d0240056a46", "score": "0.8516153", "text": "public function getMaxLen()\n {\n return isset($this->max_len) ? $this->max_len : 0;\n }", "title": "" }, { "docid": "722b824f8a46fb322e9043d3cd23ddae", "score": "0.84531915", "text": "public function getMaxLength() {\n\n return $this->getOption('max_length');\n }", "title": "" }, { "docid": "bdb0666243796d61a143a6b979564cd0", "score": "0.8314934", "text": "public function getMaxlength()\n {\n return (int) $this->getAttribute('maxlength');\n }", "title": "" }, { "docid": "ddda69b8eee7fdd5e5cb7e73cdbc10f6", "score": "0.8103846", "text": "public function getMaxValue()\n\t{\n\t\tif ( $this->isString() ) {\n\t\t\treturn $this->getMaxLength();\n\t\t}\n\n\t\t// if unsigned then max length DIV/2\n\n\t\t// TODO: get length from driver\n\t}", "title": "" }, { "docid": "65cecc3e95e170990efcf8e642608407", "score": "0.7655172", "text": "public function getMaxInlinedLength()\n {\n return $this->getProperty('max');\n }", "title": "" }, { "docid": "93e0a1f95352e19d052f9f2105801c74", "score": "0.7604646", "text": "function zen_field_length($tbl, $fld) {\n global $db;\n $rs = $db->MetaColumns($tbl);\n $length = $rs[strtoupper($fld)]->max_length;\n return $length;\n }", "title": "" }, { "docid": "78939211cbef59e8a47d3090626e65bc", "score": "0.7562267", "text": "public function getMaxLength()\n\t{\n\t\tif ( !$this->isString() ) {\n\t\t\tthrow new ColumnException($this, 'string', ColumnException::TYPE_MISMATCH);\n\t\t}\n\n\t\treturn $this->options->typeLength;\n\t}", "title": "" }, { "docid": "6c2eadc233818bc8fc11c7ab31c1bccc", "score": "0.7507927", "text": "public function getMaxSize()\n\t{\n\t\treturn $this->maxsize;\n\t}", "title": "" }, { "docid": "cfedc73dcceb2085ae7239ce6ebef15f", "score": "0.750538", "text": "protected function maxLength()\n {\n if ($this->rules()->has('max'))\n return $this->rules()->get('max')->parameters(0);\n\n if ($this->rules()->has('between'))\n return $this->rules()->get('between')->parameters(1);\n\n return null;\n }", "title": "" }, { "docid": "ea5d7a905156997af0668a10544bc9ba", "score": "0.74813163", "text": "function getTypeMaxLength();", "title": "" }, { "docid": "e922eb2381f179ea5ccafa240eb24278", "score": "0.74371207", "text": "public function getMaxLength(): int {\n return match ($this) {\n self::BIG5,\n self::CP932,\n self::EUCKR,\n self::GB2312,\n self::GBK,\n self::SJIS,\n self::UCS2 => 2,\n self::EUCJPMS,\n self::UJIS => 3,\n self::GB18030,\n self::UTF16,\n self::UTF16LE,\n self::UTF32 => 4,\n default => 1\n };\n }", "title": "" }, { "docid": "577bb091543dd047f0010ad58944241a", "score": "0.7436907", "text": "public function getMaxlength(): ?int\n {\n return $this->maxlength;\n }", "title": "" }, { "docid": "48ada180639adfeef50d8df2985b98b7", "score": "0.74105906", "text": "public function getLengthMax()\n {\n return null;\n }", "title": "" }, { "docid": "447980ea280ff97d94d97711244e6254", "score": "0.73793733", "text": "public function lenMax(): int;", "title": "" }, { "docid": "61c2da134b74ca1c1c5497112bce155b", "score": "0.7364052", "text": "public function _GetFieldWidth()\n {\n $iFieldMaxLength = parent::_GetFieldWidth();\n\n if (is_null($iFieldMaxLength) || empty($iFieldMaxLength)) {\n $query = 'DESCRIBE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->sTableName).'`';\n $result = MySqlLegacySupport::getInstance()->query($query);\n if (MySqlLegacySupport::getInstance()->num_rows($result) > 0) {\n while ($aField = MySqlLegacySupport::getInstance()->fetch_assoc($result)) {\n if ($aField['Field'] == $this->name) {\n $sFieldType = $aField['Type'];\n if ('int' == substr($sFieldType, 0, 3)) {\n $iFieldMaxLengthTmp = intval(substr($sFieldType, 4, -1));\n if (!empty($iFieldMaxLengthTmp)) {\n $iFieldMaxLength = $iFieldMaxLengthTmp;\n }\n }\n }\n }\n }\n }\n\n return $iFieldMaxLength;\n }", "title": "" }, { "docid": "6f20345c5aafc1abb94fbd5ac4a141aa", "score": "0.7351216", "text": "public function getMaxParamLen() {\n return $this->_maxParamLen;\n }", "title": "" }, { "docid": "5346b1d9f1e1de01413755ebd3c8f152", "score": "0.72721606", "text": "public function lenFileMax() { return $this->_m_lenFileMax; }", "title": "" }, { "docid": "5ea27699ca5f59f3f6d8671acb5898d7", "score": "0.72645074", "text": "public function getMaxSize()\n {\n return $this->_maxSize;\n }", "title": "" }, { "docid": "0fbc05305ab965d686ce9cd316be1162", "score": "0.7225173", "text": "function getLength() {\n\t\treturn $this->getData('length');\n\t}", "title": "" }, { "docid": "458506e393d3e4ad3fd75d0aab51a68a", "score": "0.7106396", "text": "public function maxLength($maxLength = 0)\n {\n return $this->_attribute('maxlength', intval($maxLength));\n }", "title": "" }, { "docid": "a1e6ac45dfe174e2dd6ec770cccd5201", "score": "0.7101784", "text": "public function get_max_size() {\n return $this->max_size;\n }", "title": "" }, { "docid": "e81e50b77af257c39fc4e6fbc9b7e4a3", "score": "0.708958", "text": "public function getMaxLimit() {\n return intval($this->max);\n }", "title": "" }, { "docid": "66b19141f2bf4592f93db5835abb9d71", "score": "0.7076493", "text": "public function getMaxIndexLength() {\n\t\t$max = 250; \n\t\tif($this->charset === 'utf8mb4') {\n\t\t\tif($this->engine === 'innodb') {\n\t\t\t\t$max = 191; \n\t\t\t}\n\t\t}\n\t\treturn $max;\n\t}", "title": "" }, { "docid": "0b185b4fdb6c1b90b6fe303cb5a073a0", "score": "0.7054489", "text": "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "title": "" }, { "docid": "0b185b4fdb6c1b90b6fe303cb5a073a0", "score": "0.7054489", "text": "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "title": "" }, { "docid": "0b185b4fdb6c1b90b6fe303cb5a073a0", "score": "0.7054489", "text": "public function get_max_length_code() {\n\t\treturn self::MAX_LENGTH_CODE;\n\t}", "title": "" }, { "docid": "dd8fe07fd7369527925ce3f32c1deb9c", "score": "0.7044781", "text": "public function getMaxSize() :int;", "title": "" }, { "docid": "88cf2120ea90fa5098785d63fa828d95", "score": "0.70268947", "text": "function max_length($field, $value)\n {\n return strlen($field) <= $value;\n }", "title": "" }, { "docid": "998d290ea9885efb82483bcede2cb8b7", "score": "0.7008881", "text": "public function setMaxLen($var)\n {\n GPBUtil::checkUint64($var);\n $this->max_len = $var;\n\n return $this;\n }", "title": "" }, { "docid": "65c858250da366299e2eae083488c873", "score": "0.7004994", "text": "public function dtLimit()\n {\n $request = request();\n return $request->length ? intval($request->length) : 30;\n }", "title": "" }, { "docid": "5fe2dd364dc41acfa8ef5e62872be9c6", "score": "0.69917494", "text": "public function max_field_length( $field = '' ) {\n\n\t\t// Handle my different field types.\n\t\tswitch ( esc_attr( $field ) ) {\n\n\t\t\tcase 'title' :\n\t\t\t\treturn $this->max_title_length();\n\t\t\t\tbreak;\n\n\t\t\tcase 'desc' :\n\t\t\t\treturn $this->max_description_length();\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Include the action to send something else back.\n\t\tdo_action( 'minshare_meta_max_field_length', $field );\n\t}", "title": "" }, { "docid": "41cd69dba2e917b6ed3ae6f2cad58461", "score": "0.6971354", "text": "public function getLength() {\n return $this->get(self::LENGTH);\n }", "title": "" }, { "docid": "9036db1649085ed50d764628840f5700", "score": "0.69520855", "text": "public function getLength() {\n\t\treturn $this->options ['length'];\n\t}", "title": "" }, { "docid": "d769ae98b1f68d21ee1c019694530ccf", "score": "0.69320536", "text": "public function getLength()\n {\n return isset($this->length) ? $this->length : 0;\n }", "title": "" }, { "docid": "a0e8026c83a97c72ae5b20af28fbc1da", "score": "0.6927117", "text": "public function getDescriptionMaxSize()\n {\n return $this->gateway->getMetaData()->getColumn('description_msg')->getLength(); \n }", "title": "" }, { "docid": "bb1003620bb572132885f8a6028f7d6c", "score": "0.6916516", "text": "public function getMaxSize() : int {\n\t\treturn $this->maxSize;\n\t}", "title": "" }, { "docid": "3dfcfe22dc8819b61744b1e4659ef182", "score": "0.68891156", "text": "public function get_ID_max_length() {\n\t\t// One will not run out of 10-base digits, if there are 2\n\t\t// 10-base digits per 4 bits.\n\t\t//\n\t\t// For 64-bit systems it makes (64/4)*2=32 10-base digits per integer.\n\t\t// 5*32+4=164\n\t\treturn 164;\n\t}", "title": "" }, { "docid": "1722b77808aaf1a8cb794ff6d120a6d0", "score": "0.68588537", "text": "public function getMaxFileSize() {\n\t\treturn $this->max_file_size;\n\t}", "title": "" }, { "docid": "f3ccd4e9ddd2f99522e8694d5e19b8a5", "score": "0.68421686", "text": "public function getMaxFileSize()\n\t{\n\t\treturn $this->maxFileSize;\n\t}", "title": "" }, { "docid": "2b1d7d7fcb9925a8553a61edb13d38fd", "score": "0.68411046", "text": "public function getPropertyMaxLength($prop) {\n\tif (!$this->isProperty($prop)) { return false; }\n\treturn $this->_propertyKeyGet($prop,'maxLength');\n\t}", "title": "" }, { "docid": "a9655a76a1d7a28ecd73021a4f8fb5d0", "score": "0.68198985", "text": "public function get_length() {\n\t\treturn $this->length;\n\t}", "title": "" }, { "docid": "faee6a2b5ba333d915efd93bf9027a4e", "score": "0.6805573", "text": "public function getMaxBytes()\n {\n return isset($this->max_bytes) ? $this->max_bytes : 0;\n }", "title": "" }, { "docid": "e130e07f874f1ae86e34c3e4bdb61304", "score": "0.6794103", "text": "public function getMaxFileSize()\r\n {\r\n return $this->_maxFileSize;\r\n }", "title": "" }, { "docid": "a1301c62e4c1e0321135d6b30636e132", "score": "0.67898065", "text": "public function get_length()\r\n\t{\r\n\t\treturn $this->length ;\r\n\t}", "title": "" }, { "docid": "576829fdc231844761b6fd536c8d89ab", "score": "0.67713046", "text": "function db_getMaxSizeField($recordset,$campo = 0) {\n\n $numrows = pg_numrows($recordset);\n\n $val = strlen(trim(pg_result($recordset,0,$campo)));\n\n for($i = 1;$i < $numrows;$i++) {\n\n $field = strlen(trim(pg_result($recordset,$i,$campo)));\n\n if($val < $field)\n\n $val = $field;\n\n }\n\n return (int)$val;\n\n}", "title": "" }, { "docid": "019f4c35b2b046269c1f1fdd983b0c7d", "score": "0.6760477", "text": "static public function get_max() {\n\t\t \t$options = self::get_options();\n\t\t \treturn $options['max'];\n\t\t}", "title": "" }, { "docid": "163b2e5812fca4fd6715156f35024642", "score": "0.6756903", "text": "public function getLength(): int {\n\t\treturn $this->length;\n\t}", "title": "" }, { "docid": "188e4313af76350ac6567a58a6fc7ef7", "score": "0.6753831", "text": "public function get_length() {\n return $this->length;\n }", "title": "" }, { "docid": "82b1e0f5a803114775b6eef52ba41b15", "score": "0.67222613", "text": "function getLength() {\r\n\t\treturn $this->length;\r\n\t}", "title": "" }, { "docid": "a9dc61582867aeb8644f454dba8ce487", "score": "0.6708229", "text": "public function getMaxSearchQueryLength()\n {\n return $this->faqConfig->getMaxSearchQueryLength($this->getCurrentStoreId());\n }", "title": "" }, { "docid": "5a0dd07c958d61e5286279924f93ab90", "score": "0.6704341", "text": "public function getDataLength() \n {\n return $this->_dataLength; \n }", "title": "" }, { "docid": "a0030ad73ab849d9701a65ec22c13f9e", "score": "0.67014533", "text": "function getMaxFileSize() {\n return $this->maxFileSize;\n }", "title": "" }, { "docid": "ae831720c5610b774fd3a243544dfb4f", "score": "0.6699617", "text": "abstract protected function getFieldMaxLengthName($maxLength);", "title": "" }, { "docid": "7a22687cd97a50d0de7481d0b69cc373", "score": "0.66869843", "text": "public function getLength()\r\n {\r\n return $this->length;\r\n }", "title": "" }, { "docid": "1c2ca7df737a925768e9dc730b374103", "score": "0.66848737", "text": "function getFieldLength($field){\n return mysql_field_len($this->result, $field);\n }", "title": "" }, { "docid": "777762f9c2e529faa334d69cb149ae53", "score": "0.66821724", "text": "public function getLength()\n\t{\n\t\treturn $this->length;\n\t}", "title": "" }, { "docid": "1652bdf39028dba7c5870ab1a723903c", "score": "0.6670543", "text": "public function getLen()\n {\n return isset($this->len) ? $this->len : 0;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "54dbeeae8efd6df355eaf8811923a7b2", "score": "0.6669257", "text": "public function getLength()\n {\n return $this->length;\n }", "title": "" }, { "docid": "abd22818acd9c1b9b87c0c88eacf34fc", "score": "0.6662717", "text": "public function maxFileSize()\n {\n return $this->_maxFileSize;\n }", "title": "" }, { "docid": "c8ea6e6a03155ab8bcc50961e27ab3ee", "score": "0.6634017", "text": "public function getMaxFileSize() {\n \treturn $this->_maxFileSize;\n }", "title": "" }, { "docid": "552ce11b04d30bfc6ac9c2a0376529d5", "score": "0.6621015", "text": "function get_length()\r\n\t{\r\n\t\treturn $this->length ;\r\n\t}", "title": "" }, { "docid": "552ce11b04d30bfc6ac9c2a0376529d5", "score": "0.6621015", "text": "function get_length()\r\n\t{\r\n\t\treturn $this->length ;\r\n\t}", "title": "" }, { "docid": "7cdd2e4dd3a99820ffa8444af8c644aa", "score": "0.6614501", "text": "public function length()\n {\n return (int)strlen($this->get());\n }", "title": "" }, { "docid": "849e224dfc843a5c02699fddb1aebcf5", "score": "0.66078097", "text": "public function getMax() \n {\n return $this->_fields['Max']['FieldValue'];\n }", "title": "" }, { "docid": "3a374d162abd378017b7ab473b72982a", "score": "0.6589218", "text": "public function getMaxLengthValidationMessage(): ?string;", "title": "" }, { "docid": "90118b877259f6a98e9f0c5ab3bf1f73", "score": "0.65855396", "text": "public static function getMaxSize()\n {\n return static::getConfig()['max_size'] ?? null;\n }", "title": "" }, { "docid": "bc59467d5cb1b033887e3805e1c79d50", "score": "0.65775096", "text": "function getLength()\r\n\t{\r\n\t\treturn count($this->getLogicalChars());\r\n\t}", "title": "" }, { "docid": "fcfa064722944bb9a774d384854e5102", "score": "0.65767187", "text": "public function length():int {\n\t\t\treturn \\strlen($this->value);\n\t\t}", "title": "" }, { "docid": "b93bba122786dbd9cad399aefb4ff6fe", "score": "0.65736103", "text": "function getLength() {\n return $this->length;\n }", "title": "" }, { "docid": "45ac3ba8dad1eef1e89d5f0c72bfb6c5", "score": "0.6565055", "text": "public function getLength(): int {\n\t\tif ( $this->_charLength === null ) {\n\t\t\t$this->_charLength = mb_strlen( $this->_data, \"utf8\" );\n\t\t}\n\t\treturn $this->_charLength;\n\t}", "title": "" }, { "docid": "803563524ff3b0334a3545bbd07013ca", "score": "0.65566635", "text": "function getMaxFileSize(){\r\n\t\treturn $this->_maxFileSize;\r\n\t}", "title": "" }, { "docid": "ec51c66407fbe0634209c21945cac8eb", "score": "0.6534127", "text": "public function max_description_length() {\n\t\treturn apply_filters( 'minshare_meta_max_description_length', 300 );\n\t}", "title": "" }, { "docid": "d7549db9eb99b2ebc65d79d6bbf88ef7", "score": "0.65212625", "text": "public function getLength() \n {\n return $this->_length; \n }", "title": "" }, { "docid": "c664aaf95a4f7e90876e95474e443843", "score": "0.6501693", "text": "function getAbstractLength() {\n\t\treturn $this->getData('abstractLength');\n\t}", "title": "" }, { "docid": "a9f30407cf32f1c505685380c81cf6d0", "score": "0.650045", "text": "public function getMaxSize() {\n\t\t$p = parent::getMaxSize();\n\n\t\t$array = str_split($this->text, 1);\n\t\t$textlength = (array_sum($array) + count($array)) * $this->scale;\n\n\t\treturn array($p[0] + $textlength, $p[1]);\n\t}", "title": "" }, { "docid": "ada883609f7b351a0d1f405a96247363", "score": "0.6492329", "text": "public function maxLen($length){\n\t\t$this->add(function($value) use($length){\n\t\t\tif (strlen($value) > $length)return sprintf(\"Value can have maximum of %d characters.\", $length);\n\t\t});\n\t}", "title": "" }, { "docid": "0ea542f5ff6c1c3f9f6dd3bbee84b1fa", "score": "0.64700407", "text": "public function getMax() {\r\n\t\treturn $this->getAtributo(\"max\");\r\n\t}", "title": "" }, { "docid": "e6540841a1e87f428eb980ce8e5f74c2", "score": "0.6458347", "text": "public function getAttributeMaxLength($attribute)\n {\n $validators = $this->getValidators($attribute);\n foreach ($validators as $validator) {\n if ($validator instanceof \\CStringValidator) {\n return $validator->max;\n }\n }\n return 0;\n }", "title": "" }, { "docid": "36dce5e15fe98b14071e7d7985fb5c9d", "score": "0.6448748", "text": "public function getUrlMaxSize()\n {\n return $this->gateway->getMetaData()->getColumn('long_url')->getLength();\n }", "title": "" }, { "docid": "1a64dc60579b16bad3e9ba8f6ed67dee", "score": "0.64483744", "text": "public function getMaxValueValue()\n {\n return $this->readWrapperValue(\"max_value\");\n }", "title": "" }, { "docid": "f533b1fcf44c409e1560a9b7f0dcbcb5", "score": "0.644106", "text": "public function getLength()\n {\n return $this->getSize();\n }", "title": "" }, { "docid": "b666d43a8cea82c75b6076fb6dd5e164", "score": "0.64300525", "text": "function val_maxlength($value, $length) {\r\n\t\tif (strlen($value) <= intval($length)) {\r\n\t\t\treturn $value;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "50ea5cfc666e92cee5b6cd3f7801c87b", "score": "0.64132565", "text": "public function getMaxValue() {\n return $this->maxVal;\n }", "title": "" }, { "docid": "cf12cab76e06e056ae623c20585253bd", "score": "0.64110476", "text": "private function maxlength($field)\n {\n return (isset($field['maxlength']) and ($field['maxlength'])) ? 'maxlength=\"'. $field['maxlength'] .'\"' : null;\n }", "title": "" }, { "docid": "90e48d73b818162bf6e80cecea283349", "score": "0.640308", "text": "function dbFieldSize()\n\t{\n\t\treturn $this->m_maxsize.($this->getDecimals()>0?\",\".$this->getDecimals():\"\");\n\t}", "title": "" }, { "docid": "523ee9b6ad5a03e56c5a1107b9aa2271", "score": "0.64020103", "text": "public function getMaxAliasLength() : ?int\n {\n return static::MAX_ALIAS_LENGTH;\n }", "title": "" }, { "docid": "84d2f0be7d36408e02f350dbf478da00", "score": "0.6395207", "text": "protected function getLength(): string\n {\n return $this->column->getLength()\n ? sprintf('(%s)', $this->column->getLength())\n : '';\n }", "title": "" }, { "docid": "8a3bcf069fefbe84df6c719076229b77", "score": "0.6373292", "text": "public function getMaximumLineLength()\n {\n return 79;\n }", "title": "" } ]
05cef99a29f956eeec2c42a7ee779879
determine if the variable passed is currently in the list of variables to propagate deprecated, use inVarH>isInVarP for this
[ { "docid": "bfe182e2c2eb0efa8468cbcf1c0e434d", "score": "0.547526", "text": "function isInVarP($varName) {\n return in_array($varName, $this->inVarH->inVarPList);\n }", "title": "" } ]
[ { "docid": "e5ba32dfba0a546befb7ab1ceb874363", "score": "0.61924857", "text": "function isdeprecated($tag,&$ttag){\r\n\r\n\tif ($tag==\"FOR_FUN\"){\r\n\t\t$tag=\"FORFUN\";\r\n\t}\r\n\tif ($tag==\"BOTMASTER\"){\r\n\t\t$tag=\"MASTER\";\r\n\t}\r\n\tif ($tag==\"KIND_MUSIC\"){\r\n\t\t$tag=\"KINDMUSIC\";\r\n\t}\r\n\tif ($tag==\"LOOK_LIKE\"){\r\n\t\t$tag=\"LOOKLIKE\";\r\n\t}\r\n\r\n\tif ($tag==\"TALK_ABOUT\"){\r\n\t\t$tag=\"TALKABOUT\";\r\n\t}\t\r\n\t$deptags=array(\"NAME\",\"BIRTHDAY\",\"BIRTHPLACE\",\"BOYFRIEND\",\"FAVORITEBAND\",\"FAVORITEBOOK\",\"FAVORITECOLOR\",\"FAVORITEFOOD\",\"FAVORITESONG\",\"FAVORITEMOVIE\",\"FORFUN\",\"FRIENDS\",\"GIRLFRIEND\",\"KINDMUSIC\",\"LOCATION\",\"LOOKLIKE\",\"MASTER\",\"QUESTION\",\"SIGN\",\"TALKABOUT\",\"WEAR\");\r\n\r\n\tif (in_array($tag,$deptags)){\r\n\t\t$ttag=$tag;\r\n\t\treturn true;\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "ce302923b663fb957e79aeb2e4ccd4a6", "score": "0.57810885", "text": "protected static function _isPaypalDeprecated()\n\t{\n\t\t$paymentConfigurationArray = self::_getDatabaseQueryBuilder()\n\t\t ->get_where('configuration',\n\t\t array('configuration_key' => 'MODULE_PAYMENT_INSTALLED'))\n\t\t ->row_array();\n\t\t$installedPaymentsString = $paymentConfigurationArray['configuration_value'];\n\n\t\t$installedPaymentsArray = explode(';', $installedPaymentsString);\n\n\t\treturn in_array(self::$moduleDeprecatedName, $installedPaymentsArray);\n\t}", "title": "" }, { "docid": "d8bedd7e35962faaecebc0f1594d0729", "score": "0.56937003", "text": "public function isDeprecated()\n {\n return false;\n }", "title": "" }, { "docid": "5d3c3198db91a296d7e20a36fc5e5756", "score": "0.5639328", "text": "public function isWarning();", "title": "" }, { "docid": "3421cfd290f4706ae26c82b4e09d3886", "score": "0.56292397", "text": "function check_variable($variable_name, $is_edit = false) {\r\n global $db, $RESERVED_VARIABLES;\r\n\r\n $variable_name = variable_name($variable_name);\r\n\r\n if(@in_array($variable_name, $RESERVED_VARIABLES)) {\r\n return array(false, \"The &quot;Field Short Name&quot; that you've used is a reserved word, please use a different field short name.\");\r\n } else {\r\n if(!$is_edit) {\r\n $query = \"SELECT `field_sname` FROM `\".TABLES_PREFIX.\"cfields` WHERE `field_sname`='\".checkslashes($variable_name).\"'\";\r\n $result = $db->GetRow($query);\r\n if($result) {\r\n return array(false, \"The &quot;Field Short Name&quot; that you've used is already in use, please use a unique field short name.\");\r\n }\r\n }\r\n }\r\n return array(true, $variable_name);\r\n}", "title": "" }, { "docid": "002b326bf4d37ba981710b9a0322ca94", "score": "0.56122583", "text": "function hasVariable($varname)\n\t{\n\t\treturn array_key_exists($varname, $this->variables);\n\t}", "title": "" }, { "docid": "e196d0175f3da334a2fc7fe67461609b", "score": "0.55517626", "text": "function warnings() {\n return !empty($GLOBALS['Warnings']);\n }", "title": "" }, { "docid": "5c62b23dd69e006283adb67b48ccfcee", "score": "0.55318755", "text": "public function is_deprecated() {\n return false;\n }", "title": "" }, { "docid": "a5e41dde70db4b056f5dca9d7ab0a536", "score": "0.5530485", "text": "public function hasVars()\n {\n return !empty($this->varsNames);\n }", "title": "" }, { "docid": "29e74331193e43774270d01d42b4d5f0", "score": "0.55138105", "text": "public function isUnivarEnabled() {\n return Mage::getStoreConfigFlag('ometria/advanced/univar');\n }", "title": "" }, { "docid": "bad3a0aa9c2c0637e034f6f0fe9480f4", "score": "0.54970354", "text": "public function expectDeprecated() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b63f40fd5aa45e100bb632400b1daf6f", "score": "0.54574", "text": "private function _warn() {\n\n if ($this->_is_local_upgrade())\n return true;\n if ($this->_available_version != $this->_installed_version)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "74e5e10ac8860d24546f1ac6a467f583", "score": "0.541729", "text": "public function hasScriptVariables(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "9fa4a2021103634b35cf1186716c2b37", "score": "0.53971153", "text": "public function hasScriptVariables(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "9fa4a2021103634b35cf1186716c2b37", "score": "0.53971153", "text": "public function hasScriptVariables(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "3352c52d921081ad1d17e5d5e8507b9e", "score": "0.5286752", "text": "public function isAccessingVariable($name);", "title": "" }, { "docid": "02ca0cd59b691173348a60cde356644c", "score": "0.5256222", "text": "function _exists($var_name)\n {\n return false;\n }", "title": "" }, { "docid": "1107f59e3faeb090398624927e5870da", "score": "0.52040553", "text": "public function isLossless(): bool\n {\n return isset($this->params[self::PARAM_LOSSLESS]);\n }", "title": "" }, { "docid": "181a79b5ea304debeb5932aa5bbcd2af", "score": "0.51903594", "text": "function unusedParameters() {\n\t\treturn ((count($this->unusedParameters))?$this->unusedParameters:false);\n\t}", "title": "" }, { "docid": "aacfb1088afa0a38756dabca08cec5e2", "score": "0.5170107", "text": "public function epIsVar($var_name) {\n // check if we can find a best-matched var name\n return in_array($var_name, $this->ep_cached_vars);\n }", "title": "" }, { "docid": "c4491a4d029f414d869cca3e8d807404", "score": "0.516528", "text": "function hideByVal($comp,$valList){\n $eval = in_array($comp, $valList);\n \n echo (!$eval)?\" hide \":\"\";\n }", "title": "" }, { "docid": "b7d4c9426afb3194c752af0bf60eab05", "score": "0.51343006", "text": "public function getDeprecated()\n {\n return $this->deprecated;\n }", "title": "" }, { "docid": "d1e1d5e0997d451750879a1a40645a64", "score": "0.51331764", "text": "protected static function usually_unused_goes_here(...$params): bool\n {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "60ff297f320cb47383bcfea8bc25df2d", "score": "0.5128097", "text": "function filter_has_var ($type, $variable_name) {}", "title": "" }, { "docid": "406d365269baf2a8712b9242a7389c7a", "score": "0.5107342", "text": "public function hasVariable($name)\n {\n $name = str_replace('-', '_', $name);\n\n return isset($this->variables[$name]);\n }", "title": "" }, { "docid": "f9d6c18ff5750a5d15cd7dc2f175dc05", "score": "0.5105997", "text": "public static function displayAsDeprecated()\n {\n return;\n }", "title": "" }, { "docid": "8869be8988354b1dede820ae831b66ec", "score": "0.5099635", "text": "public function hasVarData(): bool\n\t{\n\t\treturn (bool) $this->hasVarData;\n\t}", "title": "" }, { "docid": "8ffca03a8e0ebbcf75540203b1366841", "score": "0.50882596", "text": "public function hasWarnings() {\n return !empty($this->messages[self::WARNING]);\n }", "title": "" }, { "docid": "920eb94cb9b08dd542ca391a96c4cbf6", "score": "0.50798243", "text": "function is_set($varName)\n {\n return isset($this->vars[$varName]) ? true : false;\n }", "title": "" }, { "docid": "84c1bbb0ecff2d7976af88c61ba5dfb8", "score": "0.50793195", "text": "function vcita_should_show_when_not_used($global_params) {\n return isset($global_params['vcita_auto_install']) && $global_params['vcita_auto_install'] == \"false\";\n}", "title": "" }, { "docid": "1dc2af7025f9e91524c6b004f1a14ece", "score": "0.50709945", "text": "protected function isPrecededByOutputVar()\n\t{\n\t\treturn ($this->tokens[$this->i - 1] === [T_STRING, 'out']\n\t\t && $this->tokens[$this->i - 2] === [T_OBJECT_OPERATOR, '->']\n\t\t && $this->tokens[$this->i - 3] === [T_VARIABLE, '$this']);\n\t}", "title": "" }, { "docid": "f3e79697f4226fec68573e03587ad7d2", "score": "0.50573456", "text": "public function multisite_server_variable_warning(){\n\t if (!$this->ssl_enabled_networkwide && $this->selected_networkwide_or_per_site && $this->is_multisite_subfolder_install()) {\n\t\t //with no server variables, the website could get into a redirect loop.\n\t\t if (RSSSL()->really_simple_ssl->no_server_variable) {\n return 'no-server-variable';\n\t\t }\n\t }\n\t return 'success';\n }", "title": "" }, { "docid": "4180d5933faa73e96aa66d8cb7d6d437", "score": "0.50565726", "text": "public function hasVariable(string $name): bool;", "title": "" }, { "docid": "c4cf427fe1a4bda1d1285d3fcdf40c08", "score": "0.503747", "text": "public function isStrictVariables()\n {\n return $this->strictVariables;\n }", "title": "" }, { "docid": "7dd619f65203bbd872fc93ec1eb7e51f", "score": "0.50341713", "text": "protected function ignoreDeprecations(): bool\n {\n if ($this->requestStack->getMasterRequest() === null) {\n return false;\n }\n\n return $this->requestStack->getMasterRequest()->headers->get(PlatformRequest::HEADER_IGNORE_DEPRECATIONS) === 'true';\n }", "title": "" }, { "docid": "494aefdbb8d44f5cf69314d83018e261", "score": "0.50151926", "text": "protected function shouldHide(): bool\n {\n return in_array($this->env, $this->directiveArgValue('env'));\n }", "title": "" }, { "docid": "f359608efafa22ea78bf73c36f9cc22f", "score": "0.5012004", "text": "public function deactivateDeprecatedVersion()\n\t{\n\t\t// at this moment the plugin.php is not loaded\n\t\tNextADInt_Core_Util::native()->includeOnce(ABSPATH . 'wp-admin/includes/plugin.php');\n\n\t\tif (is_plugin_active(self::DEPRECATED_ADI_PLUGIN_NAME)) {\n\t\t\tdeactivate_plugins(self::DEPRECATED_ADI_PLUGIN_NAME);\n\t\t\t$this->logger->debug(\"Disabled deprecated version of ADI.\");\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2b0b4cc32ddb8d5af3dcc57258c1d2cc", "score": "0.5006728", "text": "public function hasVariable(string $key) :bool\n {\n if(isset($this->variable[$key])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "c34bd673ef7f61ffb32a532927ef40e8", "score": "0.49995553", "text": "protected function _fcUseDeprecatedInstantiation() \n {\n $oConfig = $this->getConfig();\n if ((version_compare($oConfig->getVersion(), \"4.8.0\") < 1 && $oConfig->getEdition() == \"CE\") \n || (version_compare($oConfig->getVersion(), \"4.8.0\") < 1 && $oConfig->getEdition() == \"PE\") \n || (version_compare($oConfig->getVersion(), \"5.1.0\") < 1 && $oConfig->getEdition() == \"EE\")\n ) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7ec3dabd5df269452201b6eaeed79547", "score": "0.49747553", "text": "public function hasWarnings()\n {\n return $this->warnings == null;\n }", "title": "" }, { "docid": "bd67f92d8905cd8f7205e7fd528ac966", "score": "0.49460977", "text": "static public function isEnabled()\n\t{\n\t\treturn defined( 'XDEBUG_CC_UNUSED' );\n\t}", "title": "" }, { "docid": "931428bafa0952a2bb3403c0fcdf7eda", "score": "0.49453774", "text": "function vtx_notice_use_of_inactive_plugin( $action_or_var_name ) {\n if ( ! WP_DEBUG ) {\n return;\n }\n\n global $vtx_inactive_plugins_notices;\n\n if ( ! isset( $vtx_inactive_plugins_notices ) ) {\n $vtx_inactive_plugins_notices = array();\n }\n\n if ( empty( $vtx_inactive_plugins_notices[ $action_or_var_name ] ) ) {\n $vtx_inactive_plugins_notices[ $action_or_var_name ] = 1;\n } else {\n $vtx_inactive_plugins_notices[ $action_or_var_name ] += 1;\n }\n}", "title": "" }, { "docid": "a735d5e78f2b622dc33b9d5f8652ed15", "score": "0.49368232", "text": "function bpsPro_show_global_variables() {\nglobal $wpdb;\n\t\n\tif ( isset( $_POST['Submit-DB-show-global-variables'] ) && current_user_can('manage_options') ) {\n\t\tcheck_admin_referer( 'bulletproof_security_DB_show_global_variables' );\n\n\t$blank = '';\n\t$result = $wpdb->get_results( $wpdb->prepare( \"SHOW GLOBAL VARIABLES WHERE Variable_name != %s\", $blank ) );\n\n\techo '<div id=\"IXR-Check-Extensive\" style=\"max-width:800px;color:black;border:2px solid black;background-color:#ffffe0;padding:5px;margin:0px;\">';\n\t\n\tforeach ( $result as $data ) {\n\n\t\techo '<strong>'.$data->Variable_name.': </strong>'. $data->Value.'<br>';\t\n\t}\n\techo '</div>';\n\t}\n}", "title": "" }, { "docid": "57594a42d5ba3a995b58fc7bebfe4ef7", "score": "0.49300003", "text": "public function isReportDeprecated()\n\t{\n\t\tglobal $ilDB;\n\n\t\t// Check for modified questions\n\t\t$query = 'SELECT * FROM adn_ep_sheet_question '.\n\t\t'JOIN adn_ed_question ON ed_question_id = id '.\n\t\t'WHERE ep_answer_sheet_id = '.$ilDB->quote($this->getSheet(), 'integer').' '.\n\t\t'AND last_update > '.$ilDB->quote(\n\t\t\t$this->getGeneratedOn()->get(IL_CAL_DATETIME,'', ilTimeZone::UTC),'timestamp');\n\n\t\t$res = $ilDB->query($query);\n\t\tif($res->numRows())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check for modified question sheets\n\t\t$query = \"SELECT * FROM adn_ep_answer_sheet \".\n\t\t'WHERE last_update > '.$ilDB->quote(\n\t\t\t$this->getGeneratedOn()->get(IL_CAL_DATETIME, '', ilTimeZone::UTC), 'timestamp');\n\t\t$res = $ilDB->query($query);\n\n\t\treturn $res->numRows() ? true : false;\n\t}", "title": "" }, { "docid": "caa49059c4e661e9c1457c0fbd17e5bb", "score": "0.49247947", "text": "function vV($inputvar) {\n\treturn (isset($inputvar) && $inputvar != \"\"); \n}", "title": "" }, { "docid": "8ab5103f3cf739c6483ca49c34d5a497", "score": "0.4922118", "text": "private function getDeprecationParams(): array\n {\n if (method_exists(BaseNode::class, 'getDeprecation')) {\n return [\n 'hwi/oauth-bundle',\n '2.0',\n 'option \"%path%.%node%\" is deprecated. Firewall names are collected automatically.',\n ];\n }\n\n return ['Since hwi/oauth-bundle 2.0: option \"hwi_oauth.firewall_names\" is deprecated. Firewall names are collected automatically.'];\n }", "title": "" }, { "docid": "b05f5cc15a752b898125826d2fcbfea1", "score": "0.49118268", "text": "function filter_has_var($type, $variable_name)\n{\n}", "title": "" }, { "docid": "45957f09eaf47eec809eda84a212923e", "score": "0.48883414", "text": "protected function _varCheck($token)\n {\n if (isset($token[0]) && ($token{0} == '$' || $token{0} == '?')) {\n $this->_query->addUsedVar($token);\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "02ef5c909a9e17f779ecf1abe599d297", "score": "0.48769093", "text": "public function isWarningEnabled() {\n\t\treturn ($this->level >= Logger::WARNING);\n\t}", "title": "" }, { "docid": "729721f46b6c5daaf1aec612aa26c657", "score": "0.48550573", "text": "public function updateNoDev()\n {\n return $this->getBoolean('update-no-dev', true);\n }", "title": "" }, { "docid": "ce5d3d7b2874199dc4b8c64093a89690", "score": "0.48429444", "text": "public function isVar($key);", "title": "" }, { "docid": "404521e5fbd9dd8487c143ba75d42b25", "score": "0.4842605", "text": "public function canUseInternal();", "title": "" }, { "docid": "c69f38f381d0544e09d5a9f2c02a8a26", "score": "0.4837734", "text": "function get($var_name)\n {\n return false;\n }", "title": "" }, { "docid": "be0a070b88b3a41e196533a38e09537a", "score": "0.48305088", "text": "public function applicationFileIsDeprecated() {\r\n\t\treturn $this->getProjectFileModificationTime() > $this->getApplicationFileModificationTime();\r\n\t}", "title": "" }, { "docid": "8c581fd518476b0a878ff1885a24c290", "score": "0.48230892", "text": "public function isWarning(){\n return $this->conn->warning_count != 0;\n }", "title": "" }, { "docid": "362659deae929a20c8aff18992f8f1ac", "score": "0.48223153", "text": "public static function is_support_added_via_option() {\n\t\t_deprecated_function( __METHOD__, '2.0.0' );\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c1ea63024b5fed07c441321f128ad0e3", "score": "0.48138753", "text": "public function getIsObsolete()\n {\n return $this->is_obsolete;\n }", "title": "" }, { "docid": "6c6ed67db74862c09fd22dbc9692204c", "score": "0.48034215", "text": "function varIsSet($variable){\n\t\tif($variable != NULL){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "659c6121c872f0fec9c9d153c58ad8dc", "score": "0.4802961", "text": "public static function check_hooks() {\n\t\tforeach ( static::$deprecated_hooks as $old_hook => $settings ) {\n\t\t\tif ( ! empty( $settings['replacement'] ) ) {\n\t\t\t\t// Hooks with replacements have deprecation notice logged the new hook is called.\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (\n\t\t\t\t( self::TYPE_ACTION === $settings['type'] && has_action( $old_hook ) )\n\t\t\t\t|| ( self::TYPE_FILTER === $settings['type'] && has_filter( $old_hook ) )\n\t\t\t) {\n\t\t\t\tstatic::trigger_deprecation_notice( $old_hook );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "565988b244158d151af165036ee1f3a4", "score": "0.47993717", "text": "public function is_needed() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\\WP\\SEO\\Generators\\Schema\\WebPage::is_needed' );\n\n\t\treturn parent::is_needed();\n\t}", "title": "" }, { "docid": "3730b43659958a45b9addf2e0a190219", "score": "0.4796391", "text": "protected function isDeprecation(int $level): bool\n {\n return in_array($level, [E_DEPRECATED, E_USER_DEPRECATED]);\n }", "title": "" }, { "docid": "d22ba347ae3ce65660f3bcf2b0521eef", "score": "0.47929153", "text": "function is_used($key){ \n return $this->filter(isset($this->__val[$key])?$this->__val[$key]:NULL);\n }", "title": "" }, { "docid": "489cb9b9ee7185ba576656ffc14ce8a3", "score": "0.47876036", "text": "function checkDisableFunctions(){\n $df = & $this->_emitDisableFunctions();\n if (!empty($df)) {\n if (!is_array($df)) {\n $df = (array) $this->splitEnableName($df);\n }\n if (!$this->isAssoc($df)) {\n $df = $this->flipArray($df);\n }\n }\n unset($df);\n }", "title": "" }, { "docid": "06cbdf8195b78dc3cdd86887ccfa4286", "score": "0.4764418", "text": "public function hasVariable( $variableName )\n {\n return array_key_exists( $variableName, $this->variables );\n }", "title": "" }, { "docid": "db3f5c90cfca9a68c188a1185f763a61", "score": "0.47621262", "text": "function stackable_show_pro_notices_option() {\n\t\t$show_pro_notice = get_option( 'stackable_show_pro_notices' );\n\t\tif ( $show_pro_notice === false ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn $show_pro_notice === '1';\n\t}", "title": "" }, { "docid": "de6ec11c8c120f1a684d1e963f0aa0be", "score": "0.476171", "text": "public function isDBVariable(string $name)\n {\n return in_array($name, $this->dbVariables);\n }", "title": "" }, { "docid": "15aa3e83c8b8a91baf76cb132414688f", "score": "0.4744305", "text": "public function structmemexists($key)\n {\n //trigger_error('Method ' . __METHOD__ . ' is deprecated', E_USER_DEPRECATED);\n\n return array_key_exists($key, $this->me['struct']);\n }", "title": "" }, { "docid": "7e1608f5a42be8919438c195e05116ad", "score": "0.473205", "text": "protected function _shouldUseInjection() {\n return $this->_hasTemplateSet() &&\n $this->_hasInjectOptions() &&\n Mage::app()->getStore()->getCode() !== 'admin';\n }", "title": "" }, { "docid": "4907e6d907fbb1fed6a599b0496ee039", "score": "0.47039923", "text": "public function hasWarnings( $key = NULL )\n {\n if ( $key ) {\n if ( isset( $this->_warnings[$key] ) &&\n count( $this->_warnings[$key] ) > 0 ) {\n return true;\n }\n return false;\n }\n else {\n if ( count( $this->_warnings ) > 0 ) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "de961111b996428cc1e07f08decf8b1c", "score": "0.47001284", "text": "public function isVar($var)\n {\n return isset($this->__magic_vars[$var]);\n }", "title": "" }, { "docid": "ac7256e00e938b4790a57a22a22ba683", "score": "0.46985677", "text": "public function __isset($key)\n\t{\n\t\treturn isset($this->_variables[$key]);\n\t}", "title": "" }, { "docid": "ceab82140426be2660b11a387d9d46dc", "score": "0.46955526", "text": "protected function usageTrackingDisabled()\n {\n return config('eausagetracking.enabled') == false;\n }", "title": "" }, { "docid": "03af8b6be07bead2a5892954fe2b0413", "score": "0.46945143", "text": "function stackable_should_show_pro_notices() {\n\t\treturn STACKABLE_SHOW_PRO_NOTICES && stackable_show_pro_notices_option() && ! sugb_fs()->can_use_premium_code();\n\t}", "title": "" }, { "docid": "f25addeedbfb5f7128fc6ef5546bfb45", "score": "0.4693205", "text": "public function isOldPriceVisible()\n {\n return $this->getTypePriceElement('old_price')->isVisible();\n }", "title": "" }, { "docid": "c8645579b3b16b02ecf9b69bada26379", "score": "0.46748292", "text": "function &hasVar( $blockName, $varName )\n {\n return isSet( $this->BlockValues[$blockName][$varName] );\n }", "title": "" }, { "docid": "aee700f2a3ebe32fd91e334c18e62e2c", "score": "0.46747586", "text": "public function hasServerVariable(string $key): bool;", "title": "" }, { "docid": "ad0616542f6dc4d15a98f71926427c3c", "score": "0.46740633", "text": "public static function is_version_deprecated( $version = null ){\n //This may, in the future, need it's own comparison.\n return ! self::is_version_tested( $version );\n }", "title": "" }, { "docid": "ff985f638f936d511927510ae2a767f2", "score": "0.46574715", "text": "public static function shouldDeleteUnused(): bool;", "title": "" }, { "docid": "2e1871d374cbe6acad0b379d885203b4", "score": "0.46570218", "text": "public function reservedVariableNameDataProvider()\n {\n return array(\n array('true', true), array('false', false),\n array('on', true), array('off', false),\n array('yes', true), array('no', false),\n array('_all', array())\n );\n }", "title": "" }, { "docid": "720004cb3daf072a874f2e54a9346e43", "score": "0.46537232", "text": "function cww_df_required_options_not_set() {\n\treturn !cww_df_required_options_are_set();\n}", "title": "" }, { "docid": "6b0ee263d89d277d9e3700b822fcd3eb", "score": "0.46412286", "text": "public function hasVariable(string $name): bool\n {\n return isset($this->variables[$name]);\n }", "title": "" }, { "docid": "26764defbb3c186fc30545bfc100c426", "score": "0.4638653", "text": "public function offsetExists($key)\n {\n\t\t\treturn array_key_exists($key, $this->variables);\n }", "title": "" }, { "docid": "4793a13b23dc77697ed12f7646a6878e", "score": "0.4633481", "text": "public function hasDFRemoval()\n {\n if ($this->internal->dfRemoval == 'true') {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "74bdec34f2e7976e58ee113500f86ed5", "score": "0.46290833", "text": "function TemplateVarExists($name)\n {\n return( array_key_exists($name,$this->_template_vars) );\n }", "title": "" }, { "docid": "7cdd053b506ca8ac781c170d0b372a23", "score": "0.46282044", "text": "public static function displayParameterAsDeprecated($parameter)\n {\n return;\n }", "title": "" }, { "docid": "84585ee7f039713d7a9aeb154f4fc401", "score": "0.46186244", "text": "private function tracking_allowed() {\n\t\t$allow_tracking = edd_get_option( 'fes_allow_tracking', false );\n\t\treturn isset( $allow_tracking );\n\t}", "title": "" }, { "docid": "391f899b380c730f09d43a462b26e36d", "score": "0.46063778", "text": "function _hasVariables($template)\n\t{\n\t\tif (!empty($this->_vars[$template]['scalar'])) {\n\t\t\treturn true;\n\t\t}\n\t\tif (isset($this->_vars[$template]['rows'][$this->_templates[$template]['iteration']])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f01cf9f2e687564734e86d4c3a10bba5", "score": "0.4600496", "text": "public static function ppDeprecatedCheck(messageStack $messageStack)\n\t{\n\t\t// Customer ID.\n\t\t$customerId = (int)$_SESSION['customer_id'];\n\n\t\t// Check expiration of message output deactivation period.\n\t\tif(self::_isPaypalDeprecated())\n\t\t{\n\t\t\t// Message output deactivation expiration timestamp value.\n\t\t\t$expirationTime = (int)self::_getService()\n\t\t\t ->getUserConfiguration(new IdType($customerId), self::$userConfigurationKey);\n\n\t\t\t// Current timestamp value.\n\t\t\t$currentTime = time();\n\n\t\t\t// Add notice to message stack if expiration time has been exceeded.\n\t\t\tif($expirationTime < $currentTime)\n\t\t\t{\n\t\t\t\t$content = self::_messageIcon() . TEXT_PAYPAL_MODULE_DEPRECATED\n\t\t\t\t . self::_btnToNewPayPal();\n\t\t\t\t$class = 'error';\n\t\t\t\t$configValue = strtotime('+1 week');\n\t\t\t\t$messageStack->add($content, $class, self::$userConfigurationKey, $configValue);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5485b543877ccb70579f8ac656ba1a80", "score": "0.4595654", "text": "public static function check_varnish() {\n\t\tif ( isset( $_SERVER['HTTP_X_VARNISH'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5653d90bb560376c9810a7d65c5b02a3", "score": "0.4595153", "text": "public function __isset($key)\r\n\t{\r\n\t\treturn isset($this->vars[$key]);\r\n\t}", "title": "" }, { "docid": "2ee368f10c9b67abd402509e8170e33b", "score": "0.45920128", "text": "public function hasWarnings()\n {\n return (count($this->warnings) > 0);\n }", "title": "" }, { "docid": "2ee368f10c9b67abd402509e8170e33b", "score": "0.45920128", "text": "public function hasWarnings()\n {\n return (count($this->warnings) > 0);\n }", "title": "" }, { "docid": "c4bb37852d03a028a05b3b804789a14c", "score": "0.45828888", "text": "public function __isset($key)\r\n {\r\n return isset($this->_vars[$key]);\r\n }", "title": "" }, { "docid": "a9819a1471e6aacfd8f075c4da0a0b62", "score": "0.45803422", "text": "function dsq_warning() {\n\tglobal $wp_version;\n\n\tif ( !get_option('disqus_forum_url') && !isset($_POST['forum_url']) && $_GET['page'] != 'disqus' ) {\n\t\tdsq_manage_dialog('You must <a href=\"edit-comments.php?page=disqus\">configure the plugin</a> to enable the DISQUS comment system.', true);\n\t}\n\n\tif ( dsq_legacy_mode() && $_GET['page'] == 'disqus' ) {\n\t\tdsq_manage_dialog('DISQUS is running in legacy mode. (<a href=\"edit-comments.php?page=disqus\">Click here to configure</a>)');\n\t}\n}", "title": "" }, { "docid": "02e63f3ce03b25406b4251fae81eb413", "score": "0.4580147", "text": "protected function shouldIgnoreDeprecationErrors()\n {\n return ! class_exists(LogManager::class)\n || ! self::$app->hasBeenBootstrapped();\n }", "title": "" }, { "docid": "23ecf5fc29ece1eb2c9bae7c5017b56c", "score": "0.45747167", "text": "function clicky_admin_warnings() {\n\t\t\t$options = clicky_get_options();\n\t\t\tif ( ( !$options['site_id'] || empty( $options['site_id'] ) || !$options['site_key'] || empty( $options['site_key'] ) || !$options['admin_site_key'] || empty( $options['admin_site_key'] ) ) && !$_POST ) {\n /**\n * Outputs a warning\n */\n function clicky_warning() {\n\t\t\t\t\techo \"<div id='clickywarning' class='updated fade'><p><strong>\";\n\t\t\t\t\t_e( 'Clicky is almost ready. ', 'clicky' );\n\t\t\t\t\techo \"</strong>\";\n\t\t\t\t\tprintf( __( 'You must %1$s enter your Clicky Site ID, Site Key and Admin Site Key%2$s for it to work.', 'clicky' ), \"<a href='\" . admin_url( 'options-general.php?page=clicky' ) . \"'>\", \"</a>\" );\n\t\t\t\t\techo \"</p></div>\";\n\t\t\t\t\techo \"<script type=\\\"text/javascript\\\">setTimeout(function(){jQuery('#clickywarning').hide('slow');}, 10000);</script>\";\n\t\t\t\t}\n\n\t\t\t\tadd_action( 'admin_notices', 'clicky_warning' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "19d8d537e90ad247f41721e4652e7405", "score": "0.45737085", "text": "function pre_condition() {\n global $CFG;\n\n foreach(array('negative_value', 'positive_value', 'items') as $val) {\n $named_param = 'block_student_gradeviewer_lagging_'. $val;\n $value = isset($CFG->{$named_param}) ? $CFG->{$named_param} : 1;\n $this->{$val} = empty($value) ? 1 : $value; \n }\n\n return true;\n }", "title": "" }, { "docid": "e010f6905a92a7212785bfc79f11add3", "score": "0.4571098", "text": "public function isVar($key)\n\t{\n\t\treturn $this->is($key);\n\t}", "title": "" }, { "docid": "9050797378c5988e403f745e698f7679", "score": "0.45703056", "text": "function add_warning($warning, $fields = NULL) {\n global $Warnings, $BadItems;\n if (!preg_match('/\\\\w/', $warning)) return;\n $Warnings[] = trim($warning);\n // Add any bad item fields\n if (is_array($fields)) {\n foreach ($fields as $field) {\n $BadItems[$field] = true;\n }\n }\n elseif ($fields)\n $BadItems[$fields] = true;\n }", "title": "" }, { "docid": "a2c9db6250f32d594784f1d7d887de1d", "score": "0.45684355", "text": "public function getWarnings()\n {\n if (array_key_exists(\"warnings\", $this->_propDict)) {\n return $this->_propDict[\"warnings\"];\n } else {\n return null;\n }\n }", "title": "" } ]
7fc2835561135ae3ff4ce38e84ee7e03
Checks $_GET parameters 0 vars passed = check for existance of any $_GET params, returns true if populated 1 var passed = returns value of passed $_GET param, false if not found 2 vars passed = compares passed variables as a key value pair against $_GET params, true if found correct. 3+ throw error
[ { "docid": "b38b9ea3863b39e6d1b9ec1505b1ba95", "score": "0.59455913", "text": "public static function tdms_getParam()\n {\n $tdmsGetParameters;\n $urlParamString = 'tdms-get-params';\n $urlKVDelimiter = \"_\";\n $paramTypes = '';\n $vars = func_get_args();\n foreach ($vars as &$a) {\n $paramTypes .= gettype($a) . '|';\n }\n if ($paramTypes != '') {\n $paramTypes = substr($paramTypes, 0, - 1);\n }\n if (isset($_GET[$urlParamString]) && !empty($_GET[$urlParamString])) {\n $rawParams = explode(\"/\", $_GET[$urlParamString]);\n\n foreach ($rawParams as $kvset) {\n if (strpos($kvset, $urlKVDelimiter) !== false) {\n $refinedParams = explode($urlKVDelimiter, $kvset);\n $tdmsGetParameters[$refinedParams[0]] = $refinedParams[1];\n } else {\n\n $tdmsGetParameters['page'] = $kvset;\n }\n }\n\n foreach ($_GET as $key => $value) {\n if ($key != $urlParamString) {\n $tdmsGetParameters[$key] = $value;\n }\n }\n\n } else {\n foreach ($_GET as $key => $value) {\n $tdmsGetParameters[$key] = $value;\n }\n }\n switch ($paramTypes) {\n case '':\n if (!empty($tdmsGetParameters)) {\n return true;\n } else {\n return false;\n }\n break;\n case 'string':\n if (isset($tdmsGetParameters[$vars[0]]) && !empty($tdmsGetParameters[$vars[0]])) {\n $paramVal = strtolower($tdmsGetParameters[$vars[0]]);\n return $paramVal;\n } else {\n return false;\n }\n break;\n case 'string|string':\n if (isset($tdmsGetParameters[$vars[0]])\n && !empty($tdmsGetParameters[$vars[0]])\n && ($tdmsGetParameters[$vars[0]] == $vars[1])) {\n return true;\n } else {\n return false;\n }\n break;\n default:\n new TDMSError(\"0001.1\", array(0,2,func_num_args()));\n break;\n }\n }", "title": "" } ]
[ { "docid": "c91afa4b45b904b19a379637ceb0a1f4", "score": "0.7474446", "text": "private function checkGet()\n {\n foreach ($_GET as $key => $value) {\n if (is_int($key)) {\n $key = $this->testInput($key);\n intval($key);\n } else {\n $key = $this->testInput($key);\n }\n if (is_int($value)) {\n $value = $this->testInput($value);\n intval($value);\n } else {\n $value = $this->testInput($value);\n }\n }\n }", "title": "" }, { "docid": "337246d110f5d596796040da61cea006", "score": "0.7471637", "text": "public static function validateGET(array $vars_to_check_for): bool\n {\n\n foreach ($vars_to_check_for as $var) {\n if (!isset($_GET[$var]) || empty($_GET[$var])) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "69d359396452a756b3036731f192826c", "score": "0.680929", "text": "static function checkParams($params)\n {\n foreach($params as $p => $c) //for each param\n if (!isset($_REQUEST[$p])) //if is not set\n { Errors::send(400, \"Missing required parameter '\".$p.\"'\"); return FALSE; } //error\n return TRUE;\n }", "title": "" }, { "docid": "0be242c820b46d76077ff588549b1537", "score": "0.6786329", "text": "function validarParametros($parametros) {\r\n\t$puedoUsar=true;\r\n\tforeach ($parametros as $nombre) {\r\n\t\t$puedoUsar=isset($_GET[$nombre]) && !empty($_GET[$nombre]);\r\n\t\tif($puedoUsar == false) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn $puedoUsar;\r\n}", "title": "" }, { "docid": "8f0081cb5f5f7ccac01911ad7e04f9f7", "score": "0.6762312", "text": "public static function CheckGet()\r\n {\r\n foreach(func_get_args() as $arg)\r\n if(!isset($_GET[$arg]))\r\n throw new ArgumentException(\"Argument '$arg' is not set on GET variables.\");\r\n }", "title": "" }, { "docid": "a67d1345c7eb29fe18cf0fe26c56c2cc", "score": "0.6734291", "text": "public function check_GET($GET){\n\t\t$result .= $this->query;\n\t\tforeach ($GET as $key => $value) {\n\t\t\t# strip_data and add items\n\t\t\t$key = strip_data($key);\n\t\t\t$value = strip_data($value);\n\n\t\t\t# country search\n\t\t\tif ( ($key == 'country') && (!empty($value))){\n\t\t\t\t$result .= \" && $key='$value'\";\n\n\t\t\t# city search\n\t\t\t} elseif ( ($key == 'city') && (!empty($value))){\n\t\t\t\t$result .= \" && $key='$value'\";\n\n\t\t\t# kayword search\n\t\t\t} elseif ( ($key == 'kayword') && (!empty($value)) ){\n\t\t\t\t$result .= \" && first_name LIKE '%$value%' || last_name LIKE '%$value%' || email LIKE '%$value%'\";\n\n\t\t\t#sort by headers\n\t\t\t} elseif ( ($key == 'sort') && (!empty($value)) ){\n\t\t\t\t$result .= \" ORDER BY $value\";\n\n\t\t\t# pagination\n\t\t\t} elseif ( ($key == 'page') && (!empty($value)) ) {\n\t\t\t\t# get values\n\t\t\t\t$limit = intval($GET['limit']);\n\t\t\t\tif ($limit <= 0){\n\t\t\t\t\t$limit = 5;\n\t\t\t\t}\n\t\t\t\t$page = intval($GET['page']);\n\t\t\t\tif ($page <= 0){\n\t\t\t\t\t$page = 1;\n\t\t\t\t}\n\t\t\t\t# get value start_from\n\t\t\t\t$start_from = ($page - 1) * $limit;\n\t\t\t\t$result .= \" LIMIT $start_from, $limit\";\n\t\t\t}\n\t\t}\n\t\t$result = preg_replace(\"~(.+)(user &&)(.+)~\", \"$1 user WHERE $3\", $result);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "746c14b37027640a0a5624475ebccd46", "score": "0.6661509", "text": "public function isGet(){\n\t\tif (1 == count($_GET) && isset($_GET['r'])){\n\t\t\treturn false; \n\t\t}\n\t\treturn true; \n\t}", "title": "" }, { "docid": "b63f4791c21b2dc85a3900c00f63b0e1", "score": "0.6537349", "text": "protected function checkRequiredGetParams(array $required)\n\t{\n\t\t$params = array();\n\t\tforeach($required as $item)\n\t\t{\n\t\t\t$params[$item] = $this->request->getQuery($item);\n\t\t}\n\t\tunset($item);\n\n\t\treturn $this->checkRequiredInputParams($params, $required);\n\t}", "title": "" }, { "docid": "649e3ebdbe03ec9cf932a8adb67c9257", "score": "0.6473122", "text": "static public function required_params_exist( $request_query_params ) {\n\t$required_params = array( 'client_id', 'response_type', 'redirect_uri' );\n\t$required_missing = false;\n\tforeach( $required_params as $required_param ) {\n\t if ( empty( $request_query_params[ $required_param ] ) ) {\n\t\t$required_missing = true;\n\t }\n\t}\n\t$params_exist = !$required_missing;\n\treturn $params_exist;\n }", "title": "" }, { "docid": "ad52c417dcb823754ef0dcf05e8d9d08", "score": "0.6418215", "text": "function verifyRequiredParams($required_fields)\n{\n \n //Getting the request parameters\n $request_params = $_REQUEST;\n \n //Looping through all the parameters\n foreach ($required_fields as $field) {\n //if any requred parameter is missing\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n \n //returning true;\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "265cac1f50cd302cb2ad1b2edd7d1c75", "score": "0.64017504", "text": "private function checkParams($params){\n if(count($params) == 3)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "5b84a8ec340705029ac264c88e8df837", "score": "0.638823", "text": "private function checkAndGetUriQuery()\n\t{\n\t\t$get = $_GET;\n\t\t// remove pagination key from query string\n\t\tunset($get[config(\"pagination.link_query_key\")]);\n\t\t// init query string and set init value (?)\n\t\t$queryString = \"?\";\n\t\t// check if we have other pagination key in query string\n\t\tif(count($get))\n\t\t{\n\t\t\t// reorder query string to keep other keys\n\t\t\tforeach ($get as $key => $value)\n\t\t\t{\n\t\t\t\t$queryString .= \"{$key}\" .\n\t\t\t\t\t(!empty($value) ? \"=\" : \"\") . $value . \"&\";\n\t\t\t}\n\n\t\t\treturn $queryString;\n\t\t}\n\n\n\t\treturn \"?\";\n\t}", "title": "" }, { "docid": "39a02a63f3b85aa28a9bbd8487b7fe44", "score": "0.6374729", "text": "function check_url() {\n\n $post = $_POST;\n $get = $_GET;\n $url = array();\n\n if (!empty($post) && empty($get)) {\n $url['get'] = (bool) false;\n $url['post'] = (bool) true;\n } else {\n $url['get'] = (bool) true;\n $url['post'] = (bool) false;\n }\n\n if (!empty($get['page'])) {\n $url['page'] = $get['page'];\n\n foreach ($get as $key => $value) {\n if (empty($url[$key])) {\n $url[$key] = $value;\n }\n }\n } else {\n $url['page'] = 'main';\n }\n\n\n return $url;\n}", "title": "" }, { "docid": "003741f840ee6453199f4a132413e35a", "score": "0.63345444", "text": "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NOMR->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NAMA->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->ALAMAT->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NO_KARTU->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "fffdba76f9bae0f6999f906dba4adc9b", "score": "0.63226384", "text": "function iin_panels_extras_url_parameters_ctools_access_check($conf, $context) {\n // Grab the setting for this instance and compare it to the url parameters from the context\n $param_key = $conf['param_key'];\n $param_value = $conf['param_value'];\n\tif (!empty($param_key) && !empty($param_value)) {\n if(!empty($_GET) && !empty($_GET[$param_key]) && $_GET[$param_key] == $param_value) {\n return TRUE;\n } \n\t}\n\telse if (!empty($param_key) && empty($param_value)) {\n \tif(!empty($_GET) && !empty($_GET[$param_key])) {\n return TRUE;\n } \n\t}\n\t// look for the value in any url parameter\n\telse if (!empty($_GET) && in_array($param_value, $_GET) == TRUE) {\n\t\treturn TRUE;\n }\n return FALSE;\n}", "title": "" }, { "docid": "eb0d001894b27eae15d8f2e38f41844a", "score": "0.6316873", "text": "public function match()\n {\n if (empty($_GET)) {\n $call = trim($_SERVER['REQUEST_URI'], '/');\n \n } else {\n $call = key($_GET);\n }\n \n foreach ($this->routes as $route => $params) {\n if (preg_match($route, $call, $match)) {\n $this->params = $params;\n return true;\n } \n }\n //IMPORTANT! IF none of the routes match, return FALSE OUTSIDE of the IF\n return false;\n }", "title": "" }, { "docid": "959fb7f8f175d9459f9493ab7bb187cb", "score": "0.63074887", "text": "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nama->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->status->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tanggal->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->gaji_pokok->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->lembur->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tunjangan_proyek->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Titil->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "b7974498e863e8a9e34185566b62b36d", "score": "0.62560844", "text": "public function has_getback(){\r\n return (count($_GET) >= 1);\r\n }", "title": "" }, { "docid": "165264cb17e798e97f1d06e071b47d48", "score": "0.62414503", "text": "public function isGet() {\n return count($_GET) !== 0;\n }", "title": "" }, { "docid": "47a68360b2b15142562fc8c694cd7021", "score": "0.62379587", "text": "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->personID->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->personName->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->lastName->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nationalID->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->mobilePhone->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nationalNumber->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->passportNumber->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->fatherName->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->gender->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->locationLevel1->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->locationLevel2->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->locationLevel3->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->locationLevel4->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->locationLevel5->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->locationLevel6->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->address->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->convoy->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->convoyManager->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->followersName->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->status->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isolatedLocation->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->birthDate->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->ageRange->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->dress1->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->dress2->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->signTags->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->phone->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->_email->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->temporaryResidence->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->visitsCount->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->picture->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->registrationUser->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->registrationDateTime->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->registrationStation->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->isolatedDateTime->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->description->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "394ef0b497dc1b1cb740c0aa32cd31c8", "score": "0.6235393", "text": "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "b5c62cbce22ed9fb6cdc79df5076f590", "score": "0.6193929", "text": "public static function Check()\r\n {\r\n foreach(func_get_args() as $arg)\r\n if(!isset($_POST[$arg]) && !isset($_GET[$arg]))\r\n throw new ArgumentException(\"Argument '$arg' is not set on POST and GET variables.\");\r\n }", "title": "" }, { "docid": "e5ca405866cbf0c9b9de726335030cbd", "score": "0.6160402", "text": "function isTheseParametersAvailable($params){\r\n\r\n\t\t//traversing through all the parameters\r\n\t\tforeach($params as $param){\r\n\t\t\t//if the paramter is not available\r\n\t\t\tif(!isset($_POST[$param])){\r\n\t\t\t\t//return false\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return true if every param is available\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "309a104811f87a5dccf8f0ef9a7b9d37", "score": "0.61496854", "text": "function isTheseParametersAvailable($params){\n\t\t//assuming all parameters are available \n\t\t$available = true; \n\t\t$missingparams = \"\"; \n\t\t\n\t\tforeach($params as $param){\n\t\t\tif(!isset($_POST[$param]) || strlen($_POST[$param])<=0){\n\t\t\t\t$available = false; \n\t\t\t\t$missingparams = $missingparams . \", \" . $param; \n\t\t\t}\n\t\t}\n\t\t\n\t\t//if parameters are missing \n\t\tif(!$available){\n\t\t\t$response = array(); \n\t\t\t$response['error'] = true; \n\t\t\t$response['message'] = 'Parameters ' . substr($missingparams, 1, strlen($missingparams)) . ' missing';\n\t\t\t\n\t\t\t//displaying error\n\t\t\techo json_encode($response);\n\t\t\t\n\t\t\t//stopping further execution\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "ac003276f8de8e886a8906e4adf5cc1e", "score": "0.6121212", "text": "function allowed_get_params($allowed_params=[])\n{\n $allowed_array = [];\n foreach ($allowed_params as $param) {\n if (isset($_GET[$param])) {\n $allowed_array[$param] = $_GET[$param];\n } else {\n $allowed_array[$param] = null;\n }\n }\n return $allowed_array;\n}", "title": "" }, { "docid": "a5f7801ca2d57ea7f6fee155645dc039", "score": "0.6114032", "text": "protected function checkSpecificParams()\n {\n }", "title": "" }, { "docid": "a0ff00ff68cb21f0d2d4467cd917dd9d", "score": "0.61131567", "text": "function CheckSearchParms() {\n\n\t\t// Check basic search\n\t\tif ($this->BasicSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->llave->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->F_Sincron->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->USUARIO->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Cargo_gme->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NOM_PE->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Otro_PE->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NOM_APOYO->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Otro_Nom_Apoyo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Otro_CC_Apoyo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NOM_ENLACE->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Otro_Nom_Enlace->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Otro_CC_Enlace->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NOM_PGE->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Otro_Nom_PGE->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Otro_CC_PGE->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Departamento->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Muncipio->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NOM_VDA->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->LATITUD->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->GRA_LAT->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->MIN_LAT->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->SEG_LAT->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->GRA_LONG->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->MIN_LONG->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->SEG_LONG->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->FECHA_ACC->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->HORA_ACC->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Hora_ingreso->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->FP_Armada->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->FP_Ejercito->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->FP_Policia->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NOM_COMANDANTE->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->TESTI1->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->CC_TESTI1->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->CARGO_TESTI1->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->TESTI2->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->CC_TESTI2->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->CARGO_TESTI2->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Afectados->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->NUM_Afectado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Nom_Afectado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->CC_Afectado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Cargo_Afectado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Tipo_incidente->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Riesgo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Parte_Cuerpo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->ESTADO_AFEC->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->EVACUADO->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->DESC_ACC->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->Modificado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->llave_2->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "f48a5a2977aeaec92e1d9436913cdc04", "score": "0.61080164", "text": "static function get($i)\n\t{\n\t\tif(isset($_GET[$i]))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "fe6f365eefdf3c057f777f83d71fc67e", "score": "0.6091524", "text": "function cc_get_isset( $var ) {\n\tcc_get_fail_if_not_valid( $var );\n\n\treturn isset( $_GET[$var] );\n}", "title": "" }, { "docid": "c3bc69141b0e285f832aec5cdb412f01", "score": "0.60563666", "text": "protected function checkParameters()\n\t{\n\t\t$this->arParams['PATH_TO_LOCATIONS_LIST'] = CrmCheckPath('PATH_TO_LOCATIONS_LIST', $this->arParams['PATH_TO_LOCATIONS_LIST'], '');\n\t\t$this->arParams['PATH_TO_LOCATIONS_ADD'] = CrmCheckPath('PATH_TO_LOCATIONS_ADD', $this->arParams['PATH_TO_LOCATIONS_ADD'], '?add');\n\t\t$this->arParams['PATH_TO_LOCATIONS_EDIT'] = CrmCheckPath('PATH_TO_LOCATIONS_EDIT', $this->arParams['PATH_TO_LOCATIONS_EDIT'], '?loc_id=#loc_id#&edit');\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "46a79d9ebf47a159e1cc42530efdbada", "score": "0.603665", "text": "static function url_check(string $url){\n $sym = null;\n \n $len = strlen($url);\n for ($i=0; $i<$len; $i++){\n if ($url[$i] == '?'){\n if ($sym == '?' || $sym == '&')\n return false;\n \n $sym = '?';\n }elseif ($url[$i] == '&'){\n if ($sym === null)\n return false;\n \n $sym = '&';\n } \n }\n return true;\n }", "title": "" }, { "docid": "2739dacc981d140290b37b2379c7ef35", "score": "0.59925383", "text": "function InitGet($_GET)\n {\n $first = empty($_GET[\"fRunMin\"]) && empty($_GET[\"fRunMax\"]);\n\n if (empty($_GET[\"fNumResults\"]))\n $_GET[\"fNumResults\"]=\"20\";\n\n if (empty($_GET[\"fAll\"]))\n $_GET[\"fAll\"]=\"Off\";\n\n if (empty($_GET[\"fSequ\"]))\n $_GET[\"fSequ\"]=\"Off\";\n\n }", "title": "" }, { "docid": "3c260deb0fde4b5019cf403a418d380e", "score": "0.59702086", "text": "private function checkParams()\n {\n\n if ($this->checktask() && $this->checkPage() && $this->checkModule()) {\n\n $this->routeAction();\n }\n\n return $this->response;\n }", "title": "" }, { "docid": "9e37edc4af5400c233649c15bcfff713", "score": "0.59449255", "text": "function CheckSearchParms() {\n\t\tif ($this->id->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_actividad->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->apellidopaterno->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->apellidomaterno->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nombre->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nrodiscapacidad->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->ci->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->fecha_nacimiento->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->sexo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->nivelestudio->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_discapacidad->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_tipodiscapacidad->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->resultado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->resultadotamizaje->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tapon->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->tipo->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->repetirprueba->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->observaciones->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_apoderado->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\tif ($this->id_referencia->AdvancedSearch->IssetSession())\n\t\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "526c61066ba7347d2399e534bb9482dd", "score": "0.59360915", "text": "private function _validateRequest() {\n\t\t// Verify that all the required parameters are present\n\t\tforeach (self::$_requiredParams as $param) {\n\t\t\tif (!array_key_exists($param, $this->_request)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Verify that the request has the correct token and team information\n\t\treturn (\n\t\t\t$this->_request[self::PARAM_TOKEN] === self::TOKEN && \n\t\t\t$this->_request[self::PARAM_TEAM_ID] === self::TEAM_ID\n\t\t);\n\t}", "title": "" }, { "docid": "e496a10c7c99fbbfb30d87dd8e2a687c", "score": "0.59189", "text": "public function paramsValidation($params) {\n if (empty($this->request->data)) {\n $this->status = false;\n $this->message = $this->msgDictonary['empty_request_'.$this->language];\n $this->respond();\n }\n foreach ($params as $key => $value) {\n $this->paramsAvailability($this->request->data, array($key));\n switch ($value) {\n case 'numeric':\n if (!is_numeric($this->request->data[$key])) {\n $this->message = $this->msgDictonary['invalid_params'];\n // $this->responseData = array($key);\n $this->respond();\n }\n break;\n case 'notBlank':\n if ($this->request->data[$key] == '') {\n $this->message = $this->msgDictonary['blank_params_'.$this->language];\n //$this->responseData = array($key);\n $this->respond();\n }\n break;\n default:\n return true;\n }\n }\n }", "title": "" }, { "docid": "0c8709c7244bb231f2864da5d90c5131", "score": "0.5912466", "text": "public function getExists($key){\n return isset($_GET[$key]);\n }", "title": "" }, { "docid": "e091a127e185ac1c6fd092bdfd01a849", "score": "0.5910305", "text": "function match($url) {\n\t\tif (!$this->compiled()) {\n\t\t\t$this->compile();\n\t\t}\n\t\t$defaults = $this->defaults;\n\n\t\tif (isset($defaults['prefix'])) {\n\t\t\t$url['prefix'] = $defaults['prefix'];\n\t\t}\n\n\t\t//check that all the key names are in the url\n\t\t$keyNames = array_flip($this->keys);\n\t\tif (array_intersect_key($keyNames, $url) != $keyNames) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$diffUnfiltered = Set::diff($url, $defaults);\n\t\t$diff = array();\n\n\t\tforeach ($diffUnfiltered as $key => $var) {\n\t\t\tif ($var === 0 || $var === '0' || !empty($var)) {\n\t\t\t\t$diff[$key] = $var;\n\t\t\t}\n\t\t}\n\n\t\t//if a not a greedy route, no extra params are allowed.\n\t\tif (!$this->_greedy && array_diff_key($diff, $keyNames) != array()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//remove defaults that are also keys. They can cause match failures\n\t\tforeach ($this->keys as $key) {\n\t\t\tunset($defaults[$key]);\n\t\t}\n\t\t$filteredDefaults = array_filter($defaults);\n\n\t\t//if the difference between the url diff and defaults contains keys from defaults its not a match\n\t\tif (array_intersect_key($filteredDefaults, $diffUnfiltered) !== array()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$passedArgsAndParams = array_diff_key($diff, $filteredDefaults, $keyNames);\n\t\tlist($named, $params) = Router::getNamedElements($passedArgsAndParams, $url['controller'], $url['action']);\n\n\t\t//remove any pass params, they have numeric indexes, skip any params that are in the defaults\n\t\t$pass = array();\n\t\t$i = 0;\n\t\twhile (isset($url[$i])) {\n\t\t\tif (!isset($diff[$i])) {\n\t\t\t\t$i++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$pass[] = $url[$i];\n\t\t\tunset($url[$i], $params[$i]);\n\t\t\t$i++;\n\t\t}\n\n\t\t//still some left over parameters that weren't named or passed args, bail.\n\t\tif (!empty($params)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//check patterns for routed params\n\t\tif (!empty($this->options)) {\n\t\t\tforeach ($this->options as $key => $pattern) {\n\t\t\t\tif (array_key_exists($key, $url) && !preg_match('#^' . $pattern . '$#', $url[$key])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_writeUrl(array_merge($url, compact('pass', 'named')));\n\t}", "title": "" }, { "docid": "332a6c48e79a82dfd129b0eed41ca651", "score": "0.5884222", "text": "public function isGET()\n\t{\n\t\treturn $_SERVER['REQUEST_METHOD'] == 'GET';\n\t}", "title": "" }, { "docid": "5d2115ec72fc71aa3475294536bcd6ef", "score": "0.58729625", "text": "function inputGet($key){\n return isset($_GET[$key])? $_GET[$key] : FALSE;\n}", "title": "" }, { "docid": "8ce646a39df9e886e917562b18f6e0fd", "score": "0.5868515", "text": "protected function checkParams(ParamFetcher $paramFetcher)\n {\n $paramNames = array_keys($paramFetcher->getParams());\n $errors = array();\n\n foreach ($paramNames as $paramName) {\n try {\n $paramFetcher->get($paramName);\n } catch (BadRequestHttpException $e) {\n $errors[$paramName] = $e->getMessage();\n }\n }\n\n return $errors ? $errors : true;\n }", "title": "" }, { "docid": "08f2ae9a38aa2f45fe30be8836a3ee5a", "score": "0.5864203", "text": "public function hasParams() {}", "title": "" }, { "docid": "4c9f80bcb065848e526ad00b7739cc9e", "score": "0.5863869", "text": "function handleGETRequest() {\n if (connectToDB()) {\n if (array_key_exists('countTuples', $_GET)) {\n handleCountRequest();\n } else if (array_key_exists('displayTuples', $_GET)) {\n handleDisplayRequest();\n } else if (array_key_exists('handleJoinRequest', $_GET)) {\n handleJoinRequest();\n } else if (array_key_exists('handleProjectionRequest', $_GET)) {\n handleProjectionRequest();\n } else if (array_key_exists('selectSubmit', $_GET)) {\n handleSelectRequest();\n } else if (array_key_exists('handleGroupByRequest', $_GET)) {\n handleGroupByRequest();\n } else if (array_key_exists('handleHavingRequest', $_GET)) {\n handleHavingRequest();\n } else if (array_key_exists('handleDivisionRequest', $_GET)) {\n handleDivisionRequest();\n }\n disconnectFromDB();\n }\n}", "title": "" }, { "docid": "05cde7f06c9abd2de5c56393e9a12395", "score": "0.5862401", "text": "function var_check($var)\n\t{\n\t\t$value = false;\n\t\t\n\t\tif (isset($_GET[$var]) AND $_GET[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var]) AND $_POST[$var] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var . '_x']) AND $_POST[$var . '_x'] !== false)\n\t\t{\n\t\t\t$value = true;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "a682d4924c0b474cf2855d3d2129df64", "score": "0.58600646", "text": "function checkAllParams(){\n\t\tif(!isset($_REQUEST['appid']) || $_REQUEST['appid']==\"\") throw new Exception(\"appid is not set\");\n\t\tif(!in_array(strtolower($_REQUEST['appid']),$this->appidArr)) throw new Exception(\"appid invalid\");\n\t\tif(!isset($_REQUEST['uid']) || $_REQUEST['uid']==\"\" ) throw new Exception(\"uid is not set\");\n\t\tif(in_array(strtolower($_REQUEST['appid']),$this->internet1) && preg_match('/^([0-9]+_[0-9]+_)|(^[0-9]+$)/',$_REQUEST['uid'],$b) ) throw new Exception(\"uid is not right\");\n\t\tif(in_array(strtolower($_REQUEST['appid']),$this->reportPids)) $_REQUEST['appid']=\"report\";\n\t\tif ($this->filterReportEvent()==1){\n\t\t\tthrow new Exception(\"report filter event\");\n\t\t}else if($this->filterReportEvent()==2){\n\t\t\tthrow new Exception(\"report filter first event\");\n\t\t}\n\t\t$_REQUEST['appid']=strtolower($_REQUEST['appid']); \n\t}", "title": "" }, { "docid": "75ce05d1c1e55deb08076bc7c04d79d8", "score": "0.58477277", "text": "function get_all_get_params($exclude_array = '') {\n if (!is_array($exclude_array))\n $exclude_array = array();\n $get_url = '';\n if (is_array($_GET) && (sizeof($_GET) > 0)) {\n reset($_GET);\n $arr = $_GET;\n foreach ($arr as $k => $value) {\n if (gettype($arr[$k]) == \"array\") {\n foreach ($arr[$k] as $key => $values) {\n if ((strlen($values) > 0) && (!in_array($key, $exclude_array))) {\n $get_url .= sanitize_string($k) . '[]=' . rawurlencode(stripslashes($values)) . '&';\n }\n }\n } else {\n if ((strlen($value) > 0) && ($k != 'error') && (!in_array($k, $exclude_array)) && ($k != 'x') && ($k != 'y')) {\n $get_url .= sanitize_string($k) . '=' . rawurlencode(stripslashes($value)) . '&';\n }\n }\n }\n }\n while (strstr($get_url, '&&'))\n $get_url = str_replace('&&', '&', $get_url);\n while (strstr($get_url, '&amp;&amp;'))\n $get_url = str_replace('&amp;&amp;', '&amp;', $get_url);\n return $get_url;\n}", "title": "" }, { "docid": "5d3d446a104f2b8ae0d77cbc108720f0", "score": "0.58343035", "text": "function url_path_params(string $path): bool\n{\n if ($path[0] === '/') {\n $path = substr($path, 1);\n }\n\n $query_string_parts = explode('/', $_GET['url']);\n $path_parts = explode('/', $path);\n if (count($query_string_parts) !== count($path_parts)) {\n return false;\n }\n\n $pos = strpos($path, ':');\n if ($pos !== false) {\n // starts with $path\n if (substr($path, 0, $pos) === substr($_GET['url'], 0, $pos)) {\n foreach ($query_string_parts as $part => $query_string_part) {\n if ($path_parts[$part][0] === ':') {\n $_GET[$path_parts[$part]] = $query_string_part;\n }\n }\n return true;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "951aebc32c8e7f31f32542ab5782a871", "score": "0.5812549", "text": "public function ValidateRequest ()\n {\n // check the request method.\n $bValidRequest = false;\n\n if ( $_SERVER[ 'REQUEST_METHOD' ] === 'GET' )\n {\n $bValidRequest = true;\n }\n\n return $bValidRequest;\n }", "title": "" }, { "docid": "9a6de6f027cad4face6c76117fec6dbd", "score": "0.58120126", "text": "function is_get(){\r\n\t\tif( strtolower($_SERVER['REQUEST_METHOD'] == 'get') ){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "title": "" }, { "docid": "923ab3433a35ff58790cdf308107ce0d", "score": "0.58095264", "text": "function check_required_params($stage = null) {\n\tif ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\t\tif ($stage == \"add_device_entry\") {\n\t\t\t// We've found a device and want to add it to the history.\n\t\t\tif (!(isset($_POST[\"macaddr\"]) && isset($_POST[\"floor\"]) && isset($_POST[\"ipaddr\"]))) {\n\t\t\t\thttp_response_code(424);\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t\"info\" => array(\n\t\t\t\t\t\t\"level\" => 0,\n\t\t\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\t\t\"message\" => \"Required parameter 'macaddr', 'ipaddr', or 'floor' wasn't specified.\"\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t} else if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n\t\tif ($stage == \"get_device\") {\n\t\t\t// We want some information about a device.\n\t\t\tif (!(isset($_GET[\"id\"]) || isset($_GET[\"macaddr\"]))) {\n\t\t\t\thttp_response_code(424);\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t\"info\" => array(\n\t\t\t\t\t\t\"level\" => 0,\n\t\t\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\t\t\"message\" => \"Required parameter 'id' or 'macaddr' wasn't specified.\"\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// User requested with a method that is not supported by us.\n\t\thttp_response_code(400);\n\t\techo json_encode(array(\n\t\t\t\"info\" => array(\n\t\t\t\t\"level\" => 0,\n\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\"message\" => \"Invalid request method \" . $_SERVER[\"REQUEST_METHOD\"] . \".\"\n\t\t\t)\n\t\t));\n\n\t\texit(1);\n\t}\n}", "title": "" }, { "docid": "136817991e58d547621ee9e04cd53ed8", "score": "0.5796055", "text": "public static function existsGET(string $name): bool\n\t{\n\t\treturn array_key_exists($name, $_GET);\n\t}", "title": "" }, { "docid": "7571344b6b0a2b8598c0e3160a88b588", "score": "0.57822144", "text": "function check_parameters(array $argv, $argc) {\n\n\tglobal $flag_i, $flag_o, $flag_p, $flag_ni, $flag_m, $flag_nd, $flag_r;\n\tglobal $input_FoD, $output_F, $px_K, $mp_N;\n\n\t// script is launched with --help\n\tif ($argc == 2) {\n\t\tif ($argv[1]==\"--help\") {\n\t\t\tprint_help();\n\t\t\texit(0);\n\t\t}\n\t}\n\n\t// script is launched with -h\n\tif ($argc == 2) {\n\t\tif ($argv[1]==\"-h\") {\n\t\t\tprint_help();\n\t\t\texit(0);\n\t\t}\n\t}\n\n\tunset($argv[0]); // erase useless script name from args\n\n\t// iterate trought parameters and check them\n\tfor ($i = 1; $i < $argc; $i++) {\n\n\t\t/* if parameter match the regex, set flag (on true)\n\t\t if param does not mach any regex => unknown param\n\t\t if it match short param then check the following, if the following is not param than load it\n\t\t*/\n\t\tswitch ($argv[$i]) {\n\n\t\t\t// LONG OPTIONS =========================================================================\n\n\t\t\tcase (preg_match(\"/^--input=.*$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_i==false) {\n\t\t\t\t\t$flag_i=true;\n\t\t\t\t\t$input_FoD=preg_replace(\"/^--input=/u\", '',$argv[$i]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^--output=.*$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_o==false) {\n\t\t\t\t\t$flag_o=true;\n\t\t\t\t\t$output_F=preg_replace(\"/^--output=/u\", '',$argv[$i]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// phorum forced me to do this\n\t\t\tcase (preg_match(\"/^--pretty-xml.*$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_p==false) {\n\t\t\t\t\t$flag_p=true;\n\t\t\t\t\tif (preg_match(\"/^--pretty-xml$/u\", $argv[$i])==1) {\n\t\t\t\t\t\t;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (preg_match(\"/^--pretty-xml=$/u\", $argv[$i])==1) {\n\t\t\t\t\t\t\terror(\"Wrong parameters! ([--pretty-xml=k] where k is a decimal number)\", 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$px_K=preg_replace(\"/^--pretty-xml=/u\", '',$argv[$i]);\n\t\t\t\t\t\t\tif (preg_match(\"/^[[:digit:]]*$/u\", $px_K) != 1 ) {\n\t\t\t\t\t\t\t\terror(\"Wrong parameters! ([--pretty-xml=k] where k is a decimal number)\", 1);\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\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^--no-inline$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_ni==false) {\n\t\t\t\t\t$flag_ni=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^--max-par=.*$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_m==false) {\n\t\t\t\t\t$flag_m=true;\n\t\t\t\t\t$mp_N=preg_replace(\"/^--max-par=/u\", '',$argv[$i]);\n\t\t\t\t\tif (preg_match(\"/^[[:digit:]]*$/u\", $mp_N) != 1 ) {\n\t\t\t\t\t\terror(\"Wrong parameters! ([--max-par=n] where n is a decimal number)\", 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^--no-duplicates$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_nd==false) {\n\t\t\t\t\t$flag_nd=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^--remove-whitespace$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_r==false) {\n\t\t\t\t\t$flag_r=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// SHORT OPTIONS ========================================================================\n\n\t\t\tcase (preg_match(\"/^-i$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_i==false) {\n\t\t\t\t\t$flag_i=true;\n\t\t\t\t\tif (($i+1) < $argc) {\n\t\t\t\t\t\tif (is_opt($argv[$i+1])==false) {\n\t\t\t\t\t\t\t$input_FoD=$argv[$i+1];\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^-o$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_o==false) {\n\t\t\t\t\t$flag_o=true;\n\t\t\t\t\tif (($i+1) < $argc) {\n\t\t\t\t\t\tif (is_opt($argv[$i+1])==false) {\n\t\t\t\t\t\t\t$output_F=$argv[$i+1];\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^-p$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_p==false) {\n\t\t\t\t\t$flag_p=true;\n\t\t\t\t\tif (($i+1) < $argc) {\n\t\t\t\t\t\tif (is_opt($argv[$i+1])==false) {\n\t\t\t\t\t\t\tif (preg_match(\"/^[[:digit:]]*$/u\", $argv[$i+1])) {\n\t\t\t\t\t\t\t\t$px_K=$argv[$i+1];\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\terror(\"Wrong parameters! ([-p k] where k is a decimal number)\", 1);\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\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^-ni$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_ni==false) {\n\t\t\t\t\t$flag_ni=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^-m$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_m==false) {\n\t\t\t\t\t$flag_m=true;\n\t\t\t\t\tif (($i+1) < $argc) {\n\t\t\t\t\t\tif (is_opt($argv[$i+1])==false) {\n\t\t\t\t\t\t\tif (preg_match(\"/^[[:digit:]]*$/u\", $argv[$i+1])) {\n\t\t\t\t\t\t\t\t$mp_N=$argv[$i+1];\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\terror(\"Wrong parameters! ([-m n] where n is a decimal number)\", 1);\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\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^-nd$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_nd==false) {\n\t\t\t\t\t$flag_nd=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase (preg_match(\"/^-r$/u\", $argv[$i]) ? true : false) :\n\t\t\t\tif ($flag_r==false) {\n\t\t\t\t\t$flag_r=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror(\"Duplicated parameters!\", 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\t\t\t\terror(\"Unknown parameters!\", 1);\n\n\t\t}\n\t}\n\n\t// condition from assignment, you have to enter this param\n\tif ($flag_m) {\n\t\tif ( (!$mp_N) && !($mp_N===\"0\") ) {\n\t\t\terror(\"[-m n] [--max-par=n] N must be entered!\",1);\n\t\t}\n\t}\n\n\t// condition from assignment, if K is not entered than it is set on default value 4\n\tif ($flag_p) {\n\t\tif ($px_K===\"0\") {\n\t\t\t;\n\t\t}\n\t\telse {\n\t\t\tif (!$px_K) {\n\t\t\t\t$px_K=4;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9b63055e3d916cd948aefc5029a34eee", "score": "0.5777211", "text": "function InitGet($_GET)\n {\n $first = empty($_GET[\"fRunMin\"]) && empty($_GET[\"fRunMax\"]);\n\n if (empty($_GET[\"fNumResults\"]))\n $_GET[\"fNumResults\"]=\"20\";\n\n if (empty($_GET[\"fLastUpdate\"]))\n $_GET[\"fLastUpdate\"]=\"Off\";\n\n if (empty($_GET[\"fSourceName\"]))\n $_GET[\"fSourceName\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fRunStart\"]))\n $_GET[\"fRunStart\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fAzimuthMin\"]))\n $_GET[\"fAzimuthMin\"]=\"Off\";\n\n if (empty($_GET[\"fAzimuthMax\"]))\n $_GET[\"fAzimuthMax\"]=\"Off\";\n\n if (empty($_GET[\"fZenithDistanceMin\"]))\n $_GET[\"fZenithDistanceMin\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fZenithDistanceMax\"]))\n $_GET[\"fZenithDistanceMax\"]=\"Off\";\n\n if (empty($_GET[\"fRunTime/60\"]))\n $_GET[\"fRunTime/60\"]=\"Off\";\n\n }", "title": "" }, { "docid": "eb110508166b40c44b7ab49ebb791f1d", "score": "0.5761725", "text": "function req_gpc_has($str)\n{\n\tforeach ($_GET as $k => $v) {\n\t\tif ($str == $v) {\n\t\t\treturn true;\n\t\t}\n\t}\n\tforeach ($_POST as $k => $v) {\n\t\tif ($str == $v) {\n\t\t\treturn true;\n\t\t}\n\t}\n\tforeach ($_COOKIE as $k => $v) {\n\t if ($str == $v) {\n\t\t return true;\n\t }\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "7562f4178638c0575ea18f75b5ce3acd", "score": "0.5755647", "text": "function __HTTPRequest_isParameter($name) {\n return isset($_GET[$name]) || isset($_POST[$name]);\n }", "title": "" }, { "docid": "9c80e978ca608c61d86cba37564f5a53", "score": "0.57408154", "text": "public function match($url) {\n\t\tif (!$this->compiled()) {\n\t\t\t$this->compile();\n\t\t}\n\t\t$defaults = $this->defaults;\n\n\t\tif (isset($defaults['prefix'])) {\n\t\t\t$url['prefix'] = $defaults['prefix'];\n\t\t}\n\n\t\t//check that all the key names are in the url\n\t\t$keyNames = array_flip($this->keys);\n\t\tif (array_intersect_key($keyNames, $url) != $keyNames) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$diffUnfiltered = Set::diff($url, $defaults);\n\t\t$diff = array();\n\n\t\tforeach ($diffUnfiltered as $key => $var) {\n\t\t\tif ($var === 0 || $var === '0' || !empty($var)) {\n\t\t\t\t$diff[$key] = $var;\n\t\t\t}\n\t\t}\n\n\t\t//if a not a greedy route, no extra params are allowed.\n\t\tif (!$this->_greedy && array_diff_key($diff, $keyNames) != array()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//remove defaults that are also keys. They can cause match failures\n\t\tforeach ($this->keys as $key) {\n\t\t\tunset($defaults[$key]);\n\t\t}\n\t\t$filteredDefaults = array_filter($defaults);\n\n\t\t//if the difference between the url diff and defaults contains keys from defaults its not a match\n\t\tif (array_intersect_key($filteredDefaults, $diffUnfiltered) !== array()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$passedArgsAndParams = array_diff_key($diff, $filteredDefaults, $keyNames);\n\t\tlist($named, $params) = Router::getNamedElements($passedArgsAndParams, $url['controller'], $url['action']);\n\n\t\t//remove any pass params, they have numeric indexes, skip any params that are in the defaults\n\t\t$pass = array();\n\t\t$i = 0;\n\t\twhile (isset($url[$i])) {\n\t\t\tif (!isset($diff[$i])) {\n\t\t\t\t$i++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$pass[] = $url[$i];\n\t\t\tunset($url[$i], $params[$i]);\n\t\t\t$i++;\n\t\t}\n\n\t\t//still some left over parameters that weren't named or passed args, bail.\n\t\tif (!empty($params)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//check patterns for routed params\n\t\tif (!empty($this->options)) {\n\t\t\tforeach ($this->options as $key => $pattern) {\n\t\t\t\tif (array_key_exists($key, $url) && !preg_match('#^' . $pattern . '$#', $url[$key])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_writeUrl(array_merge($url, compact('pass', 'named')));\n\t}", "title": "" }, { "docid": "717a00f5cd489be5e123c1ae917efa01", "score": "0.57403505", "text": "function iin_panels_extras_url_param_bypass_ctools_access_check($conf, $context) {\n // If for some unknown reason that $context isn't set, we just want to be sure.\n //if (empty($context) || empty($context->data)) {\n // return FALSE;\n //}\n\n // Grab the setting for this instance and compare it to the url parameters from the context\n $param = $conf['url_param'];\n \n //grab the indexed version of $_GET\n //$url_params = $context->data['query_index'];\n \n //foreach($url_params as $key => $val) {\n if (!empty($_GET)) {\n\t \n\t foreach ($_GET as $key => $val) {\n\t\t if (!empty($val)) {\n\t\t\t if (strpos($param, $val) !== FALSE) {\n\t\t\t\t return TRUE;\n\t\t\t }\n\t\t }\n\t\t \n\t }\n }\n \n}", "title": "" }, { "docid": "9c51e8d20e4d97e8ae17ad518c82fa71", "score": "0.5732461", "text": "static function validateCall(){\n\t\tforeach(self::$config->widgets as $key=>$value){\n\t\t\tif($value === self::$config->route->channel){\n\t\t\t\tforeach($value as $key2=>$value2){\n\t\t\t\t\tif($value2 === self::$config->route->type){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo 'The url parameter \"'.self::$config->route->type.'\" does not exist';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo '<p>The url parameter \"'.self::$config->route->type. '\" does not exist. Please correct the argument \"'.self::$config->route->datatype.'/'.self::$config->route->channel.'/'.self::$config->route->type.'\"<p>';\n\t\t\t\tbreak;\n\t\t\t\treturn FALSE;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "5bdca2afd4f6aef4bcf8e8b4648da496", "score": "0.57275283", "text": "private function should_verify_nonce() {\n\t\t$possible_params = array(\n\t\t\t'type',\n\t\t\t'paged',\n\t\t\t'post_type_filter',\n\t\t\t'post_status',\n\t\t\t'order',\n\t\t\t'orderby',\n\t\t);\n\n\t\tforeach ( $possible_params as $param_name ) {\n\t\t\tif ( filter_input( INPUT_GET, $param_name ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "12c7204c030553454e381c14caff8870", "score": "0.57083", "text": "public function getQueryParams()\n {\n if ($_SERVER['REQUEST_METHOD'] === \"GET\") {\n if (!empty($_GET)) {\n $this->checkGet();\n return $_GET;\n }\n } elseif ($_SERVER['REQUEST_METHOD'] === \"POST\") {\n $this->checkPost();\n return $_POST;\n }\n return $_GET;\n }", "title": "" }, { "docid": "4c3404656afe1ef1328c1e4900224dc2", "score": "0.5696993", "text": "function is_bad_request()\n{\n\n // Ensure the request method is either PUT or GET\n if($GLOBALS['RM_REQ']['METHOD'] != \"GET\" && $GLOBALS['RM_REQ']['METHOD'] != \"PUT\")\n return 1;\n\n // Ensure the page requested is in the site map\n $found = false;\n \n switch($GLOBALS['RM_REQ']['URI'][1])\n {\n case \"index.html\":\n case \"index.php\":\n case \"robots.txt\":\n case \"about\":\n case \"faq\":\n case \"\":\n if($GLOBALS['RM_REQ']['URI'][2] == \"\")\n $found = true;\n else\n $found = false;\n break;\n case \"movies\":\n $found = true;\n break;\n case \"critics\":\n $found = true;\n break;\n case \"common\":\n if($GLOBALS['RM_REQ']['URI'][2] == \"img\" &&\n $GLOBALS['RM_REQ']['URI'][3] != \"\")\n {\n $found = true;\n }\n else if($GLOBALS['RM_REQ']['URI'][2] == \"css\" &&\n $GLOBALS['RM_REQ']['URI'][3] != \"\")\n {\n $found = true;\n }\n else\n {\n $found = false;\n }\n break;\n case \"users\":\n $found = true;\n break;\n case \"form\":\n if($GLOBALS['RM_REQ']['URI'][3] == \"\")\n $found = true;\n else\n $found = false;\n break;\n case \"search\":\n if(sizeof($GLOBALS['RM_REQ']['URI']) > 3)\n $found = false;\n else\n $found = true;\n default:\n $found = false;\n break;\n }\n\n if($found == false)\n return 2;\n\n return false;\n \n}", "title": "" }, { "docid": "e493a21cc7d29dd541d199b3a0fc7478", "score": "0.5695282", "text": "public function matchRouteAndUrl(){\n\t\t\tif(empty($this->allRoutes)){return false;}\n\n\t\t\tforeach($this->allRoutes as $route){\n\t\t\t\n\t\t\t\t//Parts prevents buggy behavior if argument is requested (/params/name) and preceeded with another route (/params).\n\t\t\t\t$firstPart = ($route->hasParam) ? $this->url->getEverythingButLastPartOfUrl() : \"\";\n\t\t\t\t$lastPart = $this->url->getLastPartOfUrl();\n\t\t\t\t\n\t\t\t\t//Runs if no argument has been declared\n\t\t\t\tif($route->url == $this->url->stripURLRequest() && $route->requestMethod == $_SERVER['REQUEST_METHOD'] && !($route->hasParam)){\n\t\t\t\t\treturn $route;\n\t\t\t\t}\n\t\t\t\t//Runs if argument has been declared\n\t\t\t\tif($route->url == $firstPart && $route->requestMethod == $_SERVER['REQUEST_METHOD'] && !empty($firstPart)){\n\t\t\t\t\treturn $route;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "2636161a394b5560ecd8e0fa59da5d26", "score": "0.5686423", "text": "function checkVarIsSet($string) {\n\n\t\t\tif (isset($_GET[$string] ) ){\n\t\t\t\t\n\t\t\t\treturn $_GET[$string];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\treturn \"undefined\";\n\t\t\t}\n\t\t//\tif (isset($_POST[\"idnumber\"]))\n\t\t}", "title": "" }, { "docid": "06ac27d0505613d6e8dbb2a457206177", "score": "0.56834096", "text": "private function process_get() {\t\t\n\t\t\tforeach ($this->allowedNames as $name) {\n\t\t\t\t$get = $_GET[$name];\n\t\t\t\tif ($get && $this->is_unlocked($name)) {\t\n\t\t\t\t\t// prepare and validate multiple values\n\t\t\t\t\tif (stristr($get, \"|\")) {\n\t\t\t\t\t\tforeach (explode(\"|\", $get) as $value) {\n\t\t\t\t\t\t\tif ($this->is_valid($name, $value)) {\n\t\t\t\t\t\t\t\t$params[$name][] = $value;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->error_message(\"value\", array($name, $value));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t// validate single values\t\n\t\t\t\t\t} elseif ($this->is_valid($name, $get)) {\n\t\t\t\t\t\t$params[$name] = $get;\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error_message(\"value\", array($name, $get));\n\t\t\t\t\t}\n\t\t\t\t// if not specified, use defaults\t\n\t\t\t\t} else {\n\t\t\t\t\t$params[$name] = $this->defaultValues[$name];\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn $params;\n\t}", "title": "" }, { "docid": "568be6d5d50898cf354bc48bfab256d2", "score": "0.5682516", "text": "function awd_querystring(){\r\n\tglobal $AWD;\r\n\t\r\n\tif(!isset($AWD['get_variables'])){\r\n\t\treturn false;\r\n\t}else{\r\n\t\treturn $AWD['get_variables'];\r\n\t}\r\n}", "title": "" }, { "docid": "9a9a4f97dd64bc6abe4bb6746f0cdff6", "score": "0.5680846", "text": "public static function has_get($key) {\n\t\treturn array_key_exists($key,$_GET);\n\t}", "title": "" }, { "docid": "f7d716bc8ab0bcd5c1d0ae0cf54d1c36", "score": "0.56787026", "text": "function check_parameter( $required, $source )\n{\n\tif(count($required) != count($source) )\n\t{\n\t\treturn false;\n\t}\n\n\tforeach( $required as $key )\n\t{\n\t\tif( !isset($source[$key]) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "09cded741fdf59ba348d69e15ec1d14f", "score": "0.5671164", "text": "function isGetRequest() {\r\n return ( filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET' );\r\n}", "title": "" }, { "docid": "f8e9fb55545dc0b8d2fa9b19b10db4e6", "score": "0.5660044", "text": "function _switcher_is_cgi_parameter_present() {\n return (\n isset($_GET[SWITCHER_CGI_VAR])\n );\n}", "title": "" }, { "docid": "d591c3683ed264dbbb3d02999eb2956a", "score": "0.565905", "text": "private function checkReq() : bool\n {\n if (count(array_intersect_key($this->required, $this->post)) == count($this->required)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "498370e312a0c6200e25a485666b9cc9", "score": "0.5655317", "text": "public function isThereGet($current,$false){\r\n\t\tif(!empty($_GET[$current])){\t\r\n\t\t\t$current = $_GET[$current];\t\r\n\t\t\treturn($current);\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn($false);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "13c8fb04b5e2f7b8dce24e60774cd44e", "score": "0.56552255", "text": "function canGet( $index )\n\t{\n\t\tif( isset($_GET) && !empty($_GET) )\n\t\t{\n\t\t\treturn $_GET[$index];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "203a3e235f6090c024adc68840512a99", "score": "0.56452835", "text": "function checkInputfield() {\n\t\t## local variables init.\n\t\t$postVar = 0;\n\t\t$inputFieldName = 0;\n\t\t$rExp = 0;\n\t\t## collect the argument parameters there should be ony 2,3 arguments\n\t\t## where the 3rd arguement is a regular exp (optional)\n\t\tif (func_num_args() == 2) {\n\t\t\t## set the variables\n\t\t\t$postVar = func_get_arg(0);\n\t\t\t$inputFieldName = func_get_arg(1);\n\t\t} else {\n\t\t\tif (func_num_args() == 3) {\n\t\t\t\t## set the variables\n\t\t\t\t$postVar = func_get_arg(0);\n\t\t\t\t$inputFieldName = func_get_arg(1);\n\t\t\t\t$rExp = func_get_arg(2);\n\t\t\t} else {\n\t\t\t\tprint \"error: invalid arguments\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t## check if $postVar is an array if not return false.\n\t\tif ( !is_array($postVar) ) {\n\t\t\treturn false;\n\t\t}\n\t\t## check if fieldName is set.\n\t\tif ( !$inputFieldName ) {\n\t\t\treturn false;\n\t\t}\n\t\t## check if rExp is set (used for regular expression checking)\n\t\tif ( !$rExp ) {\n\t\t\t## use default regular exp (ie: more than 0 apha characters)\n\t\t\t$rExp = \"/.*/\";\n\t\t}\n\t\t## check if variable was set in postVar\n\t\tif ( $postVar[\"$inputFieldName\"] ) {\n\t\t\t## check if the input has valid data.\n\t\t\t$tmpValue = $postVar[\"$inputFieldName\"];\n\t\t\tif ( preg_match($rExp,$tmpValue) ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t## return false, since field input and value does not exist.\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b6b78560f11b0880a219725271f9e3c4", "score": "0.56200767", "text": "function elgg_http_url_is_identical($url1, $url2, $ignore_params = array('offset', 'limit')) {\n\t$url1 = elgg_normalize_url($url1);\n\t$url2 = elgg_normalize_url($url2);\n\n\t// @todo - should probably do something with relative URLs\n\n\tif ($url1 == $url2) {\n\t\treturn true;\n\t}\n\n\t$url1_info = parse_url($url1);\n\t$url2_info = parse_url($url2);\n\n\tif (isset($url1_info['path'])) {\n\t\t$url1_info['path'] = trim($url1_info['path'], '/');\n\t}\n\tif (isset($url2_info['path'])) {\n\t\t$url2_info['path'] = trim($url2_info['path'], '/');\n\t}\n\n\t// compare basic bits\n\t$parts = array('scheme', 'host', 'path');\n\n\tforeach ($parts as $part) {\n\t\tif ((isset($url1_info[$part]) && isset($url2_info[$part]))\n\t\t&& $url1_info[$part] != $url2_info[$part]) {\n\t\t\treturn false;\n\t\t} elseif (isset($url1_info[$part]) && !isset($url2_info[$part])) {\n\t\t\treturn false;\n\t\t} elseif (!isset($url1_info[$part]) && isset($url2_info[$part])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// quick compare of get params\n\tif (isset($url1_info['query']) && isset($url2_info['query'])\n\t&& $url1_info['query'] == $url2_info['query']) {\n\t\treturn true;\n\t}\n\n\t// compare get params that might be out of order\n\t$url1_params = array();\n\t$url2_params = array();\n\n\tif (isset($url1_info['query'])) {\n\t\tif ($url1_info['query'] = html_entity_decode($url1_info['query'])) {\n\t\t\t$url1_params = elgg_parse_str($url1_info['query']);\n\t\t}\n\t}\n\n\tif (isset($url2_info['query'])) {\n\t\tif ($url2_info['query'] = html_entity_decode($url2_info['query'])) {\n\t\t\t$url2_params = elgg_parse_str($url2_info['query']);\n\t\t}\n\t}\n\n\t// drop ignored params\n\tforeach ($ignore_params as $param) {\n\t\tif (isset($url1_params[$param])) {\n\t\t\tunset($url1_params[$param]);\n\t\t}\n\t\tif (isset($url2_params[$param])) {\n\t\t\tunset($url2_params[$param]);\n\t\t}\n\t}\n\n\t// array_diff_assoc only returns the items in arr1 that aren't in arrN\n\t// but not the items that ARE in arrN but NOT in arr1\n\t// if arr1 is an empty array, this function will return 0 no matter what.\n\t// since we only care if they're different and not how different,\n\t// add the results together to get a non-zero (ie, different) result\n\t$diff_count = count(array_diff_assoc($url1_params, $url2_params));\n\t$diff_count += count(array_diff_assoc($url2_params, $url1_params));\n\tif ($diff_count > 0) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "6f539acceb373a061d88a7c65639c733", "score": "0.56199545", "text": "function has_query_string() {\n if( $_SERVER['QUERY_STRING'] ) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "ba255e58dc859490cf5238997e461743", "score": "0.56190574", "text": "function processURLParameter(){\r\n\t\r\n\tglobal $ERR;\r\n\r\n\tif( isset($_GET['f']) )\r\n\t\t$f = $_GET['f'];\r\n\telse\r\n\t\t$f = null;\r\n\r\n\tif( isset($_GET['loc']) )\r\n\t\t$loc = $_GET['loc'];\r\n\telse\r\n\t\t$loc = null;\r\n\r\n\tif( isset($_GET['mensa']) )\r\n\t\t$mensa = $_GET['mensa'];\r\n\telse\r\n\t\t$mensa = null;\r\n\r\n\tif( isset($_GET['meal']) )\r\n\t\t$meal = $_GET['meal'];\r\n\telse\r\n\t\t$meal = null;\r\n\r\n\tif( isset($_GET['rating']) )\r\n\t\t$rating = $_GET['rating'];\r\n\telse\r\n\t\t$rating = 0;\r\n\r\n\tif( isset($_GET['hash']) )\r\n\t\t$hash = $_GET['hash'];\r\n\telse\r\n\t\t$hash = null;\r\n\r\n\tif( isset($_GET['com']) )\r\n\t\t$comment = $_GET['com'];\r\n\telse\r\n\t\t$comment = \"\";\r\n\r\n\tif( isset($_GET['pig']) )\r\n\t\t$pig = $_GET['pig'];\r\n\telse\r\n\t\t$pig = 0;\r\n\r\n\tif( isset($_GET['cow']) )\r\n\t\t$cow = $_GET['cow'];\r\n\telse\r\n\t\t$cow = 0;\r\n\r\n\tif( isset($_GET['vege']) )\r\n\t\t$vegetarian = $_GET['vege'];\r\n\telse\r\n\t\t$vegetarian = 0;\r\n\r\n\tif( isset($_GET['vega']) )\r\n\t\t$vegan = $_GET['vega'];\r\n\telse\r\n\t\t$vegan = 0;\r\n\r\n\tif( isset($_GET['alc']) )\r\n\t\t$alc = $_GET['alc'];\r\n\telse\r\n\t\t$alc = 0;\r\n\t\r\n\tif( isset($_GET['query']) )\r\n\t\t$query = $_GET['query'];\r\n\telse\r\n\t\t$query = null;\r\n\t\r\n\t// process function\r\n\tprocessFunction($f, $loc, $mensa, $meal, $rating, $hash, $pig, $cow, $vegetarian, $vegan, $alc, $comment, $query);\r\n\r\n}", "title": "" }, { "docid": "12440e1eb827517732c07e2e6840abf1", "score": "0.56104386", "text": "function InitGet($_GET)\n {\n $first = empty($_GET[\"fRunMin\"]) && empty($_GET[\"fRunMax\"]);\n\n if (empty($_GET[\"fNumResults\"]))\n $_GET[\"fNumResults\"]=\"20\";\n\n if (empty($_GET[\"fTest\"]))\n $_GET[\"fTest\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fNumEvents\"]))\n $_GET[\"fNumEvents\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fRunStart\"]))\n $_GET[\"fRunStart\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fZenithDistance\"]))\n $_GET[\"fZenithDistance\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fRunTypeName\"]))\n $_GET[\"fRunTypeName\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fSourceName\"]))\n $_GET[\"fSourceName\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fMeanTriggerRate\"]))\n $_GET[\"fMeanTriggerRate\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fExcludedFDAName\"]))\n $_GET[\"fExcludedFDAName\"]=$first?\"On\":\"\";\n\n if (empty($_GET[\"fSequenceNo\"]))\n $_GET[\"fSequenceNo\"]=\"\";\n\n InitRunInfo($_GET, $first);\n }", "title": "" }, { "docid": "796e287af46ff1cf9e0bb5415516d1b0", "score": "0.5605701", "text": "private function match_request($http_method, $url_pattern, &$matched_parameters = array()) {\n $path = substr($_SERVER['REQUEST_URI'],\n strlen($_SERVER['PHP_SELF']) - strlen(basename($_SERVER['PHP_SELF'])) - 1);\n $path = parse_url($path)['path'];\n if ($_SERVER['REQUEST_METHOD'] != strtoupper($http_method) &&\n ($this->cors == false || $_SERVER['REQUEST_METHOD'] != 'OPTIONS')) {\n return false;\n }\n $pathTokens = explode(\"/\", $path);\n $patternTokens = explode(\"/\", $url_pattern);\n\n if (sizeof($pathTokens) != sizeof($patternTokens)) {\n return false;\n }\n\n $i = 0;\n $matched_parameters = array();\n for ($i = 0; $i < sizeof($pathTokens); $i++) {\n if ($pathTokens[$i] != $patternTokens[$i]) {\n if (preg_match('/\\$([0-9]+?)/', $patternTokens[$i], $matches)==1) {\n $matched_parameters[$matches[1]] = $pathTokens[$i];\n } else {\n return false;\n }\n }\n }\n\n if (sizeof($matched_parameters) > 0) {\n ksort($matched_parameters);\n }\n return true;\n}", "title": "" }, { "docid": "85adc51f1938796965e17430e77a148d", "score": "0.55542105", "text": "public function matchParameters($url);", "title": "" }, { "docid": "bdefdf82d53154b7f4a747c4afe699ec", "score": "0.55539393", "text": "function get_params($options = array()) {\n\t\t// loop through the GETs\n\t\tforeach ($_GET as $key => $value) {\n\t\t\tif (is_array($options) && isset($options['prefix']) && $options['prefix'] != '') {\n\t\t\t\t// get length of prefix\n\t\t\t\t$length = strlen($options['prefix']);\n\t\t\t\t// find if the key starts with the prefix\n\t\t\t\tif (substr($key, 0, $length) == $options['prefix']) {\n\t\t\t\t\t$this->get_params[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->get_params[$key] = $value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f4cd1ed969c65bb7e2f5691213f71f12", "score": "0.5551061", "text": "function getParams() {\n global $config;\n\n if (isset($_GET['moss'])) {\n $params['moss'] = $_GET['moss'];\n }\n\n if (isset($_GET['lines'])) {\n $params['lines'] = $_GET['lines'];\n } else {\n $params['lines'] = 0;\n }\n\n if (isset($_GET['submitbutton'])) {\n $params['submitbutton'] = $_GET['submitbutton'];\n } else {\n $params['submitbutton'] = false;\n }\n\n if (isset($_GET['color'])) {\n $params['color'] = $_GET['color'];\n } else {\n $params['color'] = false;\n }\n\n if (isset($_GET['no_lines'])) {\n $params['no_lines'] = $_GET['no_lines'];\n } else {\n $params['no_lines'] = false;\n }\n\n if (isset($_GET['no_per'])) {\n $params['no_per'] = $_GET['no_per'];\n } else {\n $params['no_per'] = false;\n }\n\n if (isset($_GET['no_width'])) {\n $params['no_width'] = $_GET['no_width'];\n } else {\n $params['no_width'] = false;\n }\n\n $config['params'] = $params;\n}", "title": "" }, { "docid": "168b3806ad7b91ab1714af6cff835958", "score": "0.5525069", "text": "function verifyRequiredParams($request,$required_fields) {\n $error = false;\n $error_fields = \"\";\n $request_params = array();\n $request_params = $_REQUEST;\n // Handling PUT request params\n if ($_SERVER['REQUEST_METHOD'] == 'PUT') { \n parse_str($request->getBody(), $request_params);\n }\n foreach ($required_fields as $field) {\n if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {\n $error .= $field . ', ';\n }\n }\n return $error;\n}", "title": "" }, { "docid": "777da6236bf31cd9ee3d0268e9fdb33e", "score": "0.54920155", "text": "function GETPOSTISSET($paramname)\n{\n\treturn (isset($_POST[$paramname]) || isset($_GET[$paramname]));\n}", "title": "" }, { "docid": "a15356e622e402f8279d7cd695751972", "score": "0.5472776", "text": "function checkMealParameter($loc, $mensa, $meal, $pig, $cow, $vegetarian, $vegan, $alc){\r\n\tif( $loc != null &&\r\n\t$mensa != null &&\r\n\t$meal != null &&\r\n\t$pig != null &&\r\n\t$cow != null &&\r\n\t$vegetarian != null &&\r\n\t$vegan != null &&\r\n\t$alc != null )\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "title": "" }, { "docid": "a3756358f58b3edf03e9c78f16a1d7b4", "score": "0.54632384", "text": "public function match()\n\t\t{\n\t\t\t$url = trim($_SERVER['REQUEST_URI'], '/');\n\t\t\t\n\t\t\tforeach ($this->routes as $route => $params) {\n\t\t\t\tif (preg_match($route, $url, $matches)) {\n\t\t\t\t\t$this->params = $params;\n\t\t\t\t\t$segments = explode('/', $url);\n\t\t\t\t\t$this->queryParams = array_slice($segments, 2);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "d749faef63aed153c513b7e9cd88e798", "score": "0.5459188", "text": "protected function isGetRequest()\n {\n return Input::server(\"REQUEST_METHOD\") == \"GET\";\n }", "title": "" }, { "docid": "55cce06d0d92a03901335e20734da194", "score": "0.5446359", "text": "public static function sanGET()\n\t{\n\t\tif(is_array($_GET))\n\t\t{\n\t\t\tforeach($_GET as $key => $value) \n\t\t\t{\n\t\t\t\t$_GET[$key] = self::escape($value);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "61d40591c824cdfa061782da337eb82b", "score": "0.54373115", "text": "private function checkParamsAction($chk_params, $object_info) {\n $converted_array = (array) $object_info;\n foreach ($chk_params as $param) {\n if (array_key_exists($param, $converted_array) && !empty($converted_array[$param])) {\n $check_error = 0;\n } else {\n $check_error = 1;\n $this->miss_param = $param;\n break;\n }\n }\n return $check_error;\n }", "title": "" }, { "docid": "cdef41456aeffb33cd07f0b1931c691d", "score": "0.54348516", "text": "function var_get($nom) {\n //retourne la valeur si la variable nom existe sinon false\n return (isset($_GET[$nom])) ? $_GET[$nom] : false;\n}", "title": "" }, { "docid": "9c455f21791da781dde82df3e50803fe", "score": "0.54275775", "text": "abstract protected function validate_params();", "title": "" }, { "docid": "654f3ba7d71c951c9b370544cd70b330", "score": "0.54117405", "text": "public function __isset($key)\n\t{\n\t\tswitch (true)\n\t\t{\n\t\t\tcase isset($this->_params[$key]):\n\t\t\t\treturn true;\n\t\t\tcase isset($_REQUEST[$key]):\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4b75158d64c2fb82b9ade5e7899ba8f0", "score": "0.5411256", "text": "public function hasParam(){\n return $this->_has(2);\n }", "title": "" } ]
de25fcb5638be7e4af8d3e1c2d893b3b
Destroy the image to free memory. Ruquay K Calloway made a better function to find the coordinates of the text bounding box so I used it.
[ { "docid": "edbf862b4770927cf640baf7ef8b0a63", "score": "0.48443502", "text": "function imagettfbbox_t($size, $text_angle, $fontfile, $text){\n // compute size with a zero angle\n $coords = imagettfbbox($size, 0, $fontfile, $text);\n \n\t// convert angle to radians\n $a = deg2rad($text_angle);\n \n\t// compute some usefull values\n $ca = cos($a);\n $sa = sin($a);\n $ret = array();\n \n\t// perform transformations\n for($i = 0; $i < 7; $i += 2){\n $ret[$i] = round($coords[$i] * $ca + $coords[$i+1] * $sa);\n $ret[$i+1] = round($coords[$i+1] * $ca - $coords[$i] * $sa);\n }\n return $ret;\n}", "title": "" } ]
[ { "docid": "3cabdc3436f574c05daf2f462e43fbc1", "score": "0.6225843", "text": "public function __destruct()\n {\n imagedestroy($this->img);\n }", "title": "" }, { "docid": "1dd6d5500697fe8ada3f1b09627661fe", "score": "0.6205232", "text": "public function __destruct() {\n unset($this->src, $this->image, $this->originalBox, $this->box);\n }", "title": "" }, { "docid": "62eabbe046795c966c6b4a395cbc5322", "score": "0.6199356", "text": "public function __destruct()\n\t{\n\t\tif ( $this->_has_image() )\n\t\t{\n\t\t\t// Free all resources\n\t\t\timagedestroy($this->_image);\n\t\t}\n\t}", "title": "" }, { "docid": "3220ec59fd8e8f567e644e9a055797b1", "score": "0.61915565", "text": "public function destroy() {\n\t\timagedestroy($this->image);\n\t\t// Set memory back to a decent setting\n\t\tif (ini_get(\"memory_limit\") != '16M') ini_set('memory_limit', '16M');\n\t}", "title": "" }, { "docid": "240c53e21973545111d8a776c98d50e3", "score": "0.6094992", "text": "public function __destruct() {\n\t\tif ($this->__image) imagedestroy($this->__image);\n\n\t\tif ($this->error && sizeof($this->errors)) {\n\t\t\t$this->__log('Image errors:<br>'.join('<br>',$this->errors));\n\t\t}\n\t}", "title": "" }, { "docid": "80a1d28c7877005677eb6bb31b870428", "score": "0.60928816", "text": "function destruct()\n {\n if (is_resource($this->newImage)) {\n @ImageDestroy($this->newImage);\n }\n if (is_resource($this->oldImage)) {\n @ImageDestroy($this->oldImage);\n }\n if (is_resource($this->workingImage)) {\n @ImageDestroy($this->workingImage);\n }\n }", "title": "" }, { "docid": "23efa2e36e15adfd7e726da6b210aac0", "score": "0.60417587", "text": "public function __destruct()\n {\n if (!is_null($this->body)) {\n imagedestroy($this->body);\n }\n }", "title": "" }, { "docid": "ff1b7942d4c0da63c5cbd062f30c7ad4", "score": "0.597809", "text": "public function destroy() {\n\n\t\t// Reinicia un error previo seleccionado\n\t\t$this->error->release();\n\n\t\t// Libera la imagen de la memoria\n\t\tif ($this->_gd !== null) {\n\t\t\timagedestroy($this->_gd);\n\t\t}\n\n\t\t// Reinicia las propiedades\n\t\t$this->_path = null;\n\t\t$this->_gd = null;\n\t\t$this->_format = null;\n\t\t$this->_mime = null;\n\t}", "title": "" }, { "docid": "a5f1e91b845b8fc963656608b8775665", "score": "0.57276976", "text": "public function close()\n {\n imagedestroy($this->image);\n $this->image = false;\n }", "title": "" }, { "docid": "f9e909f3e6d31afdc316a77f8b23b4dc", "score": "0.5716608", "text": "function free(){\n\t\t// Delete the all old temporary images\n\t\tif(glob($this->path.\"images/*.png\"))\n\t\tforeach(glob($this->path.\"images/*.png\") as $tmp)\n\t\t\tunlink($tmp);\n\t}", "title": "" }, { "docid": "8da9d0da24521c36f49845cbfca8d754", "score": "0.5647264", "text": "public function clearEmbeddedImages();", "title": "" }, { "docid": "53c38df29a540b41a2a0e8942fbce00a", "score": "0.5618922", "text": "protected function maintain()\n {\n $this->width = imagesx($this->image);\n $this->height = imagesy($this->image);\n }", "title": "" }, { "docid": "8c94546361e216b1aa0a37b6c85bbd4b", "score": "0.5529735", "text": "public function __destruct()\n {\n unset(\n $this->canvas,\n $this->id,\n $this->html\n );\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.5523917", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.5523917", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.5523917", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.5523917", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.5523917", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "88b5716d4c14f7fdb35b38f5a15cc6b3", "score": "0.5458404", "text": "public function deleteImage()\n\t{\n\t\t$file = $this->getImagePath() . $this->getImageFilename();\n\t\t@unlink($file);\n\t\t$this->flushAnswers();\n\t\t$this->image_filename = \"\";\n\t}", "title": "" }, { "docid": "7ae1a8c196115a3013152f601d0dc285", "score": "0.5409971", "text": "public function __destruct()\n {\n $this->flushImageSettings();\n }", "title": "" }, { "docid": "e3c20bb3039828b5d222b171495f248e", "score": "0.54097706", "text": "function writeTextGroup($image, $image_width, $image_height, $params){\n $font_file = './fonts/'.$params['font-family'].'.ttf';\n $color = hexColorAllocate($image, $params['color']);\n\n $topset = 0;\n $lines = array();\n\n if($params['text-transform']==\"uppercase\"){\n $params['text'] = strtoupper( $params['text'] );\n }\n elseif($params['text-transform']==\"capitalize\"){\n $params['text'] = ucwords( $params['text'] );\n }\n elseif($params['text-transform']==\"lowercase\"){\n $params['text'] = strtolower( $params['text'] );\n }\n\n /*write the text, multiline*/\n if($params['white-space']==\"normal\" || strpos($params['text'],\"\\r\\n\")!==false){\n\n if(strstr($params['text'],\"\\r\\n\")){\n $params['text'] = str_replace(\"\\r\\n\", ' |-| ', $params['text']);\n }\n\n $words = explode(' ', $params['text']);\n $mlength = (intval($params['max-width'])>0 && $params['white-space']==\"normal\") ?\n intval($params['max-width']) :\n (\n $params['white-space']==\"normal\" ?\n ($params['text-align'] != \"center\" ?\n abs($image_width - $params['left']):\n ($image_width - (round( abs($params['left']-($image_width/2)) )*2) )\n ) :\n NULL\n );\n\n\n //imagestring($image, 5, 11, 230+$params['top'], 'ml:'.$mlength, $black);//shadow\n\n $line = '';\n\n foreach ($words as &$word){\n\n $sizeWithWord = imagettfbboxWithTracking($params['font-size'], $params['angle'], $font_file, $line==\"\"? $word: ($line .' '.$word), $params['letter-spacing']);\n\n if( strpos($word, '|-|')!==false || ($mlength != NULL && (abs($sizeWithWord[2]) - abs($sizeWithWord[0]) > $mlength))){\n\n if($params['text-align'] == \"center\"){\n $tmpleft = centerText($image, $params['font-size'], $font_file, $line, $image_width, $params['left'], $params['letter-spacing']);\n }\n elseif($params['text-align'] == \"right\"){\n $tmpleft = rightalignText($image, $params['font-size'], $font_file, $line, $image_width, $params['left'], $params['letter-spacing']);\n }\n else{\n $tmpleft = $params['left'];\n }\n\n $sizeWithWord = imagettfbboxWithTracking($params['font-size'], $params['angle'], $font_file, $line);//only care about height here\n $lines[] = array('line_text'=>$line,'line_left'=>$tmpleft, 'font_height'=> $sizeWithWord['height'] );\n\n //writeTextLine($image, $params['font-size'], $params['angle'], $tmpleft, $params['top']+$topset, $color, $font_file, $line, $params['text-shadow'], $params['outline'], $params['letter-spacing']);\n $line = strpos($word, '|-|')===false?$word:'';\n //$topset = $topset + ($params['line-height']*$params['font-size']);\n }else{\n $line = $line==\"\"? $word: ($line .' '.$word);\n }\n }\n\n /*deal with the final line*/\n if($params['text-align'] == \"center\"){\n $tmpleft = centerText($image, $params['font-size'], $font_file, $line, $image_width, $params['left'], $params['letter-spacing']);\n }\n elseif($params['text-align'] == \"right\"){\n $tmpleft = rightalignText($image, $params['font-size'], $font_file, $line, $image_width, $params['left'], $params['letter-spacing']);\n }\n else{\n $tmpleft = $params['left'];\n }\n $sizeWithWord = imagettfbboxWithTracking($params['font-size'], $params['angle'], $font_file, $line);//only care about height here\n $lines[] = array('line_text'=>$line,'line_left'=>$tmpleft, 'font_height'=> $sizeWithWord['height']);\n //writeTextLine($image, $params['font-size'], $params['angle'], $tmpleft, $params['top']+$topset, $color, $font_file, $line, $params['text-shadow'], $params['outline'], $params['letter-spacing']);//remaining lines\n\n }\n else{\n\n if($params['text-align'] == \"center\"){\n $params['left'] = centerText($image, $params['font-size'], $font_file, $params['text'], $image_width, $params['left'], $params['letter-spacing']);\n }\n elseif ($params['text-align'] == \"right\"){\n $params['left'] = rightalignText($image, $params['font-size'], $font_file, $params['text'], $image_width, $params['left'], $params['letter-spacing']);\n }\n $sizeWithWord = imagettfbboxWithTracking($params['font-size'], $params['angle'], $font_file, $params['text']);//only care about height here\n\n\n\n $lines[] = array('line_text'=>$params['text'],'line_left'=>$params['left'], 'font_height'=> $sizeWithWord['height']);\n\n //writeTextLine($image, $params['font-size'], $params['angle'], $params['left'], $params['top'], $color, $font_file, $params['text'], $params['text-shadow'], $params['outline'], $params['letter-spacing']);\n }\n\n // $block_height = count($lines)<1 ? $lines[0]['font_height'] :\n // array_reduce($lines, function($carry, $val){\n // return $carry + $val['font_height'];\n // }, 0);// +\n // ($params['line-height'] * $params['font-size'] * (count($lines)-1));\n\n $block_height =\n ($params['line-height'] * $params['font-size'] * (count($lines)-1)) +//lines + our artifical line-height spacing\n $lines[0]['font_height'];//all lines are the same height, so using the first instead of the last is ok...\n\n /*now deal with vertical alignment*/\n if ($params['vertical-align'] == \"middle\"){\n $params['top'] = centerVert($image, $params['font-size'], $font_file, $params['text'], $image_height, $params['top'], $block_height, $lines[0]['font_height']);\n }\n elseif ($params['vertical-align'] == \"bottom\"){\n $params['top'] = bottomalignText($image, $params['font-size'], $font_file, $params['text'], $image_height, $params['top'], $block_height, $lines[0]['font_height']);\n }\n else{\n $params['top'] = $params['top'] + $params['font-size'];//start the line at the top of the chosen position instead of the baseline\n }\n\n //imagestring($image, 5, 11, 30, 'bh: '.$block_height.', firstlineh:'.$lines[0]['font_height']. ', #lines:' .count($lines) . ', line-space:'. $params['line-height'] * $params['font-size'] * (count($lines)-1), $black);//shadow\n\n foreach ($lines as &$line){\n writeTextLine($image, $params['font-size'], $params['angle'], $line['line_left'], $params['top']+$topset, $color, $font_file, $line['line_text'], $params['text-shadow'], $params['outline'], $params['letter-spacing']);//remaining lines\n $topset = $topset + ($params['line-height']*$params['font-size']);\n }\n\n}", "title": "" }, { "docid": "22e83c7b7b201950df0904a18cf43c1f", "score": "0.53974843", "text": "function imagettftextcenter($image, $size, $x, $y, $color, $fontfile, $text){\n\t\t$rect = imagettfbbox($size, 0, $fontfile, \"Tq\");\n\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\t\t$h1 = $maxY - $minY;\n\n\t\t// Get height of two lines\n\t\t$rect = imagettfbbox($size, 0, $fontfile, \"Tq\\nTq\");\n\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\t\t$h2 = $maxY - $minY;\n\n\t\t// amount of padding that should be between each line\n\t\t$vpadding = $h2 - $h1 - $h1;\n\n\t\t// calculate the dimensions of the text itself\n\t\t$frect = imagettfbbox($size, 0, $fontfile, $text);\n\t\t$minX = min(array($frect[0],$frect[2],$frect[4],$frect[6]));\n\t\t$maxX = max(array($frect[0],$frect[2],$frect[4],$frect[6]));\n\t\t$text_width = $maxX - $minX;\n\n\t\t$text = explode(\"\\n\", $text);\n\t\tforeach($text as $txt){\n\t\t\t$rect = imagettfbbox($size, 0, $fontfile, $txt);\n\t\t\t$minX = min(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t$maxX = max(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\n\t\t\t$width = $maxX - $minX;\n\t\t\t$height = $maxY - $minY; \n\n\t\t\t$_x = $x + (($text_width - $width) / 2);\n\n\t\t\timagettftext($image, $size, 0, $_x, $y, $color, $fontfile, $txt);\n\t\t\t$y += ($height + $vpadding);\n\t\t}\n\n\t\treturn $frect;\n\t}", "title": "" }, { "docid": "e2abfc971308cc67e6f257069d82ad22", "score": "0.5358676", "text": "function close()\n\t{\n\t\tif ($this->imagick != null)\n\t\t{\n\t\t\t$this->imagick->destroy();\n\t\t\t$this->imagick = null;\n\t\t}\n\t\tif ($this->magick != null)\n\t\t{\n\t\t\tDestroyMagickWand($this->magick);\n\t\t\t$this->magick = null;\n\t\t}\n\t\tif ($this->ffmpeg != null)\n\t\t\t$this->ffmpeg = null;\n\t}", "title": "" }, { "docid": "c490503829ea38b5dbf65993a931ccb0", "score": "0.5344672", "text": "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete on the update\n $this->temp = $this->image;\n //delete the current image\n $this->image = NULL;\n }\n }", "title": "" }, { "docid": "60483becd63bb8df29a7bff142bfad35", "score": "0.52832794", "text": "public function deleteImage()\n {\n //delete image file\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "c7e58c026bba736b61fdc3b4cb545385", "score": "0.5196604", "text": "private function imagettftext_cr($img, $size, $angle, $x, $y, $color, $fontfile, $text)\n {\n // retrieve boundingbox\n $bbox = imagettfbbox($size, $angle, $fontfile, $text);\n \n // calculate deviation\n $dx = ($bbox[2] - $bbox[0]) / 2.0 - ($bbox[2] - $bbox[4]) / 2.0; // deviation left-right\n $dy = ($bbox[3] - $bbox[1]) / 2.0 + ($bbox[7] - $bbox[1]) / 2.0; // deviation top-bottom\n \n // new pivotpoint\n $px = $x - $dx;\n $py = $y - $dy;\n \n return imagettftext($img, $size, $angle, $px, $py, $color, $fontfile, $text);\n }", "title": "" }, { "docid": "426aa070031ee438d8b4b80adf9163ec", "score": "0.51710665", "text": "public function clearShapes() {\n\t\t$this->shapes->clear();\n\t}", "title": "" }, { "docid": "c925c1280aef6cf2d495d9b08ca53df4", "score": "0.51540506", "text": "function __destroy_source(&$tmp) {\n\t\treturn imagick_free($tmp->source);\n\t\t}", "title": "" }, { "docid": "5cd5b3e7e9543b78d868376f0653f875", "score": "0.51531506", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "59dbe2bcd86bbc0c48712fba30ef9f34", "score": "0.50824606", "text": "public function clear()\n\t\t {\n\t\t // clear all the class member variables\n\t\t $this->image_original = 0;\n\t\t $this->file_original = \"\";\n\t\t $this->image_original_width = 0;\n\t\t $this->image_original_height = 0;\n\t\t $this->image_original_type_code = 0;\n\t\t $this->image_original_type_abbr = \"\";\n\t\t $this->image_original_html_sizes = \"\";\n\t\t $this->image_resized = 0;\n\t\t $this->file_resized = \"\";\n\t\t $this->image_resized_width = 0;\n\t\t $this->image_resized_height = 0;\n\t\t $this->image_resized_type_code = -1;\n\t\t $this->image_resized_type_abbr = \"\";\n\t\t $this->image_resized_html_sizes = \"\";\n\t\t $this->set_parameters();\n\t\t }", "title": "" }, { "docid": "a0f2652dbbdd45b84d6b1665f685532d", "score": "0.5073422", "text": "function drawText($text,$x1,$y1,$x2,$y2,$ang,$font,$fontSize,$fontColor,$alignH=\"c\",$alignV=\"c\",$flagRect=false)\n {\n $dim=imagettfbbox($fontSize,$ang,\"fonts/\".$font.\".ttf\",$text);\n $w=$dim[2]-$dim[0];\n $h=$dim[1]-$dim[7];\n while($w>abs($x2-$x1))\n {\n $text=substr($text,0,strlen($text)-1);\n $dim=imagettfbbox($fontSize,$ang,\"fonts/\".$font.\".ttf\",$text);\n $w=$dim[2]-$dim[0];\n $h=$dim[1]-$dim[7];\n }\n $xo=$x1;\n $yo=$y1;\n if($ang==0)\n {\n switch($alignH)\n {\n case \"c\":$xo=($x1 + $x2 - $w)/2;break;\n case \"l\":$xo=$x1;break;\n case \"r\":$xo=$x2-$w;break;\n default :$xo=($x1 + $x2 - $w)/2;break;\n }\n switch($alignV)\n {\n case \"c\":$yo=($y1 + $y2 + $h)/2;break;\n case \"b\":$yo=$y2;break;\n case \"t\":$yo=$y1+$h;break;\n default :$yo=($y1 + $y2 + $h)/2;break;\n }\n }else if($ang==90)\n {\n $w=$dim[2]-$dim[4];\n $h=$dim[1]-$dim[3];\n switch($alignH)\n {\n case \"c\":$xo=($x1 + $x2 + $w)/2;break;\n case \"l\":$xo=$x1;break;\n case \"r\":$xo=$x2+$w;break;\n default :$xo=($x1 + $x2 + $w)/2;break;\n }\n switch($alignV)\n {\n case \"c\":$yo=($y1 + $y2 + $h)/2;break;\n case \"b\":$yo=$y2;break;\n case \"t\":$yo=$y1+$h;break;\n default :$yo=($y1 + $y2 + $h)/2;break;\n }\n }\n imagettftext($this->img,$fontSize,$ang,$xo,$yo,$this->color[$fontColor],\"fonts/\".$font.\".ttf\",$text);\n if($flagRect)\n {\n imagerectangle($this->img,$x1,$y1,$x2,$y2,$this->color[$fontColor]);// title\n }\n }", "title": "" }, { "docid": "a64061624b7ed0256662859ccd5fa1de", "score": "0.50703347", "text": "protected function _after()\n {\n unset($this->image);\n parent::_after();\n }", "title": "" }, { "docid": "a64061624b7ed0256662859ccd5fa1de", "score": "0.50703347", "text": "protected function _after()\n {\n unset($this->image);\n parent::_after();\n }", "title": "" }, { "docid": "1d716c3dbf772c0fe3c6a477da357509", "score": "0.50295264", "text": "function watermark_text($oldimage_name, $new_image_name, $code)\n{\n\n// global $font_path, $font_size, $marge_right,$marge_top,$sx,$sy;\n // list($owidth,$oheight) = getimagesize($oldimage_name);\n // $width = $owidth;\n // $height = $oheight;\n // $image = imagecreatetruecolor($width, $height);\n // $extension=explode('.',$oldimage_name);\n // $type=end($extension);\n // if($type=='png')\n // {\n // $image_src =imagecreatefrompng($oldimage_name);\n // }\n // else\n // {\n // $image_src = imagecreatefromjpeg($oldimage_name);\n // }\n // imagecopyresampled($image, $image_src, 0, 0, 0, 0, $owidth, $oheight, $owidth, $oheight);\n // $blue = imagecolorallocate($image, 79, 166, 185);\n // imagettftext($image, $font_size, 0, imagesx($image_src) - $sx - $marge_right-250, imagesy($image_src) - $sy - $marge_top, $blue, $font_path, $water_mark_text_2);\n // imagejpeg($image, $new_image_name, 100);\n // imagedestroy($image);\n // // unlink($oldimage_name);\n // return true;\n\n $water_mark_text_2 = \"Code:\" . $code; // Watermark Text\n global $font_path, $font_size;\n\n $extension = explode('.', $oldimage_name);\n $type = end($extension);\n if ($type == 'png') {\n $im = imagecreatefrompng($oldimage_name);\n } else {\n $im = imagecreatefromjpeg($oldimage_name);\n }\n//$im = imagecreatefromjpeg($oldimage_name);\n $stamp = imagecreatetruecolor(140, 40);\n $bg = imagecolorallocate($im, 255, 77, 85);\n $textcolor = imagecolorallocate($im, 255, 255, 255);\n imagefilledrectangle($stamp, 0, 0, 450, 40, $bg);\n// imagestring($stamp, 30, 10, 10, $water_mark_text_2, $textcolor);\n $font_uid = imageloadfont($font_path);\n// imagestring($stamp, $font_uid, 10, 10, $water_mark_text_2, $textcolor);\n imagettftext($stamp, 10, 0, 19, 25, $textcolor, $font_path, $water_mark_text_2);\n $marge_right = 10;\n $marge_bottom = 10;\n $sx = imagesx($stamp);\n $sy = imagesy($stamp);\n imagecopymerge($im, $stamp, imagesx($im) - $sx - $marge_right, $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp), 100);\n imagejpeg($im, $new_image_name, 100);\n imagedestroy($im);\n// unlink($oldimage_name);\n return true;\n}", "title": "" }, { "docid": "ff77d09263ee48dc31f1cca99b834e9c", "score": "0.5005317", "text": "public function destroy(text $text)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "f97f018e340046feba78f05ece7a207b", "score": "0.49874946", "text": "function loadpng($imgname,$title)\n{\n $im = imagecreatefrompng($imgname);\n\n //assign color\n $black = imagecolorallocate($im, 0, 0, 0);\n $white = imagecolorallocate($im, 255, 255, 255);\n\n //set all black color in image to transparent\n imagecolortransparent($im, $black);\n\n //genrate random color\n $random_color = imagecolorallocate($im, rand(1,128), rand(1,128), rand(1,128));\n\n $font_size = 30;\n // $font_size = 45; // For details image\n $font_path = __DIR__ . '/arial.ttf';\n\n\t$word = $title;\n $word = wordwrap($word,15, \"|\");\n $word = explode(\"|\",$word);\n\n $angle = 0;\n\n $width = imagesx($im);\n\t$height = imagesy($im);\n\n\timagefilledrectangle($im, 0, 70, $width, $height, $random_color);\n\n\t$height = $height - (count($word)-1)*$font_size*0.7;\n\n\tforeach ($word as $k => $v) {\n\t\t$bbox = imagettfbbox($font_size, $angle, $font_path, $v );\n\n\t\t$font_width = $bbox[4] / 2;\n\t\t$font_height = $bbox[5] / 2;\n\n\t\t$x = $width / 2 - $font_width;\n\t\t$y = $height / 2 - $font_height;\n\t\t$y = $y + $k*$font_size*1.3;\n\n\t\timagettftext($im, $font_size, $angle, $x, $y, $white, $font_path, $v);\t\n\t}\n\treturn $im;\n}", "title": "" }, { "docid": "ea74ed6d2e2c790d1755a80ac1a18cb6", "score": "0.49597558", "text": "private function extractImage(){\n $cmd = $this->cdToFolder()\n . 'tesseract ' . escapeshellcmd($this->file_basename) . ' output -l deu+eng';\n exec($cmd);\n $this->parseText();\n }", "title": "" }, { "docid": "2f55dc34ab5f6fde9e25fc6b4bb6b486", "score": "0.49592224", "text": "function removeAllTags() {\n $this->hasmeta=false;\n $this->meta=Array();\n $img = imagecreatefromstring(implode(file($this->file)));\n @unlink($this->file); #delete if exists\n imagejpeg($img,$this->file,100);\n }", "title": "" }, { "docid": "1673c0cb4c677803d5c497126384dde4", "score": "0.49574545", "text": "public function clearImage()\n {\n if (is_file(public_path($this->thumbnail))) {\n unlink(public_path($this->thumbnail));\n }\n\n if (is_file(public_path($this->image))) {\n unlink(public_path($this->image));\n }\n }", "title": "" }, { "docid": "a2166e2507cfbc6a07052af9ec869e6d", "score": "0.4957287", "text": "function _createCAPTCHA()\r\n {\r\n $options['canvas'] = array(\r\n 'width' => $this->_width,\r\n 'height' => $this->_height\r\n ); \r\n $options['width'] = $this->_width - 20;\r\n $options['height'] = $this->_height - 20; \r\n $options['cx'] = ceil(($this->_width) / 2 + 10);\r\n $options['cy'] = ceil(($this->_height) / 2 + 10);\r\n// {{{RS \r\n// $options['angle'] = rand(0, 30) - 15; \r\n $options['angle'] = rand(0, 20) - 10;\r\n// }}}\r\n $options['font_size'] = $this->_options['font_size'];\r\n $options['font_path'] = $this->_options['font_path'];\r\n $options['font_file'] = $this->_options['font_file'];\r\n $options['color'] = array('#FFFFFF', '#FFFFFF');\r\n $options['max_lines'] = 1;\r\n $options['mode'] = 'auto';\r\n $this->_imt = new Image_Text( \r\n $this->_phrase,\r\n $options\r\n );\r\n if (PEAR::isError($this->_imt->init())) {\r\n return PEAR::raiseError('Error initializing Image_Text (font missing?!)');\r\n }\r\n $this->_imt->measurize();\r\n $this->_imt->render(); \r\n $this->_im =& $this->_imt->getImg(); \r\n $white = imagecolorallocate($this->_im, 0xFF, 0xFF, 0xFF);\r\n //some obfuscation\r\n for ($i=0; $i<3; $i++) {\r\n $x1 = rand(0, $this->_width - 1);\r\n $y1 = rand(0, round($this->_height / 10, 0));\r\n $x2 = rand(0, round($this->_width / 10, 0));\r\n $y2 = rand(0, $this->_height - 1);\r\n imageline($this->_im, $x1, $y1, $x2, $y2, $white);\r\n $x1 = rand(0, $this->_width - 1);\r\n $y1 = $this->_height - rand(1, round($this->_height / 10, 0));\r\n $x2 = $this->_width - rand(1, round($this->_width / 10, 0));\r\n $y2 = rand(0, $this->_height - 1);\r\n imageline($this->_im, $x1, $y1, $x2, $y2, $white);\r\n $cx = rand(0, $this->_width - 50) + 25;\r\n $cy = rand(0, $this->_height - 50) + 25;\r\n $w = rand(1, 24);\r\n imagearc($this->_im, $cx, $cy, $w, $w, 0, 360, $white);\r\n }\r\n }", "title": "" }, { "docid": "fbd4c1d16663e9f6f3fddf24d4423279", "score": "0.49513912", "text": "function imagettftextright($image, $size, $x, $y, $color, $fontfile, $text){\n\t\t$rect = imagettfbbox($size, 0, $fontfile, \"Tq\");\n\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\t\t$h1 = $maxY - $minY;\n\n\t\t// Get height of two lines\n\t\t$rect = imagettfbbox($size, 0, $fontfile, \"Tq\\nTq\");\n\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\t\t$h2 = $maxY - $minY;\n\n\t\t// amount of padding that should be between each line\n\t\t$vpadding = $h2 - $h1 - $h1;\n\n\t\t// calculate the dimensions of the text itself\n\t\t$frect = imagettfbbox($size, 0, $fontfile, $text);\n\t\t$minX = min(array($frect[0],$frect[2],$frect[4],$frect[6]));\n\t\t$maxX = max(array($frect[0],$frect[2],$frect[4],$frect[6]));\n\t\t$text_width = $maxX - $minX; \n\n\t\t$text = explode(\"\\n\", $text);\n\t\tforeach($text as $txt){\n\t\t\t$rect = imagettfbbox($size, 0, $fontfile, $txt);\n\t\t\t$minX = min(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t$maxX = max(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\n\t\t\t$width = $maxX - $minX;\n\t\t\t$height = $maxY - $minY; \n\n\t\t\t$_x = ($x + $text_width) - $width;\n\n\t\t\timagettftext($image, $size, 0, $_x, $y, $color, $fontfile, $txt);\n\t\t\t$y += ($height + $vpadding);\n\t\t}\n\n\t\treturn $frect;\n\t}", "title": "" }, { "docid": "2a898ffd1ac4dafbda65f87dea01108b", "score": "0.49390084", "text": "public static function removeImg($object){\n if(File::exists($object->image)) {\n unlink($object->image);\n }\n\n }", "title": "" }, { "docid": "25e19da7086aee47b7562a69f072d632", "score": "0.49293193", "text": "function __destroy_target(&$tmp) {\n\t\treturn imagick_free($tmp->target);\n\t\t}", "title": "" }, { "docid": "890232101bd2d1419e92357909655d5d", "score": "0.49288046", "text": "public function freecrop($width, $height, $x = false, $y = false);", "title": "" }, { "docid": "5ecc8c9bb076dd9dba1318e56ef1a41e", "score": "0.49162602", "text": "function create_image(){\n\t\t// Create the main image\n\t\t$this->imagetext = imagecreatetruecolor(200,60);\n\t\timagefilledrectangle($this->imagetext,0,0,200,60,imagecolorallocate($this->imagetext,rand(120,255),rand(120,255),rand(120,255)));\n\t\t\n\t\t// Adding some backgrounds distortion objects\n\t\tfor ($i = 1; $i < 10; $i++) {\n\t\t\timagefilledrectangle($this->imagetext,rand(0,100),rand(0,30),rand(100,200),rand(30,60),imagecolorallocate($this->imagetext,rand(120,255),rand(120,255),rand(120,255)));\n\t\t\timagefilledellipse($this->imagetext,rand(0,200),rand(0,60),rand(25,50),rand(25,50),imagecolorallocate($this->imagetext,rand(120,255),rand(120,255),rand(120,255)));\n\t\t}\n\t\t\n\t\t//Load the fonts\n\t\t$font_dir = opendir($this->path.\"font\");\n\t\twhile ( ($font = readdir($font_dir)) !== false ) {\n\t\t\t// Some file controls\n\t\t\tif ( is_file($this->path.\"font/\".$font) and (strtolower(substr($font, strlen($font) - 3, 3)) == \"png\") ) {\n\t\t\t\t$this->font[] = imagecreatefrompng($this->path.\"font/\".$font);\n\t\t\t\t$this->write_log(\"Loaded PNG Image font: \".$font);\n\t\t\t}\n\t\t}\n\t\tclosedir($font_dir);\n\t\t\n\t\t// Add the secret code\n\t\t$x = 0;\t// Distance from each character\n\t\tfor($i = 0; $i < strlen($this->sess_value); $i++) {\n\t\t\t// Create the temporary character image\n\t\t\t$this->tmp_char = imagecreatetruecolor(40,40);\n\t\t\t\n\t\t\t// Take the character and do some distortion effects\n\t\t\timagecopy($this->tmp_char,$this->font[rand(0,count($this->font) - 1)],0,0,$this->font_map[$this->sess_value{$i}],0,40,40);\n\t\t\timagetruecolortopalette($this->tmp_char,false,32); // Convert a true color image character to a palette image with 32 colors\n\t\t\timagecolortransparent($this->tmp_char,1); // Set transparent for the background color white\n\t\t\timagecolorset($this->tmp_char,0,rand(0,200),rand(0,200),rand(0,200)); // Random color for the temporary character\n\t\t\t\n\t\t\t// Copy the resized temporary character into the final image\n\t\t\timagecopyresized($this->imagetext, $this->tmp_char, $x, rand(0,30), 0, 0, rand(20,60), rand(20,60), 40, 40);\n\t\t\t\n\t\t\t// Go to the next character\n\t\t\t$x += 40;\n\t\t\t\n\t\t\t// Destroy temporary character image\n\t\t\timagedestroy($this->tmp_char);\n\t\t}\n\t\t\n\t\t// Adding noise\n\t\t$noise_color = imagecolorallocate($this->imagetext,255,255,255);\n\t\tfor ($i = 0; $i <= 250; $i++) {\n\t\t\timagesetpixel($this->imagetext,rand(0,200),rand(0,60),$noise_color);\n\t\t}\n\t\t\n\t\t// Save the temporary image into the path of the class\n\t\t$this->tmp_img = $this->path.\"images/\".$this->sess_name.time();\n\t\timagepng($this->imagetext,$this->tmp_img.\".png\");\n\t}", "title": "" }, { "docid": "19b7d4b0ce2e56d6ca0a24373b3ebab8", "score": "0.48812953", "text": "public static function cleanImagePathCache() {\r\n\t\tself::$imagePath = null;\r\n\t}", "title": "" }, { "docid": "036766aaa5875324d85cb1ada4247f46", "score": "0.48586985", "text": "public function destroy($id){\n $image = Image::find($id);\n $image->delete();\n }", "title": "" }, { "docid": "a91f55f35a028f6bf4ce28e4a52e0c01", "score": "0.48578343", "text": "function __destruct()\n\t {\n\t \tncurses_resetty();\n\t \tncurses_end();\n\t }", "title": "" }, { "docid": "acab8bff386ed31c6b0312b8f5903e7e", "score": "0.48511764", "text": "function project2welve_preprocess_image(&$variables) {\n $attributes = &$variables['attributes'];\n\n foreach (array('width', 'height') as $key) {\n unset($attributes[$key]);\n unset($variables[$key]);\n }\n}", "title": "" }, { "docid": "829e4711e56b72a34477661ce197348d", "score": "0.4835025", "text": "public function render()\r\n {\r\n\r\n imagepng($this->image);\r\n imagedestroy($this->image);\r\n }", "title": "" }, { "docid": "ef414c1bc9083e86f0e5bb445d8efff5", "score": "0.48267204", "text": "public function cleanup()\n {\n // Remove old parts without binaries \n $this->removePartsWithoutBinary();\n \n // Remove parts where the binary is missing\n $this->removePartsWithMissingBinary();\n }", "title": "" }, { "docid": "cc591312cca3732b78fdd49abbd6e128", "score": "0.48016208", "text": "private function draw(){\n\t\n\t\tif( !$this->config ) exit();\n\t\t\n\t\t/*\n\t\t*\tUse milliseconds instead of seconds\n\t\t*/\n\t\tsrand(microtime() * 100);\n\t\t\n\t\t/*\n\t\t*\tPick random background, get info, and start captcha\n\t\t*/\n\t\t$background = $this->config['backgrounds'][rand(0, count($this->config['backgrounds']) -1)];\n\t\tlist($bg_width, $bg_height, $bg_type, $bg_attr) = getimagesize($background);\n\t\t\n\t\t$captcha = imagecreatefrompng($background);\n\t\t\n\t\t$color = $this->hex2rgb($this->config['color']);\n\t\t$color = imagecolorallocate($captcha, $color['r'], $color['g'], $color['b']);\n\t\t\n\t\t/*\n\t\t*\tDetermine text angle\n\t\t*/\n\t\t$angle = rand( $this->config['angle_min'], $this->config['angle_max'] ) * (rand(0, 1) == 1 ? -1 : 1);\n\t\t\n\t\t/*\n\t\t*\tSelect font randomly\n\t\t*/\n\t\t$font = $this->config['fonts'][rand(0, count($this->config['fonts']) - 1)];\n\t\t\n\t\t/*\n\t\t*\tVerify font file exists\n\t\t*/\n\t\tif( !file_exists($font) ) throw new Exception('Font file not found: ' . $font);\n\t\t\n\t\t/*\n\t\t*\tSet the font size\n\t\t*/\n\t\t$font_size = rand($this->config['min_font_size'], $this->config['max_font_size']);\n\t\t$text_box_size = imagettfbbox($font_size, $angle, $font, $this->config['code']);\n\t\t\n\t\t/*\n\t\t*\tDetermine text position\n\t\t*/\n\t\t$box_width = abs($text_box_size[6] - $text_box_size[2]);\n\t\t$box_height = abs($text_box_size[5] - $text_box_size[1]);\n\t\t$text_pos_x_min = 0;\n\t\t$text_pos_x_max = ($bg_width) - ($box_width);\n\t\t$text_pos_x = rand($text_pos_x_min, $text_pos_x_max);\t\t\t\n\t\t$text_pos_y_min = $box_height;\n\t\t$text_pos_y_max = ($bg_height) - ($box_height / 2);\n\t\t$text_pos_y = rand($text_pos_y_min, $text_pos_y_max);\n\t\t\n\t\t/*\n\t\t*\tDraw shadow\n\t\t*/\n\t\tif( $this->config['shadow'] ){\n\t\t\t$shadow_color = $this->hex2rgb($this->config['shadow_color']);\n\t\t\t$shadow_color = imagecolorallocate($captcha, $shadow_color['r'], $shadow_color['g'], $shadow_color['b']);\n\t\t\timagettftext($captcha, $font_size, $angle, $text_pos_x + $this->config['shadow_offset_x'], $text_pos_y + $this->config['shadow_offset_y'], $shadow_color, $font, $this->config['code']);\t\n\t\t}\n\t\t\n\t\t/*\n\t\t*\tDraw text\n\t\t*/\n\t\timagettftext($captcha, $font_size, $angle, $text_pos_x, $text_pos_y, $color, $font, $this->config['code']);\t\n\t\t\n\t\t/*\n\t\t*\tOutput image\n\t\t*/\n\t\tob_start();\n\t\timagepng($captcha);\n\t\timagedestroy($captcha);\n\t\t$captcha = ob_get_contents();\n\t\tob_clean();\n\t\treturn 'data:image/png;base64,' . base64_encode($captcha);\n\t\n\t}", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.47983888", "text": "public function cleanup();", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.47983888", "text": "public function cleanup();", "title": "" }, { "docid": "d0cb068a2046ce6137e2bf10cf051e82", "score": "0.47958025", "text": "function imagettftextboxopt(&$image, $size, $angle, $left, $top, $color, $fontfile, $text, array $opt = array())\n{\n // Default options\n $default_opt = array(\n // bbox/position\n 'width' => 200, // Required\n 'height' => 0, // Optional height\n 'orientation' => array(ORIENTATION_TOP, ORIENTATION_LEFT), // Orientation for placement\n // Can be a constant or a nubmer\n // relative to 0, 0 of the box\n 'indent_for_angle' => true, // For angled text, have the left x of each line be translated too\n // General\n 'space_char' => ' ', // Space character\n 'use_mbstring' => false, // Uses the mbstring extension for string functions (Unicode, etc. support)\n // Text\n 'align' => ALIGN_LEFT, // ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT\n 'line_height' => 0, // Set to 0 to use the largest line height (not a good idea)\n 'v_align' => VALIGN_TOP, // VALIGN_TOP, VALIGN_CENTER, VALIGN_BOTTOM\n 'leading' => 0,\n 'show_3dots' => true,\n // Features\n 'outlines' => array(), // Outlines: array(weight, color)\n // Word wrap\n 'force_word_wrap' => true, // If a word is too long, you can force it to wrap\n // However, to do this, it will imagettfbbox() every character\n 'cutoff_word_wrap' => false, // Instead of wrapping, cut off the text\n 'word_wrap_hyphen' => '-', // When a word is force wrapped, this character will be appended\n 'aggressive_word_wrap' => false, // Aggressive word wrapping will force a wrap if too much of a line is\n // left blank (aggressive_word_wrap_amt) - great for Chinese and other\n // languages where words are characters, but not for other languages\n 'aggressive_word_wrap_amt' => .03, // If aggressive forced word wrapping is enabled, this is the \n // maximum percent width of a line that may be left blank\n );\n \n // \"Named arguments\"\n extract($default_opt);\n extract($opt);\n \n // Use mb_string?\n if ($use_mbstring) {\n if (!extension_loaded(\"mbstring\")) {\n throw new Exception(\"The mbstring module is not loaded\");\n }\n \n $F_strlen = \"mb_strlen\";\n $F_substr = \"mb_substr\";\n } else {\n $F_strlen = \"strlen\";\n $F_substr = \"substr\";\n }\n \n // Check input\n if ($v_align != VALIGN_TOP && $v_align != VALIGN_MIDDLE && $v_align != VALIGN_BOTTOM) {\n throw new Exception(\"Unknown vertical alignment passed\");\n }\n if ($align != ALIGN_LEFT && $align != ALIGN_CENTER && $align != ALIGN_RIGHT) {\n throw new Exception(\"Unknown horizontal alignment passed\");\n }\n if (count($outlines) > 0 && !is_array($outlines[0])) {\n throw new Exception(\"The outline argument uses nested arrays\");\n }\n \n // Adds support for manual line breaks\n $text_lines = explode(\"\\n\", $text); \n \n $lines = array(); // Stores each line\n $line_widths = array(); // Stores how wide each line is, for alignment calculation\n $line_heights = array(); // Stores how tall each line is, for alignment calculation\n \n $largest_line_height = 0; // Auto-detected line height\n \n // First, go through all the lines\n for ($l = 0; $l < count($text_lines); $l++) {\n $block = $text_lines[$l];\n $words = explode($space_char, $block);\n \n $buffer = ''; // Stores the current line that's been checked to be <= $width\n $buffer_width = 0; // Width corresponding to the buffer\n $buffer_height = 0; // Height corresponding to the buffer\n $test_word = ''; // Current word being 'tested'\n $test_buffer = ''; // Contains the current line that's being tested, that's not guaranteed to be <= $width\n $test_width = 0;\n $test_height = 0;\n \n // Iterate through all the words\n for ($w = 0; $w <= count($words); $w++) {\n $test_word = isset($words[$w])?$words[$w]:'';\n $test_buffer = $buffer.($buffer == \"\" ? \"\" : \" \").$test_word;\n \n $bbox = imagettfbbox($size, 0, $fontfile, $test_buffer);\n $test_width = $bbox[2]-$bbox[0];\n $test_height = $bbox[1]-$bbox[7];\n \n // For auto line height detection\n if ($test_height > $largest_line_height) {\n $largest_line_height = $test_height;\n }\n \n // Tested line is too long, meaning the buffer is what we want as a new line\n // OR we're on the last word\n if ($test_width > $width || $w == count($words)) {\n // Slightly (but not much) smarter word wrapping\n if ($aggressive_word_wrap && !empty($buffer) && $w != count($words)) {\n if ($buffer_width < $width-($aggressive_forced_wrap_amt*$width)) {\n $buffer = \"\"; // Forces word wrapping\n }\n }\n \n // This single word line is already too long by itself\n // We can force a word wrap\n if (empty($buffer)) {\n // Cut this word into two chunks to force it to wrap\n if ($force_word_wrap) {\n $test_length = $F_strlen($test_buffer);\n \n $c_buffer_width = 0;\n $c_buffer_height = 0;\n $c_test_buffer = '';\n $c_test_width = 0;\n $c_test_height = 0;\n \n // Iterate through all the characters\n for ($c = 0; $c < $test_length; $c++) { \n $c_test_buffer = trim($F_substr($test_buffer, 0, $c+1), $space_char).$word_wrap_hyphen;\n \n $bbox = imagettfbbox($size, 0, $fontfile, $c_test_buffer);\n $c_test_width = $bbox[2]-$bbox[0];\n $c_test_height = $bbox[1]-$bbox[7];\n \n // For auto line height detection\n if ($c_test_height > $largest_line_height) {\n $largest_line_height = $c_test_height;\n }\n \n if ($c_test_width > $width) {\n $c_buffer = $F_substr($test_buffer, 0, $c).$word_wrap_hyphen;\n if (empty($c_buffer)) { // $width too small\n throw new Exception(\"Width $width is too small; increase it or disable forced word wrapping\");\n } else {\n $lines[] = $c_buffer; // Add the line\n \n // Needed for alignment\n $line_widths[] = $c_buffer_width;\n $line_heights[] = $c_buffer_height;\n \n if (!$cutoff_word_wrap) {\n // Add the rest as a new word\n $words[$w--] = $F_substr($test_buffer, $c);\n }\n \n // Stop calculating lines if we've already reached max height\n if ($height > 0 && ($line_height > 0 ? count($lines)*$line_height : array_sum($line_heights)) > $height) {\n break 2;\n }\n \n break;\n }\n } else {\n $c_buffer_width = $c_test_width;\n $c_buffer_height = $c_test_height;\n }\n }\n // Or we don't\n } else {\n $lines[] = $test_buffer; // Add the buffer to the list of lines\n $buffer = \"\";\n \n // Needed for alignment\n $line_widths[] = $test_width;\n $line_heights[] = $test_height;\n \n // Stop calculating lines if we've already reached max height\n if ($height > 0 && ($line_height > 0 ? count($lines)*$line_height : array_sum($line_heights)) > $height) {\n break; \n }\n }\n // Line fits well\n } else {\n $lines[] = $buffer; // Add the buffer to the list of lines\n $buffer = \"\";\n $w--;\n \n // Needed for alignment\n $line_widths[] = $buffer_width;\n $line_heights[] = $buffer_height;\n \n // Stop calculating lines if we've already reached max height\n if ($height > 0 && ($line_height > 0 ? count($lines)*$line_height : array_sum($line_heights)) > $height) {\n break; \n }\n }\n // Still not long enough... let's try again\n } else {\n $buffer = $test_buffer;\n $buffer_width = $test_width;\n $buffer_height = $test_height;\n }\n }\n }\n \n // No line height given, so we will use our auto-detected line height for it\n if ($line_height == 0) {\n $line_height = $largest_line_height;\n }\n \n // Add leading to the line height\n $line_height += $leading;\n \n // Number of lines and total height used for vertical\n // alignment and for the returned value\n $max_lines = $height > 0 ? floor($height/$line_height) : count($lines);\n $drawn_lines = count($lines) < $max_lines ? count($lines) : $max_lines;\n $total_height = $drawn_lines * $line_height;\n\t\n if (($show_3dots) && ($drawn_lines != count($lines))) {\n $lines[$max_lines - 1] = trim($lines[$max_lines - 1], \" .\\n\\r\").\"...\";\n }\n\t\n $top_shift = 0;\n $left_shift = 0;\n \n // Slightly adjust position based on the first line\n $first_line_bbox = imagettfbbox($size, 0, $fontfile, $lines[0]);\n \n // Vertical alignment\n if ($height != 0) {\n // Make sure the first line fits correctly;\n $first_line_offset = $line_height-$line_heights[0];\n \n if ($v_align == VALIGN_TOP) {\n $top_shift += abs($first_line_bbox[7])-$line_height;\n } else if ($v_align == VALIGN_MIDDLE) {\n $top_shift += ($height-$total_height-$first_line_offset)/2;\n } else if ($v_align == VALIGN_BOTTOM) {\n $top_shift += ($height-$total_height-$first_line_offset);\n }\n }\n \n // Draw iterations, used for outlines\n $draw_iterations = array_merge($outlines, array(array(0, $color)));\n \n // Orientation\n if ($orientation[1] == ORIENTATION_LEFT) {\n $orient_left = 0;\n } else if ($orientation[1] == ORIENTATION_RIGHT) {\n $orient_left = $width;\n } else if ($orientation[1] == ORIENTATION_CENTER) {\n $orient_left = $width/2;\n } else {\n $orient_left = intval($orientation[1]);\n }\n \n if ($orientation[0] == ORIENTATION_TOP) {\n $orient_top = 0;\n } else if ($orientation[0] == ORIENTATION_BOTTOM) {\n $orient_top = $height;\n } else if ($orientation[0] == ORIENTATION_CENTER) {\n $orient_top = $height/2;\n } else {\n $orient_top = intval($orientation[0]);\n }\n \n // Go through each draw iteration\n foreach ($draw_iterations as $draw) {\n list($weight, $color) = $draw;\n \n // Go through each X and Y to draw the outline :/\n // Not the world's most efficient method...\n for ($leftc = $left-$weight; $leftc <= $left+$weight; $leftc++) {\n for ($topc = $top-$weight; $topc <= $top+$weight; $topc++) {\n // Now go through and print all the lines\n for ($l = 0; $l < $drawn_lines; $l++) {\n $line = $lines[$l];\n \n $top_offset = 0;\n $left_offset = 0;\n \n // Horizontal alignment, more accurate than the vertical\n // alignment we have above\n if ($align == ALIGN_LEFT) {\n $left_offset = -$first_line_bbox[0];\n } else if ($align == ALIGN_CENTER) {\n $left_offset = ($width-$line_widths[$l])/2;\n } else if ($align == ALIGN_RIGHT) {\n $left_offset = ($width-$line_widths[$l]);\n }\n \n // Where we'll be drawing it\n $x = $leftc+$left_offset+$left_shift;\n $y = $topc+$top_offset+$top_shift+$line_height+($line_height*$l);\n \n // We need to figure the position if the angle is not zero\n if ($indent_for_angle && ($angle != 0 || $orient_left != 0 || $orient_top != 0)) {\n // Translate the point\n $x -= $left+$orient_left;\n $y -= $top+$orient_top;\n $new_x = $x*cos(-$angle*M_PI/180)-$y*sin(-$angle*M_PI/180);\n $new_y = $x*sin(-$angle*M_PI/180)+$y*cos(-$angle*M_PI/180);\n $x = $new_x+$left;\n $y = $new_y+$top;\n }\n imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $line);\n }\n }\n }\n }\n return $total_height; // Total height\n}", "title": "" }, { "docid": "44f99ce5c9739f27b8641adb739dda82", "score": "0.47945106", "text": "function zoomimage_deleteData($vPageID) {\n\timage_deleteData($vPageID);\n}", "title": "" }, { "docid": "e1e2752b8ffd94f4d38c576fb1e1c373", "score": "0.479177", "text": "public function destroy($id)\n {\n //\n Image::destroy($id);\n }", "title": "" }, { "docid": "0744113a1d012fa89c86d790c8e70cf7", "score": "0.4783718", "text": "public function removeImage()\n {\n if ( ! empty($this->image) && ! empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "7306cc0573ffb039122c4ec27292adb4", "score": "0.4777669", "text": "private static function _cleanup(){\n\n }", "title": "" }, { "docid": "ca3470dd4d99ff4555396814de0bb648", "score": "0.47768062", "text": "function de_space()\n\t{\n \t$it = $this->get_first_item(DE);\n \t$max = 0;\n \tif ($it == null)\n \t\treturn 0;\n \tdo\n \t{ // go through all items\n \t\tif ($it == null)\n \t\t\tbreak;\n $rows = 0;\n \tif (in_array($it->get_type(), array(LINE, RECT, IMAGE)))\n \t{ // graphic element found\n if ($it->get_type() == LINE)\n {\n $y_h = max($it->get_fieldlength(), $it->get_ypos());\n $max = max($y_h, $max);\n }\n else\n { // for rect and image\n $max = max($max, $it->get_fieldlength() + $it->get_ypos() + 3.0);\n }\n continue; // max height of graphic element is included\n }\n switch ($it->get_type())\n {\n \tcase STR:\n \t\t$r = trim($it->get_string()); // get Item values\n break;\n \tcase TERM:\n \tcase TEXT:\n \t\t$r = trim($this->calculate_function($it));\n break;\n \tcase DB:\n $r = trim($this->f[$it->get_string()]); // get Item values\n break;\n \tdefault:\n \t\tbreak;\n }\n\t\t\t$fl = $it->get_fieldlength();\n\t \t$fs = $it->get_fontsize();\n list($fl,$mode) = sscanf($fl,\"%d%s\"); // part justification\n if (strlen($r) > $fl)\n { // need wordwrap\n \t$fh = str_repeat(\"w\", (int)$fl); // get the width of the item\n \t$this->set_font($it->get_fontname(), $fs);\n \t$fspix = $this->pdf->GetStringWidth($fh);\n\t\t\t\twhile ($r != \"\")\n\t\t\t\t{\n\t\t\t\t\t$r2 = $this->pdf->CalcTextWrap($r, $fspix, true);\n\t\t\t\t\t$r = $r2[1];\n\t\t\t\t\t$rows++;\n\t\t\t\t}\n\t \t\t$rows --;\n \t}\n\t \t\t$rows ++;\n \t$height = $rows * $fs; // height = number of lines * fontsize + distance\n \t$max = max($max, $height); // $max is greatest height of an item\n \t}\n \twhile ($it = $this->get_next_item(DE));\n \t$it = $this->get_first_item(DE);\n \tif ($it == null)\n \t\treturn 0; // no items\n\t\treturn $max;\n\t}", "title": "" }, { "docid": "ff1587ef150c614c90938270678eed0a", "score": "0.47674522", "text": "abstract public function destroy();", "title": "" }, { "docid": "ec03678f236731acd54b76b841672395", "score": "0.4766361", "text": "function imagettftextjustified($image, $size, $x, $y, $color, $fontfile, $text){\n\t\t$rect = imagettfbbox($size, 0, $fontfile, \"Tq\");\n\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\t\t$h1 = $maxY - $minY;\n\n\t\t// Get height of two lines\n\t\t$rect = imagettfbbox($size, 0, $fontfile, \"Tq\\nTq\");\n\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); \n\t\t$h2 = $maxY - $minY;\n\n\t\t// amount of padding that should be between each line\n\t\t$vpadding = $h2 - $h1 - $h1;\n\n\t\t// calculate the dimensions of the text itself\n\t\t$frect = imagettfbbox($size, 0, $fontfile, $text);\n\t\t$minX = min(array($frect[0],$frect[2],$frect[4],$frect[6]));\n\t\t$maxX = max(array($frect[0],$frect[2],$frect[4],$frect[6]));\n\t\t$text_width = $maxX - $minX;\n\n\t\t// left align any line whose whitespace accounts \n\t\t// for this much (percent) of the the line.\n\t\t$max_whitespace_pct = 70;\n\n\t\t$threshold = $text_width / 100 * $max_whitespace_pct;\n\t\t$lines = explode(\"\\n\", $text);\n\t\tforeach($lines as $line){\n\t\t\t$rect = imagettfbbox($size, 0, $fontfile, $line);\n\t\t\t$minX = min(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t$maxX = max(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t$minY = min(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\t\t\t$maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7]));\n\n\t\t\t$line_width = $maxX - $minX;\n\t\t\t$line_height = $maxY - $minY; \n\n\t\t\t$words = explode(\" \", $line);\n\t\t\t$word_width = 0;\n\t\t\t$word_data = array();\n\t\t\tforeach($words as $word){\n\t\t\t\t$rect = imagettfbbox($size, 0, $fontfile, $word);\n\t\t\t\t$minX = min(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t\t$maxX = max(array($rect[0],$rect[2],$rect[4],$rect[6]));\n\t\t\t\t$width = $maxX - $minX;\n\t\t\t\t$word_width += $width;\n\t\t\t\t$word_data[] = array(\n\t\t\t\t\t\"width\" => $width,\n\t\t\t\t\t\"word\" => $word\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$available_space = $text_width - $word_width;\n\t\t\t$_x = $x;\n\t\t\tif($threshold > $available_space && count($words) > 1){\n\t\t\t\t$total_spaces = count($words) - 1;\n\t\t\t\t$space_size = $available_space / $total_spaces;\n\t\t\t\tforeach($word_data as $word){\n\t\t\t\t\timagettftext($image, $size, 0, $_x, $y, $color, $fontfile, $word['word']);\n\t\t\t\t\t$_x += ($space_size + $word['width']);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\timagettftext($image, $size, 0, $_x, $y, $color, $fontfile, $line);\n\t\t\t}\n\t\t\t$y += ($line_height + $vpadding);\n\t\t}\n\t\treturn $frect;\n\t}", "title": "" }, { "docid": "c451224f3d569016ceb9c7f582e920f8", "score": "0.47624052", "text": "public function clear(){\n\t\t$this->inside->clear();\n\t\t$this->rendered = '';\n\t}", "title": "" }, { "docid": "f7a06af7e348ceae4eca3f0590ebedc9", "score": "0.47620848", "text": "private function free(): void\n {\n $this->body->setContent(null);\n }", "title": "" }, { "docid": "d6177c8f6d89a6b1b1a2658e2d9b319e", "score": "0.47617778", "text": "public function destroy($id)\n\t{\n $image = Background::find($id);\n $image->delete();\n\t}", "title": "" }, { "docid": "23cb7ebf76996ccac10da453689158c1", "score": "0.4761706", "text": "public function getImageGeometry();", "title": "" }, { "docid": "89d1995d2b70b287ff4a40f54b972101", "score": "0.47590718", "text": "public abstract function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.47548482", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.47548482", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.47548482", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.47548482", "text": "public function destroy();", "title": "" }, { "docid": "0b9f8c389bd09ee7f7f135d3b53767dc", "score": "0.47502404", "text": "public function destroy(Image $image)\n {\n Storage::disk('local')->delete($image->src);\n $image->delete();\n return ['error' => false,'message' => 'Fotka smazána!'];\n }", "title": "" }, { "docid": "1b8f89877b161ef5587bbeb13093525d", "score": "0.4746988", "text": "private function error($text, $width = 100, $height = 100) {\n $image = new Imagick();\n $draw = new ImagickDraw();\n $color = new ImagickPixel('#000000');\n $background = new ImagickPixel('white'); // Transparent\n\n /* Font properties */\n //$draw->setFont('Arial');\n $draw->setFontSize(15);\n $draw->setFillColor($color);\n $draw->setStrokeAntialias(true);\n $draw->setTextAntialias(true);\n\n /* Get font metrics */\n $metrics = $image->queryFontMetrics($draw, $text);\n\n /* Create text */\n $draw->annotation(0, $metrics['ascender'], $text);\n\n /* Create image */\n $image->newImage($width, $height, $background);\n $image->setImageFormat('jpeg');\n //$image->drawImage($draw);\n $draw->setGravity (Imagick::GRAVITY_CENTER);\n $image->annotateImage($draw, 0, 0, 0, $text);\n \n header(\"Content-type: image/jpeg\");\n \n echo $image;\n return;\n }", "title": "" }, { "docid": "9c436c0cf3d696d059212231164cc808", "score": "0.47384086", "text": "public function text_bitmap($text)\n\t{\n\t\t$text=$this->filter_text($text);\n\t\t$height=$this->ascii_table->dimensions[1];\n\t\t$width =$this->ascii_table->dimensions[2];\n\n\t\t$size=$this->text_size($text);\n\t\t$result=new Bitmap($size[0],$size[1]);\n\t\t$baseY=$baseX=0;\n\t\tfor ($index=0;$index<strlen($text);++$index)\n\t\t{\n\t\t\tif ($text[$index]==PHP_EOL)\n\t\t\t{\n\t\t\t\t$baseY+=$height;\n\t\t\t\t$baseX=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// $ascii_entry=$this->ascii_table[ord($text[$index])];\n\t\t\t$ascii_entry=ord($text[$index]);\n\t\t\tfor ($j=0;$j<$height;++$j)\n\t\t\t{\n\t\t\t\tfor ($i=0;$i<$width;++$i)\n\t\t\t\t\t$result->set($baseY+$j,$baseX+$i, ~$this->ascii_table->get($ascii_entry,$j,$i));\n\t\t\t\t\t// $result[$baseY+$j][$baseX+$i]=$ascii_entry[$j][$i];\n\t\t\t\t$result->set($baseY+$j,$baseX+$width,0); //space between chars\n\t\t\t}\n\t\t\t$baseX+=$width;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4ab9c4a8a519e6ed6185f5b471d8b85d", "score": "0.47327888", "text": "abstract public function cleanup();", "title": "" }, { "docid": "4ab9c4a8a519e6ed6185f5b471d8b85d", "score": "0.47327888", "text": "abstract public function cleanup();", "title": "" }, { "docid": "3ee5ac4d20f2981886d88c0cc00c07c8", "score": "0.47295594", "text": "public function clearTransformation();", "title": "" }, { "docid": "cc8e2331ac4564c6edc79724241a2467", "score": "0.47292602", "text": "public function deleteimage($image){\n $image_path = \"assets/img/\".$image->name; // Value is not URL but directory file path\n if(File::exists($image_path)) {\n File::delete($image_path);\n }\n }", "title": "" }, { "docid": "ad535ca5836226eca8b813603c82b746", "score": "0.472483", "text": "protected Function __destroy_source(Pitlib_Tmp $tmp) {\n return DestroyMagickWand($tmp->source);\n }", "title": "" }, { "docid": "e14cbec4805764c2fd2dc4ee20ab3866", "score": "0.47081184", "text": "function cvg_deactivate_empty() {\r\r\n\t\t\t\r\r\n\t\t}", "title": "" }, { "docid": "a63202ca5a245bf4043e5b4d46b294b0", "score": "0.47052243", "text": "function nosizetags($text) {\n\t\t$text = preg_replace('/ height=\\\"([^\\\"]*)\\\"/si', '', $text);\n\n\treturn $text;\n}", "title": "" }, { "docid": "fc9332069fb7fd0161d199e76b0cc53f", "score": "0.47025365", "text": "public function destroy($id)\n {\n $feature = Feature::findOrFail($id);\n //image inline with this organisation\n $Path = public_path().\"/assets/organisation/img/website/features/\";\n\n $Image = $Path. $feature->image;\n\n if(file_exists($Image)){\n @unlink($Image);\n }\n $feature->delete();\n }", "title": "" }, { "docid": "7c425e5853eab4c32bafa6d7e070d6fd", "score": "0.46999577", "text": "public function clearPalettes();", "title": "" }, { "docid": "c822675a79dd6439d845b3665794593a", "score": "0.46984446", "text": "public function generateCaptchaImage() {\n if($this->intMaxWidth == 0 || $this->intMaxWidth > 500)\n $intWidth = 200;\n else\n $intWidth = $this->intMaxWidth;\n\n if($this->intMaxHeight == 0 || $this->intMaxHeight > 500)\n $intHeight = 50;\n else\n $intHeight = $this->intMaxHeight;\n\n\n $intMinfontSize = 15;\n $intMaxFontSize = 22;\n $intWidthPerChar = 30;\n $strCharsPossible = \"abcdefghijklmnpqrstuvwxyz123456789\";\n $intHorizontalOffset = 10;\n $intVerticalOffset = 10;\n $intForegroundOffset = 2;\n\n $strCharactersPlaced = \"\";\n\n //init the random-function\n srand((double)microtime() * 1000000);\n\n\n //create a blank image\n $objImage = new class_image();\n $objImage->setIntHeight($intHeight);\n $objImage->setIntWidth($intWidth);\n $objImage->createBlankImage();\n //create a white background\n $intWhite = $objImage->registerColor(255, 255, 255);\n $intBlack = $objImage->registerColor(0, 0, 0);\n $objImage->drawFilledRectangle(0, 0, $intWidth, $intHeight, $intWhite);\n\n //draw vertical lines\n $intStart = 5;\n while($intStart < $intWidth - 5) {\n $objImage->drawLine($intStart, 0, $intStart, $intWidth, $this->generateGreyLikeColor($objImage));\n $intStart += rand(10, 17);\n }\n //draw horizontal lines\n $intStart = 5;\n while($intStart < $intHeight - 5) {\n $objImage->drawLine(0, $intStart, $intWhite, $intStart, $this->generateGreyLikeColor($objImage));\n $intStart += rand(10, 17);\n }\n\n //draw floating horizontal lines\n for($intI = 0; $intI <= 3; $intI++) {\n $intXPrev = 0;\n $intYPrev = rand(0, $intHeight);\n while($intXPrev <= $intWidth) {\n $intNewX = rand($intXPrev, $intXPrev + 50);\n $intNewY = rand(0, $intHeight);\n $objImage->drawLine($intXPrev, $intYPrev, $intNewX, $intNewY, $this->generateGreyLikeColor($objImage));\n $intXPrev = $intNewX;\n $intYPrev = $intNewY;\n }\n }\n\n //calculate number of characters on the image\n $intNumberOfChars = floor($intWidth / $intWidthPerChar);\n\n //place characters in the image\n for($intI = 0; $intI < $intNumberOfChars; $intI++) {\n //character to place\n $strCurrentChar = $strCharsPossible[rand(0, (uniStrlen($strCharsPossible) - 1))];\n $strCharactersPlaced .= $strCurrentChar;\n //color to use\n $intCol1 = rand(0, 200);\n $intCol2 = rand(0, 200);\n $intCol3 = rand(0, 200);\n $strColor = \"\" . $intCol1 . \",\" . $intCol2 . \",\" . $intCol3;\n $strColorForeground = \"\" . ($intCol1 + 50) . \",\" . ($intCol2 + 50) . \",\" . ($intCol3 + 50);\n //fontsize\n $intSize = rand($intMinfontSize, $intMaxFontSize);\n //calculate x and y pos\n $intX = $intHorizontalOffset + ($intI * $intWidthPerChar);\n $intY = $intHeight - rand($intVerticalOffset, $intHeight - $intMaxFontSize);\n //the angle\n $intAngle = rand(-30, 30);\n //place the background character\n $objImage->imageText($strCurrentChar, $intX, $intY, $intSize, $strColor, \"dejavusans.ttf\", false, $intAngle);\n //place the foreground charater\n $objImage->imageText($strCurrentChar, $intX + $intForegroundOffset, $intY + $intForegroundOffset, $intSize, $strColorForeground, \"dejavusans.ttf\", false, $intAngle);\n }\n\n //register placed string to session\n class_carrier::getInstance()->getObjSession()->setCaptchaCode($strCharactersPlaced);\n\n //and send it to the browser\n //$objImage->saveImage(\"/test.jpg\");\n //echo \"<img src=\\\"\"._webpath_.\"/test.jpg\\\" />\";\n $objImage->setBitNeedToSave(false);\n\n //force no-cache headers\n class_response_object::getInstance()->addHeader(\"Expires: Thu, 19 Nov 1981 08:52:00 GMT\", true);\n class_response_object::getInstance()->addHeader(\"Cache-Control: no-store, no-cache, must-revalidate, private\", true);\n class_response_object::getInstance()->addHeader(\"Pragma: no-cache\", true);\n\n $objImage->sendImageToBrowser(70);\n $objImage->releaseResources();\n }", "title": "" }, { "docid": "dd155eed01d5694b7bd3517a1bc143c2", "score": "0.4693864", "text": "function remove_image_resize() {\n delete_option('image_resize_data');\n}", "title": "" }, { "docid": "9c69b25240470a2876f70e15103d55d7", "score": "0.46912894", "text": "function delete_image($file){\n\n if (file_exists($file)) {\n \n unlink($file);\n }\n}", "title": "" }, { "docid": "0c742ae073fcd9f4b151d0c4afa3ad7c", "score": "0.4687721", "text": "public function text($text, $height, $fontfile, $rotate, $color, $bgcolor, $fontsize=30) {\n\t\tif (!$fontsize) $fontsize = 30; // Big font size, sharp image\n\t\tif ($color != $bgcolor){\n\t\t\t$color = $this->html2rgb($color);\n\t\t\t$colorb = $this->html2rgb((($bgcolor) ? $bgcolor : '000000'));\n\t\t} else {\n\t\t\t$color = $this->html2rgb($color);\n\t\t\tforeach ($color as $i => $c) $colorb[$i] = ($c > 128) ? 0 : 255;\n\t\t}\n\t\t// Get the boundingbox from imagettfbbox(), and remove whitespace to get the correct dimensions\n\t\tif (function_exists('imagettfbbox')) {\n\t\t\t$rect = imagettfbbox($fontsize, 0, $fontfile, $text);\n\t\t} else {\n\t\t\t// Image Preview not available!! Need GD + FreeType installed!!\n\t\t\t$rect = false;\n\t\t}\n\t\tif (!$rect) return false;\n\t\t$min_x = min(array($rect[0], $rect[2], $rect[4], $rect[6]));\n\t\t$max_x = max(array($rect[0], $rect[2], $rect[4], $rect[6]));\n\t\t$min_y = min(array($rect[1], $rect[3], $rect[5], $rect[7]));\n\t\t$max_y = max(array($rect[1], $rect[3], $rect[5], $rect[7]));\n\t\t$w = ($max_x - $min_x);\n\t\t$h = ($max_y - $min_y);\n\t\t$left = abs($min_x) + $w;\n\t\t$top = abs($min_y) + $h;\n\t\t$img = @imagecreatetruecolor($w << 2, $h << 2);\n\t\t$white = imagecolorallocate($img, 255, 255, 255);\n\t\t$black = imagecolorallocate($img, 0, 0, 0);\n\t\timagefilledrectangle($img, 0, 0, imagesx($img), imagesy($img), $black);\n\t\tif (!imagettftext($img, $fontsize, 0, $left, $top, $white, $fontfile, $text)) $this->printErrorImage(\"Error with ImageTtfText(img, $fontsize, 0, $left, $top, $white, $fontfile, $text)\");\n\t\t// start scanning (0=> black => empty)\n\t\t$rleft = $w4 = $w<<2;\n\t\t$rtop = $h4 = $h<<2;\n\t\t$rright = $rbottom = 0;\n\t\tfor($x = 0; $x < $w4; $x++) for($y = 0; $y < $h4; $y++) if (imagecolorat( $img, $x, $y )) {\n\t\t\t$rleft = min($rleft, $x);\n\t\t\t$rright = max($rright, $x);\n\t\t\t$rtop = min($rtop, $y);\n\t\t\t$rbottom = max($rbottom, $y);\n\t\t}\n\t\t$this->image = @imagecreatetruecolor($rright - $rleft + 1, $rbottom - $rtop + 1);\n\t\t// Get and set background Color\n\t\tif ($bgcolor) {\n\t\t\t$colorb = imagecolorallocate($this->image, $colorb[0], $colorb[1], $colorb[2]);\n\t\t} else {\n\t\t\t$colorb = imagecolorallocatealpha($this->image, 254, 254, 254, 127);\n\t\t}\n\t\tif ($colorb === false) $this->printErrorImage(\"Error with imagecolorallocate (Text Background)\");\n\t\tif (!imagefill($this->image,0,0,$colorb)) $this->printErrorImage(\"Error with imageFill(image,0,0, $colorb)\");\n\t\t// Make background Transparent\n\t\tif (!$bgcolor && !imagecolortransparent($this->image, $colorb)) $this->printErrorImage(\"Error with imageColorTransparent(image, $colorb)\");\n\t\t// Print the Text\n\t\t$textcolor = imagecolorallocate($this->image, $color[0], $color[1], $color[2]);\n\t\tif ($textcolor === false) $this->printErrorImage(\"Error with imagecolorallocate(image, \".$color[0].\", \".$color[1].\", \".$color[2].\")\");\n\t\tif (!imagettftext($this->image, $fontsize, 0, $left - $rleft, $top - $rtop, $textcolor, $fontfile, $text)) $this->printErrorImage(\"Error with ImageTtfText(img, $fontsize, 0, \".($left - $rleft).\", \".($top - $rtop).\", $textcolor, $fontfile, $text)\");\n\t\t// Scale the image to exact dimentions\n\t\tif ($height) {\n\t\t\t$width = ($height / ($rbottom - $rtop + 1)) * ($rright - $rleft + 1);\n\t\t\t$img = $this->image;\n\t\t\t$this->image = @imagecreatetruecolor($width, $height);\n\t\t\tif (!imagefill($this->image,0,0,$colorb)) $this->printErrorImage(\"Error with imageFill(image,0,0, $colorb)\");\n\t\t\tif (!$bgcolor && !imagecolortransparent($this->image, $colorb)) $this->printErrorImage(\"Error with imageColorTransparent(image, $colorb)\");\n\t\t\tif (!imagecopyresampled($this->image,$img,0,0,0,0,$width,$height,($rright - $rleft + 1),($rbottom - $rtop + 1))) $this->printErrorImage(\"Error in ImageText:\\n ImageCopyResampled(image, $img, 0,0,0,0, $width, $height, \".($rright - $rleft + 1).\", \".($rbottom - $rtop + 1).\") Failed!!!\");\n\t\t}\n\t\t$this->info['width'] = imagesx($this->image);\n\t\t$this->info['height'] = imagesy($this->image);\n\t\timagedestroy($img);\n\t\tif ($rotate) $this->rotate($rotate);\n }", "title": "" }, { "docid": "ba8478891d4867d2981c236275d4a425", "score": "0.4686774", "text": "function RemoveImage()\n\t{\n\n\t\t//Ambil token foto\n\t\t$token = $this->input->post('token');\n\n\t\t$data = array(\n\t\t\t'token' => $token\n\t\t);\n\n\t\tif ($result = $this->M_gallery->getImage($data)) {\n\n\t\t\t$filename = $result[0]['file_name'];\n\t\t\t$path = str_replace(\"index.php\", \"\", $_SERVER['SCRIPT_NAME']);\n\t\t\t$file = $_SERVER['CONTEXT_DOCUMENT_ROOT'] . $path . 'assets/images/' . $filename;\n\n\n\n\t\t\t$this->M_gallery->removeImage($data);\n\t\t\tif (file_exists($file)) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t\t// }\n\t\t\t// echo $file;\n\t\t}\n\t\techo \"{}\";\n\t}", "title": "" }, { "docid": "3a538395f4af193fe7992c44269d49d7", "score": "0.46859026", "text": "function vvcode_render_code($code) {\r\n if (!empty($code)) {\r\n $imwidth=200;\r\n $imheight=40;\r\n $font_size = $imheight * 0.65;\r\n $font_position = $imheight * 0.30;\r\nheader('Content-Type: image/jpeg');\r\n$im = @ImageCreate ($imwidth, $imheight) or die (\"Cannot Initialize new GD image stream\");\r\n$background_color = ImageColorAllocate ($im, 255,255,255);\r\n $text_color = ImageColorAllocate ($im, 20,40,100);\r\n $border_color = ImageColorAllocate ($im, 0,0,0);\r\n $noise_color = ImageColorAllocate($im, 200, 200, 200);\r\n \r\n /* generate random dots in background */\r\n for( $n=0; $n<($imwidth*$imheight)/3; $n++ ) {\r\n imagefilledellipse($im, mt_rand(0,$imwidth), mt_rand(0,$imheight), 1, 1, $noise_color);\r\n }\r\n /* generate random lines in background */\r\n for( $n=0; $n<($imwidth*$imheight)/150; $n++ ) {\r\n imageline($im, mt_rand(0,$imwidth), mt_rand(0,$imheight), mt_rand(0,$imwidth), mt_rand(0,$imheight), $noise_color);\r\n }\r\n \r\n //strip any spaces that may have crept in\r\n //end-user wouldn't know to type the space! :)\r\n $code = str_replace(\" \", \"\", $code);\r\n $x=0;\r\n\r\n $stringlength = strlen($code);\r\n\r\n for ($i = 0; $i< $stringlength; $i++) {\r\n $x = $x + $font_size;\r\n $y = $font_position;\r\n $font = ImageLoadFont(\"/usr/share/IXcore/catalog/includes/fonts/automatic.gdf\");\r\n $single_char = substr($code, $i, 1);\r\n imagechar($im, $font, $x, $y, $single_char, $text_color);\r\n }\r\n\r\n\r\n imagerectangle ($im, 0, 0, $imwidth-1, $imheight-1, $border_color);\r\n ImageJpeg($im);\r\n ImageDestroy;\r\n }\r\n }", "title": "" }, { "docid": "9a7ce90872faba3022251f4fbb0e9a71", "score": "0.46850505", "text": "public function crop();", "title": "" }, { "docid": "bf789d1de84aa0261a84bbaaba729c85", "score": "0.46834376", "text": "public function destroy(Image $id)\n {\n $image = Image::find($id);\n $image->delete();\n }", "title": "" }, { "docid": "ab7c7d534cf490527595a752fe677186", "score": "0.46728796", "text": "function textImage($image, $textSize, $textColor, $textFont, $text, $textH){\n\t\t//Tamanho do texto\n\t\t$textWidth = getTextWidth($textSize, $textFont, $text);\n\n\t\t//Tamanho horizontal da imagem\n\t\t$imageWidth = imagesx($image);\n\n\t\t//Posição x do texto\n\t\t$textX = ($imageWidth / 2) - ($textWidth / 2);\n\n\t\t//Coloca o texto na imagem\n\t\timagettftext($image, $textSize, 0, $textX, $textH, $textColor, $textFont, $text);\n\t}", "title": "" }, { "docid": "e6c17836d676ef471e4ea9819dba4f97", "score": "0.46716613", "text": "public function delete() {\n $this->dbHandler->removeNotAnalyzedImgWithUserID($this->imgID, $this->userID);\n $this->deletePhoto();\n }", "title": "" }, { "docid": "2c80a68256e0551c0ef3c806a1457aa6", "score": "0.46673992", "text": "function writeText($image, $x, $y, $text, $angle = 0)\n\t{\n\t\tif ($image->isTrueColor())\n\t\t\t$image->alphaBlending(true);\n\t\t\n\t\t$box = imageftbbox($this->size, $angle, $this->face, $text);\n\t\t$obox = array(\n\t\t\t'left' => min($box[0], $box[2], $box[4], $box[6]),\n\t\t\t'top' => min($box[1], $box[3], $box[5], $box[7]),\n\t\t\t'right' => max($box[0], $box[2], $box[4], $box[6]) - 1,\n\t\t\t'bottom' => max($box[1], $box[3], $box[5], $box[7]) - 1\n\t\t);\n\t\t$obox['width'] = abs($obox['left']) + abs($obox['right']);\n\t\t$obox['height'] = abs($obox['top']) + abs($obox['bottom']);\n\t\t\n\t\t$x = GDImage_Coordinate::fix($x, $image->getWidth(), $obox['width']);\n\t\t$y = GDImage_Coordinate::fix($y, $image->getHeight(), $obox['height']);\r\n\t\t\n\t\t$fixed_x = $x - $obox['left'];\n\t\t$fixed_y = $y - $obox['top'];\n\t\t\n\t\timagettftext($image->getHandle(), $this->size, $angle, $fixed_x, $fixed_y, $this->color, $this->face, $text);\n\t}", "title": "" }, { "docid": "4d156567eb1dd2d5a5bbaa44ec7712db", "score": "0.46664342", "text": "function DegradeImage(& $image )\n\n{\t\n\n\t$im_width = $_SESSION['kk'];\n\n\t$im_height = $_SESSION['kk'];\n\n\tif ($_SESSION['doublewords']=='yes') { $im_width*=2; $im_height*=2; }\n\n\t\n\n\tif ($_SESSION['image_mode']==IMAGE_MODE_INDEXCOLOR)\n\n\t{\n\n\t\timagetruecolortopalette ( $image, false, $_SESSION['nn']+1 );\n\n\t}\n\n\telse\n\n\t{\n\n\t\tfor ($riadok = 0; $riadok < $im_height; $riadok++)\n\n\t\t{\n\n\t\t\tfor ($bod=0; $bod < $im_width; $bod++)\n\n\t\t\t{\n\n\t\t\t\t$farba = imagecolorat ($image, $bod, $riadok);\n\n\t\t\t\t$farba_r = ((($farba >> 16) & 0xFF))>>$_SESSION['cposun'];\n\n\t\t\t\t$farba_g = ((($farba >> 8) & 0xFF))>>$_SESSION['cposun'];\n\t\t\t\t$farba_b = ((($farba >> 0) & 0xFF))>>$_SESSION['cposun'];\n\n\t\t\t\tswitch($_SESSION['image_mode'])\n\n\t\t\t\t{\n\n\t\t\t\t\tcase IMAGE_MODE_GRAYSCALE: {\n\n\t\t\t\t\t\t$farba = (($farba_r)<<(16+$_SESSION['cposun']) ) + (($farba_r)<<(8+$_SESSION['cposun']) ) + ((($farba_r)<<($_SESSION['cposun']))); \n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\t\t\t\t\n\n\t\t\t\t\tcase IMAGE_MODE_FULLCOLOR: {\n\n\t\t\t\t\t\t$farba = (($farba_r)<<(16+$_SESSION['cposun']) ) + (($farba_g)<<(8+$_SESSION['cposun']) ) + ((($farba_b)<<($_SESSION['cposun']))); \n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcase IMAGE_MODE_INDEXCOLOR: {\n\n\t\t\t\t\t\t// ?? este neviem ...\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\t\t\t\t\n\n\t\t\t\t}\n\n\t\t\t\timagesetpixel($image, $bod, $riadok, $farba);\t\t\t\t\n\n\t\t\t}\n\n\t\t}\t\n\n\t}\n\n}", "title": "" }, { "docid": "d1fa130e09f65b3b213e7f9f0e60499e", "score": "0.46549487", "text": "public static function destroy()\n {\n }", "title": "" }, { "docid": "857d1ef28f4103426e624549a3bf82fe", "score": "0.4654325", "text": "function getTexts($image, $textSize, $textFont, $text){\n\t\t//Array com o texto a ser retornado\n\t\t$retorno = array();\n\n\t\t//Tamanho horizontal da imagem\n\t\t$imageWidth = imagesx($image);\n\n\t\t//Explode o texto em array\n\t\t$wordArray = explode(\" \", $text);\n\n\t\t//Frase\n\t\t$phrase = \"\";\n\n\t\t//Passa por cada palavra\n\t\tfor ($i = 0; $i < count($wordArray); $i++) {\n\t\t\t//Concatena formando a frase\n\t\t\t$phrase .= $wordArray[$i].\" \";\n\n\t\t\t//Verifica se o texto esta maior que o limite\n\t\t\tif (getTextWidth($textSize, $textFont, $phrase) > ($imageWidth - 125)){\n\t\t\t\t//Adiciona a frase no retorno\n\t\t\t\tarray_push($retorno, trim($phrase));\n\n\t\t\t\t//Limpa a variável\n\t\t\t\t$phrase = \"\";\n//\t\t\t\t$contador_linhas+=1;\n\t\t\t}\n\t\t}\n\t\t//Adiciona a frase no retorno\n\t\tarray_push($retorno, trim($phrase));\n\n\t\t//Retorna array com os textos\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "921c5bc3e6ff543c804455f5cb37de66", "score": "0.46537453", "text": "public function remove_image_sizes() {\n\t\tremove_image_size( '1536x1536' ); // 2 x Medium Large (1536 x 1536).\n\t\tremove_image_size( '2048x2048' ); // 2 x Large (2048 x 2048).\n\t}", "title": "" }, { "docid": "2b74ac2e4b0272e7824740b8daf6ea67", "score": "0.46529138", "text": "protected function _cleanup() {}", "title": "" } ]
5cf2d23ef8cf1c75293c221f98ffbfe8
Set the Iterator filter.
[ { "docid": "47c27af7502a7d6bdba50112d45d2fb4", "score": "0.7003987", "text": "public function setIteratorFilter($mask = 0, $filter = null)\n {\n $this->_filter = array();\n\n if ($mask) {\n $this->_filter['mask'] = $mask;\n }\n\n if (!is_null($filter)) {\n $rfc822 = new Horde_Mail_Rfc822();\n $this->_filter['filter'] = $rfc822->parseAddressList($filter);\n }\n }", "title": "" } ]
[ { "docid": "6bf3a20056cc8cb9d974f211f2ff5f1c", "score": "0.69990116", "text": "abstract public function setFilters($aFilter);", "title": "" }, { "docid": "c5043cf4b5a7ae4c9924e47794eafcb2", "score": "0.6954877", "text": "public function setFilter($filter = NULL);", "title": "" }, { "docid": "faa47072922c30a5b6f3828c43300c22", "score": "0.685964", "text": "public function setFilter($filter)\n {\n $this->filter = $filter;\n }", "title": "" }, { "docid": "c63aa7870e13d2d6900f40aaa3588e3a", "score": "0.6856619", "text": "public function setFilter(Filter $filter);", "title": "" }, { "docid": "6029038ca1600f4dc6d0b75316787ec2", "score": "0.66230047", "text": "public function setFilter($val)\n {\n $this->_propDict[\"filter\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "f7c92db7a10793e8ab98ed19d7f256e4", "score": "0.6607892", "text": "public function setIterator(SearchIterator $iterator);", "title": "" }, { "docid": "be7723f87a456124e3b32e29dad6bdd3", "score": "0.6552298", "text": "public function setFilter($filter)\r\n\t{\r\n\t\t$validFilters = self::NO_FILTER | self::FILTER_NONE | self::FILTER_SUB | self::FILTER_UP\r\n\t\t| self::FILTER_AVG | self::FILTER_PAETH | self::ALL_FILTERS;\r\n\t\t\t\r\n\t\t$filter = $filter & $validFilters;\r\n\r\n\t\t$this->_filter = (int)$filter;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "a2cbb12a8dc2d4d127728dc560b7c6a7", "score": "0.64527124", "text": "public function setFilter(callable $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "efc3d2423e0dfd4a6fb40cc6d8d05a20", "score": "0.6404455", "text": "public function set_filter($filter)\n {\n if ( ! function_exists($filter)) {\n show_error('The Filter Function <strong>' . $filter . '</strong> Does Not Exists!');\n }\n\n $this->filter = $filter;\n }", "title": "" }, { "docid": "3c14c98629419111158b7bd0e2a932a7", "score": "0.6404454", "text": "public function setFilter(callable $filter): Collection\n {\n $this->filter = $filter;\n return $this;\n }", "title": "" }, { "docid": "9cc98134d42913013d5e3b00f4d537a4", "score": "0.6383063", "text": "function filter($filter)\r\n\t{\r\n\t\t$this->filter = $filter;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "7c6c2222e91a973175207c383a781152", "score": "0.6334663", "text": "public function setFilter($filter)\n { \n $this->_filter = $filter;\n return $this;\n }", "title": "" }, { "docid": "a5692c6d0bc3caba912cd35c71d63c70", "score": "0.6300866", "text": "public function filter (){\n\n $this->filter = array();\n\n }", "title": "" }, { "docid": "fc6f7d6bbe44cc0c1f1c512b8301cdfb", "score": "0.6258103", "text": "public function filter( $filter ) {\n\t\t$this->filter = $filter;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "abac282d76b3748c066ff19a42040da1", "score": "0.6229021", "text": "public function setFilter(\\iRAP\\Ec2Wrapper\\Objects\\AmazonFilter $filter)\n {\n $this->m_filter = $filter;\n }", "title": "" }, { "docid": "e56c52f1f35b1a5608fae8fa20e1dc91", "score": "0.61898685", "text": "public function setClassFilter(\\Closure $filter) {\n\t\t$this->classFilter = $filter;\n\t}", "title": "" }, { "docid": "2d3d0b7c3da9ae7258d9503a331669e5", "score": "0.61541903", "text": "public function setIterator($iterator)\n {\n $this->iterator = $iterator;\n return $this;\n }", "title": "" }, { "docid": "5911d169bae5e6336ffa4c4a4a61f235", "score": "0.6151617", "text": "public function setFilter(array $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "8dc55bfec09b083feffff87ac79613a0", "score": "0.6121728", "text": "public function setFilter($filter)\n {\n $this->filter = $filter;\n return $this;\n }", "title": "" }, { "docid": "d59ec6ff6cbb20f6a9eab72834be5bee", "score": "0.60541743", "text": "public function setFilterSet(FilterSet $filterSet);", "title": "" }, { "docid": "1ffb9edcde05c88287b9755b05bb7ae8", "score": "0.60340625", "text": "public function setFilter($filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "1ffb9edcde05c88287b9755b05bb7ae8", "score": "0.60340625", "text": "public function setFilter($filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "1ffb9edcde05c88287b9755b05bb7ae8", "score": "0.60340625", "text": "public function setFilter($filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "84c9cc2ab61d17ecab7b93158f14bb3c", "score": "0.6015246", "text": "public function setFilter($filter = null)\n {\n if (is_string($filter)) {\n $filter = new P4_File_Filter($filter);\n }\n \n if (!$filter instanceof P4_File_Filter && !is_null($filter)) {\n throw new InvalidArgumentException(\n 'Cannot set filter; argument must be a P4_File_Filter, a string, or null.'\n );\n }\n\n $this->_options[static::QUERY_FILTER] = $filter;\n return $this;\n }", "title": "" }, { "docid": "0089d71633e8432e053b10d338f92f44", "score": "0.60083973", "text": "public function setFilter($filter){\n\t\tif(is_array($filter) && $filter){\n\t\t\tforeach($filter as $field => $params){\n\t\t\t\t$this->_where[$field] = $params;\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9813dfd104f72fe2338fd932021f05c7", "score": "0.60034215", "text": "private function _set_filter($filter = NULL)\n\t{\n\t\tif ( ! is_null($filter))\n\t\t\t$this->{$this->db_group}->where('('.$filter.')');\n\t}", "title": "" }, { "docid": "0d64b3debebcbc9968148fea1705f85b", "score": "0.5998413", "text": "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n }", "title": "" }, { "docid": "6707853a999962800959afff9ad040e8", "score": "0.5976234", "text": "public function filter(Closure $filter)\n {\n $this->filters[] = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "d2dee929c5685d2ce18a0bf6dfe507d2", "score": "0.59751207", "text": "public function setFilters()\n\t{\n\t\t$filters =& $this->conf('filters');\n\t\t$filters = (array) @func_get_args();\n\t}", "title": "" }, { "docid": "b90202fa4ec9c7641b82bc94e416e572", "score": "0.5965957", "text": "public function filter(Closure $filter) {\n $this->_clearItems();\n $this->_filters[] = $filter;\n }", "title": "" }, { "docid": "44964ff1d98730ff00b28d870295ab02", "score": "0.5958971", "text": "public function setFilter(Zend_Filter_Interface $filter, $markup)\n {\n $markup = $this->_resolveMarkupName($markup);\n\n $this->_markups[$markup]['filter'] = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "ae28f364e006e2086b61ea75886b10b8", "score": "0.5895662", "text": "public function setApplicationFilter($applicationFilter)\n {\n $this->_applicationFilter = $applicationFilter;\n }", "title": "" }, { "docid": "92f3de0111fc9a599dc1b7de4459a948", "score": "0.58755815", "text": "private function filterInit() {\r\n\t\t$this->filterStack = array ();\r\n\t}", "title": "" }, { "docid": "09a4532252eda5e2d8f5a4334d0c72d6", "score": "0.5863699", "text": "public function setFirstIterator() {\n\t}", "title": "" }, { "docid": "a5ccc7c75e6c67599cdfc9e6aebe0da6", "score": "0.58490163", "text": "private function setFilter()\n {\n $this->filter['categories'] = $this->getParameter('categories', 'array');\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }", "title": "" }, { "docid": "8cd4a58835810592747e5d8f670d4a5c", "score": "0.5836978", "text": "private function setFilter()\n\t{\n\t\t$this->filter['month'] = $this->URL->getParameter('month');\n\t\t$this->filter['year'] = $this->URL->getParameter('year');\n\t}", "title": "" }, { "docid": "4d68027575a6917906b3bf0012b28774", "score": "0.57415366", "text": "public function getIterator(): Iterator\n {\n return new ArrayIterator($this->_filters);\n }", "title": "" }, { "docid": "b9bf25ea22fe350b0036c499401ff1ab", "score": "0.57342964", "text": "public function setFirstIterator () {}", "title": "" }, { "docid": "03cb3052d43b773c25ecb83297f81061", "score": "0.5727035", "text": "public function setFilters()\n {\n $this->activeQueryLog()\n ->setFields()\n ->setCriteriaByQueryString()\n ->setCriteria()\n ->setIncludes()\n ->setLimit()\n ->setOrder()\n ->setGroup();\n }", "title": "" }, { "docid": "c9c7f9ae610ca10b6db8a2823b312f02", "score": "0.5713204", "text": "public function setFilterImages($filter_images)\n {\n $this->filter_images = $filter_images;\n }", "title": "" }, { "docid": "61587e07ef7e6bb2eeac5aed947b892c", "score": "0.5703721", "text": "protected function _init()\r\n\t{\r\n\t\t$this->_filters = [\r\n\t\t\t'filter' => 'int'\t\t\t\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "ab2c3fdb24918770a59bcea002cd6bc5", "score": "0.5692645", "text": "function setFilterName($val){\n $this->file_name_filter = $val;\n }", "title": "" }, { "docid": "cfd71d8172b0c52e6d2c089464ef902b", "score": "0.5682268", "text": "protected function setFilterForm() {\n\t\t$this->filterForm = null;\n\t}", "title": "" }, { "docid": "ab306d49b6d8a973a516b01982ff4ce9", "score": "0.56774265", "text": "public function setPreFilter(PHPTAL_Filter $filter)\n {\n $this->_prepared = false;\n $this->_functionName = null; \n $this->_prefilter = $filter;\n return $this;\n }", "title": "" }, { "docid": "afb807436c48b4b05bb8e2de8e22ffd3", "score": "0.56488186", "text": "public function enableFilters()\n {\n $this->runFilters = true;\n }", "title": "" }, { "docid": "6561685ac6ab14f4b6cdd5c11556797a", "score": "0.5637205", "text": "public function filter(FilterContract $filter);", "title": "" }, { "docid": "7ad76ee5869a0ea2500cd9405d64bbce", "score": "0.5615835", "text": "public function filterActive()\n {\n $this->_filter = $this->flags[\"ACTIVE\"];\n }", "title": "" }, { "docid": "b90b109fa5c9c5a67de2c1d43aef4412", "score": "0.5588687", "text": "public function setFilter($field, $filter, $raisin = \"\"){\n\n\n $filter = $this->filter_map[strtolower($filter)];\n \n\t\t if(empty($filter))\n\t\t throw new Exception(\"Invalid filter was set for setFilter Method valid filters are (\".implode(\" | \", array_keys($filter_map)).\")\");\n\t\t \n\t\t\t$this->setValidation($field, $raisin, function($v, $f){ return filter_var($v, $f);}, array($filter));\n\t\t\n\t\t}", "title": "" }, { "docid": "97a89e5f3f77c22c0a156bd620f6c19d", "score": "0.5588161", "text": "public function setFilter($filterName, $filter){\n if(!$this->optionExists('filter')){\n $this->search_options['filter'] = array();\n }\n $this->search_options['filter'][$filterName] = $filter;\n }", "title": "" }, { "docid": "4ece5036e596b3e12440a27c7d10f893", "score": "0.55847794", "text": "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4ece5036e596b3e12440a27c7d10f893", "score": "0.55847794", "text": "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4ece5036e596b3e12440a27c7d10f893", "score": "0.55847794", "text": "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4ece5036e596b3e12440a27c7d10f893", "score": "0.55847794", "text": "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4ece5036e596b3e12440a27c7d10f893", "score": "0.55847794", "text": "public function setFilter($var)\n {\n GPBUtil::checkString($var, True);\n $this->filter = $var;\n\n return $this;\n }", "title": "" }, { "docid": "da31e6a26fefcb17fdc599713d6755fe", "score": "0.55723274", "text": "public function setDefaultFilter(Zend_Filter_Interface $filter)\n {\n $this->_defaultFilter = $filter;\n }", "title": "" }, { "docid": "120d30c15ea467133169835e9c3a332c", "score": "0.55614465", "text": "function addFilter($newFilter)\n {\n // override \n }", "title": "" }, { "docid": "d250e88603b4dfef13f10a8065aa1ed5", "score": "0.5553335", "text": "protected static function newFilter()\n {\n //\n }", "title": "" }, { "docid": "29b8e9ae15982cdb1e64eb21959ffc53", "score": "0.5551779", "text": "private function filter()\n {\n $this->builder->where(function ($builder) {\n collect($this->request->get('filter', []))->each(function ($value, $column) use ($builder) {\n $this->guardFilter($column);\n $this->filterColumn($builder, $column, $value);\n });\n });\n }", "title": "" }, { "docid": "74fb0b007dc3ed7d90d436c18d7d783b", "score": "0.5516276", "text": "public function withFilter($filter) {\n if ($filter instanceof Filter) {\n $this->filters[]= $filter;\n } else {\n $this->filters[]= XPClass::forName($filter)->newInstance();\n }\n return $this;\n }", "title": "" }, { "docid": "434cd33280ecdbb6b960c941890dfa4b", "score": "0.5507563", "text": "function __construct(array $filter){ $this->filter = $filter; }", "title": "" }, { "docid": "81d5889be56b266831839e9d354b1952", "score": "0.55028725", "text": "public function resetIterator () {}", "title": "" }, { "docid": "d7293c30e69bef6f76a729d98fe50fe8", "score": "0.55025756", "text": "public function setUp(){\n $this->filter = new RequiredFilter();\n }", "title": "" }, { "docid": "c10aa12fddd99107fc9ff8e62645ef4c", "score": "0.55020076", "text": "public function setFilter($name, $class, $cache, $options)\n {\n $this->_filtersConfig[$name] = array(\n 'class' => $class,\n 'cache' => $cache,\n 'options' => $options,\n );\n }", "title": "" }, { "docid": "cfeb3f9cd6591d0b65602af45a014cdc", "score": "0.54961675", "text": "public function setFilterElement( $element )\n {\n $this->filterElement = $element;\n return $element;\n }", "title": "" }, { "docid": "f387bc9e0501a59619924b4d294f89a7", "score": "0.54830337", "text": "public function filter($cb)\n {\n $this->filter = $cb;\n\n return $this;\n }", "title": "" }, { "docid": "1d47debf4e8a167e13d288afc70029bf", "score": "0.5482065", "text": "public function SetFilter($filter)\n {\n if(is_string($filter))\n $this->SetQueryStringParameter('filter', $filter);\n else\n $this->SetQueryStringParameter('filter', $filter->GetID());\n \n return $this;\n }", "title": "" }, { "docid": "c7a7adb12ac80932022bcbb98b603c6d", "score": "0.54553205", "text": "protected function filters()\n {\n }", "title": "" }, { "docid": "6e0540ac3bfd7d4d6b3298a833f4bd64", "score": "0.5445673", "text": "public function enableFilter()\n {\n add_filter(self::FILTER_NAME, array($this, 'filterValidators'));\n }", "title": "" }, { "docid": "27a7a329469e7d58408e948249b1d20c", "score": "0.5441591", "text": "private function setFilter(): void\n {\n // start date is set\n if ($this->getRequest()->query->has('start_date') && $this->getRequest()->query->get('start_date', '') !== '') {\n // redefine\n $startDate = $this->getRequest()->query->get('start_date', '');\n\n // explode date parts\n $chunks = explode('/', $startDate);\n\n // valid date\n if (count($chunks) == 3 && checkdate((int) $chunks[1], (int) $chunks[0], (int) $chunks[2])) {\n $this->filter['start_date'] = $startDate;\n } else {\n // invalid date\n $this->filter['start_date'] = '';\n }\n } else {\n // not set\n $this->filter['start_date'] = '';\n }\n\n // end date is set\n if ($this->getRequest()->query->has('end_date') && $this->getRequest()->query->get('end_date', '') !== '') {\n // redefine\n $endDate = $this->getRequest()->query->get('end_date', '');\n\n // explode date parts\n $chunks = explode('/', $endDate);\n\n // valid date\n if (count($chunks) == 3 && checkdate((int) $chunks[1], (int) $chunks[0], (int) $chunks[2])) {\n $this->filter['end_date'] = $endDate;\n } else {\n // invalid date\n $this->filter['end_date'] = '';\n }\n } else {\n // not set\n $this->filter['end_date'] = '';\n }\n }", "title": "" }, { "docid": "63c5e991a268b00b5cd320fcdb56040f", "score": "0.54408073", "text": "public function setupFilters()\n {\n }", "title": "" }, { "docid": "0141e08fa4d0e78d194789aa922807b2", "score": "0.5440352", "text": "public function setFilters($filters)\n {\n $this->cleanFilters();\n $this->addFilters($filters);\n }", "title": "" }, { "docid": "43ade2299697fd051036f3497faea379", "score": "0.54388577", "text": "protected function setupFilters()\n {\n //\n }", "title": "" }, { "docid": "43ade2299697fd051036f3497faea379", "score": "0.54388577", "text": "protected function setupFilters()\n {\n //\n }", "title": "" }, { "docid": "a5c66236c7119dc066c25fcebbeb8bda", "score": "0.5435495", "text": "public function setInputFilter (InputFilterInterface $inputFilter)\n {\n // throw new \\Exception(\"Not used\");\n }", "title": "" }, { "docid": "58fbf14fa7a89fea8ddb3efbe9c4e948", "score": "0.5433042", "text": "public function setIteratorIndex ($index) {}", "title": "" }, { "docid": "ee5f447395db12ddbc8b7283d51bc279", "score": "0.54099375", "text": "public function setIteratorIndex($index) {\n\t}", "title": "" }, { "docid": "e1cd671b18bf15523428bf4f25f26fbe", "score": "0.53803074", "text": "public function initFilters() \r\n { \r\n if ($this->config == null) {\r\n return ;\r\n }\r\n \r\n $filters = $this->config->getAsList('filter');\r\n \r\n foreach ($filters as $filter) {\r\n\t\t\t$this->configureFilter($filter);\r\n }\r\n \r\n //$this->out($this->config);\r\n }", "title": "" }, { "docid": "28c2eabc99d32eed91668171efd2fdf3", "score": "0.53788936", "text": "public function setInputFilter(InputFilterInterface $inputFilter){\n // throw new \\Exception(\"Not used\");\n }", "title": "" }, { "docid": "d2123ef1efc219d3e72186b7a8b1ea39", "score": "0.53634477", "text": "public static function set_filter($key,$value) {\n\n\t\tswitch ($key) {\n\t\t\tcase 'show_art':\n\t\t\t\tif ($_SESSION['browse']['filter'][$key]) {\n\t\t\t\t\tunset($_SESSION['browse']['filter'][$key]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $_SESSION['browse']['filter'][$key] = 1;\n\t\t\t\t}\n\t\t\tbreak;\n case 'tag':\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t$_SESSION['browse']['filter'][$key] = $value;\n\t\t\t\t}\n\t\t\t\telseif (is_numeric($value)) {\n\t\t\t\t\t$_SESSION['browse']['filter'][$key] = array($value);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$_SESSION['browse']['filter'][$key] = array();\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'artist':\n\t\t\tcase 'album':\n\t\t\t\t$_SESSION['browse']['filter'][$key] = $value;\n\t\t\tbreak;\n\t\t\tcase 'min_count':\n\n\t\t\tcase 'unplayed':\n\t\t\tcase 'rated':\n\n\t\t\tbreak;\n\t\t\tcase 'alpha_match':\n\t\t\t\tif (self::$static_content) { return false; }\n\t\t\t\t$_SESSION['browse']['filter'][$key] = $value;\n\t\t\tbreak;\n\t\t\tcase 'playlist_type':\n\t\t\t\t// They must be content managers to turn this off\n\t\t\t\tif ($_SESSION['browse']['filter'][$key] AND Access::check('interface','50')) { unset($_SESSION['browse']['filter'][$key]); }\n\t\t\t\telse { $_SESSION['browse']['filter'][$key] = '1'; }\n\t\t\tbreak;\n default:\n // Rien a faire\n\t\t\t\treturn false;\n break;\n } // end switch\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "0df38003d19a3118a86ea4324d649493", "score": "0.5356148", "text": "public function filterAll()\n {\n $this->_filter = $this->flags[\"ALL\"];\n }", "title": "" }, { "docid": "d9c9fb56b2a4293ba43f5aae0b8fe6ce", "score": "0.5355287", "text": "public function setInputFilterSpecification($spec)\n {\n $this->inputFilterSpecification = $spec;\n }", "title": "" }, { "docid": "50f75e58430fbf541e57477e97d2d840", "score": "0.5354919", "text": "function &getFilter()\n {\n // override \n }", "title": "" }, { "docid": "847104df0abba957fa4204bec00a9230", "score": "0.5346822", "text": "function filters( $filters = array() ) {\n\n\t\t$this->filters = $filters;\n\t}", "title": "" }, { "docid": "ffb4df47f1459cb6adb245088eb34689", "score": "0.53440547", "text": "public function filter($name, $filter)\n {\n $this->filters[$name] = $filter;\n return $this;\n }", "title": "" }, { "docid": "8fb78b56beac955498f79cfac40bc018", "score": "0.5339443", "text": "public function setFilterManager(FilterManager $fm) {\n\t\t$this->fm = $fm;\n\t}", "title": "" }, { "docid": "93b0a7a1f63cb66ff354bb2596a2c7a8", "score": "0.5331498", "text": "public function setFilter($field, $value)\n\t{\n\t\tYiiSession::set('waitinglist_searchoptions',$field,$value);\n\t}", "title": "" }, { "docid": "14da10d78ed8269cfa607c11c0dd6f9b", "score": "0.53214604", "text": "public function setFilters($filters) {\n if (is_array($filters)) {\n $safeFilters = $this->getFiltersFromArray($filters);\n $this->filters = $safeFilters;\n }\n }", "title": "" }, { "docid": "2e568089d2057e7b74d543b32adcb33c", "score": "0.5321214", "text": "public function setFilter($var)\n {\n GPBUtil::checkMessage($var, \\Api\\Filter::class);\n $this->filter = $var;\n\n return $this;\n }", "title": "" }, { "docid": "84fb0ab18894a96ef3f684a7b527f564", "score": "0.53147626", "text": "public static function reset_filters() {\n\n\t\tif (!is_array($_SESSION['browse']['filter'])) { return true; }\n\n\t\tforeach ($_SESSION['browse']['filter'] AS $key=>$value) {\n\t\t\tself::set_filter($key,'');\n\t\t}\n\n\t}", "title": "" }, { "docid": "fc0f40136c489ee59a86b60bd483c2ad", "score": "0.5306321", "text": "public function setData(array $data = [], $filter = true);", "title": "" }, { "docid": "532ba1e444427c4668ba2963d74a260f", "score": "0.5298668", "text": "public function filterInactive()\n {\n $this->_filter = $this->flags[\"INACTIVE\"];\n }", "title": "" }, { "docid": "0a07ffedbdc231903d6b487455c2a44a", "score": "0.52985686", "text": "public function filter()\n {\n return $this->filterBuilder;\n }", "title": "" }, { "docid": "29b8038ba7b3ec8f75fbe2af504db9b0", "score": "0.5287961", "text": "public function registerFilters()\n {\n }", "title": "" }, { "docid": "237d84ebacacb1f7f4576dc249475166", "score": "0.5267354", "text": "function setCitationOutputFilter(&$citationOutputFilter) {\n\t\t$this->_citationOutputFilter =& $citationOutputFilter;\n\t}", "title": "" }, { "docid": "bf301268762a4240e89d3e5fb2f5ced4", "score": "0.5265223", "text": "public static function setFilterParameters() {\n if(!Route::param('filter')) { return false; }\n $fil = Route::param('filter');\n $fil = explode(\"&\", $fil);\n $filter = Array();\n foreach($fil AS $g) {\n $g = urldecode($g);\n $g = strip_tags($g);\n $g = stripslashes($g);\n $g = trim($g);\n $s = explode(\"=\", $g);\n $filter[$s[0]] = explode(\",\", $s[1]);\n }\n conf::set('filter_array', $filter);\n return true;\n }", "title": "" }, { "docid": "2936c962e3e3b8a7ff8ff80e418329bb", "score": "0.5261248", "text": "public function setFilterManager(FilterManager $fm)\n {\n $this->fm = $fm;\n }", "title": "" }, { "docid": "a19079ca8a4f08a14e13cd702be32e64", "score": "0.52414006", "text": "protected function defineFilters()\n {\n\n /*if (isset($this->request['filters'])) {\n\n foreach ($this->request['filters'] as $name => $value) {\n if ($value === null) {\n continue;\n }\n $method = 'processFilter' . ucfirst($name);\n if (!method_exists($this, $method)) {\n throw new \\Exception('invalid query filter: '\n . $name. ' (method: '.$method.')');\n }\n $this->$method($value);\n }\n }*/\n }", "title": "" }, { "docid": "50e0aebf561a621eb2ed0ffd6dcd5702", "score": "0.5230146", "text": "public function setType(?string $type): void\n {\n if ($type) {\n $this->items[ConfigUtil::FILTER_TYPE] = $type;\n } else {\n unset($this->items[ConfigUtil::FILTER_TYPE]);\n }\n }", "title": "" }, { "docid": "96b286c670311cc3ae66ead8bfda2e1b", "score": "0.5228879", "text": "public function setFilterForModule($strName, Filter $objFilter, $intModule)\n {\n $this->arrFilters[$intModule][$strName] = $objFilter;\n\n // Mark as modified\n $this->tstamp = time();\n }", "title": "" }, { "docid": "657d4fa20fcde0d3e2180e8c359b16b9", "score": "0.52283716", "text": "public function testCanSetIteratorParams()\n {\n $iterators = ['per_page' => 1, 'page' => 2, 'sort_order' => 'desc', 'sort_by' => 'date'];\n\n $this->assertEndpointCalled(function () use ($iterators) {\n $this->dummyResource->findAll($iterators);\n }, 'dummy_resource.json', 'GET', ['queryParams' => $iterators]);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "cc12628aa1525caac0bf08e767bd6cb4", "score": "0.7592133", "text": "public function view(ResourceInterface $resource);", "title": "" }, { "docid": "d57b314bf807713f346bc35fb937529e", "score": "0.68463326", "text": "public function render() {\n $this->_template->display($this->resource_name);\n }", "title": "" }, { "docid": "87649d98f1656cc542e5e570f7f9fd1f", "score": "0.6617427", "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": "9579e337a5325a82370abb431f646b6f", "score": "0.6491441", "text": "public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.63457626", "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": "d6d98993d2a40a3cba09832ef9953f69", "score": "0.62127197", "text": "public function lookup($resource);", "title": "" }, { "docid": "6244aaaaf59fb15467858bc417084ebc", "score": "0.62085146", "text": "protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}", "title": "" }, { "docid": "3ee4a64030fd6d594c526bf49945971f", "score": "0.62007433", "text": "public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }", "title": "" }, { "docid": "48b723515995fb4178256251ea323c04", "score": "0.6185578", "text": "public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "b6106194998deb4acb00d89d1984bf4b", "score": "0.61584204", "text": "public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight <pre> tag\n $this->assets->addCss('css/highlightjs/arta.css');\n $this->assets->addJs('js/plugins/highlight.pack.js');\n $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n }\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.61575574", "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": "c232a532d32e3f8e5c41e20db4331be5", "score": "0.60671955", "text": "function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}", "title": "" }, { "docid": "88951f8df99fd6c0e333e72b145dfb04", "score": "0.6067186", "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('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": "3fb44335bf5e5dca76ae4c41be3fee5d", "score": "0.599906", "text": "public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}", "title": "" }, { "docid": "9a28e42aa633511a42cb70db3b7fcc26", "score": "0.5987157", "text": "public function show($id)\n\t{\n\t\ttry {\n\t\t if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n {\n $resource = \\Resource::find($id);\n $path_to_image = app('path.protected_images') .'/'.$resource->image;\n //Read image path, convert to base64 encoding\n $imgData = base64_encode(file_get_contents($path_to_image));\n //Format the image SRC: data:{mime};base64,{data};\n $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n return \\View::make('resources.view')->with([\n 'resource' => $resource,\n 'img' => $src\n ]);\n\n } else {\n\n \\App::abort(404);\n }\n\n } catch (\\Exception $e) {\n\n \\Log::warning( $e->getMessage() );\n }\n\t}", "title": "" }, { "docid": "41ab5aeaf4ec45d330f185763e2d3cee", "score": "0.59671307", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "66bedfeb611b91813c98a7e106a95902", "score": "0.5966385", "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": "df778faf9f0b4d88cab1a7ccf83e7502", "score": "0.59105337", "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.5908002", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "ecdc5dd9611d1734404c92d923029a39", "score": "0.5884191", "text": "public function show($id)\n {\n echo self::routeNamed();\n }", "title": "" }, { "docid": "461e196dfe64422deb4a744c50eb5d8d", "score": "0.5882105", "text": "public function show($id) {\n //view/edit page referred to as one entity in spec\n }", "title": "" }, { "docid": "f004693e692e26b7ab9f8de37189afc1", "score": "0.5872262", "text": "private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"resources\" >'.\"\\n\";\n\t\t\t$html .= '\t<h4>Resources ~ '.$this->challenge['challengeResourceHeading'].'</h4>'.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t<p class=\"resource-link\"><a href=\"http://'.$resource['resourceLink'].'\">'.$resource['resourceTitle'].'</a></p>'.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "4294ddbd744676190ac0b1e7d92632e0", "score": "0.5867885", "text": "public function show() {\r\n echo $this->init()->getView();\r\n }", "title": "" }, { "docid": "d138cb59b6d8df8768f135975e4445ad", "score": "0.5845176", "text": "public function show()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ad2fe33fedb796826d1b96c32859495c", "score": "0.58396536", "text": "public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }", "title": "" }, { "docid": "6e1ccfc29048f24d0efc88d6b8257171", "score": "0.5813761", "text": "public function show($name)\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "2f33e89741ba0a19b898dc9a1f9026fc", "score": "0.5811081", "text": "public function showResource($value, bool $justOne = false);", "title": "" }, { "docid": "ef3fb32b359d85e91687f25572082d98", "score": "0.579869", "text": "public function display()\r\n {\r\n\r\n echo $this->get_display();\r\n\r\n }", "title": "" }, { "docid": "f7584132221ad89383b2964e2bd53fe5", "score": "0.57928157", "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": "e871bf67c885c4b595a1f5cc980d032e", "score": "0.5791212", "text": "public function show()\n {\n \n \n }", "title": "" }, { "docid": "7dd625db5c11766539ede97b10e391c8", "score": "0.57882935", "text": "public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.57857597", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "ea3e059853b58df5488fa70a7fd54c3b", "score": "0.57813525", "text": "protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }", "title": "" }, { "docid": "b5cf19a61f4df8b352f4c5245148ed8c", "score": "0.5778931", "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": "39114f16312ac4920577af8887aaf740", "score": "0.5777252", "text": "public function display()\r\n {\r\n echo $this->fetch();\r\n }", "title": "" }, { "docid": "4be578329f20a5696732db0fd60d5d80", "score": "0.57720363", "text": "public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }", "title": "" }, { "docid": "fcc9864a64202f3261f4537601857f07", "score": "0.5771861", "text": "public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57604754", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57604754", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "f18ebc5f8b08ddef340fa4f0d3eeea2f", "score": "0.5754774", "text": "public static function show() {\n\t\treturn static::$instance->display();\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.57525647", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "e6492f335ada5179a4fe15779fa54555", "score": "0.57495135", "text": "public function show($id)\n\t{\n\t\t//\t\n\t}", "title": "" }, { "docid": "fd30d754eb9c55abae27d57dff32abdc", "score": "0.573772", "text": "public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5729069", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "a7cd1d7ce30dda2ea0273ce031cff516", "score": "0.57275295", "text": "public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.57253987", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57214445", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57214445", "text": "public function show($id) {}", "title": "" }, { "docid": "8f565ce0db5c2b58c1bd4bea7cb05683", "score": "0.57205963", "text": "public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "cfff8a1202fcfae7e44ab0c4fb351586", "score": "0.5710935", "text": "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5710076", "text": "public abstract function display();", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57056946", "text": "public function show(){}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5705454", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "b19fae7378b33f825e4ee1e7d8aef94a", "score": "0.5703133", "text": "public function display($templateName=null)\n {\n echo $this->get($templateName);\n }", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56997055", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "0465b5fe008a3153a8a032fca67abfed", "score": "0.56978554", "text": "public function show() { }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56882185", "text": "abstract public function show($id);", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56882185", "text": "abstract public function show($id);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5687868", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
942823be1d8db0088c5cdd681f1033f3
completeAssociationMapping Validate and complete the mapping for entity associations. This ensures that simple mapping can be completed with defaults and exceptions are thrown where invalid association information is provided.
[ { "docid": "28916ad9ebd7630b140e76cd6c298d7b", "score": "0.6748797", "text": "protected function completeAssociationMapping(array $mapping)\n {\n $mapping['isOwningSide'] = true;\n\n if (! isset($mapping['fieldName'])) {\n throw new \\nvalidArgumentException('Relationship mapping must have a field name');\n } else if (! isset($mapping['targetEntityName'])) {\n throw new \\InvalidArgumentException(\"The 'targetEntityName' parameter is required for all association mappings\");\n }\n\n if (! isset($mapping['sourceEntityName'])) $mapping['sourceEntityName'] = $this->_entityName;\n if (! isset($mapping['mappedByColumn'])) $mapping['mappedByColumn'] = '';\n if (! isset($mapping['inversedByColumn'])) $mapping['inversedByColumn'] = '';\n\n if (isset($mapping['identity']) && $mapping['identity'] == true) {\n if (! in_array($mapping['fieldName'], $this->_identityFields) && count($mapping['joinColumns']) > 1) {\n throw new \\InvalidArgumentException('Cannot map composite identity as foreign identity');\n } else {\n $this->_identityFields[] = $mapping['fieldName'];\n $this->_foreignIdentity = true;\n }\n }\n\n if (count($mapping['joinColumns']) != count($mapping['referencedColumns'])) {\n throw new \\InvalidArgumentException('Each joined column must has a referenced column');\n }\n\n $joins = array();\n for ($x = 0; $x < count($mapping['joinColumns']); $x++) {\n $joins[] = array(\n 'columnName' => $mapping['joinColumns'][$x],\n 'referencedColumn' => $mapping['referencedColumns'][$x]\n );\n }\n $mapping['joinColumns'] = $joins;\n\n if (! strlen($mapping['mappedByColumn'])) {\n\n } else {\n $mapping['isOwningSide'] = false;\n }\n if (isset($mapping['identity']) && $mapping['identity'] == true) {\n if (isset($mapping['type']) && $mapping['type'] == self::ASSOC_MANY_TO_MANY) {\n throw new InvalidArgumentException('Many to many associations fields cannot be defined as entity identitifers');\n }\n }\n if (! isset($mapping['loadScheme']) || $mapping['loadScheme'] !== self::LOAD_EAGER) {\n $mapping['loadScheme'] = self::LOAD_LAZY;\n }\n\n switch ($mapping['type']) {\n case self::ASSOC_ONE_TO_ONE:\n $mapping = $this->completeOneToOneMapping($mapping);\n break;\n case self::ASSOC_ONE_TO_MANY:\n $mapping = $this->completeOneToManyMapping($mapping);\n break;\n case self:ASSOC_MANY_TO_MANY:\n $mapping = $this->completeManyToManyMapping($mapping);\n break; \n default:\n throw new \\InvalidArgumentException(\n sprintf('Invalid association mapping type %s for field %s in entity %s', \n $mapping['type'], $mapping['fieldName'], $this->_entityName\n )\n );\n }\n return $mapping;\n }", "title": "" } ]
[ { "docid": "fd4a8388fe8b3c917d76651ef3a435c1", "score": "0.5527466", "text": "protected function _validateAndCompleteFieldMapping(array &$mapping)\n {\n // Check mandatory fields\n if ( ! isset($mapping['fieldName']) || strlen($mapping['fieldName']) == 0) {\n throw MappingException::missingFieldName($this->name);\n }\n if ( ! isset($mapping['type'])) {\n // Default to string\n $mapping['type'] = 'string';\n }\n \n \n\n // Complete id mapping\n if (isset($mapping['id']) && $mapping['id'] === true) {\n if ( $mapping['fieldName'] !== $this->identifier) {\n $this->identifier = $mapping['fieldName'];\n }\n }\n }", "title": "" }, { "docid": "3fc278e46b1538278e09a1dc4e689ca7", "score": "0.5229591", "text": "public function handle_association() {\n\t\t\t// Return error if not a valid association request.\n\t\t\tif ( true !== apply_filters( 'wporg_is_valid_association_request', false ) ) {\n\t\t\t\tdie( '-1 Not a valid association request.' );\n\t\t\t}\n\n\t\t\t// Return error if activities are not enabled.\n\t\t\tif ( ! bp_is_active( 'groups' ) ) {\n\t\t\t\tdie( '-1 Group component not activated.' );\n\t\t\t}\n\n\t\t\t$source = $_POST['source'];\n\n\t\t\tswitch ( $source ) {\n\t\t\t\tcase 'wordcamp':\n\t\t\t\tcase 'meetups':\n\t\t\t\tcase 'polyglots':\n\t\t\t\t\t// These sources may send the field as `user_id`/`association`, so handle that format if not specified otherwise.\n\t\t\t\t\t$_POST['users'] ??= (array) $_POST['user_id'];\n\t\t\t\t\t$_POST['badge'] ??= $_POST['association'];\n\n\t\t\t\t\t// Fall through, the generic-badge uses `users`/`badge` for the fields, as set above.\n\t\t\t\tcase 'generic-badge':\n\t\t\t\t\t$association_id = $this->handle_badge_association();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$association_id = '-1 Unrecognized association source.';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( false === $association_id ) {\n\t\t\t\t$association_id = '-1 Unable to save association.';\n\t\t\t}\n\n\t\t\t$success = intval( $association_id ) > 0 ? '1' : $association_id;\n\t\t\tdie( $success );\n\t\t}", "title": "" }, { "docid": "92f78a734ff06e29dda1f754f59d0353", "score": "0.5209917", "text": "public function testDiscoverAssociationsUnidirectional(array $mapping)\n {\n $owningEntity = $this->getEntity('AppBundle\\Entity\\Post', [], [\n $mapping['fieldName'] => $this->getAssociation($mapping),\n ]);\n\n $builder = new EntityBuilder();\n\n $inverseEntity = $builder->newEntityInstance($mapping['targetEntity']);\n $builder->discoverAssociations($inverseEntity, [$owningEntity]);\n\n $this->assertEmpty($inverseEntity->getAssociations(), 'The entity should not have any mapped association.');\n }", "title": "" }, { "docid": "c94ed14b3c8e0d1603c310316d95d859", "score": "0.4998361", "text": "public function testGetEntityFromWithAssociation(array $mapping)\n {\n $metadata = $this->getClassMetadata('entityName', [], [\n $mapping['fieldName'] => $mapping,\n ]);\n\n $builder = new EntityBuilder();\n\n $entity = $builder->getEntityFrom($metadata);\n\n $this->assertCount(1, $entity->getAssociations(), 'The entity should own one association.');\n $this->assertTrue($entity->hasAssociation($mapping['fieldName']), 'The entity should own this association.');\n\n $association = $entity->getAssociation($mapping['fieldName']);\n\n $this->assertInstanceOf('Remg\\GeneratorBundle\\Model\\Association', $association, 'The mapped association should be an Association instance.');\n $this->assertEquals($mapping['fieldName'], $association->getName(), 'The association name is not properly mapped.');\n $this->assertEquals($mapping['type'], $association->getType(), 'The association type is not properly mapped.');\n $this->assertEquals($mapping['targetEntity'], $association->getTargetEntity(), 'The association target entity is not properly mapped.');\n $this->assertEquals($mapping['bidirectional'], $association->isBidirectional(), 'The association bidirectionality is not properly mapped.');\n $this->assertEquals($mapping['owningSide'], $association->isOwningSide(), 'The association owning side is not properly mapped.');\n $this->assertEquals($mapping['mappedBy'], $association->getMappedBy(), 'The association mappedBy property is not properly mapped.');\n $this->assertEquals($mapping['inversedBy'], $association->getInversedBy(), 'The association inversedBy property is not properly mapped.');\n }", "title": "" }, { "docid": "cb95625f4ee376e85ac4b20976e89309", "score": "0.486568", "text": "public function addAssociationMapping(array $mapping)\n {\n $mapping = $this->completeAssociationMapping($mapping);\n $fieldName = $mapping['fieldName'];\n if (isset($this->_fieldMappings[$fieldName]) || isset($this->_associationMappings[$fieldName])) {\n throw \\InvalidArgumentException(\n sprintf('Duplicate field mapping for field %s in entity %s', $fieldName, $this->_entityName)\n );\n }\n $this->_associationMappings[$fieldName] = $mapping;\n $this->_reflectionFields[$fieldName] = $this->getReflectionClass()->getProperty($fieldName);\n }", "title": "" }, { "docid": "18fc5b4dfe5b3f00d98c6a8884dda52a", "score": "0.4797878", "text": "protected function completeManyToManyMapping(array $mapping)\n {\n if ($mapping['isOwningSide']) {\n $sourceName = $mapping['sourceEntityName'];\n $targetName = $mapping['targetEntityName'];\n\n if (! isset($mapping['joinTable']['name'])) {\n $mapping['joinTable']['name'] = strtolower($sourceName . '_' . $targetName);\n }\n\n if (empty($mapping['joinTable']['joinColumns'])) {\n $mapping['joinTable']['joinColumns'][] = array(\n 'name' => strtolower($sourceName . '_id'),\n 'referencedColumn' => 'id',\n 'onDelete' => 'cascade'\n );\n }\n if (empty($mapping['joinTable']['inverseJoinColumns'])) {\n $mapping['joinTable']['inverseJoinColumns'][] = array(\n 'name' => strtolower($targetName . '_id'),\n 'referencedColumn' => 'id',\n 'onDelete' => 'cascade'\n );\n }\n\n $mapping['joinTableColumns'] = array();\n $mapping['relationToSourceKeyColumns'] = array();\n $mapping['relationToTargetKeyColumns'] = array();\n\n for ($x = 0; $x < count($mapping['joinTable']['joinColumns']); $x++) {\n\n $joinColumn = $mapping['joinTable']['joinColumns'][$x];\n if (! isset($joinColumn['name']) || ! strlen($joinColumn['name'])) {\n $joinColumn['name'] = strtolower($sourceName . '_id');\n }\n if (! isset($joinColumn['referencedColumn']) || ! strlen($joinColumn['referencedColumn'])) {\n $joinColumn['referencedColumn'] = 'id';\n }\n $mapping['relationToSourceKeyColumns'][$joinColumn['name']] = $joinColumn['referencedColumn'];\n $mapping['joinTableColumns'][] = $joinColumn['name'];\n }\n\n for ($y = 0; $y < count($mapping['joinTable']['inverseJoinColumns']); $y++) {\n $inverseColumn = $mapping['joinTable']['inverseJoinColumns'][$y];\n\n if (! isset($inverseColumn['name']) || ! strlen($inverseColumn['name'])) {\n $inverseColumn['name'] = strtolower($targetName . '_id');\n }\n\n if (! isset($inverseColumn['referencedColumn']) || ! strlen($inverseColumn['referencedColumn'])) {\n $inverseColumn['referencedColumn'] = 'id';\n }\n $mapping['relationToTargetKeyColumns'][$inverseColumn['name']] = $inverseColumn['referencedColumn'];\n $mapping['joinTableColumns'][] = $inverseColumn['name'];\n }\n }\n return $mapping;\n }", "title": "" }, { "docid": "a864b7f4194aa8d6818f63399cdf5842", "score": "0.46587816", "text": "protected function completeOneToOneMapping(array $mapping)\n {\n if (isset($mapping['joinColumns']) && ! empty($mapping['joinColumns'])) {\n $mapping['isOwningSide'] = true;\n }\n if ($mapping['isOwningSide']) {\n if (! isset($mapping['joinColumns']) || ! empty($mapping['joinColumns'])) {\n $mapping['joinColumns'] = array(\n 'name' => $mapping['fieldName'] . '_id',\n 'referencedColumn' => 'id'\n );\n }\n\n $mapping['columnsToFieldNames'] = array();\n $mapping['sourceToTargetKeyColumns'] = array();\n\n for ($x = 0; $x < count($mapping['joinColumns']); $x++) {\n $column = $mapping['joinColumns'][$x];\n\n if ($mapping['type'] == self::ASSOC_ONE_TO_ONE) {\n $column['unique'] = true;\n }\n if (! isset($column['name']) || ! strlen($column['name'])) {\n $column['name'] = $mapping['fieldName'] . '_id';\n }\n if (! isset($column['referencedColumn']) || ! len($column['referencedColumn'])) {\n $column['referencedColumn'] = 'id';\n }\n $mapping['sourceToTargetKeyColumns'][$column['name']] = $column['referencedColumn'];\n\n if (isset($column['fieldName'])) {\n $mapping['columnsToFieldNames'][$column['name']] = $column['fieldName'];\n } else {\n $mapping['columnsToFieldNames'][$column['name']] = $mapping['fieldName'];\n }\n\n $mapping['joinColumns'][$x] = $column;\n }\n }\n return $mapping;\n }", "title": "" }, { "docid": "8645945a50c2bf481a44d56fccd4dbbf", "score": "0.45754403", "text": "protected function completeFieldMapping(array $mapping)\n {\n if (! isset($mapping['fieldName'])) {\n throw new \\InvalidArgumentException('Entity field metadata must has a field name defined');\n }\n if (! isset($mapping['dataType'])) {\n $mapping['dataType'] = 'varchar';\n }\n if (! isset($mapping['columnName']) || ! strlen($mapping['columnName'])) {\n $mapping['columnName'] = $mapping['fieldName'];\n }\n\n $this->_fields[$mapping['columnName']] = $mapping['fieldName'];\n $this->_columns[$mapping['fieldName']] = $mapping['columnName'];\n\n if (isset($mapping['identity']) && true == $mapping['identity']) {\n if (! in_array($mapping['fieldName'], $this->_identityFields)) {\n $this->_identityFields[] = $mapping['fieldName'];\n }\n }\n\n return $mapping;\n }", "title": "" }, { "docid": "96567f6fda24801d74670e85d5b42b1f", "score": "0.44940668", "text": "public function testAssociationCollection()\n {\n $fieldName1 = 'fieldName1';\n $fieldName2 = 'fieldName2';\n\n // Create mocked Associations based on the given field names.\n $association1 = $this->getAssociation(['fieldName' => $fieldName1]);\n $association2 = $this->getAssociation(['fieldName' => $fieldName2]);\n\n $entity = new Entity();\n\n $this->assertInstanceOf(\n 'Doctrine\\Common\\Collections\\Collection',\n $entity->getAssociations(),\n 'The associations must be a Collection instance.'\n );\n $this->assertEmpty($entity->getAssociations(), 'The association collection should be empty.');\n $this->assertFalse($entity->hasAssociation($fieldName1), 'The entity should not own this association.');\n $this->assertFalse($entity->hasAssociation($fieldName2), 'The entity should not own this association.');\n\n // Map the first association to the entity.\n $entity->addAssociation($association1);\n $this->assertCount(1, $entity->getAssociations(), 'The entity should now own one association.');\n $this->assertTrue($entity->hasAssociation($fieldName1), 'The entity should now own this association.');\n $this->assertFalse($entity->hasAssociation($fieldName2), 'The entity should not own this association.');\n $this->assertEquals($association1, $entity->getAssociation($fieldName1), 'The expected association does not match the resolved association.');\n\n // Map the second association to the entity.\n $entity->addAssociation($association2);\n $this->assertCount(2, $entity->getAssociations(), 'The entity should now own two associations.');\n $this->assertTrue($entity->hasAssociation($fieldName1), 'The entity should still own this association.');\n $this->assertTrue($entity->hasAssociation($fieldName2), 'The entity should now own this association.');\n $this->assertEquals($association1, $entity->getAssociation($fieldName1), 'The expected association does not match the resolved association.');\n $this->assertEquals($association2, $entity->getAssociation($fieldName2), 'The expected association does not match the resolved association.');\n\n // Remove the first association from the entity.\n $entity->removeAssociation($association1);\n $this->assertCount(1, $entity->getAssociations(), 'The entity should now own two associations.');\n $this->assertFalse($entity->hasAssociation($fieldName1), 'The entity should not own this association anymore.');\n $this->assertTrue($entity->hasAssociation($fieldName2), 'The entity should still own this association.');\n $this->assertEquals($association2, $entity->getAssociation($fieldName2), 'The expected association does not match the resolved association.');\n\n // Remove the second association from the entity.\n $entity->removeAssociation($association2);\n $this->assertEmpty($entity->getAssociations(), 'The entity should now own one association.');\n $this->assertFalse($entity->hasAssociation($fieldName1), 'The entity should not own this association anymore.');\n $this->assertFalse($entity->hasAssociation($fieldName2), 'The entity should not own this association anymore.');\n }", "title": "" }, { "docid": "38449de6010af9c281d902e74e4b4f10", "score": "0.4487943", "text": "public function getAssociationMappings()\n {\n return $this->_associationMappings;\n }", "title": "" }, { "docid": "ee9603bc70a2bc452bcdc0c8a2d130bf", "score": "0.4460557", "text": "public function testDiscoverAssociations(array $owningMapping, array $inverseMapping)\n {\n $owningEntity = $this->getEntity($inverseMapping['targetEntity'], [], [\n $owningMapping['fieldName'] => $this->getAssociation($owningMapping),\n ]);\n\n $builder = new EntityBuilder();\n\n $inverseEntity = $builder->newEntityInstance($owningMapping['targetEntity']);\n $builder->discoverAssociations($inverseEntity, [$owningEntity]);\n\n $association = $inverseEntity->getAssociation($inverseMapping['fieldName']);\n\n $this->assertCount(1, $inverseEntity->getAssociations(), 'The entity should have one mapped association.');\n $this->assertTrue($inverseEntity->hasAssociation($inverseMapping['fieldName']), 'The entity should have an association with this name.');\n $this->assertEquals($inverseMapping['fieldName'], $association->getName(), 'The association name is not properly reversed.');\n $this->assertEquals($inverseMapping['type'], $association->getType(), 'The association type is not properly reversed.');\n $this->assertEquals($inverseMapping['targetEntity'], $association->getTargetEntity(), 'The taret entity name is not properly reversed.');\n $this->assertEquals($inverseMapping['bidirectional'], $association->isBidirectional(), 'The association bidirectionaliy is not properly reversed.');\n $this->assertEquals($inverseMapping['owningSide'], $association->isOwningSide(), 'The association owning side is not properly reversed.');\n $this->assertEquals($inverseMapping['mappedBy'], $association->getMappedBy(), 'The mappedBy property is not properly reversed.');\n $this->assertEquals($inverseMapping['inversedBy'], $association->getInversedBy(), 'The inversedBy property is not properly reversed.');\n }", "title": "" }, { "docid": "1eb2c2b46a10da2c10e6cd037774f343", "score": "0.44496346", "text": "abstract public function onAsocciation(Association $assoc);", "title": "" }, { "docid": "e2738ccdfc6bf10c817331cffe54976e", "score": "0.4260885", "text": "private function isAssociationNullable(array $associationMapping): bool\n {\n if (!empty($associationMapping['id'])) {\n return false;\n }\n\n if (!isset($associationMapping['joinColumns'])) {\n return true;\n }\n\n $joinColumns = $associationMapping['joinColumns'];\n foreach ($joinColumns as $joinColumn) {\n if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "157858d908a106f6ee42f90304501aba", "score": "0.4247046", "text": "protected function complete() {\n\t\tparent::complete();\n\n\t\tif ( $this->resolved_correctly && null !== $this->resolved ) {\n\t\t\t$callback_args = isset( $this->resolved_args ) ? $this->resolved_args : null;\n\t\t\t$this->do_callback( $this->resolved, $callback_args );\n\t\t} elseif ( ! $this->resolved_correctly && null !== $this->rejected ) {\n\t\t\t$callback_args = isset( $this->rejected_args ) ? $this->rejected_args : null;\n\t\t\t$this->do_callback( $this->rejected, $callback_args );\n\t\t}\n\t}", "title": "" }, { "docid": "99ccf86a7709dd1f42ad1854757483f2", "score": "0.4193826", "text": "protected function complete()\r\n\t{\r\n\t\tif(!$this->fIsTimeSet) {\r\n\t\t\t$this->updateTime();\r\n\t\t}\r\n\r\n\t\tif(!$this->fAreFieldsInSync) {\r\n\t\t\t$this->computeFields(); // fills in unset fields\r\n\r\n\t\t\t$this->fAreFieldsInSync = true;\r\n\t\t\t$this->fAreAllFieldsSet = true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fd8e79e24ca7c85ac4708c5da42e782b", "score": "0.41810971", "text": "protected function complete() {\n\t\tparent::complete();\n\t}", "title": "" }, { "docid": "e6421fd3e2c501ca987f7a078b319577", "score": "0.41693586", "text": "abstract public function loadMappings(): void;", "title": "" }, { "docid": "32b5c331a7a1a488471998e7394ca406", "score": "0.41442698", "text": "public static function deleteAllMapping()\n\t{\n//\t\tGET all entity IDs\n\t\t$resEntityIds = MapEntityTable::getList(array(\n\t\t\t\"filter\" => array('%=CODE' => self::getGeneralCodePrefix() . '%'),\n\t\t));\n\t\t$entityIds = array();\n\t\twhile ($entityId = $resEntityIds->fetch())\n\t\t\t$entityIds[] = $entityId['ID'];\n\n//\t\tDELETE all MAP ENTITY\n\t\tforeach ($entityIds as $entityId)\n\t\t\tMapEntityTable::delete($entityId);\n\n\n//\t\tGET all map items IDs\n\t\t$resMapIds = MapTable::getList(array(\n\t\t\t\"filter\" => array('=ENTITY_ID' => $entityIds),\n\t\t));\n\t\t$mapIds = array();\n\t\twhile ($mapId = $resMapIds->fetch())\n\t\t\t$mapIds[] = $mapId['ID'];\n\n//\t\tDELETE all from MAP\n\t\tforeach ($mapIds as $mapId)\n\t\t\tMapTable::delete($mapId);\n\t}", "title": "" }, { "docid": "5c6b065575bc138908546b6f585f6e66", "score": "0.41219872", "text": "public function testDefaultBuild()\n {\n $mapBuilder = new BaseMapBuilder($this->mockClassParser, $this->mockClassFormatter);\n\n // No global annotation\n $this->mockClassParser->getMockController()->parse = array(\n 'class' => 'Plemi\\\\Bundle\\\\BoomgoBundle\\\\Tests\\\\Documents\\\\Annotation',\n 'definitions' => array(\n array('attribute' => 'novar', 'type' => 'string'),\n array('attribute' => 'typeDescription', 'type' => 'string')\n )\n );\n\n $processedMaps = $mapBuilder->build(array(__DIR__.'/../../Documents/Annotation.php'));\n $annotationMap = $processedMaps['\\Plemi\\Bundle\\BoomgoBundle\\Tests\\Documents\\Annotation'];\n\n // Check valid processing\n $this->assert()\n ->array($processedMaps)\n ->isNotEmpty()\n ->object($annotationMap)\n ->isInstanceOf('Plemi\\\\Bundle\\\\BoomgoBundle\\\\Builder\\\\Map');\n\n $this->assert()\n ->string($annotationMap->getType())\n ->isEqualTo('DOCUMENT')\n ->string($annotationMap->getConnection())\n ->isEqualTo('default')\n ->string($annotationMap->getCollection())\n ->isEqualTo('annotation');\n\n // Global annotation defined within the document itself\n $this->mockClassParser->getMockController()->parse = array(\n 'class' => 'Plemi\\\\Bundle\\\\BoomgoBundle\\\\Tests\\\\Documents\\\\Annotation',\n 'type' => 'EMBEDDED_DOCUMENT',\n 'collection' => 'my_collection',\n 'connection' => 'local_connection',\n 'definitions' => array(\n array('attribute' => 'novar', 'type' => 'string'),\n array('attribute' => 'typeDescription', 'type' => 'string')\n )\n );\n\n $processedMaps = $mapBuilder->build(array(__DIR__.'/../../Documents/Annotation.php'));\n $annotationMap = $processedMaps['\\Plemi\\Bundle\\BoomgoBundle\\Tests\\Documents\\Annotation'];\n\n $this->assert()\n ->string($annotationMap->getType())\n ->isEqualTo('EMBEDDED_DOCUMENT')\n ->string($annotationMap->getConnection())\n ->isEqualTo('local_connection')\n ->string($annotationMap->getCollection())\n ->isEqualTo('my_collection');\n }", "title": "" }, { "docid": "ff4f5b0822612dc2fac06601c6b9cd8d", "score": "0.4109948", "text": "protected function completeForm(array &$form)\n\t{\n\t\t$required_fields = $this->getRequiredFields();\n\t\t$completed = true;\n\t\t$missing = [];\n\n\t\t$table = $this->db->getTable($this->table_name);\n\n\t\tforeach ($required_fields as $field) {\n\t\t\tif (!isset($form[$field])) {\n\t\t\t\t$column = $table->getColumn($field);\n\t\t\t\t$default = $column->getTypeObject()\n\t\t\t\t\t\t\t\t ->getDefault();\n\n\t\t\t\tif (null === $default) {\n\t\t\t\t\t$completed = false;\n\t\t\t\t\t$missing[] = $field;\n\t\t\t\t} else {\n\t\t\t\t\t$form[$field] = $default;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$completed) {\n\t\t\tthrow new ORMQueryException('GOBL_ORM_REQUEST_MISSING_FIELDS', $missing);\n\t\t}\n\t}", "title": "" }, { "docid": "7e2428e8439f896250e9bff312f46393", "score": "0.41008914", "text": "protected function updateEntityAssociation(array &$converted, string $entityKey, ?string $mappingEntity = null): void\n {\n $associationEntities = [];\n\n if (!isset($converted[$entityKey])) {\n return;\n }\n\n foreach ($converted[$entityKey] as $associatedEntity) {\n $identifier = $associatedEntity['id'];\n\n if ($mappingEntity !== null) {\n $identifier = $this->getMappingIdFacade($mappingEntity, $identifier);\n }\n\n $associationEntities[] = [\n 'id' => $identifier,\n ];\n }\n\n $converted[$entityKey] = $associationEntities;\n }", "title": "" }, { "docid": "786844b87721933eceedc23e53ee0a99", "score": "0.40370288", "text": "public function step_map_fields_is_completed() {\r\n\t\t$this->addon_form_settings = $this->get_form_settings_values();\r\n\t\tif ( ! $this->step_choose_mail_list_is_completed() ) {\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( empty( $this->addon_form_settings['fields_map'] ) ) {\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( ! is_array( $this->addon_form_settings['fields_map'] ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( count( $this->addon_form_settings['fields_map'] ) < 1 ) {\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * TODO: check if saved fields_map still valid, by request merge_fields on mailchimp\r\n\t\t * Easy achieved but will add overhead on site\r\n\t\t * force_form_disconnect();\r\n\t\t * save_force_form_disconnect_reason();\r\n\t\t */\r\n\r\n\t\treturn true;\r\n\r\n\t}", "title": "" }, { "docid": "1838765232668f5a015de0db201b90bb", "score": "0.40245646", "text": "public function testDiscoverReverseAssociations(array $owningMapping, array $inverseMapping)\n {\n $this->testDiscoverAssociations($inverseMapping, $owningMapping);\n }", "title": "" }, { "docid": "56a445a016d2b5d47a0837ea184e99e9", "score": "0.40026993", "text": "protected function definition_complete() {\n if (!$this->structure instanceof mod_feedback_completion) {\n // We should not really be here but just in case.\n return;\n }\n $pages = $this->structure->get_pages();\n $gopage = $this->gopage;\n $pageitems = $pages[$gopage];\n $hasnextpage = $gopage < count($pages) - 1; // Until we complete this page we can not trust get_next_page().\n $hasprevpage = $gopage && ($this->structure->get_previous_page($gopage, false) !== null);\n\n // Add elements.\n foreach ($pageitems as $item) {\n $itemobj = feedback_get_item_class($item->typ);\n $itemobj->complete_form_element($item, $this);\n }\n\n // Remove invalid buttons (for example, no \"previous page\" if we are on the first page).\n if (!$hasprevpage) {\n $this->remove_button('gopreviouspage');\n }\n if (!$hasnextpage) {\n $this->remove_button('gonextpage');\n }\n if ($hasnextpage) {\n $this->remove_button('savevalues');\n }\n }", "title": "" }, { "docid": "9a5040a6cd30a46c79d9e44d8258ceab", "score": "0.39991397", "text": "protected function handleBelongsToRelations(): void\n {\n foreach ($this->relationInfo as $attribute => $info) {\n if (! Arr::has($this->data, $attribute) || ! $info->isBelongsTo()) {\n continue;\n }\n\n $this->belongsTosWereUpdated = true;\n\n /** @var Model|null $formerlyAssociatedModel */\n $formerlyAssociatedModel = $this->model->{$info->relationMethod()}()->first();\n\n $result = $this->handleNestedSingleUpdateOrCreate(\n Arr::get($this->data, $attribute),\n $info,\n $attribute\n );\n\n $result = $result instanceof UpdateResult\n ? $result->model()\n : $result;\n\n // update model by associating or dissociating as necessary\n if ($result !== false && $result !== null) {\n // if the model associated now is different from the one before, delete if we should\n if (\n $info->isDeleteDetached()\n && $formerlyAssociatedModel\n && $formerlyAssociatedModel->getKey() !== $result->getKey()\n ) {\n $this->deleteFormerlyRelatedModel($formerlyAssociatedModel, $info);\n }\n\n $this->model->{$info->relationMethod()}()->associate($result);\n continue;\n }\n\n if ($info->isDeleteDetached() && $formerlyAssociatedModel) {\n $this->deleteFormerlyRelatedModel($formerlyAssociatedModel, $info);\n }\n\n $this->model->{$info->relationMethod()}()->dissociate();\n }\n }", "title": "" }, { "docid": "6e6ce9a8e395252ad23d507893988300", "score": "0.39862904", "text": "public function visitAssociation($className, $association = null)\n {\n if (null === $association) {\n return $this->visitSingleSidedAssociation($className);\n }\n\n return $this->visitDoubleSidedAssociation($className, $association);\n }", "title": "" }, { "docid": "39efe5f32ea31b89cb2741127807c62b", "score": "0.39595842", "text": "public static function processExternalReferenceAutoComplete(array &$element, FormStateInterface $form_state, array &$complete_form) {\n // Nothing to do if there is no target entity type.\n if (!empty($element['#endpoint_list'])) {\n $element['#autocomplete_route_name'] = 'external_reference_field.autocomplete';\n $element['#autocomplete_route_parameters'] = [\n 'endpoint_list' => base64_encode($element['#endpoint_list']),\n ];\n return $element;\n }\n }", "title": "" }, { "docid": "c6b5b48dd31c42aee65164b095f44cff", "score": "0.3937036", "text": "public function setupAssociations() \n {\n\n }", "title": "" }, { "docid": "54a9e4e87e360eeffdd98362de4839f9", "score": "0.39332193", "text": "public function clearAportacions()\n {\n $this->collAportacions = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "42d0a66162b0eb163da4046d1373890b", "score": "0.39169502", "text": "public function problemMapping()\n {\n $this->form_validation->set_rules('customer', 'Customer', 'required|trim');\n $this->form_validation->set_rules('address-customer', 'Address Customer', 'required|trim|min_length[20]', [\n 'min_length' => 'Address at least 10 characters long'\n ]);\n $this->form_validation->set_rules('tariff', 'Tarif', 'required|trim|max_length[2]', [\n 'max_length' => 'Maximum 2 characters'\n ]);\n $this->form_validation->set_rules('power', 'Daya', 'required|trim');\n $this->form_validation->set_rules('dropDown', 'Service', 'required');\n\n // Form Validation Company Profile\n $this->form_validation->set_rules('company-name', 'Company Name', 'required|trim');\n $this->form_validation->set_rules('address-company', 'Company Address', 'required|trim');\n $this->form_validation->set_rules('phone-company', 'Phone Company', 'required|trim');\n $this->form_validation->set_rules('facsimile', 'Facsimile', 'required');\n $this->form_validation->set_rules('email-company', 'Email Company', 'required|trim|is_unique[company_profile.email_company]');\n $this->form_validation->set_rules('establishment', 'Establishment', 'required');\n\n // Form Validation Info Chief\n $this->form_validation->set_rules('company-leader-name', 'Leader Name', 'required|trim');\n $this->form_validation->set_rules('leader-position-company', 'Leader Position', 'required|trim');\n $this->form_validation->set_rules('phone-leader-company', 'Leader Phone Number', 'required|trim');\n $this->form_validation->set_rules('email-leader-company', 'Leader Email', 'required|trim|valid_email|is_unique[company_leader.email]');\n\n // Form Validation Info Finance Affairs\n $this->form_validation->set_rules('company-finance-name', 'Finance Name', 'required|trim');\n $this->form_validation->set_rules('finance-position-company', 'Finance Position', 'required|trim');\n $this->form_validation->set_rules('phone-finance-company', 'Finance Phone Number', 'required|trim|numeric');\n $this->form_validation->set_rules('email-finance-company', 'Finance Email', 'required|trim|is_unique[company_finance.email]');\n\n // Form Validation Info Engineering Affairs\n $this->form_validation->set_rules('company-engineering-name', 'Engineering Name', 'required|trim');\n $this->form_validation->set_rules('engineering-position-company', 'Engineering Position', 'required|trim');\n $this->form_validation->set_rules('phone-engineering-company', 'Engineering Phone Number', 'required|trim|numeric');\n $this->form_validation->set_rules('email-engineering-company', 'Engineering Email', 'required|trim|is_unique[company_engineering.email]');\n\n // Form Validation Info General Affairs\n $this->form_validation->set_rules('company-general-name', 'General Name', 'required|trim');\n $this->form_validation->set_rules('general-position-company', 'General Position', 'required|trim');\n $this->form_validation->set_rules('phone-general-company', 'General Phone Number', 'required|trim');\n $this->form_validation->set_rules('email-general-company', 'General Email', 'required|trim|is_unique[company_general.email]');\n\n // Form Validation Info Technical Specification\n $this->form_validation->set_rules('captive-power', 'Captive Power', 'required|trim|max_length[2]');\n $this->form_validation->set_rules('amount-of-power', 'Amount of Power', 'required|trim');\n $this->form_validation->set_rules('next-meeting', 'Next Meeting', 'required|trim');\n $this->form_validation->set_rules('suggestion', 'Suggestion', 'required|trim|min_length[10]', [\n 'min_length' => 'Suggestion at least 10 Characters'\n ]);\n\n if ($this->form_validation->run() == false) {\n $data['title'] = 'Problem Mapping';\n $data['user'] = $this->M_Auth->getUserByEmail($this->session->userdata('email'));\n $data['dropDown'] = $this->M_Admin->getService();\n $data['notif'] = get_new_notif();\n\n $this->load->view('templates/header', $data);\n $this->load->view('templates/sidebar', $data);\n $this->load->view('templates/topbar', $data);\n $this->load->view('user/problem-mapping', $data);\n $this->load->view('templates/footer');\n } else {\n $status = $this->M_Admin->uploadProblemMapping();\n if ($status) {\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\" role=\"alert\">\n Data has been added!</div>');\n redirect('user/problemMapping');\n } else {\n $this->session->set_flashdata('message', '<div class=\"alert alert-danger\" role=\"alert\">\n Failed to save data!</div>');\n redirect('user/problemMapping');\n }\n }\n }", "title": "" }, { "docid": "6bc60000ec034e9ea567eedb45ba16cc", "score": "0.3913842", "text": "public function onBeforeDelete()\n {\n foreach ($this->owner->LDAPGroupMappings() as $mapping) {\n $mapping->delete();\n }\n }", "title": "" }, { "docid": "6ddb65f2c0ae169bfc1e037173844b70", "score": "0.3899611", "text": "public function mapping(PrepareMappingEvent $event) {\n $mappingConfig = $event->getMappingConfig();\n $type = $event->getMappingType();\n if ($type == 'attachment') {\n $mappingConfig['fields'] = [\n \"content\" => [\n \"store\" => TRUE,\n \"term_vector\" => \"with_positions_offsets\",\n ],\n ];\n $event->setMappingConfig($mappingConfig);\n }\n }", "title": "" }, { "docid": "56a17ffc7be295b2a60619c27dbf09c9", "score": "0.38925466", "text": "public function testsavemappingdoesnotdeletemappingsforotherentities() {\n global $CFG, $DB;\n $file = get_plugin_directory('rlipimport', 'version1elis').'/lib.php';\n require_once($file);\n\n // Create a user mapping record.\n $mapping = new stdClass;\n $mapping->entitytype = 'user';\n $mapping->standardfieldname = 'test';\n $mapping->customfieldname = 'customtest';\n $DB->insert_record(RLIPIMPORT_VERSION1ELIS_MAPPING_TABLE, $mapping);\n\n // Obtain the available fields for course mappings.\n $plugin = new rlip_importplugin_version1elis(null, false);\n $options = $plugin->get_available_fields('user');\n\n // Store course mapping.\n rlipimport_version1elis_save_mapping('course', $options, array());\n\n // Data validation.\n $exists = $DB->record_exists(RLIPIMPORT_VERSION1ELIS_MAPPING_TABLE, array('entitytype' => 'user'));\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "af7434038dd27d094650641a5f110be9", "score": "0.38917628", "text": "public function assertValidPropertyDefinition(\n array $mapping,\n array $defaultMappings,\n $property,\n $entityName\n );", "title": "" }, { "docid": "4a40478ca0e948d2a6cb9fd9f6a1b1fb", "score": "0.38890547", "text": "public function getAssociationMapping($fieldName)\n {\n if (isset($this->_associationMappings[$fieldName])) {\n return $this->_associationMappings[$fieldName];\n } else {\n throw new \\InvalidArgumentException(\n 'Unknown association field \"' . $fieldName . ' for entity \"' . $this->_entityName. '\".'\n );\n }\n }", "title": "" }, { "docid": "d6199a61a964cf962d9b57945a9a3be7", "score": "0.38824213", "text": "protected function completeJob() {\n $this->isComplete = true;\n $nextgeneration = new GenerateSiteMapJob();\n singleton('QueuedJobService')\n ->queueJob($nextgeneration, date('Y-m-d H:i:s', time() + self::$regenerate_time));\n }", "title": "" }, { "docid": "d60abca8c49fb94e0e9e993e1b08a39e", "score": "0.38524595", "text": "protected function applyConfiguration(PropertyMappingConfiguration $configuration, array $allowedPropertyNames, array $options, $dataType) {\n\t\t$propertyNames = $this->reflectionService->getClassPropertyNames($dataType);\n\n\t\tlist($allowedLevelPropertyNames, $allowedPropertyNamesForSubProperties) = $this->separateLevels($allowedPropertyNames);\n\t\t$allowedLevelPropertyNames = array_intersect($propertyNames, $allowedLevelPropertyNames);\n\t\t$deniedLevelPropertyNames = array_diff($propertyNames, $allowedLevelPropertyNames);\n\n\t\tcall_user_func_array(array($configuration, 'skipProperties'), $deniedLevelPropertyNames);\n\t\tcall_user_func_array(array($configuration, 'allowProperties'), $allowedLevelPropertyNames);\n\n\t\tif (!empty($options)) {\n\t\t\t$configuration->setTypeConverterOptions('TYPO3\\Flow\\Property\\TypeConverter\\PersistentObjectConverter', $options);\n\t\t}\n\n\t\tforeach ($allowedPropertyNamesForSubProperties as $subPropertyName => $allowedSubPropertyNames) {\n\t\t\tif (!in_array($subPropertyName, $allowedLevelPropertyNames)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$classSchema = $this->reflectionService->getClassSchema($dataType);\n\t\t\t$propertySchema = $classSchema->getProperty($subPropertyName);\n\t\t\tif (empty($propertySchema['type'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->applyConfiguration(\n\t\t\t\t$configuration->forProperty($subPropertyName),\n\t\t\t\t$allowedSubPropertyNames,\n\t\t\t\t$options,\n\t\t\t\t$propertySchema['type']\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "3281cbb62b64e5eb7c51e5fcc8ecc4e7", "score": "0.3848609", "text": "public function testValidateComposerAutoLoadingPsr4ClassMap($classMap, $subPath, $namespace, $result)\n {\n $command = $this->getCommand();\n $this->assertEquals(\n $result,\n $command->validateComposerAutoLoadingPsr4ClassMap(\n $classMap,\n $subPath,\n $namespace\n ),\n $output = $this->getOutputFromCommand($command)\n );\n\n if ($result) {\n $this->assertEmpty($output, $output);\n } else {\n $this->assertNotEmpty($output, $output);\n }\n }", "title": "" }, { "docid": "21b034c9e01ef39d949af2ac046777aa", "score": "0.3848008", "text": "protected function generateAssociation()\n {\n $this->assoc = array();\n # We use sha1 by default.\n $this->assoc['hash'] = 'sha1';\n $this->assoc['mac'] = $this->shared_secret('sha1');\n $this->assoc['handle'] = $this->assoc_handle();\n }", "title": "" }, { "docid": "7ecf2dab7b81666b0945eb4412a8ae5a", "score": "0.38465357", "text": "public function testValidateComposerAutoLoadingClassMapClassMap($classMap, $subPath, $result)\n {\n $command = $this->getCommand();\n $realMessages = array();\n $this->assertEquals(\n $result,\n $command->validateComposerAutoLoadingClassMapClassMap(\n $classMap,\n $subPath,\n $realMessages\n ),\n $output = $this->getOutputFromCommand($command)\n );\n\n if ($result) {\n $this->assertEmpty($output, $output);\n } else {\n $this->assertNotEmpty($output, $output);\n }\n }", "title": "" }, { "docid": "b857c61564f29dd6645c25025357d401", "score": "0.38400775", "text": "public function can_unmap() {\n return ($this->mapping == self::MAPPING_MANUAL_PENDING);\n }", "title": "" }, { "docid": "d2c6e5527320ec37ffc50cc92ebc0781", "score": "0.38343006", "text": "private function updateValidatorMappingFiles(ContainerBuilder $container, string $mapping, string $extension): void\n {\n if (!$container->hasParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files')) {\n return;\n }\n\n $files = $container->getParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files');\n $validationPath = '/config/validation.'.$this->managerType.'.'.$extension;\n\n foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) {\n if ($container->fileExists($file = $bundle['path'].'/Resources'.$validationPath) || $container->fileExists($file = $bundle['path'].$validationPath)) {\n $files[] = $file;\n }\n }\n\n $container->setParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files', $files);\n }", "title": "" }, { "docid": "59e22ddffbbdfce5fd55c40d1bbaa799", "score": "0.3827027", "text": "abstract protected function initializeMappedTypes();", "title": "" }, { "docid": "8ad72a3d6852bb1d5d2bea6e8a43b90e", "score": "0.38259578", "text": "public function autoFinalize() {\n if (!$this->finalized && $this->autoFinalize) $this->finalize();\n }", "title": "" }, { "docid": "c3c4b257c999f12bf429eb010d483cb9", "score": "0.3824912", "text": "public function setAssociations($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Compute\\V1\\FirewallPolicyAssociation::class);\n $this->associations = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "c55c4c44e367707ee1e7c08e24e0dfb5", "score": "0.3820813", "text": "public function testRemoveAssociationSuccess()\r\n {\r\n //start up a new session, going to the contact view page for Bill Jones (ID 24)\r\n $this->session->visit('http://localhost:8000/app_test.php/contact/24');\r\n // Get the page\r\n $page = $this->session->getPage();\r\n\r\n //assert that the associated properties table contains Thug Muny Apts.\r\n $associatedProperties = $page->find(\"css\",\"#associatedProperties\");\r\n $this->assertContains(\"726 East Street\",$associatedProperties->getHtml());\r\n\r\n\r\n //the remove button from property with ID 2 (should be Thug Muny Apts.)\r\n $removeButton = $page->find(\"css\",\"#rmb2\");\r\n\r\n $removeButton->click();\r\n\r\n $this->session->wait(1000);\r\n\r\n //get the modal that will ask the user if they want to accept\r\n $promptModal = $page->find(\"css\",\"#removeModal\");\r\n\r\n //check that the modal is visible\r\n $this->assertTrue($promptModal->isVisible());\r\n\r\n //get the accept button\r\n $acceptBtn = $page->find(\"css\",\"#removeModal #btnAccept\");\r\n\r\n //click the accept button\r\n $acceptBtn->click();\r\n\r\n\r\n $associatedProperties = $page->find(\"css\",\"#associatedProperties\");\r\n\r\n //assert that the associated properties table no longer has Thug Muny Apts.\r\n $this->assertNotContains(\"726 East Street\",$associatedProperties->getHtml());\r\n }", "title": "" }, { "docid": "364b375a68bbf825ef8e5ba054c9a5d0", "score": "0.38081124", "text": "protected function restoreErroneousMappers() {\n $this->erroneousMappers->rewind();\n while ($this->erroneousMappers->valid()) {\n $this->erroneousMappers->current()->save();\n $this->erroneousMappers->next();\n }\n }", "title": "" }, { "docid": "54160628e0f957431bea60c1469ffe7b", "score": "0.38010728", "text": "public function testThrowExceptionIfNoAssociation()\n {\n // Prepare / Mock\n $fromObject = MapperModelTester::getNew(['userId' => 15]);\n\n // Execute\n $this->testObject->getAssociated(Product::class, $fromObject);\n }", "title": "" }, { "docid": "ae22befd3739bb4110a0640e1e231a45", "score": "0.37504712", "text": "public function getAssociationMappedByTargetField($assocName)\n {\n return null;\n }", "title": "" }, { "docid": "9cc41af2bd218652627175c367cbd8f7", "score": "0.3747495", "text": "function mapping_convert($original_data) {\n global $output;\n global $default_configuration;\n\n $map_data = array();\n\n foreach ($original_data as $key => $value) {\n if (isset($default_configuration['datatypes'][$key]['mapping']) and is_array($default_configuration['datatypes'][$key]['mapping'])) {\n $mapping_array = $default_configuration['datatypes'][$key]['mapping'];\n\n $output->debug(__FUNCTION__, \"[MAPPING] Found mapping for: \" . $key . \" with value=\" . $value, \"4\");\n $output->debug(__FUNCTION__, \"[MAPPING] Map array: \" . $output->array_output($mapping_array), \"4\");\n if (isset($mapping_array[$value]) and $mapping_array[$value]) {\n $mapresult = $mapping_array[$value];\n $output->debug(__FUNCTION__, \"[MAPPING] MAP RESULT=\" . $mapresult, \"4\");\n $map_data[$key] = $mapresult;\n $map_data[$key . \"_original\"] = $value;\n } else {\n $output->debug(__FUNCTION__, \"[MAPPING] 2 Couldnt map data because there is no match\", \"4\");\n $map_data[$key] = $value;\n }\n } else {\n $output->debug(__FUNCTION__, \"[MAPPING] 1 Couldnt map data because there is no match\", \"4\");\n $map_data[$key] = $value;\n }\n }\n\n $output->debug(__FUNCTION__, \"[MAPPING] Map data: \" . $output->array_output($map_data), \"4\");\n return $map_data;\n}", "title": "" }, { "docid": "da5304b37c0af8a43662ed9637217b77", "score": "0.37474877", "text": "public function unmap_category() {\n if (!$this->can_unmap()) {\n throw new directorytree_exception(\"Unmapping of directories can only be done when mapping is pending -\".\n \" current mapping status: {$this->mapping}\");\n }\n\n $this->set_field('categoryid', null);\n $this->set_field('mapping', self::MAPPING_AUTOMATIC);\n }", "title": "" }, { "docid": "25fd8d4d92bfd8a5e7e391e889f043fc", "score": "0.3734227", "text": "public function loadMapped(\n Entity $oMappedEntity,\n array $aParameters = array(),\n array $aOrderFields = array(),\n $mLimit = null\n )\n {\n $aMappingConf = $this->loadMappingConfiguration(get_class($oMappedEntity));\n if (is_null($aMappingConf) === false && $this->checkMappingConfiguration($aMappingConf) === true) {\n\n # Build optional source foreign key name parameter\n if (isset($aMappingConf[MappingAbstract::KEY_SOURCE_ENTITY_REFERENCE]) === true) {\n $sSourceForeignKeyName = $aMappingConf[MappingAbstract::KEY_SOURCE_ENTITY_REFERENCE];\n } else {\n $sSourceForeignKeyName = $this->oSourceEntity->computeForeignKeyName();\n }\n\n # Build optional mapped foreign key name parameter\n if (isset($aMappingConf[MappingAbstract::KEY_MAPPED_ENTITY_REFERENCE]) === true) {\n $sMappedForeignKeyName = $aMappingConf[MappingAbstract::KEY_MAPPED_ENTITY_REFERENCE];\n } else {\n $sMappedForeignKeyName = $this->oSourceEntity->computeForeignKeyName();\n }\n\n # Build the mapping table query\n $oSelect = new Select();\n $oSelect->addColumn($sMappedForeignKeyName)\n ->setFrom($aMappingConf[self::KEY_MAPPING_TABLE])\n ->addWhereCondition(Operators::equal($sSourceForeignKeyName));\n $oStatement = Pdo::dbQuery(\n $oSelect->build(),\n array($sSourceForeignKeyName => $this->oSourceEntity->getId())\n );\n\n if ($oStatement !== false) {\n\n $aIds = $oStatement->fetchAll(\\PDO::FETCH_COLUMN, 0);\n if (count($aIds) === 0) {\n return null;\n }\n\n /** @var Entity $oMappedEntity */\n $oMappedEntity = new $oMappedEntity;\n $sMappedEntityCollectionClassName = $oMappedEntity->computeCollectionClassName();\n /** @var EntityCollection $oMappedCollection */\n $oMappedCollection = new $sMappedEntityCollectionClassName;\n\n # Build parameters\n $aParameters[$oMappedEntity->getPrimaryKeyName()] = $aIds;\n\n $oMappedCollection->loadByParameters(\n $aParameters,\n $aOrderFields,\n $mLimit\n );\n\n return $oMappedCollection;\n }\n\n }\n return null;\n }", "title": "" }, { "docid": "c3cd16ce2b08097fbca32ae19ea6acf9", "score": "0.37284797", "text": "protected function _saveAssociatedHandler() {\n $request = $this->_request();\n $model = $this->_model();\n $_originalData = $request->data;\n $ret = true;\n\n if ($this->saveMethod() == 'saveAssociated' && $this->config('saveAssociatedHandler')) {\n //validate main model\n $model->set($request->data);\n $ret &= $model->validates($this->saveOptions());\n //validate associated models\n foreach ($request->data as $modelName => $item) {\n if (!empty($model->$modelName)) {\n $model->$modelName->set($request->data);\n $ret &= $model->$modelName->validates($this->saveOptions());\n }\n }\n\n // $ret &= $model->validateAssociated($request->data, $this->saveOptions());\n\n $request->data = $_originalData;\n $this->saveOptions(['validate' => false, 'atomic' => true]);\n }\n \n return $ret;\n }", "title": "" }, { "docid": "e27baf5e06aa2c4cc0ecda18dcda6c49", "score": "0.37277365", "text": "protected abstract function RegisterEntityRelationalMaps(Registrar $Registrar);", "title": "" }, { "docid": "2680eab74514c627c2b4769c981b0a72", "score": "0.37136486", "text": "public function testInvokeWillNotSaveAssociationsIfEntityDoesNotImplementAggregateEntityInterface($entity): void\n {\n $listener = new CascadeSaveListener($this->cascadeSaveService);\n\n /** @var EntityEvent&MockObject $event */\n $event = $this->createMock(EntityEvent::class);\n\n $event->expects($this->once())\n ->method('getEntity')\n ->willReturn($entity);\n\n $this->cascadeSaveService->expects($this->never())->method('saveAssociations');\n\n $listener($event);\n }", "title": "" }, { "docid": "a61a6f549ca35e9d238c902f5db39592", "score": "0.37063947", "text": "public function import_region_mappings() {\n\t\t$file_ca = WWW_ROOT.'files/geo/ca_partial_postcodes_by_region.csv'; \n\t\t$file_gb = WWW_ROOT.'files/geo/gb_partial_postcodes_by_region.csv'; \n\t\tif (!file_exists($file_ca) || !file_exists($file_gb)) {\n\t\t\techo 'Make sure the following files exist: '.\"\\n\";\n\t\t\techo $file_ca. \"\\n\";\n\t\t\techo $file_gb. \"\\n\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$csv_rows = Utils::csv_to_array($file_ca); \n\t\tforeach ($csv_rows as $csv_row) {\n\t\t\t/* values\n\t\t\t\t0 => partial post code\n\t\t\t\t1 => City\n\t\t\t\t2 => region\n\t\t\t */\n\t\t\t$count = $this->RegionMapping->find('count', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'RegionMapping.postal_prefix' => $csv_row[0],\n\t\t\t\t\t'RegionMapping.country_code' => 'CA'\n\t\t\t\t)\n\t\t\t));\n\t\t\tif ($count > 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$this->RegionMapping->create();\n\t\t\t$this->RegionMapping->save(array('RegionMapping' => array(\n\t\t\t\t'postal_prefix' => $csv_row[0],\n\t\t\t\t'city' => $csv_row[1],\n\t\t\t\t'country_code' => 'CA',\n\t\t\t\t'region' => $csv_row[2],\n\t\t\t)));\n\t\t\techo '[CA]'.$csv_row[0]. ' saved.'. \"\\n\";\n\t\t}\n\t\t\n\t\t$csv_rows = Utils::csv_to_array($file_gb); \n\t\tforeach ($csv_rows as $csv_row) {\n\t\t\t/* values\n\t\t\t\t0 => partial post code\n\t\t\t\t1 => City\n\t\t\t\t2 => region\n\t\t\t */\n\t\t\t$count = $this->RegionMapping->find('count', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'RegionMapping.postal_prefix' => $csv_row[0],\n\t\t\t\t\t'RegionMapping.country_code' => 'GB'\n\t\t\t\t)\n\t\t\t));\n\t\t\tif ($count > 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$this->RegionMapping->create();\n\t\t\t$this->RegionMapping->save(array('RegionMapping' => array(\n\t\t\t\t'postal_prefix' => $csv_row[0],\n\t\t\t\t'city' => $csv_row[1],\n\t\t\t\t'country_code' => 'GB',\n\t\t\t\t'region' => $csv_row[2],\n\t\t\t)));\n\t\t\techo '[GB]'.$csv_row[0]. ' saved.'. \"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "70693a006223660b7ca343dcd2071edc", "score": "0.3705185", "text": "public function valid(){\n\t\t\treturn !is_null($this->association());\n\t\t}", "title": "" }, { "docid": "67076cc0f2571a39618e490ed7c7077c", "score": "0.370511", "text": "public static function associated_occurrence($auth, $args, $tabalias, array $options, $path) {\n if (empty($options['association_type_id'])) {\n return 'A @association_type_id option is required for the [extra_data_entry_controls.associated_occurrence] ' .\n 'control.';\n }\n $r = '';\n $index = (empty($options['index']) || !preg_match('/^\\d+$/', $options['index'])) ? 0 : $options['index'];\n $options = array_merge(array(\n 'fieldname' => 'occurrence:associated_taxa_taxon_list_id',\n 'type_fieldname' => 'occurrence_association:occurrence_type_id',\n 'id_fieldname' => 'occurrence_association:id',\n 'to_fieldname' => 'occurrence_association:to_occurrence_id',\n 'taxon_list_id' => empty($args['list_id']) ? $args['extra_list_id'] : $args['list_id'],\n 'extraParams' => [],\n ), $options);\n $options['fieldname'] .= \":$index\";\n $options['type_fieldname'] .= \":$index\";\n $options['id_fieldname'] .= \":$index\";\n $options['to_fieldname'] .= \":$index\";\n if (!empty(data_entry_helper::$entity_to_load['occurrence:id'])) {\n // Loading an existing record so pull in the existing associations IDs,\n // to prevent duplication of records when we save.\n static $associated_occurrence_data = FALSE;\n if ($associated_occurrence_data === FALSE) {\n $associated_occurrence_data = data_entry_helper::get_population_data(array(\n 'table' => 'occurrence_association',\n 'extraParams' => $auth['read'] + array(\n 'from_occurrence_id' => data_entry_helper::$entity_to_load['occurrence:id'],\n 'orderby' => 'id',\n ),\n 'caching' => FALSE,\n ));\n }\n if (isset($associated_occurrence_data[$index])) {\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => $options['id_fieldname'],\n 'default' => $associated_occurrence_data[$index]['id'],\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => $options['to_fieldname'],\n 'default' => $associated_occurrence_data[$index]['to_occurrence_id'],\n ));\n // Store the taxa_taxon_list_id as -1. This indicates to the submission\n // code that the ttlID has not changed, so no need to update the\n // association.\n $options['default'] = -1;\n $options['defaultCaption'] = $associated_occurrence_data[$index]['to_taxon'];\n }\n }\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => $options['type_fieldname'],\n 'default' => $options['association_type_id'],\n ));\n $options['extraParams'] += $auth['read'];\n if (empty($options['extraParams']['taxon_list_id'])) {\n $options['extraParams']['taxon_list_id'] = $options['taxon_list_id'];\n }\n $r .= data_entry_helper::species_autocomplete($options);\n // Flag to tell the submission build code to run code to include the\n // association.\n if ($index == 0) {\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'submission_extensions[]',\n 'default' => 'extra_data_entry_controls.build_submission_associations',\n ));\n }\n if (!empty($options['copy_attributes']) && preg_match('/^\\d+(?:,\\d+)*$/', $options['copy_attributes'])) {\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => \"association_copy_attributes:$index\" ,\n 'default' => $options['copy_attributes'],\n ));\n }\n return $r;\n }", "title": "" }, { "docid": "6b051fdf93fd534e36c58687123b3ebe", "score": "0.37008238", "text": "public function mapField(array $mapping)\n {\n $this->_validateAndCompleteFieldMapping($mapping);\n \n if (isset($this->fieldMappings[$mapping['fieldName']]) || isset($this->associationMappings[$mapping['fieldName']])) {\n throw MappingException::duplicateFieldMapping($this->name, $mapping['fieldName']);\n }\n \n $this->fieldMappings[$mapping['fieldName']] = $mapping;\n }", "title": "" }, { "docid": "4f02675eb163ead5fc83b5ea0ab13388", "score": "0.3698126", "text": "public function onAfterLoad(MapperEvent $e)\n {\n }", "title": "" }, { "docid": "93c4a16c33dbe4aecba6a7c6b542b6e4", "score": "0.36947057", "text": "protected function finalize()\n {\n// Check if rules attributes is given\n if (null !== ($rule = array_get($this->attributes, 'rules'))) {\n $items = explode('|', $rule);\n foreach ($items as $item) {\n $item = explode(':', $item, 2);\n $this->items[$item[0]] = array_get($item, 1, '');\n }\n }\n// @todo find an eloquent way to handle input array validation\n if (isset($this->attributes['multiple']) || Arr::inArray($this->attributes, 'multiple')) {\n\n foreach (['numeric', 'integer', 'max', 'min'] as $key) {\n if (null !== ($x = array_pull($this->items, $key))) {\n $this->items[$key . 'Array'] = $x;\n }\n }\n }\n }", "title": "" }, { "docid": "151c91e89fabc3c8937a53a43964e895", "score": "0.36874217", "text": "public function updateAssoc($assoc){\r\n\t\tif(!($assoc instanceof Association)){\r\n\t\t\t$err['Erreur'] = 'Paramètre invalide, le paramètre $assoc doit être une instance de la classe Association. Donné : '.gettype($assoc).'.';\r\n\t\t\t$err['origine'] = 'Méthode updateAssoc';\r\n\t\t\treturn $err;\r\n\t\t}\r\n\t\t\r\n\t\t$req = $this->_pdo->prepare('UPDATE association \r\n\t\t\t\t\t\t\t\t\t SET \r\n\t\t\t\t\t\t\t\t\t\tnbOui = :nbOui, \r\n\t\t\t\t\t\t\t\t\t\tnbNon = :nbNon, \r\n\t\t\t\t\t\t\t\t\t\tverse = :verse, \r\n\t\t\t\t\t\t\t\t\t\trepAcquise = :repAcquise, \r\n\t\t\t\t\t\t\t\t\t\tvaleurRep = :valeurRep\r\n\t\t\t\t\t\t\t\t\t WHERE \r\n\t\t\t\t\t\t\t\t\t\tLid = :Lid AND \r\n\t\t\t\t\t\t\t\t\t\tQid = :Qid');\r\n\t\t\r\n\t\t$req->bindValue(':nbOui', $assoc->nbOui());\r\n\t\t$req->bindValue(':nbNon', $assoc->nbNon());\r\n\t\t$req->bindValue(':verse', $assoc->verse());\r\n\t\t$req->bindValue(':repAcquise', $assoc->repAcquise());\r\n\t\t$req->bindValue(':valeurRep', $assoc->valeurRep());\r\n\t\t$req->bindValue(':Lid', $assoc->lexeme()->lid());\r\n\t\t$req->bindValue(':Qid', $assoc->item()->qid());\r\n\t\t$req->execute();\r\n\t}", "title": "" }, { "docid": "82ce8cca798791d029814c552536a1f8", "score": "0.36839184", "text": "public function addToMapWithLengthValidation(\n \\stdClass $mapping,\n $value,\n $key,\n $min = self::DEFAULT_MIN,\n $max = self::DEFAULT_MAX,\n $optional = true,\n $name = null\n ) {\n $name = $name ?: $key;\n\n if ($this->assertNotNull($value, $optional, $name)\n && $this->assertLength($value, $min, $max, $name)\n ) {\n $mapping->{$key} = (string)$value;\n }\n\n return $mapping;\n }", "title": "" }, { "docid": "af16685ed130af4f06941926a4669035", "score": "0.36814478", "text": "function generateMapping() {\n $param = array(\n \"version\" => 3,\n \"contact_type\" => \"Organization\",\n \"contact_sub_type\" => \"Higher_Education_Institution\",\n \"rowCount\" => 10000,\n );\n\n $result = civicrm_api(\"Contact\", \"get\", $param);\n\n $universityMap = array();\n\n foreach ($result[\"values\"] as $value) {\n $universityName = self::cleanTextResponse($value[\"display_name\"]);\n $universityName = self::cleanUniversityName($universityName);\n if (array_key_exists($universityName, $universityMap)) {\n //echo \"University clash \" . $universityMap[$universityName] . \" with \" . $value[\"contact_id\"] . \"\\n\";\n }\n $universityMap[$universityName] = $value[\"contact_id\"];\n }\n\n // Add some manual entries to the mapping\n $universityMap[\"newcastle\"] = 7951;\n $universityMap[\"ucl\"] = 8007;\n $universityMap[\"leeds trinity\"] = 7933;\n $universityMap[\"northumbria\"] = 7955;\n $universityMap[\"uclan\"] = 7884;\n $universityMap[\"uwe\"] = 8009;\n $universityMap[\"west england\"] = 8009;\n $universityMap[\"lse\"] = 7945;\n $universityMap[\"imperial\"] = 7923;\n $universityMap[\"imperial college london\"] = 7923;\n $universityMap[\"mmu\"] = 7948;\n $universityMap[\"queen marys\"] = 34696;\n $universityMap[\"queen mary\"] = 34696;\n $universityMap[\"queen mary london\"] = 34696;\n $universityMap[\"ljmu\"] = 7937;\n $universityMap[\"goldsmiths\"] = 7914;\n $universityMap[\"westminister\"] = 8012;\n $universityMap[\"dmu\"] = 7895;\n $universityMap[\"demontfort\"] = 7895;\n $universityMap[\"st marys\"] = 7982;\n $universityMap[\"st georges\"] = 7981;\n $universityMap[\"st georges london\"] = 7981;\n $universityMap[\"royal holloway\"] = 7977;\n $universityMap[\"royal holloway london\"] = 7977;\n $universityMap[\"city london\"] = 7888;\n $universityMap[\"wales newport\"] = 7953;\n $universityMap[\"uea\"] = 7899;\n $universityMap[\"edgehill\"] = 7901;\n $universityMap[\"bedford\"] = 7863;\n\n $this->mapping[\"universityMap\"] = $universityMap;\n\n $collegeMap = array();\n $collegeDuplicate = array();\n\n $collegeApiResultsArray = array();\n\n self::getOrgNamesMap(\"Further_Education_Institution\", $collegeApiResultsArray);\n self::getOrgNamesMap(\"School\", $collegeApiResultsArray);\n\n foreach ($collegeApiResultsArray['values'] as $collegeId => $collegeValues) {\n $collegeName = self::cleanTextResponse($collegeValues[\"display_name\"]);\n $collegeName = self::cleanCollegeName($collegeName);\n $collegeMap[$collegeName] = $collegeId;\n }\n\n $this->mapping[\"collegeMap\"] = $collegeMap;\n\n // Create a manual mapping of education (other that university options), the field\n // as there are multiple fields in Civi that store this data.\n // custom_41 = \"Education summary\" (Multiple choice field)\n // custom_68 = \"Education - current\"\n // custom_74 = \"Non A-Level course\"\n $aLevelUpdates = array(\"custom_41\" => array(\"A-Levels\" => 1), \"custom_68\" => \"Doing_A-Levels\");\n $educationMap[\"alevel\"] = $aLevelUpdates;\n $educationMap[\"a level\"] = $aLevelUpdates;\n $educationMap[\"alevels\"] = $aLevelUpdates;\n $educationMap[\"a levels\"] = $aLevelUpdates;\n\n $asLevelUpdates = array(\"custom_41\" => array(\"AS-Levels\" => 1), \"custom_68\" => \"Doing_A-Levels\");\n $educationMap[\"aslevel\"] = $asLevelUpdates;\n $educationMap[\"as level\"] = $asLevelUpdates;\n $educationMap[\"aslevels\"] = $asLevelUpdates;\n $educationMap[\"as levels\"] = $asLevelUpdates;\n\n $btecUpdates = array(\"custom_41\" => array(\"BTEC\" => 1), \"custom_74\" => \"BTEC\", \"custom_68\" => \"Doing_a_course_other_than_A-levels_at_school_sixth_form_or_college\");\n $educationMap[\"btc\"] = $btecUpdates;\n $educationMap[\"btec\"] = $btecUpdates;\n $educationMap[\"btec\"] = $btecUpdates;\n $educationMap[\"btecs\"] = $btecUpdates;\n\n $gcsesUpdates = array(\"custom_41\" => array(\"GCSEs/O-Levels\" => 1), \"custom_74\" => \"GCSEs/O-Levels\", \"custom_68\" => \"Doing_a_course_other_than_A-levels_at_school_sixth_form_or_college\");\n $educationMap[\"gcses\"] = $gcsesUpdates;\n\n $this->mapping[\"educationMap\"] = $educationMap;\n\n // Create a manual mapping of year group options\n $yearGroupMap[\"11\"] = \"eleven\";\n $yearGroupMap[\"12\"] = \"twelve\";\n $yearGroupMap[\"13\"] = \"thirteen\";\n $yearGroupMap[\"eleven\"] = \"eleven\";\n $yearGroupMap[\"twelve\"] = \"twelve\";\n $yearGroupMap[\"thirteen\"] = \"thirteen\";\n\n $this->mapping[\"yearGroupMap\"] = $yearGroupMap;\n }", "title": "" }, { "docid": "08d67cebe7df33deff6bc487f1a1348d", "score": "0.3679341", "text": "function association_autoriser() {\n}", "title": "" }, { "docid": "c19cc7d02c896d9bf681feac8d277231", "score": "0.3676242", "text": "public function testGetEntityFrom(array $mapping)\n {\n // Mock a ClassMetadata with no mapping informations.\n $metadata = $this->getClassMetadata($mapping['name']);\n\n $builder = new EntityBuilder();\n\n $entity = $builder->getEntityFrom($metadata);\n\n $this->assertInstanceOf('Remg\\GeneratorBundle\\Model\\Entity', $entity,\n 'The method getEntityFrom() should return Entity instances.');\n $this->assertEquals($mapping['name'], $entity->getName(), 'The entity name is wrong.');\n $this->assertEmpty($entity->getFields(), 'The entity should not own any field.');\n $this->assertEmpty($entity->getAssociations(), 'The entity should not own any association.');\n }", "title": "" }, { "docid": "a63e7646d35c2ab23307035ec2b90da7", "score": "0.36743993", "text": "public function testGetAssociationNames()\n {\n $entity = new Entity();\n $entity\n ->addAssociation($this->getAssociation(['fieldName' => 'name1']))\n ->addAssociation($this->getAssociation(['fieldName' => 'name2']));\n\n $associationNames = $entity->getAssociationNames();\n\n $this->assertCount(2, $associationNames, 'The should be two associaions names.');\n $this->assertTrue(in_array('name1', $associationNames), 'The association name \"name1\" should be present.');\n $this->assertTrue(in_array('name2', $associationNames), 'The association name \"name2\" shoud be present.');\n }", "title": "" }, { "docid": "6924f290a460e6aff6002e65d2b0b553", "score": "0.3674357", "text": "public function isComplete(): bool\n {\n $sections = $this->getSections();\n\n if (empty($sections)) {\n return true;\n }\n\n foreach ($sections as $section) {\n $section->setFields();\n\n if (!$section->isComplete()) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "640f1566de00b26ef9bf0d40bae404a0", "score": "0.36654827", "text": "public function testValidateComposerAutoLoadingPsr0ClassMap($classMap, $subPath, $namespace, $result)\n {\n $command = $this->getCommand();\n $this->assertEquals(\n $result,\n $command->validateComposerAutoLoadingPsr0ClassMap(\n $classMap,\n $subPath,\n $namespace\n ),\n $output = $this->getOutputFromCommand($command)\n );\n\n if ($result) {\n $this->assertEmpty($output, $output);\n } else {\n $this->assertNotEmpty($output, $output);\n }\n }", "title": "" }, { "docid": "f799ed96e91954b06a1263149c11d765", "score": "0.3660017", "text": "public function testSaveAssociatedOnlyEntities(): void\n {\n $mock = Mockery::mock('Cake\\ORM\\Table')\n ->shouldAllowMockingMethod('saveAssociated')\n ->makePartial();\n $config = [\n 'sourceTable' => $this->author,\n 'targetTable' => $mock,\n ];\n\n $entity = new Entity([\n 'username' => 'Mark',\n 'email' => '[email protected]',\n 'articles' => [\n ['title' => 'First Post'],\n new Entity(['title' => 'Second Post']),\n ],\n ]);\n\n $mock->shouldNotReceive('saveAssociated');\n\n $association = new HasMany('Articles', $config);\n $result = $association->saveAssociated($entity);\n $this->assertSame($result, $entity);\n }", "title": "" }, { "docid": "4788f92aad69f092c3cf7367c968235f", "score": "0.36573356", "text": "#[@test, @expect(class= 'lang.IllegalStateException', withMessage= 'Web misconfigured: \"app\" section missing or broken')]\n public function emptyMappings() {\n with ($p= \\util\\Properties::fromString('')); {\n $p->writeSection('app');\n\n create(new WebConfiguration($p))->mappedApplications();\n }\n }", "title": "" }, { "docid": "3802f0cd5c0afd4a233c031904e872b0", "score": "0.36560836", "text": "public function complete($entity, $row) {\n if (function_exists('legal_save_accept')) {\n legal_save_accept(1, 1, 'en', 1, $entity->uid);\n }\n\n if (!$row->role) {\n return;\n }\n\n $role = user_role_load_by_name($row->role);\n $entity->roles[$role->rid] = $row->role;\n\n user_save($entity);\n }", "title": "" }, { "docid": "4abd1a76c69a430ef82ba7a819a6ab34", "score": "0.3653178", "text": "protected function endOfAssociationChain()\n {\n $base = $this->beginOfAssociationChain();\n\n return $this->applyScopes($base);\n }", "title": "" }, { "docid": "b5864326ab0891218031877217224901", "score": "0.36523777", "text": "public function associations() {\n\t\t\t}", "title": "" }, { "docid": "5effb8d37477b086eff5b12b4f00e0c2", "score": "0.3642507", "text": "public function testSetCascadeCallbacks(): void\n {\n $this->assertFalse($this->association->getCascadeCallbacks());\n $this->assertSame($this->association, $this->association->setCascadeCallbacks(true));\n $this->assertTrue($this->association->getCascadeCallbacks());\n }", "title": "" }, { "docid": "32165565269b176d243fb50c1d9a2dd7", "score": "0.36398262", "text": "public function clearIntegranteAsociacions()\n {\n $this->collIntegranteAsociacions = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "8f83c7cfb4e3cf718ed97ee0e11412d8", "score": "0.3633113", "text": "public function resolveMapping($attributeName, $value)\n {\n //when no mappings was defined, returns raw value\n if (!$this->hasMapping($attributeName)) {\n return $value;\n }\n\n $mappings = $this->mappingsContainer[$attributeName];\n if (is_array($mappings)) {\n foreach ($mappings as $mappingResolver) {\n if (!$mappingResolver instanceof MappingInterface) {\n //get mapping instance from mapping manager\n $mappingResolver = MappingManager::find($mappingResolver);\n }\n $mappingResolver->resolve($value);\n }\n }\n\n return $value;\n }", "title": "" }, { "docid": "230e20537c63609ccecaa42ff417886d", "score": "0.3631486", "text": "public function update(EntityMapping $entityMapping, Entity $entity);", "title": "" }, { "docid": "e7a235a249b50c9d95081bd2d6d14160", "score": "0.36265653", "text": "function removeAssoc()\n {\n $this->lAss = '00';\n }", "title": "" }, { "docid": "e1cf3053e3307e1b000ddb92a8b60ef1", "score": "0.36244032", "text": "public function wp_ajax_save_mappings() {\n\t\t$data = $_POST['data'];\n\t\t$data = html_entity_decode( stripslashes( $data ) );\n\t\t$maps = WPLR_MappingsManager::instance();\n\t\t$maps->load( $data );\n\t\ttry {\n\t\t\t$maps->save();\n\t\t} catch ( Exception $e) {\n\t\t\twp_send_json_error( $e->getMessage() );\n\t\t}\n\t\twp_send_json_success();\n\t}", "title": "" }, { "docid": "241507b86b7a9839e0f0d22a1f61261f", "score": "0.361542", "text": "public function input_add_complete() {\n\n\t\t\t\tif ($this->value_provided === NULL) {\n\t\t\t\t\t$this->value_provided = true;\n\t\t\t\t\tforeach ($this->fields as $field) {\n\t\t\t\t\t\t$value = (isset($this->value[$field]) ? $this->value[$field] : NULL);\n\t\t\t\t\t\tif ($value === NULL || (is_array($this->input_config[$field]['options']) && $value == '')) {\n\t\t\t\t\t\t\t$this->value_provided = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "357fcc64746c7d4a1d7e4096f63832cc", "score": "0.36123982", "text": "public function setMapping(array $mapping): void\n {\n $this->mapping = $mapping;\n }", "title": "" }, { "docid": "c5b51d920cfd58b37ce42afe811cec51", "score": "0.3612103", "text": "public function testSaveAssociatedNotEmptyNotIterable(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Could not save comments, it cannot be traversed');\n $articles = $this->getTableLocator()->get('Articles');\n $association = $articles->hasMany('Comments', [\n 'saveStrategy' => HasMany::SAVE_APPEND,\n ]);\n\n $entity = $articles->newEmptyEntity();\n $entity->set('comments', 'oh noes');\n\n $association->saveAssociated($entity);\n }", "title": "" }, { "docid": "78fd671adad4ae489403b3933330643a", "score": "0.3607687", "text": "public function initAportacions($overrideExisting = true)\n {\n if (null !== $this->collAportacions && !$overrideExisting) {\n return;\n }\n $this->collAportacions = new ObjectCollection();\n $this->collAportacions->setModel('\\Aportacion');\n }", "title": "" }, { "docid": "2a64d8d93d04c7d7d9b4d1ccd6c1e7c4", "score": "0.36053738", "text": "public function getAssocMapping()\n {\n if ($this->assocMapping == null) {\n foreach ($this->getMapping() as $map) {\n $this->assocMapping[$map['category_id']] = $map;\n }\n }\n\n return $this->assocMapping;\n }", "title": "" }, { "docid": "788ebd7a77a64c237513a953ba1e8754", "score": "0.35983834", "text": "public function setAssociationsDeviceId($var)\n {\n GPBUtil::checkString($var, True);\n $this->writeOneof(3, $var);\n\n return $this;\n }", "title": "" }, { "docid": "4267ed3a2627d685708275e2c21c8692", "score": "0.3597766", "text": "final public static function buildMapping(Mapping $mapping): void\n {\n $mapping\n ->keyword(self::FILTER)\n ->setFeatures(Mapping::FILTER | Mapping::EXCLUSIVE | Mapping::AGGREGATE)\n ->setLabel(__(\n 'Filtre sur la collection (le corpus) du document indexé.',\n 'docalist-search'\n ))\n ->setDescription(__(\n \"Exemples : <code>in:posts</code> (uniquement les articles WordPress),\n <code>in:pages</code> (uniquement les pages WordPress), <code>in:basedoc</code>\n (uniquement les références docalist qui figurent dans la base indiquée).\",\n 'docalist-search'\n ));\n }", "title": "" }, { "docid": "84e61aafaa0afff679602f51bca70ca0", "score": "0.35965437", "text": "public function newassociation(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'address' => 'required',\n 'email' => 'required' \n\n ]);\n\n \n $ass = new Association;\n\n\n if($request->hasFile('photo')){\n \n //$path = $request->file('photo')->store('AssPicture', 'public');\n //$ass->logo = $path;\n\n //Questa sotto salva ma non so come mostrare la foto\n $destinationPath = \"assPicture\";\n $file = $request->photo;\n $extension = $file->getClientOriginalExtension();\n \n $filename = rand(1111,9999).\".\".$extension;\n $file->move($destinationPath,$filename);\n $ass->logo = $filename;\n }\n else{\n \n $ass->logo = \"\";\n }\n\n $ass->name = $request->name;\n $ass->email = $request->email;\n\n if($request->webiste){\n $ass->link_one = $request->webiste;\n }else{\n $ass->link_one = \"\";\n }\n if($request->facebook){\n $ass->link_two = $request->facebook;\n }else{\n $ass->link_two = \"\";\n }\n if($request->instagram){\n $ass->link_three = $request->instagram;\n }else{\n $ass->link_three = \"\";\n }\n \n $ass->description = $request->description;\n $ass->address = $request->address;\n $ass->save();\n\n $user = DB::table('users')\n ->where('id', '=', \\Auth::user()->id)\n ->update(['admin' => 1]);\n\n $admin = new Admin;\n $admin->user_id = \\Auth::user()->id;\n\n\n $assid = DB::table('associations')\n ->where('name', '=', $ass->name)->get();\n\n foreach($assid as $x){\n $admin->ass_id = $x->id;\n break;\n }\n\n $admin->save();\n\n \n return redirect()->action('EventsController@loggedindex');\n }", "title": "" }, { "docid": "2351f5f2d30431ad8cb060920b2b2477", "score": "0.35957548", "text": "public function clearCargoGrupoSences()\n {\n $this->collCargoGrupoSences = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "05a74fe8a271873b12951d38b1a77bbb", "score": "0.3591373", "text": "public function testGenerateAssociationQuery() {\n\t\t$this->loadFixtures('Article');\n\t\t$Article = ClassRegistry::init('Article');\n\n\t\t$queryData = array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => 1\n\t\t\t),\n\t\t\t'fields' => array(\n\t\t\t\t'Article.id',\n\t\t\t\t'Article.title',\n\t\t\t),\n\t\t\t'joins' => array(),\n\t\t\t'limit' => 2,\n\t\t\t'offset' => 2,\n\t\t\t'order' => array('title'),\n\t\t\t'page' => 2,\n\t\t\t'group' => null,\n\t\t\t'callbacks' => 1\n\t\t);\n\n\t\t$result = $this->db->generateAssociationQuery($Article, null, null, null, null, $queryData, false);\n\t\t$this->assertContains('SELECT', $result);\n\t\t$this->assertContains('FROM', $result);\n\t\t$this->assertContains('WHERE', $result);\n\t\t$this->assertContains('ORDER', $result);\n\t}", "title": "" }, { "docid": "8c46e0e16c80e6d9425ee29ef2516b81", "score": "0.35883176", "text": "protected function setIsInitialized(bool $flag): Mappings\n {\n $this->isInitialized = $flag;\n }", "title": "" }, { "docid": "cddfe06f42285e78ca22184de290bc96", "score": "0.35847595", "text": "public function complete($entity, $row) {\n // Load target node\n $node = node_load($entity->nid);\n $node_language = $node->language;\n\n // Delete the existing field_ingredients entries\n if (!empty($row->migrate_map_destid1)\n && count($node->field_ingredients[$node_language]) > 0\n ) {\n $field_collection_item_values = array();\n foreach ($node->field_ingredients[$node_language] as $key => $value) {\n // Build array of field collection values.\n $field_collection_item_values[] = $value['value'];\n // Unset them.\n unset($node->field_ingredients[$node_language][$key]);\n }\n // Delete field collection items.\n entity_delete_multiple('field_collection_item', $field_collection_item_values);\n }\n\n // Delete the existing field_directions entries\n if (!empty($row->migrate_map_destid1)\n && count($node->field_directions[$node_language]) > 0\n ) {\n $field_collection_item_values = array();\n foreach ($node->field_directions[$node_language] as $key => $value) {\n // Build array of field collection values.\n $field_collection_item_values[] = $value['value'];\n // Unset them.\n unset($node->field_directions[$node_language][$key]);\n }\n // Delete field collection items.\n entity_delete_multiple('field_collection_item', $field_collection_item_values);\n }\n\n // Delete the existing field_active_time entries\n if (!empty($row->migrate_map_destid1)\n && count($node->field_recipe_time[$node_language]) > 0\n ) {\n $field_collection_item_values = array();\n foreach ($node->field_recipe_time[$node_language] as $key => $value) {\n // Build array of field collection values.\n $field_collection_item_values[] = $value['value'];\n // Unset them.\n unset($node->field_recipe_time[$node_language][$key]);\n }\n // Delete field collection items.\n entity_delete_multiple('field_collection_item', $field_collection_item_values);\n }\n\n // Delete the existing field_active_time entries\n if (!empty($row->migrate_map_destid1)\n && count($node->field_active_time[$node_language]) > 0\n ) {\n $field_collection_item_values = array();\n foreach ($node->field_active_time[$node_language] as $key => $value) {\n // Build array of field collection values.\n $field_collection_item_values[] = $value['value'];\n // Unset them.\n unset($node->field_active_time[$node_language][$key]);\n }\n // Delete field collection items.\n entity_delete_multiple('field_collection_item', $field_collection_item_values);\n }\n\n // Save the node after all delete operations\n node_save($node);\n\n\n // Fetch the Ingredients as array\n $ingredients_list = $row->ingredient_lists;\n if (isset($row->ingredient_lists) && count($ingredients_list) > 0) {\n foreach ($ingredients_list as $ingredient_list) {\n $ingredient_list_title = $ingredient_list->title;\n $ingredients_arr = array();\n $ingredients_arr = $ingredient_list->ingredients;\n // Iterate through each Ingredient and add it to field collection\n foreach ($ingredients_arr as $ingredient) {\n // Ingredient Field Collection\n $display_text = $ingredient->display_text;\n $ingredient_name = strip_tags($ingredient->ingredient_desc);\n $quantity = $ingredient->quantity;\n $whole_number = $ingredient->whole_number;\n $fraction_number = $ingredient->fraction;\n $unit = $ingredient->unit;\n $measurement_notes = $ingredient->measurement_notes;\n $preparation_notes = $ingredient->prep_notes;\n $primary_ingredient_text = $ingredient->ingredient;\n $primary_ingredient = $ingredient->primary_ingredient;\n $main_ingredient = $ingredient->main_ingredient;\n $field_collection_item = entity_create('field_collection_item',\n array('field_name' => 'field_ingredients')\n );\n // Set the List Title\n $field_collection_item->field_ingredient_list_title[$node_language][0]['value'] = $ingredient_list_title;\n // Load items into field collection\n $field_collection_item->field_ingredient_name[$node_language][0]['value'] = $ingredient_name;\n $field_collection_item->field_ingredient_display_text[$node_language][0]['value'] = $display_text;\n $field_collection_item->field_ingredient_display_text[$node_language][0]['format'] = 'mini_text_format';\n $field_collection_item->field_ingredient_quantity[$node_language][0]['value'] = $quantity;\n $field_collection_item->field_ingredient_whole[$node_language][0]['value'] = $whole_number;\n $field_collection_item->field_ingredient_mea_notes[$node_language][0]['value'] = $measurement_notes;\n $field_collection_item->field_prep_notes[$node_language][0]['value'] = $preparation_notes;\n $field_collection_item->field_ingredient_is_primary[$node_language][0]['value'] = ($primary_ingredient) ? 1 : 0;\n $field_collection_item->field_ingredient_is_main[$node_language][0]['value'] = ($main_ingredient) ? 1 : 0;\n // To Get the Primary Ingredient TID\n if (!empty($primary_ingredient_text)) {\n $arr_primary_ids = $this->getTidFromName('primary_ingredient', 'name',\n $primary_ingredient_text\n );\n if (count($arr_primary_ids) > 0) {\n $arr_primary_ids = array($arr_primary_ids[0]);\n $field_collection_item->field_ingredient_primary[$node_language][0]['tid'] = $arr_primary_ids;\n }\n else {\n $field_collection_item->field_ingredient_primary[$node_language][0]['tid'] = NULL;\n }\n }\n else {\n $field_collection_item->field_ingredient_primary[$node_language][0]['tid'] = NULL;\n }\n if ($fraction_number && !empty($fraction_number)) {\n $field_collection_item->field_ingredient_fraction[$node_language][0]['tid'] = $this->getTidFromLabel('ingredient_fraction',\n 'field_taxo_ingr_fraction_label', array($fraction_number)\n );\n }\n else {\n $field_collection_item->field_ingredient_fraction[$node_language][0]['tid'] = NULL;\n }\n if ($unit && !empty($unit)) {\n $field_collection_item->field_ingredient_unit[$node_language][0]['tid'] = $this->getTidFromLabel('ingredient_unit',\n 'field_taxo_ingr_unit_label', array($unit)\n );\n }\n else {\n $field_collection_item->field_ingredient_unit[$node_language][0]['tid'] = NULL;\n }\n // Save field collection item\n $field_collection_item->setHostEntity('node', $node);\n $field_collection_item->save(TRUE);\n // Save the Node\n //node_save($node);\n }\n }\n }\n\n // Fetch the Directions Array\n $directions_arr = array();\n $directions_arr = $row->directions;\n if (isset($row->directions) && count($directions_arr) > 0) {\n foreach ($directions_arr as $direction) {\n $direction_list_title = '';\n $direction_list_title = $direction->title;\n $direction_step = '';\n $direction_step = $direction->step;\n // Generate the Field Collection Dynamically for the Directions\n $direction_field_collection_item = entity_create('field_collection_item', array('field_name' => 'field_directions'));\n // Set the List Title\n $direction_field_collection_item->field_direction_list_title[$node_language][0]['value'] = $direction_list_title;\n $direction_field_collection_item->field_direction_steps[$node_language][0]['value'] = $direction_step;\n // Save field collection item\n $direction_field_collection_item->setHostEntity('node', $node);\n $direction_field_collection_item->save(TRUE);\n\n // Save the Node\n //node_save($node);\n }\n }\n\n // Set the time_total, time_active and time_other\n if (isset($row->time_active) && $row->time_active != '') {\n $time_active = $this->convertToHoursMins($row->time_active);\n // Generate the Field Collection for the active time\n $time_active_field_collection_item = entity_create('field_collection_item',\n array('field_name' => 'field_active_time')\n );\n $time_active_field_collection_item->field_active_time_hour[$node_language][0]['value'] = $time_active[0];\n $time_active_field_collection_item->field_active_time_minute[$node_language][0]['value'] = $time_active[1];\n // Save field collection item\n $time_active_field_collection_item->setHostEntity('node', $node);\n $time_active_field_collection_item->save(TRUE);\n //node_save($node);\n }\n\n // Set the time_total, time_active and time_other\n if (isset($row->time_total) && $row->time_total != '') {\n $time_total = $this->convertToHoursMins($row->time_total);\n // Generate the Field Collection for the active time\n $time_total_field_collection_item = entity_create('field_collection_item',\n array('field_name' => 'field_recipe_time')\n );\n $time_total_field_collection_item->field_recipe_time_hour[$node_language][0]['value'] = $time_total[0];\n $time_total_field_collection_item->field_recipe_time_minute[$node_language][0]['value'] = $time_total[1];\n $time_total_field_collection_item->field_time_other[$node_language][0]['value'] = $row->time_other;\n // Save field collection item\n $time_total_field_collection_item->setHostEntity('node', $node);\n $time_total_field_collection_item->save(TRUE);\n //node_save($node);\n }\n\n // To merge the camera text with the deck body\n $camera_text = $row->camera;\n $deck_text = $row->dek;\n\n if (!empty($camera_text)) {\n if (stripos(\"<p>\", $camera_text) > 0) {\n $node->field_deck['und'][0]['value'] = $deck_text . $camera_text;\n }\n else {\n $node->field_deck['und'][0]['value'] = $deck_text . '<p>' . $camera_text . '</p>';\n }\n }\n else {\n $node->field_deck['und'][0]['value'] = $deck_text;\n }\n\n $node->field_deck['und'][0]['value'] = preg_replace_callback(\"/(<img[^>]*src *= *[\\\"']?)([^\\\"']*)/i\", array($this, 'getURL'), $node->field_deck['und'][0]['value']);\n $node->field_deck['und'][0]['value'] = preg_replace_callback('~\\bbackground(-image)?\\s*:(.*?)\\(\\s*(\\'|\")?(?<image>.*?)\\3?\\s*\\)~i', array($this, 'getcssURL'), $node->field_deck['und'][0]['value']);\n node_save($node);\n return TRUE;\n }", "title": "" }, { "docid": "dd3ddf0ed1d5aa4e7a975de6572cd156", "score": "0.35810518", "text": "public function applyMapping()\n {\n $connection = $this->connection();\n $index = $this->connection()->getConfigValue('index');;\n $elasticaIndex = $connection->getIndex($index);\n\n $this->_applyMapping(\n $elasticaIndex->getType($this->name()),\n $this->mapping()\n );\n }", "title": "" }, { "docid": "3db6ea03592d22289c311233ed6ba71c", "score": "0.35763624", "text": "public function __construct() {\n\n //Configure fill able entity only from mapping field column\n $this->fillable(array_values($this->maps));\n }", "title": "" }, { "docid": "b80ed772bd26e3e0e834b1ba67400a1d", "score": "0.35722888", "text": "public static function validMaps() {\n return array_merge(self::fixedMaps(), self::streamedMaps());\n }", "title": "" }, { "docid": "625bb021faf2e31b892112a8e305480c", "score": "0.3566973", "text": "protected function _auto_trans_complete($label = 'complete')\n\t{\n\t\t// Complete auto transaction\n\t\tif ($this->auto_transaction)\n\t\t{\n\t\t\t// Check if successful\n\t\t\tif (!$this->trans_complete())\n\t\t\t{\n\t\t\t\t$rule = 'transaction';\n\n\t\t\t\t// Get corresponding error from language file\n\t\t\t\tif (FALSE === ($line = $this->lang->line($rule)))\n\t\t\t\t{\n\t\t\t\t\t$line = 'Unable to access the ' . $rule .' error message.';\n\t\t\t\t}\n\n\t\t\t\t// Add transaction error message\n\t\t\t\t$this->error_message($rule, sprintf($line, $label));\n\n\t\t\t\t// Set validation as failed\n\t\t\t\t$this->valid = FALSE;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "61d82834644ba5b9e6e19037c0ac48e5", "score": "0.35617042", "text": "public function FixClassDefinition($incompleteObject) {\n\t\treturn unserialize(serialize($incompleteObject));\n\t}", "title": "" }, { "docid": "1030340d198fe1fcaf847892b2733a4d", "score": "0.35615662", "text": "private static function _map_aliases()\r\n {\r\n if(empty(static::$_aliases_attributes_map))\r\n if(!empty(static::$_aliases_fields_map))\r\n static::$_aliases_attributes_map = array_flip (static::$_aliases_fields_map);\r\n \r\n if(empty(static::$_aliases_fields_map))\r\n if(!empty(static::$_aliases_attributes_map))\r\n static::$_aliases_fields_map = array_flip (static::$_aliases_attributes_map);\r\n }", "title": "" }, { "docid": "3e8db7c91a6ad7a7442bc19c9f36c50c", "score": "0.356124", "text": "public function vc_after_mapping() {\n\n\t\tvc_lean_map( 'vcex_post_terms', array( $this, 'map' ) );\n\n\t\t$vc_action = vc_request_param( 'action' );\n\n\t\tif ( 'vc_get_autocomplete_suggestion' === $vc_action || 'vc_edit_form' === $vc_action ) {\n\t\t\tadd_filter( 'vc_autocomplete_vcex_post_terms_taxonomy_callback', 'vcex_suggest_taxonomies' );\n\t\t\tadd_filter( 'vc_autocomplete_vcex_post_terms_taxonomy_render', 'vcex_render_taxonomies' );\n\t\t\tadd_filter( 'vc_autocomplete_vcex_post_terms_exclude_terms_callback', 'vcex_suggest_terms' );\n\t\t\tadd_filter( 'vc_autocomplete_vcex_post_terms_exclude_terms_render', 'vcex_render_terms' );\n\t\t\tadd_filter( 'vc_autocomplete_vcex_post_terms_child_of_callback', 'vcex_suggest_terms' );\n\t\t\tadd_filter( 'vc_autocomplete_vcex_post_terms_child_of_render', 'vcex_render_terms' );\n\t\t}\n\n\t\tif ( 'vc_edit_form' === $vc_action ) {\n\t\t\tadd_filter( 'vc_edit_form_fields_attributes_vcex_post_terms', array( $this, 'edit_fields' ), 10 );\n\t\t}\n\n\t}", "title": "" }, { "docid": "3ef825b2e84ffb8d5d0fd241af282271", "score": "0.35547617", "text": "public function shouldCreateUnregisteredMappings(): bool\n {\n return $this->createUnregisteredMappings;\n }", "title": "" } ]
c5fd5b19a959f96bae00e43ce0739116
Return query to load all entries.
[ { "docid": "1d65d1bb3b562469749d7b54ae961805", "score": "0.0", "text": "public function getFindAllQuery()\n {\n $query = $this->createQueryBuilder('e')\n ->select('e')\n ->orderBy('e.timestamp', 'DESC')\n ->getQuery();\n\n return $query;\n }", "title": "" } ]
[ { "docid": "13e913c9df80ba484e429ae7c98c8e18", "score": "0.73882234", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_time_entries';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "96135fd3d77139987fac10c7c7e1a400", "score": "0.732788", "text": "public function getAll() {\r\n\t\t\r\n\t\t$this->load();\r\n\t\treturn $this->query;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "e1ad6aebfa785b9be2150552f4f56442", "score": "0.72871435", "text": "public function queryAll();", "title": "" }, { "docid": "ac2a0193076dfc549d051c4ed925e82b", "score": "0.7249159", "text": "function load_all() {\n //$db = Db::getInstance();\n $sql = $this->buildQuery();\n \n $this->db->doQuery($sql);\n \n $row = $this->db->loadObjectList();\n \n \n }", "title": "" }, { "docid": "deb571ef479f8f465767c33e5d806035", "score": "0.7207144", "text": "public function getAllEntries(){\n $sql = \"SELECT * FROM entries\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "title": "" }, { "docid": "ded75c3173ce6720a393eb21ef374ed6", "score": "0.71142936", "text": "public static function all()\n\t{\n\t\tstatic::$queryObject->all();\n\n\t}", "title": "" }, { "docid": "faa054198a9a1ffed285e044ff567fab", "score": "0.7078458", "text": "public function all()\n {\n return $this->newQuery('getRecords', [], true);\n }", "title": "" }, { "docid": "97ad407ff66dc9fd9d0331d5b55bd485", "score": "0.69850814", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM ordinateur';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "5692f3971f3f0fe1dace2bf594625e89", "score": "0.6954335", "text": "public static function getAll()\n {\n //delay the actual fetch until every filter/sort rule is added to the query\n //or the first dataset is requested\n }", "title": "" }, { "docid": "c0fce592ea033596935bf044af8fd35e", "score": "0.68961924", "text": "public function queryAll(): array;", "title": "" }, { "docid": "686b126a05dc8c5332a880dd2824ffe9", "score": "0.6844049", "text": "public static function get_all_query() {\n\t\t\t$instance = self::get_instance();\n\n\t\t\treturn $instance->transient->get();\n\t\t}", "title": "" }, { "docid": "9c6b2b9de178bb4b5db64b7953d49960", "score": "0.68344057", "text": "public static function all()\n\t{\n\t\treturn Hydrator::hydrate(static::query(get_called_class()));\n\t}", "title": "" }, { "docid": "297b0644c17554c31043f315a847fb0a", "score": "0.6817292", "text": "public function queryAll()\n {\n return $this->queryInternal(self::FETCH_ALL);\n }", "title": "" }, { "docid": "bc2b01773bebf193870de537d6b3635b", "score": "0.6810516", "text": "public function all()\n {\n return $this->_adapter->query($this, $this->getParameters());\n }", "title": "" }, { "docid": "cd02e2841612b49e52480bd8c7222ec2", "score": "0.68081343", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM kelas_jadwal_mapel';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "fbe6391b7824ba815c6e3c6ef976568a", "score": "0.68063504", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM Person';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "24d663deb88060eb7c2fe80ea3745618", "score": "0.673982", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM djcelery_periodictask';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "dbd4ece5e39b19d0fe22bd19c988f0fd", "score": "0.6733562", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM fold_ministry';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "739242895613bd43fec98546243e760d", "score": "0.67005086", "text": "public function listAll(){\n $builder = $this->builder();\n $query = $builder->get();\n return $query;\n }", "title": "" }, { "docid": "1a02d4a8f7430074880bae30acc4a9a7", "score": "0.6669677", "text": "function queryAll() {\n\t\t$model = $this->getModel();\n\t\tif (is_object($model)) {\n\t\t\t$resultset = $model->performQueryAll($this);\n\t\t\treturn $resultset;\n\t\t}\n\t\treturn array(); \n\t}", "title": "" }, { "docid": "389305259271ec7c2a4a9b2a31703c38", "score": "0.6657845", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM auditoriaingreso';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "3343648ccb92a79d1e84d5a6ee3c30d1", "score": "0.66290957", "text": "public static function all()\n {\n $instance = new static();\n\n return $instance->newQuery()->get();\n }", "title": "" }, { "docid": "9baa94527f00b4337d663568037aa92b", "score": "0.661689", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM language';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "1ffc33be9fa587450efbdfcafcbc7ac3", "score": "0.66151613", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM budget';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "de12ac5473fe6c37470e9895f9086190", "score": "0.66133356", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_form_1701q';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "18947aead8d046b6491807be5c5a30df", "score": "0.6582107", "text": "public function all()\n {\n return $this->query(\"\n SELECT * \n FROM \" .$this->table. \" \n \");\n }", "title": "" }, { "docid": "f7999d9cca12f1e331d08b877ce6d726", "score": "0.65679777", "text": "private function _read_all() {\n return ApplicationSql::read_all(\n $this->_select,\n $this->_table,\n $this->_join,\n $this->_where,\n $this->_group,\n $this->_order,\n $this->_limit,\n $this->_offset\n );\n }", "title": "" }, { "docid": "44e8498cb42a1e643ce54b46b4e34768", "score": "0.65588164", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM med_accounts';\n\t\t$SqlQuery2 = new SqlQuery2($sql);\n\t\treturn $this->getList($SqlQuery2);\n\t}", "title": "" }, { "docid": "dc28973df5db8aa984213082ad56f3b1", "score": "0.6555842", "text": "public static function all(){\n\n $class = get_called_class();\n\n $query = \"SELECT * FROM \" .$class::$table;\n return self::returnRows($query);\n }", "title": "" }, { "docid": "8e5ad126e6f965ff150dd6a25fc39fbe", "score": "0.6554897", "text": "public function fetchAll() {\n\n $rs = $this->getDbTable()->fetchAll();\n $entries = array();\n\n foreach( $rs as $row ) {\n $entry = new Application_Model_Entry();\n\n $entry->setId($row->id)\n ->setDescription($row->desc)\n ->setDrivetime($row->drive_time)\n ->setMiles($row->miles)\n ->setCost($row->cost)\n ->setMpg($row->mpg);\n\n $entries[] = $entry;\n }\n\n return $entries;\n }", "title": "" }, { "docid": "74fe4ce5bb0650290e1f2956d7d6aced", "score": "0.6544438", "text": "public function all() {\n\t\t$this->options['where'] = [];\n\n\t\treturn $this->read();\n\t}", "title": "" }, { "docid": "d18971a0d92fc398420bec92e4579bde", "score": "0.6524098", "text": "public function getFetchAllQuery()\n\t{\n\t\t$q = new tgsfPaginateQuery(LOGGER()->dbSetupName);\n\t\t$q\t->select()\n\t\t\t->from( $this->tableName )\n\t\t\t->order_by( 'log_datetime desc' );\n\t\treturn $q;\n\n\t}", "title": "" }, { "docid": "a4168fc9f1338db6f5e4f16514048aa2", "score": "0.651008", "text": "public static function all()\n {\n return self::objects()->fetch();\n }", "title": "" }, { "docid": "7a15f93fe7da9ea0ce0fa4a49e2b961f", "score": "0.65046334", "text": "public function findAll() {\n\t\treturn $this->createQuery()->execute();\n\t}", "title": "" }, { "docid": "9ed4ffb8b478690bc83296974a09801e", "score": "0.65020883", "text": "public function getAll()\n {\n return $this->query()->get();\n }", "title": "" }, { "docid": "d552470312c5c28b6f80b5b11305b9d7", "score": "0.65003574", "text": "function get_all () {\n\t\treturn $this->cache->get(\n\t\t\t'all',\n\t\t\tfunction () {\n\t\t\t\treturn $this->search([], 1, PHP_INT_MAX, 'id', true);\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "e0fd7ee2f16562db16ded2980de01d09", "score": "0.64564896", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM grp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "cd1bf9290d1e65667dd237deb537b81d", "score": "0.6444637", "text": "public function fetchAll()\n {\n // Columns to be selected\n $columns = [\n self::column('id'),\n self::column('room_id'),\n self::column('datetime'),\n self::column('client'),\n self::column('email'),\n self::column('phone'),\n self::column('comment'),\n self::column('amount'),\n self::column('checkin'),\n self::column('checkout'),\n self::column('status'),\n self::column('token'),\n self::column('index'),\n self::column('address'),\n self::column('arrival'),\n RoomTranslationMapper::column('name') => 'room'\n ];\n\n $db = $this->db->select($columns)\n ->from(self::getTableName())\n // Room relation\n ->leftJoin(RoomMapper::getTableName(), [\n RoomMapper::column('id') => self::getRawColumn('room_id')\n ])\n // Room translation\n ->leftJoin(RoomTranslationMapper::getTableName(), [\n RoomTranslationMapper::column('id') => RoomMapper::getRawColumn('id'),\n RoomTranslationMapper::column('lang_id') => $this->getLangId()\n ])\n ->whereEquals(self::column('status'), BookingStatusCollection::STATUS_CONFIRMED)\n ->orderBy(self::column('id'))\n ->desc();\n\n return $db->queryAll();\n }", "title": "" }, { "docid": "45d88c9d6b21f9f89d1814e81df688ac", "score": "0.6436298", "text": "static public function getAll()\n {\n \t$q = new mr_sql_query(self::sqlTable);\n \treturn $q->fetch(__CLASS__);\n }", "title": "" }, { "docid": "52aa94c8e8ee8250df6ece3578dd0a3e", "score": "0.6435146", "text": "public function all() {\n return $this->db->query(\"SELECT * FROM \" . $this->table);\n }", "title": "" }, { "docid": "86c759252e2f1bf6a2b273ee0eeb79e7", "score": "0.6434936", "text": "public function all()\n {\n //Set the order (and pass TRUE to add an order clause to $this->q)\n $this->setOrder(TRUE);\n\n # If its not a datatable request, then just do a straight get()\n if ( ! $this->r = $this->getDatatable('all') )\n $this->r = $this->q->get( $this->selectCols );\n\n return $this->r;\n }", "title": "" }, { "docid": "f097d0a684fc74e479e2ff8b0d2fdf53", "score": "0.64337444", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM familleachat';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "35395ec6273861c9307c89571608c87a", "score": "0.64275515", "text": "public function get_all()\n\t{\n\t\t$this->trigger('before_get');\n\n\t\t$this->_where_trashed();\n\n\t\t$this->_qb_do();\n\t\t$result = $this->_database->get($this->_table)\n\t\t\t\t\t\t ->{$this->_return_type(1)}();\n\t\t$this->_qb_reset();\n\n\t\t$this->_temporary_return_type = $this->return_type;\n\n\t\tforeach ($result as $key => &$row)\n\t\t{\n\t\t\t$row = $this->trigger('after_get', $row, ($key == count($result) - 1));\n\t\t}\n\n\t\t$this->_with = array();\n\t\t$this->_with_attr = array();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "290d978c94a5d4cbe79ef25f09b17bf0", "score": "0.6419346", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM Past_Attendee';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "7a28439ea9200390b215e1708cd957b5", "score": "0.6410113", "text": "public static function all() \n {\n static::$table = static::$table ?? static::table();\n $sql = \"SELECT * FROM \" . static::$table;\n $query = static::getConnection()->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "title": "" }, { "docid": "36d8043b0cf4fed5dd118529b48b2a98", "score": "0.64081794", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM item_share';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "577bcca836a04729407a3dddeb021ebd", "score": "0.64054596", "text": "public static function get_all() {\n $schema = static::schema();\n return cy\\DB::select()->from($schema->table_name)\n ->exec($schema->database)->rows($schema->class);\n }", "title": "" }, { "docid": "6fd5a840482455ca19fdb7b01da3ecad", "score": "0.6405445", "text": "public function all(Query $query = null);", "title": "" }, { "docid": "72cbdab5b289ffdf1dc9077601fa4502", "score": "0.64040816", "text": "public function all()\n\t{\t\n\t\treturn $this->query->execute();\n\t}", "title": "" }, { "docid": "094bafc04913340401688ac06e5eff5d", "score": "0.63991445", "text": "public static function fetchAll () {\n return static::fetchOrderedBy('name', 'ASC');\n }", "title": "" }, { "docid": "3f41b171371abd1fd9b62dc11cf14f4f", "score": "0.63988686", "text": "public static function getAll(){\n\t\t\treturn self::getByQuery(\"SELECT * FROM db_moniteur\");\n\t\t}", "title": "" }, { "docid": "b02ddec07df3fa4c80432fe287bda8f9", "score": "0.639586", "text": "public static function fetchAll( )\n {\n $objects = eZPersistentObject::fetchObjectList(\n self::definition()\n );\n \n return $objects;\n }", "title": "" }, { "docid": "8894f10b7b7fce1f1633b90a061c56e3", "score": "0.63906103", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM constancias';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "7f492d64e66c76d4cb79177c970d9708", "score": "0.63899404", "text": "public function getAll()\n {\n global $wpdb;\n return $wpdb->get_results(\"SELECT * FROM $this->table_name ORDER BY $this->primary_key ASC;\");\n }", "title": "" }, { "docid": "11f1d6d8715abc4ae76fec4fe832495b", "score": "0.63863397", "text": "public function all()\n {\n return $this->_dao->all();\n }", "title": "" }, { "docid": "e7c9a1303bed62a1ed2f200cefa6307c", "score": "0.6379336", "text": "public function getAll() {\n\t\treturn $this->Database->select(\"SELECT * FROM $this->tableName\");\n\t}", "title": "" }, { "docid": "11010e8e655f2c52df5135e9cbc82660", "score": "0.6378182", "text": "public function getAll() {\n\t\treturn $this->db->query(\"SELECT * FROM {$this->table}\");\n\t}", "title": "" }, { "docid": "37065305aa699f0e9e138ea3d9ead48f", "score": "0.6363938", "text": "public function getAll()\n {\n return $this->db->get_results(\"SELECT * FROM {$this->table}\");\n }", "title": "" }, { "docid": "f64818f60a501bab95b4ce22b0cf099e", "score": "0.6352143", "text": "public function fetchAll() {\n $db = DB::getFactory()->getConnection();\n $query = $this->getQuery();\n $return = array();\n\n foreach ($db->query($query) as $row) {\n $return[] = $row;\n }\n\n return $return;\n }", "title": "" }, { "docid": "229aea1d749ce76a43009935ccc23ae8", "score": "0.6351099", "text": "public static function find_all() {\n \n return static::find_by_sql(\"SELECT * FROM \".static::$table_name);\n }", "title": "" }, { "docid": "7fe47509a31864f23c539555179b0639", "score": "0.6345161", "text": "public static function load_all()\n\t{\n\t\t$sql = Database::getConnection()\n\t\t\t->prepare('SELECT ID, photo_id, author, body FROM '.self::$db_table); //la password non viene scaricata\n\t\t$sql->execute();\n\n\t\t$rows = $sql->fetchAll(); \n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "8839b522c7a257e4f5ad6cec5e2da770", "score": "0.6335111", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM log_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "54d1b63a13a7f836f243c5d8becbb287", "score": "0.6330371", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM uavm_module';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "ee746ebe383a4b94b51c15e302802a17", "score": "0.63263094", "text": "public function all()\n {\n $this->selectClause = \"*\";\n $query = $this->buildQuery();\n try {\n $stmt = static::$connection->prepare($query);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }catch (PDOException $e) {\n die(\"Internal Server Error, please contract the site administrator or try again\");\n }\n }", "title": "" }, { "docid": "77aa4d0a75be4b3ae3920413706797c3", "score": "0.63180995", "text": "protected function getQueryAllPosts()\n {\n $queryBuilder = new Query();\n $this->query = $queryBuilder\n ->select([\n 'id',\n 'name_translit',\n 'title',\n 'short_text',\n 'file'\n ])\n ->from('information')\n ->orderBy(['id' => SORT_DESC]);\n }", "title": "" }, { "docid": "d451e2679f79103ca447ef7ea3c65a59", "score": "0.6318066", "text": "public static function getAll()\n {\n $db = Db::getInstance(_PS_USE_SQL_SLAVE_);\n $results = $db->executeS('\n SELECT *\n FROM '._DB_PREFIX_.self::$definition['table'].'\n ');\n\n return $results;\n }", "title": "" }, { "docid": "7e05187d5de67adad82b940e9c6c4e80", "score": "0.63075155", "text": "function retrieveAll ()\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'Report rp' )\n ->innerJoin ( 'rp.Module mo' )\n ->where('rp.report_id != ?', 7)\n ->orderBy ( 'rp.report_name ASC' );\n \n return $q->execute ();\n\n }", "title": "" }, { "docid": "d6302a7c75f1cb243d1ce99125e9c8fa", "score": "0.63023", "text": "public function fetchAll() {\n\t\treturn pg_fetch_all($this->query);\n\t}", "title": "" }, { "docid": "bb4468ca8ff97038b652faffe0655396", "score": "0.6279565", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM uavm_task_file';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "36194cf379ae04777d46d9148af69aa7", "score": "0.62751985", "text": "public function fetchAll();", "title": "" }, { "docid": "36194cf379ae04777d46d9148af69aa7", "score": "0.62751985", "text": "public function fetchAll();", "title": "" }, { "docid": "e320ced35068a455d7b63f87e46e400c", "score": "0.62692446", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM apartamentos_articulos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "931262776924c58ad6cf47ad6becb484", "score": "0.626329", "text": "protected function readAll()\n\t\t{\n\t\t\t$query = \"SELECT * from \" . $this->getTableName();\n\t\t\t\n\t\t\treturn $this->request($query);\n\t\t}", "title": "" }, { "docid": "1957c1f7718b5188646133ecf008930c", "score": "0.62605035", "text": "public static function find_all() {\n return static::find_by_query(\"SELECT * FROM \" . static::$db_table . \" \");\n }", "title": "" }, { "docid": "b4af38dcb9196fd333c1fe8e8ca52244", "score": "0.6257419", "text": "function db_getall($query, array $params=null) {\nreturn MSLDB::getActiveConnection()->getall($query, $params); }", "title": "" }, { "docid": "e2573b6384119529b1a15e08d3807816", "score": "0.62570566", "text": "abstract public function fetchAll();", "title": "" }, { "docid": "755d4e361a5504c1ebe253e01424a5ce", "score": "0.6251433", "text": "function findAll() {\n\t\t$sql=\"select * from $this->table\";\n\t\t$result=self::$link->query($sql);\n\t\treturn $result->fetchAll();\t\t\t\n\t}", "title": "" } ]
19b6f0ad1776d3fc29173af12f7c34b8
Deletes an existing Inscreve model. If deletion is successful, the browser will be redirected to the 'index' page.
[ { "docid": "f473275a7bf8bfd0f3246a8024039f0e", "score": "0.0", "text": "public function actionDelete($usuario_idusuario, $evento_idevento)\n {\n $this->findModel($usuario_idusuario, $evento_idevento)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" } ]
[ { "docid": "ea050473ff181b2bd8065da3bcd26653", "score": "0.69924116", "text": "public function actionDelete() {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }", "title": "" }, { "docid": "71c90e9a5daf9558453c64b966366ef1", "score": "0.6973433", "text": "public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\t\t\n\t\t$modelSedes \t\t= Sedes::findOne( $model->id_sedes );\n\t\t$modelInstitucion \t= Instituciones::findOne( $modelSedes->id_instituciones );\n\t\t\n $model->delete();\n\n return $this->redirect(['index', 'idInstitucion' => $modelInstitucion->id, 'idSedes' => $modelSedes->id ]);\n }", "title": "" }, { "docid": "60a661335b26ac94956a8928b2c20fde", "score": "0.68036234", "text": "public function actionDelete($id){\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "60a661335b26ac94956a8928b2c20fde", "score": "0.68036234", "text": "public function actionDelete($id){\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f6b5bbf523669d8c86fe2a553a13622d", "score": "0.6763283", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f6b5bbf523669d8c86fe2a553a13622d", "score": "0.6763283", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "a06abe24078d1acfb74e68d6687b19da", "score": "0.6761127", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "baa5487bc969116c9bb49608c1ca5de5", "score": "0.6726026", "text": "public function actionDelete($id){\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "a85a12ccf1c01196f836745390537c08", "score": "0.6719125", "text": "public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "a2d1d353651b02dbf4dcddd7bb588987", "score": "0.67084587", "text": "public function actionDelete($id)\n {\n\t\tInvoiceItem::deleteAll(['invoice_id' => $id]);\n\t\t\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "3d50d32701b615074d76b9d84692a84e", "score": "0.67051524", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "0d061d097cf5de4c5edd7e3984282fe6", "score": "0.66991776", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "f5e6b303dde65e7b3df7dbdbfc23d428", "score": "0.6686598", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ed00837e18b5c1aec3626a1a0c3b3904", "score": "0.6686135", "text": "public function actionDelete($id){\n $this->findModel($id)\n ->delete();\n Yii::$app->cache->flush();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "98a939f1649d206c5e4825aaff2d42b2", "score": "0.66734684", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $this->findModel($id)->delete();\n\n return $this->redirect(['index','id' => $model->POS_ID]);\n }", "title": "" }, { "docid": "0116d0ecb5d3617350e2648a9c77af01", "score": "0.6665925", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "96a1e0407c0e39cc94ea3e191c544532", "score": "0.6649598", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "2a5298f4ccaaff3605142349eb912c92", "score": "0.66274816", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted_at = date(\"Y-m-d H:i:s\");\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "5c0595e5b750cfa82e3a1b3afba2f8f2", "score": "0.66256917", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n\n //return $this->redirect(['index']);\n }", "title": "" }, { "docid": "3ee91df933134bd19ae85dc00c6c76df", "score": "0.6623296", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "3ee91df933134bd19ae85dc00c6c76df", "score": "0.6623296", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "1d038563a40ee7ed02dc0884dd8d37d9", "score": "0.6609384", "text": "public function actionDelete($id)\n {\n /*$this->findModel($id)->delete();\n\n return $this->redirect(['index']);*/\n return $this->redirect(['view', 'id' => $id]);\n \n }", "title": "" }, { "docid": "bbe4ce61daa96404576ec0ad22f1ee11", "score": "0.6608185", "text": "public function actionDelete($id) {\n $model = $this->findModel($id);\n $model->status = Identity::STATUS_DELETED;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ee432c8cf936ec897e46096426a9c0e9", "score": "0.66075635", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "d717ef4b5af644eec38bc2f59f8384af", "score": "0.6604739", "text": "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t// we only allow deletion via POST request\n\t\t\t$model=$this->loadModel();\n\t\t\t$model->delete();\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_POST['ajax']))\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "title": "" }, { "docid": "e981b9fd34c709c586074a713b4d66e6", "score": "0.6600088", "text": "public function actionDelete() {\n if (!$this->getModel()) {\n Yii::$app->session->addFlash('error', 'Model for deleting not founded!');\n return $this->goReferrer();\n }\n\n try {\n if (!$this->getModel()->delete()) {\n foreach ((array) $this->getModel()->getErrors() as $attribute => $errors) {\n foreach ($errors as $error) {\n Yii::$app->session->addFlash('error', ucfirst($attribute) . ': ' . $error);\n }\n }\n } else {\n $modelName = ucfirst($this->getUniqueId());\n Yii::$app->session->addFlash('success', Yii::t('app', \"$modelName deleted!\"));\n }\n } catch (StaleObjectException $e) {\n Yii::$app->session->addFlash('error', $e->getMessage());\n } catch (\\Throwable $e) {\n Yii::$app->session->addFlash('error', $e->getMessage());\n }\n\n return $this->goReferrer();\n }", "title": "" }, { "docid": "72575e07056a8637ace0bf32e3281e85", "score": "0.6596306", "text": "public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "1dae5c2ddf67e8195e5d4cea6301762c", "score": "0.65921587", "text": "public function actionDelete()\n {\n /** @var Author $model */\n $model = $this->loadModel('content\\models\\Author');\n\n $model->delete();\n\n $this->setFlash(\"Author deleted successfully\");\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f79934f59115bd77f5a67fa21c938287", "score": "0.6591346", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n\t\t\n\t\t$seznam = CenikySeznam::findOne($id);\n\t\t$seznam->is_delete = '1';\n\t\t$seznam->update();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f0b75ddd7fab771adbc36f7828c143b0", "score": "0.65776074", "text": "public function actionDelete()\n {\n $model =\n Profile::find()->where([\n 'user_id' => Yii::$app->user->identity->id\n ])->one();\n $this->findModel($model->id)->delete();\n return $this->redirect(['site/index']);\n }", "title": "" }, { "docid": "50bc1bbe05ba4ff90517f1624775ea14", "score": "0.65746075", "text": "public function vehicle_model_delete() {\n\t\tCheckAdminLoginSession();\n\t\t$id = $this->uri->segment(4);\n\t\t$this->admin_model->dataDelete($this->vehicle_model,$id);\n\t\t$this->session->set_flashdata('message','Your Vehicle Model has been deleted successfully');\n redirect('admin/vehicle/vehicle-model','refresh');\n\t}", "title": "" }, { "docid": "37f2cc9961ec2fcad7763e57f5a67d43", "score": "0.65736574", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "37f2cc9961ec2fcad7763e57f5a67d43", "score": "0.65736574", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "43799c9619bc89e092dc08dcd99f047a", "score": "0.65683514", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete(); \n \n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "1e247bff4022d18be3617afc6b0c42cb", "score": "0.65515345", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n if(Yii::$app->request->isAjax){\n\n }\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "df7634aa47e098aa46a38af96f8e27d6", "score": "0.6550351", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(\"index\");\n }", "title": "" }, { "docid": "206d802bbf08274a12f2a3fab121008f", "score": "0.65470606", "text": "public function actionDelete() {\n $id = $_POST['idDeleteProceso'];\n\n $this->loadModel($id)->delete();\n// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n $this->redirect(array('default/index'));\n }", "title": "" }, { "docid": "7b6c483d86bf4d977b30d3f554f81a93", "score": "0.6544491", "text": "public\n function actionDelete($id)\n {\n $model = $this->findModel($id);\n if ($model)\n $model->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "05d46263d84459bbc3a560389fafd50d", "score": "0.65329975", "text": "public function actionDelete($id)\n {\n\t\t\n\t\t$model = $this->findModel($id);\n\t\t$model->estado = 2;\n\t\t$idInstitucion = $model->id_institucion;\n\t\t$model->update(false);\n\t\treturn $this->redirect(['index', 'idInstitucion' => $idInstitucion]);\n \n }", "title": "" }, { "docid": "052072e76576cb78086a865c003b9a26", "score": "0.65322554", "text": "public function actionDelete()\n\t{\n\t\tif(isset($_POST['id']) && $_POST['id']){\n\n\t\t\t$id=$_POST['id'];\n\t\t \n\t\t if($this->loadModel($id)->delete()){\n\t\t\t echo \"success\";\n\t\t }\n\t\t else\n\t\t echo \"error\";\n\t }\n\t else {\n\t\t echo \"error\"; \n\t }\n\t}", "title": "" }, { "docid": "02e47a533e24116cb0e3c3f1ca950809", "score": "0.6531541", "text": "public function deleteAction()\n {\n $id = $this->_getParam('id', 0);\n if ($id > 0)\n {\n $this->Request(1,$id);\n $this->_helper->redirector('index');\n }\n }", "title": "" }, { "docid": "e7e7566d47b92cd51c3012fca2040615", "score": "0.6503042", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bd6c0bd70acba2ea46d39e260018b536", "score": "0.65026104", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "bd6c0bd70acba2ea46d39e260018b536", "score": "0.65026104", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "82f0ca3f231e6b7bc93f5872d8a93c6f", "score": "0.6502518", "text": "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.64950675", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.64888227", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.64888227", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.64888227", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.64888227", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.6478064", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "6440f5e43562646b46880da92bd96983", "score": "0.6476258", "text": "public function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete() !== false ? $this->success() : $this->fail();\n }", "title": "" }, { "docid": "3a4aa49cf809d60d26e2d4d08393dfe6", "score": "0.6475014", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n// return $this->redirect(['index']);\n return $this->redirect(['menu/new']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.64744633", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "404880aec9c12fe5350dcc7fa8f45e7c", "score": "0.64667714", "text": "public function actionDelete($id)\n {\n die;\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "fe640a57b60b79950f4e4d780352ef48", "score": "0.6460892", "text": "public function actionDelete()\n {\n /** @var User $model */\n $model = $this->loadModel('content\\models\\User');\n\n $model->delete();\n\n $this->setFlash(\"User deleted successfully\");\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "0b33688af1ed13f788f8c91e1cc6e2a9", "score": "0.6460642", "text": "public function actionDelete($id)\n {\n\n exit;\n $this->layout = 'default'; \n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "3119f9ea24708650b36f25df6f3f3ceb", "score": "0.64570963", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\t\t$result = $model->delete();\n\t\t\n\t\tif($result !== false){\n\t\t\t\\Yii::$app->getSession()->setFlash('info', 'Kayıt Başarıyla Silindi.');\n\t\t}\n\t\t\n return $this->redirect([strtolower($this->primaryModelName).'/index']);\n }", "title": "" }, { "docid": "e016fdad9253c4cba120fab14762ca76", "score": "0.64541197", "text": "public function actionDelete($id)\n {\n /*\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n */\n }", "title": "" }, { "docid": "cf023235fbf2b38257947fcb57022e0d", "score": "0.64511734", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n if ($model !== null) {\n $model->deleted = 'Y';\n $model->save();\n return $this->redirect(['index']);\n } else {\n $this->findModel($id)->delete();\n }\n }", "title": "" }, { "docid": "b2e65288c797372594833e9db4cf03d1", "score": "0.64505863", "text": "public function actionRemove()\n\t{\n\t\t$id = Yii::app()->request->getPost('id');\n $this->loadModel($id)->delete();\n\n\t}", "title": "" }, { "docid": "96a248ac9b8528ec3dcd2adc01f5d8a9", "score": "0.64432967", "text": "private function delete()\n\t{\n\t\t$id = $this->validateNumber($_GET['id']);\n\t\t$result = $this->model->delete($id);\t\n\t\t//Insert Succesfull\n\t\tif($result)\n\t\t{\n\t\t\t//Load view\n\t\t\theader(\"Location: index.php?controller=vehicle&deleted=true\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Ohh well... :(\n\t\t\trequire('views/Error.html');\n\t\t}\t\n\t}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "474888e8112faab32b13c234d2942338", "score": "0.0", "text": "public function create($group)\n {\n //\n $data=Group::where('groups.id',$group)\n ->join('schemes', 'schemes.id', '=', 'groups.schemes_id')->first();\n $count = Auction::where('group_id',$group)->count();\n $date= date('Y-m-d', strtotime($data->first_due_date . \"+\".$count.\"months\") );\n \n \n return view('auction.add',compact('group','data','count','date'));\n }", "title": "" } ]
[ { "docid": "600eb0f5f74407c7c69ac90b7d3e6f15", "score": "0.75996214", "text": "public function create()\n {\n return view('Resource/create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "a382b311163023b1b09a9a260d21538b", "score": "0.7577412", "text": "public function create(){\n\n return view('resource.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "200ac8848d121779daea1c7ace64cde0", "score": "0.7500887", "text": "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "title": "" }, { "docid": "4273a8d14102748486694e85db479a73", "score": "0.7434847", "text": "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "c26739dc5816352d835ac0fb7c3766d6", "score": "0.7424195", "text": "public function create()\n\t{\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n\n $data = array(\n 'page_title' => 'New resource'\n );\n \n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/create_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "003fc3feb8b261af715ecd7bd61a619b", "score": "0.73892003", "text": "public function create ()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "d9eabb6e688415b42a581fbf4d716eba", "score": "0.7281891", "text": "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "title": "" }, { "docid": "68d9805b3cff8bc6655ed77f2eb8b54c", "score": "0.7277638", "text": "public function create()\n {\n return view(\"Student/addform\");\n //\n }", "title": "" }, { "docid": "ae2dae6d70174f64972f62bfef3beec9", "score": "0.7229325", "text": "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "2bd4a45e5a2f3450957e331f3c9cbe9e", "score": "0.7226713", "text": "public function create()\n {\n return view('admin.createform');\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.7199865", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "894343381f0ae42067564426b380dec6", "score": "0.7179176", "text": "public function create()\n {\n return view('backend.student.form');\n }", "title": "" }, { "docid": "54e432df7faa28bb875e58bcd9563b2b", "score": "0.7174283", "text": "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "title": "" }, { "docid": "53df6b1c8be4874a39d1af8e3c545f04", "score": "0.71700996", "text": "public function create()\n {\n return view(\"fichecontroller.form\");\n }", "title": "" }, { "docid": "6437564551bf8cf8c1bd0c47f637752b", "score": "0.7169187", "text": "public function create()\n {\n return view('front.realty.add_new');\n }", "title": "" }, { "docid": "3da56af402e3cb2da0fb1d9bfcaaee54", "score": "0.7169166", "text": "public function create()\n {\n //\n\n return view('form.create');\n }", "title": "" }, { "docid": "540a53a248ba67bdca77e9032bbb635f", "score": "0.7150356", "text": "public function create()\n {\n return view('client.form');\n }", "title": "" }, { "docid": "c5c4532c985ebd9dc75cacbea31ac33b", "score": "0.71442676", "text": "public function create()\n {\n return view('Form');\n }", "title": "" }, { "docid": "920850f91908fe5ba5fe559daf2003ca", "score": "0.7142451", "text": "public function create()\n {\n return view(\"supplier.form\");\n }", "title": "" }, { "docid": "76f6369e9637fe0db8316e64e7c817c4", "score": "0.713498", "text": "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "title": "" }, { "docid": "1f30b87a2cd300703acd38d27eff1400", "score": "0.7123691", "text": "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\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": "f905e7ba42f00bcfd2b9d1dc88086329", "score": "0.71046937", "text": "public function create()\n {\n $action = route(\"administrator.project-store\");\n return view(\"backend.project.form\", compact(\"action\"));\n }", "title": "" }, { "docid": "e9992fc965026962aebdc354dcc64fda", "score": "0.7100691", "text": "public function create()\n {\n return view('linguas.form');\n }", "title": "" }, { "docid": "10bee9a2841dc1d7b79cb8ae2b760c18", "score": "0.7094388", "text": "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "title": "" }, { "docid": "efbcb43f0aa01d07c5a8a46e59e07c86", "score": "0.7085711", "text": "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "9f2e24c9a8128c23335ea37006c86534", "score": "0.70614016", "text": "public function create_form() {\n\n\t\treturn $this->render('user-create-form.php', array(\n\t\t\t'page_title' => 'Create Account',\n\t\t));\n\t}", "title": "" }, { "docid": "aa383de8753c002453b606201fb9311d", "score": "0.7059025", "text": "public function create()\n {\n\n return view('forms.catalogue');\n }", "title": "" }, { "docid": "df7ed302a7e1d7db05db8a8c55c8fe97", "score": "0.70557773", "text": "public function newAction()\n {\n #BreadCrumbs\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Dashboard\", $this->get(\"router\")->generate(\"admin_dashboard\"));\n $breadcrumbs->addItem(\"Refeicao\", $this->get(\"router\")->generate(\"admin_refeicao\"));\n $breadcrumbs->addItem(\"Novo\");\n \n $entity = new Refeicao();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "8d95ddac87d4643ea4961ea4930b97ea", "score": "0.70556754", "text": "public function create()\n {\n return view(\"Add\");\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "90c69861985934d05478b03d16057a83", "score": "0.703468", "text": "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "a8d72d9e9c8841bae122d93af9ebbc6a", "score": "0.7027203", "text": "public function create()\n\t{\n\t\treturn view('conceptos.create');\n\t}", "title": "" }, { "docid": "7000c38175570bf727255c3e8e4f9cba", "score": "0.70265305", "text": "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "title": "" }, { "docid": "8ab2d57cf873b8d7a025341aff05b594", "score": "0.7012496", "text": "public function create()\n {\n return $this->renderForm('create');\n }", "title": "" }, { "docid": "cb6dbca8a8b26b57ddf1e738c50cfdb6", "score": "0.7003889", "text": "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "title": "" }, { "docid": "bf2059d4d118ee786d18d4a90906eef2", "score": "0.70009905", "text": "public function create()\n\t{\n\t\treturn View::make('allowances.create');\n\t}", "title": "" }, { "docid": "eaf283aba53ce6033cf44e7602e29261", "score": "0.6997388", "text": "function showCreateForm(){\n return view('admin.Direktori.PHMJ.create');\n }", "title": "" }, { "docid": "645f7ceaa26e24597d62cd1e1f00fd57", "score": "0.6993764", "text": "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "title": "" }, { "docid": "949dbe2081affb6eb474d92ab81f7aa1", "score": "0.6990896", "text": "public function create()\n {\n //Lo utilizaremos para mostrar el formulario de registro\n return view($this->path.'.create');\n }", "title": "" }, { "docid": "dc37ca952e5aa8737ac79892a422cfea", "score": "0.6986989", "text": "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "title": "" }, { "docid": "61be6e0a3d99f1e507e44604564e975a", "score": "0.6980997", "text": "public function create()\n {\n return view('bookForm');\n }", "title": "" }, { "docid": "1ec05825f215a7777fdc20ca555172fe", "score": "0.6973015", "text": "public function create()\n {\n return view('armada.form', [\n\n ]);\n }", "title": "" }, { "docid": "69a0b21fb3b59fd1b7774d63afaf03c5", "score": "0.69656384", "text": "public function create()\n {\n return view('essentials::create');\n }", "title": "" }, { "docid": "acf307fc29e38f3eb3ce7326efc9234b", "score": "0.69620824", "text": "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add') . ' ' . __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "title": "" }, { "docid": "b7b479f100128afe4ff7af3512fd766c", "score": "0.69620264", "text": "public function newAction()\n {\n $this->getSecurityManager()->allowOr403('new');\n\n $object = $this->getModelManager()->create();\n $form = $this->getForm($object);\n\n if ($form->handleRequest($this->getRequest())) {\n $this->getModelManager()->save($object);\n\n return $this->getRedirectToListResponse();\n }\n\n return $this->getRenderFormResponse($form);\n }", "title": "" }, { "docid": "7423ea0a2f037cdf0d82c0bfb1da7d29", "score": "0.69582516", "text": "public function create()\n {\n return view('backend.book.bookadd');\n }", "title": "" }, { "docid": "53c6bc1f60b19320300c4fabee6ed361", "score": "0.69580436", "text": "public function actionCreate() {\n $model = new Forms();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post())) {\n $model->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "ae46873014fa5fd503919d0a4b1887ed", "score": "0.69533193", "text": "public function create()\n {\n //display form\n return view ('services.custCreate');\n }", "title": "" }, { "docid": "eac67c9622712586377b66a2ff564132", "score": "0.69518244", "text": "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "title": "" }, { "docid": "be6ad27859db471093b0e5b2b09e5ffa", "score": "0.6951109", "text": "public function create()\n {\n return view('url.form');\n }", "title": "" }, { "docid": "ce097a7f86eacaa44dea17f0ad57e5af", "score": "0.69423944", "text": "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "title": "" }, { "docid": "db4eb819752fba73041d3183c0667775", "score": "0.69416136", "text": "public function create()\n {\n\n $this->pageData['MainHeading'] = \"Add \" . $this->singularName;\n $this->pageData['PageTitle'] = \"Add \" . $this->singularName;\n $this->pageData['SubNav'] = \"Add \" . $this->singularName;\n $this->pageData['NavHeading'] = \"New \" . $this->singularName;\n\n // Add App Form\n $form = $this->form();\n\n return view('admin.add')\n ->with(['pageData' => $this->pageData])\n ->with(compact('form'))\n ->with(compact('jsValidator'));\n }", "title": "" }, { "docid": "63235ca26b90700eb46b16522a29a31a", "score": "0.6941156", "text": "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "568c63d802970802d43c670f348a8248", "score": "0.6936686", "text": "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "854d474e9079854ad8a7ee81f9143ba1", "score": "0.69329673", "text": "public function create()\n {\n return view('inventory.form');\n }", "title": "" }, { "docid": "2b4c0cd22a57111ee2cfd13aac73f31c", "score": "0.69327354", "text": "public function create()\n {\n $title = trans('global.company_add');\n return view('Admin.company_form', ['company' => new Company(),'title'=>$title]);\n }", "title": "" }, { "docid": "78e9486c325ba462b19adda0de272401", "score": "0.692827", "text": "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "94c3779c0a1265eecd22d4385bc1a934", "score": "0.69263744", "text": "public function create()\n {\n return view(\"List.form\");\n }", "title": "" }, { "docid": "b917bfaea71e2d0a3df177be4d435b70", "score": "0.6924303", "text": "public function create()\n {\n return View('regimen.create');\n }", "title": "" }, { "docid": "e7d77bd3e3281032dc80c6bc78add9d9", "score": "0.6921582", "text": "public function create()\n {\n return $this->showView('create');\n }", "title": "" }, { "docid": "647867f97e455ba059969ca3c7f2887c", "score": "0.69205487", "text": "public function create()\n {\n return view('student::student.create');\n }", "title": "" }, { "docid": "c51fdc706a6bfd79c2e1ca2912a1434f", "score": "0.6918349", "text": "public function create()\n {\n //load create form\n return view('products.create');\n }", "title": "" }, { "docid": "e2b0a02abbe886e85fd9672421e15054", "score": "0.6918003", "text": "public function create()\n {\n return view('clientenatural.create');\n }", "title": "" }, { "docid": "829518d17ea777e3ce8044bf5b54b566", "score": "0.6915829", "text": "public function create()\n {\n return view('demo.form');\n }", "title": "" }, { "docid": "5423c52c2321e0ddafbf93b55fde7689", "score": "0.6912884", "text": "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "title": "" }, { "docid": "847110acc021dbc5428f114892048164", "score": "0.69103104", "text": "public function create()\n {\n return view('saldo.form');\n }", "title": "" }, { "docid": "71762e87e905a248387bd0eac328ea8a", "score": "0.69040126", "text": "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "title": "" }, { "docid": "1bfbbb63771571819ef62035e977dcd9", "score": "0.69014287", "text": "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "0ff401bbe9c3f43249bbe6cc8081a963", "score": "0.6900397", "text": "public function create()\n {\n return view('admin.inverty.add');\n }", "title": "" }, { "docid": "80e9174a5ea2d8d5de9a229c71015305", "score": "0.6892881", "text": "public function newAction() {\n $entity = new RutaSugerida();\n $form = $this->createCreateForm($entity);\n\n return $this->render('DataBaseBundle:RutaSugerida:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "2588f5840e59634edceb01654f4d7a91", "score": "0.6889246", "text": "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "5ada95495a3e9a254b79e8c70f274d97", "score": "0.6887128", "text": "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "title": "" }, { "docid": "63255cd98b7d27b5f7ada5644e404a73", "score": "0.68836915", "text": "public function createAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\t\t\n\t\t$form = new Admin_Form_Country();\n $this->view->form = $form;\n\t}", "title": "" }, { "docid": "ebf8f32acbc00c6c98f44086fb506407", "score": "0.68822503", "text": "public function create()\n {\n return view('forming');\n }", "title": "" }, { "docid": "b8ac7882377fb8e91aafc311ae89adb6", "score": "0.68816394", "text": "public function create()\n {\n return view('infografis.create');\n }", "title": "" }, { "docid": "e87ea28de0e147839885d202fdcf87c3", "score": "0.6879313", "text": "public function create()\n {\n //return view('dashboard.state.form');\n }", "title": "" }, { "docid": "fb1106685e49c1f3cab227154413b8f7", "score": "0.68784964", "text": "public function create()\n {\n return view('forms');\n }", "title": "" }, { "docid": "4ddd90ea14473a86e2988865e2801155", "score": "0.68739134", "text": "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "title": "" }, { "docid": "3b6a16ce171a9e1a615b3e03450c34a3", "score": "0.68711114", "text": "public function create()\n {\n return view('red.create');\n }", "title": "" }, { "docid": "aa511d4b629c0b0d4a199ccd11db45cb", "score": "0.68710226", "text": "public function onCreateForm(CreateFormResourceEvent $event)\n {\n //see the Form/ExampleType.php file. There is a required field for every resource.\n $form = $this->container->get('form.factory')->create(new ExampleType, new Example());\n //Use the following resource form.\n //Be carefull, the resourceType is case sensitive.\n //If you don't want to use the default form, feel free to create your own.\n //Make sure the submit route is\n //action=\"{{ path('claro_resource_create', {'resourceType':resourceType, 'parentInstanceId':'_nodeId'}) }}\".\n //Anything else different won't work.\n //The '_nodeId' isn't a mistake, it's a placeholder wich will be replaced with js later on.\n\n $content = $this->container->get('templating')->render(\n 'ClarolineCoreBundle:Resource:createForm.html.twig', array(\n 'form' => $form->createView(),\n 'resourceType' => 'claroline_example'\n )\n );\n\n $event->setResponseContent($content);\n $event->stopPropagation();\n }", "title": "" }, { "docid": "73084f7d2ba247149c11e34d765ee5b5", "score": "0.6870521", "text": "public function create()\n {\n return view('templates.forms');\n }", "title": "" }, { "docid": "08b2184ad0a486ae1bab76e79b3a1b26", "score": "0.6870358", "text": "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "title": "" }, { "docid": "9577fbd0ebc45d0dafabfda3c9643259", "score": "0.6869779", "text": "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "title": "" }, { "docid": "7b07df9cfd457b02f48b76d7469d53e0", "score": "0.686877", "text": "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "title": "" }, { "docid": "a5195734c398d2f3776a0d934b5b5c6d", "score": "0.6865811", "text": "public function create()\n {\n $title = 'Khởi tạo chi nhánh';\n\n return view(PAGE_VIEW_FORM, compact('title'));\n }", "title": "" } ]
eccb39adf5eb86b1a7d4b578eaaac892
Print a human readability and localized time for a timestamp out of the internal data array. Behaves analogous to $this>asTime().
[ { "docid": "1f4aeb032da6f7d2d3307483566dfdfe", "score": "0.6118737", "text": "function printAsTime($key, $format = '') {\n\t\tprint $this->asTime($key, $format);\n\t}", "title": "" } ]
[ { "docid": "a1eb44106255ff792139d19a08d252f3", "score": "0.6380919", "text": "function timestamp() {\r\n return date('Y-m-d H:i:s') . '.' . self::msecond();\r\n }", "title": "" }, { "docid": "2a94e74f2677b898b6381ba33ab91069", "score": "0.6375795", "text": "function rendertime() \n\t{\n\t\techo (round(microtime(true) - $this->time,4). \" s.\");\n\t}", "title": "" }, { "docid": "e0cedf0f9d50892a880bf0087b45bd0c", "score": "0.63521445", "text": "protected function timestamp() {\n $tm = gettimeofday();\n $ms = floor($tm['usec'] / 1000);\n return strftime(\"%Y-%m-%d %H:%M:%S\") . sprintf('.%03d', $ms);\n }", "title": "" }, { "docid": "f62ecf240663582aa66d02207210f90d", "score": "0.6345065", "text": "private function the_timestamp()\n {\n if ($this->timestamps_format == 'timestamp') {\n return time();\n } else {\n return date($this->timestamps_format);\n }\n }", "title": "" }, { "docid": "0c1dd4d41821dc04b60e5899fca2cb3a", "score": "0.631417", "text": "public function __toString()\n {\n return $this->helper->formatTime($this->time);\n }", "title": "" }, { "docid": "e7a21a6cd9d446ec6e97dea086c6f89a", "score": "0.6107422", "text": "public function getDisplayTime();", "title": "" }, { "docid": "f24fdf8108ebae1c38a23132014cda07", "score": "0.61068976", "text": "public function timeMessage()\n {\n return date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "7228c5853bee128b718194b035263749", "score": "0.6075716", "text": "function timeStamp()\n\t\t{\n\t\t\treturn date(\"h:i:s\",$this->time);\n\t\t}", "title": "" }, { "docid": "cd71e811413576b85e38f1f68e875d1e", "score": "0.59218425", "text": "public function getTimeFormatted(): string\n {\n return $this->getTime()->format(self::DEFAULT_TIME_FORMAT);\n }", "title": "" }, { "docid": "4ada9444555c4175038be5d675dda81b", "score": "0.58929354", "text": "function htmlTime($timestamp)\n{\n\tglobal $txt, $context;\n\n\tif (empty($timestamp))\n\t{\n\t\treturn '';\n\t}\n\n\t$timestamp = forum_time(true, $timestamp);\n\t$time = date('Y-m-d H:i', $timestamp);\n\t$stdtime = standardTime($timestamp, true, true);\n\n\t// @todo maybe htmlspecialchars on the title attribute?\n\treturn '<time title=\"' . (!empty($context['using_relative_time']) ? $stdtime : $txt['last_post']) . '\" datetime=\"' . $time . '\" data-timestamp=\"' . $timestamp . '\">' . $stdtime . '</time>';\n}", "title": "" }, { "docid": "d5b92893d220df31d7c79381cf6ce820", "score": "0.58708704", "text": "protected function timestamp()\n {\n return strval((int)round(microtime(true) * 1000));\n }", "title": "" }, { "docid": "f833dd730395a9aad3e73f3fbe9c5159", "score": "0.5854445", "text": "public function actionTime()\n\t\t{\n\t\t\t//print \"Date: \" . date('H:i:s') . \"<br />\";\n\t\t\t//print gmdate(\"h\", mktime(-3)) . \"<br />\";\n\t\t\tdate_default_timezone_set('America/Denver');\n\t\t\tprint date('l jS \\of F Y h:i:s A') . \"<br />\";\n\t\t}", "title": "" }, { "docid": "b0b4f4f0c5283a35e0565a709eb4a478", "score": "0.58301175", "text": "function timestr($timestamp) {\n global $t;\n $time = strftime(\"%A, %e. %B %Y, %H:%M:%S %Z\", $timestamp);\n return $time;\n}", "title": "" }, { "docid": "b5a5877959ec35db503c833981425538", "score": "0.581424", "text": "public function getTimeInfo()\n {\n return $this->time_info;\n }", "title": "" }, { "docid": "190f5881e113ef605573c9955de429ec", "score": "0.57910824", "text": "function microbot_format_timestamp($ts) {\n return date('F jS, Y \\a\\t g:i a', $ts);\n}", "title": "" }, { "docid": "4826725f4b9057570843f39102305d07", "score": "0.57549995", "text": "public function getFormattedTimestampAttribute()\n {\n return TimeUtilities::timestampToString($this->timestamp);\n }", "title": "" }, { "docid": "1e74f01f2f2d36d22b7b44bd030fb947", "score": "0.5753755", "text": "public function toTimeString();", "title": "" }, { "docid": "106fb9958553d341fae06002fc042d84", "score": "0.574422", "text": "public function __toString()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->language()->convertString( strftime( '%x ' . $this->localeTimeFormat(), $this->getTimestamp() + $this->getTimezone()->getOffset( $this ) ) );\n\t}", "title": "" }, { "docid": "db24134f713e039496d701df912ae5a1", "score": "0.57426673", "text": "public function toString () {\n\t\t#/home/grabli66/haxe/std/php/_std/Date.hx:72: characters 3-39\n\t\treturn date(\"Y-m-d H:i:s\", (int)($this->__t));\n\t}", "title": "" }, { "docid": "5842b2d1064237ce6b17259c096963d7", "score": "0.572438", "text": "public function __toString()\n {\n return $this->toUserTime()->format(self::$defaultFormat);\n }", "title": "" }, { "docid": "b5b4005196ebf9568ac017ed519e2b89", "score": "0.57211375", "text": "private function decorateTime(): void\n {\n $this->arr['time'] = Carbon::parse($this->arr['time'])\n ->timezone(config('app.timezone'))\n ->toDateTimeString();\n }", "title": "" }, { "docid": "b874aa8d27a09925e6fadfbe10d418df", "score": "0.5719531", "text": "public function getTime() {\r\n return explode( ':', $this->format( 'H:i:s' ));\r\n }", "title": "" }, { "docid": "73776e033e454a9d98797c010a9c68da", "score": "0.5710888", "text": "public function timeFormat()\n\t{\n\t\treturn $this->format_time;\n\t}", "title": "" }, { "docid": "d78cafadd4c55b7456211c77fd8c0ef8", "score": "0.57072216", "text": "protected function getTime(): string\n {\n $now = DateTime::createFromFormat('U.u', (string) microtime(true));\n return $now->format($this->timeFormat);\n }", "title": "" }, { "docid": "9d1c4c7bbf90e3dd01141f88d93a866d", "score": "0.5688944", "text": "public function printAsTime($key, $format = '') {\n\t\tprint $this->asTime($key, $format);\n\t}", "title": "" }, { "docid": "2010d85c884baa76366671e9f4230ab2", "score": "0.5686671", "text": "private function getTimeStamp()\n {\n $microtime = round(microtime(true) * 1000);\n \n return number_format($microtime, 0, \".\", \"\");\n }", "title": "" }, { "docid": "e66f77e76e0dfb8d8aac748fedeabdf7", "score": "0.56830627", "text": "static function formatTimestamp($time, $format=\"l\", $timeoffset=\"\") {\r\n\t global $xoopsConfig, $xoopsUser;\r\n\t $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);\r\n\t return _formatTimeStamp($usertimestamp, $format);\r\n\t}", "title": "" }, { "docid": "3452b4abf16813c797bf949e552f3d2e", "score": "0.5673118", "text": "function getTimestamp()\n {\n return (string) $this->_sTimestamp;\n }", "title": "" }, { "docid": "85101e5eb8b325d0df61d7536b0ada0f", "score": "0.5671405", "text": "public function getTime() {\n\t\t\treturn $this->$time;\n\t\t}", "title": "" }, { "docid": "d9c771f9625735d2760d7467c06b78b4", "score": "0.5650998", "text": "public function getTime()\n {\n return $this->_timestamp;\n }", "title": "" }, { "docid": "7684f5a9071bbdab4e0bf87834a08f13", "score": "0.564749", "text": "public function getTime()\n {\n return $this->format('H:i:s');\n }", "title": "" }, { "docid": "58e05ea93dc15c251aae9f70d924cfb5", "score": "0.5637348", "text": "public function format(array $record): string\n {\n if (isset($record[\"datetime\"]) && ($record[\"datetime\"] instanceof \\DateTimeInterface)) {\n $record[\"timestamp\"] = $record[\"datetime\"]->format(\"Y-m-d\\TH:i:s.uO\");\n unset($record[\"datetime\"]);\n }\n\n return parent::format($record);\n }", "title": "" }, { "docid": "c045c2eed60541d8cbedb22e5df4e307", "score": "0.56340146", "text": "function lingotek_human_readable_timestamp($unix_timestamp, $as_array = FALSE) {\n $time = time() - $unix_timestamp;\n\n $intervals = array(\n 31536000 => t('year'),\n 2592000 => t('month'),\n 604800 => t('week'),\n 86400 => t('day'),\n 3600 => t('hour'),\n 60 => t('minute'),\n 1 => t('second')\n );\n\n foreach ($intervals as $unit => $text) {\n if ($time < $unit) {\n continue;\n }\n $number = floor($time / $unit);\n if ($as_array) {\n return array('number' => $number, 'interval' => $text . (($number > 1) ? 's' : ''));\n }\n else {\n return $number . ' ' . $text . (($number > 1) ? 's' : '');\n }\n }\n if ($as_array) {\n return array('number' => 0, 'interval' => t('seconds'));\n }\n else {\n return '0 ' . t('seconds');\n }\n}", "title": "" }, { "docid": "07a5344f22267b7bad4094141bdc95da", "score": "0.56320286", "text": "function getTime()\n {\n return $this->hour.$this->min.$this->second;\n }", "title": "" }, { "docid": "eb5b41fb91af71ebf3a74107bbcb6cb2", "score": "0.5628889", "text": "public function getTimeFormat();", "title": "" }, { "docid": "49f308f6c8846df98b51f04173b65ae8", "score": "0.5625162", "text": "public static function timestamp()\n {\n return time();\n }", "title": "" }, { "docid": "5ca12cb7d3b3636c72aa3453aa77322e", "score": "0.56157875", "text": "public function getDisplayTime()\n {\n return $this->displayTime;\n }", "title": "" }, { "docid": "c564e86978c0b75dc7f4e579c85926a6", "score": "0.56091255", "text": "public function getTimestampString(): string {\n\t\t$dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' );\n\t\t$switchTime = new DateTimeImmutable(\n\t\t\t$dtConfig->get( 'DiscussionToolsTimestampFormatSwitchTime' )\n\t\t);\n\t\t$timestamp = $this->getTimestamp();\n\t\tif ( $timestamp < $switchTime ) {\n\t\t\treturn $timestamp->format( 'Y-m-d\\TH:i:s.v\\Z' );\n\t\t} else {\n\t\t\treturn $timestamp->format( 'YmdHis' );\n\t\t}\n\t}", "title": "" }, { "docid": "c521a31e83efd26c0ce4b67e385f21ad", "score": "0.5595061", "text": "public function GetTime()\r\n {\r\n return $this->time;\r\n }", "title": "" }, { "docid": "ab7f4fec55aed3efd09b294ea6a84c3f", "score": "0.5593646", "text": "public function toString() {\n return microtime( true ) - $this->start . ' seconds';\n }", "title": "" }, { "docid": "a2dda8805ac2c9ccb50c3caa6007560a", "score": "0.55858916", "text": "public static function GetFormattedTime($timestamp = false) {\n if (!$timestamp)\n return @strftime(\"%d/%m/%Y %H:%M:%S\");\n else\n return @strftime(\"%d/%m/%Y %H:%M:%S\", $timestamp);\n }", "title": "" }, { "docid": "cf709dbec5dd29627367286cf23abf45", "score": "0.55659205", "text": "private function getTimeStamp()\n {\n return date('r');\n }", "title": "" }, { "docid": "6447ed829bf0e20f1ced0b712ac21892", "score": "0.55606157", "text": "public function getTime()\r\n {\r\n return $this->_time;\r\n }", "title": "" }, { "docid": "83dc91492a95be65bb347a7c5fabc6fa", "score": "0.55550146", "text": "public function getEscapedTime()\n\t{\n\t\treturn intval( $this->getUnixTimestamp() - self::EPOCH_OFFSET );\n\t}", "title": "" }, { "docid": "d5121535aa51b8fa000feeebf01668d4", "score": "0.55371237", "text": "function showTime($dbtimestamp)\n {\n //take the first 19 characters of the timestamp returned from the database and creates the unix time stamp using strtotime function\n $timestamp=strtotime(substr($dbtimestamp,0,19));\n $time=date (\"h:i a\",$timestamp);\n return $time;\n }", "title": "" }, { "docid": "b91d7c74e50e50f39ffc2c53fb92b84d", "score": "0.5517343", "text": "public function getTime () {\n\t\t#/home/grabli66/haxe/std/php/_std/Date.hx:35: characters 3-22\n\t\treturn $this->__t * 1000.0;\n\t}", "title": "" }, { "docid": "c0696a58d38089dd3ccff8c1cabfffc9", "score": "0.55057955", "text": "public function toTimeString()\n {\n return $this->format('H:i:s');\n }", "title": "" }, { "docid": "fd9a38550ee8cb1758d864979aee5213", "score": "0.54967636", "text": "public function getTime(){\n\t\treturn $this->_time;\n\t}", "title": "" }, { "docid": "ced4341ce2c72f72d60c02b596779829", "score": "0.5479005", "text": "public function message()\n {\n return trans('validation.time', ['format' => $this->format]);\n }", "title": "" }, { "docid": "9382c070cb76e24b20064024403a80b5", "score": "0.5472789", "text": "public function getTimestamp();", "title": "" }, { "docid": "9382c070cb76e24b20064024403a80b5", "score": "0.5472789", "text": "public function getTimestamp();", "title": "" }, { "docid": "9382c070cb76e24b20064024403a80b5", "score": "0.5472789", "text": "public function getTimestamp();", "title": "" }, { "docid": "9382c070cb76e24b20064024403a80b5", "score": "0.5472789", "text": "public function getTimestamp();", "title": "" }, { "docid": "9382c070cb76e24b20064024403a80b5", "score": "0.5472789", "text": "public function getTimestamp();", "title": "" }, { "docid": "9382c070cb76e24b20064024403a80b5", "score": "0.5472789", "text": "public function getTimestamp();", "title": "" }, { "docid": "9382c070cb76e24b20064024403a80b5", "score": "0.5472789", "text": "public function getTimestamp();", "title": "" }, { "docid": "647391932450d9dab4ecf6f5cefd6ec7", "score": "0.5472044", "text": "public function getTimestamp(): string\n\t{\n\t\treturn $this->timestamp;\n\t}", "title": "" }, { "docid": "2bb5259c633fba49a0d1f262d5460b3f", "score": "0.5468125", "text": "public function getTimestamp(): string;", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "9d4c7dc9cb383ef5b99461a3e68a8885", "score": "0.546716", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "dfee2e5fd1ab9800973d4f05ec6c750a", "score": "0.5464335", "text": "public function getTime() {\n return $this->time;\n }", "title": "" }, { "docid": "a1197b3326f03141fce5290317020dab", "score": "0.545142", "text": "public function timeSend()\n {\n if ($this->time) {\n return $this->time->format('H:i:s');\n }\n }", "title": "" }, { "docid": "8cd6c312fd9cbef7c6fd5475093931b8", "score": "0.5438455", "text": "protected function getTime()\r\n\t{\r\n\t\treturn microtime();\r\n\t}", "title": "" }, { "docid": "1d1989cc971cc25a6f31f4874b3ef731", "score": "0.54376554", "text": "function aerospace_event_time($id)\n {\n if ('events' === get_post_type()) {\n $time = get_post_meta($id, '_events_time', true);\n\n if ('' !== $time) {\n printf('<div class=\"entry-time\"><span class=\"meta-label\">' . esc_html('Time', 'aerospace') . '</span>%1$s</div>', $time); // WPCS: XSS OK.\n }\n }\n }", "title": "" }, { "docid": "5cd94120bd60721fa7155a8287297a4d", "score": "0.54363525", "text": "public function get_time_stamp() {\n $timeformat = get_string('strftimedatetime', 'core_langconfig');\n return userdate(time(), $timeformat);\n }", "title": "" }, { "docid": "9c1449d1af3f335ad12d0b318fd18128", "score": "0.5432099", "text": "public function getTimeStamp()\n {\n return $this->timeStamp;\n }", "title": "" }, { "docid": "184e7447405f9bd7219ad1fe36ae1a9d", "score": "0.5430768", "text": "function _timeToText($pn_seconds, $pa_options=null) {\t\t// pn_seconds is number of seconds since midnight\n\t\tif (!$pa_options) { $pa_options = array(); }\n\t\tforeach(array('timeFormat', 'timeFormat') as $vs_opt) {\n\t\t\tif ($vs_opt_val = $this->opo_datetime_settings->get($vs_opt)) {\n\t\t\t\t$pa_options[$vs_opt] = $vs_opt_val;\n\t\t\t}\n\t\t}\n\t\t$va_time_delimiters = $this->opo_language_settings->getList('timeDelimiters');\n\t\t\n\t\tif ($pa_options['timeDelimiter'] && in_array($pa_options['timeDelimiter'], $va_time_delimiters)) {\n\t\t\t$vs_time_delim = $pa_options['timeDelimiter'];\n\t\t} else {\n\t\t\t$vs_time_delim = $va_time_delimiters[0];\n\t\t}\n\t\t\n\t\t$vn_hours = floor($pn_seconds/3600);\n\t\t$pn_seconds -= ($vn_hours * 3600);\n\t\t$vn_minutes = floor($pn_seconds/60);\n\t\t$pn_seconds -= ($vn_minutes * 60);\n\t\t$vn_seconds = $pn_seconds;\n\t\t\n\t\tif ($pa_options['timeFormat'] == 12) {\n\t\t\tif ($vn_hours < 12) {\n\t\t\t\t$vs_meridian = $this->opo_language_settings->get('timeAMMeridian');\n\t\t\t} else {\n\t\t\t\t$vs_meridian = $this->opo_language_settings->get('timePMMeridian');\n\t\t\t\t$vn_hours -= 12;\n\t\t\t}\n\t\t\t\n\t\t\tif (($vn_hours == 0) && ($vs_meridian == $this->opo_language_settings->get('timePMMeridian'))) {\n\t\t\t\t$vn_hours = 12;\n\t\t\t}\n\t\t\tif (($vn_hours == 0) && ($vs_meridian == $this->opo_language_settings->get('timeAMMeridian'))) {\n\t\t\t\t$vn_hours = 12;\n\t\t\t}\n\t\t\t\n\t\t\tif ($pa_options['timeOmitSeconds'] || ($vn_seconds == 0)) {\n\t\t\t\t$vs_text = join($vs_time_delim, array($vn_hours, sprintf('%02d', $vn_minutes))).' '.$vs_meridian;\t\t\n\t\t\t} else {\n\t\t\t\t$vs_text = join($vs_time_delim, array($vn_hours, sprintf('%02d', $vn_minutes), sprintf('%02d', $vn_seconds))).' '.$vs_meridian;\n\t\t\t}\n\t\t} else {\n\t\t\tif ($pa_options['timeOmitSeconds'] || ($vn_seconds == 0)) {\n\t\t\t\t$vs_text = join($vs_time_delim, array($vn_hours, sprintf('%02d', $vn_minutes)));\n\t\t\t} else {\n\t\t\t\t$vs_text = join($vs_time_delim, array($vn_hours, sprintf('%02d', $vn_minutes), sprintf('%02d', $vn_seconds)));\n\t\t\t}\n\t\t}\n\t\treturn $vs_text;\n\t}", "title": "" }, { "docid": "322444febdeb615b49b3b68dd9e18d74", "score": "0.5425423", "text": "public function showdatetime()\n\t{\n\t //this is sweden!\n\t date_default_timezone_set(\"Europe/Stockholm\");\n setlocale(LC_TIME, 'sv_SE'); \n\t\t\n\t\t//fixa utf-8-problem vid åäö, och stor första bokstav.\n\t\t$weekday = ucfirst(utf8_encode(strftime(\"%A\")));\n\t\t$month = ucfirst(utf8_encode(strftime(\"%B\")));\n\t\t\n //skickar tillbaka en sträng med datum/tid \n return strftime($weekday.\", den %d \".$month.\" år %Y. Klockan är [%H:%M:%S]\");\n \n\t}", "title": "" }, { "docid": "f6ffb53f8872c188f043d285a11fb2ad", "score": "0.54245144", "text": "function dateTime($timestamp, $dateWidth='short', $timeWidth='short') {\n\treturn Yii::app()->dateFormatter->formatDateTime($timestamp, $dateWidth, $timeWidth);\n}", "title": "" }, { "docid": "b13f9d229bf1d9d12ca6d87a4346742c", "score": "0.54221845", "text": "function timeFormat($timeStamp) {\n\treturn strftime('%e %B %Y %R', $timeStamp);\n}", "title": "" }, { "docid": "93ec081dc9f08df90dbeaa1d155131c1", "score": "0.54087186", "text": "function setTsStrftime()\n {\n $conf = $this->pObj->conf;\n\n $view = $this->pObj->view;\n $mode = $this->pObj->piVar_mode;\n\n $str_tsStrftime = '';\n\n if ( $conf[ 'views.' ][ $view . '.' ][ $mode . '.' ][ 'format.' ][ 'strftime' ] != '' )\n {\n $str_tsStrftime = $conf[ 'views.' ][ $view . '.' ][ $mode . '.' ][ 'strftime.' ][ 'date' ];\n // Local format for human readable timestamp\n }\n else\n {\n $str_tsStrftime = $conf[ 'format.' ][ 'strftime' ];\n // Global format\n }\n return $str_tsStrftime;\n }", "title": "" }, { "docid": "4574050c0f4d1332975e7d45b2d4cd23", "score": "0.54069126", "text": "public function getLoadTimeFormatted()\n {\n return number_format($this->getLoadTime(), 2, '.', '') . 'ms';\n }", "title": "" }, { "docid": "85f1e0752034f4f53c261a5a891df84e", "score": "0.540011", "text": "public function iSeeTheGeneratedTime(){\r\n echo $this->generatedTime;\r\n }", "title": "" }, { "docid": "249d183cd6e72ddcd77206d60460cfe9", "score": "0.5394087", "text": "function get_human_time($time) {\n \n}", "title": "" }, { "docid": "391a7de296469dfc7c259f4a1f6cba46", "score": "0.5393823", "text": "public function getTimestamp(){\n\t\treturn $this->bookbeatjson->getTimeStamp();\n\t}", "title": "" }, { "docid": "7e0b17449bac9fc16c0f7713b0c159ce", "score": "0.5393342", "text": "public function time()\n {\n return $this->time;\n }", "title": "" }, { "docid": "7e0b17449bac9fc16c0f7713b0c159ce", "score": "0.5393342", "text": "public function time()\n {\n return $this->time;\n }", "title": "" }, { "docid": "f0cd15804c883fbe2dd316a09cb4fc7b", "score": "0.53881234", "text": "public function getTime($el)\n\t{\n\t\treturn $el['time'];\n\t}", "title": "" }, { "docid": "47ff54f0858e79e9baa943465d1586d3", "score": "0.5385172", "text": "public function __toString()\n\t{\n\t\t$timestamp = $this->toSeconds();\n\t\t\n\t\treturn sprintf('%s.%02d', gmdate('H:i:s', $timestamp), round(100 * ($timestamp - floor($timestamp))));\n\t}", "title": "" }, { "docid": "7c4339954cfaea644c0f18c0c0b25146", "score": "0.5385049", "text": "function time_format ($format, $timestamp)\n{\n return strftime($format, $timestamp);\n}", "title": "" }, { "docid": "64a89958937c700c67ef57eabbcbfb4a", "score": "0.5383393", "text": "public function getMessageTimestamp()\n {\n return (string) $this->data->MessageInfo->messageTimestamp;\n }", "title": "" }, { "docid": "43a902421b007174a1bdcee4fd725a19", "score": "0.5382332", "text": "public function timestamp()\n {\n return $this->_timestamp;\n }", "title": "" }, { "docid": "43a902421b007174a1bdcee4fd725a19", "score": "0.5382332", "text": "public function timestamp()\n {\n return $this->_timestamp;\n }", "title": "" }, { "docid": "ed6340f75cd0fe090ee119ce91909858", "score": "0.53764653", "text": "function dateTimeStamp()\n\t\t{\n\t\t\treturn date(\"m/d/y h:i:s\",$this->time);\n\t\t}", "title": "" }, { "docid": "f54a8598f9c1240883bbe4903139edc7", "score": "0.5373245", "text": "public function testTime()\n {\n $date = Zend_Locale_Data::getList('de_AT', 'time');\n $result = [\"full\" => \"HH:mm:ss zzzz\", \"long\" => \"HH:mm:ss z\",\n \"medium\" => \"HH:mm:ss\", \"short\" => \"HH:mm\"];\n $this->assertEquals($result, $date);\n\n $date = Zend_Locale_Data::getList('de_AT', 'time', 'islamic');\n $result = [\"full\" => \"HH:mm:ss zzzz\", \"long\" => \"HH:mm:ss z\",\n \"medium\" => \"HH:mm:ss\", \"short\" => \"HH:mm\"];\n $this->assertEquals($result, $date);\n\n $value = Zend_Locale_Data::getContent('de_AT', 'time');\n $this->assertEquals(\"HH:mm:ss\", $value);\n\n $value = Zend_Locale_Data::getContent('de_AT', 'time', 'long');\n $this->assertEquals(\"HH:mm:ss z\", $value);\n\n $value = Zend_Locale_Data::getContent('ar', 'time', ['islamic', 'long']);\n $this->assertEquals(\"HH:mm:ss z\", $value);\n }", "title": "" }, { "docid": "b7c4a911c1733bc9b22ecd380ceb0bc2", "score": "0.53535473", "text": "function tm($time, $disable_wrapper = false){\n\t\treturn ($disable_wrapper ? '' : '<span data-moment=\"' . $time . '\">') . 'at ' . date('H:i:s', strtotime($time)) . ($disable_wrapper ? '' : '</span>');\n\t}", "title": "" }, { "docid": "fb0783e146bdd0de7e1a12c5462d4f7a", "score": "0.53513074", "text": "public function getTime()\n {\n return $this->time;\n }", "title": "" }, { "docid": "4f8132677b71ffbe01e5029780076293", "score": "0.5348083", "text": "public function test3() {\n return format_date(time());\n }", "title": "" }, { "docid": "395e11bcde86a4b91d3699dffd08fbc6", "score": "0.5340696", "text": "public function getTime()\n {\n return $this->Time;\n }", "title": "" }, { "docid": "a23edffa0da66d6d8a2a0ae64359e2f4", "score": "0.5326392", "text": "public function getTime()\n\t{\n\t\treturn $this->time;\n\t}", "title": "" }, { "docid": "a455e418c4ba49015fd0cff793265022", "score": "0.5319133", "text": "public function toString()\r\n {\r\n $sign = ($this->totalMilliseconds == 0) ? 1 : $this->totalMilliseconds / abs($this->totalMilliseconds);\r\n $str_sign = ($sign == -1) ? '-' : '';\r\n return $str_sign .\r\n abs($this->days) . \".\" .\r\n str_pad(abs($this->hours), 2, '0', STR_PAD_LEFT) . \":\" .\r\n str_pad(abs($this->minutes), 2, '0', STR_PAD_LEFT) . \":\" . \r\n str_pad(abs($this->seconds), 2, '0', STR_PAD_LEFT) . \".\" . \r\n str_pad(abs($this->milliseconds), 7, '0', STR_PAD_RIGHT);\r\n }", "title": "" }, { "docid": "07e2cba7cc999828b8d7c0a2c09cda54", "score": "0.5311171", "text": "function get_time() {\n return $this->post_time;\n }", "title": "" }, { "docid": "959ac4bb367939d195c8ea0da7306741", "score": "0.5309808", "text": "public function toTimeString(): Str\n {\n return $this->toFormatInternal('H:i:s');\n }", "title": "" }, { "docid": "deec0dd1938ecfbfa2a5b0285c513b74", "score": "0.53077406", "text": "function vpb_time_sent( $timestamp )\n{\n if( !is_numeric( $timestamp ) ) {\n $timestamp = strtotime( $timestamp );\n if( !is_numeric( $timestamp ) )\n\t\t{\n return \"\";\n }\n }\n $difference = time() - $timestamp;\n $periods = array( \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"years\", \"decade\" );\n $lengths = array( \"60\",\"60\",\"24\",\"7\",\"4.35\",\"12\",\"10\");\n if ($difference > 0) {\n\t\t// this was in the past\n $ending = \"ago\";\n }\n\telse {\n\t\t// this was in the future\n $difference = -$difference;\n $ending = \"to go\";\n }\n for( $j=0; $difference>=$lengths[$j] and $j < 7; $j++ )\n $difference /= $lengths[$j];\n $difference = round($difference);\n if( $difference != 1 ) {\n // Also change this if needed for an other language\n $periods[$j].= \"s\";\n }\n $vpb_Text = \"$difference $periods[$j] $ending\";\n return $vpb_Text;\n}", "title": "" } ]
df46f7d92c4b50b854bb1f795d5b3bdf
Create Subscription Period Builds expected XML for creating a subscription period
[ { "docid": "7bfea03e563e82329b34fecf1b6e9b5f", "score": "0.7367144", "text": "public static function createSubscriptionPeriod($data)\n {\n $dom = new DomDocument();\n\n $subscriptionPeriod = $dom->createElementNS('http://schema.yudu.com', \"subscriptionPeriod\");\n\n $dom->appendChild($subscriptionPeriod);\n\n // Add required reader element\n $reader = $dom->createElement('reader');\n $reader->setAttribute(\"id\", $data['reader']);\n $subscriptionPeriod->appendChild($reader);\n\n // Add required subscription element\n $subscription = $dom->createElement('subscription');\n $subscription->setAttribute(\"id\", $data['subscription']);\n $subscriptionPeriod->appendChild($subscription);\n\n // Add required startDate element\n $startDate = $dom->createElement('startDate');\n $startDate->appendChild($dom->createTextNode($data['startDate']));\n $subscriptionPeriod->appendChild($startDate);\n\n // Add optional expiry date\n if($data['expiryDate']){\n $expiryDate = $dom->createElement('expiryDate');\n $expiryDate->appendChild($dom->createTextNode($data['expiryDate']));\n $subscriptionPeriod->appendChild($expiryDate);\n }\n\n return $dom->saveXML();\n }", "title": "" } ]
[ { "docid": "769382d8a68e10b4aa7aeecdff8911e4", "score": "0.60592425", "text": "public static function updateSubscriptionPeriod($id, $data)\n {\n $dom = new DomDocument();\n\n $subscriptionPeriod = $dom->createElementNS('http://schema.yudu.com', \"subscriptionPeriod\");\n\n $subscriptionPeriod->setAttribute(\"id\", $id);\n\n $dom->appendChild($subscriptionPeriod);\n\n foreach($data as $key => $value)\n {\n $element = $dom->createElement($key);\n $element->appendChild($dom->createTextNode($value));\n $subscriptionPeriod->appendChild($element);\n }\n\n return $dom->saveXML();\n }", "title": "" }, { "docid": "887f838b8390206aa0b6dca5d8b59e56", "score": "0.58715373", "text": "protected function generate()\n {\n if ($this->subperiodsProcessed) {\n return;\n }\n\n parent::generate();\n $date = $this->date;\n\n if ($date->toString('N') > 1) {\n $date = $date->subDay($date->toString('N') - 1);\n }\n\n $startWeek = $date;\n\n $currentDay = clone $startWeek;\n while ($currentDay->compareWeek($startWeek) == 0) {\n $this->addSubperiod(new Day($currentDay));\n $currentDay = $currentDay->addDay(1);\n }\n }", "title": "" }, { "docid": "2e99cf033bc4bcb7ff89b5908f9652b1", "score": "0.5778339", "text": "protected function generateXml()\n {\n $datetime = new \\DateTime();\n $creationDateTime = $datetime->format('Y-m-d\\TH:i:s');\n \n\n /* Groupheader */\n $GroupHeader = $this->xml->CstmrDrctDbtInitn->addChild('GrpHdr'); /* ISO: 1.0 */\n $GroupHeader->addChild('MsgId', $this->messageIdentification); /* ISO: 1.1 */\n $GroupHeader->addChild('CreDtTm', $creationDateTime); /* ISO: 1.2 */ \n $GroupHeader->addChild('NbOfTxs', $this->numberOfTransactions); /* ISO: 1.6 */\n $GroupHeader->addChild('InitgPty')->addChild('Nm', $this->alphanumeric($this->initiatingPartyName,70)); /* ISO: 1.8 */\n \n foreach($this->transactions as $sequenceType => $transactions)\n {\n \n /* Payment Information */\n $PaymentInformation = $this->xml->CstmrDrctDbtInitn->addChild('PmtInf'); /* ISO: 2.0 */\n $PaymentInformation->addChild('PmtInfId', $this->alphanumeric($this->paymentInfoId.'-'.$sequenceType,35)); /* ISO: 2.1 */\n $PaymentInformation->addChild('PmtMtd', \"DD\"); /* ISO: 2.2 */\n \n $PaymentInformation->addChild('PmtTpInf')->addChild('SvcLvl')->addChild('Cd','SEPA'); /* ISO: 2.9 */\n $PaymentInformation->PmtTpInf->addChild('LclInstrm')->addChild('Cd','CORE'); /* ISO: 2.11, 2.12 */\n $PaymentInformation->PmtTpInf->addChild('SeqTp', $sequenceType); /* ISO: 2.14 */\n \n $PaymentInformation->addChild('ReqdColltnDt', $this->requestedExecutionDate); /* ISO: 2.18 */\n $PaymentInformation->addChild('Cdtr')->addChild('Nm', $this->alphanumeric($this->initiatingPartyName,70)); /* ISO: 2.19*/\n $PaymentInformation->addChild('CdtrAcct')->addChild('Id')->addChild('IBAN',$this->IBAN) ; /* ISO: 2.20 */\n $PaymentInformation->addChild('CdtrAgt')->addChild('FinInstnId')->addChild('BIC',$this->BIC); /* ISO: 2.21 */\n /* ISO: 2.27 */\n $PaymentInformation->addChild('CdtrSchmeId')->addChild('Id')->addChild('PrvtId')->addChild('Othr')->addChild('Id',$this->creditorId);\n $PaymentInformation->CdtrSchmeId->Id->PrvtId->Othr->addChild('SchmeNm')->addChild('Prtry','SEPA');\n \n /* Transactions */\n foreach($transactions as $transaction)\n {\n $TransactionInformation = $PaymentInformation->addChild('DrctDbtTxInf'); /* ISO: 2.28 */\n $TransactionInformation->addChild('PmtId')->addChild('EndToEndId',$transaction['end_to_end']); /* ISO: 2.29, 2.31 */\n $TransactionInformation->addChild('InstdAmt',$this->floatToCurrency($transaction['amount'])); /* ISO: 2.44 */\n $TransactionInformation->InstdAmt->addAttribute('Ccy','EUR');\n \n $TransactionInformation->addChild('DrctDbtTx')->addChild('MndtRltdInf'); /* ISO: 2.46, 2.47 */\n $TransactionInformation->DrctDbtTx->MndtRltdInf->addChild('MndtId',$transaction['mandate_id']); /* ISO: 2.48 */\n $TransactionInformation->DrctDbtTx->MndtRltdInf->addChild('DtOfSgntr',$transaction['mandate_signature_date']); /* ISO: 2.49 */\n\n\n if ($transaction['consumerbic']) {\n $TransactionInformation->addChild('DbtrAgt')->addChild('FinInstnId')->addChild('BIC',$transaction['consumerbic']);\n } else {\n $TransactionInformation->addChild('DbtrAgt')->addChild('FinInstnId');\n }\n\n $TransactionInformation->addChild('Dbtr')->addChild('Nm', $this->alphanumeric($transaction['consumername'],70)); /* ISO: 2.72 */\n $TransactionInformation->addChild('DbtrAcct')->addChild('Id')->addChild('IBAN',$transaction['consumeraccount']); /* ISO: 2.73 */\n $TransactionInformation->addChild('RmtInf')->addChild('Ustrd',$this->alphanumeric($transaction['text'],140)); /* ISO: 2.89 */\n \n }\n }\n }", "title": "" }, { "docid": "92a346104a33fe5d65138ef883c393d5", "score": "0.57591623", "text": "public function create_subscription(){\r\n\t\t$endpoint = \"subscriptions/0\";\r\n\t\t$resource_name = \"subscription\";\r\n\t\t\r\n\t\t$available_args = array(\r\n\t\t\t'subscriber_id', //int\r\n\t\t\t'cost',\r\n\t\t\t'pubid', //int\r\n\t\t\t'comp', //bool as int\r\n\t\t\t'paid', //bool as int\r\n\t\t\t'source', //string\r\n\t\t\t'status',\r\n\t\t\t'startdate',\r\n\t\t\t'endate',\r\n\t\t\t'subscriber_type_ID',\r\n\t\t\t'copies',\r\n\t\t\t'media_type_id',\r\n\t\t\t'is_gift', //bool as int\r\n\t\t\t'gift_subscriber_id',\r\n\t\t\t'verified_date',\r\n\t\t\t'qualified_date',\r\n\t\t\t'promo_code',\r\n\t\t);\r\n\t\t\r\n\t\t$defaults = array(\r\n\t\t\t'copies' \t\t\t=> 1,\r\n\t\t\t'startdate'\t\t\t=> date('Y-m-d', time() ),\r\n\t\t\t'verified_date'\t\t=> date('Y-m-d', time() ),\r\n\t\t\t'is_gift'\t\t\t=> 0,\r\n\t\t);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "de491122c3f245257ecedfe78e4f8324", "score": "0.5710841", "text": "function generate_period($branch, $previous) {\n\tglobal $edit, $class_types;\n\t$period = null;\n\tforeach ($branch[\"periods\"] as &$p) if ($p[\"previous\"] == $previous) { $period = $p; break; }\n\tif ($period == null) return; // should never happen\n\tif ($previous <> 0) {\n\t\t// add a connection with the previous\n\t\techo \"<td width='15px' valign=middle>\";\n\t\techo \"<div style='width:15px;height:1px;background-color:black'></div>\";\n\t\techo \"</td>\";\n\t}\n\tif ($edit) {\n\t\techo \"<td valign=middle width='10px'>\";\n\t\techo \"<img src='/static/common/images/add_10.gif' style='cursor:pointer' onclick=\\\"curriculum_add_period(\".$branch[\"id\"].\",\".$previous.\");\\\" title=\\\"\".get_locale(\"Add a period\").\"\\\"/>\";\n\t\techo \"</td>\";\n\t}\n\techo \"<td valign=middle>\";\n\techo \"<table class='curriculum_period' name='\".$period[\"id\"].\"'><tbody>\";\n\t$nb_types = count($class_types);\n\techo \"<tr><th colspan=\".($nb_types==0?3:2+$nb_types).\" class='curriculum_period_title'>\".$period[\"name\"].\"</th></tr>\";\n\techo \"<tr>\";\n\t\techo \"<th colspan=2>\".get_locale(\"Subject\").\"</th>\";\n\t\techo \"<th colspan=\".($nb_types == 0 ? 1 : $nb_types).\" rowspan=\".($nb_types == 0 ? 2 : 1).\">\".get_locale(\"Hours\").\"</th>\";\n\techo \"</tr>\";\n\techo \"<tr>\";\n\t\techo \"<th>\".get_locale(\"Code\").\"</th><th>\".get_locale(\"common\",\"Name\").\"</th>\";\n\t\tforeach ($class_types as $ct)\n\t\t\techo \"<th>\".$ct[\"name\"].\"</th>\";\n\techo \"</tr>\";\n\tforeach ($period[\"subjects\"] as $subject_id=>$subject_hours) {\n\t\techo \"<tr>\";\n\t\t$subject = get_subject($subject_id);\n\t\techo \"<td nowrap='nowrap'>\".$subject[\"code\"].\"</td>\";\n\t\techo \"<td nowrap='nowrap'>\".$subject[\"name\"].\"</td>\";\n\t\tforeach ($class_types as $ct) {\n\t\t\techo \"<td align=right>\";\n\t\t\tforeach ($subject_hours as $ct_id=>$nb_hours)\n\t\t\t\tif ($ct[\"id\"] == $ct_id) { echo $nb_hours; break; }\n\t\t\techo \"</td>\";\n\t\t}\n\t\techo \"</tr>\";\n\t}\n\techo \"</tbody></table>\";\n\techo \"</td>\";\n\tif ($period[\"next\"] <> 0)\n\t\tgenerate_period($branch, $period[\"id\"]);\n\telse if ($edit) {\n\t\techo \"<td valign=middle width='10px'>\";\n\t\techo \"<img src='/static/common/images/add_10.gif' style='cursor:pointer' onclick=\\\"curriculum_add_period(\".$branch[\"id\"].\",\".$period[\"id\"].\");\\\" title=\\\"\".get_locale(\"Add a period\").\"\\\"/>\";\n\t\techo \"</td>\";\n\t}\n}", "title": "" }, { "docid": "d234aae407c8ef7dadd1fc823489d1e6", "score": "0.54835534", "text": "function createSubscription($intervalLength) {\n\n$custinfo = array(\"fname\" => $_POST['fname'], \"lname\" => $_POST['lname'], \"address\" => $_POST['address'], \"city\" => $_POST['city'], \"state\" => $_POST['billstate'], \"country\" => 'USA', \"zip\" => $_POST['zip'], \"email\" => $_POST['email'], \"phone\" => $_POST['phone']);\n$shippinginfo = array(\"shipfname\" => $_POST['shipfname'], \"shiplname\" => $_POST['shiplname'], \"shipaddress\" => $_POST['shipaddress'], \"shipcity\" => $_POST['shipcity'], \"shipstate\" => $_POST['shipstate'], \"shipcountry\" => 'USA', \"shipzip\" => $_POST['shipzip']);\n\n//customer cc info \nif($testing) {\n$paymentinfo = array(\"ccnumber\" => '4111111111111111', \"ccexpr\" => '2020-12');\n} else {\n$paymentinfo = array(\"ccnumber\" => $_POST['ccnum'], \"ccexpr\" => $_POST['expyr'] . '-' . $_POST['expmon']); --RYAN\n}\n\n$today = new DateTime('now');\n\n\n // Common Set Up for API Credentials\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $merchantAuthentication->setName(AnetConstants\\ANetEnvironment::MERCHANT_LOGIN_ID);\n $merchantAuthentication->setTransactionKey(AnetConstants\\ANetEnvironment::MERCHANT_TRANSACTION_KEY);\n\n $refId = 'ref' . time();\n//CREATE CUSTOMER PROFILE\n // Create the payment data for a credit card\n $creditCard = new AnetAPI\\CreditCardType();\n $creditCard->setCardNumber($paymentinfo['ccnumber']);\n $creditCard->setExpirationDate($paymentinfo['ccexpr']);\n $paymentCreditCard = new AnetAPI\\PaymentType();\n $paymentCreditCard->setCreditCard($creditCard);\n\n // Create the Bill To info\n $billto = new AnetAPI\\CustomerAddressType();\n $billto->setFirstName($custinfo['fname']);\n $billto->setLastName($custinfo['lname']);\n $billto->setCompany('N/A');\n $billto->setAddress($custinfo['address']);\n $billto->setCity($custinfo['city']);\n $billto->setState($custinfo['state']);\n $billto->setZip($custinfo['zip']);\n $billto->setCountry($custinfo['country']);\n\n $paymentprofile = new AnetAPI\\CustomerPaymentProfileType();\n\n $paymentprofile->setCustomerType('individual');\n $paymentprofile->setBillTo($billto);\n $paymentprofile->setPayment($paymentCreditCard);\n $paymentprofiles[] = $paymentprofile;\n $customerprofile = new AnetAPI\\CustomerProfileType();\n $customerprofile->setDescription(\"Customer 2 Test PHP\");\n\n $customerprofile->setMerchantCustomerId(\"M_\".$custinfo['email']);\n $customerprofile->setEmail($custinfo['email']);\n $customerprofile->setPaymentProfiles($paymentprofiles);\n\n $requesta = new AnetAPI\\CreateCustomerProfileRequest();\n $requesta->setMerchantAuthentication($merchantAuthentication);\n $requesta->setRefId($refId);\n $requesta->setProfile($customerprofile);\n $controllera = new AnetController\\CreateCustomerProfileController($requesta);\n $responsea = $controllera->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n if (($responsea != null) && ($responsea->getMessages()->getResultCode() == \"Ok\"))\n {\n // echo \"Succesfully create customer profile : \" . $responsea->getCustomerProfileId() . \"\\n\";\n //STORING CUSTOMER PROFILE ID\n $existingcustomerprofileid = $responsea->getCustomerProfileId();\n \n $sql0 = \"UPDATE cust_orders SET CustProID = '$existingcustomerprofileid' WHERE SesID = '\" . $_POST['sesid'] . \"'\";\n $result0 = mysql_query($sql0) or die(mysql_error());\n \n\n $paymentProfiles = $responsea->getCustomerPaymentProfileIdList();\n\n //STORING CUSTOMER PAYMENT PROFILE ID\n $existingpaymentprofileid = $paymentProfiles[0];\n \n $sql1 = \"UPDATE cust_orders SET PayProID = '$existingpaymentprofileid' WHERE SesID = '\" . $_POST['sesid'] . \"'\";\n $result1 = mysql_query($sql1) or die(mysql_error());\n\n //echo \"SUCCESS: PAYMENT PROFILE ID : \" . $paymentProfiles[0] . \"\\n\";\n }\n else\n {\n //echo \"ERROR : Invalid response\\n\";\n $errorMessagesa = $responsea->getMessages()->getMessage();\n // echo \"Response : \" . $errorMessagesa[0]->getCode() . \" \" .$errorMessagesa[0]->getText() . \"\\n\";\n }\n \n////////////////////////////////////////////////////////////////////////////\n // Create the customer shipping address\n $customershippingaddress = new AnetAPI\\CustomerAddressType();\n $customershippingaddress->setFirstName($shippinginfo['shipfname']);\n $customershippingaddress->setLastName($shippinginfo['shiplname']);\n $customershippingaddress->setCompany(\"N/A\");\n $customershippingaddress->setAddress($shippinginfo['shipaddress']);\n $customershippingaddress->setCity($shippinginfo['shipcity']);\n $customershippingaddress->setState($shippinginfo['shipstate']);\n $customershippingaddress->setZip($shippinginfo['shipzip']);\n $customershippingaddress->setCountry($shippinginfo['shipcountry']);\n $customershippingaddress->setPhoneNumber($custinfo['phone']);\n $customershippingaddress->setFaxNumber($custinfo['fax']);\n\n // Create a new customer shipping address for an existing customer profile\n\n $requestb = new AnetAPI\\CreateCustomerShippingAddressRequest();\n $requestb->setMerchantAuthentication($merchantAuthentication);\n $requestb->setCustomerProfileId($existingcustomerprofileid);\n $requestb->setRefId($refId);\n $requestb->setAddress($customershippingaddress);\n $controllerb = new AnetController\\CreateCustomerShippingAddressController($requestb);\n $responseb = $controllerb->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n if (($responseb != null) && ($responseb->getMessages()->getResultCode() == \"Ok\") )\n {\n // echo \"Create Customer Shipping Address SUCCESS: ADDRESS ID : \" . $responseb-> getCustomerAddressId() . \"\\n\";\n //STORING ADDRESS ID\n $existingcustomeraddressid = $responseb-> getCustomerAddressId();\n }\n else\n {\n // echo \"Create Customer Shipping Address ERROR : Invalid response\\n\";\n $errorMessagesb = $responseb->getMessages()->getMessage();\n // echo \"Response : \" . $errorMessagesb[0]->getCode() . \" \" .$errorMessagesb[0]->getText() . \"\\n\";\n }\n\n//CREATE SUB FROM CUSTOMER ID\n\n // Subscription Type Info\n $subscription = new AnetAPI\\ARBSubscriptionType();\n $subscription->setName(\"GreenValley Monthly Subscription\");\n\n $interval = new AnetAPI\\PaymentScheduleType\\IntervalAType();\n $interval->setLength($intervalLength);\n $interval->setUnit(\"days\");\n\n $paymentSchedule = new AnetAPI\\PaymentScheduleType();\n $paymentSchedule->setInterval($interval);\n $paymentSchedule->setStartDate($today);\n $paymentSchedule->setTotalOccurrences(\"12\");\n $paymentSchedule->setTrialOccurrences(\"0\");\n\n $subscription->setPaymentSchedule($paymentSchedule);\n $subscription->setAmount(\"19.99\");\n $subscription->setTrialAmount(\"0.00\");\n \n $profile = new AnetAPI\\CustomerProfileIdType();\n $profile->setCustomerProfileId($existingcustomerprofileid);\n $profile->setCustomerPaymentProfileId($existingpaymentprofileid);\n $profile->setCustomerAddressId($existingcustomeraddressid);\n\n $subscription->setProfile($profile);\n\n $requestc = new AnetAPI\\ARBCreateSubscriptionRequest();\n $requestc->setmerchantAuthentication($merchantAuthentication);\n $requestc->setRefId($refId);\n $requestc->setSubscription($subscription);\n $controllerc = new AnetController\\ARBCreateSubscriptionController($requestc);\n\n $responsec = $controllerc->executeWithApiResponse( \\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n \n if (($responsec != null) && ($responsec->getMessages()->getResultCode() == \"Ok\") )\n {\n // echo \"SUCCESS: Subscription ID : \" . $responsec->getSubscriptionId() . \"\\n\";\n }\n else\n {\n// echo \"ERROR : Invalid response\\n\";\n $errorMessagesc = $responsec->getMessages()->getMessage();\n // echo \"Response : \" . $errorMessagesc[0]->getCode() . \" \" .$errorMessagesc[0]->getText() . \"\\n\";\n }\n\n //return array($responsea);\n return;\n \n }", "title": "" }, { "docid": "63ac40eee3f572f24b42ceeac710080a", "score": "0.54728514", "text": "function createSubscription1($fname, $lname, $cardnum, $cardcode, $expdate, $address, $city, $country, $state, $zip, $email, $phone)\n{\n $merchantAuthentication = new MerchantAuthenticationType();\n $merchantAuthentication->setName(\\SampleCodeConstants::MERCHANT_LOGIN_ID);\n $merchantAuthentication->setTransactionKey(\\SampleCodeConstants::MERCHANT_TRANSACTION_KEY);\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Subscription Type Info\n $subscription = new ARBSubscriptionType();\n $subscription->setName(\"Reggie's Virtual Bootcamp\");\n\n $interval = new IntervalAType();\n $interval->setLength(\"7\");\n $interval->setUnit(\"days\");\n\n $paymentSchedule = new PaymentScheduleType();\n $paymentSchedule->setInterval($interval);\n $paymentSchedule->setStartDate(new DateTime(date(\"Y-m-d\")));\n $paymentSchedule->setTotalOccurrences(\"12\");\n $paymentSchedule->setTrialOccurrences(\"0\");\n\n $subscription->setPaymentSchedule($paymentSchedule);\n $subscription->setAmount(\"25.00\");\n $subscription->setTrialAmount(\"0.00\");\n\n $creditCard = new CreditCardType();\n $creditCard->setCardNumber($cardnum);\n $creditCard->setExpirationDate($expdate);\n $creditCard->setCardCode($cardcode);\n\n $payment = new PaymentType();\n $payment->setCreditCard($creditCard);\n $subscription->setPayment($payment);\n\n $order = new OrderType();\n $order->setInvoiceNumber(\"123544\");\n $order->setDescription(\"Join coach Reggie for a week full-body Virtual Bootcamp!\");\n $subscription->setOrder($order);\n\n $billTo = new NameAndAddressType();\n $billTo->setFirstName($fname);\n $billTo->setLastName($lname);\n $billTo->setAddress($address);\n $billTo->setCity($city);\n $billTo->setCountry($country);\n $billTo->setState($state);\n $billTo->setZip($zip);\n\n $subscription->setBillTo($billTo);\n\n $customer = new CustomerType();\n $customer->setEmail($email);\n $customer->setPhoneNumber($phone);\n\n $subscription->setCustomer($customer);\n\n $request = new ARBCreateSubscriptionRequest();\n $request->setmerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setSubscription($subscription);\n $controller = new AnetController\\ARBCreateSubscriptionController($request);\n\n // For PRODUCTION use\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\")) {\n echo \"<div class='success'><h4>You are Successfully Subscribed for Reggie's Virtual Bootcamp </h4>\\n Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n <br>Please save this 'Subscription ID' for future use. \\n</div>\";\n //echo \"Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n\";\n //echo \"<br>Please save this 'Subscription ID' for future use. \\n\";\n\n } else {\n echo \"<div class='fail'><h4>There is an error. Please review your details and try again\\n</h4></div>\";\n //$errorMessages = $response->getMessages()->getMessage();\n //echo \"Response : \" . $errorMessages[0]->getCode() . \" \" . $errorMessages[0]->getText() . \"\\n\";\n\n }\n return $response;\n}", "title": "" }, { "docid": "aad27e208c5ef9561022237d172fac78", "score": "0.545954", "text": "function createSubscription2($fname, $lname, $cardnum, $cardcode, $expdate, $address, $city, $country, $state, $zip, $email, $phone)\n{\n $merchantAuthentication = new MerchantAuthenticationType();\n $merchantAuthentication->setName(\\SampleCodeConstants::MERCHANT_LOGIN_ID);\n $merchantAuthentication->setTransactionKey(\\SampleCodeConstants::MERCHANT_TRANSACTION_KEY);\n\n // Set the transaction's refId\n $refId = 'ref' . time();\n\n // Subscription Type Info\n $subscription = new ARBSubscriptionType();\n $subscription->setName(\"Fit and Fierce with Grace\");\n\n $interval = new IntervalAType();\n $interval->setLength(\"1\");\n $interval->setUnit(\"months\");\n\n $paymentSchedule = new PaymentScheduleType();\n $paymentSchedule->setInterval($interval);\n $paymentSchedule->setStartDate(new DateTime(date(\"Y-m-d\")));\n $paymentSchedule->setTotalOccurrences(\"12\");\n $paymentSchedule->setTrialOccurrences(\"0\");\n\n $subscription->setPaymentSchedule($paymentSchedule);\n $subscription->setAmount(\"20.00\");\n $subscription->setTrialAmount(\"0.00\");\n\n $creditCard = new CreditCardType();\n $creditCard->setCardNumber($cardnum);\n $creditCard->setExpirationDate($expdate);\n $creditCard->setCardCode($cardcode);\n\n $payment = new PaymentType();\n $payment->setCreditCard($creditCard);\n $subscription->setPayment($payment);\n\n $order = new OrderType();\n $order->setInvoiceNumber(\"123544\");\n $order->setDescription(\"This program works on a whole-body transformation.\");\n $subscription->setOrder($order);\n\n $billTo = new NameAndAddressType();\n $billTo->setFirstName($fname);\n $billTo->setLastName($lname);\n $billTo->setAddress($address);\n $billTo->setCity($city);\n $billTo->setCountry($country);\n $billTo->setState($state);\n $billTo->setZip($zip);\n\n\n\n\n $subscription->setBillTo($billTo);\n\n $customer = new CustomerType();\n $customer->setEmail($email);\n $customer->setPhoneNumber($phone);\n\n $subscription->setCustomer($customer);\n\n\n $request = new ARBCreateSubscriptionRequest();\n $request->setmerchantAuthentication($merchantAuthentication);\n $request->setRefId($refId);\n $request->setSubscription($subscription);\n $controller = new AnetController\\ARBCreateSubscriptionController($request);\n\n // For PRODUCTION use\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n\n\n if (($response != null) && ($response->getMessages()->getResultCode() == \"Ok\")) {\n echo \"<div class='success'><h4>You are Successfully Subscribed for Fit and Fierce </h4>\\n Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n <br>Please save this 'Subscription ID' for future use. \\n</div>\";\n //echo \"Here is Subscription ID: \" . $response->getSubscriptionId() . \"\\n\";\n //echo \"<br>Please save this 'Subscription ID' for future use. \\n\";\n\n } else {\n echo \"<div class='fail'><h4>There is an error. Please review your details and try again\\n</h4></div>\";\n //$errorMessages = $response->getMessages()->getMessage();\n //echo \"Response : \" . $errorMessages[0]->getCode() . \" \" . $errorMessages[0]->getText() . \"\\n\";\n }\n return $response;\n}", "title": "" }, { "docid": "05cbceb9458fbecb5ed9e0b3787a1642", "score": "0.5388841", "text": "function wiziq_create_recuring($select_monthly_repeat_type, $class_schedule, $monthly_date, $days_of_week, $specific_week, &$wiz_start_time, &$wiziq_presenter_link, $time_zone, $duration, $wiziq_secretacesskey, $wiziq_access_key, $wiziq_webserviceurl, $title, $start_time, $class_repeat_type, $class_occurrence, $class_end_date, $language_culture_name, $courseid, $intro, $presenter_id, $presenter_name, $recording, &$attribnode, &$wiziqmasterclass_id, &$wiziqclass_id, &$errormsg, &$view_recording_url) {\n\n global $CFG, $wiziq_secretacesskey, $wiziq_access_key, $wiziq_webserviceurl, $USER;\n $cfgrtn = get_config('wiziq');\n $wiziq_secretacesskey = $cfgrtn->wiziq_secretacesskey;\n $wiziq_access_key = $cfgrtn->wiziq_access_key;\n $wiziq_webserviceurl = $cfgrtn->wiziq_webserviceurl;\n $coursecontext = context_course::instance($courseid);\n require_once(\"authbase.php\");\n $wiziq_authbase = new wiziq_authbase($wiziq_secretacesskey, $wiziq_access_key);\n $method = \"create_recurring\";\n $requestparameters[\"signature\"] = $wiziq_authbase->wiziq_generatesignature($method, $requestparameters);\n $requestparameters[\"course_id\"] = $courseid;\n $requestparameters[\"title\"] = $title; //Required\n $requestparameters[\"description\"] = $intro;\n $requestparameters[\"presenter_id\"] = $presenter_id; // Required\n $requestparameters[\"presenter_name\"] = $presenter_name; //Required\n $requestparameters[\"start_time\"] = date(\"m/d/Y H:i:s\", strtotime($start_time)); //Required\n\n $requestparameters[\"class_repeat_type\"] = $class_repeat_type; //Required\n // week condition\n if ($class_repeat_type == '4') {\n $requestparameters[\"days_of_week\"] = $days_of_week; //Required\n $requestparameters[\"specific_week\"] = $specific_week; //Required\n }\n // once every month condition by date\n if (($class_repeat_type == '5') && ($select_monthly_repeat_type == 'bydate')) {\n $requestparameters[\"monthly_date\"] = $monthly_date; //Required\n $requestparameters[\"rdo_by_date\"] = 'true'; //Required\n }\n // once every month condition by day\n if (($class_repeat_type == '5') && ($select_monthly_repeat_type == 'byday')) {\n $requestparameters[\"monthly_date\"] = $monthly_date; //Required\n $requestparameters[\"rdo_by_date\"] = 'true'; //Required\n $requestparameters[\"days_of_week\"] = $days_of_week; //Required\n }\n // class schedule condition for occurance and end date\n if ($class_schedule == '4') {\n $requestparameters[\"class_end_date\"] = date(\"m-d-Y\", strtotime($class_end_date)); //Required\n } else {\n $requestparameters[\"class_occurrence\"] = $class_occurrence; //Required\n }\n $requestparameters[\"app_version\"] = $CFG->release; //optional\n $requestparameters[\"language_culture_name\"] = $language_culture_name; //optional\n $requestparameters[\"create_recording\"] = $recording; //optional\n $requestparameters[\"return_url\"] = \"\"; //optional\n $requestparameters[\"status_ping_url\"] = \"\"; //optional\n $requestparameters[\"time_zone\"] = $time_zone; //optional\n $requestparameters[\"duration\"] = $duration; //optional\n // print_r($requestparameters);\n $wiziq_httprequest = new wiziq_httprequest();\n try {\n $xmlreturn = $wiziq_httprequest->wiziq_do_post_request(\n $wiziq_webserviceurl . '?method=create_recurring', $requestparameters);\n libxml_use_internal_errors(true);\n $objdom = new SimpleXMLElement($xmlreturn, LIBXML_NOCDATA);\n $attribnode = (string) $objdom->attributes();\n if ($attribnode == \"ok\") {\n $class_detaial = $objdom->create_recurring->recurring_class_details;\n $wiziqmasterclass_id = (string) $class_detaial->class_master_id;\n\n wiziq_view_recur_class($courseid, $wiziqmasterclass_id, $wiziq_classidmaster, $wiziq_recordlink, $wiziq_presenter_link, $wiz_start_time);\n\n $wiziqclass_id = array();\n $view_recording_url = array();\n $wiziq_presenter_link = array();\n $wiz_start_time = array();\n $wiziqclass_id[] = $wiziq_classidmaster;\n $view_recording_url[] = $wiziq_recordlink;\n $wiziq_presenter_link[] = $wiziq_presenter_link;\n $wiz_start_time[] = $wiz_start_time;\n\n } else if ($attribnode == \"fail\") {\n $att = 'msg';\n $errormsg = (string) $objdom->error->attributes()->$att; //can be used while debug\n $params = array(\n 'objectid' => $courseid,\n 'relateduserid' => $USER->id,\n 'courseid' => $courseid,\n 'context' => $coursecontext,\n 'other' => array(\n 'error' => $errormsg\n )\n );\n $event = \\mod_wiziq\\event\\wiziq_classadd::create($params);\n $event->trigger();\n }//end if\n } catch (Exception $e) {\n $e->get_message();\n $errormsg = get_string('errorinservice', 'wiziq');\n $params = array(\n 'objectid' => $courseid,\n 'relateduserid' => $USER->id,\n 'courseid' => $courseid,\n 'context' => $coursecontext,\n 'other' => array(\n 'error' => $errormsg\n )\n );\n $event = \\mod_wiziq\\event\\wiziq_classadd::create($params);\n $event->trigger();\n }\n}", "title": "" }, { "docid": "27f11cbdccfdf127bc20c4cfb56d0014", "score": "0.53881735", "text": "protected function fillRegistrationPeriod()\n\t{\n\t\tinclude_once('./Services/Calendar/classes/class.ilDateTime.php');\n\t\t$now = new ilDateTime(time(),IL_CAL_UNIX,'UTC');\n\n\t\tif($this->container->getSubscriptionUnlimitedStatus())\n\t\t{\n\t\t\t$reg = new ilNonEditableValueGUI($this->lng->txt('mem_reg_period'));\n\t\t\t$reg->setValue($this->lng->txt('mem_unlimited'));\n\t\t\t$this->form->addItem($reg);\n\t\t\treturn true;\n\t\t}\n\t\telseif($this->container->getSubscriptionLimitationType() == IL_CRS_SUBSCRIPTION_DEACTIVATED)\n\t\t{\n\t\t\treturn true;\t\t\t\n\t\t}\n\t\t\n\t\t$start = new ilDateTime($this->container->getSubscriptionStart(),IL_CAL_UNIX,'UTC');\n\t\t$end = new ilDateTime($this->container->getSubscriptionEnd(),IL_CAL_UNIX,'UTC');\n\t\t\n\t\tif(ilDateTime::_before($now,$start))\n\t\t{\n\t\t\t$tpl = new ilTemplate('tpl.registration_period_form.html',true,true,'Services/Membership');\n\t\t\t$tpl->setVariable('TXT_FIRST',$this->lng->txt('mem_start'));\n\t\t\t$tpl->setVariable('FIRST',ilDatePresentation::formatDate($start));\n\t\t\t\n\t\t\t$tpl->setVariable('TXT_END',$this->lng->txt('mem_end'));\n\t\t\t$tpl->setVariable('END',ilDatePresentation::formatDate($end));\n\t\t\t\n\t\t\t$warning = $this->lng->txt('mem_reg_not_started');\n\t\t}\n\t\telseif(ilDateTime::_after($now,$end))\n\t\t{\n\t\t\t$tpl = new ilTemplate('tpl.registration_period_form.html',true,true,'Services/Membership');\n\t\t\t$tpl->setVariable('TXT_FIRST',$this->lng->txt('mem_start'));\n\t\t\t$tpl->setVariable('FIRST',ilDatePresentation::formatDate($start));\n\t\t\t\n\t\t\t$tpl->setVariable('TXT_END',$this->lng->txt('mem_end'));\n\t\t\t$tpl->setVariable('END',ilDatePresentation::formatDate($end));\n\t\t\t\n\t\t\t\n\t\t\t$warning = $this->lng->txt('mem_reg_expired');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl = new ilTemplate('tpl.registration_period_form.html',true,true,'Services/Membership');\n\t\t\t$tpl->setVariable('TXT_FIRST',$this->lng->txt('mem_end'));\n\t\t\t$tpl->setVariable('FIRST',ilDatePresentation::formatDate($end));\n\t\t}\n\t\t\n\t\t$reg = new ilCustomInputGUI($this->lng->txt('mem_reg_period'));\n\t\t$reg->setHtml($tpl->get());\n\t\tif(strlen($warning))\n\t\t{\n\t\t\t// Disable registration\n\t\t\t$this->enableRegistration(false);\n\t\t\tilUtil::sendFailure($warning);\n\t\t\t#$reg->setAlert($warning);\n\t\t}\n\t\t$this->form->addItem($reg);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2e388e216edcea83f1ac91e0847b755b", "score": "0.5348486", "text": "public function definition()\n {\n $periodDays = $this->faker->randomElement([7, 14, 30, 60, 90, 180, 365]);\n \n return [\n 'name' => $this->faker->unique()->word,\n 'num_of_installments' => rand(1, 15),\n 'installment_amount' => rand(100, 1500),\n 'installment_period_days' => $periodDays,\n 'period_label' => $this->getPeriodLabel($periodDays),\n 'status' => $this->faker->randomElement([\n SubscriptionPlan::STATUS_ACTIVE,\n SubscriptionPlan::STATUS_INACTIVE,\n ])\n ];\n }", "title": "" }, { "docid": "5fb1169373a8312045d0be0381bca43f", "score": "0.5309493", "text": "public function onCreateSubscription(Sheep_Subscription_Model_Subscription $subscription, Mage_Sales_Model_Order $order);", "title": "" }, { "docid": "ae0d3bf0e5fce767a010586fe1c59b6d", "score": "0.5156485", "text": "public function build(): CatalogTimePeriod\n {\n return CoreHelper::clone($this->instance);\n }", "title": "" }, { "docid": "db468a029d2a91da152aa735d651228d", "score": "0.51494527", "text": "public function testPeriodString()\n {\n $periodString = '13 Okt 2022 - 15 Okt 2022';\n $result = generatePeriodFromString($periodString);\n $this->assertEquals('2022-10-13', $result['startDate']->format('Y-m-d'));\n $this->assertEquals('2022-10-15', $result['endDate']->format('Y-m-d'));\n }", "title": "" }, { "docid": "21a484bec1ea3a2768f774b9d7efe789", "score": "0.5140927", "text": "public function generate_period()\n\t{\t\t\t\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t\n\t\t\t//genero 2 periodos nuevos\n\t\t\tfor ($i = 0; $i < 2; $i++) \n\t\t\t{\n\t\t\t\t$arrParam = array(\"limit\" => 1);\n\t\t\t\t$infoPeriod = $this->general_model->get_period($arrParam);//info ultimo periodo\n\t\t\t\n\t\t\t\t//fecha inicial del siguiente periodo se le suma un dia a la fecha final del ultimo periodo\n\t\t\t\t//fecha final del siguiente periodo se le suma 14 dias a la fecha final del ultimo periodo\n\t\t\t\t$periodoIniNew = date('Y-m-d', strtotime ( '+1 day ' , strtotime ( $infoPeriod[0]['date_finish'] ) ) );//le sumo un dia \n\t\t\t\t$periodoFinNew = date('Y-m-d',strtotime ( '+14 day ' , strtotime ( $infoPeriod[0]['date_finish'] ) ) );//le sumo 14 dias\n\t\t\t\t//sacar el año de la vigencia\n\t\t\t\t$yearPeriodo = date(\"Y\", strtotime($periodoIniNew));\n\n\t\t\t\t\n\t\t\t\t//guardo el nuevo periodo\n\t\t\t\t$arrParam = array(\n\t\t\t\t\t\"periodoIniNew\" => $periodoIniNew,\n\t\t\t\t\t\"periodoFinNew\" => $periodoFinNew,\n\t\t\t\t\t\"yearPeriodo\" => $yearPeriodo\n\t\t\t\t);\n\n\t\t\t\tif($idPeriod = $this->payroll_model->savePeriod($arrParam))\n\t\t\t\t{\n\t\t\t\t\t//guardo las dos semanas del periodo\n\t\t\t\t\t$semana1IniNew = date('Y-m-d', strtotime ( '+1 day ' , strtotime ( $infoPeriod[0]['date_finish'] ) ) );//le sumo un dia \n\t\t\t\t\t$semana1FinNew = date('Y-m-d',strtotime ( '+7 day ' , strtotime ( $infoPeriod[0]['date_finish'] ) ) );//le sumo 7 dias\n\t\t\t\t\t$semana2IniNew = date('Y-m-d', strtotime ( '+1 day ' , strtotime ( $semana1FinNew ) ) );//le sumo un dia \n\t\t\t\t\t$semana2FinNew = date('Y-m-d',strtotime ( '+7 day ' , strtotime ( $semana1FinNew) ) );//le sumo 7 dias\n\t\t\t\t\t//guardo la primer semana\n\t\t\t\t\t$arrParam = array(\n\t\t\t\t\t\t\"idPeriod\" => $idPeriod,\n\t\t\t\t\t\t\"semana1IniNew\" => $semana1IniNew,\n\t\t\t\t\t\t\"semana1FinNew\" => $semana1FinNew,\n\t\t\t\t\t\t\"semana2IniNew\" => $semana2IniNew,\n\t\t\t\t\t\t\"semana2FinNew\" => $semana2FinNew,\n\t\t\t\t\t);\n\t\t\t\t\t$this->payroll_model->saveWeakPeriod($arrParam);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "076bd55c3f06b57873e756714b30d4b5", "score": "0.5134569", "text": "public function created(PlanPeriod $planPeriod)\n {\n //\n }", "title": "" }, { "docid": "bb9125ff73de70ad68868d65b547a8c4", "score": "0.51214147", "text": "public function createXml()\n\t{\n\t\t$this->validate(array('emailContentFormat', 'textVersionContent', 'name', 'subject', 'id'));\n\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' />\");\n\t\t$link = $xml->addChild(\"link\");\n\t\t$link->addAttribute('href', '/ws/customers/customer/campaigns');\n\t\t$link->addAttribute('rel', 'edit');\n\t\t$xml->addChild(\"id\", $this->id);\n\t\t$title = $xml->addChild(\"title\", $this->name);\n\t\t$title->addAttribute(\"type\", \"text\");\n\t\t$xml->addChild(\"updated\", '2009-10-19T18:34:53.105Z');\n\t\t$author = $xml->addChild(\"author\");\n\t\t$author->addChild(\"name\", \"Constant Contact\");\n\t\t$content = $xml->addChild(\"content\");\n\t\t$content->addAttribute(\"type\", \"application/vnd.ctct+xml\");\n\t\t$campaign_node = $content->addChild(\"Campaign\");\n\t\t$campaign_node->addAttribute(\"xmlns\", \"http://ws.constantcontact.com/ns/1.0/\");\n\t\t$campaign_node->addAttribute(\"id\", $this->id);\n\t\t$campaign_node->addChild(\"Name\", $this->name);\n\t\t$campaign_node->addChild(\"Status\", \"draft\");\n\t\t$campaign_node->addChild(\"Date\", $this->campaignDate);\n\t\t$campaign_node->addChild(\"Subject\", $this->subject);\n\t\t$campaign_node->addChild(\"FromName\", $this->fromName);\n\t\t$campaign_node->addChild(\"ViewAsWebpage\", $this->vawp);\n\t\t$campaign_node->addChild(\"ViewAsWebpageLinkText\", $this->vawpLinkText);\n\t\t$campaign_node->addChild(\"ViewAsWebpageText\", $this->vawpText);\n\t\t$campaign_node->addChild(\"PermissionReminder\", $this->permissionReminder);\n\t\t$campaign_node->addChild(\"PermissionReminderText\", $this->permissionReminderText);\n\t\t$campaign_node->addChild(\"GreetingSalutation\", $this->greetingSalutation);\n\t\t$campaign_node->addChild(\"GreetingName\", $this->greetingName);\n\t\t$campaign_node->addChild(\"GreetingString\", $this->greetingString);\n\t\t$campaign_node->addChild(\"OrganizationName\", $this->orgName);\n\t\t$campaign_node->addChild(\"OrganizationAddress1\", $this->orgAddr1);\n\t\t$campaign_node->addChild(\"OrganizationAddress2\", $this->orgAddr2);\n\t\t$campaign_node->addChild(\"OrganizationAddress3\", $this->orgAddr3);\n\t\t$campaign_node->addChild(\"OrganizationCity\", $this->orgCity);\n\t\t$campaign_node->addChild(\"OrganizationState\", $this->orgState);\n\t\t$campaign_node->addChild(\"OrganizationInternationalState\", $this->orgInternationalState);\n\t\t$campaign_node->addChild(\"OrganizationCountry\", $this->orgCountry);\n\t\t$campaign_node->addChild(\"OrganizationPostalCode\", $this->orgPostalCode);\n\t\t$campaign_node->addChild(\"IncludeForwardEmail\", $this->incForwardEmail);\n\t\t$campaign_node->addChild(\"ForwardEmailLinkText\", $this->forwardEmailLinkText);\n\t\t$campaign_node->addChild(\"IncludeSubscribeLink\", $this->incSubscribeLink);\n\t\t$campaign_node->addChild(\"SubscribeLinkText\", $this->subscribeLinkText);\n\t\t$campaign_node->addChild(\"EmailContentFormat\", $this->emailContentFormat);\n\t\t$campaign_node->addChild(\"EmailContent\", $this->emailContent);\n\t\t$campaign_node->addChild(\"EmailTextContent\", $this->textVersionContent);\n\t\t$campaign_node->addChild(\"StyleSheet\", $this->styleSheet);\n\t\t$contactLists = $campaign_node->addChild(\"ContactLists\");\n\t\t$campaignLists = $this->lists;\n\t\tif ($campaignLists) {\n\t\t\tforeach ($campaignLists as $list) {\n\t\t\t\t$contactList = $contactLists->addChild(\"ContactList\");\n\t\t\t\t$contactList->addAttribute(\"id\", $list);\n\t\t\t\t$contactLink = $contactList->addChild(\"link\");\n\t\t\t\t$contactLink->addAttribute(\"xmlns\", \"http://www.w3.org/2005/Atom\");\n\t\t\t\t$contactLink->addAttribute(\"href\", str_replace(\"http://api.constantcontact.com\", \"\", $list));\n\t\t\t\t$contactLink->addAttribute(\"rel\", \"self\");\n\t\t\t}\n\t\t}\n\t\t$fromEmail = $campaign_node->addChild(\"FromEmail\");\n\t\t$email_node = $fromEmail->addChild(\"Email\");\n\t\t$email_node->addAttribute(\"id\", \"http://api.constantcontact.com\" . $this->fromAddress->link);\n\t\t$email_link = $email_node->addChild(\"link\");\n\t\t$email_link->addAttribute(\"xmlns\", \"http://www.w3.org/2005/Atom\");\n\t\t$email_link->addAttribute(\"href\", $this->fromAddress->link);\n\t\t$email_link->addAttribute(\"rel\", \"self\");\n\t\t$fromEmail->addChild(\"EmailAddress\", $this->fromAddress->email);\n\t\t$replyEmail = $campaign_node->addChild(\"ReplyToEmail\");\n\t\t$replyEmailNode = $replyEmail->addChild(\"Email\");\n\t\t$replyEmailNode->addAttribute(\"id\", \"http://api.constantcontact.com\" . $this->replyAddress->link);\n\t\t$replyEmailLink = $replyEmailNode->addChild(\"link\");\n\t\t$replyEmailLink->addAttribute(\"xmlns\", \"http://www.w3.org/2005/Atom\");\n\t\t$replyEmailLink->addAttribute(\"href\", $this->replyAddress->link);\n\t\t$replyEmailLink->addAttribute(\"rel\", \"self\");\n\t\t$replyEmail->addChild(\"EmailAddress\", $this->replyAddress->email);\n\t\t$sourceNode = $xml->addChild(\"source\");\n\t\t$sourceNode->addChild(\"id\", $this->id);\n\t\t$sourceTitle = $sourceNode->addChild(\"title\", \"Campaigns for customer\");\n\t\t$sourceTitle->addAttribute(\"type\", \"text\");\n\t\t$sourceLink1 = $sourceNode->addChild(\"link\");\n\t\t$sourceLink1->addAttribute(\"href\", \"campaigns\");\n\t\t$sourceLink2 = $sourceNode->addChild(\"link\");\n\t\t$sourceLink2->addAttribute(\"href\", \"campaigns\");\n\t\t$sourceLink2->addAttribute(\"rel\", \"self\");\n\t\t$sourceAuthor = $sourceNode->addChild(\"author\");\n\t\t$sourceAuthor->addChild(\"name\", 'customer');\n\t\t$sourceNode->addChild(\"updated\", date(\"Y-m-d\").'T'.date(\"H:i:s\").'+01:00');\n\t\t$xml = $xml->asXML();\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "909d2c956bad8b2ed5eb83d922c9d187", "score": "0.51163334", "text": "public function create_recurring_profile();", "title": "" }, { "docid": "fb48a28349f60af442e5863f2583b29a", "score": "0.51053077", "text": "function setNewSubscription(){\n\t\t# set subscription entry for user\n\t\t# current plan\n\t\t$plan = new MembershipPlan();\n\t\t$plan->populate($this->getMembershipPlanID());\n\t\t# new subscription\n\t\t$subscription = new Subscription();\n\t\t// $subscription->setUserID($this->getID());\n\t\t// $subscription->setPlanID($this->getMembershipPlanID());\n\t\t$startdate = date(\"Y-m-d\");\t\n\t\t$expirydate = date(\"Y-m-d\", strtotime(date(\"Y-m-d\", strtotime($startdate)) . \" +\".$plan->getUsageDays().\" days \"));\n\t\t$subscription->setStartDate($startdate);\n\t\t$subscription->setEndDate($expirydate);\n\t\t// $subscription->setIsTrial(1);\n\t\t// $subscription->setIsActive(1);\n\t\t// $subscription->save();\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a4446c7794f13292f2c2d39b74f63f61", "score": "0.5094952", "text": "public function domain_create($domain_name, $domain_period = 1, $dns_1 = null, $dns_2 = null, $org_id = null, $auto_renew = 0)\r\n {\r\n $xml = file_get_contents(__DIR__ . '/templates/br_domain_create.xml');\r\n \r\n $period = \"<domain:period unit=\\\"y\\\">{$domain_period}</domain:period>\";\r\n \r\n $nameservers = \"<domain:ns>\n\t\t\t\t\t\t\t<domain:hostAttr>\n\t\t\t\t\t\t\t\t<domain:hostName>{$dns_1}</domain:hostName>\n\t\t\t\t\t\t\t</domain:hostAttr>\n\t\t\t\t\t\t\t<domain:hostAttr>\n\t\t\t\t\t\t\t\t<domain:hostName>{$dns_2}</domain:hostName>\n\t\t\t\t\t\t\t</domain:hostAttr>\n\t\t\t\t\t\t</domain:ns>\";\r\n \r\n /**\r\n * This array is only used for Registro.br homologation because the homologation\r\n * requires an IPv6 message test.\r\n */\r\n $auth_info = \"<contact:authInfo>\n\t\t\t\t\t\t<contact:pw>{$this->getPassword()}</contact:pw>\n\t\t\t\t\t\t</contact:authInfo>\";\r\n \r\n $ext_begin = \"<extension>\n\t\t\t\t\t\t<brdomain:create\n\t\t\t\t\t\txmlns:brdomain=\\\"urn:ietf:params:xml:ns:brdomain-1.0\\\"\n\t\t\t\t\t\txsi:schemaLocation=\\\"urn:ietf:params:xml:ns:brdomain-1.0\n\t\t\t\t\t\tbrdomain-1.0.xsd\\\">\n\t\t\t\t\t\t\t<brdomain:organization>{$org_id}</brdomain:organization>\n\t\t\t\t\t\t\t<brdomain:autoRenew active=\\\"{$auto_renew}\\\"/>\n\t\t\t\t\t\t</brdomain:create>\n\t\t\t\t\t</extension>\";\r\n \r\n $cltrid = '<clTRID>' . $this->generate_id() . '</clTRID>';\r\n \r\n $xml = str_replace('$(name)$', $domain_name, $xml);\r\n $xml = str_replace('$(period)$', $period, $xml);\r\n $xml = str_replace('$(nameservers)$', $nameservers, $xml);\r\n $xml = str_replace('$(registrant)$', '', $xml);\r\n $xml = str_replace('$(other_contacts)$', '', $xml);\r\n $xml = str_replace('$(auth_info)$', $auth_info, $xml);\r\n $xml = str_replace('$(ext_begin)$', $ext_begin, $xml);\r\n $xml = str_replace('$(ds_ext)$', '', $xml);\r\n $xml = str_replace('$(br_ext)$', '', $xml);\r\n $xml = str_replace('$(ext_end)$', '', $xml);\r\n $xml = str_replace('$(clTRID)$', $cltrid, $xml);\r\n \r\n $xml = $this->wrap($xml);\r\n \r\n $this->send_command($xml);\r\n \r\n $response = $this->xml2array($this->unwrap());\r\n \r\n if ($response['epp']['response']['result_attr']['code'] != '1000' && $response['epp']['response']['result_attr']['code'] != '1001') {\r\n $reason = (isset($response['epp']['response']['result']['extValue']['reason']) ? ' - ' . $response['epp']['response']['result']['extValue']['reason'] : '');\r\n throw new \\Exception($response['epp']['response']['result']['msg'] . $reason, $response['epp']['response']['result_attr']['code']);\r\n }\r\n \r\n $creData = $response['epp']['response']['resData']['domain:creData'];\r\n $extension = $response['epp']['response']['extension']['brdomain:creData'];\r\n $data = array(\r\n 'code' => $response['epp']['response']['result_attr']['code'],\r\n 'msg' => $response['epp']['response']['result']['msg'],\r\n 'domain_name' => $creData['domain:name'],\r\n 'domain_create' => $creData['domain:crDate'],\r\n 'domain_ticket' => $extension['brdomain:ticketNumber'],\r\n 'domain_doc' => array(\r\n 'description' => (isset($extension['brdomain:pending']['brdomain:doc']['brdomain:description'])) ? $extension['brdomain:pending']['brdomain:doc']['brdomain:description'] : '',\r\n 'status' => (isset($extension['brdomain:pending']['brdomain:doc_attr']['status'])) ? $extension['brdomain:pending']['brdomain:doc_attr']['status'] : '',\r\n 'type' => (isset($extension['brdomain:pending']['brdomain:doc']['brdomain:docType'])) ? $extension['brdomain:pending']['brdomain:doc']['brdomain:docType'] : ''\r\n ),\r\n 'domain_dns' => array()\r\n );\r\n if (isset($extension['brdomain:pending']['brdomain:dns'])) {\r\n foreach ($extension['brdomain:pending']['brdomain:dns'] as $key => $dns) {\r\n $data['domain_dns'][] = array(\r\n 'host_name' => (isset($dns['brdomain:hostName'])) ? $dns['brdomain:hostName'] : '',\r\n 'limit' => (isset($dns['brdomain:limit'])) ? $dns['brdomain:limit'] : '',\r\n 'status' => (isset($extension['brdomain:pending']['brdomain:dns_attr'][$key]['status'])) ? $extension['brdomain:pending']['brdomain:dns_attr'][$key]['status'] : ''\r\n );\r\n }\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "6fe00b7292f6bb0a3f0cad48943645f4", "score": "0.50827146", "text": "function createNote($values,$CRMURL){\n\t\n $domainname = substr($CRMURL,8,-1);\n $pos = strpos($domainname, \"/\");\n $domainname = substr($domainname,0,$pos);\n\n\t\tdate_default_timezone_set('UTC');\n\t\t\n\t\t$mustUnderstand = 'http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Create';\n\n\t\t$createSoapTemplate = '\n\t\t\t<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\"\n\t\t\txmlns:a=\"http://www.w3.org/2005/08/addressing\"\n\t\t\txmlns:u=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">\n\t\t\t\t'.$this->getSoapRequestHeader($mustUnderstand, $CRMURL).'\t\t\t \n\t\t\t\t<s:Body xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\">\n\t\t\t\t\t<ns6:Create xmlns:ns6=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\">\n\t\t\t\t\t\t<ns6:entity>\n\t\t\t\t\t\t\t<Attributes xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts\"> \n\t\t\t\t\t\t\t\t<KeyValuePairOfstringanyType>\n\t\t\t\t\t\t\t\t\t<ns3:key xmlns:ns3=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">subject</ns3:key>\n\t\t\t\t\t\t\t\t\t<ns3:value xmlns:ns3=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\" xmlns:s1=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:s2=\"http://www.w3.org/2001/XMLSchema\" s1:type=\"s2:string\">'.$values['topic'].'</ns3:value>\n\t\t\t\t\t\t\t\t</KeyValuePairOfstringanyType>\n\t\t\t\t\t\t\t\t<KeyValuePairOfstringanyType>\n\t\t\t\t\t\t\t\t\t<ns3:key xmlns:ns3=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">notetext</ns3:key>\n\t\t\t\t\t\t\t\t\t<ns3:value xmlns:ns3=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\" xmlns:s1=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:s2=\"http://www.w3.org/2001/XMLSchema\" s1:type=\"s2:string\">'.$values['description'].'</ns3:value>\n\t\t\t\t\t\t\t\t</KeyValuePairOfstringanyType> \n\t\t\t\t\t\t\t\t<KeyValuePairOfstringanyType>\n\t\t\t\t\t\t\t\t\t<ns3:key xmlns:ns3=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">objectid</ns3:key>\n\t\t\t\t\t\t\t\t\t<value xmlns=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\" xmlns:ns2=\"http://schemas.microsoft.com/xrm/2011/Contracts\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"ns2:EntityReference\">\n\t\t\t\t\t\t\t\t\t\t<ns2:Id>'.$values['guid'].'</ns2:Id>\n\t\t\t\t\t\t\t\t\t\t<ns2:LogicalName>incident</ns2:LogicalName></value>\n\t\t\t\t\t\t\t\t</KeyValuePairOfstringanyType>\n\t\t\t\t\t\t\t</Attributes>\n\t\t\t\t\t\t\t<ns2:LogicalName xmlns:ns2=\"http://schemas.microsoft.com/xrm/2011/Contracts\">annotation</ns2:LogicalName>\n\t\t\t\t\t\t</ns6:entity>\n\t\t\t\t\t</ns6:Create> \n\t\t\t\t</s:Body>\n </s:Envelope>\n\t\t\t';\n\t \t\t$response = $this->getSoapResponse($domainname, $CRMURL, $createSoapTemplate);\n\t\t\tpreg_match('/<CreateResult>(.*)<\\/CreateResult>/', $response, $matches);\n if(sizeof($matches)>0){\n\t\t\t\t$createResult = $matches[1];\n\t\t\t\treturn $createResult;\n\t\t\t}else return \"nono\";\n }", "title": "" }, { "docid": "578ef28cafc04d86618bc8f008140828", "score": "0.5011309", "text": "public function createAction(Request $request)\n {\n $entity = new MemberSubscription();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n\n // update nilai subscription,\n $subscriptions = $this->repo('JariffAdminBundle:Subscription')->findAll();\n foreach ($subscriptions as $subscription) {\n $data[$subscription->getCategory()][$subscription->getPrice()] = $subscription->getValue();\n }\n $entity->updateValue($data);\n\n // get subscription sebelumnya\n $memberSubscriptions = $this->repo('JariffMemberBundle:MemberSubscription')->findByMember($entity->getMember());\n // set number untuk subscription ini\n $entity->setNumber($entity->getMember()->getNumber().'-'.(count($memberSubscriptions) + 1));\n\n $memberSubscription = $form->getData();\n\n $subscription_month_length = 1;\n\n // calculate monthly price\n $price = $memberSubscription->getHistory() + $memberSubscription->getSearch() + $memberSubscription->getDownload() + $memberSubscription->getBigPicture();\n if ($memberSubscription->getEverythingPlan()){\n $price = 200;\n }\n\n // calculate discount based on pif / mtm\n $total_discount = 0;\n if($memberSubscription->getPaymentTerm() == 'pif') {\n if ($memberSubscription->getMonth() == '20' ) {\n $subscription_month_length = 12;\n }\n if ($memberSubscription->getMonth() == '15' ) {\n $subscription_month_length = 6;\n }\n if ($memberSubscription->getMonth() == '10' ) {\n $subscription_month_length = 3;\n }\n $subscription_month_percent = intval($memberSubscription->getMonth()) / 100;\n $total_discount = round($price * $subscription_month_percent * $subscription_month_length);\n }\n\n // update total price\n $total_payment = $price * $subscription_month_length - $total_discount - $memberSubscription->getCustomDiscount();\n\n $entity->setTotal(($total_payment < 0)?0:$total_payment);\n $entity->setDiscount($total_discount);\n $this->persist($entity);\n\n $representativeHistory = new RepresentativeHistory();\n $representativeHistory->setTypeVal(10);\n $representativeHistory->setDescription('New subscription for member #'.$entity->getMember()->getNumber());\n $representativeHistory->setSubscription($entity->getNumber());\n // $representativeHistory->setStatus();\n $representativeHistory->setAdmin($this->user());\n $representativeHistory->setMember($entity->getMember());\n $this->persist($representativeHistory);\n\n // start new invoice\n $member = $entity->getMember();\n $company = $member->getCompany();\n\n $invoice = new Invoice();\n $invoice->setAmount($entity->getTotal());\n $invoice->setDescription('New invoice generated by system automatically for new subscription submited');\n $invoice->setMember($member);\n $invoice->setBillToName($company->getBillToName());\n $invoice->setBillToAdress($company->getBillToAdress());\n $invoice->setBillToEmail($company->getBillToEmail());\n $invoice->setBillToPhone($company->getBillToPhone());\n $invoice->setDateIssued(new \\DateTime());\n $invoice->setSubscription($entity);\n $invoice->setSales($entity->getOwner());\n $invoice->setType($company->getInvoiceType());\n\n $invoiceAmount = $this->conn()->fetchColumn('\n SELECT count(i.id) as count\n FROM invoice i\n WHERE \n i.member_id = '.$member->getId()\n );\n $invoice->setNumber($member->getNumber().'-'.(intval($invoiceAmount)+1));\n $this->persist($invoice);\n $this->success('New subscription created');\n $this->success('New invoice automatically generated');\n // end new invoice\n\n $this->flush();\n\n if ($this->echoSignSend($memberSubscription)) {\n $this->success('New contract sent to member email address, ensure they check their inbox');\n } else {\n $this->error('Unable generate new contract, please contact TS.');\n }\n\n $this->success('Ok');\n return $this->redirectUrl('admin_member_subscription_show', array('id' => $entity->getMember()->getId()));\n }\n\n return array(\n 'entity' => $entity,\n 'member' => $entity->getMember(),\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "99b9d7cf564d05e004c9a1b5b6ba9def", "score": "0.5003061", "text": "public function createRecurlySubscriptions($subs) {\r\n\r\n $loggr = new Loggr_Loggr(\"ths_replenishment\", \"8dd3d3d6488d45808d78a34eba08996c\");\r\n\r\n // Get customer email address\r\n $customerId = $subs['customerId'];\r\n $customer = Mage::getModel('customer/customer')->load($customerId);\r\n $email = $customer->getEmail();\r\n\r\n // $loggr->Events->CreateFromVariable($email)\r\n // ->Text(\"Customer email - createRecurlySubscriptions()\")\r\n // ->Post();\r\n\r\n // Billing info\r\n $lastFour = substr($subs['ccnum'], -4);\r\n $ccNum = $subs['ccnum'];\r\n $cid = $subs['cid'];\r\n $expMonth = $subs['expMonth'];\r\n $expYear = $subs['expYear'];\r\n $billingAddress = $subs['billingAddress'];\r\n $shippingAddress = $subs['shippingAddress'];\r\n\r\n // If Recurly account doesn't exist, create account\r\n $accountId = $this->checkAccountExists($email, $lastFour);\r\n\r\n // $loggr->Events->CreateFromVariable($accountId)\r\n // ->Text(\"accountID 1 - createRecurlySubscriptions()\")\r\n // ->Post();\r\n\r\n if ($accountId == false) {\r\n\r\n $orderId = $subs['orderId'];\r\n\r\n $accountId = $this->createAccount($customerId, $orderId, $ccNum, $cid, $expMonth, $expYear, $billingAddress, $shippingAddress);\r\n\r\n // $loggr->Events->CreateFromVariable($accountId)\r\n // ->Text(\"New account ID - createRecurlySubscriptions()\")\r\n // ->Post();\r\n }\r\n\r\n // Add subscriptions to Recurly account\r\n if ($accountId > 0) {\r\n\r\n foreach ($subs['items'] as $sub) {\r\n\r\n $this->addSubscriptionToAccount($accountId, $sub);\r\n\r\n }\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "e996bc5db4c08df98e4ea0c1fcb6e87e", "score": "0.49908835", "text": "private function constructCreateRequest() {\n $xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"ISO-8859-1\\\"?>\";\n\n $xml .= \"<data>\\n\";\n $xml .= \"<lead>\\n\";\n\n $xml .= \"<key>\" . $this->key . \"</key>\\n\";\n\n if ($this->leadgroup) {\n $xml .= \"<leadgroup>\" . $this->leadgroup . \"</leadgroup>\\n\";\n }\n\n if ($this->site) {\n $xml .= \"<site>\" . $this->site . \"</site>\\n\";\n }\n\n if ($this->introducer) {\n $xml .= \"<introducer>\" . $this->introducer . \"</introducer>\\n\";\n }\n\n if ($this->reference) {\n $xml .= \"<reference>\" . $this->reference . \"</reference>\\n\";\n }\n\n if ($this->source) {\n $xml .= \"<source>\" . $this->source . \"</source>\\n\";\n }\n\n if ($this->medium) {\n $xml .= \"<medium>\" . $this->medium . \"</medium>\\n\";\n }\n\n if ($this->term) {\n $xml .= \"<term>\" . $this->term . \"</term>\\n\";\n }\n\n if ($this->cost) {\n $xml .= \"<cost>\" . $this->cost . \"</cost>\\n\";\n }\n\n if ($this->value) {\n $xml .= \"<value>\" . $this->value . \"</value>\\n\";\n }\n\n if ($this->title) {\n $xml .= \"<title>\" . $this->title . \"</title>\\n\";\n }\n\n if ($this->firstname) {\n $xml .= \"<firstname>\" . $this->firstname . \"</firstname>\\n\";\n }\n\n if ($this->lastname) {\n $xml .= \"<lastname>\" . $this->lastname . \"</lastname>\\n\";\n }\n\n if ($this->company) {\n $xml .= \"<company>\" . $this->company . \"</company>\\n\";\n }\n\n if ($this->jobtitle) {\n $xml .= \"<jobtitle>\" . $this->jobtitle . \"</jobtitle>\\n\";\n }\n\n if ($this->phone1) {\n $xml .= \"<phone1>\" . $this->phone1 . \"</phone1>\\n\";\n }\n\n if ($this->phone2) {\n $xml .= \"<phone2>\" . $this->phone2 . \"</phone2>\\n\";\n }\n\n if ($this->fax) {\n $xml = \"<fax>\" . $this->fax . \"</fax>\\n\";\n }\n\n if ($this->email) {\n $xml .= \"<email>\" . $this->email . \"</email>\\n\";\n }\n\n if ($this->address1) {\n $xml .= \"<address>\" . $this->address1 . \"</address>\\n\";\n }\n\n if ($this->address2) {\n $xml .= \"<address2>\" . $this->address2 . \"</address2>\\n\";\n }\n\n if ($this->towncity) {\n $xml .= \"<towncity>\" . $this->towncity . \"</towncity>\\n\";\n }\n\n if ($this->postcode) {\n $xml .= \"<postcode>\" . $this->postcode . \"</postcode>\\n\";\n }\n\n if ($this->dobday) {\n $xml .= \"<dobday>\" . $this->dobday . \"</dobday>\\n\";\n }\n\n if ($this->dobmonth) {\n $xml .= \"<dobmonth>\" . $this->dobmonth . \"</dobmonth>\\n\";\n }\n\n if ($this->dobyear) {\n $xml .= \"<dobyear>\" . $this->dobyear . \"</dobyear>\\n\";\n }\n\n if ($this->contacttime) {\n $xml .= \"<contacttime>\" . $this->contacttime . \"</contacttime>\\n\";\n }\n\n $xml .= \"<contactphone>yes</contactphone>\";\n $xml .= \"<contactsms>yes</contactsms>\";\n $xml .= \"<contactemail>yes</contactemail>\";\n $xml .= \"<contactmail>yes</contactmail>\";\n\n\n foreach ($this->customFields as $key => $value) {\n $xml .= \"<data\" . $key . \">\" . $value . \"</data\" . $key . \">\";\n }\n\n $xml .= \"</lead>\\n\";\n $xml .= \"</data>\";\n\n $this->xml = $xml;\n return $xml;\n }", "title": "" }, { "docid": "0113b694bde63a7236fa103dc7240920", "score": "0.49829683", "text": "private function _createSubscriptionPayment(array $data, Currency $currency): SubscriptionPayment\n {\n $payment = new SubscriptionPayment([\n 'paymentAmount' => $data['amount_due'] / (10 ** $currency->minorUnit),\n 'paymentCurrency' => $currency,\n 'paymentDate' => $data['date'],\n 'paymentReference' => $data['charge'],\n 'paid' => $data['paid'],\n 'response' => Json::encode($data)\n ]);\n\n return $payment;\n }", "title": "" }, { "docid": "eec03757044194855ebaf582fb0a8e6c", "score": "0.49749902", "text": "private function _createXML(array $dataSet): string\n {\n $requiredFields = ['timestamp', 'action'];\n\n foreach ($requiredFields as $field) {\n if (!isset($dataSet[$field]) || empty($dataSet[$field])) {\n Yii::error(\"DengiOnline _createXML() Empty field value $field\", 'payment-dengionline');\n }\n }\n\n $timestamp = intval($dataSet['timestamp']);\n $action = strtolower($dataSet['action']);\n $dataSet['project'] = $this->_project_id;\n\n $xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\n<request>\n <project>$this->_project_id</project>\n <timestamp>{$timestamp}</timestamp>\n <action>{$action}</action>\";\n\n if (isset($dataSet['params'])) {\n $params = $dataSet['params'];\n\n if (is_array($params) && count($params)) {\n $xml .= \"<params>\";\n\n foreach ($params as $key => $value) {\n $xml .= \"\n <{$key}>{$value}</{$key}>\";\n }\n\n $xml .= \"</params>\";\n }\n }\n\n $xml .= \"<sign>\" . static::_getSign($dataSet) . \"</sign>\n</request>\";\n\n return $xml;\n }", "title": "" }, { "docid": "7d0a1b72e2c9d88516ee8a83446a4d41", "score": "0.496177", "text": "public function post() {\n\t\t$params = $this->requestParams;\n\n\t\t$url = $this->apiUrl['charge'];\n\t\t\n\t\tif (isset($params['period']) && isset($params['period_duration'])) {\n\t\t\t$url = $this->apiUrl['subscription'];\n\t\t}\n\t\t\n\t\t$response = $this->_handleRequest('POST', $url);\n\t\treturn $this->_wrapResponseBody($this->_removeBOM($response['body']));\n\t}", "title": "" }, { "docid": "e6201a2cf2b2c296751efeb482d37a41", "score": "0.4944613", "text": "public function createPeriod($uid, $start_date, $end_date)\r\n {\r\n\r\n $start_date = date('Y-m-d', strtotime(str_replace('-', '/', $start_date)));\r\n $end_date = date('Y-m-d', strtotime(str_replace('-', '/', $end_date)));\r\n $stmt = $this->conn->prepare('INSERT INTO Period (uid, mens_start, mens_end) VALUES (?, ?, ?)');\r\n\r\n $stmt->bind_param('sss', $uid, $start_date, $end_date);\r\n\r\n if ($stmt->execute())\r\n {\r\n //Entry created successfully\r\n return true;\r\n }\r\n else\r\n {\r\n //Error creating Entry\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "b17dd71a53cbd2f2d26d87d1ca187060", "score": "0.4933838", "text": "public function getXML()\n {\n return XMLGenerator::paymentInitiationXML($this->data, $this->configuration);\n }", "title": "" }, { "docid": "0476e523f43a5bbb6b1f5a0368eb9125", "score": "0.49120718", "text": "public static function make(){\n return new AccountSubscription;\n }", "title": "" }, { "docid": "b104999700a93b90dee5452db1e84715", "score": "0.49082705", "text": "abstract public function onSubscriptionCreated(SubscriptionCreatedEvent $event);", "title": "" }, { "docid": "1a8549bfa60f1aff7112362cdb113188", "score": "0.48998985", "text": "public function create()\n {\n return inertia(\n 'Periods/Create',\n [\n 'degrees' => Degree::all()->map(fn ($degree) => [\n 'id' => $degree->id,\n 'mode' => $degree->mode,\n 'degree' => $degree->degree\n ]),\n 'pensums' => Pensum::all()->map(fn ($pensum) => [\n 'id' => $pensum->id,\n 'code' => $pensum->code,\n 'degree' => $pensum->degree->degree\n ])\n ]\n );\n }", "title": "" }, { "docid": "3746cf5028a5265c5505450caafdd95f", "score": "0.48985147", "text": "public function sendSubscription()\n {\n $mailApp = new MailappSubscribers();\n $mailApp->setSubscriberName($this->subscriberName);\n $mailApp->setSubscriberEmail($this->subscriberEmail);\n $mailApp->setSubscriberType($this->subscriberType);\n $mailApp->setListId($this->arcamailerCustomerListId);\n $mailApp->setConsentId($this->consent_id);\n $mailApp->setDatetimeConsent($this->datetime_consent);\n $mailApp->setAccountId($this->account_id);\n $entityManager = $this->doctrine->getManager('domain');\n $entityManager->persist($mailApp);\n $entityManager->flush();\n\n\n if($this->consent_id!=null && $this->account_id!=null){\n $repository = $this->doctrine->getRepository('CoreBundle:AccountConsent', 'main');\n $accountConsent = $repository->find(array(\"account_id\" => $this->account_id, \"consent_id\" => $this->consent_id));\n\n if($accountConsent){\n $this->consentService->updateAccountConsent($accountConsent);\n }else{\n $consent = $this->doctrine->getRepository('CoreBundle:Consent', 'main')->find($this->consent_id);\n $account = $this->doctrine->getRepository('CoreBundle:Account', 'main')->find($this->account_id);\n\n if($consent && $account){\n $accountConsent = new AccountConsent();\n $accountConsent->setAccountId($account);\n $accountConsent->setConsentId($consent);\n $accountConsent->setDate(new \\DateTime(\"now\"));\n\n $entityManager = $this->doctrine->getManager('main');\n $entityManager->persist($accountConsent);\n $entityManager->flush();\n\n }\n\n }\n\n }\n\n\n $client = new Client();\n $response = $client->post(self::URL_API, [\n 'body' => [\n 'action' => $this->action,\n 'listID' => $this->arcamailerCustomerListId,\n 'subscriber_name' => $this->subscriberName,\n 'subscriber_email' => $this->subscriberEmail,\n 'subscriber_type' => $this->subscriberType,\n ],\n 'timeout' => self::TIMEOUT\n ]);\n $body = unserialize($response->getBody()->getContents());\n\n if (false === $body['success']) {\n $this->setMessageErrors($body['arrayReturn']);\n }\n\n return $body['success'];\n }", "title": "" }, { "docid": "dc834de21b6a837936230886bffa1b5b", "score": "0.4852361", "text": "public function definition()\n {\n return [\n 'next_period' => $this->faker->dateTimeBetween($startDate = '-1 week', $endDate = '+2 week'),\n ];\n }", "title": "" }, { "docid": "398351e42967fff4562a7efb942e301b", "score": "0.4845043", "text": "function createXML($p, $time) {\n require_once CMS_INC_ROOT.'/Article.class.php';\n $result = $p['result'];\n foreach ($result as $rs) {\n $campaign_ids[$rs['campaign_id']] = $rs['campaign_id'];\n $article_ids[$rs['article_id']] = $rs['article_id'];\n }\n $p['cid'] = $campaign_ids;\n $p['article_ids'] = $article_ids;\n getXML($p);\n $p['time'] = $time; \n Article::articleDownloadLog($p);\n}", "title": "" }, { "docid": "06fb2adce9e2d151b494114ab369bc90", "score": "0.48449597", "text": "public function createDocumentElement() {\n\t\t$this->node = $this->getDocument ()->createElement ( 'downloadRequest' );\n\t\t$this->node->setAttribute ( 'xmlns', self::XMLNS_PRODUCTS );\n\t\t$this->node->setAttribute ( 'xmlns:common', self::XMLNS_COMMON );\n\t\t$this->node->setAttribute ( 'version', '1.0' );\n\t\t$this->getDocument ()->appendChild ( $this->node );\n\t}", "title": "" }, { "docid": "a43e5aa96093ecbf31598fa2c9d8b5f8", "score": "0.48379523", "text": "public function testAddNewPeriod () {\n\n $query = $this->db->query('TRUNCATE PlayPeriod;');\n $getIdNotExit = $this->player->limit(1)->order_by('id', 'DESC')->get_all();\n \n // verify player Id return invalid \n $dataExpected = $this->getPlayer(0, null);\n $idNotExits = isset($getIdNotExit[0]->id) ? ($getIdNotExit[0]->id + 1) : 1;\n\n $playerIdInvalid = array('', null, 'abc', 0, -123, $idNotExits );\n\n foreach ($playerIdInvalid as $key => $value) {\n\n $resultTest = $this->playperiod->add($playerIdInvalid[$key] );\n if ($key != 5) {\n if (isset($resultTest['errors'])) {\n\n //To verify id player return invalid\n $this->unit->run($resultTest['errors'], $this->db->_error_message(), \"verify id player return invalid\", \"To verify id player return invalid\");\n }\n }\n }\n // verify playperiod return is valid with status is NotReady\n if (is_object($dataExpected) > 0 && isset($dataExpected->id)) {\n $testResult = $this->playperiod->add($dataExpected->id);\n\n if (is_object($testResult) && isset($testResult->id)) {\n // verify endtime return must be equal 23:59:59 of end day\n $this->unit->run($testResult->endDate, date('m-d-Y 23:59:59'), \"verify playperiod return is valid\", \"verify endtime return must be equal 23:59:59 of end day\");\n\n // verify status return must be equal is NotReady \n $this->unit->run($testResult->status, \"NotReady\", \"verify playperiod return is valid\", \"verify status return must be equal is NotReady\");\n\n } elseif (is_array($testResult) && isset($testResult['errors'])) {\n // verify add new playperiod is exit on date\n $this->unit->run($testResult['errors'], \"PlayPeriod exists in \". date('Y-m-d'));\n } \n } else {\n echo \"<h4 style='color: red;'>Can't verify add a new Playperiod. Because doen't exit players.<h4>\";\n }\n\n $dataExpectedEmailConfirm = $this->getPlayer(1, null);\n // verify playperiod return is valid with status is NotReady\n if ( is_object($dataExpectedEmailConfirm) && isset($dataExpectedEmailConfirm->id) ) {\n\n $testResultSecond = $this->playperiod->add($dataExpectedEmailConfirm->id);\n \n if (is_object($testResultSecond) && isset($testResultSecond->id)) {\n\n // verify endtime return must be equal 23:59:59 of end day\n $this->unit->run($testResultSecond->endDate, date('m-d-Y 23:59:59'), \"verify playperiod return is valid\", \"verify endtime return must be equal 23:59:59 of end day\");\n\n // verify status return must be equal is NotReady \n $this->unit->run($testResultSecond->status, \"Ready\", \"verify playperiod return is valid\", \"verify status return must be equal is NotReady\");\n\n } elseif (is_array($testResultSecond) && isset($testResultSecond['errors'])) {\n\n // verify add new playperiod is exit on date\n $this->unit->run($testResultSecond['errors'], \"PlayPeriod exists in \". date('Y-m-d'));\n } \n } else {\n echo \"<h4 style='color: red;'>Can't verify add a new Playperiod. Because doen't exit players.<h4>\";\n }\n // verify playperiod return is valid with status is Ready\n \n echo $this->unit->report();\n echo $this->returnResult($this->unit->result()); \n }", "title": "" }, { "docid": "a44451e693316131debdd52a4b973a96", "score": "0.48330024", "text": "function generate_xml(){\n\t\t$xml_txt = \"<submission>\\n\"\n\t\t\t\t\t. \"<id>\" \t\t. $this->sub_id \t. \"</id>\\n\"\n\t\t\t\t\t. \"<form_id>\" \t. $this->form_id \t. \"</form_id>\\n\"\n\t\t\t\t\t. \"<user>\"\t\t. $this->uname\t\t. \"</user>\\n\"\n\t\t\t\t\t. \"<date>\"\t\t. $this->sub_time\t. \"</date>\\n\";\n\t\t\n\t\t//$xml_txt .= \"<files>\\n\";\n\t\t// loop through and generate xml for files\n\t\t$count = count($this->submission_files);\n\t\tfor($i = 0; $i < $count; $i++){\n\t\t\t$xml_txt .= \n\t\t\t\t\t\"<file>\\n\"\n\t\t\t\t\t. \"<fid>\" \t. $this->submission_files[$i]->file_submission_id \t. \"</fid>\\n\"\n\t\t\t \t\t. \"<fname>\" . $this->submission_files[$i]->file_name \t\t\t. \"</fname>\\n\"\n\t\t\t\t\t. \"<path>\" . $this->submission_files[$i]->file_path \t\t\t. \"</path>\\n\"\n\t\t\t\t\t. \"</file>\\n\";\n\t\t}\n\t\t//$xml_txt .= \"</files>\\n\";\n\t\t//$xml_txt .= \"<layers>\\n\";\n\t\t// loop through and generate xml for layers\n\t\t$count = count($this->submission_layers);\n\t\tfor($i = 0; $i < $count; $i++){\n\t\t\t$xml_txt .= \n\t\t\t\t\t\"<layer>\\n\"\n\t\t\t\t\t. \"<lid>\" \t. $this->submission_layers[$i]->layer_id \t. \"</lid>\\n\"\n\t\t\t \t\t. \"<lname>\" . $this->submission_layers[$i]->layer_name\t. \"</lname>\\n\"\n\t\t\t\t\t. \"<view>\" . $this->submission_layers[$i]->view_name \t. \"</view>\\n\"\n\t\t\t\t\t. \"</layer>\\n\";\n\t\t}\n\t\t//$xml_txt .= \"<layers>\\n\";\n\t\t$xml_txt .= \"<children>\\n\";\n\t\t$n_children = count($this->child_submissions);\n\t\t$child_xml = \"\";\n\t\t// recursively call this method to \n\t\t// generate xml for all child \n\t\t// submissions for which this submission\n\t\t// is a parent.\n\t\tfor($i = 0; $i < $n_children; $i++)\n\t\t\t$child_xml .= $this->child_submissions[$i]->generate_xml();\n\t\t$xml_txt .= $child_xml;\n\t\t$xml_txt .= \"</children>\\n\";\n\t\t$xml_txt .= \"</submission>\";\n\t\t\n\t\treturn $xml_txt; \n\t}", "title": "" }, { "docid": "19885c5c4382c099160bf138c0a7bc64", "score": "0.48254773", "text": "public function buildRequest($requestType) {\n \n $request = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\".\n \"<ARB{$requestType}SubscriptionRequest xmlns=\\\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\\\">\\n\".\n \" <merchantAuthentication>\\n\" .\n \" <name>$this->loginId</name>\\n\" .\n \" <transactionKey>$this->transactionKey</transactionKey>\\n\" .\n \" </merchantAuthentication>\\n\";\n\n \n\n // check to see if we've set a reference Id\n if($this->referenceId)\n $request .= \" <refId>$this->referenceId</refId>\\n\";\n\n // check to see if we've set a trial period\n if($this->trialInfo) {\n $trialOccurrences = \" <trialOccurrences>{$this->trialInfo[0]}</trialOccurrences>\\n\";\n $trialAmount = \" <trialAmount>{$this->trialInfo[1]}</trialAmount>\\n\";\n } else {\n $trialOccurrences = $trialAmount = '';\n }\n\n if($this->billTo) {\n $firstName = $this->billTo['firstName'];\n $lastName = $this->billTo['lastName'];\n } else {\n $firstName = $lastName = '';\n }\n\n switch($requestType) {\n\n case 'Create':\n $request .= \" <subscription>\\n\".\n\t\t\t\t\t\t\t\" <name>{$this->subscription_name}</name>\\n\".\t\t\t\t\n \" <paymentSchedule>\\n\".\n \" <interval>\\n\".\n \" <length>{$this->paymentScheduleInfo[0]}</length>\\n\".\n \" <unit>{$this->paymentScheduleInfo[1]}</unit>\\n\".\n \" </interval>\\n\".\n \" <startDate>{$this->paymentScheduleInfo[2]}</startDate>\\n\".\n \" <totalOccurrences>{$this->paymentScheduleInfo[3]}</totalOccurrences>\\n\".\n $trialOccurrences.\n \" </paymentSchedule>\\n\".\n \" <amount>{$this->paymentScheduleInfo[4]}</amount>\\n\".\n $trialAmount.\n \" <payment>\\n\".\n \" <creditCard>\\n\".\n \" <cardNumber>{$this->paymentInfo[0]}</cardNumber>\\n\".\n \" <expirationDate>{$this->paymentInfo[1]}</expirationDate>\\n\".\n \" </creditCard>\\n\".\n \" </payment>\\n\".\n \" <order>\\n\".\n \" <invoiceNumber>{$this->generateInvoiceNumber()}</invoiceNumber>\\n\".\n \" </order>\\n\".\n \" <billTo>\\n\".\n \" <firstName>$firstName</firstName>\\n\".\n \" <lastName>$lastName</lastName>\\n\".\n \" </billTo>\\n\".\n \" </subscription>\\n\";\n break;\n\n case 'Update':\n // $request .= \"<ARBUpdateSubscriptionRequest xmlns=\\\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\\\">\\n\";\n break;\n\n case 'Cancel':\n $request .= \" <subscriptionId>$this->subscriptionId</subscriptionId>\\n\";\n break;\n }\n if($requestType!=\"getSubscription\"){\n $request .= \"</ARB{$requestType}SubscriptionRequest>\";\n\t\t return $this->parseReturn($this->sendRequest($request));\n\t\t}else{\n $request = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\".\n\t\t\t\t \"<ARBGetSubscriptionListRequest xmlns=\\\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\\\">\\n\".\n\t\t\t\t \" <merchantAuthentication>\\n\" .\n\t\t\t\t \" <name>$this->loginId</name>\\n\" .\n\t\t\t\t \" <transactionKey>$this->transactionKey</transactionKey>\\n\" .\n\t\t\t\t\t\" </merchantAuthentication>\\n\". \n\t\t\t\t\t\" <searchType>subscriptionActive</searchType>\\n\".\n\t\t\t\t\t\"\t\t <sorting>\\n\".\n\t\t\t\t\t\"\t\t\t <orderBy>id</orderBy>\\n\".\n\t\t\t\t\t\"\t\t\t <orderDescending>false</orderDescending>\\n\".\n\t\t\t\t\t\"\t\t </sorting>\\n\".\n\t\t\t\t\t\"\t\t <paging>\\n\".\n\t\t\t\t\t\"\t\t\t <limit>1000</limit>\\n\".\n\t\t\t\t\t\"\t\t\t <offset>1</offset>\\n\".\n\t\t\t\t\t\"\t\t </paging>\\n\".\n\t\t\t\t \" </ARBGetSubscriptionListRequest>\\n\"; \n\t\t\t\t\t return $this->parseReturn_get($this->sendRequest($request));\n\n\t\t}\n // debug($this->sendRequest($request));\n #return $this->parseReturn($this->sendRequest($request));\n\n }", "title": "" }, { "docid": "2560ac1df9c07d9e8ee9ae700a437ffa", "score": "0.4824456", "text": "protected function build()\n {\n $operation = $this->buildOperation('ManualCallback');\n\n $merchantID = $this->document->createElement('merchantID', $this->merchantId);\n $operation->appendChild($merchantID);\n\n $xmlMPayTid = $this->document->createElement('mpayTID', $this->mpayTid);\n $operation->appendChild($xmlMPayTid);\n\n $paymentCallback = $this->document->createElement('paymentCallback');\n $paymentCallback->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance',\n 'xsi:type', \"etp:Callback $this->type\");\n $paymentCallback = $operation->appendChild($paymentCallback);\n\n if ($this->amount) {\n $price = $this->document->createElement('amount', $this->amount);\n $paymentCallback->appendChild($price);\n }\n\n if ($this->cancel) {\n $cancel = $this->document->createElement('cancel', $this->cancel);\n $paymentCallback->appendChild($cancel);\n }\n\n if ($this->order) {\n // TODO:: Add the order to the request\n }\n }", "title": "" }, { "docid": "63aa5a7afa49d6cf75d6bf57d9f568f3", "score": "0.48110923", "text": "public function create()\n {\n $period_opts = Period::orderBy('start_date', 'DESC')->lists('code', 'id');\n return view('payroll.create')\n ->with('period_opts', $period_opts);\n }", "title": "" }, { "docid": "0430b0fd6cfab3739717e8e0140bc8fa", "score": "0.47977832", "text": "public function subscribeTo($plan,$order=null, int $duration = 30,$noOfMonths=1, bool $isRecurring = true)\n {\n return \"sai\";\n $subscriptionModel = config('plans.models.subscription');\n if ($duration < 1) {\n return false;\n }\n if ($noOfMonths<1){\n return false;\n }\n if ($this->hasActiveSubscription()){\n $subscription=$this->activeSubscription();\n $this->cancelAllActiveSubscriptions();\n }\n else{\n $subscription=$this->lastActiveSubscription();\n }\n $commercial_apps=[];\n $non_commercial_apps=[];\n if ($subscription){\n $commercial_apps = $subscription->subscriptionCommercialLicenses;\n foreach ($commercial_apps as $commercial_app){\n $commercial_app_model=$commercial_app->load('model');\n $commercial_app_model->model->cancelAllActiveSubscriptions();\n }\n $non_commercial_apps = $subscription->subscriptionNonCommercialLicenses;\n foreach ($non_commercial_apps as $non_commercial_app){\n $non_commercial_app_model=$non_commercial_app->load('model');\n $non_commercial_app_model->model->cancelAllActiveSubscriptions();\n }\n }\n if ($order===null){\n $order_id=0;\n }\n else{\n $order_id=$order->id;\n }\n $commercial_license=$plan->commertialAppCode();\n $non_commercial_license=AppLicense::find(config('plans.planConstants.nonCommertialApp'));\n $startDate=Carbon::now()->subSeconds(1);\n $expireDate=Carbon::now()->addDays($duration);\n for ($i=0;$i<$noOfMonths;$i++){\n $subscription = $this->subscriptions()->save(new $subscriptionModel([\n 'plan_id' => $plan->id,\n 'starts_on' => $startDate,\n 'expires_on' => $expireDate,\n 'user_orders_id'=>$order_id,\n 'cancelled_on' => null,\n 'payment_method' => ($this->subscriptionPaymentMethod) ?: null,\n 'is_paid' => (bool) ($this->subscriptionPaymentMethod) ? false : true,\n 'charging_price' => ($this->chargingPrice) ?: $plan->price,\n 'charging_currency' => ($this->chargingCurrency) ?: $plan->currency,\n 'is_recurring' => $isRecurring,\n 'recurring_each_days' => $duration,\n ]));\n if (count($commercial_apps)){\n if ($commercial_license){\n foreach ($commercial_apps as $commercial_app){\n $commercial_app_model=$commercial_app->load('model');\n if ($commercial_app_model->model->hasActiveSubscription()){\n //$commercial_app_model->model->cancelAllActiveSubscriptions();\n $commercial_app_model->model->subscribeTo($subscription->id,'subscription',$commercial_license,null);\n }else{\n $commercial_app_model->model->subscribeTo($subscription->id,'subscription',$commercial_license,null);\n }\n }\n }\n }\n if (count($non_commercial_apps)){\n if ($non_commercial_license) {\n foreach ($non_commercial_apps as $non_commercial_app) {\n $non_commercial_app_model=$non_commercial_app->load('model');\n if ($non_commercial_app_model->model->hasActiveSubscription()) {\n //$non_commercial_app_model->model->cancelAllActiveSubscriptions();\n $non_commercial_app_model->model->subscribeTo($subscription->id, 'subscription', $non_commercial_license, null);\n } else {\n $non_commercial_app_model->model->subscribeTo($subscription->id, 'subscription', $non_commercial_license, null);\n }\n }\n }\n }\n $startDate=Carbon::parse($expireDate)->subSeconds(1);\n $expireDate=Carbon::parse($expireDate)->addDays($duration);\n }\n return $this->activeSubscription();\n }", "title": "" }, { "docid": "cd45cc24df3e25b097f0de1596d3f10d", "score": "0.47971234", "text": "public function run()\n {\n $t = [\n [\n 'name' => 'بالقطعة',\n ],\n [\n 'name' => 'تاريخ محدد',\n ],\n [\n 'name' => 'بالمبلغ',\n ]\n ];\n\n \\App\\SubscriptionType::insert($t);\n }", "title": "" }, { "docid": "352e8f6957842f69362d3c32ebd83fb2", "score": "0.47912052", "text": "public function run()\n {\n $periods = [\n [\n 'accronym' => '1T1819',\n 'name' => 'First Semester AY 2018-2019',\n 'start' => '2018-06-18',\n 'end' => '2018-10-23',\n 'type' => 'semestral',\n 'status' => 'expired'\n ],\n [\n 'accronym' => '2T1819',\n 'name' => 'Second Semester AY 2018-2019',\n 'start' => '2018-10-29',\n 'end' => '2019-03-23',\n 'type' => 'semestral',\n 'status' => 'midterm'\n ], \n [\n 'accronym' => 'AY 2018-2019',\n 'name' => 'Academic Year 2018-2019',\n 'start' => '2018-06-18',\n 'end' => '2019-03-23',\n 'type' => 'annual',\n 'status' => 'Q3'\n ],\n \n ];\n\n foreach($periods as $period) {\n App\\Period::create($period);\n }\n }", "title": "" }, { "docid": "595460b8605f44b82e7d02a1e93125ad", "score": "0.47901696", "text": "private function prepareDocument()\n {\n //Create the XML Instance\n $this->xml = new \\DOMDocument(\"1.0\", \"UTF-8\");\n\n //Create the document node\n $documentNode = $this->xml->createElement(\"Document\");\n\n //set the namespace\n $documentAttributeXMLNS = $this->xml->createAttribute(\"xmlns\");\n if ($this->configuration->getVersion() === 3) {\n $documentAttributeXMLNS->value = \"urn:iso:std:iso:20022:tech:xsd:pain.008.001.03\";\n } else {\n $documentAttributeXMLNS->value = \"urn:iso:std:iso:20022:tech:xsd:pain.008.001.02\";\n }\n $documentNode->appendChild($documentAttributeXMLNS);\n\n //set the namespace url\n $documentAttributeXMLNSXSI = $this->xml->createAttribute(\"xmlns:xsi\");\n $documentAttributeXMLNSXSI->value = \"http://www.w3.org/2001/XMLSchema-instance\";\n $documentNode->appendChild($documentAttributeXMLNSXSI);\n\n //create the Direct Debit node\n $CstmrDrctDbtInitnNode = $this->xml->createElement(\"CstmrDrctDbtInitn\");\n $documentNode->appendChild($CstmrDrctDbtInitnNode);\n\n //append the document node to the XML Instance\n $this->xml->appendChild($documentNode);\n }", "title": "" }, { "docid": "880353562be9ee895c9d739f32ca02b6", "score": "0.47810444", "text": "protected function createXml()\n {\n $variables = [\n 'isClientCode' => $this->getConfigHelper()->getClientCode(),\n 'isPOSID' => $this->getConfigHelper()->getPosId(),\n 'isTransactionID' => $this->getConfigHelper()->getTransactionId((string)$this->getOrder()->getIncrementId()),\n 'isAmount' => round($this->getOrder()->getGrandTotal()),\n 'isExchange' => $this->getConfigHelper()->getCurrencyCode(),\n 'isLanguageCode' => $this->getConfigHelper()->getLanguageCode(),\n 'isCardPocketId' => '',\n 'isNameNeeded' => 'FALSE',\n 'isCountryNeeded' => 'FALSE',\n 'isCountyNeeded' => 'FALSE',\n 'isSettlementNeeded' => 'FALSE',\n 'isZipcodeNeeded' => 'FALSE',\n 'isStreetNeeded' => 'FALSE',\n 'isMailAddressNeeded' => 'FALSE',\n 'isNarrationNeeded' => 'FALSE',\n 'isConsumerReceiptNeeded' => 'FALSE',\n 'isBackURL' => $this->getConfigHelper()->getResponseCallbackUrl((string)$this->getOrder()->getIncrementId()),\n 'isShopComment' => $this->getConfigHelper()->getShopComment(),\n 'isConsumerRegistrationNeeded' => 'FALSE',\n 'isClientSignature' => $this->getSign()\n ];\n\n $this->createOtpXML(\n self::PAYMENT_REQUEST,\n $variables\n );\n }", "title": "" }, { "docid": "5aee5e5851917759c5349c17bc2cbb26", "score": "0.47782484", "text": "private final function _build_xml() {\n $mod = ModuleOperations::get_instance()->get_module_instance($this->modname, NULL, TRUE);\n\n $this->_xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . \"\\n\";\n $this->_xml .= '<LISEInstanceModule>' . \"\\n\";\n $this->_xml .= ' <XMLVERSION>' . self::XML_VERSION . '</XMLVERSION>' . \"\\n\";\n $this->_xml .= ' <ModuleName>' . $this->modname . '</ModuleName>' . \"\\n\";\n $this->_xml .= ' <Version>' . $mod->GetVersion() . '</Version>' . \"\\n\";\n $this->_xml .= ' <ModuleFriendlyName><![CDATA[' . $mod->GetFriendlyName() . ']]></ModuleFriendlyName>' . \"\\n\";\n $this->_xml .= ' <Data>' . base64_encode(serialize($this->_data)) . '</Data>' . \"\\n\";\n $this->_xml .= '</LISEInstanceModule>' . \"\\n\";\n }", "title": "" }, { "docid": "5fa5927c7777718a0aa15b91680944ad", "score": "0.4771593", "text": "public function createCustomSubscription($token, $amount, $description, $billingFrequency, $trialDays = null)\n {\n $data = [\n 'PROFILESTARTDATE' => Carbon::now()->toAtomString(),\n 'DESC' => $description,\n 'BILLINGPERIOD' => 'Month',\n 'BILLINGFREQUENCY' => $billingFrequency,\n 'AMT' => $amount,\n 'CURRENCYCODE' => $this->currency,\n ];\n\n if (!is_null($trialDays) && is_numeric($trialDays)) {\n $data['TRIALBILLINGPERIOD'] = 'Day';\n $data['TRIALTOTALBILLINGCYCLES'] = $trialDays;\n $data['TRIALBILLINGFREQUENCY'] = 1;\n $data['TRIALAMT'] = 0;\n }\n\n return $this->createRecurringPaymentsProfile($data, $token);\n }", "title": "" }, { "docid": "23f5fc090f6325470c1d2e5d68d92c3d", "score": "0.47673053", "text": "public function create()\n {\n \n return view('admin.periodo.create');\n }", "title": "" }, { "docid": "a4e3fc0dfa51d22dd42f6e75f567eba2", "score": "0.47664756", "text": "public function create()\n {\n return view('admin.vinculacion.seguimiento.periods.create');\n }", "title": "" }, { "docid": "8103a142d657c58bd665f70ba7c5cfd3", "score": "0.47657445", "text": "protected function generate()\n {\n $this->description = 'Vaderdag';\n\n if ($this->year >= 1948) {\n $timestamp = strtotime('third sunday', mktime(0, 0, 0, 6, 0, $this->year));\n $date = new \\DateTime();\n $date->setTimestamp($timestamp);\n\n $this->setupDateTimeObjects($date);\n } else {\n $this->valid = false;\n }\n }", "title": "" }, { "docid": "36b78b8b9dff5ee60dd3c88f2a956f09", "score": "0.4755999", "text": "public function run()\n {\n //'title', 'description', 'price',\n\t\t$subscription = new Subscription(\n\t\t\t[\n\t\t\t\t'title' => 'basis',\n\t\t\t\t'description' => 'Toeslag per verkocht ticket </br> Gratis voor gratis tickets',\n\t\t\t\t'items' => '<li>één tickettype,</li> <li>basis evenementpagina,</li> <li>vermelding op <span class=\"logo logo--s\">evento</span>,</li> <li>online hulpcentrum.</li>',\n\t\t\t\t'price' => 0.60,\n\t\t\t]\n\t\t);\n\t\t$subscription->save();\n\n\t\t$subscription = new Subscription(\n\t\t\t[\n\t\t\t\t'title' => 'professioneel',\n\t\t\t\t'description' => 'Toeslag per verkocht ticket </br> Gratis voor gratis tickets',\n\t\t\t\t'items' => '<li>alles van basis abonnement,</li> <li>meerdere tickettypes (max. 4),</li> <li>extra elementen (grondplan, programma, en meer) toevoegen aan de evenementpagina,</li> <li>telefonisch hulpcentrum.</li>',\n\t\t\t\t'price' => 1,\n\t\t\t]\n\t\t);\n\t\t$subscription->save();\n\n\t\t$subscription = new Subscription(\n\t\t\t[\n\t\t\t\t'title' => 'premium',\n\t\t\t\t'description' => 'Toeslag per verkocht ticket </br> Gratis voor gratis tickets',\n\t\t\t\t'items' => '<li>alles van professioneel abonnement,</li> <li>eigen personaliseerbare evenementpagina,</li> <li>ongelimiteerde tickettypes.</li>',\n\t\t\t\t'price' => 1.50,\n\t\t\t]\n\t\t);\n\t\t$subscription->save();\n }", "title": "" }, { "docid": "e812ecc8c4a86c020e523affcb84271c", "score": "0.47443333", "text": "public function run()\n {\n Subscripcion::create(\n [\n 'companie_id'=>2,\n 'plan_id'=>1,\n 'started_at'=>'2020-09-25',\n 'finish_at'=>'2020-10-25',\n 'migrate'=>0,\n 'subscription_id'=>'prueba',\n 'migrate_at'=>null,\n 'renewal_cancelled_at'=>null\n ]\n );\n Subscripcion::create(\n [\n 'companie_id'=>3,\n 'plan_id'=>2,\n 'started_at'=>'2020-09-25',\n 'finish_at'=>'2020-10-25',\n 'migrate'=>0,\n 'migrate_at'=>null,\n 'subscription_id'=>'prueba2',\n 'renewal_cancelled_at'=>null\n ]\n );\n\n }", "title": "" }, { "docid": "17028b736550add120fca118faf581dd", "score": "0.47400048", "text": "private function createNewSubscription($arrData, $custom_data, $plan_id = null){\n $this->process_steps .= '29; ' ;\n $subscription = new Subscriptions();\n $subscription->user_id = $custom_data['user_id'];\n $subscription->trans_id = isset($arrData['txn_id']) ? $arrData['txn_id'] : 'trial';\n $subscription->subscr_id = $arrData['subscr_id'];\n $subscription->subscription_id = $plan_id; //because field 'subscription_id' corresponds with 'id' in SubscriptionPlans\n $date = isset($arrData['payment_date']) ? $arrData['payment_date'] : $arrData['subscr_date'];\n $subscription->payment_date = date('Y-m-d H:i:s',strtotime($date));\n $subscription->status = 'active';\n $subscription->items_count = $custom_data['service_id'];\n $subscription->created_at = date(\"Y-m-d H:i:s\");\n $subscription->updated_at = date('Y-m-d H:i:s');\n if($subscription->save()){\n return $subscription;\n }else{\n Yii::log(\"[CUSTOM-LOG-SBSCR-ERROR] -> Can't create new subscription\", 'ERROR'); exit;\n }\n }", "title": "" }, { "docid": "ffef90184839384608b9fe03401c5cef", "score": "0.4738805", "text": "function create_subscription($pubsub, $topicName, $subscriptionName) {\n global $debugpubsub;\n\n $topic = $pubsub->topic($topicName);\n $subscription = $topic->subscription($subscriptionName);\n $subscription->create();\n\n $debugpubsub = $debugpubsub . 'Subscription created: ' . $subscription->name();\n }", "title": "" }, { "docid": "75092e08f3fab8d735c5889fd6055056", "score": "0.473767", "text": "public function run()\n {\n NewsletterSubscription::factory(100)->create();\n }", "title": "" }, { "docid": "09a0c77cdeb0c666387d812877a54831", "score": "0.4691012", "text": "public function createSubscription($organization)\n {\n\n $result = ChargeBee_Subscription::create([\n \"planId\" => $this->getFreePlanId(),\n \"autoCollection\" => \"on\",\n \"customer\" => array(\n \"email\" => $organization->owner()->email(),\n \"company\" => $organization->name,\n \"phone\" => $organization->owner()->phone()\n ),\n ]);\n\n return $this->toArray($result);\n }", "title": "" }, { "docid": "4f83c38e80d76b55d36a3eb78b3b53a5", "score": "0.46868205", "text": "function getPeriodList() {\r\n $objDate = new DateNow();\r\n $currentPeriod_int = $objDate->intPeriod();\r\n $currentPeriod_str = $objDate->strPeriod();\r\n\r\n $EndYYYYmm = 2001;\r\n $objPeriod = new generatePeriod($currentPeriod_int, $EndYYYYmm);\r\n $setofPeriod = $objPeriod->generatePeriod3();\r\n return $setofPeriod;\r\n}", "title": "" }, { "docid": "9cf6af80203e340e7b7d1cd968a97841", "score": "0.46859673", "text": "function orbis_shortcode_subscriptions_to_invoice( $atts ) {\n\tglobal $wpdb;\n\tglobal $orbis_subscriptions_plugin;\n\n $date = strtotime( filter_input( INPUT_GET, 'date', FILTER_SANITIZE_STRING ) );\n\tif ( false === $date ) {\n\t\t$date = time();\n\t}\n\n\t// Interval\n\t$interval = filter_input( INPUT_GET, 'interval', FILTER_SANITIZE_STRING );\n\t$interval = empty( $interval ) ? 'Y' : $interval;\n\n\t// Query\n\tswitch ( $interval ) {\n\t\tcase 'M':\n\t\t\t$day_function = 'DAYOFMONTH';\n\t\t\t$join_condition = $wpdb->prepare( '( YEAR( invoice.start_date ) = %d AND MONTH( invoice.start_date ) = %d )', date( 'Y', $date ), date( 'n', $date ) );\n\t\t\t$where_condition = $wpdb->prepare( '\n\t\t\t\t(\n\t\t\t\t\tYEAR( subscription.activation_date ) <= %d\n\t\t\t\t\t\tAND\n\t\t\t\t\tMONTH( subscription.activation_date ) <= %d\n\t\t\t\t)',\n\t\t\t\tdate( 'Y', $date ),\n\t\t\t\tdate( 'n', $date )\n\t\t\t);\n\n\t\t\tbreak;\n\t\tcase 'Y':\n\t\tdefault:\n\t\t\t$day_function = 'DAYOFYEAR';\n\t\t\t$join_condition = $wpdb->prepare( 'YEAR( invoice.start_date ) = %d', date( 'Y', $date ) );\n\t\t\t$where_condition = $wpdb->prepare( '\n\t\t\t\t(\n\t\t\t\t\tYEAR( subscription.activation_date ) <= %d\n\t\t\t\t\t\tAND \n\t\t\t\t\tMONTH( subscription.activation_date ) < ( MONTH( NOW() ) + 2 )\n\t\t\t\t)',\n\t\t\t\tdate( 'Y', $date )\n\t\t\t);\n\n\t\t\tbreak;\n\t}\n\n\t$query = $wpdb->prepare(\n\t\t\"\n\t\t\tSELECT\n\t\t\t\tcompany.name AS company_name,\n\t\t\t\tproduct.name AS subscription_name,\n\t\t\t\tproduct.price,\n\t\t\t\tproduct.twinfield_article,\n\t\t\t\tproduct.interval,\n\t\t\t\tsubscription.id,\n\t\t\t\tsubscription.type_id,\n\t\t\t\tsubscription.post_id,\n\t\t\t\tsubscription.name,\n\t\t\t\tsubscription.activation_date,\n\t\t\t\tDAYOFYEAR( subscription.activation_date ) AS activation_dayofyear,\n\t\t\t\tinvoice.invoice_number,\n\t\t\t\tinvoice.start_date AS invoice_start_date,\n\t\t\t\tinvoice.end_date AS invoice_end_date,\n\t\t\t\t(\n\t\t\t\t\tinvoice.id IS NULL\n\t\t\t\t\t\tAND\n\t\t\t\t\t$day_function( subscription.activation_date ) < $day_function( NOW() )\n\t\t\t\t) AS too_late\n\t\t\tFROM\n\t\t\t\t$wpdb->orbis_subscriptions AS subscription\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t$wpdb->orbis_companies AS company\n\t\t\t\t\t\tON subscription.company_id = company.id\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t$wpdb->orbis_subscription_products AS product\n\t\t\t\t\t\tON subscription.type_id = product.id\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t$wpdb->orbis_subscriptions_invoices AS invoice\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tsubscription.id = invoice.subscription_id\n\t\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t$join_condition\n\t\t\tWHERE\n\t\t\t\tcancel_date IS NULL\n\t\t\t\t\tAND\n\t\t\t\tproduct.auto_renew\n\t\t\t\t\tAND\n\t\t\t\tproduct.interval = %s\n\t\t\t\t\tAND\n\t\t\t\t$where_condition\n\t\t\tORDER BY\n\t\t\t\tDAYOFYEAR( subscription.activation_date )\n\t\t\t;\n\t\t\",\n\t\t$interval\n\t);\n\n\tglobal $orbis_subscriptions_to_invoice;\n\n\t$orbis_subscriptions_to_invoice = $wpdb->get_results( $query );\n\n\tob_start();\n\t\n\t$orbis_subscriptions_plugin->plugin_include( 'templates/subscriptions-to-invoice.php' );\n\t\n\t$return = ob_get_contents();\n\t\n\tob_end_clean();\n\t\n\treturn $return;\n}", "title": "" }, { "docid": "36deff44aa3eb1beca19cc38dbb3cd4a", "score": "0.46813068", "text": "public function addBooking(PeriodInterface $period);", "title": "" }, { "docid": "ebeec52641e183ed66f0769c47c1cba3", "score": "0.46808958", "text": "public function toSubscriptionPlan(): SubscriptionPlanContract;", "title": "" }, { "docid": "3d54c7e652227be9daf95f8f0937febc", "score": "0.4679849", "text": "public static function _register()\n {\n self::assignElements([\n 'AccountState' => ['type' => 'AccountStateCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'InvoicePayment' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'InvoiceCredit' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'InvoiceNewFee' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'AdditionalAccount' => ['type' => 'AdditionalAccountType', 'xmlns' => self::XMLNS, 'cardinality' => '0..*'],\n 'AmountPastDue' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'BankAccountInfo' => [],\n 'BankModifyDate' => [],\n 'BillingCycleDate' => ['type' => 'int'],\n 'CreditCardExpiration' => [],\n 'CreditCardInfo' => [],\n 'CreditCardModifyDate' => [],\n 'CurrentBalance' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'Email' => [],\n 'InvoiceBalance' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'InvoiceDate' => [],\n 'LastAmountPaid' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'LastPaymentDate' => [],\n 'PastDue' => ['type' => 'bool'],\n 'PaymentMethod' => ['type' => 'SellerPaymentMethodCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'NettedTransactionSummary' => ['type' => 'NettedTransactionSummaryType', 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "title": "" }, { "docid": "dc35a03073c24571ea9a8013c98aa774", "score": "0.46763426", "text": "public function test_subscription_created() {\n // Setup test data.\n $user = $this->getDataGenerator()->create_user();\n $course = $this->getDataGenerator()->create_course();\n $digestforum = $this->getDataGenerator()->create_module('digestforum', array('course' => $course->id));\n $user = $this->getDataGenerator()->create_user();\n $context = context_module::instance($digestforum->cmid);\n\n // Add a subscription.\n $record = array();\n $record['course'] = $course->id;\n $record['digestforum'] = $digestforum->id;\n $record['userid'] = $user->id;\n $subscription = $this->getDataGenerator()->get_plugin_generator('mod_digestforum')->create_subscription($record);\n\n $params = array(\n 'context' => $context,\n 'objectid' => $subscription->id,\n 'other' => array('digestforumid' => $digestforum->id),\n 'relateduserid' => $user->id,\n );\n\n $event = \\mod_digestforum\\event\\subscription_created::create($params);\n\n // Trigger and capturing the event.\n $sink = $this->redirectEvents();\n $event->trigger();\n $events = $sink->get_events();\n $this->assertCount(1, $events);\n $event = reset($events);\n\n // Checking that the event contains the expected values.\n $this->assertInstanceOf('\\mod_digestforum\\event\\subscription_created', $event);\n $this->assertEquals($context, $event->get_context());\n $expected = array($course->id, 'digestforum', 'subscribe', \"view.php?f={$digestforum->id}\", $digestforum->id, $digestforum->cmid);\n $this->assertEventLegacyLogData($expected, $event);\n $url = new \\moodle_url('/mod/digestforum/subscribers.php', array('id' => $digestforum->id));\n $this->assertEquals($url, $event->get_url());\n $this->assertEventContextNotUsed($event);\n\n $this->assertNotEmpty($event->get_name());\n }", "title": "" }, { "docid": "c037b42299ce0fc2488c2785e685c27e", "score": "0.46756253", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), $this->rules(), $this->messages());\n if($validator->fails()){\n return redirect('pledge/create')\n ->withErrors($validator)\n ->withInput();\n } else {\n\n $params = [];\n $pledge_code = $this->uniqidReal();\n $product_slip_no = DB::table('products')->whereYear('created_at', date(\"Y\"))->whereMonth('created_at', date(\"m\"))->count();\n $product_slip_no = $product_slip_no + 1;\n\n $xml = [\n 'pledge_code' => $pledge_code,\n 'personal_info' => [\n 'personal_code' => Crypt::decryptString($request->personal_code),\n 'personal_title_name' => $request->personal_title_name,\n 'personal_first_name' => $request->personal_first_name,\n 'personal_last_name' => $request->personal_last_name,\n 'personal_citizen_id' => $request->personal_citizen_id,\n ],\n 'products' => [\n 'pay_ref' => date(\"Ym\"),\n 'product_slip_no' => self::index_news_id($product_slip_no, 6),\n 'product_file_code' => $request->file_code\n ],\n 'periods' => [\n 'period_0' => [\n 'period' => 0,\n 'product_start_date'=> date('Y-m-d', strtotime($request->product_start_date)),\n 'billing_day' => intval(date('d', strtotime($request->product_start_date))),\n 'billing_date' => date('Y-m-d', strtotime($request->product_start_date)),\n 'due_date' => date('Y-m-d', strtotime($request->product_end_date)),\n 'capital' => $request->product_capital,\n 'payment' => 0,\n 'remaining_balance' => $request->product_capital,\n 'interest' => 0\n ]\n ]\n ];\n \n $xml_result = ArrayToXml::convert($xml, [\n 'rootElementName' => 'system_local',\n '_attributes' => [\n 'xmlns' => 'localhost://pawn.test',\n ],\n ], true, 'UTF-8');\n\n $params = [\n 'product_code' => $pledge_code,\n 'personal_code' => Crypt::decryptString($request->personal_code),\n 'product_name' => !empty($request->product_name) ? $request->product_name : \"\",\n 'product_detail' => !empty($request->product_detail) ? $request->product_detail : \"\",\n 'product_capital' => !empty($request->product_capital) ? $request->product_capital : 0,\n 'product_interest' => !empty($request->product_interest) ? $request->product_interest : 0,\n 'product_start_date'=> date('Y-m-d h:i:s', strtotime($request->product_start_date)),\n 'product_end_date' => date('Y-m-d h:i:s', strtotime($request->product_end_date)),\n 'product_xml' => $xml_result,\n 'is_active' => \"1\",\n 'created_at' => date('Y-m-d h:i:s'),\n 'created_by' => 'SYSTEM',\n 'updated_by' => 'SYSTEM',\n ];\n\n DB::beginTransaction();\n\n try {\n \n $result = DB::table('products')->insert($params);\n \n } catch(ValidationException $e) {\n \n DB::rollback();\n\n return redirect('pledge/create')\n ->withErrors($e->getErrors())\n ->withInput();\n\n } catch (\\Exception $e) {\n\n DB::rollback();\n throw $e;\n }\n\n DB::commit();\n \n return redirect()->route('pages.pledge.index');\n }\n }", "title": "" }, { "docid": "7422fea00151d1dd21ab3f704a808c5c", "score": "0.4674495", "text": "public function create() {\n \n\t\t$xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?>' . \"\\n\";\n\n\t\t$xml .= '<rss version=\"2.0\" ' . 'xmlns:atom=\"http://www.w3.org/2005/Atom\" ' . '>' . \"\\n\";\n\n\t\t// channel required properties\n\t\t$xml .= '<channel>' . \"\\n\";\n\t\t$xml .= '<title>' . $this->channel_properties[\"title\"] . '</title>' . \"\\n\";\n\t\t$xml .= '<link>' . $this->channel_properties[\"link\"] . '</link>' . \"\\n\";\n\t\t$xml .= '<description>' . $this->channel_properties[\"description\"] . '</description>' . \"\\n\";\n\t\t$xml .= '<atom:link href=\"http://gnj.org.pl/_rss/rss.php\" rel=\"self\" type=\"application/rss+xml\" />' . \"\\n\";\n\n\t\t// channel optional properties\n\t\tif(array_key_exists(\"language\", $this->channel_properties)) {\n\t\t\t$xml .= '<language>' . $this->channel_properties[\"language\"] . '</language>' . \"\\n\";\n\t\t}\n\t\t\n\t\tif(array_key_exists(\"image_title\", $this->channel_properties)) {\n\t\t\t$xml .= '<image>' . \"\\n\";\n\t\t\t$xml .= '<title>' . $this->channel_properties[\"image_title\"] . '</title>' . \"\\n\";\n\t\t\t$xml .= '<link>' . $this->channel_properties[\"image_link\"] . '</link>' . \"\\n\";\n\t\t\t$xml .= '<url>' . $this->channel_properties[\"image_url\"] . '</url>' . \"\\n\";\n\t\t\t$xml .= '</image>' . \"\\n\";\n\t\t}\n\n\t\t// get RSS channel items\n\t\twhile ($rss_item = $this->items->fetch_assoc()) {\n\t\t\t$xml .= '<item>' . \"\\n\";\n\t\t\t$xml .= '<title>' . $rss_item['title'] . '</title>' . \"\\n\";\n\t\t\t$xml .= '<link>' . 'http://gnj.org.pl/_php/show.php?id=' . $rss_item['id'] . '</link>' . \"\\n\";\n\t\t\t$xml .= '<guid>' . 'http://gnj.org.pl/_php/show.php?id='. $rss_item['id'] . '</guid>' . \"\\n\";\n\t\t\t$xml .= '<description>' . $rss_item['subtitle'] . '</description>' . \"\\n\";\n\t\t\t//$xml .= '<pubDate>' . $rss_item['pubDate'] . '</pubDate>' . \"\\n\";\n\t\t\t//$xml .= '<category>' . $rss_item['category'] . '</category>' . \"\\n\";\n\t\t\t//$xml .= '<source>' . $rss_item['source'] . '</source>' . \"\\n\";\n\t\t\t$xml .= '</item>' . \"\\n\";\n\t\t}\n\n\t\t$xml .= '</channel>';\n\n\t\t$xml .= '</rss>';\n\n\t\techo $xml;\n\t}", "title": "" }, { "docid": "07a7dc755014d7cda5c240070fba3680", "score": "0.4672466", "text": "public function flat()\n {\n $subscription['id'] = $this->id;\n $subscription['title'] = $this->title;\n $subscription['description'] = $this->description;\n $subscription['context'] = $this->context;\n $subscription['type'] = $this->type;\n $subscription['visibility'] = $this->visibility;\n $subscription['visibilityFrom'] = $this->visibilityFrom;\n $subscription['visibilityTo'] = $this->visibilityTo;\n $subscription['isVisible'] = isSubscriptionVisible( $this->visibility );\n $subscription['isAvailable'] = isSubscriptionAvailable( $this->visibilityFrom, $this->visibilityTo );\n $subscription['lock'] = $this->lock;\n $subscription['slotsAvailable'] = $this->slotsAvailable;\n $subscription['totalSlotsAvailable'] = $this->totalSlotsAvailable;\n \n return $subscription;\n }", "title": "" }, { "docid": "9697b80b7e2648e02b414bb56c875c56", "score": "0.46703076", "text": "private function createCreateForm(MemberSubscription $entity)\n {\n $form = $this->createForm(new MemberSubscriptionType(), $entity, array(\n 'action' => $this->generateUrl('admin_subscription_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "title": "" }, { "docid": "09077a8d7b5939dd3d71a5c4c8bc49a4", "score": "0.46471068", "text": "public function create()\n {\n $title = 'Contest';\n $titles = 'Contests';\n $plan = auth()->user()->subscriptions()->first();\n\n // if($plan->stripe_plan == 'Basic' && !is_null($plan->ends_at)){\n // $sub_end_date = new Carbon($plan->ends_at);\n // }elseif (in_array($plan->stripe_plan, ['Gold','Premium']) && !is_null($plan->ends_at)) {\n // # code...\n // }\n if(!is_null(auth()->user()->subscriptions[0]->ends_at)){\n $sub_start_date = auth()->user()->subscriptions[0]->ends_at;\n $carbon_sub_date = new Carbon($sub_start_date);\n \n }elseif($plan->stripe_plan != 'Basic'){\n $sub_start_date = auth()->user()->subscriptions[0]->created_at;\n $carbon_sub_date = new Carbon($sub_start_date);\n\n $sub_duration = auth()->user()->plan->duration;\n $duration = explode(',',$sub_duration);\n\n if($duration[1] == \"day\"){\n $carbon_sub_date->addDays($duration[0]);\n }elseif($duration[1] == \"week\"){\n $carbon_sub_date->addWeeks($duration[0]);\n }elseif($duration[1] == \"month\"){\n $carbon_sub_date->addMonth($duration[0]);\n }elseif($duration[1] == \"year\"){\n $carbon_sub_date->addYear($duration[0]);\n }\n }else{\n $carbon_sub_date = null;\n }\n \n \n\n return view('account.contests.create',compact('title','titles','carbon_sub_date'));\n }", "title": "" }, { "docid": "75f1501570d6a2ad841498f89c24976e", "score": "0.46349865", "text": "protected function _construct() {\n parent::_construct();\n $this->setId('md_product_subscription');\n }", "title": "" }, { "docid": "b9e0e031269dc98d38ec4c1d696e2334", "score": "0.46215385", "text": "public function canCreateNewSubscription()\n {\n // Assert\n $customer = Ezypay::createCustomer();\n $subscription = Ezypay::createSubscription($customer['id']);\n\n $this->assertNotNull($subscription['id']);\n }", "title": "" }, { "docid": "198e493c6c8f3d295aa169150c3f938a", "score": "0.4613263", "text": "public function build ( $document, $root, $MSGID, $transactionNumber, $debtorname, $price )\n\t\t{\n\t\t\t$groupHeaderTag = $document->createElement( 'GrpHdr' );\n\t\t\t$messageId = $document->createElement( 'MsgId', $MSGID );\n\t\t\t$groupHeaderTag->appendChild( $messageId );\n\t\t\t$creationDateTime = $document->createElement(\n\t\t\t\t'CreDtTm',\n\t\t\t\t$this->creationDate->format( 'Y-m-d\\TH:i:s\\Z' )\n\t\t\t);\n\t\t\t$groupHeaderTag->appendChild( $creationDateTime );\n\t\t\t$groupHeaderTag->appendChild( $document->createElement( 'NbOfTxs', $transactionNumber ) );\n\t\t\t$groupHeaderTag->appendChild(\n\t\t\t\t$document->createElement( 'CtrlSum', $price )\n\t\t\t);\n\n\t\t\t$initiatingParty = $document->createElement( 'InitgPty' );\n\t\t\t$initiatingPartyName = $document->createElement( 'Nm', StringHelpers::sanitizeString( $debtorname ) );\n\t\t\t$initiatingParty->appendChild( $initiatingPartyName );\n\t\t\t$groupHeaderTag->appendChild( $initiatingParty );\n\t\t\t$root->appendChild( $groupHeaderTag );\n\t\t\t$root->appendChild( $groupHeaderTag );\n\t\t}", "title": "" }, { "docid": "ef0b71421415cb119fad729f56afe01a", "score": "0.46118113", "text": "public function element( ) : \\DOMElement\n {\n $el = $this->feed->getDocument( )->createElement( 'rawvoice:subscribe' );\n foreach ( $this->links as $type => $url ) {\n $el->setAttribute($type, $url);\n }\n return $el;\n }", "title": "" }, { "docid": "6f377d46716968a5767e00b48d34b506", "score": "0.46085218", "text": "public function add_subscription( $shop_id , $year , $month , $type , $n_months = 1)\r\n\t {\r\n\t \t\t$type = strtolower($type);\r\n\t \t\t\r\n\t \t\t$account_plans = $this->config->item('account_plans');\r\n\t \t\t\r\n\t \t\tif( ! in_array($type , $account_plans) )\r\n\t \t\t\treturn False;\r\n\t \t\t$sub = $this->config->item($type . '_plan' );\r\n\t \t\tif( is_null($sub))\r\n\t \t\t\treturn False;\r\n\t \t\t$sub['year'] = $year;\r\n\t \t\t$sub['month'] = $month;\r\n\t \t\t$sub['type'] = $type;\r\n\t \t\t$sub['shop_id'] = $shop_id;\r\n\r\n\t \t\t//unset extra data\r\n\t \t\tunset($sub['name']);\r\n\t \t\tunset($sub['amount_year']);\r\n\t \t\t//check if available\r\n\t \t\tif( $this->is_subscribed( $shop_id , $year , $month ) )\r\n\t \t\t{\r\n\t \t\t\treturn False;\r\n\t \t\t\t//cannot pay for period already paid for\r\n\t \t\t\t//use upgrade instead\r\n\t \t\t}\r\n\t \t\t$this->db->insert('shop_account_subscription' , $sub );\r\n\t \t\t$id = $this->db->insert_id();\r\n\t \t\treturn ( $id > 0 )? $id : False;\r\n\t }", "title": "" }, { "docid": "d2bccdcba9f58ecaca4d1ea477522c4a", "score": "0.46066126", "text": "public function createSubscription(array $data){\n\n // Check if customer is availible.\n if($this->customer == null)\n throw new \\Exception('Please assign a customer to this subscription.');\n \n // TO DO: Figure out a clever way to get customer's stripe ID stored in this library.\n // if($this->customer->stripe_id == null || $this->customer->stripe_id == '')\n // \n\n if(!array_key_exists('items', $data) && !array_key_exists('plan', $data['items']))\n throw new \\Exception('A plan is required in order to subscribe a customer.');\n \n if(array_key_exists('source', $data)){\n\n if(!array_key_exists($data['source'], 'object'))\n throw new \\Exception('A plan is required in order to subscribe a customer.');\n\n if(!array_key_exists($data['source'], 'number'))\n throw new \\Exception('The card number, as a string, without any separators is required.');\n \n if(!array_key_exists($data['source'], 'exp_month'))\n throw new \\Exception('Two-digit number representing the card\\'s expiration month. is required.');\n \n if(!array_key_exists($data['source'], 'exp_year'))\n throw new \\Exception('Two- or four-digit number representing the card\\'s expiration year. is required.');\n \n if(!array_key_exists($data['source'], 'cvc'))\n throw new \\Exception('Card security code is required.');\n \n if(!array_key_exists($data['source'], 'currency'))\n $data['source']['currency'] = $this->attributes['currency']; \n \n }\n\n $data['customer'] = $this->customer->stripe_id;\n\n $this->response = \\Stripe\\Subscription::create($data);\n\n return $this;\n\n }", "title": "" }, { "docid": "c5af8a3c89a818e5759d78be6737092c", "score": "0.46056142", "text": "public function createStatusXML()\n {\n return $this->requestDataMapper->createStatusRequestData($this->account, $this->order);\n }", "title": "" }, { "docid": "656894c5faa46b7679c6f142327e9428", "score": "0.45956808", "text": "protected function _create ()\n {\n parent::_create ();\n\n $parent = $this->parent_folder ();\n\n if (! isset ($parent))\n {\n $sec = $this->security_definition ();\n $sec->set_inherited (false);\n }\n else\n {\n $subscriber_query = $parent->subscriber_query ();\n /** @var SUBSCRIBER[] $objects */\n $objects = $subscriber_query->objects ();\n foreach ($objects as $obj)\n {\n $obj->subscribe ($this->id, Subscribe_folder);\n }\n }\n }", "title": "" }, { "docid": "e908a8445b9c0fab633ce6bb14e4a8e7", "score": "0.45925364", "text": "function gen_xml() {\r\n\t\tglobal $app_strings, $pieChartColors, $current_user;\r\n\r\n\t\t$cache_file_name = $this->get_cache_file();\r\n\t\tif (!file_exists($cache_file_name) || $this->refresh) {\r\n\t\t\t$kDelim = $current_user->getPreference('num_grp_sep');\r\n\r\n\t\t\textract($this->gen_data());\r\n\r\n\r\n\t\t\t$fileContents = '';\r\n\t\t\t$fileContents .= ' <pie defaultAltText=\"'.translate('LBL_ROLLOVER_WEDGE_DETAILS', 'Charts').'\" legendStatus=\"on\">'.\"\\n\";\r\n\r\n\t\t\t$i=0;\r\n\t\t\tforeach ($legends as $lead_source_key=>$translation) {\r\n\t\t\t\tif ($lead_source_key == '') {\r\n\t\t\t\t\t$lead_source_key = translate('NTC_NO_LEGENDS', 'Charts');\r\n\t\t\t\t\t$translation = translate('NTC_NO_LEGENDS', 'Charts');\r\n\t\t\t\t}\r\n\t\t\t\tif(!isset($leadSourceArr[$lead_source_key])) {\r\n\t\t\t\t\t$leadSourceArr[$lead_source_key] = $lead_source_key;\r\n\t\t\t\t\t$leadSourceArr[$lead_source_key]['sum'] = 0;\r\n\t\t\t\t}\r\n\t\t\t\t$color = $this->generate_graphcolor($lead_source_key,$i);\r\n\t\t\t\t$fileContents .= ' <wedge title=\"'.$translation.'\" kDelim=\"'.$kDelim.'\" value=\"'.$leadSourceArr[$lead_source_key]['sum'].'\" color=\"'.$color.'\" labelText=\"'.currency_format_number($leadSourceArr[$lead_source_key]['sum'], array('currency_symbol' => false)).'\" url=\"index.php?module=Opportunities&action=index&lead_source='.urlencode($lead_source_key).'&query=true&searchFormTab=advanced_search\" altText=\"'.format_number($leadSourceArr[$lead_source_key]['opp_count'], 0, 0).' '.translate('LBL_OPPS_IN_LEAD_SOURCE', 'Charts').' '.$translation.'\"/>'.\"\\n\";\r\n\t\t\t\tif(isset($leadSourceArr[$lead_source_key])){$total += $leadSourceArr[$lead_source_key]['sum'];}\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\r\n\t\t\t$fileContents .= ' </pie>'.\"\\n\";\r\n\t\t\t$fileContents .= ' <graphInfo>'.\"\\n\";\r\n\t\t\t$fileContents .= ' <![CDATA[]]>'.\"\\n\";\r\n\t\t\t$fileContents .= ' </graphInfo>'.\"\\n\";\r\n\t\t\t$fileContents .= ' <chartColors ';\r\n\t\t\tforeach ($pieChartColors as $key => $value) {\r\n\t\t\t\t$fileContents .= ' '.$key.'='.'\"'.$value.'\" ';\r\n\t\t\t}\r\n\t\t\t$fileContents .= ' />'.\"\\n\";\r\n\t\t\t$fileContents .= '</graphData>'.\"\\n\";\r\n\t\t\t$total = round($total, 2);\r\n\t\t\t$title = translate('LBL_TOTAL_PIPELINE', 'Charts').currency_format_number($total, array('currency_symbol' => true)).$app_strings['LBL_THOUSANDS_SYMBOL'];\r\n\t\t\t$fileContents = '<graphData title=\"'.$title.'\" subtitle=\"'.$subtitle.'\">'.\"\\n\" . $fileContents;\r\n\t\t\t$GLOBALS['log']->debug(\"total is: $total\");\r\n\t\t\tif ($total == 0) {\r\n\t\t\t\treturn (translate('ERR_NO_OPPS', 'Charts'));\r\n\t\t\t}\r\n\r\n\t\t\t$this->save_xml_file($cache_file_name, $fileContents);\r\n\t\t}\r\n\t\treturn $cache_file_name;\r\n\t}", "title": "" }, { "docid": "ada22434d9d134d7e9d5e66aa71a655c", "score": "0.45905852", "text": "function MakePayment($billing_system, $amount, $currency, $id_trunzaction, $product_name, $adv_arr='') {\n\tglobal $dbconn, $config;\n\n\t\t$strSQL = \" SELECT ccbill_sub_id FROM \".BILLING_PERIODS_CCBILL_TABLE.\" WHERE id_group_period='\".intval($_REQUEST[\"period_id\"]).\"' \";\n\t\t$rs = $dbconn->Execute($strSQL);\n\t\t$subscription_type_id = $rs->fields[0];\n\n\t\t$rs_sys = $dbconn->Execute(\"SELECT seller_id, seller_sub_id, form_name, lang as language FROM \".BILLING_SYS_.$billing_system);\n\t\t$row = $rs_sys->GetRowAssoc(false);\n\t\t$payGear = new Payment_Engine(PAYMENT_ENGINE_SEND, false, false);\n\t\t$PaySystem = &$payGear->factory($billing_system);\n\t\t$pay_data = array(\n\t\t\t'seller_id' => $row[\"seller_id\"],\n\t\t\t'seller_sub_id'\t=> $row[\"seller_sub_id\"],\n\t\t\t'form_name'\t\t=> $row[\"form_name\"],\n\t\t\t'language'\t\t=> $row[\"language\"],\n\t\t\t'allowed_types' => $subscription_type_id,\n\t\t\t'order_id' \t\t=> $id_trunzaction,\n\t\t\t'subscription_type_id' => $subscription_type_id\n\t\t);\n\n\t\t$PaySystem->setOptions($pay_data);\n\t\t$PaySystem->doPayment();\n}", "title": "" }, { "docid": "385f628f9063d88d8c5a57409e42b57a", "score": "0.4590457", "text": "public function createSubscription()\n {\n if ( !$this->subscriber->model->event->hasAvailableSeats() ) {\n\n // If No Seats Available, Set user status to Waiting List\n $this->subscriber->messages->add('errors', 'No Seats Available');\n\n return $this->subscriber->setSubscriptionState($this->subscriber->getWaitingState());\n }\n\n // check whether already subscribed\n if ( !$this->subscriber->model->subscriptionConfirmed() ) {\n\n if ( $this->checkInvalidRegistrationType() ) {\n // @todo : more efficient way to determine the free or paid event\n if ( $this->subscriber->model->event->isFreeEvent() ) {\n // Free Event\n return $this->subscriber->setSubscriptionState($this->subscriber->getConfirmedState());\n } else {\n // Paid Event\n return $this->subscriber->setSubscriptionState($this->subscriber->getPaymentState());\n }\n }\n } else {\n return $this->subscriber->setSubscriptionState($this->subscriber->getPaymentState());\n }\n\n }", "title": "" }, { "docid": "87a366a55f7831fccdcdac1720b817be", "score": "0.45889756", "text": "function CreateRecurringPaymentsProfile($DataArray)\r\n {\r\n $NVPRequest = $this->_API;\r\n $NVPRequest['METHOD'] = 'CreateRecurringPaymentsProfile';\r\n $NVPRequest['VERSION'] = self::$_version;\r\n $NVPRequest['TOKEN'] = $DataArray['token'];\r\n $NVPRequest['PayerID'] = $DataArray['payer_id'];\r\n $NVPRequest['AMT'] = $DataArray['amount'];\r\n $NVPRequest['DESC'] = $DataArray['descriptions'];\r\n\r\n $NVPRequest['BILLINGPERIOD'] = (isset($DataArray['period']) && !empty($DataArray['period'])?$DataArray['period']:'Month');\r\n $NVPRequest['BILLINGFREQUENCY'] = (isset($DataArray['frequency']) && !empty($DataArray['frequency'])?$DataArray['frequency']:1);\r\n $NVPRequest['CURRENCYCODE'] = (isset($DataArray['currency']) && !empty($DataArray['currency'])?$DataArray['currency']:'USD');\r\n \r\n $NVPRequest['MAXFAILEDPAYMENTS'] = (isset($DataArray['reattempt']) && !empty($DataArray['reattempt'])?$DataArray['reattempt']:3);\r\n $NVPRequest['PROFILESTARTDATE'] = (isset($DataArray['profile_start']) && !empty($DataArray['profile_start'])?$DataArray['profile_start']:gmdate( 'Y-m-d\\TH:i:s\\Z'));\r\n if(isset($DataArray['total_cycle']) && !empty($DataArray['total_cycle'])){\r\n $NVPRequest['TOTALBILLINGCYCLES'] = $DataArray['total_cycle'];\r\n }\r\n if(isset($DataArray['country']) && !empty($DataArray['country'])){\r\n $NVPRequest['COUNTRYCODE'] = $DataArray['country'];\r\n }\r\n\r\n $NVPResponse = $this->CURLRequest($NVPRequest);\r\n $NVPResponseArray = $this->NVPToArray($NVPResponse);\r\n \r\n $Errors = $this->GetErrors($NVPResponseArray);\r\n\r\n //$this->Logger($this->LogPath, __FUNCTION__.'Request', $this->MaskAPIResult($NVPRequest));\r\n //$this->Logger($this->LogPath, __FUNCTION__.'Response', $NVPResponse);\r\n \r\n if(!empty($Errors))\r\n {\r\n $NVPResponseArray['ERRORS'] = true; \r\n }\r\n //$NVPResponseArray['ERRORS'] = $Errors;\r\n\r\n \r\n return $NVPResponseArray; \r\n }", "title": "" }, { "docid": "af4cdc00d5b181821133620ce5e36e51", "score": "0.4587157", "text": "abstract protected function _buildRequestXml();", "title": "" }, { "docid": "42685e4c71b6aeb80f171d9deddb595e", "score": "0.45851722", "text": "public function add_subscription_item($invnum, $num, $desc, $price, $startdate, $joining, $billing_cycle = '1', $billing_cycle_basis='y', $extra_days='0', $joining_fee)\n\t{\n\t\t$num=0;\n\t\t$this->add_field('CURRENCYCODE', $this->fields['PAYMENTREQUEST_0_CURRENCYCODE']);\n\t\t$this->add_field(\"L_BILLINGTYPE{$num}\",'RecurringPayments');\n\t\t$this->add_field(\"L_BILLINGAGREEMENTDESCRIPTION{$num}\", $desc);\n\t\t$this->add_field(\"DESC\", $desc);\n\t\t$this->add_field('PROFILESTARTDATE', gmdate('c', $startdate));\n\t\t$this->add_field('PROFILEREFERENCE', $invnum);\n\t\t$this->add_field(\"PAYMENTREQUEST_0_DESC{$num}\", $desc);\n\t\t$this->add_field(\"PAYMENTREQUEST_0_CURRENCYCODE{$num}\", $this->fields[\"PAYMENTREQUEST_0_CURRENCYCODE\"]);\n\t\t$this->add_field(\"PAYMENTREQUEST_0_ITEMCATEGORY{$num}\", 'Digital');\n\t\t$this->add_field(\"PAYMENTREQUEST_0_NAME{$num}\", 'Online Membership');\n\t\t$this->add_field(\"PAYMENTREQUEST_0_QTY{$num}\", 1);\n\t\t$this->add_field(\"PAYMENTREQUEST_0_AMT{$num}\", sprintf(\"%01.2f\", $price));\n\t\t$this->add_field('PAYMENTREQUEST_0_AMT', sprintf(\"%01.2f\", $price));\n\t\t\t\t\n\t\t$billing_periods = array(\n\t\t\t'd' => 'Day',\n\t\t\t'w' => 'Week',\n\t\t\t'm' => 'Month',\n\t\t\t'y' => 'Year'\n\t\t\t);\n\t\t$this->add_field('BILLINGPERIOD', $billing_periods[$billing_cycle_basis]);\n\t\t$this->add_field('BILLINGFREQUENCY', $billing_cycle);\n\t\tif ($extra_days>0)\n\t\t{\n\t\t\t$this->add_field('TRIALBILLINGFREQUENCY', $extra_days);\n\t\t\t$this->add_field('TRIALBILLINGPERIOD', 'Day');\n\t\t\t$this->add_field('TRIALTOTALBILLINGCYCLES', 1);\n\t\t}\n\n\t\tif($joining && $joining_fee>0)\n\t\t\t{\n\t\t\t$this->add_field('INITAMT', sprintf(\"%01.2f\", $joining_fee));\n\t\t\t$this->add_field('FAILEDINITAMTACTION', 'CancelOnFailure');\n\t\t}\n\n\t\t$this->preserve_shopping_basket();\n\t}", "title": "" }, { "docid": "09c08e520ae582be3c2d69221a83d3d6", "score": "0.45819604", "text": "public function create($token = null, array $options = [])\n {\n $customer = $this->getStripeCustomer($token, $options);\n\n $stripeSubscription = $customer->subscriptions->create($this->buildPayload());\n\n if ($this->skipTrial) {\n $trialEndsAt = null;\n } else {\n $trialEndsAt = $this->trialExpires;\n }\n \n // registers the subscription\n $subscription = $this->owner->subscriptions()->create([\n 'name' => $this->name,\n 'stripe_id' => $stripeSubscription->id,\n 'stripe_plan' => '',\n 'quantity' => 0,\n 'trial_ends_at' => $trialEndsAt,\n 'ends_at' => null,\n ]);\n \n // registers the subscription's items\n foreach ($stripeSubscription->items->data as $item) {\n $subscription->subscriptionItems()->create([\n 'stripe_id' => $item['id'],\n 'stripe_plan' => $item['plan']['id'],\n 'quantity' => $item['quantity'],\n ]);\n }\n \n return $subscription;\n }", "title": "" }, { "docid": "e72d8959105f4b20de3568972eacbcd3", "score": "0.4580361", "text": "public function subscribe_period( $shop_id , $months , $type )\r\n\t {\r\n\t \t\t$year = date('Y');\r\n\t \t\t$current_month = date('m');\r\n\t \t\t$month = $current_month;\r\n\t \t\t$ids = array();\r\n\r\n\t \t\tfor( $x = 0 ; $x < $months ; $x++ )\r\n\t \t\t{\r\n\t \t\t\t//subscribed for current month ?\r\n\t \t\t\tif( $this->is_subscribed($shop_id , $year , $month ) )\r\n\t \t\t\t{\r\n\t \t\t\t\t$x--;\r\n\t \t\t\t}\r\n\t \t\t\telse\r\n\t \t\t\t{\r\n\t \t\t\t\t//subscribe\r\n\t \t\t\t\t//@todo potential denial of service code\r\n\t \t\t\t\t$id = $this->add_subscription( $shop_id , $year , $month , $type , $x );\r\n\t \t\t\t\tif( $id == False )\r\n\t \t\t\t\t{\r\n\t \t\t\t\t\t$x--;\r\n\t \t\t\t\t\tcontinue;\r\n\t \t\t\t\t}\r\n\t \t\t\t\tarray_push( $ids , $id );\r\n\t \t\t\t}\r\n\t \t\t\tif( $month+1 > 12 )\r\n\t \t\t\t{\r\n\t \t\t\t\t$month = 0;\r\n\t \t\t\t\t$year += 1;\r\n\t \t\t\t}\r\n\t \t\t\t$month += 1;\r\n\t \t\t}\r\n\t \t\treturn $ids;\r\n\t }", "title": "" }, { "docid": "8973ecf4b37f6fe3a2ab2142a2702d6d", "score": "0.457813", "text": "function create_invoice($hostingid, $period) {\n\n // get client information\n $result = $this->db->query(\"\n\t\t\tSELECT `ra_user`.`id` AS clientid,\n\t\t\t\t`ra_user`.`firstname`,\n\t\t\t\t`ra_user`.`lastname`,\n\t\t\t\t`ra_user`.`companyname`,\n\t\t\t\t`ra_user`.`email`,\n\t\t\t\t`tblhosting`.`id` AS hostingid,\n\t\t\t\t`tblhosting`.`packageid`,\n\t\t\t\t`tblhosting`.`domain`,\n\t\t\t\t`tblhosting`.`username`,\n\t\t\t\t`tblhosting`.`paymentmethod`,\n\t\t\t\t`tblproducts`.`name` as product_name\t\t\t\t\n\t\t\t\n\t\t\tFROM `ra_user`\n\t\t\t\n\t\t\t\tINNER JOIN `tblhosting` ON `tblhosting`.`userid` = `ra_user`.`id`\n\t\t\t\tLEFT JOIN `tblproducts` ON `tblhosting`.`packageid` = `tblproducts`.`id`\n\t\t\t\n\t\t\tWHERE `tblhosting`.`packageid` IN (520, 560, 712, 738)\n\t\t\t\n\t\t\t\tAND `tblhosting`.`id` = '\" . $this->db->real_escape_string($hostingid) . \"'\n\t\t\t\n\t\t\tORDER BY `tblhosting`.`domain`\n\t\t\");\n $client = $result->fetch_assoc();\n\n // get domain freebies\n $result = $this->db->query(\"\n\t\t\tSELECT *\n\t\t\t\n\t\t\tFROM `mod_tolls_options`\n\t\t\");\n $freebies = array();\n while ($row = $result->fetch_assoc()) {\n $freebies[$row['hostingid']][$row['zone']] = $row;\n }\n\n // get usage data to bill for\n // MAX(`bill_rate`) because the first row of a category might be incoming,\n // which is usually free and so the rate would show up as 0.00 for that category\n $result = $this->db->query(\"\n\t\t\tSELECT SUBSTRING(`start`, 1, 7) AS start, `accountcode`,\n\t\t\t\tIF(`forward_category` IS NULL OR `forward_category` = '', `category`, `forward_category`) AS dependent_category,\n\t\t\t\tIF(`forward_subcategory` IS NULL OR `forward_subcategory` = '', `subcategory`, `forward_subcategory`) AS dependent_subcategory,\n\t\t\t\tMAX(`bill_rate`) AS bill_rate,\n\t\t\t\tSUM(`bill_amount`) AS total_bill, SUM(`billsec`) AS billsec,\n\t\t\t\tSUM(`used_included_secs`) AS freesec, COUNT(*) as total_calls\n\t\t\n\t\t\tFROM `mod_tolls_all_calls`\n\t\t\t\n\t\t\tWHERE `accountcode` = '\" . $client['hostingid'] . \"'\n\t\t\t\tAND `disposition` = 'ANSWERED'\n\t\t\t\tAND `start` LIKE '\" . $this->db->real_escape_string($period) . \"-%'\" . \"\n\t\t\t\n\t\t\tGROUP BY SUBSTRING(`start`, 1, 7), `dependent_category`\n\t\t\");\n $bills = array();\n while ($row = $result->fetch_assoc()) {\n $row['billsec_formatted'] = $this->format_sec2min($row['billsec']);\n $row['freesec_formatted'] = $this->format_sec2min($row['freesec']);\n $bills[$row['dependent_category']] = $row;\n }\n\n // this is what shows up on the end-user's RA invoice\n $x = array();\n $x[] = \"Service plan summary: \" . $client['product_name'];\n $x[] = \"SIP phone number: \" . $client['domain'];\n $x[] = \"Billing period: Month of \" . date('F Y', strtotime($period));\n\n // set the starting bill to 0.00\n $total_invoice_bill = 0.00;\n\n foreach ($bills as $category => $bill) {\n $x[] = \"\\n\" . strtoupper($category);\n if (@$freebies[$hostingid][$category]['freemins']) {\n $freebies[$hostingid][$category]['freesecs'] = $freebies[$hostingid][$category]['freemins'] * 60;\n $x[] = 'With ' . $freebies[$hostingid][$category]['freemins'] . ' free minutes (' . $this->format_sec2min($freebies[$hostingid][$category]['freesecs']) . ' of included time) per month:';\n $x[] = ' used a total of ' . $this->format_sec2min($bill['billsec'] + $bill['freesec']) . ' talktime';\n if (($freebies[$hostingid][$category]['freesecs'] - $bill['billsec'] - $bill['freesec']) < 0)\n $x[] = ' billed for remainder ' . $bill['billsec_formatted'] . ' @ $' . $bill['bill_rate'] . ' per minute: $' . $bill['total_bill'];\n else\n $x[] = ' no overage incurred: $0.00';\n }\n else {\n if ($category == \"toll-free\")\n $x[] = 'Used ' . $bill['billsec_formatted'] . ' of costless talktime';\n else\n $x[] = 'Billed for ' . $bill['billsec_formatted'] . (($category != \"international\") ? ' @ $' . $bill['bill_rate'] . ' per minute' : '') . ': $' . $bill['total_bill'];\n }\n // sum up each individual category bill\n $total_invoice_bill += $bill['total_bill'];\n }\n\n // do not create an official invoice if this month's usage accounts for 50c or less in charges\n // decided by Ben Simpson on 23/03/2013\n if ($total_invoice_bill < 0.50) {\n\n // log that the month has been processed but set invoice_id to null\n // without this we wouldn't know if we have dealt with this month before and\n // would end up re-invoicing every time the billing event is run\n $this->log_invoice($client['clientid'], $client['hostingid'], $period, $total_invoice_bill, null);\n\n // stop here, do not proceed with the rest of the method which deals with\n // official RA client invoicing\n return;\n }\n\n $postfields[\"itemdescription\"] = implode(\"\\n\", $x);\n\n $postfields[\"itemamount\"] = $total_invoice_bill;\n $postfields[\"itemtaxed\"] = 1;\n $postfields[\"userid\"] = $client['clientid'];\n $postfields[\"paymentmethod\"] = $client['paymentmethod'];\n\n /* * ** RA JSON API Sample Code *** */\n#\t\t$url = \"https://my.hd.net.nz/includes/api.php\"; # URL to RA API file goes here\n#\t\t$username = 'apihostingdirect'; # Admin username goes here\n#\t\t$password = 'fj237tG83F'; # Admin password goes here\n\n\n $url = $this->setting('api_url');\n $username = $this->setting('api_username');\n $password = $this->setting('api_password');\n\n $postfields[\"username\"] = $username;\n $postfields[\"password\"] = md5($password);\n $postfields[\"responsetype\"] = \"json\";\n\n $postfields[\"action\"] = \"createinvoice\";\n $postfields[\"date\"] = date('Ymd');\n $postfields[\"duedate\"] = date('Ymd', time() + (60 * 60 * 24 * 7));\n $postfields[\"sendinvoice\"] = true;\n\n #echo '<h1>API Post</h1><pre>' . print_r($postfields, true) . '</pre>'; exit;\n #return array('result'\t=> 'error', 'message'\t=> $message . ' Test');\n #return array('result'\t=> 'success', 'message'\t=> $message . ' Test');\n\n $query_string = \"\";\n foreach ($postfields as $k => $v)\n $query_string .= \"$k=\" . urlencode($v) . \"&\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $jsondata = curl_exec($ch);\n if (curl_error($ch))\n die(\"Connection Error: \" . curl_errno($ch) . ' - ' . curl_error($ch) . ' Err:#' . __LINE__);\n curl_close($ch);\n\n $arr = json_decode($jsondata, true); # Decode JSON String\n #echo '<pre>' . print_r($arr, true) . '</pre>'; # Output XML Response as Array\n\n if (isset($arr['result']) && $arr['result'] != \"error\") {\n $this->log_invoice($client['clientid'], $client['hostingid'], $period, $total_invoice_bill, $arr['invoiceid']);\n }\n }", "title": "" }, { "docid": "17fa513dc97f8c4b8f08342c9081f56b", "score": "0.45667163", "text": "function reportXML() {\n\t\t$this->validate();\n\t\t$plugin =& $this->plugin;\n\t\t$this->setupTemplate(true);\n\n\t\t$templateManager =& TemplateManager::getManager();\n\n\t\t$year = Request::getUserVar('year');\n\n\t\t$begin = \"$year-01-01\";\n\t\t$end = \"$year-12-01\";\n\n\t\t$this->_assignTemplateCounterXML($templateManager, $begin, $end);\n\n\t\t$templateManager->display($plugin->getTemplatePath() . 'reportxml.tpl', 'text/xml');\n\t}", "title": "" }, { "docid": "75a79e264d2859ae97ee2fe67bcc3205", "score": "0.4564091", "text": "public function create()\n {\n return View::make('admin.periodos.create');\n }", "title": "" }, { "docid": "99ce60380886cb1b577be96b415ab814", "score": "0.45595673", "text": "public function getPeriod() {\n require_once(\"Period.php\");\n return new Period($this->fenixEdu, $this->data->evaluationPeriod);\n }", "title": "" }, { "docid": "1f2cac67399f6e63dc79f50c8ac26faf", "score": "0.45585665", "text": "public function run()\n {\n factory(\\App\\Models\\SubscriptionPlan::class, 10)->create();\n }", "title": "" }, { "docid": "ff6b57151c007da527160428616e853e", "score": "0.45538077", "text": "public function getPeriod() {\n require_once(\"Period.php\");\n return new Period($this->fenixEdu, $this->data);\n }", "title": "" }, { "docid": "6986aec87968b47cd8f7ccd737e28162", "score": "0.45469987", "text": "public function testCreateAndUpdateProductWithSubscription(): void\n {\n $service = $this->buildProductService(\"[email protected]\", \"Windows.98\");\n\n $id = $service->createProduct(\n (new CreateProductCommand())\n ->setCode(\"product_with_sub_update1\")\n ->setSupplierReference('product_with_sub_ref')\n ->setName(\"Product with subscription\")\n ->setMainCategoryId(1)\n ->setGreenTax(0.)\n ->setTaxIds([1])\n ->setDeclinations(\n [\n (new ProductDeclinationUpsertData([]))\n ->setCode('product_with_sub')\n ->setPrice(3.5)\n ->setQuantity(12)\n ->setInfiniteStock(false),\n ]\n )\n ->setStatus(ProductStatus::ENABLED())\n ->setIsBrandNew(true)\n ->setWeight(0.)\n ->setFullDescription(\"Product with subscription full description\")\n ->setShortDescription(\"Product with subscription short description\")\n ->setIsSubscription(true)\n ->setIsRenewable(true)\n );\n\n static::assertTrue(\\is_int($id));\n\n $product = $service->getProductById($id);\n\n static::assertTrue($product->isSubscription());\n static::assertTrue($product->isRenewable());\n\n $service->updateProduct(\n (new UpdateProductCommand($id))\n ->setIsSubscription(false)\n ->setIsRenewable(false)\n );\n $product = $service->getProductById($id);\n\n static::assertFalse($product->isSubscription());\n static::assertFalse($product->isRenewable());\n }", "title": "" }, { "docid": "7cddc24331bede90a7172a1a76d571f9", "score": "0.4530689", "text": "abstract public function generateCollectionXml(SimpleXMLElement $pmtInf);", "title": "" }, { "docid": "392a73de30e325fbc09e1a18d62bcc85", "score": "0.45261472", "text": "protected function getPeriodWidget($attributes = array())\n {\n return new sfWidgetFormChoice($this->getOptionsFor('period'), $this->getAttributesFor('period', $attributes));\n }", "title": "" }, { "docid": "1f0577e7c79901d830a99c6071dba780", "score": "0.4524915", "text": "public function create()\r\n {\r\n $business_id = request()->input('business_id');\r\n $packages = Package::active()->orderby('sort_order')->pluck('name', 'id');\r\n\r\n $gateways = $this->_payment_gateways();\r\n\r\n return view('superadmin::superadmin_subscription.add_subscription')\r\n ->with(compact('packages', 'business_id', 'gateways'));\r\n }", "title": "" }, { "docid": "289320db2c0cf91996192869d75e0d43", "score": "0.45121288", "text": "public function postRegistrarperiodo()\n\t{\n\t\t$lapso = new Periodo;\n\t\t$p = Input::get('periodoAnio').Input::get('periodoLapso');\n\t\t$lapso -> periodo = $p;\n\t\t$lapso -> periodo_pedu = Input::get('periodoTipo');\n\t\t$lapso -> year = Input::get('periodoAnio');\n\t\t$lapso -> mes = Input::get('periodoLapso');\n\t\t$lapso -> descripcion = Input::get('periodoDescripcion');\n\t\t$lapso -> inicio = Input::get('periodoFechaInicio');\n\t\t$lapso -> fin = Input::get('periodoFechaFin');\n\t\t$lapso -> users_id = Input::get('periodoUsersId');\n\n\n\t\t$lapso -> save();\n\n\t\treturn $lapso;\n\t}", "title": "" }, { "docid": "0e68934021d7d6115b2e98930e937af5", "score": "0.45082572", "text": "public function create_subscription($item,$data,$config){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ea3c00cd3d18ce3ab767a6422cda3028", "score": "0.45082062", "text": "function dateBuildPeriods($origin, $endDate = null, $snap = true,\n $periods = null, &$cal, $marker) {\n\n global $MONTH_END_DAYS;\n\n $calArr = array();\n $endDate = (!$endDate) ? dateClean(dateMostRecentTradingDay()) : $endDate;\n $endDate = ($snap == true) ? dateFindNearest($endDate, $MONTH_END_DAYS, 0) : $endDate;\n\n\n for ($i = 0; $i < count($periods); $i++) {\n\n $tenor = $periods[$i] . $marker;\n\n if ($snap) {\n $d = dateDefineTenor($tenor, $periods[$i], $endDate, $cal);\n } else {\n switch ($marker) {\n case \"W\":\n $priors = \"-\" . $periods[$i] . \" weeks\";\n break;\n\n case \"M\":\n $priors = \"-\" . $periods[$i] . \" months\";\n break;\n\n case \"Y\":\n $mStr = $periods[$i];\n $priors = \"-\" . $mStr . \" years\";\n break;\n\n default:\n return ($ERROR);\n }\n $nMonthsPrior = strtotime($priors, strtotime(date(\"Y-m-d\", $endDate)));\n $d['tenor'] = $tenor;\n $d['dbField'] = \"p\" . $tenor;\n $d['start'] = dateFindNearest($nMonthsPrior, $TRADING_DAYS, 0);\n $d['end'] = $endDate;\n }\n\n if ($d['start'] >= $origin)\n $calArr[] = $d;\n }\n\n return ($calArr);\n}", "title": "" }, { "docid": "4a431fc5f0d389fc980fd10aeeea0d38", "score": "0.4504329", "text": "private function CreateTRA($SERVICE)\n{\n $TRA = new SimpleXMLElement(\n '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' .\n '<loginTicketRequest version=\"1.0\">'.\n '</loginTicketRequest>');\n $TRA->addChild('header');\n $TRA->header->addChild('uniqueId',date('U'));\n $TRA->header->addChild('generationTime',date('c',date('U')-60));\n $TRA->header->addChild('expirationTime',date('c',date('U')+60));\n $TRA->addChild('service',$SERVICE);\n $TRA->asXML(self::TRA);\n}", "title": "" }, { "docid": "b37006228d469906e4957fea743e9b9c", "score": "0.44948155", "text": "function __construct()\r\n\t\t{\r\n\t\t$MiniComponents = jomres_singleton_abstract::getInstance( 'mcHandler' );\r\n\t\tif ( $MiniComponents->template_touch )\r\n\t\t\t{\r\n\t\t\t$this->template_touchable = false;\r\n\r\n\t\t\treturn;\r\n\t\t\t}\r\n\t\t\r\n\t\t$siteConfig = jomres_singleton_abstract::getInstance( 'jomres_config_site_singleton' );\r\n\t\t$jrConfig = $siteConfig->get();\r\n\t\t\r\n\t\tif ( (int)$jrConfig[ 'useSubscriptions' ] != 1 )\r\n\t\t\treturn;\r\n\t\t\r\n\t\t$thisJRUser = jomres_singleton_abstract::getInstance( 'jr_user' );\r\n\t\t$jrportal_taxrate = jomres_singleton_abstract::getInstance( 'jrportal_taxrate' );\r\n\r\n\t\t$package_id = (int) jomresGetParam( $_REQUEST, 'package_id', 0 );\r\n\t\t\r\n\t\t//some checks\r\n\t\tif ( $package_id == 0 )\r\n\t\t\t{\r\n\t\t\t$jomres_messaging = jomres_singleton_abstract::getInstance( 'jomres_messages' );\r\n\t\t\t$jomres_messaging->set_message( jr_gettext( '_JRPORTAL_SUBSCRIPTIONS_SUBSCRIBING_ERROR_NOPACKAGEID', '_JRPORTAL_SUBSCRIPTIONS_SUBSCRIBING_ERROR_NOPACKAGEID', false ) );\r\n\t\t\tjomresRedirect( jomresURL( JOMRES_SITEPAGE_URL . \"&task=my_subscriptions\" ), \"\" );\r\n\t\t\texit;\r\n\t\t\t}\r\n\r\n\t\tif (\r\n\t\t\t$thisJRUser->firstname == \"\" &&\r\n\t\t\t$thisJRUser->surname == \"\" &&\r\n\t\t\t$thisJRUser->house == \"\" &&\r\n\t\t\t$thisJRUser->street == \"\" &&\r\n\t\t\t$thisJRUser->town == \"\" &&\r\n\t\t\t$thisJRUser->postcode == \"\" &&\r\n\t\t\t$thisJRUser->country == \"\" &&\r\n\t\t\t$thisJRUser->email == \"\"\r\n\t\t\t)\r\n\t\t\t{\r\n\t\t\tjomresRedirect( jomresURL( JOMRES_SITEPAGE_URL . \"&task=subscribe&id=\" . $package_id ), \"\" );\r\n\t\t\texit;\r\n\t\t\t}\r\n\r\n\t\t//get subscription package details\r\n\t\tjr_import('jrportal_subscriptions');\r\n\t\t$jrportal_subscriptions = new jrportal_subscriptions();\r\n\t\t$jrportal_subscriptions->package['id'] = $package_id;\r\n\r\n\t\tif ( !$jrportal_subscriptions->getSubscriptionPackage() )\r\n\t\t\t{\r\n\t\t\t$jomres_messaging = jomres_singleton_abstract::getInstance( 'jomres_messages' );\r\n\t\t\t$jomres_messaging->set_message( jr_gettext( '_JRPORTAL_SUBSCRIPTIONS_SUBSCRIBING_ERROR_NOPACKAGEID', '_JRPORTAL_SUBSCRIPTIONS_SUBSCRIBING_ERROR_NOPACKAGEID', false ) );\r\n\t\t\tjomresRedirect( jomresURL( JOMRES_SITEPAGE_URL . \"&task=my_subscriptions\" ), \"\" );\r\n\t\t\texit;\r\n\t\t\t}\r\n\r\n\t\t// Now we need to check and see if this is a freebie package (costs 0). If so, we then need to see if the subscriber is already subscribed to it.\r\n\t\t$subscribing_to_freebie = false;\r\n\t\tif ($jrportal_subscriptions->package['full_amount'] == 0.00)\r\n\t\t\t$subscribing_to_freebie = true;\r\n\r\n\t\t//get this user existing subscriptions\r\n\t\t$jrportal_subscriptions->getSubscriptionsForCmsUserId( $thisJRUser->id );\r\n\r\n\t\t//check if the user is subscribed to freebie\r\n\t\tif ( !empty($jrportal_subscriptions->userSubscriptions) )\r\n\t\t\t{\r\n\t\t\tforeach ( $jrportal_subscriptions->userSubscriptions as $sub )\r\n\t\t\t\t{\r\n\t\t\t\tif ( $package_id == $sub->package_id ) //user is already subscribed to this package, no matter if it`s free or not, so we`ll recommend renewals instead.\r\n\t\t\t\t\t{\r\n\t\t\t\t\t$jomres_messaging = jomres_singleton_abstract::getInstance( 'jomres_messages' );\r\n\t\t\t\t\t$jomres_messaging->set_message( jr_gettext( '_SUBSCRIPTIONS_HALREADY_SUBSCRIBED', '_SUBSCRIPTIONS_HALREADY_SUBSCRIBED', false ) );\r\n\t\t\t\t\tjomresRedirect( jomresURL( JOMRES_SITEPAGE_URL . \"&task=my_subscriptions\" ), \"\" );\r\n\t\t\t\t\texit;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t//user has already subscribed to some package, so he should use renewals instead\r\n\t\t\t$jomres_messaging = jomres_singleton_abstract::getInstance( 'jomres_messages' );\r\n\t\t\t$jomres_messaging->set_message( jr_gettext( '_SUBSCRIPTIONS_HALREADY_SUBSCRIBED', '_SUBSCRIPTIONS_HALREADY_SUBSCRIBED', false ) );\r\n\t\t\tjomresRedirect( jomresURL( JOMRES_SITEPAGE_URL . \"&task=my_subscriptions\" ), \"\" );\r\n\t\t\texit;\r\n\t\t\t}\r\n\r\n\t\t//set the new subscription details\r\n\t\t$jrportal_subscriptions->subscription['cms_user_id'] = $thisJRUser->id;\r\n\t\t$jrportal_subscriptions->subscription['package_id'] = $package_id;\r\n\t\t$jrportal_subscriptions->subscription['raised_date'] \t= date(\"Y-m-d H:i:s\");\r\n\t\t$jrportal_subscriptions->subscription['expiration_date']= date(\"Y-m-d H:i:s\", strtotime(\"+\" . (string)$jrportal_subscriptions->package['frequency'] . \" days\"));\r\n\t\t$jrportal_subscriptions->subscription['status'] = 0;\r\n\r\n\t\t//commit the new subscription\r\n\t\t$jrportal_subscriptions->commitSubscription();\r\n\r\n\t\t//set the new invoice details\r\n\t\tjr_import( 'jrportal_invoice' );\r\n\t\t$jrportal_invoice = new jrportal_invoice();\r\n\t\t\r\n\t\t$invoice_data = array();\r\n\t\t$invoice_data['cms_user_id'] \t\t= $thisJRUser->id;\r\n\t\t$invoice_data['currencycode'] \t\t= $jrportal_subscriptions->package['currencycode'];\r\n\t\t$invoice_data['subscription']\t\t= 1;\r\n\t\t$invoice_data['subscription_id'] \t= $jrportal_subscriptions->subscription['id'];\r\n\t\t$invoice_data['status']\t\t\t \t= 3; //pending\r\n\t\t\r\n\t\t//set the price depending if it includes tax or not\r\n\t\t$tax_rate = (float)$jrportal_taxrate->taxrates[ $jrportal_subscriptions->package['tax_code_id'] ][ 'rate' ];\r\n\t\t\r\n\t\tif ((int)$jrConfig[ 'subscriptionPackagePriceIncludesTax' ] == 1)\r\n\t\t\t{\r\n\t\t\t$divisor = ( $tax_rate / 100 ) + 1;\r\n\t\t\t$price = $jrportal_subscriptions->package['full_amount'] / $divisor ;\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t$price = $jrportal_subscriptions->package['full_amount'];\r\n\r\n\t\t$line_items = array();\r\n\t\t$line_item_data = array ( \r\n\t\t\t\t\t\t\t\t 'tax_code_id' => $jrportal_subscriptions->package['tax_code_id'], \r\n\t\t\t\t\t\t\t\t 'name' => '_JRPORTAL_INVOICES_SUBSCRIPTION', \r\n\t\t\t\t\t\t\t\t 'description' => '('.$jrportal_subscriptions->package['name'].')', \r\n\t\t\t\t\t\t\t\t 'init_price' => $price, \r\n\t\t\t\t\t\t\t\t 'init_qty' => 1, \r\n\t\t\t\t\t\t\t\t 'init_discount' => 0\r\n\t\t\t\t\t\t\t\t );\r\n\t\t$line_items[] = $line_item_data;\r\n\t\t\t\r\n\t\t$jrportal_invoice->create_new_invoice( $invoice_data, $line_items );\r\n\t\t\r\n\t\t//update the subscription with the new invoice id\r\n\t\t$jrportal_subscriptions->subscription['invoice_id'] = $jrportal_invoice->id;\r\n\t\t\r\n\t\tif ($subscribing_to_freebie)\r\n\t\t\t{\r\n\t\t\t$jrportal_subscriptions->subscription['status'] = 1;\r\n\t\t\t\r\n\t\t\t$jrportal_invoice->mark_invoice_paid();\r\n\t\t\t}\r\n\t\t\r\n\t\t//update the subscription with the new invoice id and status (if changed)\r\n\t\t$jrportal_subscriptions->commitUpdateSubscription();\r\n\t\t\r\n\t\tif (!$subscribing_to_freebie)\r\n\t\t\t{\r\n\t\t\tjomresRedirect( jomresURL( JOMRES_SITEPAGE_URL . \"&task=list_gateways_for_invoice&invoice_id=\".$jrportal_invoice->id ), \"\" );\r\n\t\t\texit;\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t{\r\n\t\t\tjomresRedirect( jomresURL( JOMRES_SITEPAGE_URL . \"&task=my_subscriptions\" ), \"\" );\r\n\t\t\texit;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "8533d4484533f9c19723928c52ec8e1b", "score": "0.4491968", "text": "public static function signup($_period)\n\t{\n\t\tif(!$_period)\n\t\t{\n\t\t\t$_period = \"%Y-%m\";\n\t\t}\n\t\t$qry =\"SELECT\n\t\t\t\tDATE_FORMAT(datecreated, '$_period') as date,\n\t\t\t\tcount(id) as total\n\t\t\tFROM users\n\t\t\tWHERE datecreated != 0\n\t\t\tGROUP BY date\n\t\t\";\n\n\t\t$result = \\lib\\db::get($qry);\n\t\treturn $result;\n\t}", "title": "" } ]
ce1cf6a521cbadd0eca2b0de514896ba
The main method getting called as pre/postUserFunc from the 'source' property of the RECORDS TS cObject rendering the Content Elements for a TV Column. Should return the tt_content entries of the first page which has this value set.
[ { "docid": "8670169b753399845fd16578662ff9c8", "score": "0.0", "text": "public function main(?string $content, array $conf): string\n {\n // phpcs:enable\n if (\n (isset($conf['overridePage']) && $conf['overridePage'])\n || (isset($conf['overridePage.']) && $conf['overridePage.'])\n ) {\n $overridePage = $this->cObj->stdWrap($conf['overridePage'], $conf['overridePage.']);\n $rootLineUtility = GeneralUtility::makeInstance(\n RootlineUtility::class,\n $overridePage,\n $GLOBALS['TSFE']->MP\n );\n } else {\n $rootLineUtility = GeneralUtility::makeInstance(\n RootlineUtility::class,\n $GLOBALS['TSFE']->id\n );\n }\n $rootLine = $rootLineUtility->get();\n $recordsFromTable = trim($this->cObj->stdWrap($conf['table'] ?? '', $conf['table.'] ?? []));\n $reverse = (int)$this->cObj->stdWrap($conf['reverse'] ?? '', $conf['reverse.'] ?? []);\n $innerReverse = (int)$this->cObj->stdWrap($conf['innerReverse'] ?? '', $conf['innerReverse.'] ?? []);\n $field = $this->cObj->stdWrap($conf['field'] ?? '', $conf['field.'] ?? []);\n $collect = (int)$this->cObj->stdWrap($conf['collect'] ?? '', $conf['collect.'] ?? []);\n $slide = ((int)$this->cObj->stdWrap($conf['slide'] ?? '', $conf['slide.'] ?? [])) ?: -1;\n $tempLanguageFallback = $this->cObj->stdWrap($conf['languageFallback'] ?? '', $conf['languageFallback.'] ?? []);\n $this->languageFallback = GeneralUtility::intExplode(',', $tempLanguageFallback ?? '');\n foreach ($rootLine as $page) {\n $pageRepository = GeneralUtility::makeInstance(PageRepository::class);\n $page = $pageRepository->getPage($page['uid']);\n $value = $this->getPageFlexValue($page, $field);\n if ($value && $recordsFromTable) {\n $value = $this->removeHiddenRecords($value, $recordsFromTable);\n }\n if ($innerReverse) {\n $parts = GeneralUtility::trimExplode(',', $value, true);\n $parts = array_reverse($parts);\n $value = implode(',', $parts);\n }\n if ($reverse) {\n $content = $value . (strlen($content) && strlen($value) ? ',' : '') . $content;\n } else {\n $content .= (strlen($content) && strlen($value) ? ',' : '') . $value;\n }\n if ($collect) {\n $collect--;\n }\n if ($slide) {\n $slide--;\n }\n if (strlen($content) && !$collect) {\n break;\n }\n if (!$slide) {\n break;\n }\n }\n return $content;\n }", "title": "" } ]
[ { "docid": "7f225a8cbad5c69d4569f9a84005f446", "score": "0.64942896", "text": "public function getContent(){\n\t\t\n\t\t$this-> c = parent::getPageContent();\n\t\t\n\t\treturn $this-> c;\n\t\t\n\t}", "title": "" }, { "docid": "5ad83e1d7e33a6506e4a0ec2fac2075f", "score": "0.6360704", "text": "function pageContent()\r\n\t\t{\r\n\t\t}", "title": "" }, { "docid": "d9987137664b3adbef126add23eb13fe", "score": "0.63176763", "text": "protected abstract function getPageContent();", "title": "" }, { "docid": "3d59ccb718db590e824b36d5c1c1a4f8", "score": "0.61393654", "text": "public function GetContents()\n {\n \n \n // GET PAGE CONTENTS\n // ======================================================\n $records = $this->SQL->GetArrayAll(array(\n 'table' => $this->Table,\n 'keys' => '*',\n 'where' => \"`display`=1 AND `active`=1 AND `page_name`='{$this->Page_Name}'\",\n 'order' => '`sort_order` ASC',\n ));\n if ($this->Show_Query) echo '<br />' . $this->SQL->Db_Last_Query;\n \n $this->ProcessContents($records);\n }", "title": "" }, { "docid": "2120cd8ed1df48f2ea9b4374f263c8cb", "score": "0.60601646", "text": "public function content_func() {\n global $post;\n $item = '';\n $post = $this->single;\n setup_postdata($post);\n $item = get_the_content();\n\t\t$title = get_the_title();\n\t\t\t$indexerscript='\n<script type=\"text/php\"> $i=$GLOBALS[\"i\"]; if(!isset($GLOBALS[\"chapters\"][$i])){ $GLOBALS[\"chapters\"][$i][\"page\"] = $pdf->get_page_number(); $GLOBALS[\"chapters\"][$i][\"text\"] = \"'.$title.'\"; $GLOBALS[\"i\"]=$i+1; } </script>\n';\n\t\t\t$indexedcontent=$indexerscript.$item;\n\t\t\t$item=$indexedcontent;\n return $item;\n }", "title": "" }, { "docid": "a73ae82971f587a26517b01c4dd7765f", "score": "0.5926743", "text": "function get_content()\n {\n if(!$this->private_info['source']) {\n global $nsisweb;\n $record = $nsisweb->query_one_only('select source from nsisweb_pages where pageid = '.$this->get_pageid(),__FILE__,__LINE__);\n if($record) $this->private_info['source'] = $record['source'];\n }\n return $this->private_info['source'];\n }", "title": "" }, { "docid": "1c09ef10289eff286df0e7f99bd640b9", "score": "0.5923853", "text": "abstract public function pagecontent_callback();", "title": "" }, { "docid": "d4449df9709b09a6c80a6032b3b7c246", "score": "0.58801126", "text": "public function getContent(){\n return $this->getPage();\n }", "title": "" }, { "docid": "fbbdea37304c7456ee46c8e56921c1b5", "score": "0.5794788", "text": "public function getContent()\n {\n if (isset($_GET['live']) && Director::isDev()) {\n return $this->renderContent(true);\n }\n return $this->getField('Content');\n }", "title": "" }, { "docid": "bda7281593c974c54c2d6543477fabfd", "score": "0.5737444", "text": "public function getContent() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"content\");\n\t}", "title": "" }, { "docid": "bda7281593c974c54c2d6543477fabfd", "score": "0.5737444", "text": "public function getContent() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"content\");\n\t}", "title": "" }, { "docid": "095337c8717578b6a0867964102fc6d3", "score": "0.57220435", "text": "public function display_content();", "title": "" }, { "docid": "e06e886efc23ecde22ccc5df4e70b13f", "score": "0.57070196", "text": "public function getContentPages() {\n //get current login users info\n //get user session data\n $user = $this->Session->read('UserData.userName');\n $userCourse = $this->Session->read('UserData.usersCourses');\n $user_course_section = $userCourse[0];\n //get Course and section name\n $course_info = $this->getCourseNameOfUser($user_course_section);\n $get_pages = $this->ContentPageSetting->find('all', array(\n 'conditions' => array('ContentPageSetting.course' => $course_info->course_name, 'ContentPageSetting.section' => $course_info->section_name)\n ));\n return $get_pages;\n }", "title": "" }, { "docid": "60e79f6386701bc5df23adf1a26e36d1", "score": "0.5695171", "text": "public function contentNext();", "title": "" }, { "docid": "0685165fd5abd134aa1aaae302c7ba7a", "score": "0.5692051", "text": "public function displayContent() {}", "title": "" }, { "docid": "a1a1f5db0a689de284d097215b3e4bba", "score": "0.5656", "text": "public function getContent()\n\t{\n\t\t// mass action was set\n\t\tif($this->tpl->getAssignedValue('massAction') !== null) $this->tpl->assign('footer', true);\n\n\t\t// has paging & more than 1 page\n\t\telseif($this->getPaging() && $this->getNumResults() > $this->getPagingLimit()) $this->tpl->assign('footer', true);\n\n\t\t// execute parent\n\t\treturn parent::getContent();\n\t}", "title": "" }, { "docid": "2d15612edf5194c3980ccdf584005e14", "score": "0.5639909", "text": "public function indexTypo3PageContent() {}", "title": "" }, { "docid": "e31587e78e300c10644046022933838a", "score": "0.5638341", "text": "protected function _getRenderedContent()\n {\n }", "title": "" }, { "docid": "476bbefe59e326b468bd562d4d5a1420", "score": "0.56350285", "text": "function wpmanual_get_the_content() {\r\n\t\tglobal $wpmanual_template;\r\n\t\t\r\n\t\treturn apply_filters('wpmanual_get_the_content', $wpmanual_template->query->post->post_content );\r\n\t}", "title": "" }, { "docid": "616d704068a268685edc855b9d48b54e", "score": "0.56324136", "text": "public function preparePageContentGeneration() {}", "title": "" }, { "docid": "777285a15e92207f5a01721063c27473", "score": "0.56260663", "text": "function getContent () {\r\n\r\n\t// get global variables\r\n\tglobal $authentication_type, $p, $logs, $dbConf;\r\n\r\n\t// init\r\n\t$cols = array (\r\n\t\t'rule' => 'NOTIFICATION_RULE',\r\n\t\t'stime' => 'TIMESTAMP',\r\n\t\t'check_type' => 'CHECK_TYPE',\r\n\t\t'status' => 'CHECK_RESULT',\r\n\t\t'host' => 'HOST',\r\n\t\t'service' => 'SERVICE',\r\n\t\t'method' => 'METHOD',\r\n\t\t'dest' => 'USER',\r\n\t\t'result' => 'RESULT'\r\n\t);\r\n\t$numresults = 10;\r\n\t$begin = 0;\r\n\r\n\t$templateContent = new nwTemplate(TEMPLATE_STATUS_VIEWER);\r\n\r\n\r\n\t// assign statics\r\n\t$templateContent->assign('LOG_VIEWER_OVERVIEW_LINK', LOG_VIEWER_OVERVIEW_LINK);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING', LOG_VIEWER_HEADING);\r\n\t$templateContent->assign('LOG_VIEWER_FIND', LOG_VIEWER_FIND);\r\n\t$templateContent->assign('LOG_VIEWER_NUM_RESULTS', LOG_VIEWER_NUM_RESULTS);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_NOTIFICATION_RULE', LOG_VIEWER_HEADING_NOTIFICATION_RULE);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_TIMESTAMP', LOG_VIEWER_HEADING_TIMESTAMP);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_CHECK_TYPE', LOG_VIEWER_HEADING_CHECK_TYPE);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_HOST', LOG_VIEWER_HEADING_HOST);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_SERVICE', LOG_VIEWER_HEADING_SERVICE);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_CHECK_RESULT', LOG_VIEWER_HEADING_CHECK_RESULT);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_METHOD', LOG_VIEWER_HEADING_METHOD);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_USER', LOG_VIEWER_HEADING_USER);\r\n\t$templateContent->assign('LOG_VIEWER_HEADING_RESULT', LOG_VIEWER_HEADING_RESULT);\r\n\t$templateContent->assign('LOG_VIEWER_FIND_SUBMIT', LOG_VIEWER_FIND_SUBMIT);\r\n\r\n\r\n\t// set number of results and page\r\n\t$limit = null;\r\n\tif (isset($p['numresults']) || isset($p['p'])) {\r\n\r\n\t\t// determine count\r\n\t\t$numresults = (int)$p['numresults'];\r\n\t\tif (in_array($numresults, $logs['num_results'])) {\r\n\t\t\t$templateContent->assign('SELECTED_' . $p['numresults'], ' selected');\r\n\t\t} else {\r\n\t\t\t$numresults = 10;\r\n\t\t}\r\n\r\n\t\t// determine start\r\n\t\t$begin = (int)$p['p'];\r\n\t\tif ($begin < 0) $begin = 0;\r\n\t\tif ($begin > 0) $begin--;\r\n\t\t$begin = $begin * $numresults;\r\n\r\n\t}\r\n\t$limit = ' limit ' . $begin . ',' . $numresults;\r\n\r\n\r\n\t// set number-of-results select\r\n\t$templateContent->assign('NUM_RESULTS_SELECT', htmlSelect('numresults', $logs['num_results'], $numresults, 'onchange=\"javascript:document.fform.submit();\"'));\r\n\t\r\n\r\n\t// restore find dialogue\r\n\t$find = null;\r\n\tif (!empty($p['find_value'])) {\r\n\t\t$find = $p['find_value'];\r\n\t\t$templateContent->assign('FIND_VALUE', $find);\r\n\t}\r\n\r\n\r\n\t// set filter\r\n\t$filter = null;\r\n\tif (!empty($find)) {\r\n\r\n\t\t$findPrep = prepareDBValue($find);\r\n\r\n\t\t$filter = 'where ';\r\n\t\t$sep = null;\r\n\t\tforeach ($cols as $col => $val) {\r\n\t\t\tif ($col == 'stime' or $col == 'result') continue;\r\n\t\t\t$filter .= $sep . $col . ' like \\'%%' . $findPrep . '%%\\'';\r\n\t\t\tif (!$sep) $sep = ' or ';\r\n\t\t}\r\n\r\n\t}\r\n\r\n\r\n\t// set order by\r\n\tif (!isset($p['order_by'])) $p['order_by'] = 'id';\r\n\tif (array_key_exists($p['order_by'], $cols)) {\r\n\t\t$order_by = $p['order_by'];\r\n\t} else {\r\n\t\t$order_by = 'id';\r\n\t}\r\n\r\n\t// set order directory\r\n\tif (!isset($p['order_dir'])) $p['order_dir'] = 'desc';\r\n\tswitch ($p['order_dir']) {\r\n\t\tcase 'asc':\r\n\t\t\t$order_dir = 'asc';\r\n\t\t\tbreak;\r\n\t\tcase 'desc':\r\n\t\tdefault:\r\n\t\t\t$order_dir = 'desc';\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\t// set urls and image\r\n\t$qStr = getQueryString(array('order_by','order_dir'));\r\n\tforeach ($cols as $key => $value) {\r\n\r\n\t\tif ($order_by == $key) {\r\n\r\n\t\t\tif ($order_dir == 'asc') {\r\n\t\t\t\t$current_dir = 'desc';\r\n\t\t\t\t$image = '<img src=\"images/arrow_down.gif\" alt=\"down\" border=\"0\"/>';\r\n\t\t\t} else {\r\n\t\t\t\t$current_dir = 'asc';\r\n\t\t\t\t$image = '<img src=\"images/arrow_up.gif\" alt=\"up\" border=\"0\"/>';\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\t$current_dir = 'desc';\r\n\t\t\t$image = null;\r\n\r\n\t\t}\r\n\r\n\t\t$url = 'index.php?' . $qStr . '&amp;order_by=' . $key . '&amp;order_dir=' . $current_dir;\r\n\r\n\t\t$templateContent->assign('LINK_SORT_' . $value, $url);\r\n\t\tif (!empty($image)) $templateContent->assign('SORT_IMAGE_' . $value, $image);\r\n\r\n\t}\r\n\r\n\r\n\r\n\t// set base query\r\n\t$query = 'select %s from tmp_active as a left join tmp_commands as c on a.command_id=c.id ' . $filter . ' %s union select %s from escalation_stati';\r\n\r\n\r\n\t// get complete count\r\n\t$dbResult = queryDB(sprintf($query, 'count(*) cnt', '', 'count(*) cnt'));\r\n\t$allCount = $dbResult[0]['cnt'];\r\n\tif (isset($dbResult[1]) and defined($dbResult[1]['cnt']))\r\n\t{\r\n\t\t$allCount+=$dbResult[1]['cnt'];\r\n\t} else {\r\n\t\t$allCount*=2;\r\n\t}\r\n\r\n\r\n\t// Sorry, this is the only way I could solve concat differences between backends without rewriting the frontend too much!\r\n if ($dbConf['type'] == 'mysql')\r\n\t{\r\n\t\t$concat1 = 'concat(\"ACTIVE \",retries) as result ';\r\n $concat2 = 'concat(\"ESC \",counter) as result ';\r\n\t} \r\n\telseif ($dbConf['type'] == 'sqlite3')\r\n\t{\r\n $concat1 = '\"ACTIVE \"||retries as result ';\r\n $concat2 = '\"ESC \"||counter as result ';\r\n\t}\r\n\r\n\r\n\t// get logs\r\n\t$query = sprintf(\r\n\t\t$query . ' order by %s %s',\r\n\t\t'a.id as id,dest,time_string,method,notify_cmd,retries,rule, host,host_alias,service,check_type,status,a.stime as stime,notification_type,'.$concat1,\r\n\t\tnull,\r\n\t\t'id,\"\" as dest,time_string,\"(internal escalation)\" as method,\"\" as notify_cmd, counter as retries,notification_rule as rule,host,host_alias,service,check_type,status,starttime as stime,type as notification_type,'.$concat2,\r\n\t\t$order_by,\r\n\t\t$limit\r\n\t);\r\n\tlist($resultCount, $dbResult) = queryDB($query, true);\r\n\r\n\r\n\tif (!isset($p['p']) or !empty($p['p'])) {\r\n\t\t$p['p'] = 10;\r\n\t}\r\n\t// get page navigation\r\n\t$templateContent->assign('PAGE_NAVIGATION', getPageNavi($allCount, $resultCount, $numresults, (int)$p['p'], $find));\r\n\r\n\r\n\t// assign logs\r\n\t$content = null;\r\n\t$rowDark = true;\r\n\tforeach ($dbResult as $row) {\r\n\r\n\t\t$templateSubContent = new nwTemplate(TEMPLATE_LOG_VIEWER_ROW);\r\n\r\n\t\t// set and toggle row background\r\n\t\t$rowClass = ($rowDark) ? 'row' : 'row-light';\r\n\t\t$templateSubContent->assign('ROW_CLASS', $rowClass);\r\n\t\t$rowDark = ($rowDark) ? false : true;\r\n\r\n\t\t$templateSubContent->assign('NOTIFICATION_RULE', $row['rule']);\r\n\t\t$templateSubContent->assign('TIMESTAMP', date('D d.m H:i:s', $row['stime']));\r\n\t\t$templateSubContent->assign('CHECK_TYPE', $row['check_type']);\r\n\t\t$templateSubContent->assign('HOST', $row['host']);\r\n\t\t$templateSubContent->assign('SERVICE', $row['service']);\r\n\t\t$templateSubContent->assign('STATUS', $row['status']);\r\n\t\t$templateSubContent->assign('METHOD', $row['method']);\r\n\t\t$templateSubContent->assign('USER', $row['dest']);\r\n\t\t$templateSubContent->assign('RESULT', $row['result']);\r\n\r\n\t\t$content .= $templateSubContent->getHTML();\r\n\r\n\t}\r\n\r\n\t$templateContent->assign('LOG_ROWS', $content);\r\n\r\n\t// assign order and page to form\r\n\t$templateContent->assign('ORDER_BY', $order_by);\r\n\t$templateContent->assign('ORDER_DIR', $order_dir);\r\n\t$templateContent->assign('PAGE', (isset($p['p'])) ? $p['p'] : '1');\r\n\t\r\n\r\n\r\n\treturn $templateContent->getHTML();\r\n\r\n}", "title": "" }, { "docid": "49e39ce1578806ab04946d67e683048c", "score": "0.5600766", "text": "function pmxc_InitContent()\n\t{\n\t\tglobal $pmxcFunc, $context, $user_info, $scripturl, $txt;\n\n\t\t// custom sort function\n\t\tfunction CustomSort($a, $b) \n\t\t{\n\t\t\tif ($a['order'] == $b['order'])\n\t\t\t\treturn 0;\n\t\t\treturn ($a < $b) ? -1 : 1;\n\t\t}\n\n\t\tif($this->visible)\n\t\t{\n\t\t\t$this->download_content = $this->cfg['content'];\n\n\t\t\tif(isset($this->cfg['config']['settings']['download_board']) && !empty($this->cfg['config']['settings']['download_board']) && $this->cfg['config']['settings']['download_board'] != 'none')\n\t\t\t{\n\t\t\t\t// get downloads from the board\n\t\t\t\t$request = $pmxcFunc['db_query']('', '\n\t\t\t\t\t\tSELECT a.id_attach, a.size, a.downloads, t.id_topic, t.locked, m.subject, m.body\n\t\t\t\t\t\tFROM {db_prefix}attachments a\n\t\t\t\t\t\tLEFT JOIN {db_prefix}messages m ON (a.id_msg = m.id_msg)\n\t\t\t\t\t\tLEFT JOIN {db_prefix}topics t ON (m.id_topic = t.id_topic)\n\t\t\t\t\t\tWHERE m.id_board = {int:board} AND a.mime_type NOT LIKE {string:likestr} AND t.locked = 0',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'board' => $this->cfg['config']['settings']['download_board'],\n\t\t\t\t\t\t'likestr' => 'IMAGE%'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$data = array();\n\t\t\t\t$entrys = $pmxcFunc['db_num_rows']($request);\n\t\t\t\tif($entrys > 0)\n\t\t\t\t{\n\t\t\t\t\twhile($row = $pmxcFunc['db_fetch_assoc']($request))\n\t\t\t\t\t{\n\t\t\t\t\t\tpreg_match('/^[0-9]+/', substr($row['subject'], 0, 4), $order);\n\t\t\t\t\t\t$data[] = array(\n\t\t\t\t\t\t\t'order' => (isset($order[0]) ? intval($order[0]) : 0),\n\t\t\t\t\t\t\t'subject' => (isset($order[0]) ? trim(substr($row['subject'], strlen($order[0]))) : trim($row['subject'])),\n\t\t\t\t\t\t\t 'body' => $row['body'],\n\t\t\t\t\t\t\t 'downloads' => $row['downloads'],\n\t\t\t\t\t\t\t 'id_attach' => $row['id_attach'],\n\t\t\t\t\t\t\t 'id_topic' => $row['id_topic'],\n\t\t\t\t\t\t\t 'locked' => $row['locked'],\n\t\t\t\t\t\t\t 'size' => $row['size']\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t$pmxcFunc['db_free_result']($request);\n\n\t\t\t\t\t// sort by custom subject field [1234 SubjectText]\n\t\t\t\t\tuasort($data, 'CustomSort');\n\t\t\t\t}\n\n\t\t\t\t$dlacs = implode('=1,', $this->cfg['config']['settings']['download_acs']);\n\t\t\t\tif(is_array($data) && count($data) > 0)\n\t\t\t\t{\n\t\t\t\t\tforeach($data as $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->download_content .= '\n\t\t\t\t\t\t<div style=\"text-align:left;\">';\n\n\t\t\t\t\t\tif(allowPmxGroup($dlacs))\n\t\t\t\t\t\t\t$this->download_content .= '\n\t\t\t\t\t\t\t<a href=\"'. $scripturl .'?action=dlattach;id='. $row['id_attach'] .';fld='. $this->cfg['id'] .'\">\n\t\t\t\t\t\t\t\t<img style=\"vertical-align:middle;\" alt=\"download\" src=\"'. $context['pmx_imageurl'] .'download.png\" alt=\"*\" title=\"'. $row['subject'] .'\" /></a>';\n\n\t\t\t\t\t\tif($user_info['is_admin'])\n\t\t\t\t\t\t\t$this->download_content .= '\n\t\t\t\t\t\t\t<a href=\"'. $scripturl .'?topic='. $row['id_topic'] .'\">\n\t\t\t\t\t\t\t\t<strong>'. $row['subject'] .'</strong>\n\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$this->download_content .= '\n\t\t\t\t\t\t\t<strong>'. $row['subject'] .'</strong>';\n\n\t\t\t\t\t\t$this->download_content .= '\n\t\t\t\t\t\t\t<div class=\"dlcomment\">'. parse_bbc(trim($row['body'])) .'</div>\n\t\t\t\t\t\t\t<b>[ '. comma_format(floatval($row['size'])/1024) .'</b> '. $txt['pmx_kb_downloads'] .' <b>'. intval($row['downloads']) .' ]</b>\n\t\t\t\t\t\t</div>' . ($entrys > 1 ? '<hr class=\"pmx_hr\" />' : '');\n\t\t\t\t\t\t$entrys--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$this->download_content .= '<br />'. $txt['pmx_download_empty'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->cfg['config']['settings']['download_board'] != 'none')\n\t\t\t\t\t$this->download_content .= '<br />'. $txt['pmx_download_empty'];\n\t\t\t}\n\t\t}\n\t\t// return the visibility flag (true/false)\n\t\treturn $this->visible;\n\t}", "title": "" }, { "docid": "87f5b823c6267177cab90562c052e277", "score": "0.5594529", "text": "public function getContent()\n\t{\n\t\tif($this->post_id != '')\n\t\t{\n\t\t\t\n\t\t\t$post = BlogPost::getPostById($this->post_id);\n\t\t\tif($post == null)\n\t\t\t{\n\t\t\t\t$this->addError(DEFAULT_ERROR_MESSAGE);\n\t\t\t}\n\t\t\t$single_post = true;\n\t\t\t$this->checkPost();\n\t\t\t$comments = Comment::getCommentsByPost($this->post_id);\n\t\t}\n\t\telse\t\n\t\t{\n\t\t\t$single_post = false;\n\t\t\t$posts = BlogPost::getPosts($this->page_no-1);\n\t\t\t$this->title = BLOG_TITLE;\n\t\t}\n\t\t\t\n\t\t\tinclude($this->getFile(\n\t\t\tarray(\n\t\t\t'errors'=>$this->errors,\n\t\t\t'single_post'=>$single_post\n\t\t\t)));\n\t\t\t\n\t\t\t\n\t\n\t\n\t}", "title": "" }, { "docid": "4d633abf51db5548b72d2cc50a563118", "score": "0.5594318", "text": "function getContent() {\r\n $buffer = '';\r\n \r\n if (isset($this->pages[$this->pageno][1][1]['/Contents'])) {\r\n $contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']);\r\n foreach($contents AS $tmp_content) {\r\n $buffer .= $this->_rebuildContentStream($tmp_content).' ';\r\n }\r\n }\r\n \r\n return $buffer;\r\n }", "title": "" }, { "docid": "f3e68718244fe046877c9583793c5abb", "score": "0.5586968", "text": "public function content();", "title": "" }, { "docid": "f3e68718244fe046877c9583793c5abb", "score": "0.5586968", "text": "public function content();", "title": "" }, { "docid": "f3e68718244fe046877c9583793c5abb", "score": "0.5586968", "text": "public function content();", "title": "" }, { "docid": "f3e68718244fe046877c9583793c5abb", "score": "0.5586968", "text": "public function content();", "title": "" }, { "docid": "e5375b3720f9731a861b9bb73ce49b37", "score": "0.55832547", "text": "protected function moduleContent()\t{\n\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t// function 1: edit and import data\n\t\tif ($this->params['function'] == 1) {\n\n\t\t\tswitch ($this->params['action']) {\n\n\t\t\t\t\t// extraction and preview\n\t\t\t\tcase 1:\n\n\t\t\t\t\t\t// function header\n\t\t\t\t\t$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('importSingle'), $content, 0, 1);\n\n\t\t\t\t\t\t// test key registry and record cache for current page\n\t\t\t\t\t$this->cacheLoadAndCleanRegistry();\n\n\t\t\t\t\t\t// if records have been extracted $this->keys will be filled - decide on cmd what to do\n\t\t\t\t\tif (is_array($this->keys) === TRUE && array_key_exists('cmd', $this->params) === TRUE) {\n\n\t\t\t\t\t\tswitch ($this->params['cmd']) {\n\n\t\t\t\t\t\t\t\t// import happens as soon as the import button is clicked\n\t\t\t\t\t\t\tcase 'import':\n\n\t\t\t\t\t\t\t\t\t// fetch data\n\t\t\t\t\t\t\t\t$this->getData($this->params['key']);\n\n\t\t\t\t\t\t\t\t\t// import the record, destroy the current element in stack and to move on to the next record\n\t\t\t\t\t\t\t\t$this->performImport($this->currentRecord);\n\n\t\t\t\t\t\t\t\t\t// remove record from cache\n\t\t\t\t\t\t\t\t$this->cacheRemoveSingle($this->params['key']);\n\n\t\t\t\t\t\t\t\t\t// should any errors occur during import, keep current record identifier\n\t\t\t\t\t\t\t\t$recordIdentifier = $this->keys[$this->params['key']];\n\n\t\t\t\t\t\t\t\t\t// update the $key index\n\t\t\t\t\t\t\t\tunset($this->keys[$this->params['key']]);\n\t\t\t\t\t\t\t\t$this->keys = array_values($this->keys);\n\t\t\t\t\t\t\t\tarray_unshift($this->keys, 'x');\n\t\t\t\t\t\t\t\tunset($this->keys[0]);\n\n\t\t\t\t\t\t\t\t\t/* make sure that $this->nexKey doesn't point beyond remaining key stack; example: if there are three remaining records left\n\t\t\t\t\t\t\t\t\t * and record two is imported above, then only two records remain but $this->nextKey still points to 3\n\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif (!$this->errorMsgs && $this->nextKey > count($this->keys)) $this->nextKey = '';\n\n\t\t\t\t\t\t\t\t\t// update key registry\n\t\t\t\t\t\t\t\t$this->registry->set('tx_xmlimport_M1', $this->id, $this->keys);\n\n\t\t\t\t\t\t\t\t\t// check that the cache lifetime is still valid \n\t\t\t\t\t\t\t\t$this->cacheLoadAndCleanRegistry();\n\t\t\t\t\t\t\t\tif (is_array($this->keys) === FALSE) {\n\t\t\t\t\t\t\t\t\t$message = t3lib_div::makeInstance('t3lib_FlashMessage', $GLOBALS['LANG']->getLL('errmsg.cacheHasExpired'), '', t3lib_FlashMessage::WARNING);\n\t\t\t\t\t\t\t\t\tt3lib_FlashMessageQueue::addMessage($message);\n\t\t\t\t\t\t\t\t\t$content .= $this->showSubmitForm();\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// if there are TCEMAIN errors, turn back the changes from above and display the imported record again and the error messages\n\t\t\t\t\t\t\t\tif (count($this->errorMsgs) > 0) {\n\n\t\t\t\t\t\t\t\t\t\t// insert the imported element identifier back into the import stack\n\t\t\t\t\t\t\t\t\tif (count($this->keys) > 0) {\n\t\t\t\t\t\t\t\t\t\t$reindex = array();\n\t\t\t\t\t\t\t\t\t\tforeach ($this->keys as $k => $v) {\n\t\t\t\t\t\t\t\t\t\t\tif ($k == $this->params['key']) $reindex[] = $recordIdentifier;\n\t\t\t\t\t\t\t\t\t\t\t$reindex[] = $v; \n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// if the array key doesnt't exist, import direction was moving backwards and it has to be appended to the end of the stack\n\t\t\t\t\t\t\t\t\t\tif (array_key_exists($this->params['key'], $reindex) === FALSE) $reindex[$this->params['key']] = $recordIdentifier;\n\t\t\t\t\t\t\t\t\t\tarray_unshift($reindex, 'x');\n\t\t\t\t\t\t\t\t\t\tunset($reindex[0]);\n\t\t\t\t\t\t\t\t\t\t$this->keys = $reindex;\n\t\t\t\t\t\t\t\t\t// if this is the last remaining record in the stack, make sure that $this->keys is set at all\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->keys[1] = $recordIdentifier;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// now update registry and cache\n\t\t\t\t\t\t\t\t\t$this->registry->set('tx_xmlimport_M1', $this->id, $this->keys);\n\t\t\t\t\t\t\t\t\t$this->cacheInsertSingle($this->params['key'], $this->currentRecord);\n\n\t\t\t\t\t\t\t\t\t\t// display the errors from TCEMAIN\n\t\t\t\t\t\t\t\t\tforeach ($this->errorMsgs as $error) {\n\t\t\t\t\t\t\t\t\t\t$message = t3lib_div::makeInstance('t3lib_FlashMessage', $error, '', t3lib_FlashMessage::ERROR);\n\t\t\t\t\t\t\t\t\t\tt3lib_FlashMessageQueue::addMessage($message);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// re-fetch the record for display\n\t\t\t\t\t\t\t\t\t$this->getData($this->params['key']);\n\n\t\t\t\t\t\t\t\t\t\t// prepare to show it again\n\t\t\t\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('remainingRecords').' '.count($this->keys).'</strong></p>\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>\n\t\t\t\t\t\t\t\t\t';\n\n\t\t\t\t\t\t\t\t\t\t// buttons top\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// show\n\t\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\n\t\t\t\t\t\t\t\t\t\t// insert hidden fields\n\t\t\t\t\t\t\t\t\t$content .= $this->displayInsertHiddenFields($this->currentKey);\n\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t// record successfully imported, show next record\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// display infos\n\t\t\t\t\t\t\t\t\t$importCount = count($this->keys);\n\t\t\t\t\t\t\t\t\t$content .= '<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('remainingRecords').' '.count($this->keys).'</strong></p>';\n\n\t\t\t\t\t\t\t\t\t\t// stop if the last record has been imported\n\t\t\t\t\t\t\t\t\tif (!$importCount) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>'.$GLOBALS['LANG']->getLL('importComplete').'</p>';\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// buttons top\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// get the next record for display\n\t\t\t\t\t\t\t\t\tif ($this->params['key'] === 1) {\n\t\t\t\t\t\t\t\t\t\t\t// begin of import stack - next key stays at 1\n\t\t\t\t\t\t\t\t\t\t$this->getData(1);\n\t\t\t\t\t\t\t\t\t\t$content .= '<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>';\n\t\t\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\t\t\t\t\t\t\t\t\t} elseif ($this->nextKey) {\n\t\t\t\t\t\t\t\t\t\t\t// somewhere in between - show the next record in stack (which will now be at the same position in the key stack as the imported record)\n\t\t\t\t\t\t\t\t\t\t$this->getData($this->currentKey);\n\t\t\t\t\t\t\t\t\t\t$content .= '<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>';\n\t\t\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\t\t\t\t\t\t\t\t\t\t// end of import stack - show previous record\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->getData($this->prevKey);\n\t\t\t\t\t\t\t\t\t\t$content .= '<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>';\n\t\t\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// hidden fields\n\t\t\t\t\t\t\t\t\t$content .= $this->displayInsertHiddenFields($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// buttons bottom\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t// edit happens when an edit link is clicked or when editet content is resubmitted\n\t\t\t\t\t\t\tcase 'edit':\n\n\t\t\t\t\t\t\t\t\t// fetch data\n\t\t\t\t\t\t\t\t$this->getData($this->params['key']);\n\n\t\t\t\t\t\t\t\t\t// case when edited content is resubmitted\n\t\t\t\t\t\t\t\tif ($this->params['postVars']['cmd'] == 'edit') {\n\n\t\t\t\t\t\t\t\t\t\t// assign the edited value to the record : $t = table, $i = index, $f = field\n\t\t\t\t\t\t\t\t\t$t = key($this->params['postVars']['data']);\n\t\t\t\t\t\t\t\t\t$i = key($this->params['postVars']['data'][$t]);\n\t\t\t\t\t\t\t\t\t$f = key($this->params['postVars']['data'][$t][$i]);\n\n\t\t\t\t\t\t\t\t\t\t/* RTE transformations before sending to cache - in case RTE was loaded, post data will contain the '_TRANSFORM_' flag first\n\t\t\t\t\t\t\t\t\t\t * for this stuff check t3lib_tcemain line 1154ff. & 2443ff., t3lib_rteapi line 147ff.\n\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t// XMLIMPORT TODO: no support for RTE file/image edit at the moment\n\t\t\t\t\t\t\t\t\tif (strpos($f, '_TRANSFORM_') !== FALSE) {\n\t\t\t\t\t\t\t\t\t\t$f = str_replace('_TRANSFORM_', '', $f);\n\t\t\t\t\t\t\t\t\t\t$currentRecord = array($f => $dataToTransform);\n\t\t\t\t\t\t\t\t\t\t$dataToTransform = $this->params['postVars']['data'][$t][$i][$f];\n\n\t\t\t\t\t\t\t\t\t\t\t// get RTE config\n\t\t\t\t\t\t\t\t\t\t$types_fieldConfig = t3lib_BEfunc::getTCAtypes($t, $currentRecord, 1);\n\t\t\t\t\t\t\t\t\t\t$theTypeString = t3lib_BEfunc::getTCAtypeValue($t, $currentRecord);\n\t\t\t\t\t\t\t\t\t\t$RTEsetup = $GLOBALS['BE_USER']->getTSConfig('RTE', t3lib_BEfunc::getPagesTSconfig($this->id));\n\t\t\t\t\t\t\t\t\t\t$thisConfig = t3lib_BEfunc::RTEsetup($RTEsetup['properties'], $t, $f, $theTypeString);\n\n\t\t\t\t\t\t\t\t\t\t\t// Get RTE object and do transformation\n\t\t\t\t\t\t\t\t\t\t$RTEobj = t3lib_BEfunc::RTEgetObj();\n\t\t\t\t\t\t\t\t\t\tif (is_object($RTEobj)) {\n\t\t\t\t\t\t\t\t\t\t\t$this->currentRecord[$t][$i][$f] = $RTEobj->transformContent('db', $dataToTransform, $t, $f, $currentRecord, $types_fieldConfig[$f]['spec'], $thisConfig, $RTErelPath, $this->id);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tdebug('NO RTE OBJECT FOUND!');\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// submitted data from non RTE fields\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->currentRecord[$t][$i][$f] = $this->params['postVars']['data'][$t][$i][$f];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// count\n\t\t\t\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('remainingRecords').' '.count($this->keys).'</strong></p>\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>\n\t\t\t\t\t\t\t\t\t';\n\n\t\t\t\t\t\t\t\t\t\t// buttons top\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// show changed record\n\t\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\n\t\t\t\t\t\t\t\t\t\t// hidden fields\n\t\t\t\t\t\t\t\t\t$content .= $this->displayInsertHiddenFields($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// buttons bottom\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// recache with changes\n\t\t\t\t\t\t\t\t\t$this->setData($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t// case when a field is displayed in edit mode without import/reload buttons\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// count\n\t\t\t\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('remainingRecords').' '.count($this->keys).'</strong></p>\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>\n\t\t\t\t\t\t\t\t\t';\n\n\t\t\t\t\t\t\t\t\t\t// show - displaySinlgeRecord has to be called first, since it's tceforms excecution adds JS (e.g. for RTE) that has to be inserted at the top of the editform\n\t\t\t\t\t\t\t\t\t\t// transformation of content from db/cache -> RTE need not be taken care of since this happens in drawRTE() function of t3lib_rteapi line 113ff. \n\t\t\t\t\t\t\t\t\t$editRecord = $this->displaySingleRecord($this->currentRecord);\n\t\t\t\t\t\t\t\t\t$content .= $this->tceforms->printNeededJSFunctions_top();\n\t\t\t\t\t\t\t\t\t$content .= $editRecord;\n\n\t\t\t\t\t\t\t\t\t\t// hidden fields\n\t\t\t\t\t\t\t\t\t$content .= $this->displayInsertHiddenFields($this->currentKey);\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// include necessary JS at the bottom of the form/field\n\t\t\t\t\t\t\t\t$content .= $this->tceforms->printNeededJSFunctions();\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t// current record will be re-extracted from XML stored within the record data (NOT from file/source...)\n\t\t\t\t\t\t\tcase 'reload':\n\n\t\t\t\t\t\t\t\t\t// fetch data to get the original XML of the record\n\t\t\t\t\t\t\t\t$this->getData($this->params['key']);\n\n\t\t\t\t\t\t\t\t\t// reprocess current record\n\t\t\t\t\t\t\t\t$htmlParser = t3lib_div::makeInstance('t3lib_parsehtml');\n\t\t\t\t\t\t\t\t$tmpEntryNode = $this->conf['entryNode'];\n\t\t\t\t\t\t\t\t$this->conf['entryNode'] = $htmlParser->getFirstTagName($this->currentRecord['###XML###'][0]['source'], 1);\n\t\t\t\t\t\t\t\t$record = $this->processXMLdata($this->currentRecord['###XML###'][0]['source']);\n\t\t\t\t\t\t\t\t$this->conf['entryNode'] = $tmpEntryNode;\n\t\t\t\t\t\t\t\t$this->currentRecord = $record[1];\n\t\t\t\t\t\t\t\t$this->processMarkerFields();\n\n\t\t\t\t\t\t\t\t\t// display processed record\n\t\t\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('remainingRecords').' '.count($this->keys).'</strong></p>\n\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>\n\t\t\t\t\t\t\t\t';\n\n\t\t\t\t\t\t\t\t\t// buttons top\n\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t// show\n\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\n\t\t\t\t\t\t\t\t\t// hidden fields\n\t\t\t\t\t\t\t\t$content .= $this->displayInsertHiddenFields($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t// buttons bottom\n\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t// recache\n\t\t\t\t\t\t\t\t$this->setData($this->currentKey);\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t// default happens when prev/next is clicked\n\t\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\t\t\t// fetch data\n\t\t\t\t\t\t\t\t$this->getData($this->params['key']);\n\n\t\t\t\t\t\t\t\tif ($this->currentRecord) {\n\t\t\t\t\t\t\t\t\t\t// display record\n\t\t\t\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('remainingRecords').' '.count($this->keys).'</strong></p>\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>\n\t\t\t\t\t\t\t\t\t';\n\n\t\t\t\t\t\t\t\t\t\t// buttons top\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// show\n\t\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\n\t\t\t\t\t\t\t\t\t\t// hidden fields\n\t\t\t\t\t\t\t\t\t$content .= $this->displayInsertHiddenFields($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t\t// buttons bottom\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if $this-keys is not filled but the param signals XML submission, perform an extraction\n\t\t\t\t\t} elseif (is_array($this->keys) === FALSE && $this->params['postVars']['submitForm'] == '1') {\n\n\t\t\t\t\t\t\t// get records from XML source (this only happens once)\n\t\t\t\t\t\t$extraction = $this->readXMLFromFile();\n\n\t\t\t\t\t\t\t// set current record to the first extracted record\n\t\t\t\t\t\tif ($extraction === TRUE) { \n\t\t\t\t\t\t\t$this->getData(1);\n\t\t\t\t\t\t\tif ($this->currentRecord) {\n\t\t\t\t\t\t\t\t\t// display record\n\t\t\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('remainingRecords').' '.count($this->keys).'</strong></p>\n\t\t\t\t\t\t\t\t<p style=\"margin-bottom: 1em;\"><strong>'.$GLOBALS['LANG']->getLL('currentPosition').' '.$this->currentKey.'</strong></p>\n\t\t\t\t\t\t\t\t';\n\n\t\t\t\t\t\t\t\t\t// buttons top\n\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t// show\n\t\t\t\t\t\t\t\t$content .= $this->displaySingleRecord($this->currentRecord);\n\n\t\t\t\t\t\t\t\t\t// hidden fields\n\t\t\t\t\t\t\t\t$content .= $this->displayInsertHiddenFields($this->currentKey);\n\n\t\t\t\t\t\t\t\t\t// buttons bottom\n\t\t\t\t\t\t\t\tif ($this->conf['displayImportButton']) $content .= $this->displayImportButton($this->currentKey);\n\t\t\t\t\t\t\t\tif ($this->conf['displayReloadButton']) $content .= $this->displayReloadButton($this->currentKey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// no valid keys and records cache exist, display warning\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$message = t3lib_div::makeInstance('t3lib_FlashMessage', $GLOBALS['LANG']->getLL('errmsg.cacheHasExpired'), '', t3lib_FlashMessage::WARNING);\n\t\t\t\t\t\tt3lib_FlashMessageQueue::addMessage($message);\n\t\t\t\t\t\t$content .= $this->showSubmitForm();\n\t\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\t\t\t// show the form for data submission or a note that there are still records to be imported\n\t\t\t\tdefault:\n\n\t\t\t\t\tif ($this->params['flush'] === 1) $this->cacheRemoveAll();\n\n\t\t\t\t\t$this->cacheLoadAndCleanRegistry();\n\n\t\t\t\t\tif ($this->keys) {\n\n\t\t\t\t\t\t$content .= $this->doc->section($GLOBALS['LANG']->getLL('importSingle'), $content, 0, 1);\n\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t\t<p>'.sprintf($GLOBALS['LANG']->getLL('queueCount'), count($this->keys)).'</p>\n\t\t\t\t\t\t\t<p>'.$GLOBALS['LANG']->getLL('wouldYouLike').'</p>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li style=\"float: left; margin: 1em 0.5em 1em 0\"><a style=\"display: inline-block; padding: 5px 10px; color: #434343; background: #F6F6F6 -moz-linear-gradient(center top , #F6F6F6 10%, #D5D5D5 90%) center bottom repeat-x; border: 1px solid #7C7C7C; border-radius: 1px 1px 1px 1px; cursor: pointer;\" href=\"mod.php?M=web_txxmlimportM1&amp;id='.htmlspecialchars($this->id).'&action=1&key=1\">'.$GLOBALS['LANG']->getLL('goOn').'</a></li>\n\t\t\t\t\t\t\t\t<li style=\"float: left; margin: 1em 0;\"><a style=\"display: inline-block; padding: 5px 10px; color: #434343; background: #F6F6F6 -moz-linear-gradient(center top , #F6F6F6 10%, #D5D5D5 90%) center bottom repeat-x; border: 1px solid #7C7C7C; border-radius: 1px 1px 1px 1px; cursor: pointer;\" href=\"mod.php?M=web_txxmlimportM1&amp;id='.htmlspecialchars($this->id).'&flush=1\">'.$GLOBALS['LANG']->getLL('flushQueue').'</a></li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$content .= $this->doc->section($GLOBALS['LANG']->getLL('importSingle'), $content, 0, 1);\n\t\t\t\t\t\t$content .= $this->showSubmitForm();\n\t\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// batch import\n\t\t} elseif ($this->params['function'] == 2) {\n\n\t\t\t$this->cacheLoadAndCleanRegistry();\n\n\t\t\t$content .= $this->doc->section($GLOBALS['LANG']->getLL('importBatch'), $content, 0, 1);\n\n\t\t\tswitch ($this->params['action']) {\n\n\t\t\t\tcase 1:\n\t\t\t\t\t\n\t\t\t\t\tif ($this->keys) {\n\t\t\t\t\t\tforeach($this->keys as $key => $records) {\n\n\t\t\t\t\t\t\t\t// fetch data\n\t\t\t\t\t\t\t$this->getData($key);\n\n\t\t\t\t\t\t\t\t// import the record, destroy the current element in stack and to move on to the next record\n\t\t\t\t\t\t\t$this->performImport($this->currentRecord);\n\n### GO ON: ERROR HANDLING ###\n\n\t\t\t\t\t\t\t\t// remove record from cache\n\t\t\t\t\t\t\t$this->cacheRemoveSingle($key);\n\n\t\t\t\t\t\t\tunset($this->keys[$key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// import complete, remove registry\n\t\t\t\t\t\t$this->cacheLoadAndCleanRegistry();\n\n\t\t\t\t\t\t$content .= '<p>'.$GLOBALS['LANG']->getLL('importComplete').'</p>';\n\t\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tif ($this->keys) {\n\n\t\t\t\t\t\t$content .= '\n\t\t\t\t\t\t<p>'.sprintf($GLOBALS['LANG']->getLL('queueCount'), count($this->keys)).'</p>\n\t\t\t\t\t\t<p>'.$GLOBALS['LANG']->getLL('wouldYouLike').'</p>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li style=\"float: left; margin: 1em 0.5em 1em 0\"><a style=\"display: inline-block; padding: 5px 10px; color: #434343; background: #F6F6F6 -moz-linear-gradient(center top , #F6F6F6 10%, #D5D5D5 90%) center bottom repeat-x; border: 1px solid #7C7C7C; border-radius: 1px 1px 1px 1px; cursor: pointer;\" href=\"mod.php?M=web_txxmlimportM1&amp;id='.htmlspecialchars($this->id).'&function=2&action=1&key=1\">'.$GLOBALS['LANG']->getLL('doBatchImport').'</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$content .= '<p>'.$GLOBALS['LANG']->getLL('pleasePerformExtractionFirst').'</p>';\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// if it ends up here, something went completely wrong\n\t\t} else {\n\t\t\t$message = t3lib_div::makeInstance('t3lib_FlashMessage', $GLOBALS['LANG']->getLL('errmsg.generalerror'), '', t3lib_FlashMessage::ERROR);\n\t\t\tt3lib_FlashMessageQueue::addMessage($message);\n\t\t}\n\n\t\t// assign output\n\t\t$this->content .= $content;\n\t}", "title": "" }, { "docid": "09c77168d46b48f5aa9e1ff347b7bcc1", "score": "0.558047", "text": "public function getContent() {\n $content = $this->content;\n $pattern = $this->makeWidgetPattern();\n $matches = $this->getWidgetMatches();\n $matchCount = $this->matchCount;\n if ($matchCount) {\n $this->view->placeholder('documentold')->set('documentold');\n }\n return $content;\n }", "title": "" }, { "docid": "e4c0f855cecdc5ed79f490ffe676b7a9", "score": "0.5572581", "text": "function get_pagecontent()\n {\n\t\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('stream_pagecontent');\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array(); \t\n }", "title": "" }, { "docid": "d6de8191435d6b4b465a4796ea5c2eb3", "score": "0.554376", "text": "public function get_content($page_data);", "title": "" }, { "docid": "ef97680fffacf0ba7bdf59f3fdb0feab", "score": "0.5511027", "text": "function listContent()\n {\n }", "title": "" }, { "docid": "76c77af8784aa5e809063380de39ae16", "score": "0.55092347", "text": "public function getContent()\n {\n if(!$this->_processedContent)\n {\n $this->_processContent();\n }\n return parent::getContent();\n }", "title": "" }, { "docid": "73185cd68e75fd6d51d5a32dd89056fe", "score": "0.5505705", "text": "function get_the_post_content_for_display() {\n\t\tglobal $pages, $page;\n\n\t\t$old_pages = $pages;\n\t\t$old_page = $page;\n\n\t\t$content = join( \"\\n\\n\", $pages );\n\t\t$content = preg_replace( '/<!--more(.*?)?-->/', '', $content );\n\t\t$pages = array( $content );\n\t\t$page = 1;\n\n\t\tob_start();\n\t\tthe_content();\n\t\t$return = ob_get_clean();\n\n\t\t$pages = $old_pages;\n\t\t$page = $old_page;\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "05525bc8b5144206308984f4206448f1", "score": "0.5503481", "text": "function getContent() ;", "title": "" }, { "docid": "c384692f8c4eadca88ee477bc1d62b6d", "score": "0.5500664", "text": "public function getContentField()\n {\n $retval = null;\n if($this->profile_field_row['content_id'] != null)\n $retval = Content :: getObject($this->profile_field_row['content_id']);\n return $retval;\n }", "title": "" }, { "docid": "ecd86f1e4c274fee526933d0bbdd9a69", "score": "0.5492629", "text": "function get_content(){\n\t\t\t\t\n\t\t\t\tif( !empty($this->settings['column-size']) ){\n\t\t\t\t\tgdlr_core_set_container_multiplier(intval($this->settings['column-size']) / 60, false);\n\t\t\t\t}\n\n\t\t\t\t$ret = '';\n\t\t\t\tif( empty($this->settings['query']) ){\n\t\t\t\t\t$query = $this->get_blog_query();\n\t\t\t\t}else{\n\t\t\t\t\t$query = $this->settings['query'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $this->settings['blog-style'] == 'blog-feature' ){\n\n\t\t\t\t\tgdlr_core_setup_admin_postdata();\n\n\t\t\t\t\t$ret .= '<div class=\"gdlr-core-blog-item-holder clearfix\" >';\n\t\t\t\t\t$ret .= $this->get_blog_feature_content($query);\n\t\t\t\t\t$ret .= '</div>';\n\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\tgdlr_core_reset_admin_postdata();\n\n\t\t\t\t// carousel style\n\t\t\t\t}else if( $this->settings['layout'] == 'carousel' ){\n\t\t\t\t\t$slides = array();\n\t\t\t\t\t$column_no = 60 / intval($this->settings['column-size']);\n\n\t\t\t\t\t$flex_atts = array(\n\t\t\t\t\t\t'carousel' => true,\n\t\t\t\t\t\t'column' => $column_no,\n\t\t\t\t\t\t'move' => empty($this->settings['carousel-scrolling-item-amount'])? '': $this->settings['carousel-scrolling-item-amount'],\n\t\t\t\t\t\t'navigation' => empty($this->settings['carousel-navigation'])? 'navigation': $this->settings['carousel-navigation'],\n\t\t\t\t\t\t'bullet-style' => empty($this->settings['carousel-bullet-style'])? '': $this->settings['carousel-bullet-style'],\n\t\t\t\t\t\t'nav-parent' => 'gdlr-core-blog-item',\n\t\t\t\t\t\t'disable-autoslide' => (empty($this->settings['carousel-autoslide']) || $this->settings['carousel-autoslide'] == 'enable')? '': true,\n\t\t\t\t\t\t'mglr' => ($this->settings['no-space'] == 'yes'? false: true)\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tgdlr_core_setup_admin_postdata();\n\n\t\t\t\t\t$blog_style = new gdlr_core_blog_style();\n\t\t\t\t\twhile($query->have_posts()){ $query->the_post();\n\t\t\t\t\t\t$slides[] = $blog_style->get_content( $this->settings );\n\t\t\t\t\t} // while\n\n\t\t\t\t\t$ret .= gdlr_core_get_flexslider($slides, $flex_atts);\n\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\tgdlr_core_reset_admin_postdata();\n\t\t\t\t\t\n\t\t\t\t// fitrows style\n\t\t\t\t}else{\n\n\t\t\t\t\t// filterer\n\t\t\t\t\tif( $this->settings['filterer'] != 'none' ){\n\t\t\t\t\t\t$extra_class = ($this->settings['no-space'] == 'yes')? '': ' gdlr-core-item-pdlr';\n\t\t\t\t\t\t$extra_class .= empty($this->settings['filterer'])? '': ' gdlr-core-style-' . $this->settings['filterer'];\n\t\t\t\t\t\t$extra_class .= empty($this->settings['filterer-align'])? '': ' gdlr-core-' . $this->settings['filterer-align'] . '-align';\n\t\t\t\t\t\t$extra_class .= apply_filters('gdlr_core_blog_filterer_class', '', $this->settings);\n\n\t\t\t\t\t\t$ret .= gdlr_core_get_ajax_filterer('post', 'category', $this->settings, 'gdlr-core-blog-item-holder', $extra_class);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tgdlr_core_setup_admin_postdata();\n\n\t\t\t\t\t$ret .= '<div class=\"gdlr-core-blog-item-holder gdlr-core-js-2 clearfix\" data-layout=\"' . $this->settings['layout'] . '\" >';\n\t\t\t\t\tif( $query->have_posts() ){\n\t\t\t\t\t\t$ret .= $this->get_blog_grid_content($query);\n\t\t\t\t\t}\n\t\t\t\t\t$ret .= '</div>';\n\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\tgdlr_core_reset_admin_postdata();\n\n\t\t\t\t\t// pagination\n\t\t\t\t\tif( $this->settings['pagination'] != 'none' ){\n\t\t\t\t\t\t$extra_class = ($this->settings['no-space'] == 'yes')? '': 'gdlr-core-item-pdlr';\n\n\t\t\t\t\t\tif( $this->settings['pagination'] == 'page' ){\n\t\t\t\t\t\t\tif( !empty($this->settings['filterer']) && $this->settings['filterer'] != 'none' ){\n\t\t\t\t\t\t\t\t$ret .= gdlr_core_get_ajax_pagination('post', $this->settings, $query->max_num_pages, 'gdlr-core-blog-item-holder', $extra_class);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$ret .= gdlr_core_get_pagination($query->max_num_pages, $this->settings, $extra_class);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if( $this->settings['pagination'] == 'load-more' ){\n\t\t\t\t\t\t\t// mediaelement for blog ajax\n\t\t\t\t\t\t\twp_enqueue_style('wp-mediaelement');\n\t\t\t\t\t\t\twp_enqueue_script('wp-mediaelement');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$paged = empty($query->query['paged'])? 2: intval($query->query['paged']) + 1;\n\t\t\t\t\t\t\t$ret .= gdlr_core_get_ajax_load_more('post', $this->settings, $paged, $query->max_num_pages, 'gdlr-core-blog-item-holder', $extra_class);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgdlr_core_set_container_multiplier(1, false);\n\n\t\t\t\treturn $ret;\n\t\t\t}", "title": "" }, { "docid": "a537c57615c03046b3ad8399391cf3b2", "score": "0.5491992", "text": "function content_handler($db, $obj_user, $content, $action, $template)\r\r\n{\r\r\n if ($action == \"\" || $action == 'view')\r\r\n {\r\r\n define(\"PAGE_HEADING\", \"Latest Activity\");\r\r\n \r\r\n if (!ISSET($GLOBALS['NX3_PARAM_ARRAY'][2]) || $GLOBALS['NX3_PARAM_ARRAY'][2] == '')\r\r\n {\r\r\n $get_start_at = 0; // default\r\r\n }\r\r\n else\r\r\n {\r\r\n $get_start_at = $GLOBALS['NX3_PARAM_ARRAY'][2];\r\r\n }\r\r\n return action_default($db, $obj_user, $get_start_at);\r\r\n }\r\r\n else\r\r\n {\r\r\n fatal_error_handler ($db, \"Specified action is not valid.\");\r\r\n }\r\r\n}", "title": "" }, { "docid": "148b48747b81161e745ac38fc2615a8a", "score": "0.54884785", "text": "public function main()\n {\n $this->content = '';\n\n // Access check! The page will show only if there is a valid page and if this page may be viewed by the user\n if (is_array($this->altRoot)) {\n $access = true;\n // get PID of altRoot Element to get pageInfoArr\n $altRootRecord = BackendUtility::getRecordWSOL($this->altRoot['table'], $this->altRoot['uid'], 'pid');\n $pageInfoArr = BackendUtility::readPageAccess($altRootRecord['pid'], $this->perms_clause);\n } else {\n $pageInfoArr = BackendUtility::readPageAccess($this->id, $this->perms_clause);\n $access = (int)$pageInfoArr['uid'] > 0;\n }\n\n if ($access) {\n if (GeneralUtility::_GP('ajaxUnlinkRecord')) {\n $unlinkDestinationPointer = $this->apiObj->flexform_getPointerFromString(GeneralUtility::_GP('ajaxUnlinkRecord'));\n $this->apiObj->unlinkElement($unlinkDestinationPointer);\n }\n\n $this->calcPerms = $this->getCalcPerms($pageInfoArr['uid']);\n\n // Define the root element record:\n $this->rootElementTable = is_array($this->altRoot) ? $this->altRoot['table'] : 'pages';\n $this->rootElementUid = is_array($this->altRoot) ? $this->altRoot['uid'] : $this->id;\n $this->rootElementRecord = BackendUtility::getRecordWSOL($this->rootElementTable, $this->rootElementUid, '*');\n if ($this->rootElementRecord['t3ver_oid'] && $this->rootElementRecord['pid'] < 0) {\n // typo3 lacks a proper API to properly detect Offline versions and extract Live Versions therefore this is done by hand\n if ($this->rootElementTable == 'pages') {\n $this->rootElementUid_pidForContent = $this->rootElementRecord['t3ver_oid'];\n } else {\n throw new \\RuntimeException('Further execution of code leads to PHP errors.', 1404750505);\n $liveRec = BackendUtility::getLiveRecord($this->rootElementTable, $this->rootElementUid);\n $this->rootElementUid_pidForContent = $liveRec['pid'];\n }\n } else {\n // If pages use current UID, otherwhise you must use the PID to define the Page ID\n if ($this->rootElementTable == 'pages') {\n $this->rootElementUid_pidForContent = $this->rootElementRecord['uid'];\n } else {\n $this->rootElementUid_pidForContent = $this->rootElementRecord['pid'];\n }\n }\n\n // Check if we have to update the pagetree:\n if (GeneralUtility::_GP('updatePageTree')) {\n BackendUtility::setUpdateSignal('updatePageTree');\n }\n\n // Add custom styles\n $styleSheetFile = \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extRelPath($this->extKey) . 'Resources/Public/StyleSheet/mod1_default.css';\n\n if (isset($this->modTSconfig['properties']['stylesheet'])) {\n $styleSheetFile = $this->modTSconfig['properties']['stylesheet'];\n }\n\n\n $this->getPageRenderer()->addCssFile($styleSheetFile);\n\n if (isset($this->modTSconfig['properties']['stylesheet.'])) {\n foreach ($this->modTSconfig['properties']['stylesheet.'] as $file) {\n if (substr($file, 0, 4) == 'EXT:') {\n list($extKey, $local) = explode('/', substr($file, 4), 2);\n if (strcmp($extKey, '') && \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::isLoaded($extKey) && strcmp($local, '')) {\n $file = \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extRelPath($extKey) . $local;\n }\n }\n $this->getPageRenderer()->addCssFile($file);\n }\n }\n\n // Adding classic jumpToUrl function, needed for the function menu. Also, the id in the parent frameset is configured.\n $this->moduleTemplate->addJavaScriptCode('templavoila_base', '\n if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n ' . $this->moduleTemplate->redirectUrls() . '\n var T3_TV_MOD1_BACKPATH = \"' . $relativeExtensionPath . '\";\n var T3_TV_MOD1_RETURNURL = \"' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\";\n ');\n\n $this->getPageRenderer()->loadJquery();\n\n // Setup JS for ClickMenu which isn't loaded by ModuleTemplate\n $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');\n\n // Set up JS for dynamic tab menu and side bar\n $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/Tabs');\n\n $this->moduleTemplate->addJavaScriptCode('templavoila_function', '\n TYPO3.jQuery(document).off(\\'click.tab.data-api\\', \\'[data-toggle=\"tab\"]\\');\n TYPO3.jQuery(document).on(\\'click.tab.data-api\\', \\'[data-toggle=\"tab\"]\\', function (e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n var tab = TYPO3.jQuery(TYPO3.jQuery(this).attr(\\'href\\'));\n var activate = !tab.hasClass(\\'active\\');\n TYPO3.jQuery(\\'div.tab-content>div.tab-pane.active\\').removeClass(\\'active\\');\n TYPO3.jQuery(\\'ul.nav.nav-tabs>li.active\\').removeClass(\\'active\\');\n if (activate) {\n TYPO3.jQuery(this).tab(\\'show\\')\n } else {\n TYPO3.Tabs.storeActiveTab(e.currentTarget.id, \\'\\');\n }\n return true;\n });\n var typo3pageModule = {\n /**\n * Initialization\n */\n init: function() {\n typo3pageModule.enableHighlighting();\n },\n\n /**\n * This method is used to bind the higlighting function \"setActive\"\n * to the mouseenter event and the \"setInactive\" to the mouseleave event.\n */\n enableHighlighting: function() {\n TYPO3.jQuery(\\'.pagecontainer\\').on(\\'mouseover\\', typo3pageModule.setActive);\n },\n\n /**\n * This method is used as an event handler when the\n * user hovers the a content element.\n */\n setActive: function(e) {\n TYPO3.jQuery(\\'.pagecontainer .active\\').removeClass(\\'active\\').addClass(\\'inactive\\');\n if (e) {\n $element = TYPO3.jQuery(e.target);\n if (!$element.hasClass(\\'t3-page-ce\\')) {\n $element = $element.closest(\\'.t3-page-ce\\');\n }\n if ($element) {\n $element.removeClass(\\'inactive\\').addClass(\\'active\\');\n e.stopPropagation();\n }\n }\n }\n }\n\n TYPO3.jQuery(function() {\n typo3pageModule.init();\n });\n ');\n\n $this->addJsLibrary(\n 'templavoila_mod1',\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extRelPath('templavoila') . 'Resources/Public/JavaScript/templavoila.js'\n );\n\n if (isset($this->modTSconfig['properties']['javascript.']) && is_array($this->modTSconfig['properties']['javascript.'])) {\n // add custom javascript files\n foreach ($this->modTSconfig['properties']['javascript.'] as $key => $filename) {\n if ($filename) {\n if (substr($filename, 0, 4) == 'EXT:') {\n list($extKey, $local) = explode('/', substr($filename, 4), 2);\n if (strcmp($extKey, '')\n && \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::isLoaded($extKey)\n && strcmp($local, '')\n ) {\n $filename = \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extRelPath($extKey) . $local;\n }\n }\n $this->addJsLibrary($key, $filename);\n }\n }\n }\n\n $this->handleIncomingCommands();\n\n // Start creating HTML output\n\n $render_editPageScreen = true;\n\n // Show message if the page is of a special doktype:\n if ($this->rootElementTable == 'pages') {\n // Initialize the special doktype class:\n $specialDoktypesObj =& GeneralUtility::getUserObj('Extension\\\\Templavoila\\\\Module\\\\Mod1\\\\Specialdoktypes', '');\n $specialDoktypesObj->init($this);\n $doktype = $this->rootElementRecord['doktype'];\n\n // if doktype is configured as editType render normal edit view\n $docTypesToEdit = $this->modTSconfig['properties']['additionalDoktypesRenderToEditView'];\n if ($docTypesToEdit && GeneralUtility::inList($docTypesToEdit, $doktype)) {\n //Make sure it is editable by page module\n $doktype = self::DOKTYPE_NORMAL_EDIT;\n }\n\n $methodName = 'renderDoktype_' . $doktype;\n if (method_exists($specialDoktypesObj, $methodName)) {\n $result = $specialDoktypesObj->$methodName($this->rootElementRecord);\n if ($result !== false) {\n $this->content .= $result;\n if (TemplaVoilaUtility::getBackendUser()->isPSet($this->calcPerms, 'pages', 'edit')) {\n // Edit icon only if page can be modified by user\n $editLinkContent\n = $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render()\n . TemplaVoilaUtility::getLanguageService()->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:editPage');\n $this->content .= '<br/><br/><strong>' . $this->link_edit($editLinkContent, 'pages', $this->id) . '</strong>';\n }\n $render_editPageScreen = false; // Do not output editing code for special doctypes!\n }\n }\n }\n\n if ($render_editPageScreen) {\n $editCurrentPageHTML = '';\n\n // warn if page renders content from other page\n if ($this->rootElementRecord['content_from_pid']) {\n $contentPage = BackendUtility::getRecord('pages', (int)$this->rootElementRecord['content_from_pid']);\n $title = BackendUtility::getRecordTitle('pages', $contentPage);\n $linkToPid = BackendUtility::getModuleUrl($this->moduleName, ['id' => (int)$this->rootElementRecord['content_from_pid']]);\n $link = '<a href=\"' . $linkToPid . '\">' . htmlspecialchars($title) . ' (PID ' . (int)$this->rootElementRecord['content_from_pid'] . ')</a>';\n\n $this->moduleTemplate->addFlashMessage(\n sprintf(TemplaVoilaUtility::getLanguageService()->getLL('content_from_pid_title'), $link),\n '',\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::WARNING\n );\n }\n // Render \"edit current page\" (important to do before calling ->sideBarObj->render() - otherwise the translation tab is not rendered!\n $editCurrentPageHTML .= $this->render_editPageScreen();\n\n if (GeneralUtility::_GP('ajaxUnlinkRecord')) {\n $this->render_editPageScreen();\n echo $this->render_sidebar();\n exit;\n }\n\n $this->content .= $editCurrentPageHTML;\n\n // Create sortables\n if (is_array($this->sortableContainers)) {\n $script =\n 'var sortableSource = null' . \"\\n\"\n . 'var sortable_containers = ' . json_encode($this->sortableContainers) . ';' . \"\\n\"\n . 'var sortable_removeHidden = ' . ($this->MOD_SETTINGS['tt_content_showHidden'] !== '0' ? 'false;' : 'true;') . \"\\n\"\n . 'var sortable_linkParameters = \\'' . $this->link_getParameters() . '\\';';\n\n $linkedTogether = json_encode(array_keys($this->sortableContainers));\n $script .= 'require([\\'jquery\\', \\'jquery-ui/sortable\\'], function ($) {TYPO3.jQuery(function() {';\n foreach ($this->sortableContainers as $key => $unused) {\n $script .= \"\\n\" . 'tv_createSortable(\\'' . $key . '\\',' . $linkedTogether . ');';\n }\n $script .= '});});';\n $this->content .= GeneralUtility::wrapJS($script);\n }\n }\n } else { // No access or no current page uid:\n if (!isset($pageInfoArr['uid'])) {\n $this->moduleTemplate->addFlashMessage(\n TemplaVoilaUtility::getLanguageService()->getLL('page_not_found'),\n TemplaVoilaUtility::getLanguageService()->getLL('title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::INFO\n );\n } else {\n $this->moduleTemplate->addFlashMessage(\n TemplaVoilaUtility::getLanguageService()->getLL('default_introduction'),\n TemplaVoilaUtility::getLanguageService()->getLL('title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::INFO\n );\n }\n }\n\n $cmd = GeneralUtility::_GP('cmd');\n if ($cmd == 'crPage') { // create a new page\n $this->content = $this->wizardsObj->renderWizard_createNewPage((int) GeneralUtility::_GP('positionPid'));\n }\n\n $this->moduleTemplate->setTitle(TemplaVoilaUtility::getLanguageService()->getLL('title'));\n if (is_array($pageInfoArr)) {\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($pageInfoArr);\n if ($cmd != 'crPage') {\n $this->moduleTemplate->getView()->assign('tabMenu', $this->render_sidebar());\n $this->setDocHeaderButtons();\n }\n }\n $this->moduleTemplate->setContent($this->content);\n }", "title": "" }, { "docid": "a61a789fa6f55cbf01678ed0159e9cc4", "score": "0.5438461", "text": "public function get_content(){\n\t\t$data = Content::find_all();\n\t\treturn $this->get_feed( $data );\n\t}", "title": "" }, { "docid": "c2c42135da459fbe2ec2f22af276cf15", "score": "0.5435506", "text": "public function prepareContent()\n {\n return;\n }", "title": "" }, { "docid": "674f4d786c7cb1a5c6f7d716be5af407", "score": "0.54334956", "text": "protected function getContent() {\n $page_content = $this->getPageContent($this->url->getView());\n $this->template->set('title', $page_content['title']);\n $this->template->set('keywords', $page_content['title']);\n $this->template->set('description', $page_content['title']);\n $this->template->set('page_title', $page_content['title']);\n $this->template->set('page_content', $page_content['text']);\n $this->template->set('tpl_name', 'page'); // Setting template file from tmpl directory\n }", "title": "" }, { "docid": "4dda098567b559bb82351e25bd3022e2", "score": "0.54334307", "text": "public final function get_content()\n {\n }", "title": "" }, { "docid": "4dda098567b559bb82351e25bd3022e2", "score": "0.54334307", "text": "public final function get_content()\n {\n }", "title": "" }, { "docid": "4dda098567b559bb82351e25bd3022e2", "score": "0.54334307", "text": "public final function get_content()\n {\n }", "title": "" }, { "docid": "addf81c65fcf27bd1c36377e26933662", "score": "0.5431654", "text": "public function renderContent() {}", "title": "" }, { "docid": "996014b2741a959f1e46602b8ccfb7f1", "score": "0.5430834", "text": "function populate_movie_columns($column,$post_id){\n\n //featured image column\n if($column == 'page_featured_image'){\n //if this page has a featured image\n if(has_post_thumbnail($post_id)){\n $post_featured_image = get_the_post_thumbnail($post_id,'thumbnail');\n // echo $post_featured_image;\n echo the_post_thumbnail( array(140,100) );\n }else{\n echo 'This custom post has no featured image'; \n }\n }\n\n //page content column\n if($column == 'page_content'){\n //get the page based on its post_id\n $page = get_post($post_id);\n if($page){\n //get the main content area\n $page_content = apply_filters('the_content', $page->post_content); \n echo wp_trim_words( get_the_content(), 10);\n }\n }\n}", "title": "" }, { "docid": "e2a0167d282eddc10d1b3a2a97605b52", "score": "0.5420682", "text": "public function GetContent()\n\t{\t$sql = 'SELECT * FROM coursecontent WHERE ccid=' . (int)$this->details['ccid'];\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\tif ($row = $this->db->FetchArray($result))\n\t\t\t{\t$this->content = $row;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "175a2f4f40ef30d7790ca8a568f4fdf6", "score": "0.5420481", "text": "protected function render_content() {}", "title": "" }, { "docid": "175a2f4f40ef30d7790ca8a568f4fdf6", "score": "0.5420481", "text": "protected function render_content() {}", "title": "" }, { "docid": "175a2f4f40ef30d7790ca8a568f4fdf6", "score": "0.5420481", "text": "protected function render_content() {}", "title": "" }, { "docid": "bee66406e69d1141e9b3b229335acbee", "score": "0.54194146", "text": "function moduleContent() {\n switch((string)$this->MOD_SETTINGS[\"function\"]) {\n case 1:\n\t\t\t\t\t// Selecting all extensions that HAS repository records associated.\n\t\t\t\t$query=\"SELECT \n\t\t\t\t\t\t\ttx_extrep_keytable.extension_key, \n\t\t\t\t\t\t\ttx_extrep_keytable.owner_fe_user, \n\t\t\t\t\t\t\ttx_extrep_keytable.title, \n\t\t\t\t\t\t\ttx_extrep_keytable.members_only,\n\t\t\t\t\t\t\ttx_extrep_repository.version, \n\t\t\t\t\t\t\ttx_extrep_repository.datasize_gz\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tFROM tx_extrep_keytable,tx_extrep_repository\n\t\t\t\t\t\tWHERE tx_extrep_keytable.uid=tx_extrep_repository.extension_uid\n\t\t\t\t\t\tAND tx_extrep_keytable.pid=\".intval($this->id).\" \n\t\t\t\t\t\tAND tx_extrep_repository.pid=\".intval($this->id).\n\t\t\t\t\t\tt3lib_BEfunc::deleteClause(\"tx_extrep_keytable\").\n\t\t\t\t\t\tt3lib_BEfunc::deleteClause(\"tx_extrep_repository\").\n\t\t\t\t\t\t\" ORDER BY tx_extrep_keytable.owner_fe_user\";\n\n\t\t\t\t$res = mysql(TYPO3_db, $query);\n\t\t\t\techo mysql_error();\n\t\t\t\t$grouping=array();\n\t\t\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\t\t$grouping[$row[\"extension_key\"]][]=$row;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t// Displaying them:\n\t\t\t\t$content=\"\";\n\t\t\t\t$prevUser=0;\n\t\t\t\t$prevCount=0;\n\t\t\t\t$prevCount_mem=0;\n\t\t\t\t$allCount=0;\n\t\t\t\t$allCount_mem=0;\n\t\t\t\t$allCount_users=0;\n\n\t\t\t\treset($grouping);\n\t\t\t\twhile(list($extKey,$subrecords)=each($grouping))\t{\n\t\t\t\t\t\t\n\t\t\t\t\t$subcontent=\"\";\n\t\t\t\t\t$size=0;\n\t\t\t\t\t$c=0;\n\t\t\t\t\t$title=\"\";\n\t\t\t\t\treset($subrecords);\n\t\t\t\t\twhile(list(,$rec)=each($subrecords))\t{\n\t\t\t\t\t\t$subcontent.='<tr>\n\t\t\t\t\t\t\t<td>'.$rec[\"version\"].'</td>\n\t\t\t\t\t\t\t<td nowrap>'.t3lib_div::formatSize($rec[\"datasize_gz\"]).'</td>\n\t\t\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t$size+=$rec[\"datasize_gz\"];\n\t\t\t\t\t\t$title=$rec[\"title\"];\n\t\t\t\t\t\t$owner_fe_user=$rec[\"owner_fe_user\"];\n\t\t\t\t\t\t$members_only=$rec[\"members_only\"];\n\t\t\t\t\t\t$c++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($prevUser!=$owner_fe_user)\t{\n\t\t\t\t\t\t$allCount_users++;\n\t\t\t\t\t\tif ($prevUser)\t{\n\t\t\t\t\t\t\t$content.='<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=3>Count: '.($prevCount-$prevCount_mem).'+'.$prevCount_mem.'='.$prevCount.'<BR><BR><BR></td>\n\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t$prevCount=0;\n\t\t\t\t\t\t\t$prevCount_mem=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$content.='<tr bgcolor=\"'.$this->doc->bgColor2.'\">\n\t\t\t\t\t\t\t\t<td colspan=3><BR><strong>User: '.$this->getUserName($owner_fe_user).'</strong><BR></td>\n\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t}\n\n\t\t\t\t\t$prevCount++;\n\t\t\t\t\t$allCount++;\n\t\t\t\t\tif ($members_only)\t{\n\t\t\t\t\t\t$prevCount_mem++;\n\t\t\t\t\t\t$allCount_mem++;\n\t\t\t\t\t}\n\t\t\t\t\t$prevUser=$owner_fe_user;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$content.='<tr bgcolor=\"'.(!$members_only?$this->doc->bgColor5:$this->doc->bgColor6).'\">\n\t\t\t\t\t\t\t<td nowrap colspan=3><strong>'.$title.'</strong> - <em>'.$extKey.'</em></td>\n\t\t\t\t\t\t</tr>';\n\t\t\t\t\t$content.='<tr bgcolor=\"'.$this->doc->bgColor4.'\">\n\t\t\t\t\t\t\t<td nowrap'.($c>10?' bgcolor=\"red\"':'').'>'.$c.'</td>\n\t\t\t\t\t\t\t<td nowrap'.($size>500000?' bgcolor=\"red\"':'').'>'.t3lib_div::formatSize($size).'</td>\n\t\t\t\t\t\t\t<td>'.$this->getUserName($owner_fe_user).'</td>\n\t\t\t\t\t\t</tr>';\n\t\t\t\t\t$content.=$subcontent;\n\t\t\t\t}\n\n\t\t\t\t\t// For the last user, set count:\n\t\t\t\t$content.='<tr>\n\t\t\t\t\t\t<td colspan=3>Count: '.($prevCount-$prevCount_mem).'+'.$prevCount_mem.'='.$prevCount.'<BR><BR><BR></td>\n\t\t\t\t\t</tr>';\n\t\t\t\t\t\n\t\t\t\t$listcontent='<table border=0 cellpadding=0 cellspacing=1>'.$content.'</table>';\n\t\t\t\t\n\t\t\t\t\t// Begin stats:\n\t\t\t\t$content='<strong>All users:</strong> '.$allCount_users.'<BR>';\n\t\t\t\t$content.='<strong>Public+Member=All:</strong> '.($allCount-$allCount_mem).'+'.$allCount_mem.'='.$allCount.'<BR>';\n\t\t\t\t\n $this->content.=$this->doc->section(\"All stats:\",$content,0,1);\n $this->content.=$this->doc->section(\"Extension keys with uploads:\",$listcontent,0,1);\n break;\n case 2:\n\t\t\t\t\t// Selecting all extensions that HAS repository records associated.\n\t\t\t\t$uids = $this->getAllKeyUidsWithUploads();\n\n\t\t\t\tif (count($uids))\t{\n\t\t\t\t\t$query=\"SELECT \n\t\t\t\t\t\t\ttx_extrep_keytable.*\n\t\t\t\t\t\tFROM tx_extrep_keytable\n\t\t\t\t\t\tWHERE tx_extrep_keytable.uid NOT IN (\".implode(\",\",$uids).\")\n\t\t\t\t\t\tAND tx_extrep_keytable.pid=\".intval($this->id).\n\t\t\t\t\t\tt3lib_BEfunc::deleteClause(\"tx_extrep_keytable\").\"\n\t\t\t\t\t\tORDER BY \".(t3lib_div::GPvar(\"sortUsername\")?\" owner_fe_user\":\" crdate\");\n\n\t\t\t\t\t$trows=array();\n\t\t\t\t\t$trows[]='<tr bgcolor=\"'.$this->doc->bgColor5.'\">\n\t\t\t\t\t\t<td>Ext. Key:</td>\n\t\t\t\t\t\t<td><a href=\"'.t3lib_div::linkThisScript(array(\"sortUsername\"=>1)).'\">Username:</a></td>\n\t\t\t\t\t\t<td>Creation date:</td>\n\t\t\t\t\t</tr>';\n\n\t\t\t\t\t$res = mysql(TYPO3_db, $query);\n\t\t\t\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\t\t\t$trows[]='<tr>\n\t\t\t\t\t\t\t<td>'.$row[\"extension_key\"].'</td>\n\t\t\t\t\t\t\t<td>'.$this->getUserName($row[\"owner_fe_user\"]).'</td>\n\t\t\t\t\t\t\t<td>'.t3lib_BEfunc::calcAge(time()-$row[\"crdate\"],$GLOBALS[\"LANG\"]->php3Lang[\"labels\"][\"minutesHoursDaysYears\"]).'</td>\n\t\t\t\t\t\t</tr>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$content='<table border=1 cellpadding=0 cellspacing=0>'.implode(\"\",$trows).'</table>';\n \t $this->content.=$this->doc->section(\"Extension keys without uploaded versions:\",$content,0,1);\n\t\t\t\t}\n break;\n case 3:\n\t\t\t\t\t// Selecting all extensions that HAS repository records associated.\n\t\t\t\t$uids = $this->getAllKeyUidsWithUploads();\n\n\t\t\t\tif (count($uids))\t{\n\t\t\t\t\t$query=\"SELECT \n\t\t\t\t\t\t\tuid,extension_key, version, last_upload_date, extension_uid\n\t\t\t\t\t\tFROM tx_extrep_repository\n\t\t\t\t\t\tWHERE tx_extrep_repository.extension_uid NOT IN (\".implode(\",\",$uids).\")\n\t\t\t\t\t\tAND tx_extrep_repository.pid=\".intval($this->id).\n\t\t\t\t\t\tt3lib_BEfunc::deleteClause(\"tx_extrep_repository\").\"\n\t\t\t\t\t\tORDER BY extension_uid,version_int\n\t\t\t\t\t\t\";\n\n\t\t\t\t\tif (t3lib_div::GPvar(\"_DELETE_ALL\"))\t{\n\t\t\t\t\t\t$versions=array();\n\t\t\t\t\t\t$res = mysql(TYPO3_db, $query);\n\t\t\t\t\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\t\t\t\t$versions[]=$row[\"extension_key\"].\"-\".$row[\"extension_uid\"].\"-\".$row[\"version\"];\n\n\t\t\t\t\t\t\t\t// Delete:\n\t\t\t\t\t\t\tmysql(TYPO3_db,\"DELETE FROM tx_extrep_repository WHERE uid=\".intval($row[\"uid\"]));\n\t\t\t\t\t\t\techo mysql_error();\n\t\t\t\t\t\t}\t\t\t\t\t\n\n\n\t\t\t\t\t\t$content='Deleted:<BR><BR> <em>'.implode(\"<BR>\",$versions).'</em>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$trows=array();\n\t\t\t\t\t\t$trows[]='<tr bgcolor=\"'.$this->doc->bgColor5.'\">\n\t\t\t\t\t\t\t<td>Ext. key</td>\n\t\t\t\t\t\t\t<td>Ext. uid</td>\n\t\t\t\t\t\t\t<td>Version:</td>\n\t\t\t\t\t\t\t<td>Last upload:</td>\n\t\t\t\t\t\t</tr>';\n\t\n\t\t\t\t\t\t$res = mysql(TYPO3_db, $query);\n\t\t\t\t\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\t\t\t\t$trows[]='<tr>\n\t\t\t\t\t\t\t\t<td>'.$row[\"extension_key\"].'</td>\n\t\t\t\t\t\t\t\t<td>'.$row[\"extension_uid\"].'</td>\n\t\t\t\t\t\t\t\t<td>'.$row[\"version\"].'</td>\n\t\t\t\t\t\t\t\t<td>'.t3lib_BEfunc::calcAge(time()-$row[\"last_upload_date\"],$GLOBALS[\"LANG\"]->php3Lang[\"labels\"][\"minutesHoursDaysYears\"]).'</td>\n\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$content='<table border=1 cellpadding=0 cellspacing=2>'.implode(\"\",$trows).'</table>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$content.='<input type=\"submit\" name=\"_DELETE_ALL\" value=\"Delete All Lost\">';\n\t\t\t\t\t}\n\t\t\t\t\t\n \t $this->content.=$this->doc->section(\"Uploads with no extension key:\",$content,0,1);\n\t\t\t\t}\n break;\n\t\t\tcase \"4\":\n\t\t\t\t$query = \"SELECT uid FROM tx_extrep_downloadstat \n\t\t\t\t\t\tGROUP BY download_path_hash\";\n\t\t\t\t$res = mysql(TYPO3_db,$query);\n\t\t\t\t$totalCount=mysql_num_rows($res);\n\n\t\t\t\t$query = \"SELECT count(*) FROM tx_extrep_downloadstat\";\n\t\t\t\t$res = mysql(TYPO3_db,$query);\n\t\t\t\t$totalCountAll=mysql_num_rows($res);\n\n\t\t\t\t$query = \"SELECT count(*) AS number_connect, download_referer FROM tx_extrep_downloadstat \n\t\t\t\t\t\tGROUP BY download_path_hash \n\t\t\t\t\t\tORDER BY number_connect DESC\n\t\t\t\t\t\tLIMIT 300\";\n\t\t\t\t$res = mysql(TYPO3_db,$query);\n\n\t\t\t\t$lines=array();\n\t\t\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\t\tlist($ref) = explode(\"mod/tools/em/index.php\",$row[\"download_referer\"]);\n\t\t\t\t\t$lines[]='<tr><td>'.$row[\"number_connect\"].'</td><td><a href=\"'.$ref.'\" target=\"NEWWINDOW\">'.$ref.'</a> - <a href=\"'.substr($ref,0,-6).'\" target=\"NEWWINDOW\">SITE</a></td></tr>';\n\t\t\t\t}\n\n\t\t\t\t$content=\"\";\n\t\t\t\t$content.=\"Total connection: \".$totalCountAll.\"<BR>\";\n\t\t\t\t$content.=\"Total unique installations connected: \".$totalCount.\"<BR>\";\n\t\t\t\t$content.='<table border=1 cellpadding=0 cellspacing=0>'.implode(\"\",$lines).'</table>';\n\t\t\t\t\n \t $this->content.=$this->doc->section(\"Statistics:\",$content,0,1);\n\t\t\tbreak;\n } \n }", "title": "" }, { "docid": "9c03abd0847f7a63b7c96161aa529d4a", "score": "0.54151016", "text": "function getContentEditor () {\n $DEB = Ruth::getObject (\"DEB\");\n $buttons = \"update,delete\";\n\n $buttons = \"update,delete\";\n $toolBar[\"caption\"] = \"Content\";\n\n $customFields[\"TITLE\"] = [\"validation\" => \"required:true\"];\n $customFields[\"DESCRIPTION\"] = [\"type\" => \"text\"];\n $customFields[\"IMAGE_PATH\"] = [\"type\" => \"text\", \"validation\" => \"required:false\"];\n $customFields[\"CONTENT\"] = [\"type\" => \"custom\", \"call\" => \"(new Kim())->getEditor\"];\n $customFields[\"STATUS\"] = [\"type\" => \"lookup\", \"list\" => [\"Active\" => \"Active\", \"Disabled\" => \"Disabled\"]];\n $customFields[\"ORDER_INDEX\"] = [\"validation\" => \"required:true\", \"defaultValue\" => 100];\n\n $tableInfo = [\"table\" => \"kim_content\", \"primarykey\" => \"content_id\"];\n $html = (new Cody())->bootStrapTable(\n $sql=\"select content_id, title, description from kim_content order by order_index\",\n $buttons,\n $hideColumns=\"\",\n $toolBar,\n $customFields,\n \"Content\",\n $tableInfo,\n $formHideColumns=\"content_id\");\n\n\n\n return $html;\n }", "title": "" }, { "docid": "9288709f84fba52925f90bb41d5d62e0", "score": "0.5410292", "text": "public function getContent()\n {\n $this->addFieldCache('content');\n\n if (!isset($this->data['fields']['content']) &&\n !$this->isFieldInQuery('content'))\n {\n $this->loadFull();\n }\n // Still not set? It can only be null\n if (!isset($this->data['fields']['content'])) {\n $this->data['fields']['content'] = null;\n }\n\n return $this->data['fields']['content'];\n }", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.5388318", "text": "public function getContent();", "title": "" }, { "docid": "cecd3f19f6642ff3e3c2f1336b9420af", "score": "0.5382951", "text": "public function getContentObjectRenderer() {}", "title": "" }, { "docid": "d95cfa0bb766cab7769f9dd41c7c36d9", "score": "0.5375855", "text": "public function content() {\r\n $output = '';\r\n do_action('cmbd_before_business_page_content');\r\n $output .= CMBusinessDirectoryBusinessPage::loadTemplateView('content', array(\r\n 'post' => get_post(),\r\n 'post_meta' => (object) get_post_meta($this->post->ID),\r\n ), true);\r\n return $output;\r\n }", "title": "" }, { "docid": "f10c0e0d5343c3f1b6763ad07685e92d", "score": "0.5374586", "text": "public function generateContent();", "title": "" }, { "docid": "8045d85f3e0a264e8bff429c46a1d196", "score": "0.5372558", "text": "public function get_property_main_content()\n\t{\n\t\t$type = self::TYPE_HTML;\n\t\t$key = \"main_content\";\n\t\tif (!in_array($type, self::$validTypes)) {\n\t\t\tthrow new \\Exception(\"{$type} is invalid type\");\n\t\t}\n\t\tif (!isset($this->row[$key])) {\n\t\t\treturn null;\n\t\t}\n\t\t// $hobj = new HEDObject();\n\t\t// if (!is_array($this->row) && (get_class($this->row) != get_class($hobj))) {\n\t\t// \treturn null;\n\t\t// }\n\t\t$method=\"get_\".$type;\n\t\t$v = $this->get_html($key);\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "cefbcdafcac8ce0748e65e72d1062165", "score": "0.5369806", "text": "protected function getModuleContent() {}", "title": "" }, { "docid": "745efee86ecc9d899fe777b94463d554", "score": "0.53691155", "text": "public function view()\n\t{\n\t\t$category = NULL;\n\t\t$fieldClass = 'IPS\\cms\\Fields' . \\IPS\\cms\\Databases\\Dispatcher::i()->databaseId;\n\t\t$catClass = 'IPS\\cms\\Categories' . \\IPS\\cms\\Databases\\Dispatcher::i()->databaseId;\n\t\t$database = \\IPS\\cms\\Databases::load( \\IPS\\cms\\Databases\\Dispatcher::i()->databaseId );\n\t\t$breadcrumbs = NULL;\n\n\t\ttry\n\t\t{\n\t\t\t$category = $catClass::loadAndCheckPerms( \\IPS\\cms\\Databases\\Dispatcher::i()->categoryId );\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'node_error', '2T254/2', 403, '' );\n\t\t}\n\t\t\n\t\t$customFields = $fieldClass::data( 'view', $category, $fieldClass::FIELD_SKIP_TITLE_CONTENT );\n\n\t\tif ( ! $database->use_categories )\n\t\t{\n\t\t\t$breadcrumbs = \\IPS\\Output::i()->breadcrumb;\n\t\t}\n\t\t\n\t\t$RecordsClass = $category::$contentItemClass;\n\t\t\t\t\n\t\t/* Check cookie */\n\t\t$where = array();\n\t\t$cookie = $category->getFilterCookie();\n\t\t\n\t\tif ( $cookie !== NULL )\n\t\t{\n\t\t\tforeach( $cookie as $f => $v )\n\t\t\t{\n\t\t\t\t$k = 'content_field_' . $f;\n\t\t\t\tif ( isset( $customFields[ $f ] ) and !isset( \\IPS\\Request::i()->$k ) and $v !== '___any___' )\n\t\t\t\t{\n\t\t\t\t\tif ( \\is_array( $v ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( array_key_exists( 'start', $v ) or array_key_exists( 'end', $v ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start = ( $v['start'] instanceof \\IPS\\DateTime ) ? $v['start']->getTimestamp() : \\intval( $v['start'] );\n\t\t\t\t\t\t\t$end = ( $v['end'] instanceof \\IPS\\DateTime ) ? $v['end']->getTimestamp() : \\intval( $v['end'] );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( $start or $end )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$where[] = array( '( ' . mb_substr( $k, 8 ) . ' BETWEEN ' . $start . ' AND ' . $end . ' )' );\n\t\t\t\t\t\t\t}\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$like = array();\n\t\t\t\t\t\t\tforeach( $v as $val )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( $val === 0 or ! empty( $val ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$like[] = \"CONCAT( ',', \" . mb_substr( $k, 8 ) . \", ',') LIKE '%,\" . \\IPS\\Db::i()->real_escape_string( $val ) . \",%'\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where[] = array( '( ' . \\IPS\\Db::i()->in( mb_substr( $k, 8 ), $v ) . ( \\count( $like ) ? \" OR (\" . implode( ' OR ', $like ) . ') )' : ')' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( \\is_bool( $v ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* YesNo fields are false or true */\n\t\t\t\t\t\t\tif ( $v === false )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$where[] = array( '(' . mb_substr( $k, 8 ) . ' IS NULL or ' . mb_substr( $k, 8 ) . '=0)' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$where[] = array( mb_substr( $k, 8 ) . \"=1\" );\n\t\t\t\t\t\t\t}\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\tif ( $v !== 0 and ! $v )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$where[] = array( mb_substr( $k, 8 ) . \" IS NULL\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$where[] = array( mb_substr( $k, 8 ) . \"=?\", $v );\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\t\n\t\t\t\t\tstatic::$activeFilters[ $f ] = array( 'field' => $customFields[ $f ], 'value' => $customFields[ $f ]->displayValue( $v ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( ! \\count( $where ) )\n\t\t{\n\t\t\t$where = NULL;\n\t\t}\n\t\t\n\t\t$table = new \\IPS\\Helpers\\Table\\Content( 'IPS\\cms\\Records' . \\IPS\\cms\\Databases\\Dispatcher::i()->databaseId, $category->url(), $where, $category, NULL, 'read', isset( \\IPS\\Request::i()->rss ) ? FALSE : TRUE );\n\t\t$table->tableTemplate = array( \\IPS\\cms\\Theme::i()->getTemplate( $category->_template_listing, 'cms', 'database' ), 'categoryTable' );\n\t\t$table->rowsTemplate = array( \\IPS\\cms\\Theme::i()->getTemplate( $category->_template_listing, 'cms', 'database' ), 'recordRow' );\n\t\t$table->baseUrl = $table->baseUrl->setQueryString( 'd', \\IPS\\cms\\Databases\\Dispatcher::i()->databaseId );\n\t\t$table->hover = TRUE;\n\t\t$table->sortBy\t\t = ( isset( \\IPS\\Request::i()->sortby ) ) ? \\IPS\\Request::i()->sortby : ( $database->field_sort ? $RecordsClass::$databaseTable . '.' . $RecordsClass::$databasePrefix . $database->field_sort : 'record_last_comment' );\n\t\t$table->sortDirection = ( isset( \\IPS\\Request::i()->sortdirection ) ) ? \\IPS\\Request::i()->sortdirection : ( $database->field_direction ? $database->field_direction : 'desc' );\n\t\t$table->limit\t\t = $database->field_perpage ? $database->field_perpage : 25;\n\t\t$table->title = \\IPS\\Member::loggedIn()->language()->addToStack( $database->use_categories ? 'x_records_in_this_category' : 'x_records' , FALSE, array( 'sprintf' => array( $RecordsClass::contentCount( $category, FALSE ), $database->recordWord( $RecordsClass::contentCount( $category, FALSE ) ) ) ) );\n\n\t\t/* Set up sort fields to allow sorting numerically or by date */\n\t\t$sortFields = $customFields;\n\t\t$sortFields[ $database->field_title ] = $fieldClass::load( $database->field_title );\n\t\tforeach( $sortFields as $id => $obj )\n\t\t{\n\t\t\tif ( $table->sortBy == $RecordsClass::$databaseTable . '.' . 'field_' . $id OR $table->sortBy == 'field_' . $id )\n\t\t\t{\n\t\t\t\tif ( $obj->type == 'Number' )\n\t\t\t\t{\n\t\t\t\t\t$table->sortOptions[ $table->sortBy ] = 'LENGTH(`field_' . $id . '`) ' . $table->sortDirection . ',`field_' . $id . '`';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telseif( $obj->type == 'Date' )\n\t\t\t\t{\n\t\t\t\t\t$table->sortOptions[ $table->sortBy ] = 'CAST(`field_' . $id . '` AS UNSIGNED)';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Make sure table doesn't add breadcrumbs if we're not using categories */\n\t\tif ( ! $database->use_categories )\n\t\t{\n\t\t\t\\IPS\\Output::i()->breadcrumb = $breadcrumbs;\n\t\t}\n\n\t\t/* Custom Search */\n\t\t$filterOptions = array(\n\t\t\t\t'all'\t\t\t=> 'content_all_records',\n\t\t\t\t'open'\t\t\t=> 'content_open_records',\n\t\t\t\t'locked'\t\t=> 'content_locked_records',\n\t\t);\n\t\t$timeFrameOptions = array(\n\t\t\t\t'show_all'\t\t\t=> 'show_all',\n\t\t\t\t'today'\t\t\t\t=> 'today',\n\t\t\t\t'last_5_days'\t\t=> 'last_5_days',\n\t\t\t\t'last_7_days'\t\t=> 'last_7_days',\n\t\t\t\t'last_10_days'\t\t=> 'last_10_days',\n\t\t\t\t'last_15_days'\t\t=> 'last_15_days',\n\t\t\t\t'last_20_days'\t\t=> 'last_20_days',\n\t\t\t\t'last_25_days'\t\t=> 'last_25_days',\n\t\t\t\t'last_30_days'\t\t=> 'last_30_days',\n\t\t\t\t'last_60_days'\t\t=> 'last_60_days',\n\t\t\t\t'last_90_days'\t\t=> 'last_90_days',\n\t\t);\n\n\t\tif ( \\IPS\\Member::loggedIn()->member_id AND \\IPS\\Member::loggedIn()->last_visit)\n\t\t{\n\t\t\t$timeFrameOptions['since_last_visit'] = \\IPS\\Member::loggedIn()->language()->addToStack('since_last_visit', FALSE, array( 'sprintf' => array( \\IPS\\DateTime::ts( \\IPS\\Member::loggedIn()->last_visit ) ) ) );\n\t\t}\n\n\t\t$sortBy = array(\n\t\t\t'record_updated'\t=> 'content_record_last_updated',\n\t\t\t'record_comments'\t\t=> 'content_record_comments',\n\t\t\t'record_views'\t\t\t=> 'content_record_views',\n\t\t\t'field_' . $database->field_title\t=> 'content_record_title',\n\t\t\t'record_publish_date'\t=> 'content_record_publish_date'\n\t\t);\n\t\t\n\t\t/* Ensure we have all sort options available */\n\t\t$table->sortOptions = array_unique( array_merge( $table->sortOptions, array_combine( array_keys( $sortBy ), array_keys( $sortBy ) ) ) );\n\t\t\n\t\t/* To avoid confusion, label 'updated' as 'Recently Updated' as last comment */\n\t\t\\IPS\\Member::loggedIn()->language()->words[ $table->langPrefix . 'sort_updated' ] = \\IPS\\Member::loggedIn()->language()->addToStack('content_record_last_comment');\n\n\t\tif ( !isset( $sortBy[ $database->field_sort ] ) )\n\t\t{\n\t\t\tswitch ( $database->field_sort )\n\t\t\t{\n\t\t\t\tcase 'primary_id_field':\n\t\t\t\t\t$sortBy[ $database->field_sort ] = 'database_field__id';\n\t\t\t\t\t$table->sortOptions['database_field__id'] = $database->field_sort;\n\t\t\t\t\t\\IPS\\Member::loggedIn()->language()->words['sort_database_field__id'] = \\IPS\\Member::loggedIn()->language()->addToStack('database_field__id');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'member_id':\n\t\t\t\t\t$sortBy[ $database->field_sort ] = 'database_field__member';\n\t\t\t\t\t$table->sortOptions['database_field__member'] = $database->field_sort;\n\t\t\t\t\t\\IPS\\Member::loggedIn()->language()->words['sort_database_field__member'] = \\IPS\\Member::loggedIn()->language()->addToStack('database_field__member');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'record_rating':\n\t\t\t\t\t$sortBy[ $database->field_sort ] = 'database_field__rating';\n\t\t\t\t\t$table->sortOptions['rating'] = $database->field_sort;\n\t\t\t\t\t\\IPS\\Member::loggedIn()->language()->words['sort_database_field__rating'] = \\IPS\\Member::loggedIn()->language()->addToStack('database_field__rating');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( !$database->options['comments'] )\n\t\t{\n\t\t\tunset ( $sortBy['record_last_comment'] );\n\t\t\tunset ( $sortBy['record_comments'] );\n\t\t\tunset ( $table->sortOptions['record_last_comment'] );\n\t\t\tunset ( $table->sortOptions['record_comments'] );\n\t\t\tunset ( $table->sortOptions['last_comment'] );\n\t\t\tunset ( $table->sortOptions['num_comments'] );\n\t\t}\n\n\t\tif ( !$database->options['reviews'] )\n\t\t{\n\t\t\tunset ( $table->sortOptions['num_reviews'] );\n\t\t\tunset( $table->sortOptions['rating'] );\n\t\t}\n\n\t\t/* If the sort field isn't one of the above, best add it */\n\t\tif ( mb_substr( $database->field_sort, 0, 6 ) === 'field_' )\n\t\t{\n\t\t\tif ( $database->field_title !== mb_substr( $database->field_sort, 6 ) )\n\t\t\t{\n\t\t\t\t$sortBy[ $database->field_sort ] = \\IPS\\Member::loggedIn()->language()->addToStack( 'content_field_' . mb_substr( $database->field_sort, 6 ) );\n\t\t\t\t$table->sortOptions[ $database->field_sort ] = $database->field_sort;\n\t\t\t}\n\t\t}\n\n\t\t$table->advancedSearch = array(\n\t\t\t'record_type'\t => array( \\IPS\\Helpers\\Table\\SEARCH_SELECT, array( 'options' => $filterOptions ) ),\n\t\t\t'sort_by'\t\t => array( \\IPS\\Helpers\\Table\\SEARCH_SELECT, array( 'options' => $sortBy ) ),\n\t\t\t'sort_direction' => array( \\IPS\\Helpers\\Table\\SEARCH_SELECT, array( 'options' => array(\n\t\t\t\t'asc'\t\t\t=> 'asc',\n\t\t\t\t'desc'\t\t\t=> 'desc',\n\t\t\t) )\n\t\t\t),\n\t\t\t'time_frame'\t=> array( \\IPS\\Helpers\\Table\\SEARCH_SELECT, array( 'options' => $timeFrameOptions ) ),\n\t\t);\n\n\t\tforeach( $customFields as $obj )\n\t\t{\n\t\t\tif ( $obj->filter )\n\t\t\t{\n\t\t\t\t\\IPS\\Member::loggedIn()->language()->words['content_field_' . $obj->id ] = $obj->_title;\n\t\t\t\tif ( \\in_array( $obj->type, array( 'Date', 'DateRange' ) ) )\n\t\t\t\t{\n\t\t\t\t\t$table->advancedSearch[ 'content_field_' . $obj->id ] = array( \\IPS\\Helpers\\Table\\SEARCH_DATE_RANGE, array( 'noDefault' => true ) );\n\t\t\t\t}\n\t\t\t\telse if ( $obj->type == 'Number' )\n\t\t\t\t{\n\t\t\t\t\t$table->advancedSearch[ 'content_field_' . $obj->id ] = array( \\IPS\\Helpers\\Table\\SEARCH_NUMERIC_TEXT, array( 'noDefault' => true ) );\n\t\t\t\t}\n\t\t\t\telse if ( $obj->type == 'YesNo' )\n\t\t\t\t{\n\t\t\t\t\t$table->advancedSearch[ 'content_field_' . $obj->id ] = array( \\IPS\\Helpers\\Table\\SEARCH_BOOL, array( 'noDefault' => true ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$table->advancedSearch[ 'content_field_' . $obj->id ] = array( \\IPS\\Helpers\\Table\\SEARCH_SELECT, array( 'options' => $obj->extra, 'multiple' => TRUE, 'noDefault' => true ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$table->advancedSearch['sort_by'][1]['options']['field_' . $obj->id ] = 'content_field_' . $obj->id;\n\t\t\t}\n\n\t\t\tif ( \\in_array( $obj->type, array( 'Date', 'DateRange' ) ) )\n\t\t\t{\n\t\t\t\t$table->sortOptions[ 'field_' . $obj->id ] = 'CAST(`field_' . $obj->id . '` AS UNSIGNED)';\n\t\t\t}\n\t\t\telse if ( $obj->type == 'Number' )\n\t\t\t{\n\t\t\t\t$table->sortOptions[ 'field_' . $obj->id ] = 'LENGTH(`field_' . $obj->id . '`) ' . $table->sortDirection . ',`field_' . $obj->id . '`';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$table->sortOptions[ 'field_' . $obj->id ] = isset( $table->sortOptions[ 'field_' . $obj->id ] ) ? $table->sortOptions[ 'field_' . $obj->id ] : 'field_' . $obj->id;\n\t\t\t}\n\t\t}\n\n\t\t$table->advancedSearchCallback = function( $table, $values ) use ( $database, $sortBy, $customFields )\n\t\t{\n\t\t\t/* Type */\n\t\t\tforeach( $values as $k => $v )\n\t\t\t{\n\t\t\t\tif ( mb_substr( $k, 0, 14 ) === 'content_field_' )\n\t\t\t\t{\n\t\t\t\t\tif ( \\is_array( $v ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( array_key_exists( 'start', $v ) or array_key_exists( 'end', $v ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start = ( $v['start'] instanceof \\IPS\\DateTime ) ? $v['start']->getTimestamp() : \\intval( $v['start'] );\n\t\t\t\t\t\t\t$end = ( $v['end'] instanceof \\IPS\\DateTime ) ? $v['end']->getTimestamp() : \\intval( $v['end'] );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( $start or $end )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$table->where[] = array( '( ' . mb_substr( $k, 8 ) . ' BETWEEN ' . $start . ' AND ' . $end . ' )' );\n\t\t\t\t\t\t\t}\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$like = array();\n\t\t\t\t\t\t\tforeach( $v as $val )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( $val === 0 or ! empty( $val ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$like[] = \"CONCAT( ',', \" . mb_substr( $k, 8 ) . \", ',') LIKE '%,\" . \\IPS\\Db::i()->real_escape_string( $val ) . \",%'\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$table->where[] = array( '( ' . \\IPS\\Db::i()->in( mb_substr( $k, 8 ), $v ) . ( \\count( $like ) ? \" OR (\" . implode( ' OR ', $like ) . ') )' : ')' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $v !== '___any___' )\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif ( \\is_bool( $v ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* YesNo fields are false or true */\n\t\t\t\t\t\t\t\tif ( $v === false )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$table->where[] = array( '(' . mb_substr( $k, 8 ) . ' IS NULL or ' . mb_substr( $k, 8 ) . '=0)' );\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$table->where[] = array( mb_substr( $k, 8 ) . \"=1\" );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( $v !== 0 and ! $v )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$table->where[] = array( mb_substr( $k, 8 ) . \" IS NULL\" );\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$table->where[] = array( mb_substr( $k, 8 ) . \"=?\", $v );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$key = mb_substr( $k, 14 );\n\t\t\t\t\t\\IPS\\cms\\modules\\front\\database\\category::$activeFilters[ $key ] = array( 'field' => $customFields[ $key ], 'value' => $customFields[ $key ]->displayValue( $v ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $values['record_type'] ) )\n\t\t\t{\n\t\t\t\tswitch ( $values['record_type'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'open':\n\t\t\t\t\t\t$table->where[] = 'record_locked=0';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'locked':\n\t\t\t\t\t\t$table->where[] = 'record_locked=1';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Sort */\n\t\t\tif ( isset( $values['sort_by'] ) and isset( $sortBy[ $values['sort_by'] ] ) )\n\t\t\t{\n\t\t\t\tif ( isset( $customFields[ mb_substr( $values['sort_by'], 6 ) ] ) and $customFields[ mb_substr( $values['sort_by'], 6 ) ]->type == 'Number' )\n\t\t\t\t{\n\t\t\t\t\t$table->sortOptions[ $values['sort_by'] ] = 'LENGTH(`' . $values['sort_by'] . '`) ' . $table->sortDirection . ',`' . $values['sort_by'] . '`';\n\t\t\t\t}\n\t\t\t\telseif( isset( $customFields[ mb_substr( $values['sort_by'], 6 ) ] ) and $customFields[ mb_substr( $values['sort_by'], 6 ) ]->type == 'Date' )\n\t\t\t\t{\n\t\t\t\t\t$table->sortOptions[ $values['sort_by'] ] = 'CAST(`' . $values['sort_by'] . '` AS UNSIGNED)';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$table->sortOptions[ $values['sort_by'] ] = $values['sort_by'];\n\t\t\t\t}\n\n\t\t\t\t$table->sortBy = $values['sort_by'];\n\t\t\t\t$table->sortDirection = $values['sort_direction'];\n\t\t\t}\n\n\t\t\t/* Cutoff */\n\t\t\t$days = NULL;\n\t\t\tif ( isset( $values['time_frame'] ) )\n\t\t\t{\n\t\t\t\tswitch ( $values['time_frame'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'today':\n\t\t\t\t\t\t$days = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_5_days':\n\t\t\t\t\t\t$days = 5;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_7_days':\n\t\t\t\t\t\t$days = 7;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_10_days':\n\t\t\t\t\t\t$days = 10;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_15_days':\n\t\t\t\t\t\t$days = 15;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_20_days':\n\t\t\t\t\t\t$days = 20;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_25_days':\n\t\t\t\t\t\t$days = 25;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_30_days':\n\t\t\t\t\t\t$days = 30;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_60_days':\n\t\t\t\t\t\t$days = 60;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last_90_days':\n\t\t\t\t\t\t$days = 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'since_last_visit':\n\t\t\t\t\t\t$table->where[] = array( 'record_last_comment>?', \\IPS\\Member::loggedIn()->last_visit );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( $days !== NULL )\n\t\t\t\t{\n\t\t\t\t\t$table->where[] = array( 'record_last_comment>?', \\IPS\\DateTime::create()->sub( new \\DateInterval( 'P' . $days . 'D' ) )->getTimestamp() );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/* RSS */\n\t\tif ( $database->rss )\n\t\t{\n\t\t\t$rssUrl = $table->baseUrl->setQueryString('rss', 1 );\n\t\t\t$rssName = $database->_title . ': ' . $category->metaTitle();\n\t\t\t\\IPS\\Output::i()->rssFeeds[ $rssName ] = $rssUrl;\n\t\t\t\n\t\t\t/* Show RSS feed */\n\t\t\tif ( isset( \\IPS\\Request::i()->rss ) )\n\t\t\t{\n\t\t\t\t$rssName = \\IPS\\Member::loggedIn()->language()->get('content_db_' . $database->id ) . ': ' . $category->metaTitle();\n\t\t\t\t$document = \\IPS\\Xml\\Rss::newDocument( $table->baseUrl, $rssName, $rssName );\n\t\t\t\t$contentField = 'field_' . $database->field_content;\n\t\t\t\t\n\t\t\t\tforeach ( $table->getRows( array() ) as $record )\n\t\t\t\t{\n\t\t\t\t\tif ( ! $record->hidden() )\n\t\t\t\t\t{\n\t\t\t\t\t\t$content = $record->$contentField;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $record->record_image )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$content = \\IPS\\cms\\Theme::i()->getTemplate( $category->_template_listing, 'cms', 'database' )->rssItemWithImage( $content, $record->record_image );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$document->addItem( $record->_title, $record->url(), $content, \\IPS\\DateTime::ts( ( $record->record_last_comment > $record->record_publish_date ) ? $record->record_publish_date : $record->record_last_comment ), $record->_id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\t/* @note application/rss+xml is not a registered IANA mime-type so we need to stick with text/xml for RSS */\n\t\t\t\t\\IPS\\Output::i()->sendOutput( $document->asXML(), 200, 'text/xml', array(), TRUE );\n\t\t\t}\n\t\t}\n\n\t\t/* Update location */\n\t\t$permissions = $category->permissions();\n\t\t\\IPS\\Session::i()->setLocation( $category->url(), explode( \",\", $permissions['perm_view'] ), 'loc_cms_viewing_db_cat', array( 'content_db_' . $database->id => TRUE, 'content_cat_name_' . $category->id => TRUE ) );\n\n\t\t\\IPS\\Output::i()->cssFiles = array_merge( \\IPS\\Output::i()->cssFiles, \\IPS\\Theme::i()->css( 'records/list.css', 'cms', 'front' ) );\n\n\t\t$stringTable = (string) $table;\n\t\t\n\t\t\\IPS\\cms\\Databases\\Dispatcher::i()->output .= \\IPS\\cms\\Theme::i()->getTemplate( $category->_template_listing, 'cms', 'database' )->categoryHeader( $category, $stringTable, static::$activeFilters );\n\t\t\n\t\tif ( ( $category->hasChildren() AND $category->show_records ) OR ! $category->hasChildren() )\n\t\t{\n\t\t\t\\IPS\\cms\\Databases\\Dispatcher::i()->output .= $stringTable;\n\t\t}\n\t\t\n\t\t\\IPS\\Output::i()->title = ( $table->page > 1 ) ? \\IPS\\Member::loggedIn()->language()->addToStack( 'title_with_page_number', FALSE, array( 'sprintf' => array( $category->pageTitle(), $table->page ) ) ) : $category->pageTitle();\n\t\t\\IPS\\cms\\Databases\\Dispatcher::i()->output .= \\IPS\\cms\\Theme::i()->getTemplate( $category->_template_listing, 'cms', 'database' )->categoryFooter( $category, $stringTable, static::$activeFilters );\n\t}", "title": "" }, { "docid": "2573815fb4d93b050d005df3f83b000e", "score": "0.53685206", "text": "function pageContent($page){\n\t\t\tif($page == 'otherpage')\n\t\t\t\t$query = $this->link->prepare(\"select * from otherpage\");\n\t\t\t\t\n\t\t\t$query->execute();\n\t\t\t$pageContent = $query->fetchALL(PDO::FETCH_ASSOC);\n\t\t\treturn $pageContent;\n\t\t}", "title": "" }, { "docid": "eed085dabd01563b2327c86161f94eb4", "score": "0.5366344", "text": "function moduleContent() {\n global $LANG;\n\t\t\t$vars = t3lib_div::_GET('P');\n\n\t\t\t// error checks\n\t\t\t$error = array();\n\t\t\t// check if CE has been saved once!\n\t\t\tif (intval($vars['uid'])==0) {\n\t\t\t\t$error[] = $LANG->getLL('error-neversavesd');\n\t\t\t} else {\n\t\t\t\t\t// get the single record\n\t\t\t\t$where = 'uid='.intval($vars['uid']).' AND deleted=0';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', $where);\n\t\t\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\n\t\t\t\t$this->languagePrefix = ($row['sys_language_uid']>0) ? '-'.$row['sys_language_uid'] : '';\n\n\t\t\t\t\t// read the flexform settings and transform it to array\n\t\t\t\t$flexformArray = t3lib_div::xml2array($row['pi_flexform']);\n\t\t\t\t$flexformArray = $flexformArray['data']['sDEF']['lDEF'];\n\n\t\t\t\t\t// get all the infos we need\n\t\t\t\t$path = $this->checkPath(trim($flexformArray['path']['vDEF']));\n\t\t\t\t$sort = trim($flexformArray['categoryOrder']['vDEF']);\n\t\t\t\t$title = explode(chr(10), trim($flexformArray['title']['vDEF']));\n\t\t\t}\n\n\t\t\tif ($path=='') {\n\t\t\t\t$error[] = $LANG->getLL('error-path');\n\t\t\t}\n\t\t\t/*elseif(!is_dir($path)) {\n\t\t\t\t$error[] = $LANG->getLL('error-pathwrong');\n\t\t\t}*/\n\n\t\t\t// any error occured?\n\t\t\tif (count($error)>0) {\n\t\t\t\tforeach ($error as $single) {\n \t\t\t$errors.= '<li>'.$single.'</li>';\n \t\t}\n\t\t\t\t$content.= '<h2>'.$LANG->getLL('error-header').'</h2>\n\t\t\t\t\t\t\t\t\t\t<div style=\"padding:10px;margin:10px;border:1px solid darkorange;font-style:bold;\">\n\t\t\t\t\t\t\t\t\t\t\t<ul>'.$errors.'</ul>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:close();\">'.$LANG->getLL('close').'</a>\n\t\t\t\t';\n\t\t\t}\n\n\t\t\t else {\n\n\t $dir = $this->getFullDir(PATH_site.$path, $sort);\n\n\t /*\n\t * save\n\t */\n\t\t\t\t$saveVars = t3lib_div::_POST('dir');\n\t #print_r($saveVars);\n\t if(count($saveVars)>0) {\n\t\t\t\t\tforeach ($dir as $key=>$value) {\n\t\t\t\t#\t\t$key2 = $key-1;\n\t\t\t\t\t\tt3lib_div::writeFile($value['path'].'info'.$this->languagePrefix.'.txt',$saveVars[$key]);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$dir = $this->getFullDir(PATH_site.$path, $sort);\n\n\t\t\t\t// get all the images from the directory\n\t\t\t\t$fileTypes = 'jpg,gif,png';\n\t\t\t\t$imageList = t3lib_div::getFilesInDir(PATH_site.$path, $fileTypes,1,1);\n\n\t\t\t\t\t// oputput of the image list\n\t\t\t\t$content.= '<h2>'.sprintf($LANG->getLL('path'), count($dir), $path).'</h2>';\n\t\t\t\t$content.= '<table cellpadding=\"1\" cellspacing=\"1\" class=\"bgColor4\" width=\"100%\" id=\"el\">';\n\n\t\t\t\t$i=0;\n\t\t\t\tforeach ($dir as $key=>$value) {\n\t\t\t\t#\t$thumb = $this->getThumbNail($singleImage, 100);\n\t\t\t\t#\t$fileName = basename($singleImage);\n\t\t\t\t#\t$desc = $descriptionList[$i];\n\t\t\t\t\t$checkForFiles = t3lib_div::getFilesInDir($value['path'], $fileTypes, 1,1);\n\n\t\t\t\t\tif (count($checkForFiles)>1) {\n\t\t\t\t\t\t$content.= '<tr class=\"'.($i++ % 2==0 ? 'bgColor3' : 'bgColor4').'\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td><br />#'.$i.': <strong>'.$value['path'].'</strong><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'.$LANG->getLL('title').': '.$title[$i-1].' <br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<textarea name=\"dir['.$key.']\" style=\"width:535px;height:50px;\">'.$value['description'].'</textarea></td>\n\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t$content.='</table>';\n\n\n\t#\t\t\t$content.= '<form name=\"editform\" id=\"editform\">';\n\n\t\t\t\tlist($rUri) = explode('#',t3lib_div::getIndpEnv('REQUEST_URI'));\n\t\t\t\t\t// save the image titles, popup will be closes after submit\n\t\t\t\t$content = '\n\t\t\t\t\t<form action=\"\" action=\"'.htmlspecialchars($rUri).'\" method=\"post\" name=\"editform\">\n\t\t\t\t\t\t'.$content.'\n\t\t\t\t\t\t<div id=\"send\" style=\"margin:5px 10px;\">\n\t\t\t\t\t\t\t<input type=\"submit\" value=\"'.$LANG->getLL('save2').'\" />\n\t\t\t\t\t\t\t<br /><br /><a href=\"javascript:close();\" >'.$LANG->getLL('close').'</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t';\n\t\t\t}\n\n\n\n\t\t\t\t// return everything\n\t\t\t$this->content.=$this->doc->section('',$content,0,1);\n }", "title": "" }, { "docid": "5d656d0ac60b2ae3608c126ac32b07f8", "score": "0.53647417", "text": "function admin_post_columns_content( $column_key ) {\n global $post;\n //Get the ID of that post\n $post_id = $post->ID;\n $html = '';\n\n foreach ($this->settings['admin_columns'] as $key => $col) {\n if ($column_key != $key)\n continue;\n\n if (isset($col['post'])) {\n $arr_post = (array)$post;\n $html = isset($arr_post[$col['post']]) ? esc_html($arr_post[$col['post']]) : '';\n } elseif (isset($col['acf'])) {\n $field = get_field_object($col['acf'], $post_id, false);\n\n if (isset($field)) {\n switch ($field['type']) {\n case 'image':\n $image_size = isset($col['image_size']) ? $col['image_size'] : 'thumbnail';\n $html = wp_get_attachment_image(\n $field['value'],\n $image_size\n );\n break;\n default:\n $html = get_field($col['acf'], $post_id);\n }\n }\n } elseif (isset($col['callback'])) {\n $html = call_user_func($col['callback'], $column_key );\n } elseif ( $key == 'featured_image' ) {\n $image_size = isset($col['image_size']) ? $col['image_size'] : 'thumbnail';\n $html = apply_filters('unity3/post/column/featured_image', get_the_post_thumbnail( $post, $image_size ), $key, $col, $post_id );\n }\n\n if ( !empty($html) && isset($col['link']) ) {\n switch ($col['link']) {\n case 'POST_EDIT':\n $edit_label = sprintf(__('Edit %s'), $this->GetPostTypeLabel());\n $html = (\n '<a href=\"' . get_edit_post_link($post_id, null) .\n '\" aria-label=\"'. $edit_label .\n '\" title=\"'. $edit_label . '\">' . $html .\n '</a>');\n break;\n }\n }\n\n echo apply_filters('unity3/post/column/content', $html, $column_key, $post_id);\n }\n }", "title": "" }, { "docid": "865e281a29b0f5d113eca3dbebfe9030", "score": "0.5357018", "text": "public function getContentObject() {}", "title": "" }, { "docid": "6acc5cd9f5820b1773c066d899cfddfd", "score": "0.5355737", "text": "function getCMSFields(){\n\t\t$fields = parent::getCMSFields();\n\t\t$fields->addFieldToTab(\"Root.Content.Main\", new HtmlEditorField(\"TopContent\",\"Top Content\"),\"Content\");\n\t\t$fields->renameField(\"Content\", \"Bottom Content\");\n\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new NumericField(\"FeedItems\",\"Number of Feed Items to Show\"));\n\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new HeaderField(\"PleaseNote\", \"Please note: the RSS feeds got from the following 3 urls must using the same xml schema\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"Feed1URL\",\"URL of Feed #1, this is required\"));\n\t\tif($this->Feed1URL !=''){\n\t\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new LiteralField(\"DownloadSample1\", \"<a tagget=\\\"_blank\\\" href=\\\"\".$this->Link('downloadsample1').\"\\\">Download XML sample file</a>\"));\n\t\t}\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"Feed2URL\",\"URL of Feed #2, this is optional\"));\n\t\tif($this->Feed2URL !=''){\n\t\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new LiteralField(\"DownloadSample2\", \"<a tagget=\\\"_blank\\\" href=\\\"\".$this->Link('downloadsample2').\"\\\">Download XML sample file</a>\"));\n\t\t}\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"Feed3URL\",\"URL of Feed #3, this is optional\"));\n\t\tif($this->Feed3URL !=''){\n\t\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new LiteralField(\"DownloadSample3\", \"<a tagget=\\\"_blank\\\" href=\\\"\".$this->Link('downloadsample3').\"\\\">Download XML sample file</a>\"));\n\t\t}\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"FeedIdentifier\",\"define the tag name for identifying each feed, eg '<b>id</b>', '<b>guid</b>' or '<b>link</b>'\"));\n\t\t\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new HeaderField(\"ContainerElement\", \"Define the tag name in the sample xml file for parsing the feed item\", 3));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"FeedContainer\",\"Container Node for All Feed Items (eg. '<b>channel</b>' or '<b>entry</b>', etc)\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"FeedElement\",\"Node for Feed Items (eg. '<b>item</b>', '<b>entry</b>', etc. Or just leave it blank if you put tag name of the feed items in the Container above)\"));\n\t\t\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new HeaderField(\"NodeNames\", \"Define the tag name in the sample xml file for rendering into SilverStripe template\", 3));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new LiteralField(\"MoreExplain1\", \"To get an element which has namespace in the tag name, use it as normal. eg '<b>itunes:subtitle</b>' or '<b>media:content</b><br />'\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new LiteralField(\"MoreExplain2\", \"To get an element's attribute, using '.' (dot) to separate the tag name and attribute name, eg '<b>enclosure.url</b>' or '<b>media:content.url</b>'\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"NodeForFeedTitle\", \"tag name that is used for Feed Title, eg '<b>title</b>'\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"NodeForFeedLink\", \"tag name that is used for Feed Link, eg '<b>media:content.url</b>' or '<b>link</b>'\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"NodeForFeedDescription\", \"tag name that is used for Feed Description, eg '<b>description</b>' or '<b>summary</b>'\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"NodeForFeedDate\", \"tag name that is used for Feed Date, eg '<b>pubDate</b>' or '<b>updated</b>'\"));\n\t\t$fields->addFieldToTab(\"Root.Content.RSSFeeds\", new TextField(\"NodeForFeedAuthor\", \"tag name that is used for Feed Author, eg '<b>itunes:subtitle</b>'\"));\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "167d272bf65031dafb6a9ff6e6ec3ca2", "score": "0.53541756", "text": "public function stdWrap_setContentToCurrent() {}", "title": "" }, { "docid": "b6231bee378eec86df966975d969292c", "score": "0.53485924", "text": "function getContentObject() ;", "title": "" }, { "docid": "75c4fc8fadafddd4e453f2e4eb26eac6", "score": "0.5348254", "text": "public function get_content_general() {\n\t\t\t/**\n\t\t\t * for content @see include_once( 'class-wpglobus-plus-wpglobeditor.php' ) in wpglobus-plus-main.php\n\t\t\t */\n\t\t}", "title": "" }, { "docid": "f7b770d6eff092c62907f1eac8b7b9c6", "score": "0.5345898", "text": "function blog_content(){\n\tglobal $ssc_database, $ssc_site_path;\n\t\n\t$result = $ssc_database->query(\"SELECT name, comments, page FROM #__blog WHERE id = %d LIMIT 1\", $_GET['path-id']);\n\tif ($result && $data = $ssc_database->fetch_assoc($result)){\n\t\t// Load display library\n\t\tif (!ssc_load_library('sscText')){\n\t\t\tssc_not_found();\n\t\t\treturn;\n\t\t}\n\n\t\t// Get blog settings\n\t\tssc_set_title($data['name']);\n\t\t$_GET['param'] = explode(\"/\", $_GET['param']);\n\t\t$_GET['blog_comments'] = (bool)$data['comments'];\n\t\t$action = array_shift($_GET['param']);\n\n\t\tif ($action == '' || $action == 'page'){\n\t\t\t// Show paged posts\n\t\t\tarray_unshift($_GET['param'], 'page');\n\t\t\tif (count($_GET['param']) > 2)\n\t\t\t\tssc_not_found();\n\t\t\t\t\n\t\t\treturn _blog_gen_post($data['page'], $_GET['path'] . '/page/', \n\t\t\t\t\"SELECT p.id, p.title, p.created, p.urltext, u.displayname author, count(c.post_id) count, p.body, p.commentsdisabled FROM\n\t\t\t\t#__blog_post p LEFT JOIN #__user u ON u.id = p.author_id LEFT JOIN #__blog_comment c ON (post_id = p.id AND (status & %d = 0))\n\t\t\t\tWHERE blog_id = %d AND p.is_draft = 0 GROUP BY p.id ORDER BY p.created DESC\", SSC_BLOG_COMMENT_SPAM, $_GET['path-id']);\n\t\t}\t\t\n\t\telseif ($action == 'tag'){\n\t\t\t// Show posts for the tag\n\n\t\t\tif (count($_GET['param']) == 2 || count($_GET['param']) > 3)\n\t\t\t\tssc_not_found();\n\t\t\t\t\n\t\t\t$tag = array_shift($_GET['param']);\n\t\t\tif (empty($tag))\n\t\t\t\tssc_not_found();\t// If to parameter for the tag, die gracefully\n\t\t\t\t\n\t\t\treturn _blog_gen_post($data['page'], $_GET['path'] . '/tag/'.$tag.'/page/', \n\t\t\t\t\"SELECT p.id, p.title, p.created, p.urltext, u.displayname author, count(c.post_id) count, p.body, p.commentsdisabled FROM \n\t\t\t\t#__blog_post p LEFT JOIN #__user u ON u.id = p.author_id LEFT JOIN #__blog_comment c ON (post_id = p.id AND (status & %d = 0))\n\t\t\t\tLEFT JOIN #__blog_relation r ON r.post_id = p.id LEFT JOIN #__blog_tag t ON t.id = r.tag_id WHERE blog_id = %d AND p.is_draft = 0 AND t.tag = '%s'\n\t\t\t\tGROUP BY p.id ORDER BY p.created DESC\", SSC_BLOG_COMMENT_SPAM, $_GET['path-id'], $tag);\n\t\t\t\n\t\t}\n\t\telseif ($action == 'id'){\n\t\t\t// Redirect as needed\n\t\t\tif (count($_GET['param']) != 1)\n\t\t\t\tssc_not_found();\t// Extra parameters\n\t\t\t\t\n\t\t\t$result = $ssc_database->query(\"SELECT created, urltext FROM #__blog_post WHERE id = %d AND is_draft = 0 LIMIT 1\", (int)array_shift($_GET['param']));\n\t\t\tif ($data = $ssc_database->fetch_object($result)){\n\t\t\t\tssc_redirect($_GET['path'] . date(\"/Y/m/d/\", $data->created) . $data->urltext, 301);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Post ID doesn't exist - kill\n\t\t\tssc_not_found();\n\t\t\t\n\t\t}\n\t\telseif ($action == 'feed'){\n\t\t\t// Internal redirect to atom feed\n\t\t\t$feedPath = $ssc_site_path . '/modules/blog/atom-' . $_GET['path-id'] . '.xml';\n\t\t\t\n\t\t\t// Check if feed exists yet\n\t\t\tif (!file_exists($feedPath))\n\t\t\t\tssc_not_found();\n\n\t\t\t// Try and read it\t\t\t\n\t\t\t$rss = file_get_contents($feedPath);\n\n\t\t\t// See if read success?\n\t\t\tif ($rss === FALSE)\n\t\t\t\tssc_not_found();\t// Guess not - die gracefully\n\t\t\t\t\n\t\t\t// Output rss\n\t\t\theader(\"Content-Type: application/xml\", true);\n\t\t\techo $rss;\n\t\t\t\n\t\t\t// And now quit ...\n\t\t\tssc_close();\n\t\t\t// ... fully\n\t\t\texit (0);\n\t\t}\n\t\telseif ($action == 'atom') {\n\t\t\tif (count($_GET['param']) > 1)\n\t\t\t\tssc_not_found();\n\t\t\t\t\n\t\t\theader(\"Content-Type: application/atom+xml\", true);\n\t\t\tinclude $ssc_site_path . '/modules/blog/rss.inline.php';\n\t\t\t\n\t\t\tssc_close();\n\t\t\texit (0);\n\t\t}\n\t\telse {\n\t\t\t// Not those - is int?\n\t\t\t$action = (int)$action;\n\t\t\t// Check for bad first param\n\t\t\tif ($action == 0){\n\t\t\t\tssc_not_found();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Check if the post name exists?\n\t\t\tif (!empty($_GET['param'][2])){\n\t\t\t\t// Retrieve post\n\t\t\t\t$result = $ssc_database->query(\n\t\t\t\t\t\"SELECT p.id, p.title, p.created, p.urltext, p.commentsdisabled, u.displayname author, p.body FROM #__blog_post p \n\t\t\t\t\tLEFT JOIN #__user u ON u.id = p.author_id WHERE blog_id = %d AND p.is_draft = 0 AND p.urltext = '%s' \n\t\t\t\t\tLIMIT 1\", $_GET['path-id'], $_GET['param'][2]);\n\n\t\t\t\tif (!($data = $ssc_database->fetch_object($result))){\n\t\t\t\t\t// No post with name - kill output\n\t\t\t\t\tssc_not_found();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Don't allow any further params\n\t\t\t\tif (!empty($_GET['param'][3])){\n\t\t\t\t\t// Unless admin, and the param is 'mark'\n\t\t\t\t\tif (login_check_auth(\"blog\") && $_GET['param'][3] == 'mark'){\n\t\t\t\t\t\tif ($ssc_database->query(\"UPDATE #__blog_comment SET status = status | %d WHERE post_id = %d\", SSC_BLOG_COMMENT_READ, $data->id))\n\t\t\t\t\t\t\tssc_add_message(SSC_MSG_INFO, t('Marked the comments as read'));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tssc_not_found();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Comments disabled flag\n\t\t\t\t$comments_disabled = $data->commentsdisabled;\n\t\t\t\t// Post id number\n\t\t\t\t$pid = $data->id;\n\n\t\t\t\t$out = \"\\n<h3>$data->title</h3>\\n\";\n\t\t\t\t$out .= t(\"Posted !date at !time by !author\\n\", \n\t\t\t\t\tarray(\t'!date' => date(ssc_var_get('date_med', SSC_DATE_MED), $data->created),\n\t\t\t\t\t\t\t'!time' => date(ssc_var_get('time_short', SSC_TIME_SHORT), $data->created),\n\t\t\t\t\t\t\t'!author' => $data->author)) . '<br />';\n\t\t\t\t\n\t\t\t\t$result = $ssc_database->query(\"SELECT tag FROM #__blog_relation r, #__blog_tag t WHERE r.tag_id = t.id AND r.post_id = %d ORDER BY tag ASC\", $data->id);\n\t\t\t\t\n\t\t\t\t// Retrieve list of tags for the post\n\t\t\t\tif ($ssc_database->number_rows()){\n\t\t\t\t\t$out .= \"Tagged: \";\n\t\t\t\t\t$txt = '';\n\t\t\t\t\twhile($dat = $ssc_database->fetch_object($result))\n\t\t\t\t\t\t$txt .= ', ' . l($dat->tag, $_GET['path'] . '/tag/' . $dat->tag);\n\t\t\t\t\t\n\t\t\t\t\t$txt = substr($txt, 2);\n\t\t\t\t\t$out .= $txt.'<br />';\n\t\t\t\t}\n\n\t\t\t\t$out .= sscText::convert($data->body);\n\t\t\t\n\t\t\t\tif ($_GET['blog_comments']){\n\t\t\t\t\t// Retrieve comments\n\t\t\t\t\t$out .= '<div class=\"clear\"></div><h3 id=\"comments\">Comments</h3>';\n\t\t\t\t\t\n\t\t\t\t\t// Are we admin?\n\t\t\t\t\t$is_admin = login_check_auth(\"blog\");\n\t\t\t\t\t\n\t\t\t\t\tif ($is_admin){\n\t\t\t\t\t\t$result = $ssc_database->query(\"SELECT id, author, email, site, created, status, body FROM #__blog_comment \n\t\t\t\t\t\tWHERE post_id = %d ORDER BY created ASC\", $data->id, SSC_BLOG_COMMENT_SPAM, SSC_BLOG_COMMENT_SPAM);\n\t\t\t\t\t\t// Start spam/ham/commentstate form\n\t\t\t\t\t\t$out .= '<form action=\"\" method=\"post\"><div><input type=\"hidden\" name=\"form-id\" value=\"blog_spam_ham\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Show (dis-)enable comments button on posts with or without comments\n\t\t\t\t\t\tif ($comments_disabled == 0){\n\t\t\t\t\t\t\t$sub_disable_comments = array(\t'#value' => 'Disable Comments', '#type' => 'submit',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'#name' => \"disable_comments[$pid]\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$sub_disable_comments = array(\t'#value' => 'Enable Comments', '#type' => 'submit', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'#name' => \"enable_comments[$pid]\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Render button\n\t\t\t\t\t\t$out .= theme_render_input($sub_disable_comments);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$result = $ssc_database->query(\"SELECT author, email, site, created, body FROM #__blog_comment \n\t\t\t\t\t\tWHERE post_id = %d AND status & %d = 0 ORDER BY created ASC\", $data->id, SSC_BLOG_COMMENT_SPAM);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!$result || $ssc_database->number_rows($result) == 0){\n\t\t\t\t\t\t// Bad SQL\n\t\t\t\t\t\t$out .= t('There are no comments posted yet.');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Admin user - show spam/ham/commentstate options\n\t\t\t\t\t\tif ($is_admin){\n\t\t\t\t\t\t\t// For each comment, show it, it's visible state, and possible options\n\t\t\t\t\t\t\twhile ($data = $ssc_database->fetch_object($result)){\n\t\t\t\t\t\t\t\t$status = $data->status;\t\n\t\t\t\t\t\t\t\t$out .= \"<div class='\" . ($status & SSC_BLOG_COMMENT_SPAM ? \"blog-spam-icon\" : \"blog-notspam-icon\") . \"'><p>\" . nl2br(check_plain($data->body)) . \"</p><p>\";\n\t\t\t\t\t\t\t\t$out .= t(\"Posted !date at !time by !author\\n\", \n\t\t\t\t\t\t\t\t\t\tarray(\t'!date' => date(ssc_var_get('date_med', SSC_DATE_MED), $data->created),\n\t\t\t\t\t\t\t\t\t\t\t\t'!time' => date(ssc_var_get('time_short', SSC_TIME_SHORT), $data->created),\n\t\t\t\t\t\t\t\t\t\t\t\t'!author' => \n\t\t\t\t\t\t\t\t\t\t(empty($data->site) ? check_plain($data->author) : l(check_plain($data->author), $data->site)))) . '</p>';\n\n\t\t\t\t\t\t\t\t$sub_hide = array('#value' => 'Hide comment', '#type' => 'submit');\n\t\t\t\t\t\t\t\t$sub_show = array('#value' => 'Show comment', '#type' => 'submit');\n\t\t\t\t\t\t\t\t$sub_spam = array('#value' => 'Mark spam', '#type' => 'submit');\n\t\t\t\t\t\t\t\t$sub_ham = array('#value' => 'Unmark spam', '#type' => 'submit');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// If tree for actions\n\t\t\t\t\t\t\t\tif ($status & SSC_BLOG_COMMENT_CAN_SPAM){\n\t\t\t\t\t\t\t\t\t// Hasn't been re-submitted yet\n\t\t\t\t\t\t\t\t\tif ($status & SSC_BLOG_COMMENT_SPAM){\n\t\t\t\t\t\t\t\t\t\t// Was marked as spam\n\t\t\t\t\t\t\t\t\t\t$sub_ham['#name'] = \"ham[$data->id]\";\n\t\t\t\t\t\t\t\t\t\t$out .= theme_render_input($sub_ham);\n\t\t\t\t\t\t\t\t\t\t$sub_show['#name'] = \"show[$data->id]\";\n\t\t\t\t\t\t\t\t\t\t$out .= theme_render_input($sub_show);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t// Was not marked spam\n\t\t\t\t\t\t\t\t\t\t$sub_spam['#name'] = \"spam[$data->id]\";\n\t\t\t\t\t\t\t\t\t\t$out .= theme_render_input($sub_spam);\n\t\t\t\t\t\t\t\t\t\t$sub_hide['#name'] = \"hide[$data->id]\";\n\t\t\t\t\t\t\t\t\t\t$out .= theme_render_input($sub_hide);\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\telse {\n\t\t\t\t\t\t\t\t\t// Has already been resubmitted\n\t\t\t\t\t\t\t\t\tif ($status & SSC_BLOG_COMMENT_SPAM){\n\t\t\t\t\t\t\t\t\t\t// Currently spam/hidden\n\t\t\t\t\t\t\t\t\t\t$sub_show['#name'] = \"show[$data->id]\";\n\t\t\t\t\t\t\t\t\t\t$out .= theme_render_input($sub_show);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t// Marked as normal currently\n\t\t\t\t\t\t\t\t\t\t$sub_hide['#name'] = \"hide[$data->id]\";\n\t\t\t\t\t\t\t\t\t\t$out .= theme_render_input($sub_hide);\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$out .= '</div><hr />';\n\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\telse{\n\t\t\t\t\t\t\t// Just show comments\n\t\t\t\t\t\t\twhile ($data = $ssc_database->fetch_object($result)){\n\t\t\t\t\t\t\t\t//$out .= \"<div class='gravatar' style='background-image: url(\\\"\"._blog_gravatar_get_url($data->email).\"\\\");'>\";\n\t\t\t\t\t\t\t\t$out .= '<p>' . nl2br(check_plain($data->body)) . '</p><p>';\n\t\t\t\t\t\t\t\t$out .= t(\"Posted !date at !time by !author\\n\", \n\t\t\t\t\t\t\t\t\t\tarray(\t'!date' => date(ssc_var_get('date_med', SSC_DATE_MED), $data->created),\n\t\t\t\t\t\t\t\t\t\t\t\t'!time' => date(ssc_var_get('time_short', SSC_TIME_SHORT), $data->created),\n\t\t\t\t\t\t\t\t\t\t\t\t'!author' => \n\t\t\t\t\t\t\t\t\t\t\t(empty($data->site) ? $data->author : l($data->author, $data->site)))) . '</p><hr />'; //'</p></div><hr />';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\t\t\t\t\t// End admin form\n\t\t\t\t\tif ($is_admin)\n\t\t\t\t\t\t$out .= '</div></form>';\n\t\t\t\t\t\n\t\t\t\t\tif (($comments_disabled == 0) || $is_admin) {\n\t\t\t\t\t\t$out .= ssc_generate_form('blog_guest_comment', $pid);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$out .= '<br />' . t(\"Sorry, commenting has been closed on this post.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $out;\n\t\t\t}\n\t\t\telseif (isset($_GET['param'][0])) {\n\t\t\t\t// First param set not expecting anything - kill page\n\t\t\t\tssc_not_found();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Yearly archive\n\t\t\t\treturn _blog_gen_post(10000, $_GET['path'] . '/page/', \n\t\t\t\t\t\"SELECT p.id, p.title, p.created, p.urltext, u.displayname author, count(c.post_id) count, p.commentsdisabled FROM \n\t\t\t\t\t#__blog_post p LEFT JOIN #__blog_comment c ON (post_id = p.id AND (c.status & %d = 0)) LEFT JOIN #__user u ON u.id = p.author_id \n\t\t\t\t\tWHERE blog_id = %d AND p.created >= %d AND p.created < %d AND p.is_draft = 0 GROUP BY p.id ORDER BY p.created DESC\",\n\t\t\t\t\tSSC_BLOG_COMMENT_SPAM, $_GET['path-id'], mktime(0, 0, 0, 1, 1, $action), mktime(0, 0, 0, 1, 0, $action + 1));\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t// Find content\n\t\n\t\n\tssc_not_found();\n}", "title": "" }, { "docid": "1ab16ee8972787b97c75cf686829ce82", "score": "0.5344463", "text": "public function ContentTables()\t{\n\t\t$result = $this->getItems();\n\t\tif ($result) return($result);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9db4fdbcfc84f8c5572e660c8cd7ded0", "score": "0.53439105", "text": "function dx_filter_content( $content = '' ) {\n\t\tglobal $post;\n\t\t\n\t\t$post_id = $post->ID;\n\t\t$page_builder_content = get_post_meta( $post_id, '_dx_epb_pagebuilder' , true );\n\t\t$page_builder_content = apply_filters( 'dx_pagebuider_content' , $page_builder_content );\n\t\t\n\t\treturn $page_builder_content;\n\t}", "title": "" }, { "docid": "b95dc81528373e6c81fbd5b4a647574f", "score": "0.53428966", "text": "public function changeContentSortingAndCopyLivePage() {}", "title": "" }, { "docid": "e67fbdd23e0db799708df90e0b5fbd02", "score": "0.53412914", "text": "public static function displayContentHTML($colData) {\n\n require_once THEMES.\"templates/global/custompage.php\";\n\n $htmlArray = [];\n ob_start();\n if (fusion_get_settings(\"allow_php_exe\")) {\n eval(\"?>\".stripslashes($colData['page_content']).\"<?php \");\n } else {\n echo \"<p>\".parse_textarea($colData['page_content'], TRUE, TRUE, TRUE, IMAGES, FALSE, FALSE).\"</p>\\n\";\n }\n\n $eval = ob_get_contents();\n ob_end_clean();\n $htmlArray['pagenav'] = '';\n $htmlArray['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) ? intval($_GET['rowstart']) : 0;\n $htmlArray['body'] = preg_split(\"/<!?--\\s*pagebreak\\s*-->/i\", self::$info['line_breaks'] == 'y' ? nl2br($eval) : $eval);\n $htmlArray['count'] = count($htmlArray['body']);\n\n if ($htmlArray['count'] > 0) {\n if ($htmlArray['rowstart'] > $htmlArray['count']) {\n redirect(BASEDIR.\"viewpage.php?page_id=\".intval($_GET['page_id']));\n }\n $htmlArray['pagenav'] = makepagenav($htmlArray['rowstart'], 1, $htmlArray['count'], 1, BASEDIR.\"viewpage.php?page_id=\".self::$data['page_id'].\"&amp;\").\"\\n\";\n }\n ob_start();\n\n display_page_content($htmlArray);\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "e3e132e20ce9a487360ebc00a0172556", "score": "0.533912", "text": "function moduleContent()\t{\n\t\tswitch((string)$this->selectedFunction)\t{\n\t\t\tcase 1:\n\t\t\t\t$this->moduleEventContent();\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->moduleCommonContent();\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->moduleSessionPlanning();\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "07d6c5a659d580a8599627daea553d65", "score": "0.5336906", "text": "public function realPageCacheContent() {}", "title": "" }, { "docid": "bf4d155796fb19f35573a3d619a82ea8", "score": "0.53353786", "text": "public function initContent()\n {\n }", "title": "" }, { "docid": "f20563a5d73c167417181a6d7a81b082", "score": "0.53342515", "text": "public function render_content()\n {\n }", "title": "" } ]
0353d03919fcc386eea125fd56b8b1db
$ANTLR end "variable" $ANTLR start "declarator" runtime/Php/test/Antlr/Tests/grammers/t018llstar.g
[ { "docid": "b948b32e6be05904d95c32881fae199c", "score": "0.708556", "text": "public function declarator(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->match($this->input,$this->getToken('ID'),self::$FOLLOW_ID_in_declarator145); \n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" } ]
[ { "docid": "83f6c5288a1a2672cb25f403f135af5d", "score": "0.70147485", "text": "public function variable(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_type_in_variable122);\n $this->type();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_declarator_in_variable124);\n $this->declarator();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('7'),self::$FOLLOW_7_in_variable126); \n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "71d63998477a5e8c3712925c1cc7009c", "score": "0.6548515", "text": "public function declaration(){\n $functionHeader1 = null;\n\n $functionHeader2 = null;\n\n\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n $alt2=3;\n $alt2 = $this->dfa2->predict($this->input);\n switch ($alt2) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_variable_in_declaration73);\n $this->variable();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_functionHeader_in_declaration83);\n $functionHeader1 = $this->functionHeader();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('7'),self::$FOLLOW_7_in_declaration85); \n $this->write($functionHeader1.\" is a declaration\\n\");\n\n }\n break;\n case 3 :\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_functionHeader_in_declaration98);\n $functionHeader2 = $this->functionHeader();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_block_in_declaration100);\n $this->block();\n\n $this->state->_fsp--;\n\n $this->write($functionHeader2.\" is a definition\\n\");\n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "ea723ac86084cacf8547cca4fa30076d", "score": "0.62200063", "text": "public function decl(){\r\n $ID2=null;\r\n\r\n try {\r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:16:6: ( 'var' ID ( '=' expr )? ';' ) \r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:16:8: 'var' ID ( '=' expr )? ';' \r\n {\r\n $this->match($this->input,$this->getToken('15'),self::$FOLLOW_15_in_decl66); \r\n $ID2=$this->match($this->input,$this->getToken('ID'),self::$FOLLOW_ID_in_decl68); \r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:16:17: ( '=' expr )? \r\n $alt2=2;\r\n $LA2_0 = $this->input->LA(1);\r\n\r\n if ( ($LA2_0==$this->getToken('16')) ) {\r\n $alt2=1;\r\n }\r\n switch ($alt2) {\r\n case 1 :\r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:16:18: '=' expr \r\n {\r\n $this->match($this->input,$this->getToken('16'),self::$FOLLOW_16_in_decl71); \r\n $this->pushFollow(self::$FOLLOW_expr_in_decl73);\r\n $this->expr();\r\n\r\n $this->state->_fsp--;\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n $this->match($this->input,$this->getToken('14'),self::$FOLLOW_14_in_decl77); \r\n echo \"found var \" . ($ID2!=null?$ID2->getText():null) . \"\\n\";\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException $re) {\r\n $this->reportError($re);\r\n $this->recover($this->input,$re);\r\n }\r\n catch(Exception $e) {\r\n throw $e;\r\n }\r\n \r\n return ;\r\n }", "title": "" }, { "docid": "b92c71922fb0793ec5eb97a84a1466bd", "score": "0.5863828", "text": "public function aexpr(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_atom_in_aexpr539);\n $this->atom();\n\n $this->state->_fsp--;\n\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n //loop9:\n do {\n $alt9=2;\n $LA9_0 = $this->input->LA(1);\n\n if ( ($LA9_0==$this->getToken('20')) ) {\n $alt9=1;\n }\n\n\n switch ($alt9) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n \t {\n \t $this->match($this->input,$this->getToken('20'),self::$FOLLOW_20_in_aexpr543); \n \t $this->pushFollow(self::$FOLLOW_atom_in_aexpr545);\n \t $this->atom();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop9;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "15015ad5c39cfc123acaa2debcbe72c7", "score": "0.5644113", "text": "function mSTART_TAG(){\n try {\n $name=null;\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchChar(60); \n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt19=2;\n $LA19_0 = $this->input->LA(1);\n\n if ( (($LA19_0>=$this->getToken('9') && $LA19_0<=$this->getToken('10'))||$LA19_0==$this->getToken('13')||$LA19_0==$this->getToken('32')) ) {\n $alt19=1;\n }\n switch ($alt19) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n $nameStart747 = $this->getCharIndex();\n $this->mGENERIC_ID(); \n $name = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $nameStart747, $this->getCharIndex()-1);\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt20=2;\n $LA20_0 = $this->input->LA(1);\n\n if ( (($LA20_0>=$this->getToken('9') && $LA20_0<=$this->getToken('10'))||$LA20_0==$this->getToken('13')||$LA20_0==$this->getToken('32')) ) {\n $alt20=1;\n }\n switch ($alt20) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n $this->output(\"Start Tag: \".($name!=null?$name->getText():null));\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n //loop22:\n do {\n $alt22=2;\n $LA22_0 = $this->input->LA(1);\n\n if ( ($LA22_0==$this->getToken('58')||($LA22_0>=$this->getToken('65') && $LA22_0<=$this->getToken('90'))||$LA22_0==$this->getToken('95')||($LA22_0>=$this->getToken('97') && $LA22_0<=$this->getToken('122'))) ) {\n $alt22=1;\n }\n\n\n switch ($alt22) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $this->mATTRIBUTE(); \n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t $alt21=2;\n \t $LA21_0 = $this->input->LA(1);\n\n \t if ( (($LA21_0>=$this->getToken('9') && $LA21_0<=$this->getToken('10'))||$LA21_0==$this->getToken('13')||$LA21_0==$this->getToken('32')) ) {\n \t $alt21=1;\n \t }\n \t switch ($alt21) {\n \t case 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $this->mWS(); \n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop22;\n }\n } while (true);\n\n $this->matchChar(62); \n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "bc0c00d56ff530e101dc431dfde51538", "score": "0.56398666", "text": "public function program(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n $cnt1=0;\n //loop1:\n do {\n $alt1=2;\n $LA1_0 = $this->input->LA(1);\n\n if ( ($LA1_0==$this->getToken('ID')||($LA1_0>=$this->getToken('11') && $LA1_0<=$this->getToken('13'))) ) {\n $alt1=1;\n }\n\n\n switch ($alt1) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n \t {\n \t $this->pushFollow(self::$FOLLOW_declaration_in_program51);\n \t $this->declaration();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt1 >= 1 ) break 2;//loop1;\n $eee =\n new EarlyExitException(1, $this->input);\n throw $eee;\n }\n $cnt1++;\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "63971a4e6bfcf3b413ec71cc343f71c1", "score": "0.5633793", "text": "public function formalParameter(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_type_in_formalParameter213);\n $this->type();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_declarator_in_formalParameter215);\n $this->declarator();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "219ae7e24cc23cc689a41c14bc37c28e", "score": "0.55782187", "text": "public function atom(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n $alt10=3;\n $LA10 = $this->input->LA(1);\n if($this->getToken('ID')== $LA10)\n {\n $alt10=1;\n }\n else if($this->getToken('INT')== $LA10)\n {\n $alt10=2;\n }\n else if($this->getToken('8')== $LA10)\n {\n $alt10=3;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 10, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt10) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->match($this->input,$this->getToken('ID'),self::$FOLLOW_ID_in_atom565); \n\n }\n break;\n case 2 :\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->match($this->input,$this->getToken('INT'),self::$FOLLOW_INT_in_atom579); \n\n }\n break;\n case 3 :\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->match($this->input,$this->getToken('8'),self::$FOLLOW_8_in_atom593); \n $this->pushFollow(self::$FOLLOW_expr_in_atom595);\n $this->expr();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('10'),self::$FOLLOW_10_in_atom597); \n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "435936853df01571f7367a149c27e809", "score": "0.54710877", "text": "function yy_r47(){\n\t$this->_retvalue = new AOWP_PHPDeclareStatementElement($this->yystack[$this->yyidx + -4]->minor, $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "6dfc773e07fbc9447b0395fb75eec6a4", "score": "0.5467686", "text": "public function type(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n if ( $this->input->LA(1)==$this->getToken('ID')||($this->input->LA(1)>=$this->getToken('11') && $this->input->LA(1)<=$this->getToken('13')) ) {\n $this->input->consume();\n $this->state->errorRecovery=false;\n } else {\n $mse = new MismatchedSetException(null,$this->input);\n throw $mse;\n }\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "2326abc31c9eede0d99ff7f28af00b5c", "score": "0.52234083", "text": "public function block(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->match($this->input,$this->getToken('14'),self::$FOLLOW_14_in_block304); \n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n //loop5:\n do {\n $alt5=2;\n $LA5_0 = $this->input->LA(1);\n\n if ( ($LA5_0==$this->getToken('ID')) ) {\n $LA5_2 = $this->input->LA(2);\n\n if ( ($LA5_2==$this->getToken('ID')) ) {\n $alt5=1;\n }\n\n\n }\n else if ( (($LA5_0>=$this->getToken('11') && $LA5_0<=$this->getToken('13'))) ) {\n $alt5=1;\n }\n\n\n switch ($alt5) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n \t {\n \t $this->pushFollow(self::$FOLLOW_variable_in_block318);\n \t $this->variable();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop5;\n }\n } while (true);\n\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n //loop6:\n do {\n $alt6=2;\n $LA6_0 = $this->input->LA(1);\n\n if ( (($LA6_0>=$this->getToken('ID') && $LA6_0<=$this->getToken('INT'))||($LA6_0>=$this->getToken('7') && $LA6_0<=$this->getToken('8'))||$LA6_0==$this->getToken('14')||$LA6_0==$this->getToken('16')) ) {\n $alt6=1;\n }\n\n\n switch ($alt6) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n \t {\n \t $this->pushFollow(self::$FOLLOW_stat_in_block333);\n \t $this->stat();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop6;\n }\n } while (true);\n\n $this->match($this->input,$this->getToken('15'),self::$FOLLOW_15_in_block344); \n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "7ad3222d62a05ef10f0dac378553ce3b", "score": "0.5214707", "text": "function mT__8(){\n try {\n $_type = t044traceLexer::T_T__8;\n $_channel = t044traceLexer::DEFAULT_TOKEN_CHANNEL;\n // runtime/Php/test/Antlr/Tests/grammers/t044trace.g\n // runtime/Php/test/Antlr/Tests/grammers/t044trace.g\n {\n $this->matchChar(43); \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "9b406a9891850c37b5d94181c37aef60", "score": "0.5185729", "text": "function yy_r34(){\n\t$this->_retvalue = new AOWP_PHPDefineVariableStatementElement($this->yystack[$this->yyidx + -2]->minor, 'static', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "c08abc801036fdcde42a738f58472d2e", "score": "0.50913996", "text": "public function assignStat(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->match($this->input,$this->getToken('ID'),self::$FOLLOW_ID_in_assignStat460); \n $this->match($this->input,$this->getToken('17'),self::$FOLLOW_17_in_assignStat462); \n $this->pushFollow(self::$FOLLOW_expr_in_assignStat464);\n $this->expr();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "3812760d882ab81f2113caf5b3236255", "score": "0.5023502", "text": "public function stmtNode(): void\n {\n }", "title": "" }, { "docid": "4cb3c555a32b2a3484946487273b7840", "score": "0.49438113", "text": "function mELEMENT(){\n try {\n $t=null;\n $pi=null;\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt18=2;\n $alt18 = $this->dfa18->predict($this->input);\n switch ($alt18) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mSTART_TAG(); \n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n //loop17:\n do {\n $alt17=6;\n $LA17_0 = $this->input->LA(1);\n\n if ( ($LA17_0==$this->getToken('60')) ) {\n $LA17 = $this->input->LA(2);\n if($this->getToken('33')== $LA17)\n {\n $LA17_4 = $this->input->LA(3);\n\n if ( ($LA17_4==$this->getToken('91')) ) {\n $alt17=3;\n }\n else if ( ($LA17_4==$this->getToken('45')) ) {\n $alt17=4;\n }\n\n\n }\n else if($this->getToken('63')== $LA17)\n {\n $alt17=5;\n }\n else if($this->getToken('9')== $LA17||$this->getToken('10')== $LA17||$this->getToken('13')== $LA17||$this->getToken('32')== $LA17||$this->getToken('58')== $LA17||$this->getToken('65')== $LA17||$this->getToken('66')== $LA17||$this->getToken('67')== $LA17||$this->getToken('68')== $LA17||$this->getToken('69')== $LA17||$this->getToken('70')== $LA17||$this->getToken('71')== $LA17||$this->getToken('72')== $LA17||$this->getToken('73')== $LA17||$this->getToken('74')== $LA17||$this->getToken('75')== $LA17||$this->getToken('76')== $LA17||$this->getToken('77')== $LA17||$this->getToken('78')== $LA17||$this->getToken('79')== $LA17||$this->getToken('80')== $LA17||$this->getToken('81')== $LA17||$this->getToken('82')== $LA17||$this->getToken('83')== $LA17||$this->getToken('84')== $LA17||$this->getToken('85')== $LA17||$this->getToken('86')== $LA17||$this->getToken('87')== $LA17||$this->getToken('88')== $LA17||$this->getToken('89')== $LA17||$this->getToken('90')== $LA17||$this->getToken('95')== $LA17||$this->getToken('97')== $LA17||$this->getToken('98')== $LA17||$this->getToken('99')== $LA17||$this->getToken('100')== $LA17||$this->getToken('101')== $LA17||$this->getToken('102')== $LA17||$this->getToken('103')== $LA17||$this->getToken('104')== $LA17||$this->getToken('105')== $LA17||$this->getToken('106')== $LA17||$this->getToken('107')== $LA17||$this->getToken('108')== $LA17||$this->getToken('109')== $LA17||$this->getToken('110')== $LA17||$this->getToken('111')== $LA17||$this->getToken('112')== $LA17||$this->getToken('113')== $LA17||$this->getToken('114')== $LA17||$this->getToken('115')== $LA17||$this->getToken('116')== $LA17||$this->getToken('117')== $LA17||$this->getToken('118')== $LA17||$this->getToken('119')== $LA17||$this->getToken('120')== $LA17||$this->getToken('121')== $LA17||$this->getToken('122')== $LA17)\n {\n $alt17=1;\n }\n\n\n\n }\n else if ( (($LA17_0>=$this->getToken('0') && $LA17_0<=$this->getToken('59'))||($LA17_0>=$this->getToken('61') && $LA17_0<=$this->getToken('65535'))) ) {\n $alt17=2;\n }\n\n\n switch ($alt17) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $this->mELEMENT(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $tStart561 = $this->getCharIndex();\n \t $this->mPCDATA(); \n \t $t = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $tStart561, $this->getCharIndex()-1);\n \t $this->output(\"PCDATA: \\\"\". ($t!=null?$t->getText():null) .\"\\\"\");\n\n \t }\n \t break;\n \tcase 3 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $tStart597 = $this->getCharIndex();\n \t $this->mCDATA(); \n \t $t = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $tStart597, $this->getCharIndex()-1);\n \t $this->output(\"CDATA: \\\"\". ($t!=null?$t->getText():null) .\"\\\"\");\n\n \t }\n \t break;\n \tcase 4 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $tStart633 = $this->getCharIndex();\n \t $this->mCOMMENT(); \n \t $t = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $tStart633, $this->getCharIndex()-1);\n \t $this->output(\"Comment: \\\"\". ($t!=null?$t->getText():null) .\"\\\"\");\n\n \t }\n \t break;\n \tcase 5 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $piStart669 = $this->getCharIndex();\n \t $this->mPI(); \n \t $pi = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $piStart669, $this->getCharIndex()-1);\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop17;\n }\n } while (true);\n\n $this->mEND_TAG(); \n\n }\n break;\n case 2 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mEMPTY_ELEMENT(); \n\n }\n break;\n\n }\n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "2eb077db3e878c6fb1c44fd9755dcdbc", "score": "0.4915951", "text": "function mATTRIBUTE(){\n try {\n $name=null;\n $value=null;\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $nameStart866 = $this->getCharIndex();\n $this->mGENERIC_ID(); \n $name = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $nameStart866, $this->getCharIndex()-1);\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt27=2;\n $LA27_0 = $this->input->LA(1);\n\n if ( (($LA27_0>=$this->getToken('9') && $LA27_0<=$this->getToken('10'))||$LA27_0==$this->getToken('13')||$LA27_0==$this->getToken('32')) ) {\n $alt27=1;\n }\n switch ($alt27) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n $this->matchChar(61); \n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt28=2;\n $LA28_0 = $this->input->LA(1);\n\n if ( (($LA28_0>=$this->getToken('9') && $LA28_0<=$this->getToken('10'))||$LA28_0==$this->getToken('13')||$LA28_0==$this->getToken('32')) ) {\n $alt28=1;\n }\n switch ($alt28) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n $valueStart878 = $this->getCharIndex();\n $this->mVALUE(); \n $value = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $valueStart878, $this->getCharIndex()-1);\n $this->output(\"Attr: \".($name!=null?$name->getText():null).\"=\".($value!=null?$value->getText():null));\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "0992e0cae2d18bf50e0613edef17ec77", "score": "0.49007314", "text": "function yy_r38(){\n\t$this->_retvalue = new AOWP_PHPStatementElement($this->lex->line, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "4a264ac734163edcbd97be49c740c4fd", "score": "0.48879474", "text": "public function expr(){\r\n try {\r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:21:6: ( INT | FLOAT ) \r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g: \r\n {\r\n if ( ($this->input->LA(1)>=$this->getToken('INT') && $this->input->LA(1)<=$this->getToken('FLOAT')) ) {\r\n $this->input->consume();\r\n $this->state->errorRecovery=false;\r\n }\r\n else {\r\n $mse = new MismatchedSetException(null,$this->input);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException $re) {\r\n $this->reportError($re);\r\n $this->recover($this->input,$re);\r\n }\r\n catch(Exception $e) {\r\n throw $e;\r\n }\r\n \r\n return ;\r\n }", "title": "" }, { "docid": "e1fb81fef7393e317d745c172bccb1c1", "score": "0.4858097", "text": "public function file(){\r\n $ID1=null;\r\n\r\n try {\r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:10:6: ( 'program' ID ';' ( decl )+ ) \r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:10:8: 'program' ID ';' ( decl )+ \r\n {\r\n $this->match($this->input,$this->getToken('13'),self::$FOLLOW_13_in_file32); \r\n $ID1=$this->match($this->input,$this->getToken('ID'),self::$FOLLOW_ID_in_file34); \r\n $this->match($this->input,$this->getToken('14'),self::$FOLLOW_14_in_file36); \r\n echo \"found program \" . ($ID1!=null?$ID1->getText():null) . \"\\n\";\r\n // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:13:2: ( decl )+ \r\n $cnt1=0;\r\n //loop1:\r\n do {\r\n $alt1=2;\r\n $LA1_0 = $this->input->LA(1);\r\n\r\n if ( ($LA1_0==$this->getToken('15')) ) {\r\n $alt1=1;\r\n }\r\n\r\n\r\n switch ($alt1) {\r\n \tcase 1 :\r\n \t // C:\\\\data\\\\home\\\\ewger\\\\development\\\\php\\\\antlrPhp\\\\examples\\\\import\\\\Simple.g:13:2: decl \r\n \t {\r\n \t $this->pushFollow(self::$FOLLOW_decl_in_file51);\r\n \t $this->decl();\r\n\r\n \t $this->state->_fsp--;\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t if ( $cnt1 >= 1 ) break 2;//loop1;\r\n $eee =\r\n new EarlyExitException(1, $this->input);\r\n throw $eee;\r\n }\r\n $cnt1++;\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException $re) {\r\n $this->reportError($re);\r\n $this->recover($this->input,$re);\r\n }\r\n catch(Exception $e) {\r\n throw $e;\r\n }\r\n \r\n return ;\r\n }", "title": "" }, { "docid": "17bf47094e019c4dc4b9d3fda931ddcc", "score": "0.48457208", "text": "abstract public static function syntaxPattern(): string;", "title": "" }, { "docid": "6aad591fc2a438683fa706056dc8186f", "score": "0.48348334", "text": "function mXMLDECL(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchString(\"<?\"); \n\n if ( $this->input->LA(1)==$this->getToken('88')||$this->input->LA(1)==$this->getToken('120') ) {\n $this->input->consume();\n\n } else {\n $mse = new MismatchedSetException(null,$this->input);\n $this->recover($mse);\n throw $mse;}\n\n if ( $this->input->LA(1)==$this->getToken('77')||$this->input->LA(1)==$this->getToken('109') ) {\n $this->input->consume();\n\n } else {\n $mse = new MismatchedSetException(null,$this->input);\n $this->recover($mse);\n throw $mse;}\n\n if ( $this->input->LA(1)==$this->getToken('76')||$this->input->LA(1)==$this->getToken('108') ) {\n $this->input->consume();\n\n } else {\n $mse = new MismatchedSetException(null,$this->input);\n $this->recover($mse);\n throw $mse;}\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt14=2;\n $LA14_0 = $this->input->LA(1);\n\n if ( (($LA14_0>=$this->getToken('9') && $LA14_0<=$this->getToken('10'))||$LA14_0==$this->getToken('13')||$LA14_0==$this->getToken('32')) ) {\n $alt14=1;\n }\n switch ($alt14) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n $this->output(\"XML declaration\");\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n //loop16:\n do {\n $alt16=2;\n $LA16_0 = $this->input->LA(1);\n\n if ( ($LA16_0==$this->getToken('58')||($LA16_0>=$this->getToken('65') && $LA16_0<=$this->getToken('90'))||$LA16_0==$this->getToken('95')||($LA16_0>=$this->getToken('97') && $LA16_0<=$this->getToken('122'))) ) {\n $alt16=1;\n }\n\n\n switch ($alt16) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $this->mATTRIBUTE(); \n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t $alt15=2;\n \t $LA15_0 = $this->input->LA(1);\n\n \t if ( (($LA15_0>=$this->getToken('9') && $LA15_0<=$this->getToken('10'))||$LA15_0==$this->getToken('13')||$LA15_0==$this->getToken('32')) ) {\n \t $alt15=1;\n \t }\n \t switch ($alt15) {\n \t case 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $this->mWS(); \n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop16;\n }\n } while (true);\n\n $this->matchString(\"?>\"); \n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "03a35fe6de240227d935d19c8e4ca0be", "score": "0.4831383", "text": "function mVALUE(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt36=2;\n $LA36_0 = $this->input->LA(1);\n\n if ( ($LA36_0==$this->getToken('34')) ) {\n $alt36=1;\n }\n else if ( ($LA36_0==$this->getToken('39')) ) {\n $alt36=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 36, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt36) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchChar(34); \n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n //loop34:\n do {\n $alt34=2;\n $LA34_0 = $this->input->LA(1);\n\n if ( (($LA34_0>=$this->getToken('0') && $LA34_0<=$this->getToken('33'))||($LA34_0>=$this->getToken('35') && $LA34_0<=$this->getToken('65535'))) ) {\n $alt34=1;\n }\n\n\n switch ($alt34) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t if ( ($this->input->LA(1)>=$this->getToken('0') && $this->input->LA(1)<=$this->getToken('33'))||($this->input->LA(1)>=$this->getToken('35') && $this->input->LA(1)<=$this->getToken('65535')) ) {\n \t $this->input->consume();\n\n \t } else {\n \t $mse = new MismatchedSetException(null,$this->input);\n \t $this->recover($mse);\n \t throw $mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop34;\n }\n } while (true);\n\n $this->matchChar(34); \n\n }\n break;\n case 2 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchChar(39); \n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n //loop35:\n do {\n $alt35=2;\n $LA35_0 = $this->input->LA(1);\n\n if ( (($LA35_0>=$this->getToken('0') && $LA35_0<=$this->getToken('38'))||($LA35_0>=$this->getToken('40') && $LA35_0<=$this->getToken('65535'))) ) {\n $alt35=1;\n }\n\n\n switch ($alt35) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t if ( ($this->input->LA(1)>=$this->getToken('0') && $this->input->LA(1)<=$this->getToken('38'))||($this->input->LA(1)>=$this->getToken('40') && $this->input->LA(1)<=$this->getToken('65535')) ) {\n \t $this->input->consume();\n\n \t } else {\n \t $mse = new MismatchedSetException(null,$this->input);\n \t $this->recover($mse);\n \t throw $mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop35;\n }\n } while (true);\n\n $this->matchChar(39); \n\n }\n break;\n\n }\n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "096f74b145d0b51f3fbb09e46828545c", "score": "0.48312795", "text": "function yy_r330(){\n\t$v = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + -4]->minor);\n\t$r = new AOWP_PHPReferenceVariableElement($this->lex->line, $v, $this->yystack[$this->yyidx + -2]->minor);\t\n\t$this->_retvalue = new AOWP_PHPComplexVariableElement($this->lex->line, '${', $r);\n }", "title": "" }, { "docid": "523df8dee55cdf422ddf8a45cc2b5389", "score": "0.48229226", "text": "function mINTERNAL_DTD(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchChar(91); \n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n //loop10:\n do {\n $alt10=2;\n $LA10_0 = $this->input->LA(1);\n\n if ( ($LA10_0==$this->getToken('93')) ) {\n $alt10=2;\n }\n else if ( (($LA10_0>=$this->getToken('0') && $LA10_0<=$this->getToken('92'))||($LA10_0>=$this->getToken('94') && $LA10_0<=$this->getToken('65535'))) ) {\n $alt10=1;\n }\n\n\n switch ($alt10) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $this->matchAny(); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop10;\n }\n } while (true);\n\n $this->matchChar(93); \n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "8c08e4453478a79eb6e1109eecfc9d7f", "score": "0.48168388", "text": "private function _parseUseStatement()\n {\n $namespace = '';\n $alias = '';\n\n while ( is_object( $token = $this->_next() ) )\n {\n switch ( $token->type )\n {\n case ParserTokens::T_STRING:\n $alias = $token->image;\n\n case ParserTokens::T_NS_SEPARATOR:\n $namespace .= $token->image;\n break;\n\n case ParserTokens::T_AS:\n $alias = $this->_tokenizer->next()->image;\n break;\n\n case ParserTokens::T_COMMA:\n case ParserTokens::T_SEMICOLON:\n $this->_aliasMap[$alias] = trim( $namespace, '\\\\' );\n\n return $token;\n }\n }\n throw new EndOfTokenStreamException( $this->_pathName );\n }", "title": "" }, { "docid": "8d8dcebb6ece98e4704669ee2b9efe8a", "score": "0.48138553", "text": "function mT__7(){\n try {\n $_type = t044traceLexer::T_T__7;\n $_channel = t044traceLexer::DEFAULT_TOKEN_CHANNEL;\n // runtime/Php/test/Antlr/Tests/grammers/t044trace.g\n // runtime/Php/test/Antlr/Tests/grammers/t044trace.g\n {\n $this->matchChar(62); \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "9e21ba98ba31e4bad16972706f785b09", "score": "0.47918087", "text": "public function forStat(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->match($this->input,$this->getToken('16'),self::$FOLLOW_16_in_forStat417); \n $this->match($this->input,$this->getToken('8'),self::$FOLLOW_8_in_forStat419); \n $this->pushFollow(self::$FOLLOW_assignStat_in_forStat421);\n $this->assignStat();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('7'),self::$FOLLOW_7_in_forStat423); \n $this->pushFollow(self::$FOLLOW_expr_in_forStat425);\n $this->expr();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('7'),self::$FOLLOW_7_in_forStat427); \n $this->pushFollow(self::$FOLLOW_assignStat_in_forStat429);\n $this->assignStat();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('10'),self::$FOLLOW_10_in_forStat431); \n $this->pushFollow(self::$FOLLOW_block_in_forStat433);\n $this->block();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "2237a7fa3e33d8c9f9f887e83798a705", "score": "0.4762076", "text": "function yy_r32(){\n\t$this->_retvalue = new AOWP_PHPDefineVariableStatementElement($this->yystack[$this->yyidx + -2]->minor, 'global', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "1fb192d544697a1e2a9bb1e97ad5f661", "score": "0.4761616", "text": "protected function parse($src) {\n return (new Parser())->parse(new Lexer($src, '<string:'.$this->name.'>'))->declaration;\n }", "title": "" }, { "docid": "1fb192d544697a1e2a9bb1e97ad5f661", "score": "0.4761616", "text": "protected function parse($src) {\n return (new Parser())->parse(new Lexer($src, '<string:'.$this->name.'>'))->declaration;\n }", "title": "" }, { "docid": "ab613ce7a0de6db904f8a0f2d1d7b816", "score": "0.47450724", "text": "public function functionHeader(){\n $name = null;\n\n $ID3 = null;\n\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_type_in_functionHeader169);\n $this->type();\n\n $this->state->_fsp--;\n\n $ID3=$this->match($this->input,$this->getToken('ID'),self::$FOLLOW_ID_in_functionHeader171); \n $this->match($this->input,$this->getToken('8'),self::$FOLLOW_8_in_functionHeader173); \n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n $alt4=2;\n $LA4_0 = $this->input->LA(1);\n\n if ( ($LA4_0==$this->getToken('ID')||($LA4_0>=$this->getToken('11') && $LA4_0<=$this->getToken('13'))) ) {\n $alt4=1;\n }\n switch ($alt4) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_formalParameter_in_functionHeader177);\n $this->formalParameter();\n\n $this->state->_fsp--;\n\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n //loop3:\n do {\n $alt3=2;\n $LA3_0 = $this->input->LA(1);\n\n if ( ($LA3_0==$this->getToken('9')) ) {\n $alt3=1;\n }\n\n\n switch ($alt3) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n \t {\n \t $this->match($this->input,$this->getToken('9'),self::$FOLLOW_9_in_functionHeader181); \n \t $this->pushFollow(self::$FOLLOW_formalParameter_in_functionHeader183);\n \t $this->formalParameter();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop3;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n $this->match($this->input,$this->getToken('10'),self::$FOLLOW_10_in_functionHeader191); \n $name = ($ID3!=null?$ID3->getText():null);\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return $name;\n }", "title": "" }, { "docid": "dc494047e292a8d23961c4ae977fa554", "score": "0.47411245", "text": "protected function parseUseDeclarations()\n {\n // Consume use keyword\n $this->consumeToken(Tokens::T_USE);\n $this->consumeComments();\n\n // Consume const and function tokens\n $nextToken = $this->tokenizer->peek();\n switch ($nextToken) {\n case Tokens::T_CONST:\n case Tokens::T_FUNCTION:\n $this->consumeToken($nextToken);\n }\n\n // Parse all use declarations\n $this->parseUseDeclaration();\n $this->consumeComments();\n\n // Consume closing semicolon\n $this->consumeToken(Tokens::T_SEMICOLON);\n\n // Reset any previous state\n $this->reset();\n }", "title": "" }, { "docid": "cf06d36839393582fbea842d2dd66184", "score": "0.47391754", "text": "function yy_r58(){\n\t$v = new AOWP_PHPVariableElement($this->yystack[$this->yyidx + -7]->minor, $this->yystack[$this->yyidx + -4]->minor);\n\t$this->_retvalue = new AOWP_PHPCatchStatementElement($this->yystack[$this->yyidx + -7]->minor, $this->yystack[$this->yyidx + -5]->minor, $v, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "a54ed8f9378d25881b014a7c956a57ba", "score": "0.47374398", "text": "function yy_r40(){\n\t$this->_retvalue = new AOWP_PHPUseStatementElement($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "eeb601aeb19b47559f104f18db2b8315", "score": "0.47318554", "text": "function yy_r324(){\n\t$this->_retvalue = '->';\n }", "title": "" }, { "docid": "ade2c6ad2549cc4cdba6f731683231d7", "score": "0.47229496", "text": "public function nextIdentifier();", "title": "" }, { "docid": "31421ff896c4c638ae2822df3574bff8", "score": "0.4695011", "text": "function yy_r230(){\n\t$this->_retvalue = new AOWP_PHPCompoundVariableElement($this->lex->line, '${', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "0920001c43d2e4cff6f496729d490072", "score": "0.46835232", "text": "function yy_r229(){\n\t$this->_retvalue = new AOWP_PHPIndirectVariableElement($this->lex->line, array('$'), $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "eeb62f686f87cce84efa24a2f581d9f7", "score": "0.46660522", "text": "private function getToken()\n\t{\n\t\tif (strlen($this->source)==$this->pos) return new Token (':EOF','EOF', $this->line);\n\t\t$match=array(\"type\"=>'', \"value\"=>'');\n\t\t$source=substr($this->source,$this->pos);\n\n\t\tforeach ($this->lexerRules as $lexerRule)\n\t\t{\n\t\t\t$name=$lexerRule->n;\n\t\t\tforeach ($lexerRule->a as $e)\n\t\t\t{\n\t\t\t\tif ($e->t=='regex')\n\t\t\t\t{\n\t\t\t\t\t$r=preg_match(\"~^$e->v~\", $source, $matches);\n\t\t\t\t\tif ($r && strlen($matches[0])>strlen($match[\"value\"]))\n\t\t\t\t\t\t$match=array(\"type\"=>\"$name\",\"value\"=>$matches[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->lexerRules as $lexerRule)\n\t\t{\n\t\t\t$name=$lexerRule->n;\n\t\t\tforeach ($lexerRule->a as $e)\n\t\t\t{\n\t\t\t\tif ($e->t=='string')\n\t\t\t\t{\n\t\t\t\t\tif (strpos($source, $e->v)===0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (strlen($e->v)>strlen($match[\"value\"]) || $e->v==$match[\"value\"])\n\t\t\t\t\t\t\t$match=array(\"type\"=>\"$name\",\"value\"=>$e->v);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//if a match is found, create token and return:\n\t\tif ($match['value']!=='')\n\t\t{\n\t\t\t$t=new Token($match['type'],$match['value'],$this->line);\n\t\t\t$this->pos+=strlen($match[\"value\"]);\n\t\t\t$this->line+=substr_count($match[\"value\"], \"\\n\");\n\t\t\treturn $t;\n\t\t}\n\n\t\t$lastChar=substr($source, 0, 1);\n\t\tthrow new Exception(\"Error: Lexical error. Input stream did not match any of the language constructs.\n\t\t\t'$lastChar' is the first character that is not recognized. Line $this->line.\");\n\n\t}", "title": "" }, { "docid": "5ca2904f2eeac829229528d03c87b5d8", "score": "0.46619374", "text": "function yy_r73(){ $this->_retvalue = array($this->lex->line, \"final\"); }", "title": "" }, { "docid": "5e501ef26e399bf7a039a42bbc8b43f5", "score": "0.4656961", "text": "function yy_r238(){\n\t$this->_retvalue = new AOWP_PHPDefineConstantVariableStatementElement($this->lex->line, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "930d981a9a388209bcde8ca6922ee285", "score": "0.46562394", "text": "function yy_r244(){\n\t$this->_retvalue = array();\n\t$this->_retvalue[] = 'var';\n }", "title": "" }, { "docid": "64561a7b710d15628d45fb9d1d5f9702", "score": "0.4651193", "text": "function yy_r323(){\n\t$this->_retvalue = '}';\n }", "title": "" }, { "docid": "8d0b90cdfdc6fa05092d45442e099791", "score": "0.4636338", "text": "function yy_r213(){\n\t$this->_retvalue = $this->yystack[$this->yyidx + -4]->minor;\n\t$v1 = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + 0]->minor);\n\t$v = new AOWP_PHPAmpersandExprElement($this->lex->line, $v1);\n\t$this->_retvalue[] = new AOWP_PHPParamaterElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor, $v, null);\n }", "title": "" }, { "docid": "fc99376dbe1beb5dc7b78324eeab592d", "score": "0.46354267", "text": "function yy_r228(){\n\t$this->_retvalue = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "c23bea43ae4ddcd54640c7e215fe9e43", "score": "0.4615065", "text": "function parseStatement () {\n\n Tht::devPrint(\"START STATEMENT:\\n\");\n\n $this->expressionDepth = 0;\n\n $s = $this->symbol;\n if ($s instanceof S_Statement) {\n $st = $s->asStatement($this);\n }\n else {\n $st = $this->parseExpression(0);\n // don't allow commas to separate top-level expressions\n // e.g. a = 1, b = 2;\n if ($this->prevToken[TOKEN_VALUE] === ',') {\n $this->error(\"Unexpected comma `,`\");\n }\n }\n\n return $st;\n }", "title": "" }, { "docid": "81dc5f72550781ec0e1f32935ca99366", "score": "0.46071076", "text": "function yy_r233(){\n\t$this->_retvalue = array();\n\t$this->_retvalue[] = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "866652b1d6652924671ebb1d4b1d9d25", "score": "0.46016735", "text": "function mEND_TAG(){\n try {\n $name=null;\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchString(\"</\"); \n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt29=2;\n $LA29_0 = $this->input->LA(1);\n\n if ( (($LA29_0>=$this->getToken('9') && $LA29_0<=$this->getToken('10'))||$LA29_0==$this->getToken('13')||$LA29_0==$this->getToken('32')) ) {\n $alt29=1;\n }\n switch ($alt29) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n $nameStart915 = $this->getCharIndex();\n $this->mGENERIC_ID(); \n $name = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $nameStart915, $this->getCharIndex()-1);\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt30=2;\n $LA30_0 = $this->input->LA(1);\n\n if ( (($LA30_0>=$this->getToken('9') && $LA30_0<=$this->getToken('10'))||$LA30_0==$this->getToken('13')||$LA30_0==$this->getToken('32')) ) {\n $alt30=1;\n }\n switch ($alt30) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n $this->matchChar(62); \n $this->output(\"End Tag: \".($name!=null?$name->getText():null));\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "55127f5ef5545c11ea8e085914e8f5ea", "score": "0.45738915", "text": "function yy_r232(){\n\t$this->_retvalue = $this->yystack[$this->yyidx + -4]->minor;\n\t$v1 = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor);\n\t$this->_retvalue[] = new AOWP_PHPEqualExprElement($this->lex->line, $v1, '=', $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "acefcfadb60b97963259b73c8c2afa52", "score": "0.4561301", "text": "public function createDeclarationNode($path, $node)\n {\n return new Declaration($path, $this->exprcompiler->parse($node));\n }", "title": "" }, { "docid": "430faf48cc12bc6595023ca9eeffd0a3", "score": "0.4524788", "text": "function yy_r321(){\n\t$this->_retvalue = ']';\n }", "title": "" }, { "docid": "28be577fa131fc9d29a74565de842d96", "score": "0.44874492", "text": "function yy_r6(){\n\t$this->_retvalue = new AOWP_PHPHaltCompilerStatementElement($this->lex->line);\n }", "title": "" }, { "docid": "f47593637af721962de9f4be8b7a8fa4", "score": "0.448214", "text": "public function patternToStart() : string;", "title": "" }, { "docid": "d76a1c3f767065ed869ae9d0ddb03bd5", "score": "0.44800794", "text": "function yy_r214(){\n\t$this->_retvalue = $this->yystack[$this->yyidx + -6]->minor;\n\t$v1 = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor);\n\t$v = new AOWP_PHPAmpersandExprElement($this->lex->line, $v1);\n\t$this->_retvalue[] = new AOWP_PHPParamaterElement($this->lex->line, $this->yystack[$this->yyidx + -4]->minor, $v, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "6ea0b087490392448eb6e6bca781ce14", "score": "0.44690037", "text": "public function getVariableDeclaration() : string\n {\n $b = sprintf(\"const char *%s;\\n\", $this->getInternalVariable());\n $b .= sprintf(\"size_t %s_size;\\n\", $this->getInternalVariable());\n\n return $b;\n }", "title": "" }, { "docid": "41fa5259afe45a25f6846a2aa1ea53b4", "score": "0.4463431", "text": "function is_symb($s){\n if (is_var($s)) //variable\n return true;\n else if (preg_match('/nil@nil/', $s, $found) && $found[0] == $s) //nil constant\n return true;\n else if (preg_match('/bool@(true|false)/', $s, $found) && $found[0] == $s) //bool constant\n return true;\n else if (preg_match('/int@(\\+|\\-)?\\d+/', $s, $found) && $found[0] == $s) //int constant\n return true;\n else if (preg_match('/string@([^\\s\\\\\\\\#]|\\\\\\\\\\d{3})*/', $s, $found) && $found[0] == $s) //string constant\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "baacd481f3648264474774f57b3c59f5", "score": "0.4461105", "text": "function yy_syntax_error($yymajor, $TOKEN)\n {\n#line 4 \"Core.y\"\n\n/* ?><?php */\n echo \"Syntax Error on line \" . $this->lex->line . \": token '\" . \n $this->lex->value . \"' while parsing rule:\";\n foreach ($this->yystack as $entry) {\n echo $this->tokenName($entry->major) . ' ';\n }\n foreach ($this->yy_get_expected_tokens($yymajor) as $token) {\n $expect[] = self::$yyTokenName[$token];\n }\n if (count($expect) > 5) {\n $expect = array_slice($expect, 0, 5);\n $expect[] = '...';\n }\n throw new Exception('Unexpected ' . $this->tokenName($yymajor) . '(' . $TOKEN\n . '), expected one of: ' . implode(',', $expect));\n#line 7223 \"Core.php\"\n }", "title": "" }, { "docid": "61e464fa41fa4ca9649a351a32de399a", "score": "0.4451767", "text": "private function _parseIdentifierToken()\n {\n switch ( $this->_peek() )\n {\n case ParserTokens::T_NULL:\n case ParserTokens::T_SELF:\n case ParserTokens::T_TRUE:\n case ParserTokens::T_FALSE:\n case ParserTokens::T_PARENT:\n case ParserTokens::T_STRING:\n return $this->_consumeToken( $this->_peek() );\n }\n return $this->_consumeToken( -42 );\n }", "title": "" }, { "docid": "583407ba6fe8e44026400c96700f7d41", "score": "0.44472185", "text": "function yy_r234(){\n\t$this->_retvalue = array();\n\t$v1 = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor);\n\t$this->_retvalue[] = new AOWP_PHPEqualExprElement($this->lex->line, $v1, '=', $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "7f41e42ab2c6e3d346523e3d8aa58197", "score": "0.44409895", "text": "function yy_r356(){\n\t$this->_retvalue = new AOWP_PHPQuoteExprElement($this->lex->line, 'singlequote', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "4830016de9ce66cf6ef5507b93cf7ccc", "score": "0.44346395", "text": "function mCOMMENT(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchString(\"<!--\"); \n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n //loop31:\n do {\n $alt31=2;\n $LA31_0 = $this->input->LA(1);\n\n if ( ($LA31_0==$this->getToken('45')) ) {\n $LA31_1 = $this->input->LA(2);\n\n if ( ($LA31_1==$this->getToken('45')) ) {\n $LA31_3 = $this->input->LA(3);\n\n if ( ($LA31_3==$this->getToken('62')) ) {\n $alt31=2;\n }\n else if ( (($LA31_3>=$this->getToken('0') && $LA31_3<=$this->getToken('61'))||($LA31_3>=$this->getToken('63') && $LA31_3<=$this->getToken('65535'))) ) {\n $alt31=1;\n }\n\n\n }\n else if ( (($LA31_1>=$this->getToken('0') && $LA31_1<=$this->getToken('44'))||($LA31_1>=$this->getToken('46') && $LA31_1<=$this->getToken('65535'))) ) {\n $alt31=1;\n }\n\n\n }\n else if ( (($LA31_0>=$this->getToken('0') && $LA31_0<=$this->getToken('44'))||($LA31_0>=$this->getToken('46') && $LA31_0<=$this->getToken('65535'))) ) {\n $alt31=1;\n }\n\n\n switch ($alt31) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n \t {\n \t $this->matchAny(); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop31;\n }\n } while (true);\n\n $this->matchString(\"-->\"); \n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "ad82d05ecd136e5a5e10d5a0ed600b37", "score": "0.44140178", "text": "public function testSingleTokenization() {\n\t\t$result = Parser::token('static');\n\t\t$this->assertEqual('T_STATIC', $result);\n\n\t\t$result = Parser::token('=>');\n\t\t$this->assertEqual('T_DOUBLE_ARROW', $result);\n\n\t\t$result = Parser::token(' =>');\n\t\t$this->assertEqual('T_WHITESPACE', $result);\n\n\t\t$result = Parser::token('static =>');\n\t\t$this->assertEqual('T_STATIC', $result);\n\n\t\t$result = Parser::token(\"\\nstatic =>\");\n\t\t$this->assertEqual('T_WHITESPACE', $result);\n\n\t\t$this->assertFalse(Parser::token(''));\n\n\t\t$result = Parser::token(';');\n\t\t$this->assertEqual(';', $result);\n\n\t\t$result = Parser::token('\"string\"');\n\t\t$this->assertEqual('T_CONSTANT_ENCAPSED_STRING', $result);\n\n\t\t$result = Parser::token('1');\n\t\t$this->assertEqual('T_LNUMBER', $result);\n\n\t\t$result = Parser::token('0');\n\t\t$this->assertEqual('T_LNUMBER', $result);\n\n\t\t$result = Parser::token('0');\n\t\t$this->assertEqual('T_LNUMBER', $result);\n\t}", "title": "" }, { "docid": "984198d217f9676cfb4794e29cebad42", "score": "0.44129273", "text": "function yy_r51(){\n\t$v = new AOWP_PHPVariableElement($this->yystack[$this->yyidx + -8]->minor, $this->yystack[$this->yyidx + -5]->minor);\n\t$catch = new AOWP_PHPCatchStatementElement($this->yystack[$this->yyidx + -8]->minor, $this->yystack[$this->yyidx + -6]->minor, $v, $this->yystack[$this->yyidx + -2]->minor);\n\tarray_unshift($this->yystack[$this->yyidx + 0]->minor, $catch);\n\t$this->_retvalue = new AOWP_PHPTryCatchStatementElement($this->yystack[$this->yyidx + -12]->minor, $this->yystack[$this->yyidx + -10]->minor, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "751752870e66ed5e07bb1309591f1aff", "score": "0.44087484", "text": "function visit(PHPParser_Node $node);", "title": "" }, { "docid": "6db04adf4802f8aa5e60d3d9e2ae4678", "score": "0.44062272", "text": "function yy_r210(){\n\t$this->_retvalue = array();\n\t$v1 = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor);\n\t$v = new AOWP_PHPAmpersandExprElement($this->lex->line, $v1);\n\t$this->_retvalue[] = new AOWP_PHPParamaterElement($this->lex->line, $this->yystack[$this->yyidx + -4]->minor, $v, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "c005766353f9df67d1037b65bd7f3b1c", "score": "0.44030607", "text": "protected function parseEntitiesVariable()\n {\n $index = $this->input->i;\n if ($this->input->currentChar() === '@' && ($name = $this->input->re('/\\\\G^@@?[\\w-]+/'))) {\n return new VariableNode($name, $index, $this->context->currentFileInfo);\n }\n }", "title": "" }, { "docid": "ff9d1159977a44a791b4d905db3b45de", "score": "0.4383485", "text": "private function _parseUseStatements()\n {\n do\n {\n $token = $this->_parseUseStatement();\n }\n while ( $token->type === ParserTokens::T_COMMA );\n }", "title": "" }, { "docid": "51a6ffc783fcb9b810574a702e8c6fa5", "score": "0.43803945", "text": "function mDOCTYPE(){\n try {\n $rootElementName=null;\n $sys1=null;\n $pub=null;\n $sys2=null;\n $dtd=null;\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchString(\"<!DOCTYPE\"); \n\n $this->mWS(); \n $rootElementNameStart103 = $this->getCharIndex();\n $this->mGENERIC_ID(); \n $rootElementName = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $rootElementNameStart103, $this->getCharIndex()-1);\n $this->output(\"ROOTELEMENT: \". ($rootElementName!=null?$rootElementName->getText():null));\n $this->mWS(); \n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt8=2;\n $LA8_0 = $this->input->LA(1);\n\n if ( ($LA8_0==$this->getToken('80')||$LA8_0==$this->getToken('83')) ) {\n $alt8=1;\n }\n switch ($alt8) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt6=2;\n $LA6_0 = $this->input->LA(1);\n\n if ( ($LA6_0==$this->getToken('83')) ) {\n $alt6=1;\n }\n else if ( ($LA6_0==$this->getToken('80')) ) {\n $alt6=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 6, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt6) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchString(\"SYSTEM\"); \n\n $this->mWS(); \n $sys1Start157 = $this->getCharIndex();\n $this->mVALUE(); \n $sys1 = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $sys1Start157, $this->getCharIndex()-1);\n $this->output(\"SYSTEM: \".($sys1!=null?$sys1->getText():null));\n\n }\n break;\n case 2 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->matchString(\"PUBLIC\"); \n\n $this->mWS(); \n $pubStart214 = $this->getCharIndex();\n $this->mVALUE(); \n $pub = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $pubStart214, $this->getCharIndex()-1);\n $this->mWS(); \n $sys2Start220 = $this->getCharIndex();\n $this->mVALUE(); \n $sys2 = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $sys2Start220, $this->getCharIndex()-1);\n $this->output(\"PUBLIC: \". ($pub!=null?$pub->getText():null));\n $this->output(\"SYSTEM: \". ($sys2!=null?$sys2->getText():null));\n\n }\n break;\n\n }\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt7=2;\n $LA7_0 = $this->input->LA(1);\n\n if ( (($LA7_0>=$this->getToken('9') && $LA7_0<=$this->getToken('10'))||$LA7_0==$this->getToken('13')||$LA7_0==$this->getToken('32')) ) {\n $alt7=1;\n }\n switch ($alt7) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $this->mWS(); \n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n $alt9=2;\n $LA9_0 = $this->input->LA(1);\n\n if ( ($LA9_0==$this->getToken('91')) ) {\n $alt9=1;\n }\n switch ($alt9) {\n case 1 :\n // runtime/Php/test/Antlr/Tests/grammers/t012lexerXMLLexer.g\n {\n $dtdStart317 = $this->getCharIndex();\n $this->mINTERNAL_DTD(); \n $dtd = new CommonToken($this->input, Token::INVALID_TOKEN_TYPE, Token::DEFAULT_CHANNEL, $dtdStart317, $this->getCharIndex()-1);\n $this->output(\"INTERNAL DTD: \". ($dtd!=null?$dtd->getText():null));\n\n }\n break;\n\n }\n\n $this->matchChar(62); \n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "4cdd87f15393491b2a84f8b5942a5adb", "score": "0.43659258", "text": "public function dataGotoDeclaration()\n {\n return [\n [\n '/* testGotoDeclaration */',\n 'marker:',\n ],\n [\n '/* testGotoDeclarationOutsideLoop */',\n 'end:',\n ],\n ];\n\n }", "title": "" }, { "docid": "c1876f045de6f6623a8e1a262c9e3d88", "score": "0.43619388", "text": "function yy_r322(){\n\t$this->_retvalue = '{';\n }", "title": "" }, { "docid": "07c5bedcd4d86c348925e8a598f1e124", "score": "0.4358898", "text": "function mT__6(){\n try {\n $_type = t032subrulePredictLexer::T_T__6;\n $_channel = t032subrulePredictLexer::DEFAULT_TOKEN_CHANNEL;\n // runtime/Php/test/Antlr/Tests/grammers/t032subrulePredict.g\n // runtime/Php/test/Antlr/Tests/grammers/t032subrulePredict.g\n {\n $this->matchString(\"END\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "725422cd9e8880257c04ca101ac52310", "score": "0.43536225", "text": "public function expr(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->pushFollow(self::$FOLLOW_condExpr_in_expr486);\n $this->condExpr();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "aef53a5e9ff15ba73264d88e8c7a9b2b", "score": "0.43452626", "text": "function yy_r72(){ $this->_retvalue = array($this->lex->line, \"abstract\"); }", "title": "" }, { "docid": "1d19929d3632691363903964ab54dac3", "score": "0.43368465", "text": "function yy_r209(){\n\t$this->_retvalue = array();\n\t$v1 = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + 0]->minor);\n\t$v = new AOWP_PHPAmpersandExprElement($this->lex->line, $v1);\n\t$this->_retvalue[] = new AOWP_PHPParamaterElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor, $v, null);\n }", "title": "" }, { "docid": "a52d4e296e4e46a923ef01b387fc6b1d", "score": "0.4334383", "text": "function yy_r178(){\n\t$this->_retvalue = new AOWP_PHPAmpersandExprElement($this->lex->line, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "1b699b385c54f34421edd9cd1fcb9285", "score": "0.43258235", "text": "private function parse_rule()\n\t{\n\t\t$ruleNameToken=$this->accept(\"id\",false) ;\n\t\tif (!$ruleNameToken) return false;\n\t\t$columnOrEq=$this->accept(':',false); //this is where we tell if lexer or parser rule.\n\t\tif (!$columnOrEq) $columnOrEq=$this->accept('=',true);\n\t\t$ret=$this->parse_alternatives();\n\t\tif (!$ret) throw new LLPGException(\"Error: Expected alternatives. Line $this->line.\");\n\t\t$this->accept(';',true);\n\n\t\t//we have restrictons on lexer rules:\n\t\t//rule alternatives can't have more than 1 exps, alternatives or referefernces, no @ symbol before exp, no quantifier\n\t\tif ($columnOrEq->value=='=')\n\t\t{\n\t\t\tforeach ($ret as $a)\n\t\t\t{\n\t\t\t\tif (sizeof($a->expressions)>1) throw new LLPGException(\"Syntax error: Lexer rules can contain only one expression per alternative. Line {$a->expressions[0]->line}.\");\n\t\t\t\tforeach ($a->expressions as $e)\n\t\t\t\t{\n\t\t\t\t\tif ($e->predicated) throw new LLPGException(\"Syntax error: Lexer rules can not have predicate symbol @. Line $e->line.\");\n\t\t\t\t\tif (!$e->isTerminal) throw new LLPGException(\"Syntax error: Lexer rules must define terminals only. No grouping or referencing allowed. Line $e->line.\");\n\t\t\t\t\tif ($e->quantifier!='1') throw new LLPGException(\"Syntax error: Expressions in lexer don't accept quantifiers. Use regex quantifiers instead. $e->line.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($ruleNameToken->value=='ignore') throw new LLPGException(\"Syntax error: 'ignore' is a special name, parser rules can't have that name. $ruleNameToken->line.\");\n\t\t}\n\n\t\t$r=new Rule();\n\t\t$r->name=$ruleNameToken->value;\n\t\t$r->alternatives=$ret;\n\t\t$r->isLexerRule=$columnOrEq->value=='=';\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "edc14acff44c49056899d17ab2eb71a5", "score": "0.4324184", "text": "public function parseStatement(Statement $statement);", "title": "" }, { "docid": "98d41f24570dd8ba4117557a6bcc8970", "score": "0.43238533", "text": "protected function readCurlyToken()\r\n\t{\r\n\t\tif (strlen($this->data_buffer) <= $this->data_pos + 1)\r\n\t\t\treturn $this->readContent(1);\r\n\t\t$next_c = $this->data_buffer[$this->data_pos + 1];\r\n\r\n\t\t// We support {$var}, {#lang}, and {tpl:stuff /}.\r\n\t\tif ($next_c === '$')\r\n\t\t\t$type = 'var-ref';\r\n\t\telseif ($next_c === '#')\r\n\t\t\t$type = 'lang-ref';\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Could still be a var-ref in form CLASS::constant or CLASS::value.\r\n\t\t\t$type = 'tag';\r\n\r\n\t\t\t$ns_mark = $this->firstPosOf(':', 1);\r\n\t\t\tif ($ns_mark !== false)\r\n\t\t\t{\r\n\t\t\t\t$ns = substr($this->data_buffer, $this->data_pos + 1, $ns_mark - $this->data_pos - 1);\r\n\r\n\t\t\t\t// Oops, don't look at the / at the front...\r\n\t\t\t\tif ($ns[0] === '/')\r\n\t\t\t\t\t$ns = substr($ns, 1);\r\n\r\n\t\t\t\tif (!self::validNCName($ns))\r\n\t\t\t\t\t$ns = false;\r\n\t\t\t\telseif ($this->data_buffer[$ns_mark + 1] === ':')\r\n\t\t\t\t\t$type = 'var-ref';\r\n\t\t\t\t// What we're checking here is that we don't have this: {key:'value'}...\r\n\t\t\t\t// Or in other words, after the : we need an alphanumeric char or similar.\r\n\t\t\t\telseif (!self::validNCName($this->data_buffer[$ns_mark + 1]))\r\n\t\t\t\t\t$ns = false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$ns = false;\r\n\r\n\t\t\tif ($ns === false)\r\n\t\t\t{\r\n\t\t\t\t$check = trim($this->data_buffer[$this->data_pos + 1]);\r\n\t\t\t\tif (!empty($check))\r\n\t\t\t\t\t$type = 'output-ref';\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise this may be CSS/JS/something we don't want to munge.\r\n\t\t\tif ($ns === false && $type === 'tag')\r\n\t\t\t\treturn $this->readContent(1);\r\n\t\t}\r\n\r\n\t\t// Now it's time to parse a tag, lang, or var.\r\n\t\treturn $this->readGenericTag($type, '{', '}', 1);\r\n\t}", "title": "" }, { "docid": "b4ade0729592cd09404c24cb468d905d", "score": "0.43086666", "text": "public function getDeclarationName($stackPtr)\n {\n $tokenCode = $this->tokens[$stackPtr]['code'];\n\n if ($tokenCode === T_ANON_CLASS || $tokenCode === T_CLOSURE) {\n return null;\n }\n\n if ($tokenCode !== T_FUNCTION\n && $tokenCode !== T_CLASS\n && $tokenCode !== T_INTERFACE\n && $tokenCode !== T_TRAIT\n && $tokenCode !== T_ENUM\n ) {\n throw new RuntimeException('Token type \"'.$this->tokens[$stackPtr]['type'].'\" is not T_FUNCTION, T_CLASS, T_INTERFACE, T_TRAIT or T_ENUM');\n }\n\n if ($tokenCode === T_FUNCTION\n && strtolower($this->tokens[$stackPtr]['content']) !== 'function'\n ) {\n // This is a function declared without the \"function\" keyword.\n // So this token is the function name.\n return $this->tokens[$stackPtr]['content'];\n }\n\n $content = null;\n for ($i = $stackPtr; $i < $this->numTokens; $i++) {\n if ($this->tokens[$i]['code'] === T_STRING) {\n $content = $this->tokens[$i]['content'];\n break;\n }\n }\n\n return $content;\n\n }", "title": "" }, { "docid": "422e928048fb68f14bc362f14b3e4e54", "score": "0.4296951", "text": "function yy_r295(){\n\t$this->_retvalue = new AOWP_PHPCompoundVariableElement($this->lex->line, '{', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "9dda1f3cc0a038544a7b619c7d59635a", "score": "0.42889243", "text": "public function declare()\n {\n }", "title": "" }, { "docid": "5c09977dc83828a0b08f4f852f9e63b4", "score": "0.428892", "text": "function yy_r331(){\n\t$this->_retvalue = new AOWP_PHPComplexVariableElement($this->lex->line, '{', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "cde95d2738eeb519d9dcc25d21f94019", "score": "0.4279754", "text": "function yy_r211(){\n\t$this->_retvalue = array();\n\t$v1 = new AOWP_PHPVariableElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor);\n\t$this->_retvalue[] = new AOWP_PHPParamaterElement($this->lex->line, $this->yystack[$this->yyidx + -3]->minor, $v1, $this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "d945c8d1b5e8f16bef126e880bf8dca3", "score": "0.42781222", "text": "function yy_r237(){\n\t$this->_retvalue = new AOWP_PHPClassVariableElement($this->lex->line, $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "da5841d63738b18ca4decc62b2ec620b", "score": "0.42552474", "text": "function yy_r329(){\n\t$this->_retvalue = new AOWP_PHPComplexVariableElement($this->lex->line, '${', $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "2c4afdb4f1af9f3d40ea99dd0fe11f84", "score": "0.4229155", "text": "public function tokenLiteral(): string\n {\n return '';\n }", "title": "" }, { "docid": "4276ccaa35ea4f534e33f6584dd4cb78", "score": "0.42282385", "text": "function GetVariableUnit($variable_type_token)\n{\n preg_match('/\\[(.*)\\]/', $variable_type_token, $matches);\n return $matches[1];\n}", "title": "" }, { "docid": "408cfd657244268439a62262a73c4c88", "score": "0.42250425", "text": "function yy_r338(){\n\t$this->_retvalue = new AOWP_PHPEvalStatementElement($this->lex->line, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "b5ee65a4840c72a0c0293388aa0f94fe", "score": "0.42210025", "text": "function yy_r89(){\n\t$newExpr = new AOWP_PHPNewExprElement($this->lex->line, $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor);\n\t$ampExpr = new AOWP_PHPAmpersandExprElement($this->lex->line, $newExpr);\n\t$this->_retvalue = new AOWP_PHPEqualExprElement($this->lex->line, $this->yystack[$this->yyidx + -5]->minor, '=', $ampExpr);\n }", "title": "" }, { "docid": "5c1bb599d8bd72e4daf3ac82567dd555", "score": "0.4215755", "text": "function yy_r26(){\n\t$this->_retvalue = new AOWP_PHPContinueStatementElement($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "9c28c329bbfa0b6dc55d2af506cd292a", "score": "0.42145967", "text": "public function loadLexer()\n {\n\n }", "title": "" }, { "docid": "a7b32947159ab3f4887621f266129bbb", "score": "0.42126372", "text": "function yy_r349(){\n\t$this->_retvalue = new AOWP_PHPStaticMethodCallWithVariableElement($this->lex->line, $this->yystack[$this->yyidx + -5]->minor, $this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + -1]->minor);\n }", "title": "" }, { "docid": "a262a71f602579f023977bff0fdafce7", "score": "0.42115006", "text": "public function b(){\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t035ruleLabelPropertyRef.g\n // runtime/Php/test/Antlr/Tests/grammers/t035ruleLabelPropertyRef.g\n {\n // runtime/Php/test/Antlr/Tests/grammers/t035ruleLabelPropertyRef.g\n $cnt1=0;\n //loop1:\n do {\n $alt1=2;\n $LA1_0 = $this->input->LA(1);\n\n if ( ($LA1_0==$this->getToken('A')) ) {\n $alt1=1;\n }\n\n\n switch ($alt1) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t035ruleLabelPropertyRef.g\n \t {\n \t $this->match($this->input,$this->getToken('A'),self::$FOLLOW_A_in_b37); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt1 >= 1 ) break 2;//loop1;\n $eee =\n new EarlyExitException(1, $this->input);\n throw $eee;\n }\n $cnt1++;\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return ;\n }", "title": "" }, { "docid": "1c13967d5b3f36091013ede5e5538f25", "score": "0.42103633", "text": "function yy_r8(){ $this->_retvalue = $this->lex->line; }", "title": "" }, { "docid": "f1f2418ad4d9983d12ac488bfc559bf3", "score": "0.42086378", "text": "public function tokens();", "title": "" }, { "docid": "f1f2418ad4d9983d12ac488bfc559bf3", "score": "0.42086378", "text": "public function tokens();", "title": "" }, { "docid": "d8e34dd35497020537fce004f5b99894", "score": "0.42068583", "text": "function yy_r3(){\n\t$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n\t$this->globals[] = &$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "f169bbbca1aacb863d545da00f2cd233", "score": "0.42042378", "text": "private function _parseMethodDeclaration( $docComment, $modifiers, $startLine )\n {\n $this->_staticVariables = array();\n\n $token = $this->_consumeToken( ParserTokens::T_FUNCTION );\n\n $startLine = ( $startLine < 1 ? $token->startLine : $startLine );\n $returnsRef = $this->_parseOptionalByReference();\n\n $this->_consumeComments();\n $token = $this->_parseIdentifierToken();\n\n $this->_methods[] = new StaticReflectionMethod( $token->image, $docComment, $modifiers);\n\n $this->_parseMethodParameterList();\n\n $this->_consumeComments();\n if ( $this->_peek() === ParserTokens::T_SEMICOLON )\n {\n $endLine = $this->_consumeToken( ParserTokens::T_SEMICOLON )->endLine;\n }\n else\n {\n $endLine = $this->_parseMethodBody()->endLine;\n }\n\n $method = end( $this->_methods );\n $method->initStartLine( $startLine );\n $method->initEndLine( $endLine );\n $method->initParameters( $this->_parameters );\n $method->initStaticVariables( $this->_staticVariables );\n\n if ( $returnsRef )\n {\n $method->initReturnsReference();\n }\n }", "title": "" }, { "docid": "a904b08e38b89d97171e0401321b4732", "score": "0.41908607", "text": "function alias() : Parser {\n return\n chain(\n token(T_AS),\n label()->as('name')\n )\n ->as('alias')\n ;\n}", "title": "" } ]
5a3188042fadc6c42429c1cb4370267a
RESET PASSWORD Incoming request to reset password Decode the token and get user details from DB Check if token is valid and hasnt expired Return user id to use on password reset form
[ { "docid": "501435fafb43a79551ca6737114db92e", "score": "0.68933535", "text": "public function ResetPassword($id, $token)\n {\n // DECODE THE TOKEN\n $decodedtoken = base64_decode($token);\n\n // GET USERS DETAILS FROM DB\n $user = $this->AuthModel->find($id);\n\n // FETCH THE EXPIRY TIME FOR TOKEN\n $resetexpiry = $user['reset_expire'];\n $timenow = new Time('now');\n\n // CHECK TO SEE IF TOKEN HAS EXPIRED\n if (!$timenow->isBefore($resetexpiry)) {\n\n // IT HAS SO SET SOME FLASH DATA \n $this->Session->setFlashData('danger', lang('Auth.linkExpired'));\n\n return true;\n }\n\n // CHECK TOKEN AGAINST TOKEN IN DB\n if (!password_verify($decodedtoken, $user['reset_token'])) {\n\n // DOES NOT MATCH SO SET SOME FLASH DATA \n $this->Session->setFlashData('danger', lang('Auth.noAuth'));\n $this->Session->setFlashData('danger', lang('Auth.noAuth'));\n\n return true;\n } else {\n\n // RETURN USER ID TO USE ON PASSWORD RESET FORM\n $this->Session->setFlashData('success', lang('Auth.passwordAuthorised'));\n return $id;\n }\n }", "title": "" } ]
[ { "docid": "0ce2fa6befb7e8282364701c442b86ff", "score": "0.7414067", "text": "public function passwordReset()\r\n {\r\n $f3 = \\Base::instance();\r\n $token = $this->inputfilter->clean( $f3->get('PARAMS.token'), 'alnum' );\r\n \r\n try {\r\n \r\n if (empty($token))\r\n {\r\n throw new \\Exception( 'Invalid token' );\r\n }\r\n \r\n $user = (new \\Users\\Models\\Users)->setState('filter.forgot_password.token', $token)->getItem();\r\n if (empty($user->id) || $token != (string) $user->{'forgot_password.token'})\r\n {\r\n throw new \\Exception( 'Token does not exist' );\r\n }\r\n \r\n // check the date when the token was created\r\n if ($user->{'forgot_password.created.time'} < strtotime('-2 hours')) \r\n {\r\n throw new \\Exception( 'Token has expired' );\r\n }\r\n\r\n // ok, token is valid, so lets delete it\r\n $user->forgot_password = array();\r\n // we also know that the email is valid\r\n $user->active = true;\r\n \r\n $user->save();\r\n \r\n } catch (\\Exception $e) {\r\n \r\n \\Dsc\\System::addMessage( 'Password reset request has failed.', 'error' );\r\n \\Dsc\\System::addMessage( $e->getMessage(), 'error' );\r\n \\Base::instance()->reroute( '/user/forgot-password' );\r\n return;\r\n }\r\n \r\n // store the user->id in the session so we know who we're updating at form submission\r\n \\Dsc\\System::instance()->get( 'session' )->set( 'user.forgot_password.id', (string) $user->id );\r\n \r\n $this->app->set('meta.title', 'Reset Password');\r\n \r\n $view = \\Dsc\\System::instance()->get( 'theme' );\r\n echo $view->render( 'Users/Site/Views::forgot/password_reset_form.php' );\r\n }", "title": "" }, { "docid": "7b5c19180bc8605342469407a31794be", "score": "0.7215988", "text": "public function passwordReset() {\n\ttry {\n\t global $controllers;\n\t if ($this->get_request_method() != \"POST\") {\n\t\t$this->response(array('status' => $controllers['NOPOSTREQUEST']), 405);\n\t } elseif (!isset($this->request['email'])) {\n\t\t$this->response(array('status' => $controllers['NOEMAILFORRESETPASS']), 403);\n\t }\n\t $email = $this->request['email'];\n\t require_once CLASSES_DIR . 'userParse.class.php';\n\t $userP = new UserParse();\n\t $user = $userP->passwordReset($email);\n\t if ($user instanceof Error) {\n\t\t$this->response(array('status' => $controllers['USERNOTFOUNDFORPASSRESET']), 503);\n\t }\n\t $activity = $this->createActivity('PASSWORDRESETREQUEST', $user->getObjectId());\n\t require_once CLASSES_DIR . 'activityParse.class.php';\n\t $activityParse = new ActivityParse();\n\t $res = $activityParse->saveActivity($activity);\n\t if ($res instanceof Error) {\n\t\t$this->response(array('status' => $controllers['NOACSAVE']), 503);\n\t }\n\t $this->response(array($controllers['OKPASSWORDRESETREQUEST']), 200);\n\t} catch (Exception $e) {\n\t $this->response(array('status' => $e->getMessage()), 503);\n\t}\n }", "title": "" }, { "docid": "b94dbe0afa2809128a4d38dcf575ff1c", "score": "0.72100735", "text": "public function getResetPasswordToken();", "title": "" }, { "docid": "495aacb93c237cb608f040f3fe6a198f", "score": "0.71775234", "text": "Protected function resetpw($body_parms) {\n\t\n\t\t$dbc = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME)or die('Database Error 2!');\n\t\t \n\t\t$email = $body_parms['email'];\n\t\t \n\t\t$dbc = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\n\t \n $query = \"SELECT User_Id FROM user WHERE Email = '$email'\";\n\t\t\t\t\t\n\t\t$data = mysqli_query($dbc, $query);\n\t\t\n if (mysqli_num_rows($data) == 1) {\n\t\t\t// logserver if debug flag is set to 1\n\t\t\tif (DEBUG_FLAG == 1)\n\t\t\t\t\tlogserveronce(\"Resetpw\",\"POST\", $email, \"\");\n\t\t\t$token = rand(10000, 10000000);\n\t\t\t\n\t\t\t//check to see if there is an existing request\n\t\t\t$query = \"select Email from resetpassword where Email = '$email'\";\n\t\t\t$data = mysqli_query($dbc,$query) or die(\"Error is: \\n \".mysqli_error($dbc));\n\t\t\t\n\t\t\tif (mysqli_num_rows($data) == 1) {\n\t\t\t\n\t\t\t\t$resetupdate = \"update resetpassword set Token = '$token', Last_Modified = NOW(), Is_Done = 0, Expired_Time = (UNIX_TIMESTAMP(UTC_TIMESTAMP()) + 720) where Email = '$email'\";\n\t\t\t\t$result = mysqli_query($dbc,$resetupdate) or die(\"Error is: \\n \".mysqli_error($dbc));\n\t\t\t\tif ($result !== TRUE) {\n\t\t\t\t\t// if error, roll back transaction\n\t\t\t\t\theader('HTTP/1.0 202 The password can not be updated', true, 201);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// create a new entry\n\t\t\t\t$resetquery = \"insert resetpassword(Email,Token,Is_Done,Expired_Time,Created_Time,Last_Modified) \n\t\t\t\t\t\t\t\tvalues('$email','$token',0,UNIX_TIMESTAMP(UTC_TIMESTAMP()) + 720,NOW(), NOW())\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t$result = mysqli_query($dbc,$resetquery) or die(\"Error is: \\n \".mysqli_error($dbc));\n\t\t\t\tif ($result !== TRUE) {\n\t\t\t\t\t// if error, roll back transaction\n\t\t\t\t\theader('HTTP/1.0 202 The password can not be updated', true, 201);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresetpw_email($email, $token);\n\t }\n\t\telse {\n\t\t\t// No match in the user table\n\t\t\theader('HTTP/1.0 201 Email doesn’t exist', true, 201);\n\t\t\n\t\t}\n\t\t$data->close();\n\t\tmysqli_close($dbc);\n\t\t\n\t}", "title": "" }, { "docid": "1d915c00238b30431b35a2f6d2c78cb6", "score": "0.7163605", "text": "public function postReset(Request $request)\n {\n try {\n $this->validatePostResetRequest($request);\n } catch (HttpResponseException $e) {\n return $this->onBadRequest();\n }\n\n $email = $request->only('email')[\"email\"];\n\n $results = DB::table(\"users\")->where(\"email\", $email)->first();\n $count = DB::table(\"users\")->where(\"email\", $email)->count();\n if ($count == 0) {\n return response([\n 'message' => 'User not existing'\n ]);\n } else {\n\n $token = str_random(20) . md5($results->id);\n\n function generateNumericOTP($n) { \n \n // Take a generator string which consist of \n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= $n; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n }\n\n $otp = generateNumericOTP(6);\n\n DB::table('user_reset')->insert([\n 'user_id' => $results->id,\n 'email' => $results->email,\n 'token' => $token,\n 'otp' => $otp,\n 'status' => \"0\"\n ]);\n\n try {\n Mail::send(new PasswordResetMail($results->email, $otp));\n \n return response([\n 'message' => 'Reset success',\n 'token' => $token\n ]);\n } catch (Exception $ex) {\n // Debug via $ex->getMessage();\n return response([\n 'message' => 'Reset error'\n ]);\n }\n\n }\n }", "title": "" }, { "docid": "c2a562435842b1472e4ca5c79f6be770", "score": "0.7146857", "text": "public function resetPassword($token);", "title": "" }, { "docid": "48ab88ee34c15140c3fdbd344859798e", "score": "0.7073379", "text": "public function requestPasswordReset()\n {\n // perform all necessary form checks\n if (!$this->checkCaptcha()) {\n $_SESSION[\"feedback_negative\"][] = FEEDBACK_CAPTCHA_WRONG;\n } elseif (empty($_POST['user_provider_type'])) {\n $_SESSION[\"feedback_negative\"][] = FEEDBACK_UNKNOWN_ERROR;\n } elseif (empty($_POST['user_name'])) {\n $_SESSION[\"feedback_negative\"][] = FEEDBACK_USERNAME_FIELD_EMPTY;\n } elseif (strlen($_POST['user_name']) > 64 OR strlen($_POST['user_name']) < 5) {\n $_SESSION[\"feedback_negative\"][] = FEEDBACK_USERNAME_TOO_SHORT_OR_TOO_LONG;\n } else {\n // generate integer-timestamp (to see when exactly the user (or an attacker) requested the password reset mail)\n $temporary_timestamp = time();\n // generate random hash for email password reset verification (40 char string)\n $user_password_reset_hash = sha1(uniqid(mt_rand(), true));\n // clean user input\n $user_name = strip_tags($_POST['user_name']);\n $user_provider_type = $_POST['user_provider_type'];\n\n // check if that username exists\n $query = $this->db->prepare(\"SELECT user_id, user_email FROM users\n WHERE (user_name = :user_name OR user_email = :user_name) AND user_provider_type = :provider_type\");\n $query->execute(array(':user_name' => $user_name, ':provider_type' => $user_provider_type));\n $count = $query->rowCount();\n if ($count != 1) {\n $_SESSION[\"feedback_negative\"][] = FEEDBACK_USER_DOES_NOT_EXIST;\n return false;\n }\n\n // get result\n $result_user_row = $result = $query->fetch();\n $user_email = $result_user_row->user_email;\n\n // set token (= a random hash string and a timestamp) into database\n if ($this->setPasswordResetDatabaseToken($user_name, $user_provider_type, $user_password_reset_hash, $temporary_timestamp) == true) {\n if (Auth::isInternetAvailible(CHECK_URL, 80) == true) {\n if ($this->sendPasswordResetMail($user_name, $user_password_reset_hash, $user_email)) {\n return true;\n } else {\n $_SESSION[\"feedback_positive\"][] = FEEDBACK_CONTACT_ADMINISTRATOR;\n return false;\n }\n }\n }\n }\n // default return\n return false;\n }", "title": "" }, { "docid": "d7a4cdd30c7154264284da55a4a82cc1", "score": "0.7060124", "text": "public function reset_password() {\r\n\t\t$forgottenPasswordCode = ($this->input->post('forgotten_password_code')) ? $this->input->post('forgotten_password_code') : '';\r\n\t\t$password = ($this->input->post('password')) ? $this->input->post('password') : '';\r\n\t\t$confirmPassowrd = ($this->input->post('confirm_passowrd')) ? $this->input->post('confirm_passowrd') : '';\r\n\r\n\t\t\r\n\t\t$user = $this->user->getUserByForgotPassowordCode($forgottenPasswordCode);\r\n\r\n\t\tif(count($user) > 0) {\r\n\t\t\t// check expiry forgotten code\r\n\t\t\t\tif(($this->SMSGETWAYHUB->getCurrentTime() - $user->forgotten_password_time) > $this->SMSGETWAYHUB->getExpiredTime()) {\r\n\t\t\t\t\t// update user table \r\n\t\t\t\t\t$this->user->updateForgottenPasswordFieldsByUserId($data = array(\r\n\t\t\t\t\t\t'forgotten_password_time' => null,\r\n\t\t\t\t\t\t'forgotten_password_code' => null\r\n\t\t\t\t\t), $user->id);\r\n\t\t\t\t\treturn $this->output\r\n\t\t\t\t\t\t\t\t->set_content_type('application/json')\r\n\t\t\t\t\t\t\t\t->set_status_header(200)\r\n\t\t\t\t\t\t\t\t->set_output(json_encode(array(\r\n\t\t\t\t\t\t\t\t\t\t'error' => true,\r\n\t\t\t\t\t\t\t\t\t\t'status' => 200,\r\n\t\t\t\t\t\t\t\t\t\t'message' => 'Verification code is expired!',\r\n\t\t\t\t\t\t\t\t\t\t'type' => 'expired'\r\n\t\t\r\n\t\t\t\t\t\t\t\t))); \r\n\t\t\t\t} else {\r\n\t\t\t\t// match confirm password and password\r\n\t\t\t\t$this->form_validation->set_rules('password', $this->lang->line('reset_password_validation_new_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[confirm_password]');\r\n\t\t\t\t$this->form_validation->set_rules('confirm_password', $this->lang->line('reset_password_validation_new_password_confirm_label'), 'required');\r\n\r\n\t\t\t\tif ($this->form_validation->run() === FALSE) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$message = (validation_errors()) ? validation_errors() : '';\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn $this->output\r\n\t\t\t\t\t\t\t->set_content_type('application/json')\r\n\t\t\t\t\t\t\t->set_status_header(200)\r\n\t\t\t\t\t\t\t->set_output(json_encode(array(\r\n\t\t\t\t\t\t\t\t\t'error' => true,\r\n\t\t\t\t\t\t\t\t\t'status' => 200,\r\n\t\t\t\t\t\t\t\t\t'message' => $message,\r\n\t\t\t\t\t\t\t\t\t'type' => 'expired'\r\n\t\r\n\t\t\t\t\t\t\t))); \r\n\t\t\t\t} else {\r\n\t\t\t\t\t$newPassword = $this->Ion_auth_model->hash_password($password);\r\n\t\t\t\t\t//update password by user id and destroy code\r\n\t\t\t\t\tif($this->user->updatePasswordByUserId($data = array(\r\n\t\t\t\t\t\t'password' => $newPassword,\r\n\t\t\t\t\t), $user->id)) {\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->user->updateForgottenPasswordFieldsByUserId($data = array(\r\n\t\t\t\t\t\t\t'forgotten_password_time' => null,\r\n\t\t\t\t\t\t\t'forgotten_password_code' => null\r\n\t\t\t\t\t\t), $user->id);\r\n\r\n\t\t\t\t\t\t$message = '<p>Password has changed successfully</p>';\r\n\r\n\t\t\t\t\t\treturn $this->output\r\n\t\t\t\t\t\t\t->set_content_type('application/json')\r\n\t\t\t\t\t\t\t->set_status_header(200)\r\n\t\t\t\t\t\t\t->set_output(json_encode(array(\r\n\t\t\t\t\t\t\t\t\t'error' => false,\r\n\t\t\t\t\t\t\t\t\t'type' => 'success',\r\n\t\t\t\t\t\t\t\t\t'status' => 200,\r\n\t\t\t\t\t\t\t\t\t'message' => $message\r\n\t\t\t\t\t\t\t))); \r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t} else {\r\n\t\t\treturn $this->output\r\n\t\t\t\t\t\t\t->set_content_type('application/json')\r\n\t\t\t\t\t\t\t->set_status_header(200)\r\n\t\t\t\t\t\t\t->set_output(json_encode(array(\r\n\t\t\t\t\t\t\t\t\t'error' => true,\r\n\t\t\t\t\t\t\t\t\t'type' => 'error',\r\n\t\t\t\t\t\t\t\t\t'status' => 200,\r\n\t\t\t\t\t\t\t\t\t'message' => '<p>Verification code does not match</p>'\r\n\t\t\t\t\t\t\t))); \r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7a3553914fae7255cd013dd6ce7a82c3", "score": "0.70561963", "text": "public static function requestPasswordRecovery($email){\n\n $user = User::find($email);\n\n if(is_null($user)){\n return null;\n }\n\n $date = $user->getRecoveryDate();\n $token = $user->getRecoveryToken();\n\n $currentDate = date(\"Y-m-d\");\n\n if($currentDate == $date){\n\n return -1;\n\n }\n else{\n\n\n $id = $user->getID();\n\n $mysqli = Database_connection::getMysqli();\n if ($mysqli->connect_errno) {\n //echo $mysqli->connect_error;\n return null;\n }\n\n //Change recovery date to current date\n $result0 = $mysqli->query(\"UPDATE tbl_users SET recoveryDate ='\" . $currentDate . \"' WHERE email='\" . $email . \"'\");\n\n //Generate new recovery token\n $newToken = PasswordGenerator::randomPassword(5);\n $result1 = $mysqli->query(\"UPDATE tbl_users SET recoveryToken ='\" . $newToken . \"' WHERE email='\" . $email . \"'\");\n\n //Send mail with token in url\n \n $subject = \"Caterpillars Count! Password Recovery\";\n\n $message = '<html><body>';\n $message .= '<h1>Caterpillars Count! Password Recovery</h1>';\n $message .= '<p>Please <a href=\"http://'.$_ENV['APP_DNS'].'/user/recover.php?userID=' . $id . '&recoveryToken='. $newToken .'\">CLICK HERE</a> to reset the password for <b>' . $email . '</b></p>';\n $message .= '<p>The link above will be valid on ' . strval($currentDate) . ' only.</p>';\n $message .= '<p>If you did not request to change your password, you may ignore this message.</p>';\n $message .= '</body></html>';\n $server = \"relay.unc.edu\";\n $port = \"25\";\n $headers = array(\n \"From\" => \"[email protected]\",\n \"To\" => $email,\n \"Subject\" => $subject,\n \"Content-type\" => \"text/html\"\n );\n \n $smtp = Mail::factory(\"smtp\",\n array(\n \"host\" => $server,\n \"port\" => $port,\n \"auth\" => false\n )\n ); \n\n $mail = $smtp->send($email, $headers, $message);\n\n return $user;\n\n }\n\n\n\n }", "title": "" }, { "docid": "172bc292fcf5609b887725719457271d", "score": "0.7045073", "text": "public function reset($token){\n if(!isset($token)){\n $this->redirect('/');\n }\n $codeId=explode('XCB',$token);\n $code=$codeId['0'];\n $id=$codeId['1'];\n $data=$this->User->findByActivationCode($code);\n if(empty($data)){\n $this->Session->setFlash('Invalid reset link. Try again or request a new mail!');\n }\n else{\n if($this->request->is('post') AND (!empty($this->request))){\n $this->User->id = $id;\n $this->User->set('activation_code',null);\n if($this->User->save($this->request->data)){\n $this->Session->setFlash('Password updated!');\n $this->redirect('/');\n }\n else $this->Session->setFlash('error!');\n }\n }\n }", "title": "" }, { "docid": "6611fece9027b98479a9c7d494ece61a", "score": "0.6977077", "text": "public function resetPassword()\n {\n // validate the request\n $rules = [\n 'code' => 'required',\n 'password' => 'required|between:'.UserModel::getMinPasswordLength().',255',\n ];\n\n $validation = Validator::make(post(), $rules);\n\n if ($validation->fails()) {\n return response($validation->messages(), 422);\n }\n\n $error = Lang::get('rainlab.user::lang.account.invalid_activation_code');\n\n // break up the code parts\n $parts = explode('!', post('code'));\n\n if (count($parts) != 2) {\n return response($error, 400);\n }\n\n list($userId, $code) = $parts;\n\n if (!strlen(trim($userId)) || !strlen(trim($code)) || !$code) {\n return response($error, 400);\n }\n\n // reset the users password\n if (!$user = Auth::findUserById($userId)) {\n return response($error, 400);\n }\n\n if (!$user->attemptResetPassword($code, post('password'))) {\n return response($error, 400);\n }\n\n return response('Ok', 200);\n }", "title": "" }, { "docid": "7312fb263ea1aa2827c49ae4a75b1a22", "score": "0.69590443", "text": "public function getResetPassword($token)\n {\n $user = User::where('unique_code',$token)->where('status', '!=', 'block')->first();\n if(isset($user->id)){\n return view('auth.reset-password');\n }else{\n $this->setFlashAlert('danger',__('registration.Invalid Link'));\n return redirect(route('auth.login'));\n }\n }", "title": "" }, { "docid": "267e5fa328c41b62c43bc2b9466ab98a", "score": "0.6942583", "text": "public function reset_password() {\n $this->User_activity->insert_user_activity();\n $password_token = $this->uri->segment(2);\n $this->load->model('User');\n $validate_password_token = $this->User->validate_password_token($password_token);\n $data['reset_password_token'] = $password_token;\n if ($validate_password_token == 'Failed') {\n $this->session->set_flashdata('password_token_error_message', 'Your reset password token is expired or incorrect,' . anchor('forgot_password', 'please try again', 'class=\"blue link-small\"'));\n\n $this->session->set_flashdata('username', '');\n } else {\n $this->session->set_flashdata('reset_password_token', $password_token);\n $this->session->set_flashdata('username', $validate_password_token->username);\n }\n $data['main_content'] = 'reset_password';\n $this->load->view('includes/template', $data);\n }", "title": "" }, { "docid": "5adc7c2b61e8848afbb63fecc44e57d0", "score": "0.6936132", "text": "public function reset_password() \n {\n $token = $this->base64url_decode($this->uri->segment(4)); \n $cleanToken = $this->security->xss_clean($token); \n \n $user_info = $this->M_account->isTokenValid($cleanToken); //either false or array(); \n \n if(!$user_info){ \n $this->session->set_flashdata('sukses', 'Token tidak valid atau kadaluarsa'); \n redirect(site_url('auth/Login'),'refresh'); \n } \n \n $data = array( \n 'title'=> 'Halaman Reset Password | Tutorial reset password CodeIgniter @ https://recodeku.blogspot.com', \n 'nama'=> $user_info->username, \n 'email'=>$user_info->email, \n 'token'=>$this->base64url_encode($token) \n ); \n \n $this->form_validation->set_rules('password', 'Password', 'required|min_length[5]'); \n $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required|matches[password]'); \n \n if ($this->form_validation->run() == FALSE) { \n $this->load->view('user/reset_password',$data);\n \n }else{ \n \n\n $post = $this->input->post(NULL, TRUE); \n $cleanPost = $this->security->xss_clean($post);\n $Password = $cleanPost['password'];\n \n $id = $user_info->id ; \n $data = array(\n 'password' => $Password,\n ); \n \n // $post = $this->input->post(NULL, TRUE); \n // $cleanPost = $this->security->xss_clean($post);\n // $hashed = md5($cleanPost['password']); \n // $cleanPost['password'] = $hashed; \n // $cleanPost['id'] = $user_info->id; \n // unset($cleanPost['passconf']); \n if(! $this->ion_auth->update($id,$data)){ \n $this->session->set_flashdata('flash', 'Update password gagal.'); \n }else{ \n $this->session->set_flashdata('flash', 'Password anda sudah \n diperbaharui. Silakan login.'); \n } \n redirect(site_url('auth/login'),'refresh'); \n } \n }", "title": "" }, { "docid": "6995fcffec15f51bbeccf178aafac99f", "score": "0.6912631", "text": "public function resetuserpass()\n\t\t{\n\t\t\t\t\t\t\t\t\n\t\t$post_pass = json_decode(trim(file_get_contents('php://input')), true);\t\t\n\t\tif ($post_pass)\n\t\t\t{\n\t\t\t\t$smtpDetails = getSmtpDetails();\t\n\t\t\t\t$result = $this->Reset_model->reset_pass($post_pass);\n\t\t\t\tif($result)\n\t\t\t\t{\n\t\t\t\t\t$userId=$post_pass['UserId'];\n\t\t\t\t\t$EmailToken = 'Reset Password';\n\t\t\t\t\t$res=new stdClass();\n\t\t\t\t\t$res->loginUrl = BASE_URL . '/login/';\n\t\t\t\t\t$EmailDetails = getEmailDetails($EmailToken,$userId);\n\t\t\t\t\t$body = $EmailDetails['EmailBody'];\n $FormattedBody = getFormattedBody($res ,$body);\n \n $send = SendEmail($smtpDetails['smtpEmail'], $EmailDetails['To'], $EmailDetails['Cc'], $EmailDetails['Bcc'], $EmailDetails['Subject'], $FormattedBody);\n\t\t\t\t\techo json_encode('Success');\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo json_encode('Code duplicate');\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "a6a33a05bc75f4ebc8855858994e9368", "score": "0.68973863", "text": "public function admin_reset_password_token($reset_password_token = null) {\n $this->layout = \"login\";\n if (empty($this->request->data)) {\n $this->request->data = $this->User->findByResetPasswordToken($reset_password_token);\n if (!empty($this->request->data['User']['reset_password_token']) && !empty($this->request->data['User']['token_created_at']) &&\n $this->__validToken($this->request->data['User']['token_created_at'])) {\n $this->request->data['User']['id'] = null;\n $this->Session->write('token', $reset_password_token);\n } else {\n $this->Session->setflash(__('The password reset request has either expired or is invalid.'), 'default', array('class' => 'alert alert-danger fade in'));\n return $this->redirect(array('controller' => 'Users', 'action' => 'admin_login'));\n }\n } else {\n $token = $this->Session->read('token');\n if ($this->request->data['User']['reset_password_token'] != $token) {\n $this->Session->setflash('The password reset request has either expired or is invalid.');\n return $this->redirect(array('controller' => 'Users', 'action' => 'admin_login'));\n }\n $user = $this->User->findByResetPasswordToken($this->request->data['User']['reset_password_token']);\n $this->User->id = $user['User']['id'];\n $this->request->data['User']['password'] = $this->request->data['User']['new_passwd'];\n\n if ($this->User->save($this->request->data, array('validate' => 'only'))) {\n unset($this->request->data['User']['new_passwd']);\n unset($this->request->data['User']['confirm_passwd']);\n $this->request->data['User']['reset_password_token'] = $this->request->data['User']['token_created_at'] = null;\n if ($this->User->save($this->request->data) && $this->__sendPasswordChangedEmail($user['User']['id'])) {\n $this->Session->delete('token');\n $this->Session->setFlash('Your password was changed successfully. Please login to continue.', 'default', array('class' => 'alert alert-danger fade in'));\n $this->redirect('/users/admin_login');\n }\n }\n }\n }", "title": "" }, { "docid": "9942cdf50220469d692df6a26131f25e", "score": "0.6893087", "text": "public function passwordreset($token = null)\n {\n if ($token) {\n $this->db->where('user_passwordreset_token', $token);\n $user = $this->db->get('ip_users');\n $user = $user->row();\n\n if (empty($user)) {\n // Redirect back to the login screen with an alert\n $this->session->set_flashdata('alert_success', lang('wrong_passwordreset_token'));\n redirect('sessions/login');\n }\n\n $formdata = array(\n 'user_id' => $user->user_id,\n );\n\n return $this->load->view('session_new_password', $formdata);\n }\n\n // Check if the form for a new password was used\n if ($this->input->post('btn_new_password')) {\n $new_password = $this->input->post('new_password');\n $user_id = $this->input->post('user_id');\n\n if (empty($user_id) || empty($new_password)) {\n $this->session->set_flashdata('alert_error', lang('loginalert_no_password'));\n redirect($_SERVER['HTTP_REFERER']);\n }\n\n // Call the save_change_password() function from users model\n $this->load->model('users/mdl_users');\n $this->mdl_users->save_change_password(\n $user_id, $new_password\n );\n\n // Update the user and set him active again\n $db_array = array(\n 'user_passwordreset_token' => '',\n );\n\n $this->db->where('user_id', $user_id);\n $this->db->update('ip_users', $db_array);\n\n // Redirect back to the login form\n redirect('sessions/login');\n }\n\n // Check if the password reset form was used\n if ($this->input->post('btn_reset')) {\n $email = $this->input->post('email');\n if (empty($email)) {\n $this->session->set_flashdata('alert_error', lang('loginalert_user_not_found'));\n redirect($_SERVER['HTTP_REFERER']);\n }\n\n // Test if a user with this email exists\n if ($this->db->where('user_email', $email)) {\n // Create a passwordreset token\n $email = $this->input->post('email');\n $token = md5(time() . $email);\n $session_data = array(\n 'user_mail' => $email,\n );\n\n $this->session->set_userdata($session_data);\n // Save the token to the database and set the user to inactive\n $db_array = array(\n 'user_passwordreset_token' => $token,\n );\n\n $this->db->where('user_email', $email);\n $this->db->update('ip_users', $db_array);\n\n // Send the email with reset link\n $this->load->library('email');\n\n // Preprare some variables for the email\n $email_resetlink = base_url() . 'sessions/passwordreset/' . $token;\n $email_message = $this->load->view('emails/passwordreset', array(\n 'resetlink' => $email_resetlink,\n ), true);\n $email_from = 'system@' . preg_replace(\"/^[\\w]{2,6}:\\/\\/([\\w\\d\\.\\-]+).*$/\", \"$1\", base_url());\n\n // Set email configuration\n $config['mailtype'] = 'html';\n $this->email->initialize($config);\n\n // Set the email params\n $this->email->from($email_from);\n $this->email->to($email);\n $this->email->subject(lang('password_reset'));\n $this->email->message($email_message);\n\n // Send the reset email\n $this->email->send();\n\n // Redirect back to the login screen with an alert\n $this->session->set_flashdata('alert_success', lang('email_successfully_sent'));\n redirect('sessions/login');\n }\n }\n\n return $this->load->view('session_passwordreset');\n }", "title": "" }, { "docid": "5cfc0762c7e9338145830c3b4b7a3c48", "score": "0.6889424", "text": "public function action_reset()\n {\n if (isset($_REQUEST['reset_token']) && isset($_REQUEST['reset_email']))\n {\n // make sure that the reset_token has exactly 32 characters (not doing that would allow resets with token length 0)\n if ((strlen($_REQUEST['reset_token']) == 32) && (strlen(trim($_REQUEST['reset_email'])) > 1))\n {\n $user = ORM::factory('User')->where('email', '=', $_REQUEST['reset_email'])->and_where('reset_token', '=', $_REQUEST['reset_token'])->find();\n\n if (is_numeric($user->id) && ($user->reset_token == $_REQUEST['reset_token']))\n {\n $password = $user->generate_password();\n $user->password = $password;\n\n $user->save();\n\n $message = \"Ваш новый пароль:\\n\\n\" . \":password\\n\\n\" . \"Вы можете войти здесь: \" . \":link\\n\\n\";\n\n // $mailer = Email::connect();\n // Create complex Swift_Message object stored in $message\n // MUST PASS ALL PARAMS AS REFS\n $subject = __('Account password reset');\n $to = $_REQUEST['reset_email'];\n $from = '[email protected]';\n $body = __($message, array(':link' => URL::site('user/login', TRUE), ':password' => $password));\n\n // FIXME: Test if Swift_Message has been found.\n // $message_swift = Swift_Message::newInstance($subject, $body)->setFrom($from)->setTo($to);\n $message_swift = Email::send('support', $subject, $body, $from, $to);\n if ($message_swift)\n {\n $message = 'Ваш пароль был успешно изменен и отправлен на ваш email';\n }\n else\n {\n $message = 'Could not send email.';\n }\n }\n }\n }\n\n $this->template->content = View::factory('/pages/user/reset')->bind('message', $message);\n }", "title": "" }, { "docid": "6f532411d12d8b914c0f53e0d4011d36", "score": "0.68857056", "text": "public function resetPassword()\n {\n $email = $this->input->post('email');\n $this->load->model('ModelUser');\n $cek = $this->ModelUser->getUser(['email' => $email]);\n if ( $cek ) {\n $token = bin2hex(openssl_random_pseudo_bytes(32));\n $user_token = [\n 'email' => $email,\n 'token' => $token,\n ];\n $this->load->model('ModelUser');\n $buatToken = $this->ModelUser->createToken( $user_token );\n\n $this->_kirimEmail( $token );\n\n }\n else {\n echo\"\n\t\t\t\t<script>\n\t\t\t\t\talert('Email Tidak Terdaftar.');\n\t\t\t\t\twindow.location = 'http://localhost/project-web/home/autentifikasi';\n\t\t\t\t</script>\";\n }\n \n }", "title": "" }, { "docid": "72abaee99a7d67b2b8cce3f999cde404", "score": "0.6884445", "text": "function resetPassword(){\n\t$table = $_SESSION['update_table2']['database_table_name'];\n\t$token = $_SESSION['reset_token'];\n $primaryKey = $_SESSION['update_table2']['keyfield'];\n $con = connect();\n\t$message = \"Please enter required fields\";\n\t$returnUrl = $_SESSION['return_url2'];\n\tif(!empty($_POST)){\n\t\t$checkToken = $con->query(\"SELECT * FROM $table WHERE token = '$token' AND timeout > '\".date('Y-m-d H:i:s').\"'\");\n\t\tif($checkToken->num_rows > 0){\n\t\t\t$passwordField = $_SESSION['user_field_password'];\n\t\t\t$confirmPasswordField = $_SESSION['user_field_confirm_password'];\n\t\t\t$passwordValue = trim($_POST[$passwordField]);\n\t\t\t$confirmPasswordValue = trim($_POST[$confirmPasswordField]);\n\t\t\tif(empty($passwordValue)){\n\t\t\t\t$message = \"Please enter new password.\";\n\t\t\t} elseif(empty($confirmPasswordValue)){\n\t\t\t\t$message = \"Please confirm your password.\";\n\t\t\t} elseif($passwordValue != $confirmPasswordValue){\n\t\t\t\t$message = \"Your passwords do not match. Please type carefully.\";\n\t\t\t} else {\n\t\t\t\t$user = $checkToken->fetch_assoc();\n\t\t\t\t$passwordValue = md5($passwordValue);\n\t\t\t\t$update = $con->query(\"UPDATE $table SET $passwordField='$passwordValue' , token=NULL ,timeout=NULL WHERE token = '$token'\");\n\t\t\t\tunset($_SESSION['reset_token']);\n $_SESSION['uid'] = $user[$_SESSION['update_table2']['keyfield']];\n setUserDataInSession($con,$user);\n\t\t\t\t$message = \"Your password has been changed. Please login.\";\n\t\t\t\t$returnUrl = BASE_URL.\"index.php\";\n\t\t\t}\n\t\t} else {\n\t\t\t$returnUrl = BASE_URL.\"index.php\";\n\t\t\t$message = \"Invalid or expired token. Please check your email or try again.\";\n\t\t}\n\t}\n\tif($message){\n\t\techo \"<script>alert('$message');</script>\";\n\t}\n\techo \"<script>window.location='\".$returnUrl.\"';</script>\";\n}", "title": "" }, { "docid": "da448c56fe5a177a89b2c9a5b7868769", "score": "0.68822765", "text": "public function forgot_password()\n {\n $token = $this->app->make(Token::class);\n $this->set('authType', $this->getAuthenticationType());\n $this->set('token', $token);\n $error = $this->app->make('helper/validation/error');\n if (!$this->request->isMethod('POST')) {\n return;\n }\n if (!$error->has()) {\n $accessControlCategoryService = $this->app->make('ip/access/control/forgot_password');\n if ($accessControlCategoryService->isDenylisted()) {\n $forgotPasswordThresholdReached = true;\n } else {\n $forgotPasswordThresholdReached = $accessControlCategoryService->isThresholdReached();\n $accessControlCategoryService->registerEvent();\n if ($forgotPasswordThresholdReached) {\n $accessControlCategoryService->addToDenylistForThresholdReached();\n }\n }\n if ($forgotPasswordThresholdReached) {\n $error->add(new UserMessageException(t('Unable to request password reset: too many attempts. Please try again later.')));\n }\n }\n $userInfo = null;\n if (!$error->has()) {\n $email = $this->request->request->get('uEmail');\n $email = is_string($email) ? trim($email) : '';\n if ($email === '') {\n $error->add(t('Please specify a valid email address'));\n } else {\n $e = $this->app->make('error');\n if (!$this->app->make(EmailValidator::class)->isValid($email, $e)) {\n $error->add($e->toText());\n } else {\n $userInfo = $this->app->make(UserInfoRepository::class)->getByEmail($email);\n // $userInfo may be null, but for security reasons we don't show any error message\n }\n }\n }\n $this->passwordUpgrade($userInfo, $error, true);\n }", "title": "" }, { "docid": "37cae540e4a2eae0296f577177351348", "score": "0.6853143", "text": "public function resetPasswordAction() {\n\n $token = $_POST[\"token\"];\n\n $user = $this->getUserOrExit($token);\n\n\n if ($user->resetPassword($_POST[\"password\"], $_POST[\"password_confirmation\"])) {\n\n View::renderTemplate(\"Password/reset_success\");\n\n } else {\n\n View::renderTemplate(\"Password/reset\", [\n \"token\" => $token,\n \"user\" => $user\n ]);\n\n }\n }", "title": "" }, { "docid": "0f73564501b791fc708763fcfe8d58a3", "score": "0.6853091", "text": "public function resetverify(Request $request)\n {\n $this->validate($request, [\n //'email' => 'required|email',\n 'token_rec' => 'required',\n 'newpassword' => 'required|string'\n ]);\n\n $input = $request->only(/*'email',*/'token_rec','newpassword');\n\n //Confirm the new password ?\n\n //Get the user_id\n //$user = User::where('email',$input['email'])->first();\n\n $forgot = ForgotPasswordModel::join('users','forgotpassword.user_id','=','users.id')->where('token',$input['token_rec'])->where('active_status',1)->first();\n //dd($forgot->user_id);\n // Verify token\n if(empty($forgot))\n {\n return response()->json(['message'=>'Token has been revoked'],401); \n }\n else\n {\n // Update db with hash of new password\n $password = $input['newpassword'];\n $hashed_pd = app('hash')->make($password);\n\n $affected = User::where('id',$forgot->user_id)->update(['password' => $hashed_pd]);\n\n //Change active_status to 0\n $affected = ForgotPasswordModel::where('user_id',$forgot->user_id)->update(['active_status' => 0]);\n\n\n }\n \n return response()->json(['message' => 'Succesfully password changed'],200);\n }", "title": "" }, { "docid": "2d884987f3f068eff412217b6b26ef02", "score": "0.68312943", "text": "public function removePasswordResetToken();", "title": "" }, { "docid": "a4eaedc9009c4373e2b32f1416b8dfe6", "score": "0.6827623", "text": "public function postReset()\n {\n $credentials = Input::only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n\n Password::validator(function ($credentials) {\n return strlen($credentials['password']) >= 1;\n });\n\n $response = Password::reset($credentials, function ($user, $password) {\n $user->password = $password;\n $user->save();\n\n Device::whereUserId($user->id)->update([\n 'access_token' => Str::random(64)\n ]);\n });\n\n switch ($response) {\n case Password::INVALID_PASSWORD:\n case Password::INVALID_TOKEN:\n case Password::INVALID_USER:\n return Redirect::back()->with('error', Lang::get($response));\n\n case Password::PASSWORD_RESET:\n return Redirect::back()->with('success', 'Password has been successfully changed.');\n }\n }", "title": "" }, { "docid": "ef4d0c65673fd52faaa5a390db6abbb2", "score": "0.68255687", "text": "public function do_reset_password()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::action('UserController@reset_password', array('token'=>$input['token']))\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "title": "" }, { "docid": "265d7b47baa7779225e89341625c9834", "score": "0.6813844", "text": "public function recover_password_post($token)\n {\n $this->validate(request(), [\n 'password' => ['required', 'required_with:password_confirmation','same:password_confirmation', 'string', 'min:8', 'confirmed'],\n 'password_confirmation' => ['required', 'min:6'],\n ]);\n\n\n $check_token = DB::table('password_resets')->where('token',$token)->where('created_at', '>', Carbon::now()->subHours(2))->first();\n //dd($check_token);\n if (! empty($check_token)){\n $admin = Admin::Where('email', $check_token->email)->update([\n 'email'=> $check_token->email,\n 'password' => Hash::make(request()->password), \n ]);\n DB::table('password_resets')->where('email', request('email'))->delete();\n Auth::guard('admins')->attempt(['email' => $check_token->email, 'password' => request()->password], true);\n return redirect()->intended(route('control.dashboard'));\n }else {\n return redirect()->guest(route('control.forget_passowrd'));\n }\n \n }", "title": "" }, { "docid": "574a40deb28a872921858dfda477d4ba", "score": "0.68125224", "text": "public function doResetPassword()\n {\n $repo = App::make('UserRepository');\n $input = array(\n 'token' =>Input::get('token'),\n 'password' =>Input::get('password'),\n 'password_confirmation' =>Input::get('password_confirmation'),\n );\n\n // By passing an array with the token, password and confirmation\n if ($repo->resetPassword($input)) {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::action('UsersController@login')\n ->with('notice', $notice_msg);\n } else {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::action('UsersController@resetPassword', array('token'=>$input['token']))\n ->withInput()\n ->with('error', $error_msg);\n }\n }", "title": "" }, { "docid": "6af87339802ef61770ec68dbc0238ea4", "score": "0.680675", "text": "public function getTokenResetPassword(Request $request) \n {\n try \n {\n $user = $this->user->where('email', $request->get('email'))->first();\n\n if (!$user)\n {\n return response()->json($this->response->toString(\"N\", config('reset.nomail')));\n }\n\n $userToken = JWTAuth::fromUser($user);\n \n $data = array(\n 'name' => $user->name,\n 'link' => \"http://localhost:4200/password/reset/\".$userToken\n );\n\n Mail::send('mail', $data, function ($message) {\n\n $message->from('[email protected]', 'SUPPLY CONTROL');\n\n $message->to('[email protected]')->subject('Password Recoverys');\n\n });\n\n return response()->json($this->response->toString(\"N\", config('reset.sucess')));\n\n }\n catch (\\Exception $e)\n {\n return response()->json($this->response->toString(\"N\", $e->getMessage()));\n }\n }", "title": "" }, { "docid": "387c3bee9227575fd0d2b59336f1d4e3", "score": "0.6805001", "text": "public function reset_password_by_token($token){\n // if token is not found return error 404 page\n if(!Members::check_reset_password_token($token)){\n return view('errors.404');\n }\n \n // check user_password_reset_timestamp\n $user_password_reset_timestamp = DB::table('users')->where('user_forgot_password_token', $token)->value('user_password_reset_timestamp');\n\n // calculate time passed on user_password_reset_timestamp\n $timestamp = time() - (int)$user_password_reset_timestamp;\n\n // if timestamp is more than 1 hour(3600 sec) redirect back to forgotpassword\n if ($timestamp > 3600){\n // add error message to session\n Session::flash('feedback_error', 'Link is verstreken.. vraag een nieuwe link aan');\n return redirect('forgotpassword');\n false;\n }\n // return view resetpassword\n return view('account.resetpassword');\n }", "title": "" }, { "docid": "6397e39c566d938aee19e9777dc66459", "score": "0.67972183", "text": "public function setPasswordResetToken();", "title": "" }, { "docid": "ed3d39d670eb32102db173974907e502", "score": "0.6792604", "text": "public function getPasswordResetToken() { return $this->passwordResetToken; }", "title": "" }, { "docid": "eec5e4d0b6cb9b639178bf517ecc4561", "score": "0.677943", "text": "public function resetPasswordPush(Request $request){\n \n //save Token to user and send Email\n\n if ($request->input('email')) {\n $email=$request->input('email');\n $user=User::where('email', $email)->first();\n if ($user) {\n $token=$this->generateToken(60,$email);\n $data = array(\n 'user_id' => $user->id,\n 'token' => $token\n );\n DB::table('password_resets')->insert($data);\n EmailController::sendResetPassword($token,$email);\n\n Session::flash('status','success');\n Session::flash('resetPasswordMessage',getSuccessRecovery($email));\n }else{\n \n Session::flash('status','danger');\n Session::flash('resetPasswordMessage',getErrorRecovery());\n\n }\n\n return redirect()->route('reset_password');\n }\n\n\n //handle change Password if posted / if button change_password clicked\n\n if ($request->input('change_password')) {\n\n $rules = array(\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required',\n );\n \n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return Redirect::back()->withErrors($validator);\n }else{\n $token=$request->input('token_reset');\n $reset=DB::table('password_resets')->where('token', $token)->first();\n\n if ($reset) {\n\n $user= User::find($reset->user_id);\n $user->password = Hash::make($request->input('password'));\n $user->save();\n DB::table('password_resets')->where('id',$reset->id)->delete();\n Session::flash('status','success');\n Session::flash('back_message','Your password has ben successfully changed.');\n return view('frontend.login');\n }\n } \n }\n\n return Redirect::back();\n }", "title": "" }, { "docid": "c909e3938aa33aac1126cc7ba7d95c0f", "score": "0.67771065", "text": "public function resetPassword()\n {\n #ambil email dan token\n $email = $this->input->get('email');\n $token = $this->input->get('token');\n # ada gak user yg emailnya ada di db\n $user = $this->db->get_where('user', ['email' => $email])->row_array(); # ambil sebaris\n # kita cek kalo ada kita ambil tokennya.\n if ($user) {\n # jika user ada, cek tokennya\n $user_token = $this->db->get_where('user_token', ['token' => $token])->row_array();\n # siapa tau tokennya salah, dibuat sendiir\n # kalo ada isinya ngapain\n if ($user_token) {\n $this->session->set_userdata('reset_email', $email);\n # panggil method baru\n $this->changePassword();\n } else { # kalo gak ada isinya ngapain\n $this->session->set_flashdata('message', '<div class=\"alert alert-danger\" role=\"alert\">\n Reset password failed! Wrong Token!</div>');\n redirect('auth');\n }\n } else {\n $this->session->set_flashdata('message', '<div class=\"alert alert-danger\" role=\"alert\">\n Reset password failed! Wrong Email!</div>');\n redirect('auth');\n }\n }", "title": "" }, { "docid": "faad083d0256e99dc899319f68fcb4c9", "score": "0.67688596", "text": "public function postReset()\n\t{\n\t\tif (AccessmUsers::getFindDuplicateValue(Input::get('email')) == true)\n\t\t{\n\t\t\t$memberid = AccessmUsers::getuserid(Input::get('email'));\n\t\t\t$memberdob = MembersmSSA::getdob(AccessmUsers::getusermemberid(Input::get('email')));\n\t\t\t\n\t\t\tif (Input::get('year') == $memberdob)\n\t\t\t{\n\t\t\t\t$post = AccessmUsers::find($memberid);\n\t\t\t\tLogsfLogs::postLogs('Login', 3, 0, ' - Reset Account ' . Hash::make(Input::get('password')) . ' - ' . Input::get('email'), NULL, NULL, 'Failed');\n\t\t\t\t$post->password = Hash::make(Input::get('password'));\n\t\t\t\t$post->encryptedcode = Input::get('password');\n\n\t\t\t\t$post->save();\n\n\t\t\t\tif($post->save())\n\t\t\t\t{\n\t\t\t\t\tLogsfLogs::postLogs('Login', 3, 0, ' - BOE Portal Reset Account Password Successfully ' . Input::get('email'), NULL, NULL, 'Success');\n\t\t\t\t\treturn Redirect::action('LeadersPortalLoginController@getIndex');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tLogsfLogs::postLogs('Login', 3, 0, ' - BOE Portal Reset Account Password Failed ' . Input::get('email'), NULL, NULL, 'Failed');\n\t\t\t\t\treturn Response::json(array('info' => 'Failed'), 400);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (Cache::has('alerts_message_Failed_Login')) { Cache::put('alerts_message_Failed_Login', 'true', 1); }\n\t\t\t\telse { Cache::add('alerts_message_Failed_Login', 'true', 1); }\n\n\t\t\t\tCache::put('alerts_message', 'Unable to verify! Please check your email with gakkai department or email [email protected]!', 1);\n\n\t\t\t\tLogsfLogs::postLogs('Login', 3, 0, ' BOE Portal Reset Account [Birth Year] - Birth Year is wrong - ' . Input::get('email'), NULL, NULL, 'Failed');\n\t\t\t\treturn Response::json(array('info' => 'Failed', 'ErrType' => 'DOB'), 400);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (Cache::has('alerts_message_Failed_Login')) { Cache::put('alerts_message_Failed_Login', 'true', 1); }\n\t\t\telse { Cache::add('alerts_message_Failed_Login', 'true', 1); }\n\n\t\t\tCache::put('alerts_message', 'Email does not exist! Please check your email with gakkai department or email [email protected]!', 1);\n\n\t\t\tLogsfLogs::postLogs('Login', 3, 0, ' BOE Portal Reset Account [Email] - Email does not Exist - ' . Input::get('email'), NULL, NULL, 'Failed');\n\t\t\treturn Response::json(array('info' => 'Failed', 'ErrType' => 'Email'), 400);\n\t\t}\n\t}", "title": "" }, { "docid": "a05709039ec754273335a0252cc30e60", "score": "0.6746352", "text": "public function resetpassword123($token = null) {\n $this->layout = 'front';\n $this->loadModel('User');\n $find = $this->User->find('first', array('conditions' => array('User.user_token' => $token)));\n $id = $find['User']['id'];\n $this->set('token', $find);\n if (!empty($find)) {\n if ($this->request->is('post')) {\n if ($this->request->data['new_password'] == $this->request->data['confirm_password']) {\n $NewPassword_is = $this->request->data['new_password'];\n $hashPassword_is = Security::hash($NewPassword_is, null, TRUE);\n $this->request->data['password'] = $hashPassword_is;\n $this->User->id = $id;\n $this->set($this->request->data);\n if ($this->User->save($this->request->data)) {\n $this->Session->setFlash('Password Successfully Changed , Please <a href=\"http://jobider.pnf-sites.info/developer/login\">login here</a>', 'success');\n } else {\n $this->Session->setFlash('Password Does Not Changed, Please Try Again', 'error_unverify');\n }\n } else {\n $this->Session->setFlash('Passowrd Does Not Match , Please Enter The Correct Password', 'error_unverify');\n }\n }\n }\n }", "title": "" }, { "docid": "9222c8e1845b685dac8204a6e7e6b7cb", "score": "0.67345625", "text": "public function reset_password_post()\r\n {\r\n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\r\n $this->form_validation->set_rules('password', 'password', 'required|min_length[8]');\r\n $this->form_validation->set_rules('confirm_password', 'Confirm Password', 'required|matches[password]|min_length[8]');\r\n if ($this->form_validation->run() == false) {\r\n $errors = $this->form_validation->error_array();\r\n $this->response([\r\n 'status' => false,\r\n 'message' => $errors,\r\n ], REST_Controller::HTTP_NOT_FOUND);\r\n } else {\r\n if ($this->form_validation->run()) {\r\n $email = $this->input->post('email');\r\n $reset_password = array(\r\n 'password' => md5($this->input->post('password')));\r\n $reset_response = $this->quoteshare_model->rest_password($email, 'users', $reset_password);\r\n if ($reset_response) {\r\n $this->response([\r\n 'status' => true,\r\n \"message\" => \"Your new password successfully reset, Please login again.\",\r\n ], REST_Controller::HTTP_OK);\r\n } else {\r\n $this->response([\r\n 'status' => false,\r\n \"message\" => \"Your password not reset successfully, Please try it again.\",\r\n ], REST_Controller::HTTP_NOT_FOUND);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5ee863792ce2a2037fbf03001ee23c0f", "score": "0.6732929", "text": "public function resetPassword(Request $request) {\n //validates the request\n $validator = Validator::make($request->all(), [\n 'email' => 'required|email',\n ]);\n\n //validation fails\n if($validator->fails()) {\n return $this->validationError($validator->getMessageBag()->all(), HttpStatusCodes::BAD_REQUEST); \n }\n\n //checks if the user with the given email exists\n $user = User::where('email', '=', $request->email)->first();\n if(!$user) {\n return $this->validationError('Email provided is not registered on this platform', HttpStatusCodes::BAD_REQUEST);\n }\n \n $resetToken = $this->generateDefaultStaticPassword(20);\n $resetPasswordUrl = url(\"/reset-password/{$resetToken}\");\n try{\n //Mail::to($user)->send(new resetPassword($resetPasswordUrl));\n }catch(ErrorException $e) {\n //something went wrong\n }\n\n //store token in resetpasswordtoken table\n ResetPasswordToken::create([\n 'user_id' => $user->id,\n 'token' => $resetToken \n ]);\n \n return $this->success('Reset password link has been sent to your email', HttpStatusCodes::OK);\n }", "title": "" }, { "docid": "1bce8671697a919555e9b89b377bdee1", "score": "0.67281604", "text": "public function actionRecover($token){\n $token = htmlentities($token);\n $token = preg_replace('/[^-a-zA-Z0-9_]/', '', $token);\n $user = Users::find()->where(['authKey'=>$token, 'verified'=>'1', 'active'=>'1'])->one();\n if(isset($_POST['Users'])){\n $password = $_POST['Users']['password'];\n $repassword = $_POST['Users']['repassword'];\n if($password != $repassword){\n $user->addError('password', 'Passwords do not match.');\n }else{\n $user->password = hash('sha256', (hash('sha256', strtotime($user->created_at))).$password);\n if($user->save()){\n $user->authKey = '';\n $user->save();\n \\Yii::$app->session->setFlash('success', 'Password reset successful. Login with your new password');\n return $this->redirect(['site/login']);\n }\n }\n }\n if(!empty($user)){\n $hourdiff = round((strtotime($user->updated_at) - time())/3600, 1);\n if($hourdiff < 24){\n return $this->render('recover', ['user'=>$user]);\n }else{\n $message = 'It seems that your recovery link has expired. Please recover your password again.';\n $name = 'Token Expired';\n return $this->render('error', ['message'=>$message, 'name'=>$name]);\n }\n }else{\n return $this->goHome();\n }\n }", "title": "" }, { "docid": "575a979227c2583036ba1aba26248c73", "score": "0.6726424", "text": "public function resetpassword($token = null) {\n $this->layout = 'front';\n $this->loadModel('User');\n $find = $this->User->find('first', array('conditions' => array('User.user_token' => $token)));\n $id = $find['User']['id'];\n $this->set('token', $find);\n if (!empty($find)) {\n if ($this->request->is('post')) {\n $this->User->set($this->request->data);\n if ($this->request->data['User']['new_password'] == $this->request->data['User']['confirm_password']) {\n// $password_will_be = $this->request->data['User']['new_password'];\n// $hpassword_back_with = Security::hash($password_will_be, null, true);\n $this->request->data['User']['password'] = $this->Auth->password($this->request->data['User']['new_password']);\n $this->User->id = $id;\n $this->set($this->request->data);\n// pr($this->request->data);\n// die;\n if ($this->User->save($this->request->data)) {\n $this->Session->setFlash('Password successfully changed , Please <a href=\"http://www.jobider.com/login\" target=\"_blank\">login here</a>', 'success');\n } else {\n $this->Session->setFlash('Password Does Not Changed, Please Try Again', 'error_unverify');\n }\n } else {\n $this->Session->setFlash('Password Does Not Match , Please Enter The Correct Password', 'error_unverify');\n }\n }\n }\n }", "title": "" }, { "docid": "ba7e0fd596558243c38be8068a18b6b4", "score": "0.6725653", "text": "public function reset_password() \n {\n $account = $this->account_model->get_specific(USER_ACCOUNT_TABLE, array(\"reset_token\" => $this->input->get('reset_token')));\n \n if($account && !empty($account->reset_token))\n {\n // Load the reset view\n $this->data['body'] = $this->load->view('account/reset_password', $this->data, TRUE);\n $this->parser->parse('eapp_template', $this->data);\n }\n else\n {\n // Load page that token is no longer available\n // Load the reset view\n $this->data['body'] = $this->load->view('errors/message', $this->data, TRUE);\n $this->parser->parse('eapp_template', $this->data);\n }\n \n }", "title": "" }, { "docid": "7eb78b685aefd83110f157ed56ef8914", "score": "0.6725356", "text": "public function reset()\n {\n $userId = $this->uri->segmpent(3);\n $params = ['password' => password_hash(random_string('alnum', '16'), PASSWORD_DEFAULT)];\n\n if (Logins::find($userId)->update($params)) {\n // TODO: Implement mailing logic.\n\n $this->session->set_flashdata('class', 'alert alert-success');\n $this->session->set_flashdata('message', 'The use password has been reset.');\n }\n }", "title": "" }, { "docid": "9674a1821d8e0118ef22f26aea1aeeae", "score": "0.6724928", "text": "public function resetPasswordForm(Request $req){\n if($req->has('token')&&$req->has('userId')){\n $user=User::find($req->userId);\n if($user&&$user->token==$req->token){\n return view('resetPassword',[\"id\"=>$user->id]);\n }else{\n return redirect(\"/\");\n }\n }else{\n return redirect(\"/\");\n }\n }", "title": "" }, { "docid": "e5bc52f04eed8e65d284e8804c7709ec", "score": "0.67235035", "text": "public function resetPasswordToken($userId){\n\n $db = Database::openConnection();\n $query = \"UPDATE forgotten_passwords SET password_token = NULL, \" .\n \"password_last_reset = NULL, forgotten_password_attempts = 0 \".\n \"WHERE user_id = $userId LIMIT 1\";\n $db->query($query);\n }", "title": "" }, { "docid": "b7ec14817a0665070ab69421fd70e16b", "score": "0.671616", "text": "public function post_resetpassword()\n\t{\n $input = Input::all();\n\n $rules = array(\n 'oldpassword' => 'required',\n 'password' => 'required|between:6,12',\n 'repassword' => 'required|same:password'\n );\n\n $validation = Validator::make($input, $rules);\n\n if ($validation->fails()) {\n return json_encode($validation->errors);\n }\n\n $user = Console_User::find(Auth::user()->su_id);\n\t\t\n if (Hash::check($input['oldpassword'], $user->su_password) && $input['password'] == $input['repassword']) {\n $user->su_password = Hash::make($input['password']);\n $user->save();\n\n Log::write('User', 'Reset Password User '.$user->profile->sup_no_ic.' By <code>'.Auth::user()->su_username.'</code>');\n \n return true;\n }\n }", "title": "" }, { "docid": "cec8920d2c77cbeb73bb376e23eb9124", "score": "0.67118895", "text": "public function resetPasswordAction() {\n\t\t$token = $_POST['token'];\n\t\t\n\t\t$user = $this->getUserOrExit( $token );\n\t\t\n\t\t$user = User::findByPasswordReset( $token );\n\t\t\n\t\tif ( $user->resetPassword( $_POST['password'] ) ) {\n\t\t\t\n\t\t\tView::renderTemplate( 'Password.reset_success' );\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tView::renderTemplate( 'Password.reset', [\n\t\t\t\t'token' => $token,\n\t\t\t\t'user' => $user\n\t\t\t]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "183f27e5e15cc098d82a67771dce30a3", "score": "0.670804", "text": "public function resetPassword($reset_password_token=null){\n\t if($reset_password_token!=null){\n\t\tif(Input::isMethod('post')){\n\t\t\t$rules = array(\n\t\t\t\t'newpassword'\t => 'required',\n\t\t\t\t'confirmpassword' => 'required|same:newpassword'\n\t\t\t);\n\t\t\t$validator = Validator::make(Input::all(),$rules);\n\t\t\t if ($validator->fails()) {\n\t\t\t\t$messages = $validator->messages();\n\t\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t\t } else {\n\t\t\t\t\t$reset_password_token\t=\tInput::get('reset_password_token');\n\t\t\t\t\t$newpassword\t\t\t=\tHash::make(Input::get('newpassword'));\n\t\t\t\t\t$user\t\t\t\t\t=\tAdmin::GetFromToken($reset_password_token);\n\t\t\t\t\tif(!empty($user)){\n\t\t\t\t\t\t/* calls function for Reset password */\n\t\t\t\t\t\t$response = Admin::ResetPassword($user->id,$newpassword);\n\t\t\t\t\t\tif($response){\n\t\t\t\t\t\t\t/* email sending to user if password successfully changed. */\n\t\t\t\t\t\t\t$full_name \t\t\t\t=\t$user->first_name.' '.$user->last_name;\n\t\t\t\t\t\t\t$subject_array =\tarray();\n\t\t\t\t\t\t\t$replace_array \t\t\t= \tarray($full_name);\n\t\t\t\t\t\t\t/* call email sending function */\n\t\t\t\t\t\t\t$mail_send = $this->mail_send($action='reset_password',$user->email,$full_name,$subject_array,$replace_array);\n\t\t\t\t\t\t\tToast::success(trans('Password successfully changed!'));\n\t\t\t\t\t\t\treturn Redirect::to(URL::route('adminlogin'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tToast::error(trans('Technical error please try again later!'));\n\t\t\t\t\t\t\treturn Redirect::to(URL::route('adminlogin'));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tToast::error(trans('Your token is mismatch please generate new token!'));\n\t\t\t\t\t\treturn Redirect::to(URL::route('adminlogin'));\n\t\t\t\t\t}\n\n\t\t\t\t }\n\t\t\t\t}else{\n\t\t\t\t\t return View::make('admin.login.resetpassword' ,compact('reset_password_token'));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tToast::error(trans('You are using wrong link or your link is expired!'));\n\t\t\t\treturn Redirect::to(URL::route('adminlogin'));\n\t\t\t}\n\n\t}", "title": "" }, { "docid": "39e5fb075bb33c37464abcd93130a993", "score": "0.6704653", "text": "function resetPassword(Request $request)\n {\n $validatedData = $request->validate([\n 'email' => 'email|required',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required',\n 'token' => 'required'\n \n ]);\n\n $user = User::where('email', $request->email)->where('forgot_password_token', $request->token)->first();\n if ($user != null){\n \n // $response['message'] = 'token valid';\n // $response['data'] = null;\n // return $response;\n $tokenBaru = Str::random(60);\n $password = bcrypt($request->password);\n\n $user->password = $password;\n $user->remember_token = $tokenBaru;\n $user->save();\n \n $response['message'] = 'Password Berhasil diubah';\n \n $data['name'] = $user->name;\n $data['api_token'] = $user->remember_token; \n \n $response['data'] = $data;\n\n return $response;\n }else{\n $response['message'] = 'Password Gagal diUbah';\n return $response;\n }\n \n }", "title": "" }, { "docid": "4da9775dd1b98f5f015393cc33c8efba", "score": "0.6703601", "text": "public function postReset()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::to('user/login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::to('user/reset/'.$input['token'])\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "title": "" }, { "docid": "bad8fa060accad695b6f21c901166c21", "score": "0.6700157", "text": "public function getResetToken(Request $request)\n {\n $user = User::where('email', $request->email)->where('cpf', $request->cpf)->first();\n if (!$user) {\n return response()->json(['Usuário não encontrado'], 404);\n }\n $token = $request->email.$request->cpf.Carbon::now()->toDateTimeString();\n $token = Hash::make($token);\n $token = preg_replace('/[^A-Za-z0-9\\-]/', '', $token);\n DB::table('password_resets')->insert([\n 'email' => $request->email,\n 'token' => $token,\n 'created_at' => Carbon::now()\n ]);\n //sendemail\n return response()->json(compact('token'));\n }", "title": "" }, { "docid": "8628f04f406bca94dd54efae4b8fd061", "score": "0.6698022", "text": "public function resetAction() {\n\n $token = $this->route_params[\"token\"];\n\n $user = $this->getUserOrExit($token);\n\n View::renderTemplate(\"Password/reset\", [\n \"token\" => $token\n ]);\n\n }", "title": "" }, { "docid": "d77a28bdc5482c618c967920b7fb7290", "score": "0.6675745", "text": "public function reset(Request $request)\n {\n\n $old = DB::table('password_resets')->where('email', $request->email)->where('token', $request->token)->first();\n if ($old) {\n $user = User::where('email', $request->email)->first();\n if ($user) {\n $v = $this->validateResetPasswordNow($request->all());\n if ($v->fails()) {\n return response()->json(['invalids' => $v->errors()]);\n }\n else{\n DB::transaction(function() use($user, $request){\n $user->update(['password' => Hash::make($request->password), 'remember_token' => Str::random(10)]);\n DB::table('password_resets')->where('email', $request->email)->where('token', $request->token)->delete();\n });\n return response()->json(['success' => \"Votre mot de passe a été réinitialisé avec succès! Vous pouvez vous connecter à nouveau!\"]);\n }\n }\n return response()->json(['errors' => \"L'adresse mail est inconnue\"]);\n DB::table('password_resets')->where('email', $request->email)->delete();\n }\n return response()->json(['errors' => \"Votre requête est inconnue: Les données ne correspondent pas!\"]);\n\n }", "title": "" }, { "docid": "8c38ab0b6df4abe7f284699ee71cf1a5", "score": "0.6669041", "text": "public function resetAction() {\n\t\t$token = $this->route_params['token'];\n\t\t\n\t\t$user = $this->getUserOrExit( $token );\n\t\t\n\t\tView::renderTemplate( 'Password.reset', [\n\t\t\t'token' => $token\n\t\t] );\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "482f461fa3e61d5ba88e43f84dff23c8", "score": "0.66650945", "text": "public function resetPassword(Request $request){\n\n //Validate request\n $vArray = [\n \"email\" => \"email\", \n \"password\" => \"required\", \n \"mobile_number\" => 'digits:10',\n \"verification_code\" => 'required|digits:4' \n ];\n\n check_validation($request, $vArray);\n\n $res = array(\"success\" => false, \n \"msg\" => trans('Api::language.LANG_FAILED_TO_RESET_PASSWORD'), \n 'code' => 400);\n\n //Variables\n $email = $request->get('email');\n $password = bcrypt($request->get('password'));\n $mobileNumber = $request->get('mobile_number');\n $otp = $request->get('verification_code');\n\n if ($email != \"\") {\n \n $where = array('email' => $email); \n \n }else{\n\n $where = array('mobile_number' => $mobileNumber); \n\n }\n\n if ($otp == config('constants.MASTER_OTP') && config('constants.APP_MODE') == \"DEVELOPEMENT\") {\n \n }else{\n \n $where['verification_code'] = $otp; \n }\n \n $update = array('password' => $password);\n\n $check = Users::where($where)\n ->whereIn('user_type', ['Driver', 'Passenger'])\n ->update($update);\n\n if ($check) {\n \n $res['success'] = true;\n $res['msg'] = trans('Api::language.LANG_YOUR_PASSWORD_HAS_BEEN_RESET_SUCCESSFULLY');\n $res['code'] = 200;\n }\n \n return Response::json($res);\n }", "title": "" }, { "docid": "8390c5df52c1d3b407c732a8d293fde1", "score": "0.6660747", "text": "public function reset_password($token) {\n\t\t$result = DB::table('password_resets')\n \t\t->where('token', '=', $token)\n \t\t->get();\n\t\t$flag = false;\n\t\tif(count($result)>0){\n \t\t$email = $result[0]->email;\n \t\t$date = date('Y-m-d H:i:s');\n \t\t$hourdiff = round((strtotime($date) - strtotime($result[0]->created_at))/3600, 1);\n \t\tif($hourdiff>24){\n \t\t $flag =true;\n \t\t return view('site.reset_password',compact('token','flag','email'));\n \t\t} else {\n return view('site.reset_password',compact('token','flag','email'));\n \t\t}\n\t\t} else {\n\t\t return redirect('/login');\n\t\t}\n\t}", "title": "" }, { "docid": "c137726b428a438bd330eac66bf0e661", "score": "0.66565627", "text": "public function actionResetPassword(){\n $program = Yii::app()->params['program'];\n $content = PageContent::model()->find(\"program_id = $program AND page_id = 12\");\n $this->setMetaTags($content);\n if (Yii::app()->request->isPostRequest){\n $emailToken = Yii::app()->request->getPost('emailToken');\n $timeToken = Yii::app()->request->getPost('timeToken');\n\n $email = Yii::doDecrypt($emailToken);\n $time = Yii::doDecrypt($timeToken);\n\n $account = Account::model()->find(\"email = '{$email}'\");\n\n if ($account){\n $accountPassword = Yii::app()->request->getPost('password');\n $account->setAttribute('password', $accountPassword);\n $account->save();\n $result = array('status' => 'success', 'message' => 'Your password has been reset! You can use it in next time log in');\n }\n else $result = array('status' => 'error', 'message' => 'Account is not found');\n header(\"Content-type: application/json\");\n echo json_encode($result);exit();\n }\n return $this->render('reset_password', array('content' => $content));\n }", "title": "" }, { "docid": "4cf152d69f88183eb9cfc9505775b668", "score": "0.6638186", "text": "public function resetpassword()\n{\n$_POST = $this->striptags($_POST);\t\n\t\n\t\textract($_POST);\n\t\n\t\t$toemail \t\t\t\t\t=\t'';\n\t\t$auth \t\t\t\t\t\t= \t\"\";\n\t\t$subject \t\t\t\t\t=\t'Reset password';\n\t\t\n\t\t//check whehter authorised email is set or not\n\t\t$table='userdetails';\n\t\t$field='AuthorisedEmail';\n\t\t$order_by='';\n\t\t$order_by_field='';\n\t\t$limit='';\n\t\t\n\t\t$cond=array();\n\t\t\n\t\t$cond['Email'] \t=\t$forget_reg_email;\n\t\t\n\t\t$authorised = $this->Commonmodel->getAfield($table,$cond,$field,$order_by='',$order_by_field='',$limit='');\n\t//\techo $this->db->last_query(); exit; \n\t\t$cond=array();\n\t\t\t\n\t\tif( $authorised!='' )\n\t\t{\n\t\t\t\n\t\t\t$cond['AuthorisedEmail'] \t=\t$authorised;\n\t\t\t$toemail \t\t\t\t\t=\t$authorised;\n\t\t\t$auth \t\t\t\t\t\t= \t\"Authorized Email\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cond['Email'] \t\t\t\t=\t$forget_reg_email;\n\t\t\t$toemail \t\t\t\t\t=\t$forget_reg_email;\t\n\t\t\t$auth \t\t\t\t\t\t= \t\"Registered Email\";\n\t\t}\n\t\n\t//print_r($cond); exit; \n\t\n\t$field='SLNO';\t\n\t//get the SLNO \t\n\t$slno = $this->Commonmodel->getAfield($table,$cond,$field,$order_by='',$order_by_field='',$limit='');\n\t\n\t$table='users';\n\t\n\t//generate random password\n\t\n\t$cond = array();\n\t$cond['SLNO'] = $slno;\n\t\n\t$pwd = $this->saltedpassword->random_password(8);\n\t$Password = $this->saltedpassword->makeITcrypt($pwd);\n\t\n\t$setdata['Password']\t\t\t= $Password['hashpassword'];\n\t$setdata['Salt'] \t\t\t\t= $Password['salt'];\n\t\n\t$setdata['LastUpdated']\t\t= time();\n\n\t$exec_qry = $this->Commonmodel->updatedata($table,$setdata,$cond) ;\n\n\t#echo $cond['SLNO'].\"<br>\"; print_r($setdata); exit; \t\n\t\n\tif( $exec_qry )\n\t{\n\t\t$template = \"<h3>Your login password:</h3>\".$pwd;\n\t\t$this->sendEmail($toemail,$subject,$template);\n\t\t\n\t\t$arr = array(\"Message\"=>\"done\",\"to\"=>$auth);\n\t\techo json_encode($arr);\n\t}\n\telse\n\t{\n\t\t$arr = array(\"Message\"=>\"failed\",\"to\"=>$auth);\n\t\techo json_encode($arr);\n\t}\n\t\t\n\t\t\n}", "title": "" }, { "docid": "4be6161fa17faee273e4658c1353d834", "score": "0.6637869", "text": "public function postReset()\n {\n $credentials = Input::only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n\n $response = Password::reset($credentials, function ($user, $password) {\n $user->password = $password;\n $user->save();\n });\n\n switch ($response) {\n case Password::INVALID_PASSWORD:\n case Password::INVALID_TOKEN:\n case Password::INVALID_USER:\n return Redirect::back()->with('error', Lang::get($response));\n\n case Password::PASSWORD_RESET:\n return Redirect::to('/participa')->with('message', trans('messages.passresetsuccess'));\n }\n }", "title": "" }, { "docid": "05b378dc4be9f81be014c5eecbc87c46", "score": "0.6624186", "text": "public function password(Request $request) {\n $user = User::where('email', '=', $request->email)->first();\n\n if ($user == null) {\n return redirect()->back()->with(['error' => \"Oops. This email doesn't exist.\"]);\n }\n\n // Inserting the actual email and creating a new random token for it\n DB::table('password_resets')->insert([\n 'email' => $request->email,\n 'token' => Str::random(40),\n 'created_at' => Carbon::now()\n ]);\n\n // Get the token just created above\n $tokenData = DB::table('password_resets')\n ->where('email', $request->email)->first();\n\n if ($this->sendResetEmail($request->email, $tokenData->token) == null) {\n return redirect()->back()->with(['success' => 'A reset link has been sent to your email address.']);\n } else {\n return redirect()->back()->with(['error' => 'A Network Error occurred. Please try again.']);\n }\n }", "title": "" }, { "docid": "b81aac7daba83418ff1343cf221c90b4", "score": "0.6617334", "text": "public function getResetToken(Request $request) {\n $this->validate($request, ['email' => 'required|email']);\n\n if ($request->wantsJson()) {\n\n $user = Users::where('email', $request->input('email'))->first();\n\n if (!$user) {\n return response(trans('user.notfound'), API_NOT_FOUND);\n }\n\n //Generate token \n $token = str_random(64);\n Users::where('Email', $request->input('email'))->update(['token' => $token]);\n\n //Send mail to User\n Mail::to(['[email protected]'])->send(new ResetPasswordMail($token));\n\n return response(trans('mail.sent'));\n }\n }", "title": "" }, { "docid": "0941c463a023fb6fb429bfd03a2777ac", "score": "0.66073895", "text": "public function postReset()\n\t{\n\t\t$credentials = Input::only(\n\t\t\t'email', 'password', 'password_confirmation', 'token'\n\t\t);\n\n\t\t$response = Password::reset($credentials, function($user, $password)\n\t\t{\n\t\t\t$user->password = Hash::make($password);\n\n\t\t\t$user->save();\n\t\t});\n\n\t\tswitch ($response)\n\t\t{\n\t\t\tcase Password::INVALID_PASSWORD:\n\t\t\tcase Password::INVALID_TOKEN:\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\treturn Redirect::back()->with('error', Lang::get($response));\n\n\t\t\tcase Password::PASSWORD_RESET:\n\t\t\t\treturn Redirect::action('AuthController@login')\n \t\t\t\t->with('success', 'Password changed successfully‎');\n\t\t}\n\t}", "title": "" }, { "docid": "7f46b6f34ff61b4fbe2e88ee84321de0", "score": "0.65907216", "text": "public function resetUsersPassword(Request $request)\n {\n // dd($request);\n $user = \\App\\User::where('email','=',$request->email)->first();\n\n $response['status'] = 0;\n $response['message'] = '';\n \n if(!$user)\n {\n $response['message'] = 'Invalid User';\n return $response;\n }\n\n \\DB::beginTransaction();\n\n try{\n\n if($user!=null){\n\n $password = str_random(8);\n $user->password = bcrypt($password);\n\n $user->save();\n \n \\DB::commit();\n\n $user->notify(new \\App\\Notifications\\UserForgotPassword($user,$password));\n\n $response['status'] = 1;\n $response['message'] = 'New password is sent to your email account';\n\n }\n\n else{\n\n $response['status'] = 0;\n $response['message'] = 'No Email exists';\n \n }\n }\n\n catch(\\Exception $ex){\n \\DB::rollBack();\n $response['message'] = $ex->getMessage();\n }\n \n \n return $response;\n \n }", "title": "" }, { "docid": "f48a4c4fc3cdaf5cce4e3126cad96608", "score": "0.65798473", "text": "public function resetpasswordAction()\n {\n // if the user is logged in, we don't need to 'reset' the password\n if ($this->zfcUserAuthentication()->hasIdentity()) {\n // redirect to the login redirect route\n return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute());\n }\n\n //$config = $this->getServiceLocator()->get('Config');\n //$options = $this->getServiceLocator()->get('zfcuser_module_options');\n $config = \\Application\\Module::getService('Config');\n $options = \\Application\\Module::getService('zfcuser_module_options');\n /**\n * @var \\Zend\\Http\\PhpEnvironment\\Request|\\Zend\\Http\\Request $request\n */\n $request = $this->getRequest();\n //$service = $this->getUserService();\n $service = \\Application\\Module::getService('zfcuser_user_service');\n $form = new ResetPasswordForm(null, $options);\n $translator = $this->getTranslator();\n \n // if password reset is disabled\n if (!$config['zfcuser']['enable_passwordreset']) {\n return array('enableRegistration' => false);\n }\n \n if ($options->getUseRedirectParameterIfPresent() && $request->getQuery()->get('redirect')) {\n $redirect = $request->getQuery()->get('redirect');\n } else {\n $redirect = false;\n }\n\n $redirectUrl = $this->url()->fromRoute(static::ROUTE_LOGIN) . ($redirect ? '?redirect=' . rawurlencode($redirect) : '');\n \n if (!$request->isPost() ) {\n \n $user = false;\n $userId = (int) $this->params()->fromRoute('user_id');\n $resetToken = $this->params()->fromRoute('resettoken');\n \n $userTable = \\Application\\Module::getService('zfcuser_user_mapper');\n $user = $userTable->findById($userId);\n \n if (!$user ) {\n $this->flashMessenger()->addWarningMessage(\n sprintf($translator->translate(\"invalid request\"), '')\n );\n return $this->redirect()->toUrl($redirectUrl);\n }\n \n if (empty($resetToken) || ($resetToken != $user->getToken()) ) {\n $this->flashMessenger()->addWarningMessage(\n sprintf($translator->translate(\"invalid request\"), '')\n );\n return $this->redirect()->toUrl($redirectUrl);\n }\n \n return array(\n 'user' => $user,\n 'userId' => $userId,\n 'resetToken' => $resetToken,\n 'resetPasswordForm' => $form,\n 'enablePasswordReset' => !!$config['zfcuser']['enable_passwordreset'],\n 'redirect' => $redirect,\n );\n \n }\n \n $user = false;\n $userId = $this->params()->fromPost('identity');\n $resetToken = $this->params()->fromPost('token');\n \n $oModule = new AdminModule();\n $oModule->setAppConfig($config);\n $user = false;\n \n $userTable = \\Application\\Module::getService('zfcuser_user_mapper');\n $user = $userTable->findByEmail($userId);\n \n if (!$user ) {\n $this->flashMessenger()->addWarningMessage(\n sprintf($translator->translate(\"invalid request\"), $userId)\n );\n return $this->redirect()->toUrl($redirectUrl);\n }\n \n if (empty($resetToken) || ($resetToken != $user->getToken()) ) {\n $this->flashMessenger()->addWarningMessage(\n sprintf($translator->translate(\"invalid request\"), $resetToken)\n );\n return $this->redirect()->toUrl($redirectUrl);\n }\n \n $form->setData((array)$this->params()->fromPost());\n \n if (!$form->isValid() ) {\n \n return array(\n 'user' => $user,\n 'userId' => $userId,\n 'resetToken' => $resetToken,\n 'resetPasswordForm' => $form,\n 'enablePasswordReset' => !!$config['zfcuser']['enable_passwordreset'], // $this->getOptions()->getEnablePasswordreset(),\n 'redirect' => $redirect,\n );\n \n } else {\n \n $newCredential = $this->params()->fromPost('newCredential');\n \n $bcrypt = new Bcrypt;\n $bcrypt->setCost($options->getPasswordCost());\n $user->setPassword($bcrypt->create($newCredential));\n $user->setToken('');\n $service->getUserMapper()->update($user);\n \n $this->flashMessenger()->addSuccessMessage(\n sprintf($translator->translate(\"password has been set\"), $resetToken)\n );\n return $this->redirect()->toUrl(\n $this->url()->fromRoute($config[\"zfcuser_registration_redirect_route\"]) \n . ($redirect ? '?redirect='. rawurlencode($redirect) : '')\n );\n \n }\n \n }", "title": "" }, { "docid": "181216bba590527800a0eee49ff41b2b", "score": "0.65741706", "text": "public function postReset(Request $request)\n\t{\n\t\t$data = User::where(\"email\",$request->email)->first();\n\t\tif($data){\n\t\t\t$find= User::find($data->id);\n\t\t\t$find->password = Hash::make($request->password);\n\t\t\t$find->save();\n\t\t\tSession::flash(\"success\",\"Password reset successfully!\");\n\t\t\treturn redirect()->route('login');\n\t\t}else{\n\t\t\t$result = \"No email found in database\";\n\t\t}\n\t\tSession::flash(\"error\",\"Email not found!\");\n\t\treturn redirect()->back();\n\t\t\n\n\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "b73766b332ea13d6c80556c3f93e8b52", "score": "0.6572227", "text": "public function reset(Request $request)\n {\n\n $data = [];\n $data[\"success\"] = false;\n $data[\"reset\"] = false;\n\n if ($request->token) {\n try {\n $decrypted = decrypt($request->token);\n } catch (DecryptException $e) {\n return view('auth/reset', $data);\n }\n $key = explode(\",\", $decrypted);\n\n if ($id = $key[1] && time() <= $key[0]) {\n\n if ($user = User::find($key[1])) {\n if ($request->password) {\n\n $user->password = Hash::make($request->password);\n if ($user->save()) {\n $data[\"success\"] = true;\n }\n $data[\"reset\"] = true;\n } else {\n $data[\"success\"] = true;\n $new_reset_token = encrypt($key[0].','.$key[1]);\n $decrypted = decrypt($new_reset_token);\n $keyz = explode(\",\", $decrypted);\n\n $data[\"token\"] = $new_reset_token;\n $data[\"user\"] = $user;\n }\n\n return view('auth/reset', $data);\n }\n } else {\n $data[\"expired\"] = false;\n }\n }\n\n return view('auth/reset', $data);\n }", "title": "" }, { "docid": "1bf1fbdf63cbbb49793cdcd6b03af9e7", "score": "0.6565098", "text": "public function resetPassword(){\r\n if(!Login::loggedIn()){\r\n header(\"Location: \".BASE_URI.Routes::getUri('signin'));\r\n }\r\n \r\n // check if user has required rights\r\n $user_rights = Login::getUser()->getRights();\r\n if(!in_array('Admin',$user_rights)){\r\n die(Layout::render('templates/error_rights.php'));\r\n }\r\n \r\n if(isset($_GET['id']) AND ($member = Member::getById($_GET['id'])) instanceof Member){\r\n \r\n $data = array();\r\n $data['member'] = $member;\r\n \r\n if(isset($_POST['reset'])){\r\n try{\r\n if($member->resetPassword()){\r\n $data['_success'][] = SystemMessages::getSystemMessageText('admin_pw_reset_success');\r\n }else{\r\n $data['_error'][] = SystemMessages::getSystemMessageText('admin_pw_reset_failure');\r\n }\r\n }\r\n catch(Exception $e){\r\n $text = SystemMessages::getSystemMessageText($e->getMessage());\r\n if($text != 'TEXT MISSING'){\r\n $data['_error'][] = $text;\r\n }else{\r\n $data['_error'][] = SystemMessages::getSystemMessageText('unexpected_error'); \r\n }\r\n }\r\n }\r\n \r\n Layout::render('admin/members/reset_password.php',$data);\r\n \r\n }else{\r\n header(\"Location: \".BASE_URI.Routes::getUri('not_found'));\r\n }\r\n \r\n }", "title": "" }, { "docid": "7827979287db6abb88a3bef4d87b3f1c", "score": "0.6559972", "text": "public function resetpass(){\n if (!$this->session->UserID)\n { \n $useremail = $this->input->get(\"email\"); // Use \"GET\" to receive UserID, set session->UserID.\n $vcode = $this->input->get(\"vcode\");\n if($this->apimodel->verify_ev($useremail,$vcode) == \"False\"){\n $this->errorhandler->errorhandler(\"40003\");\n }else{\n $result = $this->apimodel->getUserID_E($useremail);\n $this->session->UserID = $result['UserID'];\n $this->apimodel->delete_v($vcode);\n }\n \n }\n $this->load->view('resetpass'); // load resetpass view.\n }", "title": "" }, { "docid": "a09479908fd13f7f29c3ca572ff75dd1", "score": "0.65594643", "text": "public function forgotPassword(Request $request) {\n\n\t\t/*echo \"William\"; \n\t\tdie;*/\n\n\t\t$postData = $request->all();\n\n\t\t$validation = Validator::make($postData, [\n\t\t\t'email' => 'required'\n\t\t]);\n\n\t\tif($validation->fails())\n\t\t\treturn response()->json(['success' => 0,'error' => $validation->errors()\n\t\t]);\n\n\t\t// check for registered user\n\t\t$user = User::where('email',$postData['email'])->first();\n\n\t\tif($user){\n\t\t\t\n\t\t\t// generate random string\n\t\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t\t$length = 10;\n\t\t\t$charactersLength = strlen($characters);\n\t\t\t$randomString = '';\n\t\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t\t\t}\n\t\t\t$randomToken = $randomString;\n\n\t\t\t// save data in the password_resets\n\t\t\t$passwordReset = new PasswordReset;\n\t\t\t$passwordReset->email = $user->email;\n\t\t\t$passwordReset->token = $randomToken;\n\t\t\t$passwordReset->save();\n\n\n\t\t\t$resetPasswordLink = 'http://202.164.42.26:8282/castlesetup/password/reset'.'/'.$randomToken;\n\n\t\t\t// set data that has to be sent in the eamil\n\t\t\t/*$data = array(\n\t\t\t\t'email' => $player->channel_id,\n\t\t\t\t'token' => $randomToken,\n\t\t\t\t'link' => $resetPasswordLink,\n\t\t\t\t'name' => $player->username\n\t\t\t);*/\n\n\t\t\t// send mail //\n\t\t\t/*Mail::send('emails.password.email', ['data' => $data], function ($m) use($data) {\n\t $m->from('[email protected]', 'Quiz');\n\n\t $passwordMail = Mail::to($user->email)->send(new RegisterMail($user->name,$request->get('user_type'),'')); */\n\n\t $email = \"[email protected]\";\n\n\t Mail::to($email)->send(new ForgotPasswordMail($resetPasswordLink,$user->name));\n\t return response()->json(['success' => 1,'statuscode'=> 200,'data' => \"Email sent successfully\"\n\t\t\t]);\n\t\t} else {\n\n\t\t\treturn response()->json(['success' => 0,'statuscode'=> 401,'error' => \"User not found\"\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "7a51be2b99bf448f6f68b491ba22b158", "score": "0.65582895", "text": "public function resetPassword_post(){\n $username = $this->post('username');\n $dataUpdate = array(\n 'password' => md5($username),\n 'user_hash' => md5($username)\n );\n\n $this->db->where('username', $username);\n $this->db->update('sys_user', $dataUpdate);\n\n if ($this->db->affected_rows() >= 0) {\n $this->response(200);\n }else{\n $this->response(array('msg' => 'gagal update'), 400);\n }\n }", "title": "" }, { "docid": "90d05d51e8771388d4177cd509641e16", "score": "0.6554861", "text": "function password_reset() {\n\n // check temp_access_code cookie\n\tif(isset($_COOKIE['temp_access_code'])) {\n\n // check email & code \n\t\tif(isset($_GET['email']) && isset($_GET['code'])) {\n\t\t\t\n\t\t\t// check temp_access_code cookie\n\t\t\tif(isset($_COOKIE['temp_access_code'])) {\n\n // check SESSION and POST token are set\n\t\t\tif(isset($_SESSION['token']) && isset($_POST['token'])) {\n\n // check POST & SESSION token to be the same\n\t\t\t\tif($_POST['token'] === $_SESSION['token']) {\n\n // check password with confirm password\n\t\t\t\tif($_POST['password'] === $_POST['confirm_password']) { \n\n //--- deprecated ---\n\t\t\t\t// $updated_password = md5($_POST['password']);\n\t\t\t\t\n\t\t\t\t // Update password into db\n\t\t\t\t $updated_password = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\t\t\t\t\t$sql = \"UPDATE users SET password = '\".escape($updated_password).\"', validation_code = 0 WHERE email = '\".escape($_GET['email']).\"'\";\n\t\t\t\t\tquery($sql);\n\n\t\t\t\t\tset_message(\"<p class='bg-success text-center'>Your passwords has been updated, you may login now!</p>\");\n\n\t\t\t\t\tredirect(\"https://1touradventure.com/login/\");\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t echo validation_errors(\"Sorry, the Password fields do not match\");\n\n\t\t\t\t\t\t}// end else\n\t\t\t\t }// end else\t\n\t\t\t}// end else \n\n\t\t\t}else {\n\t\t set_message(\"<p class='bg-danger text-center'>Sorry your time has expired</p>\");\n\n\t\t }// end else\n\t\t}// end if \n\n\t}else {\n\t\tset_message(\"<p class='bg-danger text-center'>Sorry your time has expired</p>\");\n\n\t\tredirect(\"https://1touradventure.com/recover/\");\n\n\t\t}// end else\n\t\t\n}", "title": "" }, { "docid": "eab8e8c1310c1c2b78af87a6dcce2995", "score": "0.6551224", "text": "public function generatePasswordResetToken()\n {\n $this->reset_token = Yii::$app->security->generateRandomString(8);\n $this->reset_token_expire = new Expression('NOW()');\n }", "title": "" }, { "docid": "4fbe0be473aa30550f3d6c94089ba9a8", "score": "0.65506023", "text": "public function resetPassword($id, $code);", "title": "" }, { "docid": "7e0694768a6547121e958b8588b4c4bd", "score": "0.65395063", "text": "public static function resetPassword ( $token, $newPwd ) {\r\n \r\n $user = DB::table(\"forget_pwd_token\")\r\n -> where(\"token\", \"=\", $token)\r\n -> first();\r\n \r\n if ( !is_null($user) ) {\r\n \r\n if ( abs(time() - strtotime($user->create_at)) < 60 * 30 ) {\r\n \r\n DB::table('account')\r\n -> where ('account', '=', $user->account)\r\n -> update([\r\n 'password' => password_hash($newPwd, PASSWORD_BCRYPT),\r\n ]);\r\n \r\n DB::table('forget_pwd_token')\r\n -> where(\"token\", \"=\", $token)\r\n -> delete();\r\n \r\n return true;\r\n \r\n } else {\r\n return ['error' => \"Over Time!!\"];\r\n }\r\n }\r\n \r\n return ['error' => \"Invalid Token!!\"];\r\n }", "title": "" }, { "docid": "4073dfa778485555fd4ba0a5fba7198f", "score": "0.65314066", "text": "public function submitResetPasswordForm(Request $request)\n {\n $request->validate([\n 'email' => 'required|email|exists:site_users',\n 'password' => 'required|string|min:6|confirmed',\n 'password_confirmation' => 'required'\n ]);\n \n $updatePassword = DB::table('password_resets')\n ->where([\n 'email' => $request->email, \n 'token' => $request->token\n ])\n ->first();\n \n if(!$updatePassword){\n return back()->withInput()->with('error', 'Invalid token!');\n }\n \n $user = SiteUser::where('email', $request->email)\n ->update(['password' => Hash::make($request->password)]);\n \n DB::table('password_resets')->where(['email'=> $request->email])->delete();\n \n return redirect('dashboard/login')->withSuccess('Your password has been changed!');\n }", "title": "" }, { "docid": "d01c57b8f03912d907c83e9233396e2d", "score": "0.6531312", "text": "public function resetForEmail(Request $request)\n\t{\n\t\t$rules = [\n\t\t\t'token' => ['required'],\n\t\t\t'email' => ['required', 'email'],\n\t\t\t'password' => [\n\t\t\t\t'required',\n\t\t\t\t'between:' . config('larapen.core.passwordLength.min', 6) . ',' . config('larapen.core.passwordLength.max', 60),\n\t\t\t\t'confirmed'\n\t\t\t],\n\t\t];\n\t\t$request->validate($rules);\n\t\t\n\t\t$credentials = $request->only('email', 'password', 'password_confirmation', 'token');\n\t\t\n\t\t// Here we will attempt to reset the user's password. If it is successful we\n\t\t// will update the password on an actual user model and persist it to the\n\t\t// database. Otherwise we will parse the error and return the response.\n\t\t$status = Password::reset(\n\t\t\t$credentials,\n\t\t\tfunction ($user, $password) use ($request) {\n\t\t\t\t$user->password = Hash::make($password);\n\t\t\t\t\n\t\t\t\t$user->setRememberToken(Str::random(60));\n\t\t\t\t\n\t\t\t\t$user->verified_email = 1;\n\t\t\t\tif ($user->can(Permission::getStaffPermissions())) {\n\t\t\t\t\t// Phone auto-verified (for Admin Users)\n\t\t\t\t\t$user->verified_phone = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$user->save();\n\t\t\t\t\n\t\t\t\tevent(new PasswordReset($user));\n\t\t\t\t\n\t\t\t\t// Auto-Auth the User (WEB)\n\t\t\t\tif (!isFromApi()) {\n\t\t\t\t\tauth()->guard()->login($user);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t\n\t\tif (isFromApi()) {\n\t\t\tif ($status == Password::PASSWORD_RESET) {\n\t\t\t\t$user = User::where('email', $request->input('email'))\n\t\t\t\t\t->where('password', Hash::make($request->input('password')))\n\t\t\t\t\t->first();\n\t\t\t\t\n\t\t\t\t// Auto-Auth the User (API)\n\t\t\t\t// By creating an API token for the User\n\t\t\t\tif (!empty($user)) {\n\t\t\t\t\treturn $this->createUserApiToken($user, $request->input('device_name'), trans($status));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $this->respondSuccess(trans($status));\n\t\t\t} else {\n\t\t\t\treturn $this->respondError(trans($status));\n\t\t\t}\n\t\t} else {\n\t\t\t// If the password was successfully reset, we will redirect the user back to\n\t\t\t// the application's home authenticated view. If there is an error we can\n\t\t\t// redirect them back to where they came from with their error message.\n\t\t\treturn $status == Password::PASSWORD_RESET\n\t\t\t\t? redirect($this->redirectPath())->with('status', trans($status))\n\t\t\t\t: redirect()->back()\n\t\t\t\t\t->withInput($request->only('email'))\n\t\t\t\t\t->withErrors(['email' => trans($status)]);\n\t\t}\n\t}", "title": "" }, { "docid": "18f875d1a73d61bb56ea1ab2312a93d8", "score": "0.6528004", "text": "public function passwordResetAction(Request $request, $campaignUrl, LoggerInterface $logger)\n {\n\n \n $logger->debug(\"Entering RegistrationController->passwordResetAction\");\n $em = $this->getDoctrine()->getManager();\n\n $campaign = $em->getRepository(Campaign::class)->findOneByUrl($campaignUrl);\n\n if(null !== $request->query->get('password_reset_token') && null !== $request->query->get('email')){\n $fail = false;\n $passwordResetToken = $request->query->get('password_reset_token');\n $userEmail = $request->query->get('email');\n $user = $em->getRepository(User::class)->findOneByEmail(urldecode($userEmail));\n\n if(empty($user)){\n $this->addFlash('warning','We are sorry, we could not find this account');\n $fail = true;\n }\n\n if(!$fail && $user->getPasswordResetCode() !== $passwordResetToken){\n $this->addFlash('warning','We are sorry, This token could not be validated');\n $fail = true;\n }\n\n if(!$fail){\n $dateNow = (new \\DateTime());\n $userPasswordResetCodeTimestamp = $user->getPasswordResetCodeTimestamp()->modify('+30 minutes');\n if($userPasswordResetCodeTimestamp < $dateNow){\n $logger->debug(\"Password Reset Code is expired\");\n $this->addFlash('warning','This confirmation code is expired');\n $fail = true;\n }\n }\n\n if (!$fail && $request->isMethod('POST')) {\n $fail = false;\n $params = $request->request->all();\n\n if(!$fail && (empty($params['user']['password']['first']) || empty($params['user']['password']['second']))){\n $this->addFlash('warning','Please confirm your password');\n $fail = true;\n }\n\n if(!$fail && ($params['user']['password']['first'] !== $params['user']['password']['second'])){\n $this->addFlash('warning','Passwords do not match');\n $fail = true;\n }\n\n\n if(!$fail){\n $user->setPasswordResetCode = null;\n $encoder = $this->container->get('security.password_encoder');\n $encoded = $encoder->encodePassword($user, $params['user']['password']['first']);\n $user->setPassword($encoded);\n\n $em->persist($user);\n $em->flush();\n\n\n //Send Email\n $message = (new \\Swift_Message(\"FR Manager Password Reset Notification\"))\n ->setFrom('[email protected]') //TODO: Change this to parameter for support email\n ->setTo($user->getEmail())\n ->setContentType(\"text/html\")\n ->setBody(\n $this->renderView('email/password_reset.email.twig', array('campaign' => $campaign, 'user' => $user))\n );\n\n $this->get('mailer')->send($message);\n\n\n\n $logger->info(\"Password has been reset for user:\".$user->getEmail());\n $this->addFlash('success','Password has been reset!');\n return $this->redirectToRoute('login', array('campaignUrl' => $campaign->getUrl()));\n\n }\n }\n\n }else{\n $logger->debug(\"There was an issue with this URL, please try again\");\n return $this->redirectToRoute('password_reset_form', array('campaignUrl' => $campaign->getUrl()));\n\n }\n\n return $this->render('security/password.reset.html.twig', array(\n 'campaign' => $campaign,\n 'user' => $user\n ));\n\n\n }", "title": "" }, { "docid": "b426c7bdddeeca3852a5a03e10ed62f2", "score": "0.6527359", "text": "public function forgotPassword()\n {\n // validate the request\n $rules = [\n 'email' => 'required|email|between:6,255',\n ];\n\n $validation = Validator::make(post(), $rules);\n\n if ($validation->fails()) {\n return response($validation->messages(), 422);\n }\n\n // find the user\n $user = UserModel::findByEmail(post('email'));\n\n if (!$user || $user->is_guest) {\n return response(Lang::get('rainlab.user::lang.account.invalid_user'), 400);\n }\n\n // send the password reset email\n $code = implode('!', [$user->id, $user->getResetPasswordCode()]);\n $link = str_replace('{code}', $code, UserSettings::get('password_reset_url'));\n\n $data = [\n 'code' => $code,\n 'link' => $link,\n 'name' => $user->name,\n 'username' => $user->username,\n ];\n\n Mail::send('rainlab.user::mail.restore', $data, function ($message) use ($user) {\n $message->to($user->email, $user->full_name);\n });\n\n return response('Ok', 200);\n }", "title": "" }, { "docid": "27743f4708886caab4ab0af0a4804f74", "score": "0.65264523", "text": "public function postForgotPassword() {\n\n //Get the validation rules\n $this->validationRules = array(\n 'phone_or_email' => 'required',\n 'id_field' => 'required',\n );\n\n //Validate inputs\n $this->validator = $this->isInputValid();\n\n if ($this->validator->passes()) {//Validation passed\n /*\n //Checks if send to is email, else reverts to phone\n if (filter_var($this->input['reset_email'], FILTER_VALIDATE_EMAIL)) {\n $field = 'email';\n } else {\n $field = 'phone';\n }//E# if else statement\n * \n */\n //Get user by email\n $user_model = $this->getModelByField($this->input['id_field'], $this->input['phone_or_email']);\n\n if ($user_model) {//User with that email exists\n if ($this->input['id_field'] == 'phone') {//Customer\n $reset_code = $this->generateUniqueInt('reset_code', 1000, 9999);\n } else {\n $reset_code = \\Str::upper($this->generateUniqueField('reset_code', 48));\n }//E# if else statement\n\n $user_model->reset_code = $reset_code;\n\n $user_model->reset_time = Carbon::now();\n\n $user_model->save();\n\n if ($this->input['id_field'] == 'phone') {//Customer from phone\n $parameters = array(\n 'name' => $user_model->full_name,\n 'resetCode' => $reset_code,\n );\n try {\n //Converse\n $sent = $this->callController(\\Util::buildNamespace('messages', 'message', 1), 'converse', array('sms', null, \\Config::get('product.alphanumericSender'), $user_model->id, array($user_model->phone), 'forgotPassword', \\Config::get('app.locale'), $parameters));\n } catch (\\Exception $e) {\n throw new \\Api500Exception(\\Lang::get($this->package . '::' . $this->controller . '.notification.sending_sms_failed'));\n }//E# try catch block\n } else {\n\n $queryStrArray = array(\n 'reset_code' => $reset_code,\n 'phone_or_email' => $user_model->email,\n 'sub_view' => 'reset',\n 'user_role' => $user_model->role_id == 3 ? 'user' : 'organization'\n );\n\n //Build url\n $url = \\Util::buildUrl('userRegistration', $queryStrArray);\n\n $url .= '#toreset';\n\n //Message parameters\n $parameters = array(\n 'name' => $user_model->full_name,\n 'reset_code' => $reset_code,\n 'phone_or_email' => $this->input['phone_or_email'],\n 'passwordMinCharacters' => \\Config::get($this->package . '::account.passwordMinCharacters'),\n 'productName' => \\Config::get($this->package . '::product.name'),\n 'url' => $url,\n /* 'field' => $field, */\n 'role_id' => $user_model->role_id,\n );\n\n try {\n $recipient['to'] = $user_model->email;\n //Converse\n $isSent = $this->callController(\\Util::buildNamespace('messages', 'message', 1), 'converse', array('email', null, null, $user_model->id, $recipient, 'forgotPassword', \\Config::get('app.locale'), $parameters));\n } catch (\\Exception $e) {\n throw new \\Api500Exception(\\Lang::get($this->package . '::' . $this->controller . '.notification.sending_email_failed'));\n }//E# try catch block\n }//E# if else statement\n\n if (array_key_exists('format', $this->input) && ($this->input['format'] == 'json')) {\n //Get success message\n $message = \\Lang::get($this->package . '::' . $this->controller . '.notification.forgot_password');\n\n throw new \\Api200Exception(array(), $message);\n }//E# if statement\n //Flash forgot status code to session\n \\Session::flash('forgotStatusCode', 1);\n } else {//User with that email does not exist\n if (array_key_exists('format', $this->input) && ($this->input['format'] == 'json')) {\n //Set notification\n $this->notification = array(\n 'field' => 'phone_or_email',\n 'type' => 'User',\n 'value' => $this->input['phone_or_email'],\n );\n\n //Throw VRM not found error\n throw new \\Api404Exception($this->notification);\n }//E# if statement\n //Flash forgot status code to session\n \\Session::flash('forgotStatusCode', 2);\n }//E# if else statement\n }//E# if statement\n\n $link = \\URL::route('userRegistration');\n $link .='#toforgot';\n\n //Redirect to forgot page\n return \\Redirect::to($link)\n ->withInput()\n ->withErrors($this->validator);\n }", "title": "" }, { "docid": "b83002aa2da6517cdc11cbc7c7bb79f2", "score": "0.6523023", "text": "public function reset_password(){\n global $wpdb;\n $email = $_POST['email'];\n if($email != null){\n $data = $wpdb->get_row(\"SELECT * FROM \".$wpdb->prefix.\"users WHERE user_email='\".$email.\"'\");\n if($data != null){\n $random = $this->generateRandomString(5);\n $result = update_user_meta($data->ID,'reset_password_token',$random);\n if($result != null){\n // send mail with random string.\n return $res = [\n 'status' => 200,\n 'message' => \"Email Send Successfully....\",\n 'data' => $random\n ];\n }else{\n return $res = [\n 'status' => 500,\n 'message' => \"Something Went Wrong !\"\n ];\n }\n \n }else{\n return $res = [\n 'status' => 400,\n 'message' => 'This Email is Not Registered in Database Please Use Another Email.'\n ];\n }\n }else{\n return $res = [\n 'status' => 500,\n 'message' => 'Required Email For Reset Password , Please Enter Email.'\n ];\n }\n }", "title": "" }, { "docid": "5e8a539b27aa514baa847d8a00a402f5", "score": "0.6519794", "text": "public function postResetPassword(Request $request)\n {\n if(($request->input('password'))&&($request->input('confirm_password')))\n {\n $unique_code = Session::get('unique_code');\n $password = $request->input('password');\n $confirm_password = $request->input('confirm_password');\n if($password==$confirm_password)\n {\n $user = User::where('unique_code', $unique_code)\n ->where('status', 'active')\n ->whereNull('deleted_at')\n ->get()\n ->toArray();\n\n if($user)\n {\n $user_id = $user[0]['id'];\n $user = User::find($user_id);\n User::where('id', $user_id)\n ->update(['unique_code' => '', 'password'=>md5($password)]);\n $this->log('Password Changed From Admin',$user_id, $user->toJson());\n\n Session::flush();\n Session::flash('alert_class', 'success');\n Session::flash('alert_msg', 'Your password has been changed successfully');\n return redirect(route('admin-login'));\n }\n else {\n Session::flash('alert_class', 'dabger');\n Session::flash('alert_msg', 'Account Deleted');\n return redirect(route('admin-login'));\n }\n }\n else {\n Session::flash('alert_class', 'danger');\n Session::flash('alert_msg', 'Password & Confirm Password do not match!');\n $return_url = url('/').'/'.ADMIN_PATH.'/reset-password/'.$unique_code;\n return redirect($return_url);\n }\n }\n else {\n return redirect(route('admin-get-reset-password'));\n }\n }", "title": "" }, { "docid": "203c8e4ada709f875e8b72943f7aa60d", "score": "0.65103614", "text": "public function getResetPasswordToken()\n {\n return $this->resetPasswordToken;\n }", "title": "" }, { "docid": "139101809b3702b524cad08f2d9d32df", "score": "0.6505476", "text": "public function resetPassword(Request $request) {\n try {\n $this->validate($request, [\n 'token' => 'required|string|exists:forgot_password_tokens,token',\n ]);\n\n $this->db->beginTransaction();\n\n $forgotPasswordToken = $this->forgotPasswordTokenModel\n ->where('token', $request->get('token'))\n ->first();\n\n $forgotPasswordToken->user()->update([\n 'password' => $request->get('newPassword'),\n ]);\n\n $forgotPasswordToken->delete();\n\n $this->db->commit();\n\n return null;\n } catch (\\Illuminate\\Validation\\ValidationException $e) {\n return response()->json($e, 400);\n } catch (\\Exception $e) {\n $this->db->rollback();\n $error = $e->getMessage();\n return response()->json(compact('error'), 500);\n }\n }", "title": "" }, { "docid": "237662d7e1f83410b1458a310c34c79e", "score": "0.65032446", "text": "protected function startPasswordReset()\n {\n $token = new Token();\n $hashed_token = $token->getHash();\n $this->reset_token = $token->getValue();\n\n $expiry_timestamp = time() + 60 * 60 * 2; // 2 hours from now.\n\n $sql = 'UPDATE users \n SET password_reset_hash = :token_hash,\n password_reset_expiry = :expires_at\n WHERE id=:id';\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':token_hash', $hashed_token, PDO::PARAM_STR);\n $stmt->bindValue(':expires_at', date('Y-m-d H:i:s', $expiry_timestamp), PDO::PARAM_STR);\n $stmt->bindValue(':id', $this->id, PDO::PARAM_INT);\n\n return $stmt->execute();\n }", "title": "" }, { "docid": "8b36674efe2a789ba1447d2aaa44717e", "score": "0.64951", "text": "public function post_resetlogin()\n\t{\n $validatekey = Str::random(32, 'alpha');\n\n $input = Input::all();\n $pword = Str::random(16, 'alpha');\n\n $user = Console_User::find($input['id']);\n\n $user->su_password = $pword;\n $user->su_status = 3;\n $user->su_validationkey = $validatekey;\n $user->save();\n\n Log::write('User', 'Reset Login User '.$user->profile->sup_no_ic.' By <code>'.Auth::user()->su_username.'</code>');\n\n try {\n $mailer = Message::to($user->profile->sup_emel);\n $mailer->from('[email protected]', __('global.sysname'));\n $mailer->subject(Str::title(__('admin.subjectreset')));\n $mailer->body('view: admin::plugin.emailAccReset');\n $mailer->body->username = $user->profile->sup_emel;\n $mailer->body->name =$user->profile->sup_nama;\n $mailer->body->password = $pword;\n $mailer->body->key = $validatekey;\n $mailer->html(true);\n $mailer->send();\n } catch (Exception $e) {\n Log::write('email', 'Message was to '.$user->profile->sup_emel.' not sent.');\n Log::write('email', 'Mailer error: '.$e->getMessage());\n }\n\n return Console_User::listUser();\n }", "title": "" }, { "docid": "d2ec309314ff273c22b92a42cce03272", "score": "0.64921784", "text": "public function resetPassword($param)\n {\n// return;\n if($param[0])\n {\n $email = $param[0];\n \n if(Helper::checkMailExists($email))\n {\n $md5_hash = md5(rand(0, 999));\n $pass = substr($md5_hash, 0, 10);\n\n $body = '<h1>FaceShop - Reset pasword</h1><br>';\n $body .= '<p>Quý khách đã cầu reset mật khẩu, hệ thống đã tự động đổi mật khẩu mới cho quý khách</p>';\n $body .= '<p>Vui lòng sử dụng mật khẩu: <b>' .$pass . '</b> để đăng nhập hệ thống</p>';\n $body .= '<p>Để đảm bảo an toàn, sau khi đăng nhập hệ thống, quý khách vui lòng cập nhật mật khẩu của mình.</p>';\n\n $subject = 'FaceShop - Reset pasword';\n $user = new User();\n $user->password = sha1($pass);\n $user->update('email = :email', array(':email' => $email));\n if(Helper::sendmail($email, $body, $subject))\n {\n echo json_encode(array('code'=>'success', 'message'=>'Reset mật khẩu thành công. Vui lòng kiểm tra email để nhận mật khẩu mới.'), JSON_UNESCAPED_UNICODE);\n return;\n }\n else\n {\n echo json_encode(array('code'=>'fail', 'message'=>'Reset mật khẩu thất bại, vui lòng thử lại'), JSON_UNESCAPED_UNICODE);\n return;\n }\n }\n else\n {\n echo json_encode(array('code'=>'fail', 'message'=>'Email không tồn tại, vui lòng nhập email đúng!'), JSON_UNESCAPED_UNICODE);\n return;\n }\n }\n else\n $this->redirect(HTP::$baseUrl);\n }", "title": "" }, { "docid": "8db828b554cbeb0f81d691ab02747ed7", "score": "0.6490383", "text": "function password_reset() {\r\n\r\nif(isset($_COOKIE['temp_access_code'])) {\r\n\r\n\tif(isset($_GET['email']) && isset($_GET['code'])) {\r\n\r\n\t\tif(isset($_SESSION['token']) && (isset($_POST['token']))) {\r\n\r\n\t\t\tif ($_POST['token'] === $_SESSION['token']) {\r\n\r\n\t\t\t\tif (empty($_POST['password']) || empty($_POST['confirm_password'])) {\r\n \t\t\t\techo validation_errors(\"Please enter password\");\r\n \t\t\t\t}elseif (preg_match(\"/([%\\$#\\*]+)/\", $_POST[\"password\"])){\r\n \t\t\t\t\techo validation_errors(\"Speacial chrecter are not allowed\");\r\n \t\t\t\t\t}elseif (strlen($_POST[\"password\"]) < '6') {\r\n \t\t\t\t\techo validation_errors(\"Invalid password. Password must be at least 6 numbers\");\r\n \t\t\t\t\t\t}elseif (strlen($_POST[\"password\"]) > '8') {\r\n \t\t\t\t\t\techo validation_errors(\"Invalid password. Password cannot be greater than 8 numbers\");\r\n \t\t\t\t\t\t\t}else{\r\n\r\n\t\t\t\tif($_POST['password']===$_POST['confirm_password']) {\r\n\r\n\t\t\t\t\t$updated_password = md5($_POST['password']);\r\n\r\n\t\t\t\t\t$sql = \"UPDATE admin SET password ='\".escape($updated_password).\"',validation_code = 0 WHERE email = '\".escape($_GET['email']).\"'\";\r\n\r\n\t\t\t\t\tquery($sql);\r\n\r\n\r\n\t\t\t\t set_message(\"<div class='alert alert-success'>\r\n Your passwords has been sucessfully updated, please <strong>login!</strong></div>\r\n\t<script type='text/javascript'>\r\n window.setTimeout(function() {\r\n $('.alert').fadeTo(500, 0).slideUp(500, function(){\r\n $(this).remove();\r\n });\r\n\t}, 2500);\r\n\t</script>\r\n \");\r\n\r\n\r\n\r\n\t\t\t\t\tredirect(\"page-login.php\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tset_message(\"<p class='bg-danger text-center'> Your passwords does not match. </p>\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n}\r\n} else {\r\n\r\n\tset_message(\"<p class='bg-danger text-center'>Sorry your time has expired </p>\");\r\n\r\n\t\tredirect(\"k_p_recover.php\");\r\nset_message(\"<div class='alert alert-danger'>\r\n <strong>Warning!</strong> Sorry your time has expired </div>\r\n\t<script type='text/javascript'>\r\n window.setTimeout(function() {\r\n $('.alert').fadeTo(500, 0).slideUp(500, function(){\r\n $(this).remove();\r\n });\r\n\t}, 2500);\r\n\t</script>\r\n \");\r\n\t\t\r\n\r\n}\r\n}", "title": "" }, { "docid": "327647f0f2b1bc8724a7d83c6386cbdc", "score": "0.6489343", "text": "public function generatePasswordResetToken()\n {\n $this->password_reset_token = \\Yii::$app->getSecurity()->generateRandomString() . '_' . time();\n}", "title": "" }, { "docid": "b3586279068f0de41d87a8c8f0f99133", "score": "0.6483928", "text": "public function getResetPasswordToken()\n {\n return $this->passwordResetToken;\n }", "title": "" }, { "docid": "d15b39003844d09f515b662aa00a552b", "score": "0.6481258", "text": "function testGetPasswordResetLink()\n {\n $user_id = $this->ids['change_password_user_id'];\n\n $user_controller = new UserController($mt, $user, $r);\n $token = $user_controller->getPasswordResetLinkFromUserId($user_id);\n $this->assertNotNull($token);\n\n $user_resource = UserAdapter::getUserResourceFromId($user_id);\n //$this->assertEquals(\"10\", substr($user_resource2->flags,0,2));\n $this->assertEquals(0, $user_resource->last_four);\n $this->assertEquals(\"1020000001\", $user_resource->flags, \"User flag for CC should have gotten reset\");\n\n $request = new Request();\n $request->data['email'] = $user_resource->email;\n $user_controller2 = new UserController($mt, $u, $request);\n $token_resource = $user_controller2->retrievePasswordToken();\n\n $this->assertNull($token_resource->error);\n\n myerror_log(\"$token = \" . $token_resource->token);\n $this->assertEquals($token, $token_resource->token, \"tokens do not match\");\n\n return $token;\n }", "title": "" }, { "docid": "16acecfad9e2abb60d90aa246271fd7c", "score": "0.6480861", "text": "public function reset_password(Request $request){\n\n $user = User::find($request->get('user_id'));\n $user->password = Hash::make(substr($user->rut, 0, -2));\n $user->save();\n return back()->with('status', 'Se restableció la contraseña del usuario '.$user->name);\n }", "title": "" }, { "docid": "ad5e851093408515fa92c7cf3f2f54a0", "score": "0.64795613", "text": "function reset_password()\n\t{\n\t\tif ( ! $id = $this->input->get('id'))\n\t\t{\n\t\t\t$this->functions->redirect(BASE.AMP.'C=login');\n\t\t}\n\t\t\n\t\t$time = time() - (60*60*24);\n\t\t\t\t\t\n\t\t// Get the member ID from the reset_password field\t\n\t\t\n\t\t$this->db->select('member_id');\n\t\t$this->db->where('resetcode', $id);\n\t\t$this->db->where('date >', $time);\n\t\t$query = $this->db->get('reset_password');\n\t\t\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\t$this->functions->redirect(BASE.AMP.'C=login');\n\t\t}\n\t\t\n\t\t$member_id = $query->row('member_id') ;\n\t\t\t\t\n\t\t// Fetch the user data\n\t\t\n\t\t$this->db->select('username, email');\n\t\t$this->db->where('member_id', $member_id);\n\t\t$query = $this->db->get('members');\n\t\t\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\t$this->functions->redirect(BASE.AMP.'C=login');\n\t\t}\n\t\t\n\t\t$address\t= $query->row('email') ;\n\t\t$username = $query->row('username') ;\n\t\t\t\t\n\t\t$rand = $this->functions->random('alnum', 8);\n\t\t\n\t\t// Update member's password\n\t\t$this->load->helper('security');\n\t\t$this->db->set('password', do_hash($rand));\n\t\t$this->db->where('member_id', $member_id);\n\t\t$this->db->update('members');\n\t\t\n\t\t// Kill old data from the reset_password field\n\t\t\n\t\t$this->db->where('date <', $time);\n\t\t$this->db->or_where('member_id', $member_id);\n\t\t$this->db->delete('reset_password');\n\t\t\t\t\n\t\t// Buid the email message\n\t\t$swap = array(\n\t\t\t'name'\t\t=> $username,\n\t\t\t'username'\t=> $username,\n\t\t\t'password'\t=> $rand,\n\t\t\t'site_name'\t=> stripslashes($this->config->item('site_name')),\n\t\t\t'site_url'\t=> $this->config->item('site_url')\n\t\t );\n\n\n\t\t$template = $this->functions->fetch_email_template('reset_password_notification');\n\t\t$message_title = $this->_var_swap($template['title'], $swap);\n\t\t$message = $this->_var_swap($template['data'], $swap);\t\t\t\t\t\n\t\t \n\t\t// Instantiate the email class\n\t\t\t \n\t\t$this->load->library('email');\n\t\t$this->email->wordwrap = true;\n\t\t$this->email->from($this->config->item('webmaster_email'), $this->config->item('webmaster_name'));\n\t\t$this->email->to($address); \n\t\t$this->email->subject($message_title);\t\n\t\t$this->email->message($message);\t\n\t\t\n\t\tif ( ! $this->email->send())\n\t\t{\n\t\t\t$res = lang('error_sending_email');\n\t\t} \n\t\telse\n\t\t{\t\n\t\t\t$res = lang('password_has_been_reset');\n\t\t}\n\t\t\n\t\t$this->session->set_flashdata('message', $res);\n\t\t$this->functions->redirect(BASE.AMP.'C=login');\n\t}", "title": "" }, { "docid": "7a084b06d327dbf062536c22046e2fd9", "score": "0.6477926", "text": "function resetPassword()\r\n {\r\n $data = array();\r\n $uid = getFromSession('reset_uid');\r\n $thisUser = new User(array('uid' => $uid));\r\n $newPassword = getUserField('password');\r\n\r\n $info['password'] = $thisUser->encryptPassword($newPassword);\r\n $info['reset_key'] = 'NULL';\r\n\r\n $thisUser->modifyUser($info);\r\n\r\n $data['status'] = $this->getMessage(SUCCESS_PASSWORD_CHANGED);\r\n\r\n return createPage(STATUS_TEMPLATE, $data);\r\n }", "title": "" }, { "docid": "e76ba5b8f44dbcde99db3dbac34bf663", "score": "0.64772946", "text": "public function reset_password() {\n\n\t\tif (!$_POST) {\n\t\t\t$user_details = User::find(session('password_user_id'));\n\t\t\tif ($user_details == '') {\n\t\t\t\tflash_message('danger', 'Try Again!');\n\t\t\t\treturn redirect()->route('driver.forgot_password');\n\t\t\t}\n\t\t\t$this->view_data['user_details'] = $user_details;\n\t\t\treturn view('driver/forgot_password2', $this->view_data);\n\t\t} else {\n\n\t\t\t$rules = array(\n\t\t\t\t'code_confirm' => 'required',\n\t\t\t);\n\n\t\t\t$niceNames = array(\n\t\t\t\t'code_confirm' => trans('admin_messages.code'),\n\t\t\t);\n\n\t\t\t$messages = array(\n\t\t\t\t'required' => ':attribute '.trans('messages.driver.is_required'),\n\t\t\t);\n\t\t\t$validator = Validator::make(request()->all(), $rules, $messages);\n\t\t\t$validator->setAttributeNames($niceNames);\n\n\t\t\tif ($validator->fails()) {\n\t\t\t\treturn back()->withErrors($validator)->withInput(); // Form calling with Errors and Input values\n\t\t\t} else {\n\t\t\t\t$code = request()->code_confirm;\n\t\t\t\t$user_id = request()->user_details;\n\t\t\t\t$user = User::find($user_id);\n\t\t\t\tif ($user->otp != $code) {\n\t\t\t\t\treturn back()->withErrors(['code_confirm' => trans('messages.driver.invalid_code_please_try_again')])->withInput();\n\t\t\t\t}\n\n\t\t\t\treturn redirect()->route('driver.password_change');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3a49c4647114d7618016b476758d4a93", "score": "0.6476496", "text": "public function setResetPasswordToken($token);", "title": "" }, { "docid": "086a2f29d5bf93759e501274b8adf6cd", "score": "0.64696676", "text": "public function action_forgot()\n {\n $message = '';\n\n if (isset($_POST['reset_email']))\n {\n $user = ORM::factory('User')->where('email', '=', $_POST['reset_email'])->find();\n\n // admin passwords cannot be reset by email\n if (is_numeric($user->id) && ($user->username != 'admin'))\n {\n // send an email with the account reset token\n $user->reset_token = $user->generate_password(32);\n $user->save();\n\n $message = \"Вы сделали запрос на восстановление пароля. Вы можете получить новый пароль по этой ссылке:\\n\\n\" .\n \":reset_token_link\\n\\n\" . \"Если ссылка не кликабельна, пожалуйста, перейдите на следующую страницу:\\n\" .\n \":reset_link\\n\\n\" . \"и введите эти данные: Reset Token: :reset_token\\nВаш логин: :username\\n\";\n // $mailer = Email::connect();\n // Create complex Swift_Message object stored in $message\n \n $subject = __('Account password reset');\n $to = $_POST['reset_email'];\n $from = '[email protected]';\n $body = __($message, array(':reset_token_link' => URL::site('user/reset?reset_token=' . $user->reset_token . '&reset_email=' . $_POST['reset_email'], TRUE), ':reset_link' => URL::site('user/reset', TRUE), ':reset_token' => $user->reset_token, ':username' => $user->username));\n \n // $message_swift = Swift_Message::newInstance($subject, $body)->setFrom($from)->setTo($to);\n $message_swift = Email::send('support', $subject, $body, $from, $to);\n if ($message_swift)\n {\n $message = 'Письмо для измененения пароля отправлено на ваш email.';\n }\n else\n {\n $message = 'Could not send email.';\n }\n }\n else\n {\n if ($user->username == 'admin')\n {\n $message = 'Admin account password cannot be reset via email.';\n }\n else\n {\n $message = 'User account could not be found.';\n }\n }\n }\n\n $this->template->content = View::factory('/pages/user/forgot')->bind('message', $message);\n }", "title": "" }, { "docid": "38f62ce6e8cb99e56bfea75364269c44", "score": "0.64652723", "text": "public function postForgetPassword(){\r\n\t\t$validator =Validator::make(Input::all(),array(\r\n\t\t\t'email' => 'required|email'\r\n\r\n\t\t\t));\r\n\r\n\t\tif($validator->fails()){\r\n\t\t\treturn Redirect::route('users-forget-password')\r\n\t\t\t->withErrors($validator)\r\n\t\t\t->withInput();\r\n\t\t}\r\n\t\telse{\r\n \t\t\t//change password\r\n\t\t\t$user = User::where('email', '=', Input::get('email'));\r\n\t\t\tif($user->count()){\r\n\t\t\t\t$user = $user->first();\r\n \t\t\t\t//generate a new code and password\r\n\t\t\t\t$code = str_random(60);\r\n\t\t\t\t$password = str_random(10);\r\n\r\n\t\t\t\t$user->code = $code;\r\n\t\t\t\t$user->password_temp = Hash::make($password);\r\n\r\n\t\t\t\tif($user->save()){\r\n\t\t\t\t\tMail::send('emails.auth.forget',\r\n\t\t\t\t\t\tarray('link'=>URL::route('users-recover', $code),'firstname' => $user->firstname,'lastname' => $user->lastname,'password' => $password)\r\n\t\t\t\t\t\t, function($message) use ($user) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$message->to($user->email, $user->firstname, $user->lastname) ->subject('ORAFER Password Reset Request');\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\treturn Redirect::route('users-forget-password')\r\n\t\t\t\t\t->with('message','We had sent you an new password by email.');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Redirect::route('users-forget-password')\r\n\t\t->with('message','Could not request new password. Please contact admin [email protected]');\r\n\t}", "title": "" }, { "docid": "2d5b8b83f1aa29e36b62201f46dfeec2", "score": "0.646394", "text": "public function generatePasswordResetToken()\n {\n $this->pwd_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "title": "" }, { "docid": "64558a29e7a5328f7c62eeb1de3b707b", "score": "0.6463554", "text": "public function postChangePassword(Request $request)\n {\n $validator = \\Validator::make($request->all(),[\n 'password' => 'required|confirmed|min:6',\n 'user_id' => 'required|exists:users,id'\n ]);\n\n $user = Sentinel::findById($request->input('user_id'));\n // dd($user);\n // Only send them an email if they have a valid, inactive account\n if ($user && $validator->passes()) {\n \n $reminder = Reminder::create($user);\n $code = $reminder->code;\n $result = $this->authManager->resetPassword($code, $request->input('password'));\n if ($result->isFailure()) {\n return redirect('admin/data/guru')->with('message','Error'.$result->message())\n ->with('alert','danger');\n } else {\n return redirect('admin/data/guru')->with('message','Success')\n ->with('alert','success');\n }\n\n } else {\n return redirect('admin/data/guru')->with('message','Error '.$validator->errors())\n ->with('alert','danger');\n }\n\n // Attempt the password reset\n \n\n // Return the appropriate response\n return $this->response->array(compact('meta'))->setStatusCode($code);\n }", "title": "" }, { "docid": "24730c56b9a7c558083cbd7e63dd4854", "score": "0.64579827", "text": "private function forgotPassword() {\n// Require credentials for DB connection.\n\n\n if (isset($_POST['forgotPassword'])) {\n $email = trim($_POST['email']);\n\n// Require credentials for DB connection.\n// Check if username or email is already taken.\n $stmt = $this->connection->prepare(\"SELECT username, email, mkhash FROM uverify WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $result = $stmt->get_result();\n $urw = $result->fetch_assoc();\n $stmt->close();\n $hash = $urw['mkhash'];\n $uname = $urw['username'];\n// If e-mail exists a key for password reset is created into database, after this an e-mail will be sent to user with link and the token key.\n if ($result->num_rows === 1) {\n\n function enfKey($len = 64) {\n return substr(sha1(openssl_random_pseudo_bytes(19)), - $len);\n }\n\n $forgot_password_key = enfKey();\n $inactive = 0;\n $stmt = $this->connection->prepare(\"UPDATE uverify SET password_key = ?, is_activated = ? WHERE email = ?\");\n $stmt->bind_param(\"sis\", $forgot_password_key, $inactive, $email);\n $stmt->execute();\n $stmt->close();\n\n $startT = date(\"Y-m-d H:i:s\");\n $expireT = date('Y-m-d H:i:s', strtotime('+2 hour', strtotime($startT)));\n $stmt1 = $this->connection->prepare(\"INSERT INTO forgot_pass (username, email, password_key, expire) VALUES (?,?,?,?)\");\n $stmt1->bind_param(\"ssss\", $uname, $email, $forgot_password_key, $expireT);\n $stmt1->execute();\n $stmt1->close();\n\n $to = $email;\n $subject = \"Reset your password\";\n $from = '[email protected]'; // Insert the e-mail from where you want to send the emails.\n $body = \"Your reset key is: \" . $forgot_password_key . \"\\n\";\n $body .= '<a href=\"' . $this->baseurl . '/signin/password_reset.php?email=' . $email . '&key=' . $forgot_password_key . '&hash=' . $hash . '\">Click to reset your password.</a>'; // Replace YOURWEBSITEURL with your own URL for the link to work.\n $headers = \"From: \" . $from . \"\\r\\n\";\n $headers .= \"Reply-To: \" . $from . \"\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n $success = mail($to, $subject, $body, $headers);\n if ($success === true) {\n $_SESSION['SuccessMessage'] = 'Email has been sent.' . '\\n' .\n 'The email contains the steps to follow to reset your password!';\n } else {\n $_SESSION['ErrorMessage'] = 'Error sending a message to your email!';\n }\n// Always give this message to prevent data colleting even if the e-mail doesn't exist(The password reset e-mail is only sent if the e-mail exists in database).\n } else {\n $_SESSION['ErrorMessage'] = 'Email does not exist or is incorrect!';\n }\n }\n $this->connection->close();\n }", "title": "" }, { "docid": "0cfffaf1cfaf17568688abbf5e49babe", "score": "0.6453443", "text": "public function resetPassword($token, Request $request)\n {\n try\n {\n //$token = JWTAuth::toUser($request->get('token')) == \"\" ? $token : JWTAuth::toUser($request->get('token')); //: $request->input('token');\n $userToken = JWTAuth::toUser($token);\n\n if (!$token)\n {\n return response()->json($this->response->toString(\"N\", config('login.invalid')));\n }\n\n $user = $this->user->find($userToken->id);\n \n $newUser = $user->fill([\n $request->all(),\n 'password' => bcrypt($request->get('password')),\n ]);\n \n $user->save();\n \n //JWTAuth::setToken($token)->invalidate();\n JWTAuth::invalidate($token);\n\n return response()->json($this->response->toString(\"S\", config('login.change')));\n }\n catch (\\Exception $e)\n {\n return response()->json($this->response->toString(\"N\", $e->getMessage()));\n }\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "0155000129669b2263a98f58d7370a8e", "score": "0.6865346", "text": "public function store()\n\t{\n\t\t$id = Input::get('id');\n\t\t\n\t\tAuth::user()->storages_id = $id;\n\t\tAuth::user()->save();\n\t}", "title": "" }, { "docid": "d7f07f6a9415189aaea40420852193a0", "score": "0.6786078", "text": "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, CmsResource::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->resource->create($input);\n\n\t\t\treturn Redirect::route('backend.resources.index');\n\t\t}\n\n\t\treturn Redirect::route('backend.resources.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "title": "" }, { "docid": "6a69b87756eaa032d9aa6f13233a63fd", "score": "0.6649751", "text": "public function store()\n\t{\n\t\t$validator = Resource::validate(Input::all());\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('resources/create')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t} else {\n\t\t\t// store\n\t\t\t$resource \t\t\t\t\t= new Resource;\n\t\t\t$resource->name = Input::get('name');\n\t\t\t$resource->description = Input::get('description');\n\t\t\t$resource->url \t\t\t\t= Input::get('url');\n\t\t\t$resource ->hits = 0;\n\t\t\t$resource->level = Input::get('level');\n\t\t\t$resource->faculty = Input::get('faculty');\n\n\t\t\t$deviceIds = Input::get('devices');\n\n\t\t\t$tagIds \t\t\t\t\t= Input::get('tag_ids');\n\t\t\t$resource->save();\n\t\t\tif($tagIds != ''){\n\t\t\t\t$tagIds = explode(\",\", $tagIds);\n\t\t\t\t$resource->tags()->attach($tagIds);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($deviceIds != '')\n\t\t\t{\n\t\t\t\tforeach ($deviceIds as $device_type) {\n\t\t\t\t\t$device = new Device(array(\"device_type\" => $device_type));\n\n\t\t\t\t\t$resource->devices()->save($device);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Redirect::to('resources');\n\t\t\t}\n\t}", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "016e88402095d4ad79d6ee698ea43b6e", "score": "0.65712094", "text": "public function store()\n\t{\n\t\t// validate\n\t\t// read more on validation at http://laravel.com/docs/validation\n\t\t$rules = array(\n\t\t\t'initials' => 'required',\n\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\t// process the login\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('resources/create')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::except('password'));\n\t\t} else {\n\t\t\t// store\n\t\t\t$resource = new Resource;\n\t\t\t$resource->initials = Input::get('initials');\n\t\t\t$resource->save();\n\n\t\t\t// redirect\n\t\t\tSession::flash('message', 'Successfully created resource!');\n\t\t\treturn Redirect::to('resources');\n\t\t}\n\n\t}", "title": "" }, { "docid": "592a9a876f9eb27f42d2201dd961a364", "score": "0.6569156", "text": "public function store(Request $request)\n {\n $resource = Resource::create($request->all());\n if(isset($request->document)){\n $resource->path = $request->document->store('resources');\n $resource->save();\n }\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "17a0a26914be4b4eb351482e6387c032", "score": "0.6433111", "text": "public function store()\n\t{\n\t\t\n\t\ttry {\n\n\t\t\treturn $this->newResource();\n\n\t\t}\n\t\tcatch(Illuminate\\Database\\QueryException $e)\n\t\t{\n\n\t\t\treturn Response::json(array('ok' => 0, 'msg' => Lang::get('errors.errorCreatingElement'), \n\t\t\t\t'internalMsg' => $e->getMessage()));\n\n\t\t}\n\n\t}", "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": "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": "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": "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": "" } ]
5f16ae386ec542b9bf307ea1b8a885c8
Returns the salt that was originally used to encode the password. This can return null if the password was not encoded using a salt.
[ { "docid": "36d96eb7b51a707cc09a092f9e288da1", "score": "0.0", "text": "public function getSalt()\n {\n // TODO: Implement getSalt() method.\n }", "title": "" } ]
[ { "docid": "a7365bd8a0ce5c2cc8e3ed1fb46eb060", "score": "0.8368267", "text": "public function getSalt()\n {\n // you *may* need a real salt depending on your encoder\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "4a08b5ae241220193877c66e5d5536d3", "score": "0.83344996", "text": "public function getSalt() {\n // You *may* need a real salt if you choose a different encoder.\n return null;\n }", "title": "" }, { "docid": "3b37dfb88374c6e3c9b2eea6e911d0a7", "score": "0.83103555", "text": "public function getSalt()\r\n {\r\n // You *may* need a real salt if you choose a different encoder.\r\n return null;\r\n }", "title": "" }, { "docid": "6267fe6cf3382cfa545f428f716e8a55", "score": "0.8305394", "text": "public function getSalt()\n {\n // You *may* need a real salt if you choose a different encoder.\n return null;\n }", "title": "" }, { "docid": "6267fe6cf3382cfa545f428f716e8a55", "score": "0.8305394", "text": "public function getSalt()\n {\n // You *may* need a real salt if you choose a different encoder.\n return null;\n }", "title": "" }, { "docid": "6267fe6cf3382cfa545f428f716e8a55", "score": "0.8305394", "text": "public function getSalt()\n {\n // You *may* need a real salt if you choose a different encoder.\n return null;\n }", "title": "" }, { "docid": "6267fe6cf3382cfa545f428f716e8a55", "score": "0.8305394", "text": "public function getSalt()\n {\n // You *may* need a real salt if you choose a different encoder.\n return null;\n }", "title": "" }, { "docid": "6267fe6cf3382cfa545f428f716e8a55", "score": "0.8305394", "text": "public function getSalt()\n {\n // You *may* need a real salt if you choose a different encoder.\n return null;\n }", "title": "" }, { "docid": "6267fe6cf3382cfa545f428f716e8a55", "score": "0.8305394", "text": "public function getSalt()\n {\n // You *may* need a real salt if you choose a different encoder.\n return null;\n }", "title": "" }, { "docid": "6203e8434ece8a974f35886037af5c30", "score": "0.8144611", "text": "public function get_salt() {\n\t\treturn $this->salt;\n\t}", "title": "" }, { "docid": "f6ce0c1a03a00ad57e20841e604294e7", "score": "0.81168735", "text": "public function getSalt(): ?string\n {\n return $this->_get_session('salt');\n }", "title": "" }, { "docid": "87318227a6a9a6cfc45542d40fced5e3", "score": "0.80495197", "text": "private function getSalt()\n {\n if ($this->salt === null) {\n $this->setSalt(bin2hex(openssl_random_pseudo_bytes(32)));\n }\n\n return $this->salt;\n }", "title": "" }, { "docid": "1bc379d9413ddacb1dd5b2cd29c9b261", "score": "0.79829305", "text": "public function getSalt() {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "1bc379d9413ddacb1dd5b2cd29c9b261", "score": "0.79829305", "text": "public function getSalt() {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "1bc379d9413ddacb1dd5b2cd29c9b261", "score": "0.79829305", "text": "public function getSalt() {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "1bc379d9413ddacb1dd5b2cd29c9b261", "score": "0.79829305", "text": "public function getSalt() {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "5e2ab43c839018bf740881a3994ea659", "score": "0.79274416", "text": "public function getSalt()\n {\n // see section on salt below\n return null;\n }", "title": "" }, { "docid": "16e1c9e98227fcc7890521ca6b811277", "score": "0.7920526", "text": "public function getSalt() {\n\t\treturn ($this->salt);\n\t}", "title": "" }, { "docid": "48ee184cc8f123c701b43fbdcf4cca9f", "score": "0.7909183", "text": "public static function getSalt(){\n\t\t$salt = \"d6cc20d3f12db6ea98df7b4f8da16ccd\";\n\t\treturn $salt;\n\t}", "title": "" }, { "docid": "0493b62ab935c18bbcbb497dd4207a4e", "score": "0.7908412", "text": "public function getSalt() {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "453c366fbc75b926761d7a699a37775d", "score": "0.7887829", "text": "public function getSalt()\n {\n return $this->salt;\n }", "title": "" }, { "docid": "c81d574211d5f5f86a7258db35e146b5", "score": "0.7856317", "text": "public function getSalt()\n {\n // see section on salt below\n //return null;\n }", "title": "" }, { "docid": "35af394e625ba54e40aab1ba5bf751dc", "score": "0.781977", "text": "function getSalt()\n\t\t {\n\t\t \treturn $this->_pw_salt;\n\t\t }", "title": "" }, { "docid": "1c4c0f37c6f9308d311af4f18cc5b23f", "score": "0.7670607", "text": "public function getSalt()\n\t{\n\t\treturn null;\n\t}", "title": "" }, { "docid": "5e5ef69843e2a2bc4a681e1e7a0bad30", "score": "0.7636878", "text": "public function getSalt()\n {\n // qui va lui meme gerer le salt\n // on est quand meme obligé d'ecrire cette methode car on imprement l'interface UserInterface\n return null;\n }", "title": "" }, { "docid": "eb0f8d38fd931f00eb619fd37c68a35b", "score": "0.7597947", "text": "public static function extractSalt(string $password = null): string\n {\n $salt = '';\n $password = trim((string) $password);\n if (!empty($password)) {\n $salt = substr($password, 7, 22);\n }\n\n return $salt;\n }", "title": "" }, { "docid": "48b36c171091ac3cf3e47553a268b4d5", "score": "0.756291", "text": "public function getSalt()\n {\n return null;\n // TODO: Implement getSalt() method.\n }", "title": "" }, { "docid": "a16b94e083457fd1355b0481b98830e6", "score": "0.7513354", "text": "public function getSalt() {\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "2876fd13f6c0a6606da46b80cbdf805c", "score": "0.74986225", "text": "public function getSalt()\r\n {\r\n $time = Carbon::now()->subMinutes(3);\r\n $time->second(0);\r\n $salt = $time->getTimestamp();\r\n\r\n return $salt;\r\n }", "title": "" }, { "docid": "09b11200871515d1f93ce4725e6984de", "score": "0.7467639", "text": "public function getSalt(): ?string\n {\n\n return null;\n }", "title": "" }, { "docid": "e1a86c36fd3fde129aa464b1ea9edf7a", "score": "0.7453129", "text": "public function getSalt(){\n //qui va lui même gérer le salt\n //on est quand mêm obligé d'écrire cette méthode car on implément l'interface UserInterface\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "b418942d711df266b45a71c3c90d2fe3", "score": "0.7451969", "text": "public function getSalt(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "e74fbe242976220d3bf6fbccc9482e2d", "score": "0.74282265", "text": "protected function getSalt()\n {\n $salt = sprintf('$2a$%02d$', $this->rounds);\n\n return $salt.random_str(22);\n }", "title": "" }, { "docid": "d4d352094231ab4a804e9b9bc5b4de6f", "score": "0.7384518", "text": "public function getSalt()\n {\n return null;\n }", "title": "" }, { "docid": "d4d352094231ab4a804e9b9bc5b4de6f", "score": "0.7384518", "text": "public function getSalt()\n {\n return null;\n }", "title": "" }, { "docid": "d4d352094231ab4a804e9b9bc5b4de6f", "score": "0.7384518", "text": "public function getSalt()\n {\n return null;\n }", "title": "" }, { "docid": "d4d352094231ab4a804e9b9bc5b4de6f", "score": "0.7384518", "text": "public function getSalt()\n {\n return null;\n }", "title": "" } ]
0dada7442a19cd74ae43818d2376c4a2
Returns path of object. Tries to find path without first link. It may be useful when there are two folder in storage. One of them is accessible by symlink another one is accessible by real folder, but under symlink.
[ { "docid": "6e96ce5a748bd8d1907232dde47e3dc0", "score": "0.6774255", "text": "public function getPathWithoutFirstLink()\n\t{\n\t\t$path = null;\n\t\tif(!$this->parentId && !$path)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tif(isset($this->__tree[$this->parentId]))\n\t\t{\n\t\t\tif($this->__tree[$this->parentId]->parentId == $this->id)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$path = $this->__tree[$this->parentId]->getPath();\n\t\t}\n\n\t\tif(!$path && isset($this->__tree[self::TREE_SYMLINK_PREFIX . $this->parentId]))\n\t\t{\n\t\t\t$path = $this->__tree[self::TREE_SYMLINK_PREFIX . $this->parentId]->getPath();\n\t\t}\n\n\t\tif($path === null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $path . $this->name . '/';\n\t}", "title": "" } ]
[ { "docid": "7af127ed377a3f245ea3d4baac5bf0ad", "score": "0.6958181", "text": "public function getObjectPath() {\n\n \treturn $this->path;\n\n }", "title": "" }, { "docid": "f22c13dc1afcc1c9db517ca761dee1c6", "score": "0.69127035", "text": "final public function getPath()\n {\n if (null === $this->path) {\n $reflected = new \\ReflectionObject($this);\n $this->path = dirname($reflected->getFileName());\n }\n\n return $this->path;\n }", "title": "" }, { "docid": "54bc7d6d6afd93e0f1575df8e6334866", "score": "0.6838598", "text": "public function getObjectPath()\n {\n return $this->objectPath;\n }", "title": "" }, { "docid": "71da0bb524f690bbde31369ccda28100", "score": "0.6801639", "text": "public function getPath()\n\t{\n\t\treturn CMS_FOLDER . $this->getHref();\n\t}", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.6699226", "text": "public function getPath();", "title": "" }, { "docid": "93d0fa7704ad7c94f5f07e82c553383a", "score": "0.65819895", "text": "public function getPath()\n\t{\n\t\tif(isset($this->__path))\n\t\t{\n\t\t\treturn $this->__path;\n\t\t}\n\n\t\t$path = null;\n\t\tif(isset(self::$__pathNodes[$this->id]))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tself::$__pathNodes[$this->id] = $this->id;\n\n\t\tif($this->__link)\n\t\t{\n\t\t\t$this->__path = $this->__link->getPath();\n\n\t\t\treturn $this->__path;\n\t\t}\n\n\t\tif(!$this->parentId && !$path)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tif(isset($this->__tree[$this->parentId]))\n\t\t{\n\t\t\tif($this->__tree[$this->parentId]->parentId == $this->id)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$path = $this->__tree[$this->parentId]->getPath();\n\t\t}\n\n\t\tif(!$path && isset($this->__tree[self::TREE_SYMLINK_PREFIX . $this->parentId]))\n\t\t{\n\t\t\t$path = $this->__tree[self::TREE_SYMLINK_PREFIX . $this->parentId]->getPath();\n\t\t}\n\n\t\tif($path === null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t$this->__path = $path . $this->name . '/';\n\n\t\treturn $this->__path;\n\t}", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.65438986", "text": "public function getPath(): string;", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.65438986", "text": "public function getPath(): string;", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.65438986", "text": "public function getPath(): string;", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.65438986", "text": "public function getPath(): string;", "title": "" }, { "docid": "4e4d070f942729239308c17f265edef8", "score": "0.6516312", "text": "public function getPath():? string;", "title": "" }, { "docid": "5878605f0be69f98d2e39f5bc85ffd34", "score": "0.6491554", "text": "protected function objectPath($id) {\n\n\t\tif (!$id) $path = \"/\";\n\t\telse \n\t\t{\n\n\t\t\t$sql = \"SELECT docmgr.getobjpathname('\".$id.\"','') AS objpath;\";\n\t\t\t$info = $this->DB->single($sql);\n\t\t\t\n\t\t\treturn $info[\"objpath\"];\n\n\t\t}\n\t\t\n\t\treturn $path;\n\t\n\t}", "title": "" }, { "docid": "2370bd814f00b3db66293877e3e98a48", "score": "0.64514846", "text": "public function getPath() {\n\t\t$this->checkDisposed();\n\t\t\t\n\t\tif ($this->_path === null)\n\t\t\t$this->load();\n\t\treturn $this->_path;\t\n\t}", "title": "" }, { "docid": "654e7f4d29ca6f37ebc6dc3510c500ee", "score": "0.64030427", "text": "protected function getCachedObjectPath(ClassMetadata $meta, LoStorageClassMetadata $loStorageMeta, $object)\n {\n $objectId = $this->getObjectIdentifier($meta, $object);\n if (!$objectId)\n return null;\n return $this->getCachedClassPath($meta, $loStorageMeta) . DIRECTORY_SEPARATOR . $objectId;\n }", "title": "" }, { "docid": "c576fb459b961399d6f3729c1f35f8d7", "score": "0.63936543", "text": "public function realPath()\n\t{\n\t\tif (!$this->_realPath)\n\t\t\t$this->_realPath = $this->fileSystem()->realPath($this->_originalPath);\n\n\t\treturn $this->_realPath;\n\t}", "title": "" }, { "docid": "e932daffa79256a03fdabadcd763c43e", "score": "0.6387648", "text": "public function getPath()/*# : string */;", "title": "" }, { "docid": "65c555b89dbcfe8ceffa3aa441f8c855", "score": "0.63686454", "text": "public function getPath()\n {\n return $this->default['path'];\n }", "title": "" }, { "docid": "b876cac0a7c2b907e6dc0c7139bcacb4", "score": "0.6338124", "text": "public function get_path()\n {\n return $this->m_path;\n }", "title": "" }, { "docid": "5e1ed069d71761ff22274b46e1dda074", "score": "0.6299119", "text": "public function getPath()\n {\n return $this->_folder->getPath();\n }", "title": "" }, { "docid": "e3f987d764f830019245842e316f80a1", "score": "0.62778676", "text": "public function get_path() {\r\n\t\t\r\n\t\treturn $this->path;\r\n\t}", "title": "" }, { "docid": "3e87127faa87cf76f823e7c09f51d6e7", "score": "0.627717", "text": "public function getPath()\n {\n return isset($this->path) ? $this->path : '';\n }", "title": "" }, { "docid": "a374919f29a44cd4b1323fb164f64dd1", "score": "0.62751746", "text": "public function getFullPath(): Path {\n return $this->fullPath;\n }", "title": "" }, { "docid": "bec58bee3b7e4db82e2165952a1fd68f", "score": "0.6270938", "text": "public function getPath()\n\t{\n\t\tif ($this->path === null) {\n\t\t\t$this->path = $this->generatePath();\n\t\t}\n\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "d3f65fe7b7ead0d96b97e6801a8ed1f2", "score": "0.6257691", "text": "public function objectUrl($path)\n {\n if ($this->pathColumn && is_array($path)) {\n $path = Arr::get($path, $this->pathColumn);\n }\n\n if (URL::isValidUrl($path)) {\n return $path;\n }\n\n if ($this->storage) {\n return $this->storage->url($path);\n }\n\n return Storage::disk(config('admin.upload.disk'))->url($path);\n }", "title": "" }, { "docid": "b4d40aadf1ed4419132a35aec02f24b7", "score": "0.6253332", "text": "function get_path()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_PATH);\r\n }", "title": "" }, { "docid": "04149ead124b9753de78f032c2aa9774", "score": "0.62394094", "text": "public function getPath() {\n\t\treturn Yii::getAlias( $this->path );\n\t}", "title": "" }, { "docid": "733596de7c4fcf16c5529cd3e8ed1ac5", "score": "0.6237273", "text": "public function getPath()\n {\n\n return $this->path;\n\n }", "title": "" }, { "docid": "78310398a2f14f8168a330d6f40b2795", "score": "0.62355345", "text": "public function getPath() {\n\t\treturn self::pathToString($this->path, $this->trailingSlash);\n\t}", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.6228966", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.6228966", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.6228966", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.6228966", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.6228966", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.6228966", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.6228966", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "c04495d25ed9ce9d31821139a70b2a04", "score": "0.6228787", "text": "public function getPath() {\n return $this->__path;\n }", "title": "" }, { "docid": "f9c9dfdc56881e9ea0935c2a3e270df5", "score": "0.6225024", "text": "public function get_path()\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "8b3c85947eff2ff7f13e134386c7f4e8", "score": "0.6218619", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "9d6637507fe24ac96af9ceccad597f4c", "score": "0.6212552", "text": "public function get_path()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "d71831e68f52387f16d57af206f4ff13", "score": "0.6206858", "text": "public function get_path(): string {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "493d533320c06c88ff9aff191aff6588", "score": "0.62002844", "text": "public function getPath()\r\n {\r\n return $this->path;\r\n }", "title": "" }, { "docid": "e2898bcc2e4e7789edb95ec8e2dae74c", "score": "0.619861", "text": "public function get_path() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "3770f1cb0158235c2aebdf30cc3c2a41", "score": "0.6196054", "text": "protected function get_path() {\r\n\t\t$path = $this->path; \r\n\t\tif (empty($path) || $path == '/') {\r\n\t\t\t$path = '.';\r\n\t\t}\r\n\t\treturn $path; \t\t\r\n \t}", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.6195576", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "b867fbd131f87819ba1dc7aefb75ca6e", "score": "0.6189622", "text": "public function path()\n {\n\n if(!$this->cmsPath){\n $this->fillByProvider();\n }\n\n if($this->cmsPath){\n return $this->cmsPath->getRewrittenPath();\n }\n\n return $this->originalPath();\n\n }", "title": "" }, { "docid": "eefe5f0c58d9850dad1072431fb2b686", "score": "0.6182067", "text": "protected function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "fb8c00234bec237b4dfb8077cf89ce69", "score": "0.6175463", "text": "function getPath()\r\n\t\t{\r\n\t\t\treturn $this->toString(false);\r\n\t\t}", "title": "" }, { "docid": "46803c00ff0c065f2e256b6d839be491", "score": "0.61724085", "text": "public function getPathAttribute(): string\n {\n $chunk = implode('/', str_split(md5($this->getKey()), 4));\n\n $path = storage_path(sprintf(\n 'ja-attachments/%s%s',\n $this->trashed() ? '.trash/' : '',\n $chunk\n ));\n\n if (!is_dir($path)) {\n mkdir($path, 0777, true);\n }\n\n return $path;\n }", "title": "" }, { "docid": "1023e9ccd159444d0bcdc076faae9f0a", "score": "0.61721027", "text": "public function getFullPath();", "title": "" }, { "docid": "1023e9ccd159444d0bcdc076faae9f0a", "score": "0.61721027", "text": "public function getFullPath();", "title": "" }, { "docid": "c923b2dc6d932db1b7d7bfddb9f562e3", "score": "0.6171212", "text": "public function path();", "title": "" }, { "docid": "c923b2dc6d932db1b7d7bfddb9f562e3", "score": "0.6171212", "text": "public function path();", "title": "" } ]
a7088cc53b48328b2cd2f0d1e4396c30
get redis key name
[ { "docid": "6fdf42bfd23730c348f507c1157071d9", "score": "0.79417664", "text": "protected function getRedisKeyName()\n {\n return $this->objectCacheTag . ':' . $this->getRedisFiltersKeyName();\n }", "title": "" } ]
[ { "docid": "53d0df13e1e89ba5742b76b7f455ec26", "score": "0.736256", "text": "public function getKeyName(): string\n {\n return $this->key_name;\n }", "title": "" }, { "docid": "958bb06e23dff61dbc78f50c38aacee2", "score": "0.72979003", "text": "public static function get_key(): string {\n\t\treturn static::$key;\n\t}", "title": "" }, { "docid": "03f5e17e5e6af51def7c56b5c3d20e71", "score": "0.7274155", "text": "public static function get_key();", "title": "" }, { "docid": "0bf9253fdda5b400fb592a1a58c5b634", "score": "0.72149503", "text": "public function getKey() :string\n {\n return $this->name . ':Q';\n }", "title": "" }, { "docid": "dd867237a58e141a8731a7929e4995d3", "score": "0.72056043", "text": "public function getKeyName();", "title": "" }, { "docid": "f3833977725b1141bfbddf7ad8424d28", "score": "0.7116355", "text": "public function getKey(): string\n {\n $name = str_replace(\" \", \"_\", $this->getName());\n return $name;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "e418748f5a6991d37bf811bab06b0716", "score": "0.7115711", "text": "public function getKey(): string\n {\n return $this->key;\n }", "title": "" }, { "docid": "0766fb5821c8f92b925b27692edc11d7", "score": "0.7103417", "text": "public function getKey_name()\n {\n return isset($this->key_name) ? $this->key_name : null;\n }", "title": "" }, { "docid": "d80f3b64189f9287458a68ba87121045", "score": "0.70937777", "text": "public function getKey(): string\n {\n return $this->_key;\n }", "title": "" }, { "docid": "29e0e766933127e9f9e42818dd9b75ca", "score": "0.70746917", "text": "public function getKey(): string;", "title": "" }, { "docid": "29e0e766933127e9f9e42818dd9b75ca", "score": "0.70746917", "text": "public function getKey(): string;", "title": "" }, { "docid": "29e0e766933127e9f9e42818dd9b75ca", "score": "0.70746917", "text": "public function getKey(): string;", "title": "" }, { "docid": "6d0b0a971b051a0123fc7b65ff0cb7f3", "score": "0.701113", "text": "abstract public function getKeyName();", "title": "" }, { "docid": "6d0b0a971b051a0123fc7b65ff0cb7f3", "score": "0.701113", "text": "abstract public function getKeyName();", "title": "" }, { "docid": "6d0b0a971b051a0123fc7b65ff0cb7f3", "score": "0.701113", "text": "abstract public function getKeyName();", "title": "" }, { "docid": "4f1845448a653c04611d4b3b99e41009", "score": "0.69982517", "text": "public function getName() {\n return $this->key;\n }", "title": "" }, { "docid": "ae59e6c668281a830321a8f645f2676f", "score": "0.6985044", "text": "public function getKey(): string {\n\t\t\treturn $this->key;\n\t\t}", "title": "" }, { "docid": "1aabad44af7f2c8abff1c2a6293bc916", "score": "0.6976224", "text": "public function getKey() : string;", "title": "" }, { "docid": "56a5df0d17b5e438c27c49773a8f436c", "score": "0.68994844", "text": "public function getKey() {\n\t\treturn $this->_keyString;\n\t}", "title": "" }, { "docid": "3130ae8419bc11fece076a3f3d408812", "score": "0.68798333", "text": "public function getKeyName()\n {\n return $this->keyName;\n }", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "1772c917173b08a198c7bb1bbade011a", "score": "0.6857862", "text": "public function getKey();", "title": "" }, { "docid": "89fd2fbddcea8d91cd44b3f646160373", "score": "0.6853573", "text": "public function get_key()\n\t{\n\t\treturn $this->params['key'];\n\t}", "title": "" }, { "docid": "2669f1df56df71c576902ef1545bfff9", "score": "0.68391734", "text": "private static function get_key($key)\n {\n return self::PREFIX . $key;\n }", "title": "" }, { "docid": "c75ac065e93a1fa855fcf98939b92bd2", "score": "0.6816067", "text": "public function getKey(): string\n {\n return $this->parameters['key'] ?? '';\n }", "title": "" }, { "docid": "1bc30b3371b62734289e3f014a23862e", "score": "0.68016243", "text": "public function getKeyName()\n {\n return $this->keyName;\n }", "title": "" }, { "docid": "168c0b9aec54c7462a2d14b2913693d7", "score": "0.6791961", "text": "public static function getKey()\n {\n return static::$key;\n }", "title": "" }, { "docid": "50aa60f10665dbad84c5731b8e167958", "score": "0.6781647", "text": "public function getCacheKey()\n {\n return $this->cachePrefix.':'.($this->cacheKey ?: $this->generateCacheKey());\n }", "title": "" }, { "docid": "d62d675dbbfe1a631c84c391b45094c3", "score": "0.67806536", "text": "public function getKey()\r\n {\r\n return $this->key;\r\n }", "title": "" }, { "docid": "c713f203ec18c7a9a581b9102b98a7c0", "score": "0.67581743", "text": "protected function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "515a1cf6a7f4fc3886a0581b06c4855a", "score": "0.675747", "text": "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "515a1cf6a7f4fc3886a0581b06c4855a", "score": "0.675747", "text": "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "515a1cf6a7f4fc3886a0581b06c4855a", "score": "0.675747", "text": "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "515a1cf6a7f4fc3886a0581b06c4855a", "score": "0.675747", "text": "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "58154f8f6677afbefa396f2046ee8583", "score": "0.67571086", "text": "protected function getRedisKey($key)\n {\n if (empty($this->prefix)) {\n return $key;\n }\n\n return $this->prefix.$key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.6744786", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "2c423c98852e9224f15a4a6673412871", "score": "0.6735574", "text": "public function getKey() {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "2c423c98852e9224f15a4a6673412871", "score": "0.6735574", "text": "public function getKey() {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "2c423c98852e9224f15a4a6673412871", "score": "0.6735574", "text": "public function getKey() {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "bb011e2435960994a0d18dfe91b6fe55", "score": "0.672277", "text": "final public function getName() : string {\n return $this->_getKey();\n}", "title": "" }, { "docid": "ee641d8f7bf8e8d6de284960f216cacc", "score": "0.6706189", "text": "function getKey();", "title": "" }, { "docid": "b696ef0148dfb61403c4b0de3e712200", "score": "0.6696385", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "4d2a4f95b4bba529dd9d77eed88127ee", "score": "0.6683884", "text": "public function getKey()\n\t\t{\n\t\t\treturn $this->key;\n\t\t}", "title": "" }, { "docid": "6e51c95a897acdc5d81674249e913316", "score": "0.66817147", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "704363de601c9cfd53b9489a068a4ff9", "score": "0.6674219", "text": "protected function generateCacheKey(): string\n {\n $serializer = Ioc::make(Serializer::class);\n\n return sprintf(\n '%s:%s:%s',\n $this->command,\n $this->collection->getNamespace(),\n md5($serializer->serialize($this->params))\n );\n }", "title": "" }, { "docid": "f7a9ce126c3b5a91d8ecf5dcb069b738", "score": "0.666662", "text": "function getKeyString(){\n\t\treturn $this->keyString;\n\t}", "title": "" }, { "docid": "5f5a1bcd8be28a7f2ca1f9c1298b04b0", "score": "0.6665238", "text": "public function key()\n {\n return $this->key;\n }", "title": "" }, { "docid": "5f5a1bcd8be28a7f2ca1f9c1298b04b0", "score": "0.6665238", "text": "public function key()\n {\n return $this->key;\n }", "title": "" }, { "docid": "5f5a1bcd8be28a7f2ca1f9c1298b04b0", "score": "0.6665238", "text": "public function key()\n {\n return $this->key;\n }", "title": "" }, { "docid": "5f5a1bcd8be28a7f2ca1f9c1298b04b0", "score": "0.6665238", "text": "public function key()\n {\n return $this->key;\n }", "title": "" }, { "docid": "5f5a1bcd8be28a7f2ca1f9c1298b04b0", "score": "0.6665238", "text": "public function key()\n {\n return $this->key;\n }", "title": "" }, { "docid": "c91958f442999c502f4774cb4afd42bb", "score": "0.6654962", "text": "public function getKey()\n {\n return $this->_key;\n }", "title": "" }, { "docid": "8fd14d0b0e91012ff4a9477adb64c6e8", "score": "0.66427433", "text": "public function getKey()/*TODO downgrade - : ?string*/\n {\n return $this->key;\n }", "title": "" }, { "docid": "30c33192f2ddc2e18caf1f9d646254bf", "score": "0.66416895", "text": "public function getKey() {\n\t\treturn $this->_key;\n\t}", "title": "" } ]
a8523bcb896b0463d83c616172ae8c5c
Dummy command for probing for redirects.
[ { "docid": "0ea4035fb6b1c558606a253704f32dbf", "score": "0.0", "text": "function get_submit($productName)\n{\n}", "title": "" } ]
[ { "docid": "c02aaca8deb5b14a756df9d2c16865c9", "score": "0.6278998", "text": "public function enableRedirects () {}", "title": "" }, { "docid": "b71baccca42597bcc908f6927b345662", "score": "0.57806355", "text": "public function handleRedirects()\n {\n $self = $this;\n $app = $this->app;\n\n // Register this extension's actions as an early event\n $app->before(function (Request $request) use ($self, $app) {\n if (empty($self->redirects)) {\n return;\n }\n $requestedPath = trim($request->getPathInfo(), '/');\n\n // Get the available wildcards, prepare for pattern match\n $availableWildcards = '';\n foreach ($self->wildcards as $wildcard => $expression) {\n $availableWildcards .= \"$wildcard|\";\n }\n $availableWildcards = rtrim($availableWildcards, '|');\n\n // Assign the wildcard pattern check\n $pattern = '~\\{([a-z]+):(' . $availableWildcards . ')\\}~';\n\n // Loop through defined redirects\n foreach ($self->redirects as $redirectName => $redirectData) {\n $self->computedReplacements = array();\n\n // Check for short-hand notation\n if (!is_array($redirectData)) {\n $self->assert(is_string($redirectName), 'string_sh_source');\n $self->source = trim($redirectName, '/');\n $self->destination = trim($redirectData, '/');\n } else {\n $self->assert(is_string($redirectData[\"from\"]), 'string_lh_source');\n $self->assert(is_string($redirectData[\"to\"]), 'string_lh_destination');\n $self->source = trim($redirectData['from'], '/');\n $self->destination = trim($redirectData['to'], '/');\n }\n\n // Check for a query string\n $self->sourceQueryString = '';\n if ($self->options['append_query_string']) {\n $queryString = $request->getQueryString();\n if (!is_null($queryString)) {\n $self->sourceQueryString = \"?$queryString\";\n }\n }\n\n // Check for a non-capture group in the source and convert to regex equivalent\n $nonCaptureMatcher = \"~<([a-z0-9\\-_\\|]+)>~\";\n if (preg_match($nonCaptureMatcher, $self->source)) {\n $self->source = preg_replace($nonCaptureMatcher, \"(?:\\\\1)\", $self->source);\n }\n\n\n // Check if we're redirecting to a route and apply the path if it exists\n $routeMatcher = \"~^route\\:\\s+?([a-z\\-_]+)$~\";\n if (preg_match($routeMatcher, $self->destination, $matches)) {\n if (isset($self->routes[$matches[1]])) {\n $self->destination = trim($self->routes[$matches[1]]['path'], '/');\n }\n }\n\n // Check for a protocol and apply a prefix based on the findings\n $self->prefix = '';\n if (!preg_match(\"~^(https?|ftps?)\\://~\", $self->destination)) {\n $self->prefix = '/';\n }\n\n // Convert smart wildcards into normal ones\n foreach ($self->smartWildcards as $wildcard => $wildcardType) {\n $smartWildcardMatcher = \"~\\{($wildcard)\\}~i\";\n if (preg_match($smartWildcardMatcher, $self->source)) {\n $self->source = preg_replace($smartWildcardMatcher, \"{\\\\1:$wildcardType}\", $self->source);\n }\n }\n\n // Convert the wildcards into expressions for replacement\n $computedWildcards = preg_replace_callback($pattern, function ($captures) use ($self) {\n $self->computedReplacements[] = $captures[1];\n\n return '(' . $self->wildcards[$captures[2]] . ')';\n }, $self->source);\n\n // Check to see if we have these conversions in the requested path and replace where necessary\n if (preg_match(\"~^$computedWildcards$~i\", $requestedPath)) {\n $convertedWildcards = preg_replace_callback(\"~^$computedWildcards$~i\", function ($captures) use ($self) {\n $result = $self->destination;\n for ($c = 1, $n = count($captures); $c < $n; ++$c) {\n $value = array_shift($self->computedReplacements);\n if ($self->options['autoslug']) {\n $captures[$c] = $self->slugify($captures[$c]);\n }\n $result = str_replace('{' . $value . '}', $captures[$c], $result);\n }\n\n return $result;\n }, $requestedPath);\n\n // Merge global variables with those defined by the user\n $self->variables = array_merge($self->variables, array(\n 'admin_path' => $app['config']->get('general/branding/path'),\n ));\n // Replace variables with actual data\n foreach ($self->variables as $variable => $data) {\n $self->assert(preg_match('~^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$~', $variable), 'inavlid_variable_declaration');\n $convertedWildcards = str_replace(\"{@$variable}\", ltrim($data, '/'), $convertedWildcards);\n }\n\n // Check for Just In Time replacements and apply where necessary\n foreach ($self->jits as $jitName => $jitData) {\n // Check for short-hand notation\n if (is_string($jitData)) {\n $self->assert(is_string($jitName), 'string_sh_jitsource');\n $jitReplace = $jitName;\n $jitWith = $jitData;\n } else {\n $self->assert(is_string($jitData['replace']), 'string_lh_jitsource');\n $jitReplace = $jitData['replace'];\n $jitWith = $jitData['with'];\n }\n // Match and replace\n $jitMatcher = \"~$jitReplace~i\";\n if (preg_match($jitMatcher, $convertedWildcards)) {\n $convertedWildcards = preg_replace($jitMatcher, trim($jitWith, '/'), $convertedWildcards);\n }\n }\n\n // Check for un-processed variables and throw an exception if there are any\n if (preg_match('~\\{@(.*)\\}~', $convertedWildcards, $variableMatches)) {\n $self->except(sprintf($self->errors['missing_variables'], $variableMatches[1], $convertedWildcards));\n }\n\n // Redirect the user to the final, processed path\n return $app->redirect(strtolower(\"{$self->prefix}{$convertedWildcards}{$self->sourceQueryString}\"), 301);\n }\n }\n }, Application::EARLY_EVENT);\n }", "title": "" }, { "docid": "a8c784d94a333aa2084b4c28b48a60da", "score": "0.5601045", "text": "function intended ($defaultUrl = '', $status = 302);", "title": "" }, { "docid": "428c948f4642d4d0bb81f3ad9523d985", "score": "0.5560921", "text": "public function admin_redirects() {\r\n\r\n\t}", "title": "" }, { "docid": "a14c209bdc87d18653d2859b952dbeb2", "score": "0.55406874", "text": "function redirect(){}", "title": "" }, { "docid": "0e3164a64b8fb452d130803fb51f4ef2", "score": "0.54488343", "text": "public function testRedirectWithDefaultStatusCode()\n {\n $this->response->redirect($url = 'http://test.local');\n $this->assertSame($url, $this->response->getHeader(HttpProtocol::HEADER_LOCATION));\n $this->assertSame(301, $this->response->getStatusCode());\n }", "title": "" }, { "docid": "b78025c4baf1c832a32c673d13bb6d13", "score": "0.5432636", "text": "public function disableRedirects () {}", "title": "" }, { "docid": "b6e0b006a27633afcc1c97efa0f7adce", "score": "0.5297371", "text": "public function run()\n {\n Redirect::create(['path' => 'cgg', 'target' => 'http://www.celebsgonegood.org/', 'http_status' => 301]);\n }", "title": "" }, { "docid": "9a1ba26f2e33fe0333ce8e60c3cce84f", "score": "0.5202718", "text": "public static function curl_can_follow_redirects()\n {\n return !ini_get('open_basedir');\n }", "title": "" }, { "docid": "7c96a0837f8c81c967d8478630b06125", "score": "0.5193225", "text": "public function testRedirectsToSetupIfNotReady()\n {\n $this->startSession();\n // Environment is not ready, but request homepage\n $crawler = $this->call('GET', '/');\n // Assert we're being redirected\n // TODO: If all the setup steps are completed, this should redirect elsewhere (pwd is the only tested setting so far)\n $this->assertRedirectedToRoute('setup::step', 2);\n // Follow the redirects\n $this->followRedirects();\n // Assert that the response is OK\n $this->assertResponseOk();\n }", "title": "" }, { "docid": "610e9c534dc238d4a6c9dccad8bc5f07", "score": "0.5162316", "text": "function beforeRedirect( &$controller, $url, $status=null, $exit=true ) {\n\n\t}", "title": "" }, { "docid": "b6aa6ef1acd45fee7d157393664d21c7", "score": "0.507084", "text": "public function testCaseSensitiveRedirect() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/ONE';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one/', $redirect_to );\n\n\t\tadd_filter( 'srm_case_insensitive_redirects', function( $value ) {\n\t\t\treturn false;\n\t\t}, 10, 1 );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertFalse( $redirected );\n\t}", "title": "" }, { "docid": "ddf451b1680a0ab6123608cee009cfd9", "score": "0.50413305", "text": "public function testSwaggerRedirectTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(301)\n ->assertLocation('/swagger');;\n }", "title": "" }, { "docid": "68c06b2ded7fbbaa8847322dbd5dd8e0", "score": "0.5036221", "text": "public function testRedirectWithCustomStatusCode()\n {\n $this->response->redirect($url = 'http://test.local', $code = 302);\n $this->assertSame($url, $this->response->getHeader(HttpProtocol::HEADER_LOCATION));\n $this->assertSame($code, $this->response->getStatusCode());\n }", "title": "" }, { "docid": "213bb1d18874ad78185296bce6398927", "score": "0.5031339", "text": "public function testCaseInsensitiveRedirect() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/ONE';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t$_SERVER['REQUEST_URI'] = '/one';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/ONE/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\t}", "title": "" }, { "docid": "9c9a492deec1af208127e63436cc2871", "score": "0.50261605", "text": "public function execute(): void\n {\n /** @var \\Nails\\Redirect\\Service\\Redirect $oService */\n $oService = Factory::service('Redirect', Constants::MODULE_SLUG);\n $oRedirect = $oService->detectRedirect();\n\n if (!empty($oRedirect)) {\n redirect($oRedirect->new_url, 'location', $oRedirect->type);\n }\n }", "title": "" }, { "docid": "c0802cf4e318f32ce4c51b7e8d006c38", "score": "0.5007241", "text": "public function forwardIfExists()\n {\n /** @var \\PatrickBroens\\UrlForwarding\\Domain\\Model\\Redirect $redirect */\n $redirect = false;\n\n $request = parse_url(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));\n\n $path = trim($request['path'], '/');\n $host = $request['host'];\n\n if ($path != '') {\n $redirect = $this->redirectRepository->findByPathAndDomain($host, $path);\n }\n\n if ($redirect) {\n header($redirect->getHttpStatus());\n header('Location: ' . $redirect->getUrl());\n exit();\n }\n }", "title": "" }, { "docid": "ac60973aeb9292265d95db42db1bdaf8", "score": "0.49965492", "text": "public function testGenerateRedirectRoute()\n {\n $route = $this->router->createRedirectRoute('/', '/test', 301);\n\n $this->assertEquals(Router::$verbs, $route->methods());\n $this->assertEquals('/', $route->uri());\n $this->assertEquals('Horizon\\Routing\\Controllers\\RedirectActionController::__invoke', $route->action());\n $this->assertEquals('/test', $route->getDefault('to'));\n $this->assertEquals(301, $route->getDefault('code'));\n }", "title": "" }, { "docid": "525e1f785161f6ef16a3903dff604656", "score": "0.49818158", "text": "public function testSimplePath() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/test';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/test', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t/**\n\t\t * Test longer path with no trailing slash\n\t\t */\n\n\t\t$_SERVER['REQUEST_URI'] = '/test/this/path';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/test/this/path/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t/**\n\t\t * Test a redirect miss\n\t\t */\n\n\t\t$_SERVER['REQUEST_URI'] = '/test/wrong/path';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/test/right/path/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( ! $redirected );\n\t}", "title": "" }, { "docid": "841bec19281e4a2f4ff4d626b22b0ed2", "score": "0.49577183", "text": "function test_head_redirect() {\n\t\t$url = 'https://asdftestblog1.wordpress.com/files/2007/09/2007-06-30-dsc_4700-1.jpg';\n\t\t$response = wp_remote_head( $url );\n\t\t$this->assertEquals( '301', wp_remote_retrieve_response_code( $response ) );\n\t}", "title": "" }, { "docid": "6dc76119b32d6b505de07aef73fb65e2", "score": "0.4949459", "text": "final public static function redirect()\n {\n return self::get(2053);\n }", "title": "" }, { "docid": "077f96e3d80bdd738c8a42c0f302cf4c", "score": "0.49470416", "text": "public function testPostConfigApacheSlingReferrerFilter()\n {\n }", "title": "" }, { "docid": "df267c471a17b6bd67681136961a11fd", "score": "0.49461994", "text": "public function predispatchPaypalStandardRedirect()\n {\n //use observer below only when standart payment redirect method is applied\n $this->_enablePrepareLineItemsObserver = true;\n }", "title": "" }, { "docid": "f0bef67f323126a93b2c7d604e5b6896", "score": "0.49425855", "text": "public function iHaveADirectAdvice()\n {\n\n }", "title": "" }, { "docid": "da99bb76751b5f712ef2f81cb984ec61", "score": "0.4941542", "text": "private function checkUrl()\n {\n if ($this->route !== strtolower($this->route)) {\n http_response_code(301);\n header('location: '.strtolower($this->route));\n }\n }", "title": "" }, { "docid": "5a0846f8a71b2f61a2d1fe437f774732", "score": "0.49361235", "text": "function followRedirects($value = TRUE)\r\n {\r\n if (is_bool($value))\r\n {\r\n $this->redirect = $value;\r\n } \r\n }", "title": "" }, { "docid": "f14fd36a9c5945881fa34064b51b9f70", "score": "0.4932493", "text": "public function testHttpResponseRedirectLocalUrlWithNonStandardCode()\n {\n $this->specify(\n \"redirect is not redirecting local with non standard code properly\",\n function () {\n $response = $this->getResponseObject();\n $response->resetHeaders();\n $response->redirect('new/place/', false, 309);\n\n $expected = Headers::__set_state(\n [\n '_headers' => [\n 'Status' => '302 Found',\n 'Location' => '/new/place/',\n 'HTTP/1.1 302 Found' => null,\n ]\n ]\n );\n expect($response->getHeaders())->equals($expected);\n }\n );\n }", "title": "" }, { "docid": "381b43610b7389fc262507e98605167c", "score": "0.49201977", "text": "public function addCommand(string $source, string $target, int $statusCode, ?string $host = null, bool $force = false): void\n {\n $this->outputLine();\n $this->outputLine('<b>Create a redirect ...</b>');\n $this->outputLine();\n $redirect = $this->redirectStorage->getOneBySourceUriPathAndHost($source, $host, false);\n $isSame = $this->isSame($source, $target, $host, $statusCode, $redirect);\n if ($redirect !== null && $isSame === false && $force === false) {\n $this->outputLine('A redirect with the same source URI exist, see below:');\n $this->outputLine();\n $this->outputRedirectLine('<error>!!</error>', $redirect);\n $this->outputLine();\n $this->outputLine('Use --force to replace it');\n $this->outputLine();\n $this->sendAndExit(1);\n } elseif ($redirect !== null && $isSame === false && $force === true) {\n $this->redirectStorage->removeOneBySourceUriPathAndHost($source, $host);\n $this->outputRedirectLine('<info>--</info>', $redirect);\n $this->persistenceManager->persistAll();\n } elseif ($redirect !== null && $isSame === true) {\n $this->outputRedirectLine('<comment>~~</comment>', $redirect);\n $this->outputLine();\n $this->outputLegend();\n $this->sendAndExit();\n }\n $redirects = $this->redirectStorage->addRedirect($source, $target, $statusCode, [$host]);\n $redirect = reset($redirects);\n $this->outputRedirectLine('<info>++</info>', $redirect);\n $this->outputLine();\n $this->outputLegend();\n }", "title": "" }, { "docid": "b18944bbec99f43a1ef0de9e83878645", "score": "0.49152443", "text": "public function listCommand($host = null, $match = null): void\n {\n $outputByHost = function ($host = null) use ($match) {\n $redirects = $host === null ? $this->redirectStorage->getAllWithoutHost() : $this->redirectStorage->getAll($host);\n $this->outputLine();\n if ($host !== null) {\n $this->outputLine('<info>==</info> <b>Redirect for %s</b>', [$host]);\n } else {\n $this->outputLine('<info>==</info> <b>Redirects valid for all hosts</b>', [$host]);\n }\n if ($match !== null) {\n $this->outputLine(' <info>++</info> <b>Only showing redirects where source or target URI matches <u>%s</u></b>', [$match]);\n sleep(1);\n }\n $this->outputLine();\n /** @var $redirect RedirectInterface */\n foreach ($redirects as $redirect) {\n $outputLine = function ($source, $target, $statusCode) {\n $this->outputLine(' <comment>></comment> %s <info>=></info> %s <comment>(%d)</comment>', [\n $source,\n $target,\n $statusCode\n ]);\n };\n $source = $redirect->getSourceUriPath();\n $target = $redirect->getTargetUriPath();\n $statusCode = $redirect->getStatusCode();\n if ($match === null) {\n $outputLine($source, $target, $statusCode);\n } else {\n $regexp = sprintf('#%s#', $match);\n $matches = preg_grep($regexp, [$target, $source]);\n if (count($matches) > 0) {\n $replace = \"<error>$0</error>\";\n $source = preg_replace($regexp, $replace, $source);\n $target = preg_replace($regexp, $replace, $target);\n $outputLine($source, $target, $statusCode);\n }\n }\n }\n };\n if ($host !== null) {\n $outputByHost($host);\n } else {\n $hosts = $this->redirectStorage->getDistinctHosts();\n array_map($outputByHost, $hosts);\n }\n $this->outputLine();\n }", "title": "" }, { "docid": "516386d85d6a5aee3fe52506e104f13e", "score": "0.49008492", "text": "function http_redirect ($url = null, array $params = null , $session = null, $status = null) {}", "title": "" }, { "docid": "4a4569ae24c7a53d69030df4d152051f", "score": "0.48973164", "text": "public function doRedirect() {\r\n return;\r\n }", "title": "" }, { "docid": "c5d02196fa3303a6b78f60cd26b06055", "score": "0.4884238", "text": "public function __construct() {\n\t\t// If the config is marked as installed then bail with a 404.\n\t\tif (Config::get(\"a2zcms.installed\") === true) {\n\t\t\treturn Redirect::to('');\n\t\t}\n define('STDIN',fopen(\"php://stdin\",\"r\"));\n\t}", "title": "" }, { "docid": "c0b1bae4ee99f5eed9bcd719acdabfcc", "score": "0.48629448", "text": "function traceback_indirection($callback)\n{\n return $callback();\n}", "title": "" }, { "docid": "38abbbf4e76ad19442fe50eb73a19fd4", "score": "0.48603475", "text": "public function testRedirectBeforeRedirectModifyingUrl(): void\n {\n $Controller = new Controller(new ServerRequest());\n\n $Controller->getEventManager()->on('Controller.beforeRedirect', function (EventInterface $event, $url, Response $response): void {\n $controller = $event->getSubject();\n $controller->setResponse($response->withLocation('https://book.cakephp.org'));\n });\n\n $response = $Controller->redirect('http://cakephp.org', 301);\n $this->assertSame('https://book.cakephp.org', $response->getHeaderLine('Location'));\n $this->assertSame(301, $response->getStatusCode());\n }", "title": "" }, { "docid": "cbe42d2858c7299d602fc8d9c0232b1f", "score": "0.48464993", "text": "function http_redirect($url, $status = 0, $exit = true) {\n\t\tUtil::redirect($url, $status, $exit);\n\t}", "title": "" }, { "docid": "4797ff603062fd484bdd4b64d97295c3", "score": "0.48289192", "text": "function checkSpoof() {\n\tif (!preg_match(\"#http://#\",$_GET['r']) && !preg_match(\"#ftp://#\",$_GET['r']) && !preg_match(\"#https://#\",$_GET['r'])) {\n\t\thttpredir($_GET['r']);\n\t} else {\n\t\thttpredir(\"index.php\");\n\t}\n}", "title": "" }, { "docid": "9783e418c229b4b6e4781780e2d5c82a", "score": "0.48044494", "text": "function yapc_redirect_shorturl( $args ) {\n\t$code = defined('YAPC_REDIRECT_FIRST_CODE')?YAPC_REDIRECT_FIRST_CODE:301;\n\t$location = $args[0];\n\t$keyword = $args[1];\n\tyourls_do_action( 'pre_redirect', $location, $code );\n\t$location = yourls_apply_filter( 'redirect_location', $location, $code );\n\t$code = yourls_apply_filter( 'redirect_code', $code, $location );\n\t// Redirect, either properly if possible, or via Javascript otherwise\n\tif( !headers_sent() ) {\n\t\tyourls_status_header( $code );\n\t\theader( \"Location: $location\" );\n\t\t// force the headers to be sent\n\t\techo \"Redirecting to $location\\n\";\n\t\t@ob_end_flush();\n\t\t@ob_flush();\n\t\tflush();\n\t} else {\n\t\tyourls_redirect_javascript( $location );\n\t}\n\n\t$start = microtime(true);\n\t// Update click count in main table\n\t$update_clicks = yourls_update_clicks( $keyword );\n\n\t// Update detailed log for stats\n\t$log_redirect = yourls_log_redirect( $keyword );\n\t$lapsed = sprintf(\"%01.3f\", 1000*(microtime(true) - $start));\n\tyapc_debug(\"redirect_shorturl: Database updates took $lapsed ms after sending redirect\");\n\t\n\tdie();\n}", "title": "" }, { "docid": "666b8920c5d455da26b2cddaa80bfda0", "score": "0.4795334", "text": "public function testCaseSensitiveRedirectTo() {\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/ONE';\n\t\t$redirected = false;\n\t\t$redirect_to = '/goHERE';\n\t\t$safe_redirect_manager->create_redirect( '/one/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\t}", "title": "" }, { "docid": "6cb2861cd37c2d9ed26a29ab07baea55", "score": "0.47951293", "text": "public function redirect()\n {\n $this->_actions->redirect($this->_getUrlToRedirectTo(), 301);\n }", "title": "" }, { "docid": "183cd9032ec9e07536cc394b8aee81c6", "score": "0.4794971", "text": "function prli_redirect()\n{\n global $prli_link;\n \n // Remove the trailing slash if there is one\n $request_uri = preg_replace('#/$#','',urldecode($_SERVER['REQUEST_URI']));\n\n if( $link_info =& $prli_link->is_pretty_link($request_uri,false) )\n {\n $params = (isset($link_info['pretty_link_params'])?$link_info['pretty_link_params']:'');\n prli_link_redirect_from_slug( $link_info['pretty_link_found']->slug, $params );\n }\n}", "title": "" }, { "docid": "6544b9bae19fdc3458e95d607f035bb2", "score": "0.4788378", "text": "public function testHandlingMissingCommand()\n {\n ob_start();\n $status = $this->kernel->handle('fake', $this->response);\n ob_get_clean();\n $this->assertEquals(StatusCodes::OK, $status);\n }", "title": "" }, { "docid": "3ab6d2831024d34786e690649d759902", "score": "0.47828454", "text": "public function dummy_hook_function(){}", "title": "" }, { "docid": "ae50127e02db6a594dedb15c5810936c", "score": "0.47808224", "text": "function guest ($url, $status = 302);", "title": "" }, { "docid": "191c151407488782daef247caa36e55e", "score": "0.47772077", "text": "public function __construct()\n {\n self::Redirect(strtok($_GET['url'], '?'));\n }", "title": "" }, { "docid": "f809c15c1a732045fe8b514c406bc5f4", "score": "0.4771772", "text": "public function testHandlingSimpleCommand()\n {\n ob_start();\n $status = $this->kernel->handle('mockcommand', $this->response);\n $this->assertEquals('foo', ob_get_clean());\n $this->assertEquals(StatusCodes::OK, $status);\n }", "title": "" }, { "docid": "e8afe299a632aaec72dfa5ce808ffc92", "score": "0.47702852", "text": "public function testWordsCreateRedirection() {\n $this->call('GET', '/words/create');\n $this->assertRedirectedTo('login');\n }", "title": "" }, { "docid": "a853e1bd120ddf16faefe873bff3ec16", "score": "0.47690454", "text": "function doPseudoRedirect($uri, $useErrorIfNoFile=false)\n {\n if ($useErrorIfNoFile === true) $useErrorIfNoFile = \"404\";\n\n // When mod_rewrite is active, we shoild NOT lookupe RELATIVE \n // urls (apache bug?). Then always lookup absolute urls.\n if ($uri && $uri[0]!='/') {\n $dir = dirname($_SERVER['SCRIPT_NAME']);\n if (!$dir || $dir == \"/\" || $dir == \"\\\\\") $dir = \"\";\n $uri = \"$dir/$uri\";\n }\n $info = apache_lookup_uri($uri);\n\n $_SERVER[\"REDIRECT_URL\"] = $info->uri;\n $_SERVER[\"PATH_TRANSLATED\"] = $info->filename;\n $_SERVER[\"ORIG_REQUEST_URI\"] = $_SERVER[\"REQUEST_URI\"];\n $_SERVER[\"REQUEST_URI\"] = $info->unparsed_uri;\n $_SERVER[\"QUERY_STRING\"] = isset($info->args)? $info->args : '';\n $_GET = array(); parse_str($_SERVER[\"QUERY_STRING\"], $_GET);\n\n if (ini_get(\"register_globals\")) $GLOBALS += $_GET;\n if (isset($_REQUEST)) $_REQUEST += $_GET;\n if (isset($GLOBALS[\"HTTP_GET_VARS\"])) $GLOBALS[\"HTTP_GET_VARS\"] = $_GET;\n if (isset($_SERVER['argv'])) {\n $_SERVER['argv'] = explode(\"+\", $_SERVER[\"QUERY_STRING\"]);\n $_SERVER['argc'] = count($_SERVER['argv']);\n }\n Apache_Rewriter::_correctVars($GLOBALS, array(\n \"argc\" => \"argc\",\n \"argv\" => \"argv\",\n \"QUERY_STRING\" => \"QUERY_STRING\",\n \"REQUEST_URI\" => \"REQUEST_URI\",\n \"PHP_SELF\" => \"REDIRECT_URL\",\n \"SCRIPT_NAME\" => \"REDIRECT_URL\",\n \"SCRIPT_FILENAME\" => \"PATH_TRANSLATED\",\n ));\n# echo \"{$_SERVER['SCRIPT_NAME']} - {$_SERVER['REDIRECT_URL']}\";\n \n if ($useErrorIfNoFile) {\n if (!file_exists($_SERVER['PATH_TRANSLATED'])) {\n Apache_Rewriter::doErrorDocument($useErrorIfNoFile);\n }\n }\n\n chdir(dirname($_SERVER['PATH_TRANSLATED']));\n }", "title": "" }, { "docid": "dbf15910ec5f149117ae256e39275b9e", "score": "0.47590914", "text": "public function redirect()\n {\n $code = $this->statusCode();\n return in_array($code, [301,302,303,304,307]); // moved,found,see other,not modified, temp redirect\n }", "title": "" }, { "docid": "e8ac0234764c826d5f301d126c2c3c67", "score": "0.47561952", "text": "public function testHandlingHelpCommandWithNonExistentCommand()\n {\n ob_start();\n $status = $this->kernel->handle('help fake', $this->response);\n ob_end_clean();\n $this->assertEquals(StatusCodes::ERROR, $status);\n }", "title": "" }, { "docid": "ef55f31c6ef69aac7f2ecef908b75bbf", "score": "0.47526503", "text": "function assertNoRedirect()\n{\n global $testRedirectUrl;\n if (!empty($testRedirectUrl)) {\n $tmp = $testRedirectUrl;\n $testRedirectUrl = \"\";\n outputFailedTest(\"Failed asserting that there is no redirect.\\nRedirect URL: '$tmp'.\");\n }\n}", "title": "" }, { "docid": "1b27b2f08cf6ba893464c5020ddefaa8", "score": "0.47403425", "text": "public function testHttpResponseRedirectRemoteUrl301()\n {\n $this->specify(\n \"redirect is not redirecting remote 301 properly\",\n function () {\n $response = $this->getResponseObject();\n $response->resetHeaders();\n $response->redirect(\"http://google.com\", true, 301);\n\n $expected = Headers::__set_state(\n [\n '_headers' => [\n 'Status' => '301 Moved Permanently',\n 'Location' => 'http://google.com',\n 'HTTP/1.1 301 Moved Permanently' => null,\n ]\n ]\n );\n expect($response->getHeaders())->equals($expected);\n }\n );\n }", "title": "" }, { "docid": "1cfa46c90aa399aa652f2f646c71b483", "score": "0.47327322", "text": "public function route($command);", "title": "" }, { "docid": "1e293ddaa4c3538815a6a25b7365fe9b", "score": "0.4728506", "text": "static function RedirectToSetup() {\n header(\"Location: Setup.php\");\n }", "title": "" }, { "docid": "af04a6c4c57ad2c157e25cd3c8f4f08f", "score": "0.47047076", "text": "function _cmd_redirectToDefault($input, $output)\n {\n // if no errors have occurred, redirect\n if (!SGL_Error::count()) {\n $aParams = array(\n 'managerName' => 'module'\n );\n SGL_HTTP::redirect($aParams);\n\n // else display error with blank template\n } else {\n $output->template = 'error.html';\n }\n }", "title": "" }, { "docid": "2c538770bb0aef28db702b4016a4468b", "score": "0.46911383", "text": "function plugin_prettyurls_setup() {\n\t\n\tif (file_exists(ABS_PATH . '.htaccess'))\n\t\treturn 1;\n\t\n\tif (!is_writable(ABS_PATH)) {\n\t \treturn -2;\n\t}\n\t\n\treturn 1;\n}", "title": "" }, { "docid": "e172e82c6c34393e05d7677a504d34d1", "score": "0.46865225", "text": "public function testGenerateHeadRoute()\n {\n $route = $this->router->createHeadRoute('/', array($this, 'closure'));\n $this->assertBasicRoute($route, 'HEAD');\n }", "title": "" }, { "docid": "be442e8c6914fb6d4ea53193ba067cc3", "score": "0.46836525", "text": "function redirect( /* mixed */ )\r\n\t{\r\n\t\t/*\r\n\t\t\tTaken from: http://www.php.net/manual/en/function.header.php#78470\r\n\r\n\t\t\t// 301 Moved Permanently\r\n\t\t\theader(\"Location: /foo.php\",TRUE,301);\r\n\r\n\t\t\t// 302 Found\r\n\t\t\theader(\"Location: /foo.php\",TRUE,302);\r\n\t\t\theader(\"Location: /foo.php\");\r\n\r\n\t\t\t// 303 See Other\r\n\t\t\theader(\"Location: /foo.php\",TRUE,303);\r\n\r\n\t\t\t// 307 Temporary Redirect\r\n\t\t\theader(\"Location: /foo.php\",TRUE,307);\r\n\r\n\t\t\t\"The HTTP status code changes the way browsers and robots handle redirects, so if you are using header(Location:) it's a good idea to set the status code at the same time. Browsers typically re-request a 307 page every time, cache a 302 page for the session, and cache a 301 page for longer, or even indefinitely. Search engines typically transfer \"page rank\" to the new location for 301 redirects, but not for 302, 303 or 307.\"\r\n\r\n\t\t\t\"If the status code is not specified, header('Location:') defaults to 302.\"\r\n\t\t*/\r\n\t\t$http_response_code = 302;\r\n\t\t$location = null;\r\n\t\t$args = func_get_args();\r\n\t\tif (count($args) === 1 && is_string($args[0]))\r\n\t\t{\r\n\t\t\t$arg = $args[0];\r\n\t\t\tswitch ($arg[0])\r\n\t\t\t{\r\n\t\t\t\tcase '/':\r\n\t\t\t\t\t$location = $arg;\t\t\t\t\t\t\t\t\t\t\t\t\t//\t$arg == '/path' || $arg == '//host/path'\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'h':\r\n\t\t\t\t\tif ($arg === 'http' || $arg === 'https')\r\n\t\t\t\t\t\t$location = (string) $this->uri->withScheme($arg);\t\t\t\t//\t'//' . $this->uri->authority . $this->uri->getPathAndQuery();\r\n\t\t\t\t\t//\t$location = $arg . '://' . _::request('host') . _::request('uri');\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$location = $arg;\t\t\t\t\t\t\t\t\t\t\t\t//\t$arg == 'http://www.google.com/'\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '?':\r\n\t\t\t\t\t$location = $this->uri->getLeftPart(Uri::PARTIAL_PATH) . $parts;\t//\t(_::is_https() ? 'https://' : 'http://') . _::request('host') . _::request('path') . $parts;\r\n\t\t\t\t\t//$location = _::request('path') . $arg;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '&':\t// append to query string\r\n\t\t\t\t\t$location = $this->uri->getLeftPart(Uri::PARTIAL_QUERY);\r\n\t\t\t\t\t$location .= strpos($location, '?') === false ? '?' . substr($arg, 1) : $arg;\r\n\t\t\t\t//\t$location .= ($location->query === null ? '?' . substr($arg, 1) : $arg);\t//\talternative using Uri object!\r\n\t\t\t\t\t//$location = _::request('uri') . (empty(_::request('query')) ? '?' . substr($arg, 1) : $arg);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '#':\r\n\t\t\t\t\t$location = $this->uri->getLeftPart(Uri::PARTIAL_QUERY);\r\n\t\t\t\t//\t$location = _::request('uri') . $arg;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$location = $arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Request section not implemented/RE-written yet!');\r\n\r\n\t\t\t/*\r\n\t\t\t//\tNote: This is not necessary because the redirect header accepts a path based address; eg. / ... so the scheme & host are NOT always required! IOW we don't need to build a FULL / fully qualified URL like the `build_url()` function!\r\n\t\t\t$location = [\t'scheme'\t\t=>\tself::$https ? 'https' ; 'http',\r\n\t\t\t\t\t\t\t'host'\t\t\t=>\tself::$host,\r\n\t\t\t\t\t\t\t'path'\t\t\t=>\tself::$path,\r\n\t\t\t\t\t\t\t'query'\t\t\t=>\tself::$query\r\n\t\t\t\t\t\t];\r\n\t\t\t*/\r\n\t\t\tforeach ($args as $arg)\r\n\t\t\t{\r\n\t\t\t\tif (is_string($arg))\r\n\t\t\t\t{\r\n\t\t\t\t\tswitch (substr($arg, 0, 1))\t\t\t\t\t\t//\tpseudo: if $arg = '' then $arg[0] == `Notice: Uninitialized string offset: 0` ... IOW: We cannot use `switch($arg[0])` because we could get a PHP notice message!\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase '/':\r\n\t\t\t\t\t\t\tif (substr($arg, 0, 2) === '//')\t\t//\t`//` eg. '//www.google.com/' ... ie. same protocol!\r\n\t\t\t\t\t\t\t\t$location = parse_url($arg);\r\n\t\t\t\t\t\t\telse\t\t\t\t\t\t\t\t\t//\t`/` eg. '/login' ... ie. relative URL\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$qmark = strpos($arg, '?');\r\n\t\t\t\t\t\t\t\tif ($qmark === false)\t\t\t\t//\teg. request::redirect('https', '/login')\t...\tie. the `https` will set scheme, host, path and query. We only want scheme, host and path! NOT the query string!\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$location['path'] = $arg;\r\n\t\t\t\t\t\t\t\t\tunset($location['query']);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\t\t\t\t\t\t\t\t//\teg. request::redirect('/login?id=123', '?id=456')\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$location['path'] = substr($arg, 0, $qmark);\r\n\t\t\t\t\t\t\t\t\t$location['query'] = substr($arg, $qmark + 1);\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\tbreak;\r\n\t\t\t\t\t\tcase '?':\r\n\t\t\t\t\t\t\t//\tif ( ! isset($location['path']))\t//\toptional\r\n\t\t\t\t\t\t\t//\t\t$location['path'] = self::$path;\r\n\t\t\t\t\t\t\t$location['query'] = substr($arg, 1);\t//\toverwrite existing query string OR create/set query string\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase '&':\r\n\t\t\t\t\t\t\t//\tif ( ! isset($location['path']))\t//\toptional\r\n\t\t\t\t\t\t\t//\t\t$location['path'] = self::$path;\r\n\t\t\t\t\t\t\t$location['query'] = (empty($location['query']) ? substr($arg, 1) : $location['query'] . $arg);\t//\tappend to existing query string OR create new query string if it doesn't exist\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase '#':\r\n\t\t\t\t\t\t\t//\tif ( ! isset($location['path']))\t//\toptional\r\n\t\t\t\t\t\t\t//\t\t$location['path'] = self::$path;\r\n\t\t\t\t\t\t\t$location['fragment'] = substr($arg, 1);\t//\tshould it be possible to just set the fragment without anything else?\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'h':\r\n\t\t\t\t\t\t\tif ($arg === 'http' || $arg === 'https')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$location = [\t'scheme'\t\t=>\t$arg,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'host'\t\t\t=>\t_::request('host'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'path'\t\t\t=>\t_::request('path'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'query'\t\t\t=>\t_::request('query')\r\n\t\t\t\t\t\t\t\t\t\t\t];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//\tAlternative version below would have checked the prefix value of $arg for a `http:/` or `https:` value in the beginning to `semi-validate` the parse_url() value.\r\n\t\t\t\t\t\t\t//$substr = substr($arg, 0, 6);\t\t\t\t\t\t\t//\t`optional` alternative\r\n\t\t\t\t\t\t\t//if ($substr === 'http:/' || $substr === 'https:')\r\n\t\t\t\t\t\t\t//{\r\n\t\t\t\t\t\t\t\t$location = parse_url($arg);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t\t//\tfallthrough vvv if NOT `http://` or `https://`\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tdie('Invalid value in request::redirect(): ' . print_r($arg, true));\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\tif (strpos($arg, '=') !== false)\t//\teg. 'test=123' == append to query string\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$location = [\t'scheme'\t\t=>\t$arg,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'host'\t\t\t=>\tself::$host,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'path'\t\t\t=>\tself::$path,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'query'\t\t\t=>\tself::$query\r\n\t\t\t\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}\r\n\t\t\t\t}\r\n\t\t\t\telse if (is_int($arg))\r\n\t\t\t\t\t$http_response_code = $arg;\r\n\t\t\t\telse if (is_array($arg))\r\n\t\t\t\t{\r\n\t\t\t\t\tif (is_array($location))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (isset($location['query']) && isset($arg['path']) && ! isset($arg['query']))\t//\teg. request::redirect('?id=123', ['path' => '/']) ... result = '/' ... because the '/' is a PATH without query string! The new `arg` value has a PATH but NOT a query string! path = query string = request_uri ... they go hand-in-hand!\r\n\t\t\t\t\t\t\tunset($location['query']);\r\n\t\t\t\t\t\t$location = array_merge($location, $arg);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$location = $arg;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tdie('Invalid value in request::redirect(): ' . print_r($arg, true));\r\n\t\t\t}\r\n\r\n\t\t\tif (is_array($location))\r\n\t\t\t{\r\n\t\t\t\tthrow new \\Exception('Request section not implemented or re-written yet!');\r\n\r\n\t\t\t\tif (isset($location['scheme']) && ! isset($location['host']))\r\n\t\t\t\t\t$location['host'] = _::request('host');\r\n\r\n\t\t\t\tif (isset($location['user']) || isset($location['pass']))\r\n\t\t\t\t\t$location['host'] = (isset($location['user']) ? $location['user'] : null) . (isset($location['pass']) ? ':' . $location['pass'] : null) . '@' . (isset($location['host']) ? $location['host'] : _::request('host'));\r\n\r\n\t\t\t\tif (isset($location['host']) && ! isset($location['path']))\r\n\t\t\t\t\t$location['path'] = '/';\r\n\r\n\t\t\t\t$location = (isset($location['scheme']) ? $location['scheme'] . ':' : null) .\r\n\t\t\t\t\t\t\t(isset($location['host']) ? '//' . $location['host'] . (isset($location['port']) ? ':' . $location['port'] : null) : null) .\r\n\t\t\t\t\t\t\t(isset($location['path']) ? $location['path'] : null) .\r\n\t\t\t\t\t\t\t(isset($location['query']) ? '?' . $location['query'] : null) .\r\n\t\t\t\t\t\t\t(isset($location['fragment']) ? '#' . $location['fragment'] : null);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tdie('Invalid value in request::redirect(): ' . print_r($args, true));\r\n\t\t}\r\n\r\n\t\t// ob_get_length() will return \"FALSE if no buffering is active.\" ... so all we want to know is if buffering IS active AND there was already data sent to the buffer ... then we need to die()!\r\n\t\tif (ob_get_length()) die(ob_get_clean() . '<p><span style=\"color: red;\">Errors on Redirect to: <a href=\"' . $location . '\">' . $location . '</a></span></p>');\r\n\t\tif ( ! headers_sent($filename, $linenum))\r\n\t\t{\r\n\t\t\tif ( ! empty($location) ) header('Location: ' . $location, true, $http_response_code);\r\n\t\t\telse echo '<p><span style=\"color: red\"><b>ERROR: Empty location on redirect()!</b></span></p>';\r\n\t\t\texit;\r\n\t\t}\r\n\t\tthrow new \\Exception(\"<p><span style='color: red'>ERROR:</span> <b>Headers already sent</b> in `{$filename}` on line <b>`{$linenum}`<br />\" .\r\n\t\t\t\"Cannot redirect, please click the following link: <a href='{$location}'>{$location}</a></p>\");\r\n\t}", "title": "" }, { "docid": "bcfa7a17ae2a3452547c840f8b269159", "score": "0.4680848", "text": "public function testRedirectBeforeRedirectModifyingStatusCode(): void\n {\n $Controller = new Controller(new ServerRequest());\n\n $Controller->getEventManager()->on('Controller.beforeRedirect', function (EventInterface $event, $url, Response $response): void {\n $controller = $event->getSubject();\n $controller->setResponse($response->withStatus(302));\n });\n\n $response = $Controller->redirect('http://cakephp.org', 301);\n\n $this->assertSame('http://cakephp.org', $response->getHeaderLine('Location'));\n $this->assertSame(302, $response->getStatusCode());\n }", "title": "" }, { "docid": "b8aeffa1f785b8e56b0fd859f04e7488", "score": "0.46573502", "text": "public function test_Verify_Symlinks() {\n\t\t// EXPECTED RESULT : Symlinks are created\n\t\t$hostname = general_function::get_hostname(TEST_HOST_1);\n\t\tdiskmapper_setup::reset_diskmapper_storage_servers();\n\t\t$this->assertTrue(diskmapper_api::zstore_put(DUMMY_FILE_1, $hostname), \"File not uploaded to primary SS\");\n\t\t$this->assertTrue(torrent_functions::wait_for_torrent_copy($hostname,90) , \"Failed to copy file to secondary disk\");\n\t\t$parsed_hostmap = diskmapper_api::get_all_config();\n\t\t$PrimSS = $parsed_hostmap[$hostname]['primary']['storage_server'];\n\t\t$SecSS = $parsed_hostmap[$hostname]['secondary']['storage_server'];\n\t\t$command_to_be_executed = \"ls /var/www/html/\".GAME_ID;\n\t\t$status = trim(remote_function::remote_execution($PrimSS,$command_to_be_executed));\n\t\t// We verify that the name of the symlink is as expected\n\t\t$this->assertEquals(strcmp($status ,$hostname) , 0 ,\"Symlink name different than expected\");\n\t\t$status = trim(remote_function::remote_execution($SecSS,$command_to_be_executed));\n\t\t$this->assertEquals(strcmp($status ,$hostname) , 0 ,\"Symlink name different than expected\");\n\t}", "title": "" }, { "docid": "d69d15a601d0bc7fc648f8cf4d55f1f9", "score": "0.46573132", "text": "function indexRedirect() {\r\n\r\n//Must not redirect for these pages.\r\nrequire \"redirect.ini\";\r\n\r\n$redirect = true;\r\n\t\r\nforeach($pages as $page) {\r\n\tif (stristr($_SERVER['PHP_SELF'],$page)) {\r\n\t\t$redirect = false;\r\n\t}\t\r\n\r\n}\r\n\r\nreturn $redirect;\r\n}", "title": "" }, { "docid": "1ba39958c3ed6e1fd6bd6ed7ddc38c12", "score": "0.46562773", "text": "function curl_exec_follow($ch, &$maxredirect = null) {\n \n // we emulate a browser here since some websites detect\n // us as a bot and don't let us do our job\n $user_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)\".\n \" Gecko/20041107 Firefox/1.0\";\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent );\n\n $mr = $maxredirect === null ? 5 : intval($maxredirect);\n\n if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $mr);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n } else {\n \n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\n if ($mr > 0)\n {\n $original_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n $newurl = $original_url;\n \n $rch = curl_copy_handle($ch);\n \n curl_setopt($rch, CURLOPT_HEADER, true);\n curl_setopt($rch, CURLOPT_NOBODY, true);\n curl_setopt($rch, CURLOPT_FORBID_REUSE, false);\n do\n {\n curl_setopt($rch, CURLOPT_URL, $newurl);\n $header = curl_exec($rch);\n if (curl_errno($rch)) {\n $code = 0;\n } else {\n $code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n if ($code == 301 || $code == 302) {\n preg_match('/Location:(.*?)\\n/', $header, $matches);\n $newurl = trim(array_pop($matches));\n \n // if no scheme is present then the new url is a\n // relative path and thus needs some extra care\n if(!preg_match(\"/^https?:/i\", $newurl)){\n $newurl = $original_url . $newurl;\n } \n } else {\n $code = 0;\n }\n }\n } while ($code && --$mr);\n \n curl_close($rch);\n \n if (!$mr)\n {\n if ($maxredirect === null)\n trigger_error('Too many redirects.', E_USER_WARNING);\n else\n $maxredirect = 0;\n \n return false;\n }\n curl_setopt($ch, CURLOPT_URL, $newurl);\n }\n }\n return curl_exec($ch);\n}", "title": "" }, { "docid": "8169022bbe91e9f1d4a3f8642d82292e", "score": "0.46481854", "text": "private function setUpRedirectMiddleware()\n {\n $app = $this->app;\n $sessionId = $this->sessionId;\n $prefix = $this->prefix;\n $requestTokenRoute = $this->requestTokenRoute;\n $callbackUrlRoute = $this->callbackUrlRoute;\n $routesWithoutLogin = $this->routesWithoutLogin;\n ////\n\n $this->app->before(function (Request $request) use ($app, $sessionId, $prefix, $requestTokenRoute, $callbackUrlRoute, $routesWithoutLogin) {\n $path = $request->getPathInfo();\n if (!$app['session']->has($sessionId)) {\n $withoutLogin = array($prefix, \"{$prefix}/{$requestTokenRoute}\", \"{$prefix}/{$callbackUrlRoute}\");\n foreach ($routesWithoutLogin as $route) {\n $withoutLogin[] = $route;\n }\n\n if (!in_array($path, $withoutLogin)) {\n\n return new RedirectResponse($prefix);\n }\n }\n });\n }", "title": "" }, { "docid": "a920fa8210bf6d026abe0f9da375bb46", "score": "0.46461624", "text": "function redirect_to()\n{\n\t$url = '';\n\t$redirect = @$_GET['redirect'];\n\t\n\tif($redirect) {\n\t\t$url = base64_decode($redirect);\n\t} else {\n\t\t$url = '/';\n\t}\n\n\tredirect($url);\n\n}", "title": "" }, { "docid": "156de9a337537825ceca194ca9bc4652", "score": "0.46412504", "text": "public function executeDirect($command);", "title": "" }, { "docid": "18aa20504c95419d00e9d0a813236c66", "score": "0.46370435", "text": "public function getRedirect();", "title": "" }, { "docid": "a0472e8faecdad7cc282925b0a228934", "score": "0.46259424", "text": "public function __construct(RedirectRepository $redirect)\n\t{\n\t\t$this->redirect = $redirect;\n\t}", "title": "" }, { "docid": "6e0f47756c0d46466f153d9a5cd13447", "score": "0.46256477", "text": "protected function redirectResponse(string $redirect): void\n {\n }", "title": "" }, { "docid": "e769e791e77a2f53b822b5aab7acd578", "score": "0.46255273", "text": "public function testIndex()\n\t{\n\t\t// create some entries for redirects\n\t\t$entries = Urls::all();\n\n\t\t// test each redirect\n\t\tforeach($entries as $entry) {\n\t\t\t// GET: /{slug}\n\t\t\t$response = $this->call('GET', '/' . $entry->slug);\n\n\t\t\t// Reponse code should be 302 because its a redirect\n\t\t\t$this->assertEquals(302, $response->getStatusCode());\n\n\t\t\t// Reponse header location should be the same as the dist url\n\t\t\t$this->assertEquals($entry->dist, $response->headers->get('location'));\n\t\t}\n\t}", "title": "" }, { "docid": "0034339a1a4f24bc1ade1dca1cf0e968", "score": "0.46246186", "text": "static function isRedirect(int $status);", "title": "" }, { "docid": "035de3fe73b76c2bf9340a8f79869506", "score": "0.4622983", "text": "function home ($status = 302);", "title": "" }, { "docid": "569624692d173e5153dc2104097759e6", "score": "0.46145517", "text": "public function test_redirect_correctly()\n {\n $user = factory(User::class)->create();\n $urlData = $this->urlService->addUrlShortener(\"https://www.techinasia.com\", $user, \"tia\");\n\n $response = $this->get(\"/{$urlData->alias}\");\n $response->assertRedirect($urlData->redirect_url);\n }", "title": "" }, { "docid": "337a531915021aabfb7cb08726ddb602", "score": "0.46075282", "text": "public function redirect_only() {\n\t\tDLM_Debug_Logger::deprecated( \"DLM_Download::redirect_only()\" );\n\n\t\treturn $this->is_redirect_only();\n\t}", "title": "" }, { "docid": "abef831fab1e2ace093f2e1c99e9fa75", "score": "0.46052036", "text": "public function followRedirects($follow = true);", "title": "" }, { "docid": "1d4c6779bef063dcfb47773196384d55", "score": "0.460442", "text": "function handleRedirect() {\r\n // Get the request URI\r\n $url = $_SERVER['REQUEST_URI'];\r\n // If it's length is 5 (slash inclusive, e.g. '/abcd')\r\n if (strlen($url) == 5) {\r\n // Get the last 4 chars\r\n $short = substr($url, -4);\r\n // Make sure the shortlink only contains our valid characters!\r\n if ($this->validatePattern(\"short\", $short)) {\r\n $sql = \"SELECT long_url\r\n FROM urls\r\n WHERE short_url = '$short';\r\n \";\r\n // Get the long URL of this shortlink\r\n // If it is false, then the site will display\r\n // a 404 error when rendering since the request URI doesn't\r\n // belong to a valid page in the site\r\n $long = $this->db->query($sql);\r\n if ($long) {\r\n // Redirect to the long URL\r\n header(\"Location: \" . $long);\r\n die();\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "73b3a0f8b7fe9499332f1e3ba17a909c", "score": "0.45998195", "text": "public function testShaRouteWithoutREVISIONFile()\n {\n $response = $this->get('/sha');\n\n $response->assertStatus(404);\n }", "title": "" }, { "docid": "ad86ea264c45b4494298c2bb741c3928", "score": "0.4597947", "text": "protected function shortyRedirect(ShortyInterface $shorty): void {\n $url = $shorty->getDestinationUrl()->toString();\n $url = str_replace([\"\\n\", \"\\r\"], '', $url);\n\n session_write_close();\n\n $response = new RedirectResponse($url);\n $response->send();\n\n $shorty->incrementVisits();\n exit();\n }", "title": "" }, { "docid": "5e22e3c4727928d270d3f26361bc2e13", "score": "0.45945936", "text": "private function doCustomURLRouters () {\n // Custom\n }", "title": "" }, { "docid": "02ddd585c8d54fbadaa0239f643b0ddf", "score": "0.45883602", "text": "function to ($url, $status = 302);", "title": "" }, { "docid": "12c6c248c132240e8ac9c9bda6cfb70e", "score": "0.45819727", "text": "function redirectNonSSL() {\n\t\tRequest::redirect('http://' . Request::getServerHost() . Request::getRequestPath());\n\t}", "title": "" }, { "docid": "807d32351cfbe8e11985e6f879009f14", "score": "0.45781508", "text": "function redirect($where = ''){\r\n if(substr($where,0,4) == 'http'){\r\n if(Config::getInstance()->get('debug')){\r\n Debug::add('Redirection',$where); Debug::saveInSession();\r\n }\r\n header('Location:'.$where); exit;\r\n } else { \r\n if(Config::getInstance()->get('debug')){\r\n Debug::add('Redirection',Config::getInstance()->get('realpath').'index.php?'.$where); Debug::saveInSession();\r\n }\r\n header('Location:'.Config::getInstance()->get('realpath').'index.php?'.$where); exit;\r\n }\r\n}", "title": "" }, { "docid": "5da341e01923e59c99a5a1b4228d3da8", "score": "0.45725095", "text": "function safe_redirect($url, $permament=true)\n\t{\n\t\tif (!headers_sent()) {\n\n\t\t\theader('HTTP/1.1 301 Moved Permanently');\n\t\t\theader('Location: ' . $url);\n\t\t\theader(\"Connection: close\");\n\t\t}\n\t}", "title": "" }, { "docid": "dc850e5a2d874af452fa260231fe3b91", "score": "0.45577034", "text": "private function configureHandle()\r\n {\r\n curl_setopt($this->_ch, CURLOPT_AUTOREFERER, true);\r\n curl_setopt($this->_ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($this->_ch, CURLOPT_HTTPGET, true);\r\n curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);\r\n }", "title": "" }, { "docid": "6ec60d77a93302ff5654bab3fdc0970c", "score": "0.45573744", "text": "function stag_custom_404_page() {\n\t$custom_404 = stag_theme_mod( '404_page', '404_custom_page' );\n\n\tif( is_404() && $custom_404 != '0' ) {\n\t\t$link = get_permalink( $custom_404 );\n\n\t\theader(\"HTTP/1.0 301 Moved Permanently\");\n\t\theader(\"Location: $link\");\n\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "9540cbcacd40196da60501a3c5c10eb1", "score": "0.4552107", "text": "function bpdw_maybe_redirect() {\n\tglobal $wp_query;\n\n\tif ( bp_docs_is_existing_doc() ) {\n\t\t$canonical = bpdw_canonical_address();\n\t\t$current = trailingslashit( wp_guess_url() );\n\t\t$change = 0 !== strpos( $current, $canonical );\n\n\t\tif ( $change ) {\n\t\t\t$redirect_to = str_replace( get_permalink( $wp_query->post->ID), $canonical, $current );\n\t\t\tbp_core_redirect( $redirect_to );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "061536d17e82fec9bf54301542795b7d", "score": "0.45495", "text": "function redirect_standard( /* Note. Read the next line. Varaible No of Paramas */ ) {\n\t$args = func_get_Args();\n\n foreach (array_merge(array('type','display'),$args) as $arg) {\n if (isset($_REQUEST[$arg])) {\n $urlopts[] = $arg.'='.urlencode($_REQUEST[$arg]);\n }\n }\n $url = $_SERVER['PHP_SELF'].'?'.implode('&',$urlopts);\n redirect($url);\n}", "title": "" }, { "docid": "cd9a0a1db671bc24af1150d73b29ea46", "score": "0.4545178", "text": "public function redirect($location=null, $externalRedirect=false, $statusCode=302) {}", "title": "" }, { "docid": "3c77742a9ed96bab130a232fd008f70b", "score": "0.45405227", "text": "function handle_feed_proxy_redirects() {\n\n\tif (!$feed = get_feed())\n\t\treturn;\n\n\theader( 'Content-Type: application/rss+xml; charset=' . get_option( 'blog_charset' ), true );\n\n\tmaybe_redirect_to_forced_protocol();\n\tmaybe_redirect_to_canonical_url();\n\n\t// most HTTP/1.0 client's don't understand 307, so we fall back to 302\n\t$http_status_code = $_SERVER['SERVER_PROTOCOL'] == \"HTTP/1.0\" && $feed->redirect_http_status == 307 ? 302 : $feed->redirect_http_status;\n\n\tif ( !is_page_in_feed() && strlen( $feed->redirect_url ) > 0 && should_redirect_to_proxy() && $http_status_code > 0 ) {\n\t\theader( sprintf( \"Location: %s\", $feed->redirect_url ), TRUE, $http_status_code );\n\t\texit;\n\t} else { // don't redirect; prepare feed\n\t\tstatus_header(200);\n\t\tRSS::prepare_feed( $feed->slug );\n\t}\n\n}", "title": "" }, { "docid": "97300210a924af4af3ff5a734433eba3", "score": "0.45397043", "text": "public function testRedirectTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "e51e134aabed48efd657bf62f9746297", "score": "0.4538807", "text": "public function virtual_or_exec($target, $do_redirect = true, $ub_details = '') {\n // Determine userid of logged in user\n $userid = '';\n if (isset($ub_details[Radutil::USER_LOGGED_IN]) and $ub_details[Radutil::USER_LOGGED_IN]) {\n $userid = $ub_details[Radutil::UB_USERID];\n }\n\n $query_string = $this->util->get_server_var(Utility::QUERY_STRING);\n // ahc ***** NOTE RECENT CHANGE *****\n // unset($_SERVER['QUERY_STRING']);\n $server_name = getenv('SERVER_NAME');\n\n $targ_str = preg_replace('/[\\/]*(\\w+)[\\/\\?]*.*/', '$1', $target);\n $new_target = $this->REWRITE[$targ_str][self::REWRITE_TO];\n $do_exec = (strpos($new_target, '.pl') !== false);\n $path = ($do_exec) ? '' : self::CGIBIN;\n // error_log(\"virt_or_exec(): query_string '$query_string', target '$target'\");\n // error_log(\"virt_or_exec(): targ_str '$targ_str', new_targ '$new_target'\");\n\n if ($this->util->is_cmd_line) {\n if ($do_exec) {\n // Case 0: Running an executable from command line.\n $cl_query_string = str_replace('&', ' ', $query_string);\n $cmd_str = \"SERVER_NAME=$server_name; export SERVER_NAME;\";\n $cmd_str .= Radutil::CLI_DOCUMENT_ROOT . \"/..\" . self::CGIBIN . \"/${new_target} $cl_query_string\";\n\t// error_log(\"Content::virtual_or_exec(): Case 0 (CL, run): $cmd_str\");\n\t$ret = `$cmd_str`;\n } else {\n\t// Case 1: Include a file from command line.\n\t$inc_file = Radutil::CLI_DOCUMENT_ROOT . '/' . $new_target;\n\t// error_log(\"Content::virtual_or_exec(): Case 1 (CL, inc): $inc_file\");\n\t$contents = $this->util->file_contents($inc_file);\n\t$ret = $contents;\n }\n print $ret;\n } else {\n // Apache environment.\n if ($do_exec) {\n\t// error_log(\"Content::virtual_or_exec(): Case 2 (HTTP, virtual): $new_target\");\n if (strlen($userid)) {\n apache_setenv('logged_in_user', $userid);\n }\n\tvirtual(self::CGIBIN . \"/${new_target}\");\n } else {\n\t// error_log(\"Content::virtual_or_exec(): Case 3 (HTTP, include): $new_target\");\n\t// error_log(\"Content::virtual_or_exec(): Case 3 (HTTP, include): $new_target\");\n\tinclude($new_target);\n }\n }\n }", "title": "" }, { "docid": "4638efc3501c018c2f3126a5d173cc05", "score": "0.4537244", "text": "function curl_redir_exec($ch)\n {\n\n static $curl_loops = 0;\n static $curl_max_loops = 4;\n if ($curl_loops++ >= $curl_max_loops)\n {\n $curl_loops = 0;\n return FALSE;\n }\n\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $data = curl_exec($ch);\n list($header, $data) = explode(\"\\n\\n\", $data, 2);\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if ($http_code == 301 || $http_code == 302)\n {\n $matches = array();\n preg_match('/Location:(.*?)\\n/', $header, $matches);\n $url = @parse_url(trim(array_pop($matches)));\n\n if (!$url)\n {\n //couldn't process the url to redirect to\n $curl_loops = 0;\n return $data;\n }\n\n $last_url = parse_url(curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));\n if (!$url['scheme'])\n $url['scheme'] = $last_url['scheme'];\n if (!$url['host'])\n $url['host'] = $last_url['host'];\n if (!$url['path'])\n $url['path'] = $last_url['path'];\n\n $new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . ($url['query']?'?'.$url['query']:'');\n curl_setopt($ch, CURLOPT_URL, $new_url);\n return curl_redir_exec($ch);\n\n }\n else\n {\n $curl_loops=0;\n return $data;\n }\n }", "title": "" }, { "docid": "859991d692ef31c5be5dffd873ed934f", "score": "0.453093", "text": "public static function redirect($url) {\n \n return \"!redirect \".$url;\n \n }", "title": "" }, { "docid": "385351b214d5da53b28b38eea15feacc", "score": "0.45304784", "text": "abstract protected function getRedirectUrl();", "title": "" }, { "docid": "2f8aeaf7b6f0b2de40d80a77de139845", "score": "0.45301235", "text": "public function testNoVerbs(): void\n {\n // setup\n $this->setCommand([]);\n\n // test body\n $commandLineOutput = $this->testBody();\n\n // assertions\n $this->validateOutput($commandLineOutput, [\n 'Usage: mezon <verb> <entity> [<options>]',\n 'Verbs:',\n ' create' . \"\\n\",\n ' help' . \"\\n\",\n ' version' . \"\\n\",\n 'Entities:',\n ' application' . \"\\n\",\n ' fs' . \"\\n\",\n ' htaccess' . \"\\n\"\n ]);\n }", "title": "" }, { "docid": "daec0342ec2cd2692f5826ff39ff2b08", "score": "0.4529924", "text": "public function testBasicTest()\n {\n $response = $this->get('/');\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "4d2cc5eea465e841dddcc8507723c90c", "score": "0.45290005", "text": "function force_https()\n{\n if (empty($_SERVER[\"HTTPS\"]) || $_SERVER[\"HTTPS\"] !== \"on\") {\n // Ensure we collapse folks that have bookmarks to aliases\n header(\"Location: https://mesonet.agron.iastate.edu\" . $_SERVER[\"REQUEST_URI\"]);\n exit();\n }\n}", "title": "" }, { "docid": "500be024112fe89208a3428527386485", "score": "0.45235035", "text": "public function testTrailingSlashes() {\n\t\t/**\n\t\t * First without regex\n\t\t */\n\n\t\tglobal $safe_redirect_manager;\n\n\t\t$_SERVER['REQUEST_URI'] = '/one';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t$_SERVER['REQUEST_URI'] = '/one/';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t$_SERVER['REQUEST_URI'] = '/one/two';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one/two/', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t$_SERVER['REQUEST_URI'] = '/one/two/';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/one/two', $redirect_to );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t/**\n\t\t * Now with regex\n\t\t */\n\n\t\t$_SERVER['REQUEST_URI'] = '/one/two';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/.*/', $redirect_to, 301, true );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\n\t\t$_SERVER['REQUEST_URI'] = '/one/two/';\n\t\t$redirected = false;\n\t\t$redirect_to = '/gohere';\n\t\t$safe_redirect_manager->create_redirect( '/.*', $redirect_to, 301, true );\n\n\t\tadd_action( 'srm_do_redirect', function( $requested_path, $redirected_to, $status_code ) use ( &$redirect_to, &$redirected ) {\n\t\t\tif ( $redirected_to === $redirect_to ) {\n\t\t\t\t$redirected = true;\n\t\t\t}\n\t\t}, 10, 3 );\n\n\t\t$safe_redirect_manager->action_parse_request();\n\n\t\t$this->assertTrue( $redirected );\n\t}", "title": "" }, { "docid": "30a36ecd67b399e8b8318a4ea8e461f7", "score": "0.45187277", "text": "abstract public function onRedirect(\n\t\tHandlers\\Handler $handler, \n\t\t$base, \n\t\t$code, \n\t\t$status \n\t);", "title": "" }, { "docid": "15859b2ce23cfbe7dc5e748c02fbb8b6", "score": "0.4515764", "text": "function redirect($path = \"\")\n{\n //echo $path;\n http_response_code(301);\n header(\"Location: /\" . BASE_PATH . \"{$path}\");\n die();\n}", "title": "" }, { "docid": "93ff3ba6cd1832a2f0465f96771e6a74", "score": "0.45123836", "text": "public function hasSeoRedirect(): bool { }", "title": "" }, { "docid": "0c7666fbb7bb4259d1112201ced4e3d9", "score": "0.45121363", "text": "public function removeAllCommand(): void\n {\n $this->redirectStorage->removeAll();\n $this->outputLine('Removed all redirects');\n }", "title": "" }, { "docid": "a7d0e56e51f112151f87832ce04e7401", "score": "0.45108", "text": "public function __call($name, $args) {\n redirect(get_url('')); \n }", "title": "" } ]
ee6b4cedef180d8cdcf30c204529bcec
Remove post from database
[ { "docid": "f3099b496013990a24ce3c7a1480d135", "score": "0.74754983", "text": "public function removePost($post)\n {\n // Remove post from database and apply changes\n $this->entityManager->remove($post);\n $this->entityManager->flush();\n }", "title": "" } ]
[ { "docid": "aa513127b1a4c93ae20e490e14b4033b", "score": "0.77470195", "text": "public function delete()\n {\n $post = Post::find(1);\n $post->delete();\n }", "title": "" }, { "docid": "60e22f32d7fbc63fc7895edcf8ebe71b", "score": "0.7585876", "text": "public function delete()\n\t{\n\t\tDB::delete('posts')->where('id', '=', $this->get('id'))->execute($this->_db);\n\t}", "title": "" }, { "docid": "bfacdb743669a6ce4a2e0c7802fb69db", "score": "0.74931216", "text": "public function delete_post()\n {\n \t$sql = \"DELETE FROM post WHERE id = '{$this->idp}';\";\n \t$result = $this->db->query($sql);\n \tif ($result){return true;}\n \telse {return false;}\n }", "title": "" }, { "docid": "fb836e9b1d13586518584b01cabe6e04", "score": "0.74742454", "text": "public function eliminar(Post $post)\n {\n //\n }", "title": "" }, { "docid": "1e1a882bfc8057b88b50e00c6562571e", "score": "0.740652", "text": "public function post_delete()\n\t\t\t\t{\n\t\t\t\t\t$id=$_REQUEST['id'];\n\t\t\t\t\t$this->db->where('id', $id);\n\t\t\t\t\t$this->db->delete('post'); \n\n\t\t\t\t}", "title": "" }, { "docid": "7a31de8bd75299a5111b533b44a350b6", "score": "0.7256245", "text": "public function delete() {\r\n $connection = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\r\n \r\n if ($connection->connect_error) {\r\n echo $connection->connect_error;\r\n }\r\n // Prepare and bind\r\n $stmt = $connection->prepare(\"DELETE FROM posts WHERE id = ? LIMIT 1\");\r\n $stmt->bind_param(\"i\", $postId);\r\n \r\n // Set parameters and execute\r\n $postId = $this->id;\r\n $stmt->execute();\r\n \r\n $stmt->close();\r\n $connection->close();\r\n }", "title": "" }, { "docid": "55f7bee7438e18b443171d340c0759aa", "score": "0.7124253", "text": "public function delete_post(){\n\t\t\t//create query\n\t\t\t$query = \"DELETE FROM \n\t\t\t\t\t\t\".$this->table.\" \n\n\t\t\t\t\t WHERE \n\t\t\t\t\t \tpost_id = :post_id\";\n\n\t\t\t//prepare stmt\n\t\t\t$stmt = $this->conn->prepare($query);\n\n\t\t\t//binding the post id\n\t\t\t$stmt->bindParam(':post_id', $this->post_id);\n\n\t\t\t//execute stmt\n\t\t\tif ($stmt->execute()){\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t//print error message\n\t\t\tprintf(\"Error: %s\\n\", $stmt->error);\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "ac7a7d55fd6fbac4947a0aca4dfd3be4", "score": "0.70635825", "text": "public function destroy(post $post)\n {\n //\n }", "title": "" }, { "docid": "26b124c4e25693e6154d7bffb8e8de97", "score": "0.7049469", "text": "public function delete(Post $post)\n\t{\n\t\t$post->delete();\n\t}", "title": "" }, { "docid": "d12bd8a2b3b82b9b288aba07ae4fdd02", "score": "0.70040834", "text": "private function deletePostPermanently() {\n // The CSS selector for 'Delete Permanently' is actually exactly the same as when trashing\n // the post, so is the update message, so we just use that method internally\n $this->trashPost();\n }", "title": "" }, { "docid": "a925fe29f453fa1ea0b609bca967e59c", "score": "0.69864535", "text": "public function planner_planify_delete_post() {\n \n // Delete the selected post\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Posts)->planner_planify_delete_post();\n \n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.6983862", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "174f42bdb1ebe587fe1c86127093a03c", "score": "0.6963402", "text": "public function delete(){\n $status = $this->Connect->set(\"DELETE FROM posts WHERE id = $this->id LIMIT 1\");\n return $status;\n }", "title": "" }, { "docid": "1f8ce63b5bb6a01ecfc83267c524763e", "score": "0.6947685", "text": "public function delete(Post $post)\n {\n $aclProvider = $this->container->get('security.acl.provider');\n $objectIdentity = ObjectIdentity::fromDomainObject($post);\n $aclProvider->deleteAcl($objectIdentity);\n \n $em = $this->getEntityManager();\n $em->remove($post);\n $em->flush();\n }", "title": "" }, { "docid": "1566635b9f51ebfc127247af1b736339", "score": "0.69431037", "text": "public function planner_delete_post_by_id() {\n \n // Save a post\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Posts)->planner_delete_post_by_id();\n \n }", "title": "" }, { "docid": "c3c55c8afbe4758e668ebb59de2223e6", "score": "0.689448", "text": "public function deleting(Post $post)\n {\n $discussion = $post->discussion;\n $discussion->update(['posts_count' => ($discussion->posts_count - 1)]);\n }", "title": "" }, { "docid": "90c0af6748530ac20d65b5461a80fe05", "score": "0.6886325", "text": "public function post_delete(){\n\t\ttry {\n\t\t\t$postInfo = CA_Social::getPost($this->input->post('post_id'), 0, FALSE, $this->self['id']);\n\t\t\tif($postInfo['user_id']==$this->self['id']){\n\t\t\t\tCA_Social::deletePost($this->input->post('post_id'));\n\t\t\t}else{\n\t\t\t\tthrow new Exception('You must be the owner of the post to delete.');\n\t\t\t}\n\t\t\t$this->ajaxResponse(array(\n\t\t\t\t'status' => TRUE,\n\t\t\t));\n\t\t}catch(Exception $e){\n\t\t\t$this->ajaxResponse(array(\n\t\t\t\t'status' => FALSE,\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "42c30b3e8a1677237f27ed311f2ea982", "score": "0.687051", "text": "public function delete() {\n\t\t\tif($this->request->args[0]){\n\t\t\t\t//Find matching posts, then delete them\n\t\t\t\t$myPost = MyPosts::find($this->request->args[0])->delete();\n\t\t\t\t//Send the retrieved post data to the view\n\t\t\t\t$this->redirect( array('MyPosts::index' ) );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "01785fa14757ce425dc56778e11281b4", "score": "0.6856421", "text": "public function deleted(Post $post)\n {\n //\n }", "title": "" }, { "docid": "01785fa14757ce425dc56778e11281b4", "score": "0.6856421", "text": "public function deleted(Post $post)\n {\n //\n }", "title": "" }, { "docid": "c54b3584b7b3d389a162322da14c6180", "score": "0.6849493", "text": "function deletePost($id) {\n return db()->query(\"DELETE FROM post WHERE post_id = $id\");\n }", "title": "" }, { "docid": "c65f30824c601c4acf1b7cffe0bef7b9", "score": "0.6844406", "text": "function erasePost(){\r\n$db=connectDb();\t\r\n\r\nif(isset($_GET['id'])) {\r\n\t\t$id=$_GET['id'];\r\n\t\t$reponse = $db->prepare('DELETE FROM posts WHERE id=:id');\r\n\t\t$reponse->bindValue(':id', $id);\r\n \t$reponse->execute();\r\n\t\t \t\r\n\t\t// Redirection to interface\r\n\t\theader('Location: backEnd_controler.php');\r\n\t\t}\r\n}", "title": "" }, { "docid": "2652c4ef4b55adee3bce557eb81d65fb", "score": "0.6832142", "text": "function nz_remove_item() {\n\tglobal $pdo;\n\n\tif ( ! isset( $_GET['delete-btn'] ) ) {\n\t\treturn;\n\t}\n\n\t$id = esc_html( $_GET['delete-btn'] );\n\t$query = $pdo->prepare( 'DELETE FROM `blogs` WHERE `id` = ?' );\n\t$query->execute( array( $id ) );\n\n\tif ( $query ) {\n\t\tnz_redirect( 'posts.php' );\n\t}\n}", "title": "" }, { "docid": "e1c1c2ac830bf86dfccf0a7de2674490", "score": "0.67750865", "text": "public function remove(Post $user)\n {\n }", "title": "" }, { "docid": "ac1498429afda4047c8790bf4951b0ed", "score": "0.67640406", "text": "public function deletePost($id) {\n\n }", "title": "" }, { "docid": "af4164bce75717328ce61e6de99edd2d", "score": "0.67477447", "text": "public function deletePost( $postId );", "title": "" }, { "docid": "7e01743fb4edb0c3330a8d4552ad2be0", "score": "0.67446136", "text": "static function delete_post($data)\n\t\t{\n\t\t\tself::delete_posts(array('post_ids' => array($data['post_id'])));\n\t\t}", "title": "" }, { "docid": "f98f4091873836e3915386e7b4a69a24", "score": "0.6744548", "text": "public function delete() {\n $bones = new Bones();\n \t\ttry {\n \t\t // _rev, and _id values were retrived in post_by_author (), so we can make sure that we are\n \t\t // acting on an already existing document.\n \t\t $bones->couch->delete($this->_id, $this->_rev);\n \t\t} \n \t\tcatch(SagCouchException $e) {\n \t\t\t$bones->error500($e);\n \t\t}\t\t\n \t\t\n \t\t// add a route in our index.php file that accepts _id and _rev. With this route, we can trigger the \n \t\t// deletion of posts from our profile page.\n \t\t// Then update views/user/profile.php page, so that when users click on the delete link, they hit our route, \n \t\t// and the necessary variables are passed.\n \t }", "title": "" }, { "docid": "3015bb7607a7399f5df9091d683c8ac1", "score": "0.67192733", "text": "public static function deletePost($id){\n $bdd = new DatabaseConnector('root','root.mysql.db', 'root','password');\n\n // Préparation de la requête\n $req = $bdd->getDb()->prepare(\"DELETE FROM posts WHERE id = :id\");\n\n // Execution de la requete\n $req->bindValue(':id', $id);\n $req->execute();\n }", "title": "" }, { "docid": "757ed6b9d257064b60b5480beee6e10a", "score": "0.6715987", "text": "public function destroy(Post $post)\n {\n if (Storage::disk('public')->exists('post/'.$post->image))\n {\n Storage::disk('public')->delete('post/'.$post->image);\n }\n $post->categories()->detach();\n $post->tags()->detach();\n $post->delete();\n Toastr::success('Post Successfully Deleted :)','Success');\n return redirect()->back();\n }", "title": "" }, { "docid": "b04e663214aa26e9859ccab4d738d464", "score": "0.6707463", "text": "public function delete_posting($data=array())\n {\n $this->db->delete('delete', $data);\n }", "title": "" }, { "docid": "2cddab97f0e71258229dfee637c28936", "score": "0.6696747", "text": "public function deleted(Post $post)\n {\n Cache::forget('home-news');\n }", "title": "" }, { "docid": "1057fbe2875ec4f5bad5891f44363292", "score": "0.66928136", "text": "public function delete(){\r\n\t\t\t$ok = $this->sp->db->fetchBool('DELETE FROM '.$this->sp->db->prefix.'blog_posts WHERE id=\\''.$this->sp->db->escape($this->id).'\\';');\r\n\t\t\treturn $ok;\r\n\t\t}", "title": "" }, { "docid": "952f16dc99e658bbfdd06de2fb3c888a", "score": "0.66927254", "text": "public function deleteFromDatabase();", "title": "" }, { "docid": "87b0477120a03a6fc540e7fe08607b22", "score": "0.6691031", "text": "public function deleted(Post $post)\n {\n Circle::query()->where('id',$post->circle_id)->decrement('post_count');\n }", "title": "" }, { "docid": "09a0465241c63a78654ee6a36cf1bb65", "score": "0.6684954", "text": "public function setDeletePost () {\n\n\t\tif(isset($_GET['post-number']) && !empty($_GET['post-number']) && is_numeric($_GET['post-number'])) {\n\t\t\t$postId = htmlentities($_GET['post-number']);\n\t\t\t//call to Model method from PostCtrlData.php || First delete all comments for this post\n\t\t\t$this->deletePostComments($postId);\n\t\t\t//call to Model method from PostCtrlData.php | delete post from database\n\t\t\t$this->deletePost($postId);\n\t\t}\n\t\theader(\"Location: /admin/posts \");\n\t\texit;\n\t}", "title": "" }, { "docid": "22d942cb7c382b434fbe867f47c09667", "score": "0.6677077", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n\n $post->delete();\n }", "title": "" }, { "docid": "4ed94fe4d1638c4462e5d2aeb416a8d3", "score": "0.6660256", "text": "public function testDeletePost()\n {\n $post = factory(Post::class)->create();\n\n $this->actingAs($this->admin())\n ->visit(\"/admin/posts/{$post->slug}/edit\")\n ->press('Supprimer')\n ->see('Article supprimé avec succès');\n }", "title": "" }, { "docid": "f1016e19469ed9263e9b2558893caac6", "score": "0.6644368", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete', $post); //ini policy\n $post->tags()->detach(); // ini ditambhkan ketika mendapatkan error {{ Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`blog-parsinta`.`post_tag`, CONSTRAINT `post_tag_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`)) }}\n\n Storage::delete($post->thumbnail);\n $post->delete();\n\n session()->flash('success', 'The post was deleted');\n\n return redirect()->route('posts.index');\n }", "title": "" }, { "docid": "7749dc784461d127f61464f0606bb80e", "score": "0.6640054", "text": "public function destroy()\n\t{\n $id = intval(Input::get('id',0));\n if($id == 0)\n return ;\n\n echo Post::delete($id) ? 1 : -1;\n\t}", "title": "" }, { "docid": "4a52542dcb02d90bde87767276591492", "score": "0.66116095", "text": "public function delete()\n\t{\n\t\t\n\t\t// Delete the blog post\n\t\treturn parent::delete();\n\t}", "title": "" }, { "docid": "bd8bfa11e7cd5dec9af1cabdf89ec272", "score": "0.6604397", "text": "function remove_from_db()\n\t{\n\n\t\t$sql = sprintf(\"delete from Acts where ActId = '%s'\", \n\t\t\tmysql_real_escape_string($this->ActId));\n\t\t$result = mysql_query($sql);\n\t\tif (!$result)\n\t\t\treturn display_mysql_error ('Cannot execute query', $sql);\n\t\t$this->remove_performer();\n\t}", "title": "" }, { "docid": "6880c39ed4b061e19150511b3c743131", "score": "0.6600243", "text": "public function destroy(Post $post)\n {\n /*\n * Was getting http doesn't allow unlinking cos an accessor mutates\n * the returned value of the Post `featured` attribute to yield the full path\n * To delete we have to use the server's absolute path to the file.\n * not the http:// path.\n * Geez! I just learnt this. We're using SoftDeletes. I wasn't supposed to unlink\n * The files. Choi!!\n */\n // $featured = substr($post->featured, strpos($post->featured, '/uploads/posts'));\n // $featured = __DIR__.'/../../../public'.$featured;\n\n if ( $post->delete() ) {\n toastr()->success(\"Post successfully sent to trash\");\n } else {\n toastr()->error(\"Post couldn't be trashed. An error occurred. Try again\");\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "8f9406006a2c32e3878c0418ba5f1301", "score": "0.6595586", "text": "public function delete($key)\n\t{\n\t\tif(!$this->postExists($key)) {\n\t\t\tLog::set(__METHOD__.LOG_SEP.'The post does not exist. Key: '.$key);\n\t\t}\n\n\t\t// Delete the index.txt file.\n\t\tif( Filesystem::rmfile(PATH_POSTS.$key.DS.FILENAME) === false ) {\n\t\t\tLog::set(__METHOD__.LOG_SEP.'Error occurred when trying to delete the file index.txt');\n\t\t}\n\n\t\t// Delete the directory.\n\t\tif( Filesystem::rmdir(PATH_POSTS.$key) === false ) {\n\t\t\tLog::set(__METHOD__.LOG_SEP.'Error occurred when trying to delete the directory '.PATH_POSTS.$key);\n\t\t}\n\n\t\t// Remove from database.\n\t\tunset($this->db[$key]);\n\n\t\t// Save the database.\n\t\tif( $this->save() === false ) {\n\t\t\tLog::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7f4763fd04a4d4c9d52dda2685dbfcc5", "score": "0.65922743", "text": "public function erasePost(Request $request) {\n $id = $request->id;\n $post = Post::find($id);\n if($post != null) {\n $post->erased = !$post->erased;\n $post->save();\n }\n }", "title": "" }, { "docid": "65db732997d5483396a8004c136e9204", "score": "0.65879375", "text": "public function destroy(Post $post)\n { \n //\n $post->tags()->detach();\n $post->delete();\n return redirect('post')->with('status','Successfully Deleted');\n }", "title": "" }, { "docid": "9b0088b0c02b45b78e3127b4b23ad739", "score": "0.65810716", "text": "function deletePost($postId)\n{\n global $db;\n $query = deleteBlogPost($postId); //sql query to delete one post from a blog\n db_query($db, $query); //delete a post from the database\n}", "title": "" }, { "docid": "7e61fa224f093d2d6dde24d9d777160f", "score": "0.65673715", "text": "function borrarPost(){\n borrarTodosLosComentariosPost();\n $idP = $_GET['idPost'];\n $consulta = conexion()->prepare ('DELETE FROM posts WHERE id_post=:id_post');\n $consulta->execute(\n array(\n 'id_post' =>$idP)\n ); \n header(\"Location: index.php\"); \n}", "title": "" }, { "docid": "947f7fac3b1e2980cf0477773eab316f", "score": "0.6556371", "text": "function deletePost($con, $index, $tmpId){\n\t\t$PostId = $tmpId[$index];\n\t\t//Deffine sql query\n\t\t$sql = 'DELETE FROM textForPost WHERE id = :pid';\n\t\t//Make Query\n\t\t$stm = $con->prepare($sql);\n\t\t$stm->execute(array(\n\t\t\t\":pid\" => $PostId\n\t\t));\n\t}", "title": "" }, { "docid": "4e448fa1b588f3af07a817ae77116379", "score": "0.655338", "text": "public function testDeletePost() {\n\t\t$author = $this->_createUser('Autor 4');\n\t\t$post = $this->_createPost('my favourite band', 'my favourite music band is...', $author);\n\t\t$id = $post->getId();\n\t\t$post2 = $this->service->deletePost($post);\n\n\t\t$this->assertTrue($post == $post, \"'deletePost' method doesn't return proper object.\");\n\t\t$this->assertInstanceOf('Cvut\\Fit\\BiPwt\\BlogBundle\\Entity\\Post', $post2, \"'deletePost' method doesn't return object of proper class.\");\n\n\t\ttry {\n\t\t\t$post3 = $this->service->findPost($id);\n\t\t\t$this->assertNull($post3, \"Deleted post still can be found.\");\n\t\t} catch(\\Exception $e) {}\n\t}", "title": "" }, { "docid": "ac69d174a15b3864e234b9e01b4d4fc5", "score": "0.6545252", "text": "public function destroy(Post $post)\n {\n $this->image->delete('post', $post->image);\n $this->image->delete('post/slider', $post->image);\n\n $post->delete();\n\n Toastr::success('Post Deleted :) ', 'Success');\n\n return redirect()->route('admin.post.index');\n }", "title": "" }, { "docid": "f52ab35f81238a00a832d9f7a7187f51", "score": "0.65283823", "text": "public function destroy(Post $post)\n {\n\t $post->tags()->sync([]);\n\t $post->delete();\n\t return redirect('/');\n }", "title": "" }, { "docid": "8321ad26c50383261f789d259115ef13", "score": "0.65217435", "text": "public function planner_update_a_post() {\n \n // Delete the selected post\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Posts)->planner_update_a_post();\n \n }", "title": "" }, { "docid": "04156a179eb9b6789c12064b8c7b778d", "score": "0.6520031", "text": "public function destroy($id)\n {\n $post = find($id);\n }", "title": "" }, { "docid": "a0e02394806233e7edb67948f7dd8682", "score": "0.6518159", "text": "public function deleted(Post $post)\n {\n $post->images()->delete();\n }", "title": "" }, { "docid": "faa14593c22062d3b68dfa2b55242f13", "score": "0.6509787", "text": "function DeletePost ($postId) {\n\n $query = $this->db->prepare(\"SELECT postImgUrl FROM news WHERE id=:postId\");\n $query->execute(array (\n \":postId\"=>$postId\n ));\n\n $result = $query->fetch();\n if($result != NULL)\n unlink($result['postImgUrl']);\n $query = $this->db->prepare (\"DELETE FROM news WHERE id=:postId;\");\n $result = $query->execute(array (\n \":postId\"=>$postId\n ));\n return $result;\n }", "title": "" }, { "docid": "07e6dce441684cd5c8be70f56cbfd29f", "score": "0.64998674", "text": "public function destroy(Post $post)\n {\n if (auth()->user()->id == $post->user_id) {\n \\Storage::delete($post->thumbnail);\n // menghapus data join\n $post->tags()->detach();\n // menghapus semua data post\n $post->delete();\n session()->flash(\"error\", \"The post was destroyed\");\n return redirect('posts');\n }\n }", "title": "" }, { "docid": "cfaa686990d7010b7bf545ebc20bc983", "score": "0.64975524", "text": "public function destroy(Post $post)\n {\n //\n\n // return $post;\n\n if ($post && ($post->user_id == Auth::user()->id || Auth::user()->is_admin())) {\n\n\n $post->categories()->detach();\n $post->favorite_to_users()->detach();\n $post->likingUsers()->detach();\n $post->reportingUsers()->detach();\n\n $post->delete();\n\n return redirect()->back()->with('success', 'Post deleted successfully');\n } else {\n\n return redirect()->back()->with('error', 'You are not authorized');\n }\n }", "title": "" }, { "docid": "237b23943eed32d4b545c00b10d8d962", "score": "0.64959604", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete-post',$post);\n $post->delete();\n return redirect(route('home'));\n }", "title": "" }, { "docid": "4f8ecdcfe1394e50dd49336d8824a7f6", "score": "0.6466072", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete-post', $post);\n\n $post->tags()->detach();\n\n $post->delete();\n\n return redirect()->route('index');\n }", "title": "" }, { "docid": "496fc92512396df78a71294b32ba0e94", "score": "0.6462562", "text": "public function clean_save(){\n $status = $this->Connect->set(\"DELETE FROM saved WHERE post_id = $this->id\");\n return $status;\n }", "title": "" }, { "docid": "4200f7d7ea51e3d2ef875b86a18fef47", "score": "0.6451847", "text": "function deleteInDatabase(){\n }", "title": "" }, { "docid": "04c9464101f0b03b5db2f4b46e2ceed7", "score": "0.6450507", "text": "public function destroy($post)\n {\n \t$post=Post::find($post);\n \t$post->user_id = Auth::user()->id;\n \t$post->delete();\n \treturn redirect()->route('profile');\n }", "title": "" }, { "docid": "a28eecd63fe29cde3938048515526076", "score": "0.64457744", "text": "public function del($id){\r\n\t if(!is_numeric($id)) return -1;\r\n\t \r\n\t $req = \"DELETE from Post WHERE idPost=\".$id;\r\n\t $res = execQuery($req);\r\n\t \r\n\t if($res)\r\n\t\t return 1;\r\n\t else\r\n\t\t return 0;\r\n }", "title": "" }, { "docid": "c50fc307a6516c8e54331d27188a61bd", "score": "0.6442689", "text": "public function action_delete_post() {\n\t\t$this->fired_actions['ep_delete_post'] = true;\n\t}", "title": "" }, { "docid": "d8c51ff4f39f2d2788948cb8ec2d4afa", "score": "0.64426243", "text": "public function deletePost($id) {\n $this->db->prepare('DELETE FROM posts WHERE id = :id');\n $this->db->bind(':id', $id);\n\n $this->db->execute();\n }", "title": "" }, { "docid": "d9914837e1ca96d9c03555d98421a1a3", "score": "0.64413434", "text": "public function deleteById($PostId);", "title": "" }, { "docid": "f224adfe3f9f0731dc898292346961e0", "score": "0.6439359", "text": "public function deleteAction(\\Lobacher\\Simpleblog\\Domain\\Model\\Blog $blog,\\Lobacher\\Simpleblog\\Domain\\Model\\Post $post) { \n $this->postRepository->remove($post); \n $this->redirect('show','Blog',NULL,array('blog' =>$blog)); \n }", "title": "" }, { "docid": "b2e65288c797372594833e9db4cf03d1", "score": "0.64388853", "text": "public function actionRemove()\n\t{\n\t\t$id = Yii::app()->request->getPost('id');\n $this->loadModel($id)->delete();\n\n\t}", "title": "" }, { "docid": "4dfef45b9d9d13456de95fec8a8a5182", "score": "0.64297086", "text": "public function removePostData($postId)\n {\n global $wpdb;\n $post = get_post($postId);\n \n $wpdb->query(\n \t\"DELETE FROM \" . DB_ACCESSGROUP_TO_OBJECT . \" \n \tWHERE object_id = '\".$postId.\"'\n \t\tAND object_type = '\".$post->post_type.\"'\"\n );\n }", "title": "" }, { "docid": "098305df5860d4a00e7a93df809d3071", "score": "0.64250934", "text": "public function destroy(Post $post)\n {\n $post -> categories()->detach();\n $post -> tags()->detach();\n $post -> delete();\n \n Toastr::success('Post Successfully Deleted', 'success');\n return redirect('admin/post/');\n }", "title": "" }, { "docid": "635e25af847e4d95629ea11eca3a165c", "score": "0.64195365", "text": "public function destroy(Post $post)\n {\n // detach() vale per many to many ('belongsToMany')\n // $post->tags()->detach();\n // // delete() vale per one to many ('hasMany')\n // $post->comments()->delete();\n // // dissociate vale per one to many ('belongsTo')\n // $post->author()->dissociate();\n $post->delete();\n // oppure come ho fatto metto la on delete cascade nelle tabelle\n return redirect()->route('posts.index');\n }", "title": "" }, { "docid": "0421faa8b1584baaf982b7895e3f9d90", "score": "0.6416725", "text": "public function destroy(Post $post)\n {\n if($post){\n if(file_exists(public_path($post->image))){ //if have this type of path has exiting\n unlink(public_path($post->image)); // have exiting then delete this file\n }\n $post->delete();\n Session::flash('success','Post has been delete');\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "16518a2353d5528d725d29d65d482859", "score": "0.64116335", "text": "public function deleteActionPost()\n {\n // $title = \"Delete content | oophp\";\n $this->app->db->connect();\n\n if (hasKeyPost(\"doDelete\")) {\n $contentId = getPost(\"contentId\");\n $sql = \"UPDATE content SET deleted=NOW() WHERE id=?;\";\n $this->app->db->execute($sql, [$contentId]);\n return $this->app->response->redirect(\"cms/admin\");\n }\n }", "title": "" }, { "docid": "b85a088e6ac35b2d820c599b24cc354c", "score": "0.6404506", "text": "public function destroy(Post $post)\n {\n $post->tags()->detach();\n $post->delete();\n Toastr::success('删除成功', 'OK');\n return redirect() ->back();\n }", "title": "" }, { "docid": "6a2eb143785599b45d4ab807a6011660", "score": "0.6375754", "text": "public function destroy(Post $post)\n { \n if(Auth::check()){\n $post->delete();\n }\n \n \n \n\n return redirect()->route(\"post.index\");\n }", "title": "" }, { "docid": "2a1d203315451925bc2f00ae180840a5", "score": "0.6372851", "text": "public function destroy(Post $post){\n $result = $this->postRepo->deletePost($post);\n\n if($result){\n return redirect()->back()->with('message','Post deleted!');\n } else {\n return redirect()->back()->with('message','Something went wrong!');\n }\n }", "title": "" }, { "docid": "7d36d284b2659e7b13ebd5db80cc6eb4", "score": "0.63721544", "text": "public function unlink_tag(){\n $user = $this->get_user_or_redirect();\n if(isset($_POST[\"tag_id\"]) && isset($_POST[\"post_id\"])){\n $tag = Tag::get_by_id(($_POST[\"tag_id\"]));\n $post = Post::get($_POST[\"post_id\"]);\n if(!$post || !$tag)\n $this->redirect(\"post\",\"show\",$post->get_id());\n if(!$post->can_be_edited($user))\n throw new Exception(\"Should never happen : wrong user :O\");\n $tag->unlink_tag();\n }\n $this->redirect(\"post\",\"show\",$post->get_id());\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.6361397", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.6361397", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.6361397", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.6361397", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.6361397", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.6361397", "text": "public function remove();", "title": "" }, { "docid": "05faa19f483e3d7272a93bfec7d7c8d4", "score": "0.63575566", "text": "public function destroy(Post $post)\n {\n // Category::destroy($id);\n // PostInformation::destroy($id);\n // Post::destroy($id);\n\n\n $post->postsInformation->delete();\n $post->delete();\n $post->category->delete(); \n\n return redirect('posts');\n }", "title": "" }, { "docid": "61a657892c3b8d0d830d77248b0609a0", "score": "0.63502866", "text": "public static function deletePost($id)\n {\n self::dbConnect();\n\n $query = 'DELETE FROM ' . static::$table . ' WHERE id='. $id;\n\n $stmt = self::$dbc->prepare($query);\n // $stmt->bindValue(':id', $this->attributes['id'], PDO::PARAM_INT);\n $stmt->execute();\n }", "title": "" } ]
860c3a88c8666c16bcee281118b3fcbd
Method For change password
[ { "docid": "5af62e601254392fb4496f25f718304c", "score": "0.0", "text": "public function changePassword(){\n $this->form_validation->set_rules('new-password', 'Password', 'trim|required|min_length[5]');\n if (!$this->form_validation->run() == FALSE)\n {\n $data=array(); \n $data['password']=md5($this->input->post('new-password',true)); \n $cp=md5($this->input->post('confrim-password',true)); \n if($data['password']!=$cp){\n echo \"New Password And Confrim Password Has Not Match !\";\n }else{\n //update Password\n $id=$this->session->userdata('user_id'); \n $this->db->where('user_id',$id);\n $this->db->update('user',$data);\n echo \"true\";\n } \n }else{\n echo \"The Password field must be at least 5 characters in length\";\n } \n\n }", "title": "" } ]
[ { "docid": "3e5dbbdb953747d0469d1915bb33be29", "score": "0.89878666", "text": "protected function changePassword()\n {\n // TODO: Implement ChangePassword() method.\n }", "title": "" }, { "docid": "3b72c9892046d80be81bf10dab4cf9bf", "score": "0.86020476", "text": "public function editPassword()\n {\n // code...\n }", "title": "" }, { "docid": "fc70e53f7179efdfbc8b71c340e6940a", "score": "0.8481443", "text": "function changePassword($newPassword, $currentPassword = null);", "title": "" }, { "docid": "a65890a20b339a8e6a5162c2ca80b6f2", "score": "0.8374442", "text": "public function updatePassword(string $newPassword): void;", "title": "" }, { "docid": "9ccd7c79a4d367a9b91676490defb027", "score": "0.8358574", "text": "public function update_password( $new_password ){\n\t}", "title": "" }, { "docid": "68cbc6ac74eecf3d66075edb59f88cb1", "score": "0.83067495", "text": "public function EditPassword($password);", "title": "" }, { "docid": "46fc8bec60e46739412cd39e6c13c073", "score": "0.82897097", "text": "public function change_my_password()\n\t{\n\t\t$data = $this->Admin_self_m->admin_form();\n\t\t$this->load_my_views('Forms/password_f', $data);\n\t}", "title": "" }, { "docid": "57fc6f59ea2eb4992651147adc7fddcb", "score": "0.8259231", "text": "public function changepassword()\n {\n $this->redirect($this->Link('editprofile'));\n }", "title": "" }, { "docid": "a0d73e2ceeda4d650ac0f5f1be1a0429", "score": "0.8122368", "text": "public function changePasswordAction() {\n $this->_helper->_layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n $objCurlHandler = Engine_Utilities_CurlRequestHandler::getInstance();\n $objCore = Engine_Core_Core::getInstance();\n $objSecurity = Engine_Vault_Security::getInstance();\n $agent_id = $this->view->session->storage->agent_id;\n $this->_appSetting = $objCore->getAppSetting();\n if ($this->getRequest()->isPost()) {\n $data['agent_id'] = $agent_id;\n $data['password'] = $this->getRequest()->getPost('password');\n $data['password1'] = $this->getRequest()->getPost('password1');\n $data['password2'] = $this->getRequest()->getPost('password2');\n\n $url = $this->_appSetting->apiLink . '/agent-authentication?method=changepassword';\n $curlResponse = $objCurlHandler->curlUsingPost($url, $data);\n if ($curlResponse) {\n $this->redirect('/agent/edit-profile');\n }\n }\n }", "title": "" }, { "docid": "790eb3e8f329b6ff01b71fb22dc35f48", "score": "0.80977446", "text": "public function setPassword($data);", "title": "" }, { "docid": "7b8a488c32320a921f675baf3b486362", "score": "0.79799396", "text": "public function changePassword() {\n \n if ( $this->request->isPost() || $this->request->isPut() ) {\n \n $this->Usuario->set($this->data);\n \n if ( $this->Usuario->RegisterValidate() ) {\n \n $user = array();\n $user['Usuario']['id'] = $this->UserAuth->getUsuarioId();\n $salt = $this->UserAuth->makeSalt();\n $user['Usuario']['salt'] = $salt;\n $user['Usuario']['password'] = $this->UserAuth->makePassword($this->request->data['Usuario']['password'], $salt);\n $this->Usuario->save($user, false);\n $this->LoginToken->deleteAll(array('LoginToken.usuario_id' => $user['Usuario']['id']), false);\n $this->alert('Password changed successfully', 'success');\n $this->redirect('myprofile');\n }\n }\n }", "title": "" }, { "docid": "fab8733ddda34162854c5407399deafc", "score": "0.79681057", "text": "public function password_mod(){\n\n\t\t$id = $_SESSION['user_id'];\n\t\t$uname = $_SESSION['username'];\n\t\t$passwd = $this->model->passwd_select($id);\n\t\t$oldpasswd = osa_passwdhash(trim($_POST['oldpasswd'])).substr(osa_passwdhash(mb_substr($uname,0,2,'utf-8')),3,6);\n\t\tif($passwd == $oldpasswd){\n\t\t\t$newpasswd = osa_passwdhash(trim($_POST['newpasswd'])).substr(osa_passwdhash(mb_substr($uname,0,2,'utf-8')),3,6);\n\t\t\t$users = array(\n\t\t\t\t'oPassword'=>$newpasswd\n\t\t\t);\n\t\t\t$this->model->users_update($id,$users);\n\t\t\techo 'success';return;\n\t\t}else{\n\t\t\techo 'oldpass-error';return;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0053e5862657a68cee03cccb62225412", "score": "0.7956654", "text": "public function changepassword()\n {\n $user = '';\n $this->set('title', 'Change Password');\n $this->set('heading', 'Change Password'); \n $this->viewBuilder()->setLayout('form');\n try{\n $user = $this->AdminUsers->get($this->Auth->user('id'), [\n 'contain' => []\n ]);\n if ($this->request->is(['patch', 'post', 'put'])) {\n\n $user = $this->AdminUsers->patchEntity($user, $this->request->getData());\n if (!$user->errors()) {\n if ($this->AdminUsers->save($user)) {\n $this->Flash->success(__($this->lang_users_vars['Success']['SUC009']));\n return $this->redirect(['controller' => 'dashboard','action' => 'index']);\n }\n $this->Flash->error(__($this->lang_users_vars['Error']['ER012']));\n }\n }\n } catch (\\Exception $e) {\n $this->Common->saveErrorLog($e);\n }\n $this->set(compact('user'));\n }", "title": "" }, { "docid": "6739fca95827e8731a38f636ee416e3b", "score": "0.7938007", "text": "public function changepasswordAction()\n {\n \n $this->view->disable();\n if ($this->request->isPost()) {\n $username = $this->request->getPost('username');\n $newpassword = $this->request->getPost('newpassword');\n\n $user = Users::findFirstByUsername($username);\n if (!$user) {\n echo \"1\"; //User isn't exist \n } else {\n\n $user->password = $this->security->hash($newpassword);\n\n if (!$user->update()) {\n echo \"2\"; //Updated fail\n } else {\n // Common::recordHistories($this->auth->getName(), $this->dispatcher->getControllerName(), $this->dispatcher->getActionName(), $user, $this->auth->get('affiliate'));\n echo \"3\"; //OK\n }\n }\n } else {\n echo \"0\"; //Error\n }\n }", "title": "" }, { "docid": "e73d195c32f18bc8828efd0e9da01684", "score": "0.79105353", "text": "public function changepwAction() {\n $dvups_admin = Dvups_admin::find(getadmin()->getId());\n extract($_POST);\n if (sha1($oldpwd) == $dvups_admin->getPassword()) {\n $dvups_admin->__update(\"password\", sha1($newpwd))->exec();\n return array('success' => true, // pour le restservice\n 'redirect' => 'profile&detail=password updated successfully', // pour le web service\n 'detail' => '');\n } else {\n return array('success' => false, // pour le restservice\n 'detail' => 'mot de passe incorrect');\n }\n }", "title": "" }, { "docid": "16954693977c2364ae5e71531bb80162", "score": "0.79098564", "text": "function ChangPassword()\r\n\t\t{\r\n\t\t\t#return 1 on Success\r\n\t\t\t$jsonData['Mail'] = sanitizeMail($_GET['Mail']);\r\n\t\t\t$jsonData['OldPassword'] = $_GET['OldPassword'];\r\n\t\t\t$jsonData['NewPassword'] = $_GET['NewPassword'];\r\n\t\t\t$jsonData = json_decode(changeUserPassword(json_encode($jsonData)),true);\r\n\t\t\tif($jsonData['Report']==\"CHANGE_PASSWORD\")\r\n\t\t\t\t{\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "973675be20bc5a380ad37e29b820d05f", "score": "0.79087317", "text": "public function changePassword() {\n\t\t$contain = ['Roles'];\n\t\t$theUser = $this->Users->get($this->authUser['id'], compact('contain'));\n\t\tif ($this->request->is(['post', 'put'])) {\n\t\t\t$data = $this->request->getData();\n\t\t\t$theUser->set('currentPassword', $data['Users']['currentPassword']);\n\t\t\t$theUser->set('password', $data['Users']['newPassword']);\n\t\t\tif ($this->Users->save($theUser)) {\n\t\t\t\t$message = 'Your password was changed successfully.';\n\t\t\t\t$this->Flash->success(__($message));\n\t\t\t\treturn $this->redirect($this->request->referer());\n\t\t\t}\n\t\t\t$message = 'We were not able to change your password. Fix your shit and try again.';\n\t\t\t$this->Flash->error(__($message));\n\t\t}\n\t\t$this->set(compact('theUser'));\n\t}", "title": "" }, { "docid": "901f634c9d855dde3ecccc1003e249f0", "score": "0.7907528", "text": "public function changePassword()\n {\n $id = $this->session->id;\n $data['agents'] = $this->App_model->get_onces($id, 'tb_doc_assets', 'id_asset');\n\n $data['title'] = \"Modification du mot de passe utilisateur\";\n\n $type=$this->uri->segment(1);\n if ($type=='manager'){\n $this->load->view('manager/header', $data);\n $this->load->view('manager/change_password', $data);\n $this->load->view('manager/footer', $data);\n }else{\n $this->load->view('includes/header', $data);\n $this->load->view('app/profil/change_password', $data);\n $this->load->view('includes/footer', $data);\n }\n }", "title": "" }, { "docid": "55b68552d11585e12e175c8a7574aca3", "score": "0.7903299", "text": "public function changePassword()\n {\n\n //check whether the hash is available in db\n if (isset($_GET['email']) && isset($_GET['h'])) {\n if ($this->login->changePassword() == 1) {\n Header('Location: /Ambula/login/success?password_changed');\n } else {\n //handle\n }\n }\n }", "title": "" }, { "docid": "0404d68e42c4314a03e6745ae19df4b0", "score": "0.7903147", "text": "public function changePassword() {\n\t\t$data['admin'] = $this->Manage_model->getAdminData();\n\t\t$data['title'] = $data['admin']['name'];\n\n\t\t$config = array(\n\t\t\t[\n\t\t\t\t'field' => 'oldPassword',\n\t\t\t\t'label' => 'Old Password',\n\t\t\t\t'rules' => 'required'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'field' => 'newPassword',\n\t\t\t\t'label' => 'New Password',\n\t\t\t\t'rules' => ['required', 'min_length[6]', 'max_length[20]']\n\t\t\t]\n\t\t);\n\t\t$this->form_validation->set_rules($config);\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$this->load->view('templates/header', $data);\n\t\t\t$this->load->view('templates/manage/header');\n\t\t\t$this->load->view('manage/profile/change_password');\n\t\t\t$this->load->view('templates/manage/footer');\n\t\t} else {\n\t $this->Manage_model->changePassword();\n\t\t}\n\t}", "title": "" }, { "docid": "32173ca1a06cad9a01eec93bebf86a81", "score": "0.7902102", "text": "public function changePassword_action()\n {\n $result = PasswordResetModel::changePassword(\n Session::get('user_name'), Request::post('user_password_current'),\n Request::post('user_password_new'), Request::post('user_password_repeat')\n );\n\n if($result)\n Redirect::to('user/index');\n else\n Redirect::to('user/changePassword');\n }", "title": "" }, { "docid": "32854f5a2f8599cbe4d7c4a231c302e6", "score": "0.7882325", "text": "public function change_password() {\n $_POST = Gump::sanitize($_POST);\n\n if (isset($_POST['password'])) {\n\n //Validate data using Gump\n $is_valid = Gump::is_valid($_POST, array(\n 'current_password' => 'required', //|max_len,18|min_len,6\n 'password' => 'required', //|max_len,18|min_len,6\n 'password-again' => 'required' //|max_len,18|min_len,6\n ));\n\n if ($is_valid === true) {\n $user = $this->userSQL->find(Session::get('id'));\n\n if (Password::verify($_POST['current_password'], $user->password) === true) {\n if ($_POST['password'] != $_POST['password-again']) {\n $error[] = 'Les deux mots de passe ne sont pas identiques';\n }\n } else {\n $error[] = 'mot de passe courant incorrect';\n }\n } else {\n // $is_valid holds an array for the errors.\n $error = $is_valid;\n }\n if (!$error) {\n $user->password = Password::make($_POST['password']);\n EntityManager::getInstance()->save($user);\n Session::set('message', 'Votre mot de passe a bien été mis à jour');\n Url::redirect();\n\n }\n }\n\n $data['title'] = 'Change Password';\n View::rendertemplate('header', $data);\n View::renderModule('User/Views/modification', $data, $error);\n View::rendertemplate('footer', $data);\n\n }", "title": "" }, { "docid": "ff740c14d252c617178c6dc0cf4f648b", "score": "0.7870097", "text": "public function change_password()\n {\n Application::addStylesheet(\"css/login.css\"); \n Application::$template = \"login.tpl\";\n Application::setTitle(\"Change Password\");\n\n $form = new Form();\n $form->setRenderer(\"default\");\n $password = new PasswordField(\"Password\", \"password\");\n $password->setEncrypted(false);\n $form->add($password);\n\n $passwordRetype = new PasswordField(\"Retype Password\", \"password2\");\n $passwordRetype->setEncrypted(false);\n $form->add($passwordRetype);\n $form->setValidatorCallback($this->getClassName() . \"::change_password_callback\");\n $form->setShowClear(false);\n $form = $form->render();\n\n return \"<h2>Change Password</h2>\"\n . \"<p>It appears that this is the first time you are logging in. \"\n . \"Please change your password.</p> $form\";\n }", "title": "" }, { "docid": "b9ccc09c1f10e215a4e8d21f1db9a264", "score": "0.78609043", "text": "public function actionChangepwd() {\r\n $data = $_POST;\r\n $currentUser = Yii::app()->user->userModel;\r\n if (!CPasswordHelper::verifyPassword($data['current_password'], $currentUser->password)) {\r\n die('Current password is not correct.');\r\n }\r\n $user = User::model()->findByPK($currentUser->id);\r\n $user->password = CPasswordHelper::hashPassword($data['password']);\r\n $user->save();\r\n die('TRUE');\r\n }", "title": "" }, { "docid": "742571dff90b9929df2369572fd940ec", "score": "0.78488994", "text": "public function changePwd($password){\r\n\t\t$this->TABLE_USER-> changePwd(md5($this->test_input($password)), unserialize($_SESSION['user'])->__GET('username'));\r\n\t}", "title": "" }, { "docid": "409ff26c8824873a35e8f292693a3e68", "score": "0.7844617", "text": "public function changePasswordAction() {\n\n\t\trequire $_SERVER['DOCUMENT_ROOT'].'/school'.'/model/staffIdentityItem.php';\n\n\t\t$identify = new staffIdentityItem();\n\t\t$this->util_->requireArg('OP', $_POST);\n\t\t$this->util_->requireArg('NP', $_POST);\n\t\t$req = array();\n\t\t$req[0] = array('key' => 'Sta_ID', 'Sta_ID' => $_POST['Account']);\n\t\t$identify->Sta_ID = $_POST['Account'];\n\t\t$arg = array('Password');\n\t\t$res = $identify->search($req, $arg);\n\t\t\n\t\tif($res[0]['Password'] != $_POST['OP']) {\n\t\t\tthrow new Exception('Password wrong');\n\t\t}\n\n\t\t$arg1 = array('Password' => $_PSOT['NP']);\n\t\t$identify->update($arg1);\n\n\t}", "title": "" }, { "docid": "4aae73511c2bb3efca5585b67fd6e00b", "score": "0.7838299", "text": "private function editPassword()\n {\n $accounts =$this->loadAccounts();\n $this->println(\"Edit which password (index): \");\n $index = readline();\n \n $name = readline(\"Please enter the new account name (blank=no change): \");\n $username = readline(\"Please enter the new username (blank=no change): \");\n \n $this->println(\"Please enter the new password (blank=no change): \");\n $password = $this->getPasswordFromUserInput();\n \n $accounts[$index]->updateDetails($name, $username, $password);\n \n $this->saveAccounts($accounts);\n }", "title": "" }, { "docid": "e14adee0acc662171175a9b53bac06b7", "score": "0.7823839", "text": "public static function ChangePassword(){\n if(Session::CheckAuthentication()){ \n $sCurrentPassword = Storage::Get(\"put.currentpassword\"); \n $sNewPassword = Storage::Get(\"put.newpassword\"); \n $sReNewPassword = Storage::Get(\"put.renewpassword\"); \n \n if(empty($sCurrentPassword) || empty($sNewPassword)){\n ioBackendController::ReturnAjax(false, \"Senha atual ou nova senha inválidas.\");\n }\n else if($sNewPassword != $sReNewPassword){\n ioBackendController::ReturnAjax(false, \"A nova senha não é igual a sua repetição, por favor digite novamente.\");\n }\n else{ \n $oDb = Db::backend();\n $oDb->administrators->Select(\"id\")\n ->Filter(\"email\", Storage::Get(\"user.username\"))\n ->Filter(\"password\", sha1($sCurrentPassword))\n ->Filter(\"active\", 1)\n ->Limit(1)\n ->Execute(function($aData, $mError){\n if(is_array($aData)){\n if(count($aData) > 0){\n $oDb = Db::backend();\n $oDb->administrators->Update(array(\"password\" => sha1(Storage::Get(\"put.newpassword\"))), array(\"id\" => $aData[0][\"id\"]), 1, function($mData, $mError){\n if($mData)\n maBackendController::ReturnAjax(true);\n else\n maBackendController::ReturnAjax(false, $mError);\n });\n }\n else{\n maBackendController::ReturnAjax(false, \"A senha atual não é válida.\");\n }\n }\n else{\n maBackendController::ReturnAjax(false, \"A senha atual não é válida.\");\n }\n });\n }\n }\n else{\n ioBackendController::ReturnAjax(false, Storage::Get(\"lng.session.expired\"));\n }\n }", "title": "" }, { "docid": "6795364f02e5ae9fdc673e225364dd39", "score": "0.78202933", "text": "public function adminChangePassword()\n\t{\n\t\t$this->loadView('AdminChangePassword');\n\t}", "title": "" }, { "docid": "0f32f7ea2984a21eadaf19270c6e0ee8", "score": "0.78131366", "text": "public function changePW()\n {\n\n $User = User::find(Auth::user()->id);\n\n if (Hash::check(Input::get('passwordold'), $User['password']) && Input::get('password') == Input::get('password_confirmation')) {\n $User->password = bcrypt(Input::get('password'));\n $User->save();\n return back();\n }\n return \"not working\";\n }", "title": "" }, { "docid": "2b7e4b065827de29c2b5a4ff59bdf0e4", "score": "0.7811381", "text": "public function changePasswordAction()\n {\n if(!$this->zfcUserAuthentication()->hasIdentity())return $this->redirect()->toRoute('home');\n $current_user_id =$this->zfcUserAuthentication()->getIdentity()->getId();\n $user_id = (int) $this->params()->fromRoute('id', 0);\n $request = $this->getRequest();\n if (!$user_id &&!is_int($user_id)) return $this->redirect()->toRoute('administrator', array('action' => 'usermanager'));\n \n try {\n \n $password = $request->getPost('password');\n $this->getUserTable()->changePassword($user_id,$password);\n $this->flashMessenger()->addSuccessMessage('User password update Successfully !');\n return $this->redirect()->toRoute('administrator', array('controller' => 'administrator', 'action' => 'usermanager'));\n }catch (\\Exception $ex){\n return $this->redirect()->toRoute('administrator', array(\n 'action' => 'usermanager'\n ));\n }\n }", "title": "" }, { "docid": "37812a7668e615af9ffacd2e48a1c295", "score": "0.7806128", "text": "public function changePassword()\n\t{\n\t\t//print_r($_POST);die;\n\t\t$currentPassword = strip_tags($_POST['currentPassword']);\n\t\t$newPassword \t = strip_tags($_POST['newPassword']);\n\t\t$confirmPassword = strip_tags($_POST['confirmPassword']);\n\t\t$temp=$this->loadModel(\"AdminHome\",\"validateUser\",array(\"password\"=>$currentPassword));\n\t\t\n\t\tif($temp)\n\t\t{\n\t\t\tif ($newPassword == $confirmPassword)\n\t\t\t{\n\t\t\t\tif(strlen($newPassword)>PASSWORD_LENGTH)\n\t\t\t\t{\n\t\t\t\t\t$temp=$this->loadModel(\"AdminHome\",\"changePassword\",$newPassword);\n\t\t\t\t\tif($temp)\n\t\t\t\t\t{\n\t\t\t\t\t\techo PASSWD_CHANGE_MSG ;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo PASSWD_CHANGE_FAILED_MSG ;\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\techo PASSWORD_SIZE_ERROR ;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo PASSWORD_MISMATCH_ERROR ;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo WRONG_PASSWORD_ERROR ;\n\t\t}\n\t}", "title": "" }, { "docid": "0082e192acfab67741efe49fe3fd8f82", "score": "0.7798067", "text": "function action_changePassword()\n{\n\t$oObj = new class_DL_bruker();\n\t$oBruker = new data_bruker();\n\n\t$iBrukerId = intval(class_util::post(\"userid\", 0));\n\t$sOldPassword = class_util::post(\"passwordold\", \"\");\n\t$sNewPassword = class_util::post(\"passwordnew\", \"\");\n\t\n\t$oRes = $oObj->get_user($iBrukerId);\n\t$aBruker = $oRes->aData;\n\tif (count($aBruker) > 0)\n\t\t$sPassordHash = $aBruker[0][\"Passord\"];\n\t\n\t$bAllowChangePassword = false;\n\t// sjekke om \n\tif (password_verify($sOldPassword, $sPassordHash) && $aBruker[0][\"Aktiv\"]) { // sjekk eom passord er rikitg og om bruker er aktiv\n\t\t$bAllowChangePassword = true;\n\t\t\n\t\t$oRes = $oObj->update_password($iBrukerId, password_hash($sNewPassword, PASSWORD_DEFAULT));\n\t\t$aBruker = $oRes->aData;\n\t} \n\t\n\techo json_encode($bAllowChangePassword);\n}", "title": "" }, { "docid": "371db61bd8503f54fd3e933b56f3aafb", "score": "0.7793291", "text": "public function updatePassword()\n {\n echo $this->profile->updatePassword();\n }", "title": "" }, { "docid": "48be95ce71812cf430216b7067f0d5f8", "score": "0.7789784", "text": "public function changePassword() {\n\t\t$this->layout->content = View::make('admin.users.change_password');\n\t}", "title": "" }, { "docid": "abd39b6f1b33d50e5ea37553188c2ffa", "score": "0.7764102", "text": "public function fn_change_passsword()\n {\n $arrInput = request()->all();\n $this->validate(request(), [\n 'password' => 'required|confirmed|min:6|max:20', \n ]);\n try {\n Auth::user()->password = bcrypt ($arrInput['password']);\n Auth::user()->save();\n Flash::success(trans('label.passwordupdate'))->important();\n } catch (Exception $e) {\n Flash::error(trans('label.database_error'))->important();\n return redirect()->back();\n }\n return redirect('/home');\n }", "title": "" }, { "docid": "0e789ba6fca02a1b98090eeabfab89bb", "score": "0.7763915", "text": "public function changePassword()\n\t{\n\t\trequire 'Vue/blog/vueChangePassword.php';\n\t}", "title": "" }, { "docid": "3db99d27898ba0f2786291795eb55c11", "score": "0.77625877", "text": "public function changePasswordAction()\n {\n $this->view->setTemplateBefore('cobaprivate');\n $form = new ChangePasswordForm();\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = $this->auth->getUser();\n\n $user->password = $this->security->hash($this->request->getPost('password'));\n $user->mustChangePassword = 'N';\n\n $passwordChange = new PasswordChanges();\n $passwordChange->user = $user;\n $passwordChange->ipAddress = $this->request->getClientAddress();\n $passwordChange->userAgent = $this->request->getUserAgent();\n\n if (!$passwordChange->save()) {\n $this->flash->error($passwordChange->getMessages());\n } else {\n\n // $this->flash->success('Your password was successfully changed');\n\n Tag::resetInput();\n\n $this->flashSess->success(\"Your password was successfully changed\");\n $this->view->disable();\n $this->auth->remove();\n\n return $this->response->redirect('session/login');\n }\n }\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "e14ae017629b6b7129574a1b50dfdbc8", "score": "0.77568537", "text": "public function changePassword()\n\t{\n\t\tif(!Sentry::check()) return \\Redirect::to('course');\n\n\t\tif (\\Input::isPost()) {\n\t\t\tif (\\Security::CSRFvalid('password')) {\n\n\t\t\t\ttry {\n\t\t\t\t $user = Sentry::getUser();\n\n\t\t\t\t $oldPassword = \\Input::get('oldPassword');\n\t\t\t\t $newPassword = \\Input::get('newPassword');\n\t\t\t\t $confPassword = \\Input::get('confPassword');\n\n\t\t\t\t if($user->checkPassword($oldPassword)) {\n\n\t\t\t\t if ($newPassword == $confPassword) {\n\t\t\t\t \t \t$user->password = $newPassword;\n\t\t\t\t \t \tif ($user->save()) {\n\t\t\t\t \t \t\t\\Flash::success('Password successfully changed.');\n\t\t\t\t \t \t\treturn \\Redirect::to('course/profile');\n\t\t\t\t \t \t} else {\n\t\t\t\t \t \t\t\\Flash::error('Error while changing password.');\n\t\t\t\t \t \t}\n\t\t\t\t \t\t\n\t\t\t\t } else {\n\t\t\t\t \t\t\\Flash::error('Password does not match.');\n\t\t\t\t }\n\t\t\t\t } else {\n\t\t\t\t \\Flash::error('Old Password does not match.');\n\t\t\t\t }\n\t\t\t\t} catch (\\Cartalyst\\Sentry\\Users\\UserNotFoundException $e) {\n\t\t\t\t \\Flash::error('User does not exit');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\\Flash::error('CSRF Key does not match.');\n\t\t\t}\t\t\t\n\t\t}\n\n\t\t$this->template->title('Change Password')\n\t\t\t->breadcrumb('Profile', rbUrl('course/profile'))\n\t\t\t->breadcrumb('Change Password')\n\t\t\t->setPartial('student-password');\t\n\t}", "title": "" }, { "docid": "16caf2f35bb9ff68888878b05f6a2f7b", "score": "0.7745865", "text": "public function actionChangePassword()\n {\n // get user details\n $user = $this->findModel(Yii::$app->user->id);\n\n\n // load user data with role and validate them\n if ($user->load(Yii::$app->request->post()) && Model::validateMultiple([$user]))\n {\n // only if user entered new password we want to hash and save it\n if ($user->password)\n {\n $user->setPassword($user->password);\n }\n\n // if admin is activating user manually we want to remove account activation token\n if ($user->status == User::STATUS_ACTIVE && $user->account_activation_token != null)\n {\n $user->removeAccountActivationToken();\n }\n\n $user->save(false);\n Yii::$app->session->setFlash('success','Password updated successfully! .');\n return $this->redirect(['index']);\n }\n else\n {\n return $this->render('update-pass', [\n 'user' => $user\n ]);\n }\n }", "title": "" }, { "docid": "551673335c0925c226f08c865727363e", "score": "0.7745527", "text": "function updatePassword($id, $password);", "title": "" }, { "docid": "a67ce6a8c615949b5401a819dc6084fd", "score": "0.77438694", "text": "public function changePassword(User $user, $password);", "title": "" }, { "docid": "3afcfc098e8c79c1ce0c15a03420660f", "score": "0.77141404", "text": "function change_password()\n {\n // if( ($this->dx_auth->is_logged_in()) || ($this->facebook_lib->logged_in()) || ($this->twitter->is_logged_in()))\n if (($this->dx_auth->is_logged_in()) || ($this->facebook_lib->logged_in()))\n {\n $val = $this->form_validation;\n // Set form validation\n $val->set_rules('old_password', 'Old Password', 'required|trim|xss_clean|min_length[' . $this->min_password . ']|max_length[' . $this->max_password . ']|callback__check_password');\n $val->set_rules('new_password', 'New Password', 'required|trim|xss_clean|min_length[' . $this->min_password . ']|max_length[' . $this->max_password . ']|matches[confirm_new_password]');\n $val->set_rules('confirm_new_password', 'Confirm new Password', 'required|trim|xss_clean');\n\n // Validate rules and change password\n /* \tif ($val->run() AND $this->dx_auth->change_password($val->set_value('old_password'), $val->set_value('new_password')))\n {\n $admin_email = $this->dx_auth->get_site_sadmin();\n $admin_name = $this->dx_auth->get_site_title();\n\n $email_name = 'reset_password';\n $splVars = array(\"{site_name}\" => $this->dx_auth->get_site_title(), \"{password}\" => $val->set_value('new_password'));\n\n //Send Mail\n $this->Email_model->sendMail($this->dx_auth->get_emailId(), $admin_email, ucfirst($admin_name), $email_name, $splVars);\n\n $this->session->set_flashdata('flash_message', $this->Common_model->flash_message('success','Your password has successfully been changed.'));\n redirect('users/change_password/'.$this->dx_auth->get_user_id());\n } */\n if ($val->run())\n {\n $result = $this->db->where('id', $this->dx_auth->get_user_id())->from('users')->get();\n\n $old_pass = $this->_check_password($this->input->post('old_password'));\n\n if ($result->num_rows() != 0)\n {\n if ($old_pass == 1)\n {\n $new_pass = crypt($this->dx_auth->_encode($this->input->post('new_password')));\n $this->db->where('id', $this->dx_auth->get_user_id())->update('users', array('password' => $new_pass));\n\n $admin_email = $this->dx_auth->get_site_sadmin();\n $admin_name = $this->dx_auth->get_site_title();\n\n $email_name = 'reset_password';\n $splVars = array(\"{site_name}\" => $this->dx_auth->get_site_title(), \"{password}\" => $val->set_value('new_password'));\n\n //Send Mail\n $this->Email_model->sendMail($this->dx_auth->get_emailId(), $admin_email, ucfirst($admin_name), $email_name, $splVars);\n\n $this->session->set_flashdata('flash_message', $this->Common_model->flash_message('success', translate('Your password has successfully been changed.')));\n redirect('users/change_password/' . $this->dx_auth->get_user_id());\n }\n }\n }\n else\n {\n $data['title'] = get_meta_details('Change_Password', 'title');\n $data[\"meta_keyword\"] = get_meta_details('Change_Password', 'meta_keyword');\n $data[\"meta_description\"] = get_meta_details('Change_Password', 'meta_description');\n\n $data['message_element'] = 'users/view_change_password';\n $this->load->view('template', $data);\n }\n }\n else\n {\n // Redirect to login page\n redirect('users/signin');\n }\n }", "title": "" }, { "docid": "3fa07b944b7fa66d795e2a4f57b48e0c", "score": "0.7705956", "text": "public function updatePassword()\n {\n if (MODE_DEMO) {\n $this->messages->add('i', _('in demo mode, you can\\'t update your password'));\n Tools::logm('in demo mode, you can\\'t do this');\n Tools::redirect('?view=config');\n }\n else {\n if (isset($_POST['password']) && isset($_POST['password_repeat'])) {\n if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != \"\") {\n $this->messages->add('s', _('your password has been updated'));\n $this->store->updatePassword($this->user->getId(), Tools::encodeString($_POST['password'] . $this->user->getUsername()));\n Session::logout();\n Tools::logm('password updated');\n Tools::redirect();\n }\n else {\n $this->messages->add('e', _('the two fields have to be filled & the password must be the same in the two fields'));\n Tools::redirect('?view=config');\n }\n }\n }\n }", "title": "" }, { "docid": "ed2178bb1bc9649773dda9aac10913c4", "score": "0.7688072", "text": "protected function changePassword() {\n\t\t$eventData = $_GET['tx_hevents_pi1'];\n\t\t$subpartArray = ($linkpartArray = array());\n\t\t$done = FALSE;\n\t\t$minLength = (int)$this->conf['newPasswordMinLength'] ?: 6;\n\t\t$subpart = $this->cObj->getSubpart($this->template, '###TEMPLATE_CHANGEPASSWORD###');\n\t\t$markerArray['###STATUS_HEADER###'] = $this->getDisplayText('change_password_header', $this->conf['changePasswordHeader_stdWrap.']);\n\t\t$markerArray['###STATUS_MESSAGE###'] = sprintf($this->getDisplayText(\n\t\t\t\t'change_password_message',\n\t\t\t\t$this->conf['changePasswordMessage_stdWrap.']\n\t\t), $minLength);\n\t\n\t\t$markerArray['###BACKLINK_LOGIN###'] = '';\n\t\t$uid = $this->piVars['user'];\n\t\t$piHash = $this->piVars['forgothash'];\n\t\t$hash = explode('|', $piHash);\n\t\tif ((int)$uid === 0) {\n\t\t\t$markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText(\n\t\t\t\t\t'change_password_notvalid_message',\n\t\t\t\t\t$this->conf['changePasswordNotValidMessage_stdWrap.']\n\t\t\t);\n\t\t\t$subpartArray['###CHANGEPASSWORD_FORM###'] = '';\n\t\t} else {\n\t\t\t$user = $this->pi_getRecord('fe_users', (int)$uid);\n\t\t\t$userHash = $user['felogin_forgotHash'];\n\t\t\t$compareHash = explode('|', $userHash);\n\t\t\tif (!$compareHash || !$compareHash[1] || $compareHash[0] < time() || $hash[0] != $compareHash[0] || md5($hash[1]) != $compareHash[1]) {\n\t\t\t\t$markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText(\n\t\t\t\t\t\t'change_password_notvalid_message',\n\t\t\t\t\t\t$this->conf['changePasswordNotValidMessage_stdWrap.']\n\t\t\t\t);\n\t\t\t\t$subpartArray['###CHANGEPASSWORD_FORM###'] = '';\n\t\t\t} else {\n\t\t\t\t// All is fine, continue with new password\n\t\t\t\t$postData = GeneralUtility::_POST($this->prefixId);\n\t\t\t\tif (isset($postData['changepasswordsubmit'])) {\n\t\t\t\t\tif (strlen($postData['password1']) < $minLength) {\n\t\t\t\t\t\t$markerArray['###STATUS_MESSAGE###'] = sprintf($this->getDisplayText(\n\t\t\t\t\t\t\t\t'change_password_tooshort_message',\n\t\t\t\t\t\t\t\t$this->conf['changePasswordTooShortMessage_stdWrap.']),\n\t\t\t\t\t\t\t\t$minLength\n\t\t\t\t\t\t);\n\t\t\t\t\t} elseif ($postData['password1'] != $postData['password2']) {\n\t\t\t\t\t\t$markerArray['###STATUS_MESSAGE###'] = sprintf($this->getDisplayText(\n\t\t\t\t\t\t\t\t'change_password_notequal_message',\n\t\t\t\t\t\t\t\t$this->conf['changePasswordNotEqualMessage_stdWrap.']),\n\t\t\t\t\t\t\t\t$minLength\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$newPass = $postData['password1'];\n\t\t\t\t\t\tif ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['password_changed']) {\n\t\t\t\t\t\t\t$_params = array(\n\t\t\t\t\t\t\t\t\t'user' => $user,\n\t\t\t\t\t\t\t\t\t'newPassword' => $newPass\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['password_changed'] as $_funcRef) {\n\t\t\t\t\t\t\t\tif ($_funcRef) {\n\t\t\t\t\t\t\t\t\tGeneralUtility::callUserFunction($_funcRef, $_params, $this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$newPass = $_params['newPassword'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Save new password and clear DB-hash\n\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery(\n\t\t\t\t\t\t\t\t'fe_users',\n\t\t\t\t\t\t\t\t'uid=' . $user['uid'],\n\t\t\t\t\t\t\t\tarray('password' => $newPass, 'felogin_forgotHash' => '', 'tstamp' => $GLOBALS['EXEC_TIME'])\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText(\n\t\t\t\t\t\t\t\t'change_password_done_message',\n\t\t\t\t\t\t\t\t$this->conf['changePasswordDoneMessage_stdWrap.']\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$done = TRUE;\n\t\t\t\t\t\t$subpartArray['###CHANGEPASSWORD_FORM###'] = '';\n\t\t\t\t\t\t$markerArray['###BACKLINK_LOGIN###'] = $this->getPageLink(\n\t\t\t\t\t\t\t\t$this->pi_getLL('ll_forgot_header_backToLogin', '', TRUE),\n\t\t\t\t\t\t\t\tarray($this->prefixId . '[redirectReferrer]' => 'off')\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$done) {\n\t\t\t\t\t// Change password form\n\t\t\t\t\tif( !empty( $eventData ) ){\n\t\t\t\t\t\t$markerArray['###ACTION_URI###'] = $this->pi_getPageLink($GLOBALS['TSFE']->id, '', array(\n\t\t\t\t\t\t\t\t$this->prefixId . '[user]' => $user['uid'],\n\t\t\t\t\t\t\t\t'tx_hevents_pi1[event]' => $eventData['event'],\n\t\t\t\t\t\t\t\t'tx_hevents_pi1[date]' => $eventData['date'],\n\t\t\t\t\t\t\t\t'tx_hevents_pi1[action]' => $eventData['action'],\n\t\t\t\t\t\t\t\t'tx_hevents_pi1[controller]' => $eventData['controller'],\n\t\t\t\t\t\t\t\t$this->prefixId . '[forgothash]' => $piHash\n\t\t\t\t\t\t));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$markerArray['###ACTION_URI###'] = $this->pi_getPageLink($GLOBALS['TSFE']->id, '', array(\n\t\t\t\t\t\t\t\t$this->prefixId . '[user]' => $user['uid'],\n\t\t\t\t\t\t\t\t$this->prefixId . '[forgothash]' => $piHash\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\t\t\t\t\t$markerArray['###LEGEND###'] = $this->pi_getLL('change_password', '', TRUE);\n\t\t\t\t\t$markerArray['###NEWPASSWORD1_LABEL###'] = $this->pi_getLL('newpassword_label1', '', TRUE);\n\t\t\t\t\t$markerArray['###NEWPASSWORD2_LABEL###'] = $this->pi_getLL('newpassword_label2', '', TRUE);\n\t\t\t\t\t$markerArray['###NEWPASSWORD1###'] = $this->prefixId . '[password1]';\n\t\t\t\t\t$markerArray['###NEWPASSWORD2###'] = $this->prefixId . '[password2]';\n\t\t\t\t\t$markerArray['###STORAGE_PID###'] = $this->spid;\n\t\t\t\t\t$markerArray['###SEND_PASSWORD###'] = $this->pi_getLL('change_password', '', TRUE);\n\t\t\t\t\t$markerArray['###FORGOTHASH###'] = $piHash;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->cObj->substituteMarkerArrayCached($subpart, $markerArray, $subpartArray, $linkpartArray);\n\t}", "title": "" }, { "docid": "70ba501b7d71fb4ea22a583eab76454c", "score": "0.7687869", "text": "public function changePassword()\n {\n /*\n * Disabled by Config\n */\n if(!$this->config->item('allow_change_password')) {\n show_404();\n }\n\n $new_password = trim($this->input->post('new_password'));\n $repeat_password = trim($this->input->post('repeat_password'));\n\n /*\n * New password is short\n */\n if(!isset($new_password[5])) {\n $this->application->_sendAJAX(array('error' => $this->lang->line('settings_wrong_new_password')));\n }\n\n /*\n * Passwords not equal\n */\n elseif($new_password !== $repeat_password) {\n $this->application->_sendAJAX(array('error' => $this->lang->line('settings_not_equal')));\n }\n\n /*\n * Old password required\n */\n elseif($this->config->item('old_password_required')\n && (is_null($l = $this->vinc_auth->_('social_login'))\n || empty($l)\n || $this->vinc_auth->_('last_change') > 0)\n && (strlen($old_password = trim($this->input->post('old_password'))) < 6\n || $this->vinc_auth->makeHash($old_password, $this->vinc_auth->_('salt')) !== $this->vinc_auth->_('hash'))\n ) {\n $this->application->_sendAJAX(array('error' => $this->lang->line('settings_wrong_password')));\n }\n\n /*\n * Generate salt, hash password\n */\n $this->load->helper('string');\n $salt = random_string('alnum', 6);\n $hash = $this->vinc_auth->makeHash($new_password, $salt);\n\n /*\n * Update info\n */\n $this->db->where('id', $this->vinc_auth->_('id'))\n ->update('users', array('hash' => $hash,\n 'salt' => $salt,\n 'last_change' => $_SERVER['REQUEST_TIME'],));\n\n $this->vinc_auth->destroySession();\n $this->vinc_auth->setSession($this->vinc_auth->_('id'), $hash, (boolean) get_cookie('user_id'));\n $this->application->_sendAJAX(array('success' => $this->lang->line('settings_saved')));\n }", "title": "" }, { "docid": "31d8bfcf01d02aa68701108d4e7a6fcd", "score": "0.76860684", "text": "public function password_change()\n\t{\n\t\t$this->seesion_set();\n\n\t\t//$data=$_POST;\n\t\tif($this->session->userdata('username-admin') || $this->input->cookie('username-admin', false)){\n\t\t\t$permission = $this->permission();\n\t\t\tif(($this->session->userdata('role-admin') == 'admin') || ($permission == \"access\")) {\n\t\t\t\t$this->load->view('admin-change-password');\n\t\t\t}else{\n\t\t\t\tredirect('admin/not_admin');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('admin/index');\n\t\t}\n\t}", "title": "" }, { "docid": "6be42b3478a7294791c3c90df1a9f41f", "score": "0.76848376", "text": "protected function ChangePassword()\n {\n if(CHelper::IsPost())\n {\n //POST\n $model = new UserModel(\"ChangePassword\", true);\n\n //Error checking\n if($model->hasError())\n {\n $model->setPageTitle('User Settings');\n $this->ReturnViewByName(\"settings\", $model->view, \"layout\");\n exit();\n }\n\n $this->Redirect('user', 'settings');\n }\n }", "title": "" }, { "docid": "b9f865560d72b89c7473a161a37e160e", "score": "0.7673198", "text": "public function editPassword(){\n\t\t$this->objView->strTitle = \"Cambiar Password\";\n\t\t$this->objView->renderView('password');\n\t}", "title": "" }, { "docid": "e7091c53d7a903ca8e0917c814426fb3", "score": "0.76706856", "text": "public function changepassword(){\n //ensure admin is loggedin\n $admin = $this->isadmin();\n $this->set('admin', $admin);\n $users_table = TableRegistry::get('Users');\n $user = $users_table->find()->where(['user_id' => $this->Auth->user('id')])->first();\n if ($this->request->is(['patch', 'post', 'put'])) {\n \n $user = $users_table->patchEntity($user, $this->request->getData());\n if ($users_table->save($user)) {\n $this->Flash->success(__('Your Password has been updated successfully.'));\n\n return $this->redirect(['action' => 'myprofile',$admin->id]);\n }\n $this->Flash->error(__('Sorry, unable to change password. Please, try again.'));\n }\n $this->set(compact('user'));\n \n $this->viewBuilder()->setLayout('backend');\n }", "title": "" }, { "docid": "2caf694a52f3be5e0953e2929683b997", "score": "0.7657798", "text": "public function changePassword()\n {\n return view('/auth.passwords.change_password');\n }", "title": "" }, { "docid": "5ac617a046c1655ea7211b5bc8751503", "score": "0.7641574", "text": "function can_change_password() {\r\n return true;\r\n }", "title": "" }, { "docid": "79bc78d7d16888708ac2531868c904aa", "score": "0.7634289", "text": "public function changePassword(){\n return view('user.changePassword');\n }", "title": "" }, { "docid": "a896cd43b5759504ee7e18b91b2e4d77", "score": "0.760336", "text": "public function setPassword($p) { $this->password = $p; }", "title": "" }, { "docid": "23d239b0082a49d142331b3bb321047a", "score": "0.75980407", "text": "public function change_password(){\n \t//load session library\n\t\t$this->load->library('session');\n if($this->session->userdata('#_AID_SUA')){\n $page_data['adminstrator'] = $this->session->userdata('#_AID_SUA');\n\n $pagePath = 'adminstrator/password';\n $secondpagePath = '';\n\n $page_data['maintitle'] = \"Instructor\";\n $page_data['title'] = \"Home\";\n $page_data['subtitle'] = \"Change password\";\n\t\t\t\n\t\t\t\n\t\t\t$this->top_Content($page_data);\n $this->navigation($page_data);\n $this->sideNav($pagePath,$secondpagePath);\n $this->load->view('adminstrator/change_password', $page_data);\n\t \t\t$this->bottom_content($page_data);\n\t\t}else{\n\t\t\tredirect('Home');\n\t\t}\n }", "title": "" }, { "docid": "f4e2dffbb50989ebb2e27a92a249a99f", "score": "0.75976413", "text": "public function changePassword(){\n return view('Backend.users.change-password');\n }", "title": "" }, { "docid": "42a3b942135d0668c69e4197958b0bf4", "score": "0.75915724", "text": "public function post_change_password()\n\t{\n\t\t$rules = array(\n\t\t\t'password'\t=> 'required|confirmed|min:'.PASSWORD_MIN_LENGTH\n\t\t);\n\n\t\t$validation = Validator::make(Input::all(), $rules);\n \tif ($validation->fails())\n \t{\n \t\treturn Redirect::to(Redact::admin().'change_password')->with_errors($validation);\n \t}\n \telse\n \t{\n \t\t$user_id = (int)Session::get(Config::get('sentry::sentry.session.user'));\n\t\t\t$password = Input::get('password');\n\n\t\t\t// We use a Sentry user so that it will hash the password for us.\n\t\t\t$sentry_user = Sentry::user($user_id);\n\t\t\t$sentry_user->update(array('password' => $password));\n\t\t\t// $user = User::find($user_id);\n\t\t\t// $user->force_change_password = 0;\n\t\t\t// $user->save();\n\n\t\t\tDB::table('users')\n\t\t\t\t->where('id', '=', $user_id)\n\t\t\t\t->update(array(\n\t\t\t\t\t'force_change_password' => 0\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn Redirect::to(Redact::admin())->with('message', 'Your password has been successfully updated.');\n\t\t}\n\t}", "title": "" }, { "docid": "7b39a47fdc390715921e71041045a64a", "score": "0.7590201", "text": "public function updatePassword($usr_id, $password);", "title": "" }, { "docid": "e03415f31b46a30a0ae63c1743ed6daa", "score": "0.75891477", "text": "public function changePassword($password) {\n $this->setPasswordHash(self::hashPassword($password));\n }", "title": "" }, { "docid": "cf737bfeb97222ef725ff8ff1b63457c", "score": "0.75828433", "text": "public function changeNewPassword() {\n\t\tif (Auth::user()->role != 1) {\n\t\t\techo \"You do not have permission to view this content!!\";\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$messages = array(\n\t\t\t'password.required' \t=> 'Password is required',\n\t\t );\n\t\t \n\t\t$rules = array(\n\t\t\t'password' \t\t\t\t\t=> 'required|confirmed'\n\t\t );\t\t\n\t\t\n\t\t$validator = Validator::make($data = Input::all(), $rules, $messages);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\t\n\t\t\n\t\t$data['password'] = Hash::make(Input::get('password'));\n\t\tUser::where('id', '=', Input::get('id'))->update($data);\t\t\t\n\t\treturn Redirect::to('admin/users')->with('success_message','Password changed sucessfully'); \n }", "title": "" }, { "docid": "2d2f39fada9c7d12433d433a1ade9c4f", "score": "0.7581628", "text": "public function actionChangePassword(){\n $model = \\frontend\\models\\Student::findOne(Yii::$app->user->identity->student_id);\n \n if($model){\n $model->scenario = \"changePassword\";\n \n if ($model->load(Yii::$app->request->post()) && !Yii::$app->params['isDemo']) {\n $model->setPassword($model->student_password_hash);\n if($model->save()){\n Yii::$app->getSession()->setFlash('success', Yii::t('student', 'New password was saved.'));\n return $this->redirect(['setting/index']);\n }\n }\n }\n \n return $this->render('changePassword', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "d3d209e03d162e05ab5f8836df11876b", "score": "0.75794876", "text": "public function changePassword()\n {\n if (!Hash::check(request()->old_password, auth()->user()->password))\n return redirect()->back()->withErrors(['error' => __('all.old_pass_incorrect')]);\n\n $user = Auth::user();\n $user->password = bcrypt(request('new_password'));\n $user->save();\n\n session()->flash('success', __('all.pass_changed'));\n return redirect()->back();\n }", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.7578854", "text": "public function setPassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.7578854", "text": "public function setPassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.7578854", "text": "public function setPassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.7578854", "text": "public function setPassword($password);", "title": "" }, { "docid": "91067f22c05932e8d57055775c5d1e68", "score": "0.7574631", "text": "function can_change_password() {\n return true;\n }", "title": "" }, { "docid": "91067f22c05932e8d57055775c5d1e68", "score": "0.7574631", "text": "function can_change_password() {\n return true;\n }", "title": "" }, { "docid": "8a05b4bbbf6c4c3ad81143ae48a6305a", "score": "0.75729644", "text": "public function update_password()\n {\n $password = getPostParameter('password');\n $old_password = getPostParameter('old_password');\n $username = getSession('username');\n \n if ($this->_user->updatePassword($username, $password, $old_password)){\n $this->writeJson(array('status'=>true, 'message'=>'密码修改成功!'));\n }else{\n $this->writeJson(array('status'=>false, 'message'=>'旧密码不正确!'));\n }\n }", "title": "" }, { "docid": "462a2ebf798c1bfc2b63108b72dd7a96", "score": "0.75687206", "text": "public function setPassword()\n {\n if ($this->hasErrors()) {\n $this->handleCode('-201');\n // return CommFun::renderFormat('-201',[],['message'=>\",请检查输入的密码是否符合规范\"]);\n }\n\n $oHundSun = new HundSun($this->hcid);\n $priv = ['newpwd'=>$this->newpwd,'oldpwd'=>$this->oldpwd,'pwdtype'=>$this->pwdtype];\n $rs = $oHundSun->apiRequest('C012',$priv);\n \n if (isset($rs['code']) && $rs['code'] == 'ETS-5BP0000') {\n $this->syncPassword(); // 修改完成密码后,还需同步下本地库密码\n }\n\n return $rs;\n }", "title": "" }, { "docid": "b1b88dd992f804fcad810c51780f2a32", "score": "0.75652343", "text": "public function setPassword($value){\n $this->password=$value;\n }", "title": "" }, { "docid": "b1f9b6b2f410f2fad28b19306a50fc76", "score": "0.75626373", "text": "public function changepassword(){\n $user = $this->Users->find()->where(['id' => $this->Auth->user('id')])->first();\n if ($this->request->is(['patch', 'post', 'put'])) {\n $user = $this->Users->patchEntity($user, $this->request->getData());\n if ($this->Users->save($user)) {\n $this->Flash->success(__('Your Password Has Been Updated.'));\n\n return $this->redirect(['controller'=>'Candidates','action' => 'viewprofile']);\n }\n $this->Flash->error(__('Sorry, unable to update password. Please, try again.'));\n \n }\n \n $this->set(compact('user'));\n $this->set('title', 'Africa\\'s leading Code Academy');\n $this->viewBuilder()->setLayout('candidatebackend'); \n \n }", "title": "" }, { "docid": "c73ba5faa040d6e7addba5c74fe400d6", "score": "0.7552138", "text": "public function change_password(){\n\t\t foreach(['newpassword', 'currentpassword'] as $index){\n if(!isset($_POST[$index])){\n redirect(site_url('home/update_account'));\n }\n }\n\n\t\t$uname = $_SESSION['username'];\n\t\t$new_password= hash('sha256', filter_var($_POST['newpassword'], FILTER_SANITIZE_STRING));\n\t\t$current_password= hash('sha256', filter_var($_POST['currentpassword'], FILTER_SANITIZE_STRING));\n\t\t$database_password = $this->user_account_model->get_password($uname);\n\n\t\tif($database_password==$current_password) {\n\t\t\t$this->user_account_model->update_password($new_password, $uname);\n\t\t\t$_SESSION['change_password_notif'] = \"password_changed\";\n\t\t\tredirect(site_url(\"update_account\"));\t\n\t\t} else {\n\t\t\t$_SESSION['change_password_notif'] = \"pass\";\n\t\t\tredirect(site_url(\"update_account\"));\t\n\t\t}\n\t}", "title": "" }, { "docid": "d288ce26fa3e309142899602a4c2e750", "score": "0.7534634", "text": "public function setPassword(string $password);", "title": "" }, { "docid": "9c29b871c5c80352a42efc6a1e97fcb3", "score": "0.752361", "text": "public function action_password() {\n\t\t$data = array();\n\t\t$this->template->title = \"Change password - Miniblog\";\n\t\t$this->template->set('breadcrumbs', '<li><a href=\"#\">Users</a></li>\n\t\t\t\t<li class=\"active\">Change password</li>', false);\n\t\tif (Session::get('token')) {\n\t\t\t//check submit\n\t\t\tif (Input::post()) {\n\t\t\t\t//token\n\t\t\t\t$info['token'] = Session::get('token');\n\t\t\t\t$info['old_password'] = Security::clean(Input::post('oldpassword'), $this->filters);\n\t\t\t\t$info['password'] = Security::clean(Input::post('newpassword'), $this->filters);\n\t\t\t\t$info['re'] = Security::clean(Input::post('retype'), $this->filters);\n\t\t\t\t//check input value\n\t\t\t\t\n\t\t\t\t//set method\n\t\t\t\t$method = 'PUT';\n\t\t\t\t//add the user id into the link\n\t\t\t\t$link = 'http://localhost/miniblog/miniblog-lam.vy/src/v1/users/password';\n\t\t\t\t$result = $this->init_curl($info, $method, $link);\n\t\t\t\t//check the result return\n\t\t\t\tif ($result['meta']['code'] == 200) {\n\t\t\t\t\t$data['result'] = '<div class=\"alert alert-success\" role=\"alert\">\n\t\t\t\t\t\t\t\t<strong>Success!</strong> Your password was changed.\n\t \t\t\t\t</div>';\n\t\t\t\t} else {\n\t\t\t\t\t//alert error\n\t\t\t\t\tif (is_array($result['meta']['message'])) {\n\t\t\t\t\t\t//json return is array message output\n\t\t\t\t\t\t$message = implode($result['meta']['message'][0]);\n\t\t\t\t\t\t//var_dump($res['meta']);die;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$message = $result['meta']['message'];\n\t\t\t\t\t}\n\t\t\t\t\t//set the error message alert\n\t\t\t\t\t$data['result'] = '<div class=\"alert alert-warning\" role=\"alert\">\n\t\t\t\t\t\t\t\t<strong>Sorry!</strong> '.$message.'\n\t \t\t\t\t</div>';\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//template and view change pass\n\t\t\t$this->template->content = View::forge('users/password', $data);\n\t\t} else {\n\t\t\t//response access is denied\n\t\t\treturn Response::redirect('users/access_denied');\n\t\t}\n\t}", "title": "" }, { "docid": "c443add0a6110fb6dea18c74a74bdb20", "score": "0.75132954", "text": "public function change_password() {\n $this->User_activity->insert_user_activity();\n\n $data['logged_in_user_data'] = $this->session->userdata('logged_in_user_data');\n if ($data['logged_in_user_data']->is_logged_in == 1) {\n $data['logged_in_user_data'] = $this->session->userdata('logged_in_user_data');\n $path = base_url() . $this->config->item('user_profile_image_path');\n $data['path'] = $path;\n $data['title'] = \"ZingUpLife | Change Password\";\n $data['main_content'] = 'change_password';\n $this->load->view('includes/menu_template', $data);\n } else {\n $this->session->set_flashdata('login_required_message', 'Please login to continue !!!.');\n redirect(\"/login\");\n }\n }", "title": "" }, { "docid": "95fcaa6b6a7170357a61ba5b289150fd", "score": "0.7498382", "text": "function change_password () {\n\n $data = array(\n\n 'password' => sha1($this->input->post('np1'))\n\n );\n\n $this->db->where('userId', $this->session->userdata('id'));\n return $this->db->update('user', $data);\n\n }", "title": "" }, { "docid": "1db43295b5e7a2f013a4c4c196bd0049", "score": "0.7493161", "text": "function _insert_pwd(){\n\t\t$pass = $this->_input['pwd']['npass'];\n\t\t$en_pass = md5($this->_input['pwd']['npass']);\n\t\t$res = $this->obj_user->reset_pwd($en_pass,$this->_input['email']);\n\t\tif($res){\n\t\t\t$_SESSION['raise_message']['global'] = 'Password Changed Sucessfully';\n\t\t\tredirect(LBL_SITE_URL);\n\t\t}else{\n\t\t\t$_SESSION['raise_message']['global'] = 'Failure in changing password';\n\t\t\tredirect(LBL_SITE_URL.'user/setpwd');\n\t\t}\n\t}", "title": "" }, { "docid": "c8a6c154c4e3f178258bad915f7ec3c0", "score": "0.74907297", "text": "public function password() {\n \n switch($this->getUserPrivs()) {\n case -1: return false; break;\n case -2: return $this->_loginForm(wpjr_link_to(\"myresume_password\")); break;\n }\n \n //$url = wpjr_link_to(\"myresume_home\");\n \n $this->view = new stdClass();\n $this->view->action = \"\";\n $this->view->submit = __(\"Change Password\", \"wpjobboard\");\n \n $form = new Wpjb_Form_PasswordChange();\n $form->getElement(\"_wpjb_action\")->setValue(\"wpjb_candidate_change_password\");\n if($this->getRequest()->isPost()) {\n $isValid = $form->isValid($this->getRequest()->getAll());\n if(!$isValid) {\n $this->addError($form->getGlobalError());\n }\n // Change Password in onTemplateRedirectPasswordChange\n }\n \n foreach(array(\"user_password\", \"user_password2\", \"old_password\") as $f) {\n if($form->hasElement($f)) {\n $form->getElement($f)->setValue(\"\");\n }\n }\n \n $this->view->breadcrumbs = array(\n array(\"title\"=>__(\"Home\", \"wpjobboard\"), \"url\"=>wpjr_link_to(\"myresume_home\"), \"glyph\"=>\"wpjb-icon-home\"),\n array(\"title\"=>__(\"Change Password\", \"wpjobboard\"), \"url\"=>wpjb_link_to(\"myresume_password\"), \"glyph\"=>$this->glyph()),\n );\n \n $this->view->form = $form;\n \n return $this->render(\"default\", \"form\");\n }", "title": "" }, { "docid": "3ee11734abb1ec3822beb5c10a90fc85", "score": "0.74890226", "text": "public function changepassword(){\n $data['thispage']=\"6\";\n $data['title']=\"Profile Password Change || WishingMart\";\n\n $this->load->view('dashboard/index', $data);\n }", "title": "" }, { "docid": "a01c09913092920658eafee4261e1d41", "score": "0.7480682", "text": "public function resetPassword() {\n\n\t\t$password = $this->generatePassword();\n\n\t\t$this->setPwd( $password );\n\t\tif( $this->save() ) {\n\t\t\tmail( $this->getEmail(), Client::GetName() . ' Password Reset', \"Your password has been reset for the \" . Client::GetName() . \" web site.\\n\\nYou may log in to \" . Client::GetUrl() . \" as:\\nEmail: {$this->getEmail()}\\nPassword: {$password}\\n\\nWe encourage you to change your password in the Manage:Administrators section of the site as soon as possible.\" );\n\t\t\tAuditLog::Log( 'Password reset', $this );\n\t\t} else {\n\t\t\tAuditLog::Log( 'Could not save user after password change', $this );\n\t\t}\n\n\t}", "title": "" }, { "docid": "4472d98bbba27e8ea77ae9bb09d0638f", "score": "0.74792343", "text": "function changePassword()\n {\n\t\t$args = new safe_args();\n\t\t$args->set('key',\t\t\tNOTSET,'any');\n\t\t$args->set('oldpassword',\tNOTSET,'any');\n\t\t$args->set('newpassword1',\tNOTSET,'any');\n\t\t$args->set('newpassword2',\tNOTSET,'any');\n\t\t$args = $args->get(func_get_args()); \n\t\t\n $GLOBALS['appshore']->add_xsl($this->appXSL);\n $GLOBALS['appshore']->add_xsl('lib.base'); \n $GLOBALS['appshore']->add_xsl('lib.edit'); \n $GLOBALS['appshore']->add_xsl('lib.form'); \n $this->menus(); \n\t\n \t\tif ($args['key'] == 'Save')\n \t\t{\n\t\t\tif ( $GLOBALS['appshore']->rbac->check($this->appRole, RBAC_USER_WRITE ))\n\t\t\t{\n\t\t\t\t// retrieve the selected record\n\t\t\t\t$user = getOneAssocArray( 'select password from users where user_id= \"'.$GLOBALS['appshore_data']['current_user']['user_id'].'\"');\n\t\t\t\t\n\t\t\t\tif( $user['password'] == md5( $args['oldpassword'] ) )\n\t\t\t\t{\n\t\t\t\t\t$update['user_id'] = $GLOBALS['appshore_data']['current_user']['user_id'];\n\t\t\t\t\t$update['password'] = md5($args['newpassword1']);\n\t\t\t\t\t$update['last_password_change'] = gmdate( 'Y-m-d H:i:s', strtotime('now'));\n\t\t\t\t\tupdateRow( 'users', 'user_id', $update);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tmessagebox( 'Old password does not match, please try again', ERROR);\n\t\t\t}\n\t\t\telse\n\t\t\t\tmessagebox( 'No access rights, contact your Appshore administrator', ERROR);\n\t\t} \n\n\t\tunset($args);\n\t\t// Put context in XML to be processed by XSL\n\t\t$this->defaultSessionApp();\n\t\t$result['recordset'] = $_SESSION[$this->appName];\t\t\n\t\t$result['profile']['user_id'] = $GLOBALS['appshore_data']['current_user']['user_id'];\t\t\n\t\t$result['action'][$this->appName] = 'changePassword';\t\n\t\t\n return $result;\n }", "title": "" }, { "docid": "e3d759e37728ef10248d686f932f235d", "score": "0.7478271", "text": "public function changePasswordAction()\n {\n $form = new ChangePasswordForm();\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = $this->auth->getUser();\n\n $user->password = $this->security->hash($this->request->getPost('password'));\n $user->mustChangePassword = 'N';\n\n $passwordChange = new PasswordChanges();\n $passwordChange->user = $user;\n $passwordChange->ipAddress = $this->request->getClientAddress();\n $passwordChange->userAgent = $this->request->getUserAgent();\n\n if (!$passwordChange->save()) {\n $this->flash->error($passwordChange->getMessages());\n } else {\n\n $this->flash->success('Your password was successfully changed');\n\n Tag::resetInput();\n }\n }\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "e3d759e37728ef10248d686f932f235d", "score": "0.7478271", "text": "public function changePasswordAction()\n {\n $form = new ChangePasswordForm();\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = $this->auth->getUser();\n\n $user->password = $this->security->hash($this->request->getPost('password'));\n $user->mustChangePassword = 'N';\n\n $passwordChange = new PasswordChanges();\n $passwordChange->user = $user;\n $passwordChange->ipAddress = $this->request->getClientAddress();\n $passwordChange->userAgent = $this->request->getUserAgent();\n\n if (!$passwordChange->save()) {\n $this->flash->error($passwordChange->getMessages());\n } else {\n\n $this->flash->success('Your password was successfully changed');\n\n Tag::resetInput();\n }\n }\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "a4c37077778d57e9d32afd0f4faa9c75", "score": "0.747343", "text": "public function changepassword()\n {\n isLoggedIn();\n $data = [\n 'titulo' => 'Cambiar Contraseña'\n ];\n return $this->view('usuario/changepassword', $data);\n }", "title": "" }, { "docid": "de2171bd605606f4d3f2362e7064dd23", "score": "0.74711317", "text": "public function changePasswordAction()\r\n {\r\n $this->getSessionService();\r\n if ($this->getRequest()->isPost()) {\r\n $result = $this->validateFormChangePassword((array) $this->getRequest()->getPost());\r\n if ($result[\"success\"]) {\r\n $result[\"userId\"] = $this->auth->userId;\r\n $this->auth->password = $result[\"password\"];\r\n $this->auth->offsetUnset(\"token\");\r\n $this->auth->offsetUnset(\"forceReset\");\r\n unset($result[\"password\"]);\r\n }\r\n $result[\"userId\"] = $this->auth->userId;\r\n return new JsonModel($result);\r\n } else {\r\n $view = new ViewModel();\r\n $view->setVariable(\"auth\", $this->auth->getArrayCopy());\r\n return $view;\r\n }\r\n }", "title": "" }, { "docid": "27f912e1bd6f947e1bf941eb7d42ac6b", "score": "0.7467373", "text": "public function change_password() {\n\n\t\t$oCurrentUser = $this->authentication->is_user_logged_in(true, 'user/login', true, true);\n\n\t\t$this->mcontents['page_heading'] \t= 'Change Password';\n\t\t$this->mcontents['page_title'] \t\t= 'Change Password';\n\n\t\tif( isset($_POST) && ! empty($_POST) ) {\n\n\t\t\t$this->form_validation->set_rules('current_password', 'Current Password', 'required');\n\t\t\t$this->form_validation->set_rules('new_password', 'New Password', $this->config->item('password_validation_rules'));\n\t\t\t$this->form_validation->set_rules('password_again', 'Confirm New Password', $this->config->item('password_again_validation_rules'));\n\n\t\t\tif( $this->form_validation->run() !== false ) {\n\n\t\t\t\t$bMismatch = true;\n\n\t\t\t\t//salt the password\n\t\t\t\t$sHash = $this->account_model->getPasswordHash($oCurrentUser->salt, safeText('current_password'));\n\n\t\t\t\t$this->db->where('hash', $sHash);\n\t\t\t\t$this->db->where('account_no', s('ACCOUNT_NO') );\n\n\t\t\t\tif ( $oUser = $this->db->get('users')->row() ) {\n\n\t\t\t\t\t$bMismatch = false;\n\n\t\t\t\t\tif( $oUser->account_no == s('ACCOUNT_NO') ) {\n\n\t\t\t\t\t\t//proceed with changing password\n\t\t\t\t\t\t$sNewSalt = $this->authentication->getSalt();\n\t\t\t\t\t\t$sHash = $this->account_model->getPasswordHash($sNewSalt, safeText('new_password'));\n\n\n\t\t\t\t\t\t$this->db->set('salt', $sNewSalt);\n\t\t\t\t\t\t$this->db->set('hash', $sHash);\n\t\t\t\t\t\t$this->db->where('account_no', $oUser->account_no);\n\t\t\t\t\t\t$this->db->update('users');\n\n\t\t\t\t\t\tsf('success_message', 'Password has been changed');\n\t\t\t\t\t\tredirect('account/overview');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( $bMismatch ) {\n\n\t\t\t\t\tsf('error_message', 'Current password you entered was wrong');\n\t\t\t\t\tredirect('account/change_password');\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// we need front end validation for this page.\n\t\trequireFrontEndValidation();\n\t\t$this->mcontents['load_js'][] \t= 'validation/change_password.js';\n\n\n\t\tloadTemplate('account/change_password');\n\t}", "title": "" }, { "docid": "f01926691dadaa7ff8b9281a7a18e3ba", "score": "0.7464195", "text": "function changepw() {\n\t\t// Visitor must be logged in\n\t\tif(!$this->Accounts_model->checkLogin())\n\t\t\treturn;\n\t\t\n\t\tif($this->input->post('change')) {\n\t\t\t// Setup the rules of our form\n\t\t\t$this->form_validation->set_rules('old_password', 'Old Password', 'trim|required|min_length[6]|max_length[32]|xss_clean|prep_for_form');\n\t\t\t$this->form_validation->set_rules('new_password', 'New Password', 'trim|required|min_length[6]|max_length[32]|xss_clean|prep_for_form');\n\t\t\t$this->form_validation->set_rules('confirm_password', 'Password Confirmation', 'required|matches[new_password]');\n\t\t\t\n\t\t\t// Validate form input and check it against the db:\n\t\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t\t$this->session->set_flashdata('error_message', validation_errors());\n\t\t\t} else {\n\t\t\t\t// Perform an update in the DB\n\t\t\t\tif ($this->Accounts_model->changePassword($this->session->userdata('account_id'), $this->input->post('old_password'), $this->input->post('new_password'))) {\n\t\t\t\t\t// Successful\n\t\t\t\t\t$this->session->set_flashdata('status_message', 'Password changed successfully');\n\t\t\t\t} else {\n\t\t\t\t\t// Update failed\n\t\t\t\t\t$this->session->set_flashdata('error_message', 'Unable to change password. Old password was most likely incorrect');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Send back to the account management page no matter what\n\t\tredirect('accounts/manage');\n\t}", "title": "" }, { "docid": "01dc5b21be12b40184bc72201a22d223", "score": "0.7461575", "text": "function changePass(){\n\t\t\t$user = $this->authCheck();\n\t\t\tif($user === false){\n\t\t\t\t$this->redirect(\"views/changepass.php\");\n\t\t\t}else{\n\t\t\t\tif(isset($_COOKIE['lockout'])){\n\t\t\t\t\t$this->redirect(\"views/lockout.php\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse if(isset($_POST['changepass'])){\n\t\t\t\t\t$pass = $_POST['NewPass'];\n\t\t\t\t\t$oldpass = $_POST['Password'];\n\t\t\t\t\tif($this->model->changePass($oldpass, $pass, $user->UserID) === true){\n\t\t\t\t\t\t$this->logout();\n\t\t\t\t\t\t$this->redirect(\"views/login.php\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tsetcookie('changeattempts', intval($_COOKIE['changeattempts'])+1);\n\t\t\t\t\t\tif(intval($_COOKIE['changeattempts'])>=5){\n\t\t\t\t\t\t\tsetcookie('lockout', 1, time()+60);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->redirect(\"views/changepass.php\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7e5b638b681dc639d8bf5249636f73b3", "score": "0.74234545", "text": "public function change_password($id, $password){\n\t\t\t\t \t\t $sql9 = \"UPDATE users SET password='$password' WHERE id='$id'\";\n\t\t\t\t \t\t \n $result = mysqli_query($this->db,$sql9) or die(mysqli_connect_errno().\"Password cannot be uptadet\"); \n return $result; \n\t\t\t\t \t\t }", "title": "" }, { "docid": "e162df56629a5ac2ae72c141164509b9", "score": "0.7412994", "text": "public function test_change_password_ok() {\n\t\n\t\t$id = '88' ;\n\t\t$old_password = '12345';\n\t\t$new_password = 'aaa456';\n\t\t//call function to test update\n\t\t$rs = $this->_user->change_password($id, $old_password, $new_password);\n\t\t//compare with code 200 is success\n\t\t$this->assertEquals('200', $rs['meta']['code']);\n\t\t//reset data\n\t\t\n\t\t$this->reset_data_update();\t\n\t}", "title": "" }, { "docid": "682fa66d8c9cfda4a373373dbe39467b", "score": "0.74085194", "text": "public function changer_pass($pass)\r\n\t{\r\n\t\t$this->password = md5($pass);\r\n\t\tmysql_query(\"UPDATE \" . $this->type() . \" SET pwd = '\" . $this->password . \"' WHERE login = '\" . $this->login . \"'\");\r\n\t\r\n\t}", "title": "" }, { "docid": "66ef959689282ada4e68e299a8608391", "score": "0.7404279", "text": "public function update_password(){\n $user_id = $_POST['user_id'];\n $new_password = $_POST['password'];\n if($user_id != null && $new_password != null){\n $data = wp_set_password($new_password,$user_id);\n return $res = [\n 'status' => 200,\n 'message' => 'Password Changed Sucessfully.'\n ];\n }else{\n return $res = [\n 'status' => 400,\n 'message' => 'Requested Params Missing Full Fill All Fields.'\n ];\n }\n }", "title": "" }, { "docid": "edc2fceae1af4b3246119f09dc74c6f3", "score": "0.7396989", "text": "public function updatePassword()\n\t{\n\t\t$_SESSION['token'];\n\t\t$data = $this->input->post();\n\t\tif (md5($data['password']) == md5($data['reTypePassword'])) {\n\t\t\t$this->db->query(\"UPDATE users SET upassword='\" . md5($data['password']) . \"' WHERE upassword='\" . $_SESSION['token'] . \"'\");\n\t\t}\n\t\t$this->session->set_flashdata(\"success\", \"Password has been reset...\");\n\t\tredirect(\"welcome/login\");\n\t}", "title": "" }, { "docid": "00c4b7ce89e9e43b9ab0d55eaf23e814", "score": "0.7391651", "text": "public function setNewPassword($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_92'));\n\t\tif(!Validator::AccountPassword($value)) throw new Exception(lang('error_92'));\n\t\t\n\t\t$this->_newPassword = $value;\n\t}", "title": "" }, { "docid": "b0c9cd7c34025d84a7e4ab7be3a995c3", "score": "0.7389558", "text": "public function updatePassword($email, $password){\r\n\r\n //ako postoji izvrsi update sa novom sifrom\r\n}", "title": "" }, { "docid": "eb89c892acbfb0c73c9c8e86e80ce57b", "score": "0.738782", "text": "function passwordChange(){\n\tif(isset($_POST['changePass'])){\n\t\t$connect = mysqli_connect(\"localhost\",\"root\",\"raspberry\",\"pool3k\");\n\t\t$query = \"SELECT * FROM users WHERE id={$_SESSION['id']}\";\n\t\t$bddData = mysqli_query($connect,$query);\n\n\t\t$oldPass = htmlspecialchars($_POST['oldPass']);\n\t\t$newPass = htmlspecialchars($_POST['newPass']);\n\t\t$newPassConfirm = htmlspecialchars($_POST['newPassVerif']);\n\t\t$bddDataRow = mysqli_fetch_array($bddData);\n\n\t\tif (password_verify($oldPass,$bddDataRow['pass'])){\n\t\t\tif($newPass == $newPassConfirm){\n\t\t\t\t$query = \"UPDATE users SET pass = '\".password_hash($newPass,PASSWORD_DEFAULT).\"' WHERE id = {$_SESSION['id']}\";\n\t\t\t\tmysqli_query($connect,$query);\n\t\t\t\techo \"'Votre mot de passe a bien été modifié',true\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"'Le nouveau mot de passe et la confirmation doivent être identiques',true\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\techo \"'Votre ancien mot de passe est incorrect',true\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "afb048ec0f87a4e28b02b4dd5ddefe93", "score": "0.737708", "text": "public function changePassword($database){\n $query = 'UPDATE `user`\n SET `password` = \"' . hash(\"sha224\", $this->password) . '\"\n WHERE `id` = '.intval($this->id).';';\n $database->executeQuery($query);\n }", "title": "" }, { "docid": "96d0f07568a3796cbfd7c7eda9484c14", "score": "0.7366491", "text": "private function userspassword() {\n if ($this->get_request_method() == \"POST\" && !empty($this->args[1]) && !empty($this->_raw['email'])) {\n $res = $this->db->query(\"SELECT * FROM users WHERE email='\" . $this->_raw['email'] . \"'\");\n if ($res->rowCount() > 0) {\n $user = $res->fetch(PDO::FETCH_ASSOC);\n // generate random password\n $password = $this->generateRandomString();\n // send email with new password\n $this->sendRecoveryPasswordByEmail($user['name'], $user['email'], $password);\n //update Password in Database\t\t\t\t\t\t\n $res = $this->db->query(\"UPDATE users SET password = \\\"\" . crypt($password) . \"\\\" WHERE idUser=\" . $user['idUser']);\n\n $this->response('', 200);\n } else\n $this->response('', 400);\n }else\n // Update password\n if ($this->get_request_method() == \"PUT\" && !empty($this->args[1]) && !empty($this->_raw['currentPassword']) && !empty($this->_raw['newPassword'])) {\n\n $idUser = $this->args[1];\n $currentPassword = $this->_raw['currentPassword'];\n $newPassword = $this->_raw['newPassword'];\n $res = $this->db->query(\"SELECT * FROM users WHERE idUser=\" . $idUser);\n if ($res->rowCount() > 0) {\n $user = $res->fetch(PDO::FETCH_ASSOC);\n\n $stored_hash = $user[\"password\"];\n if (crypt($currentPassword, $stored_hash) == $stored_hash) {\n //update Password in Database\t\t\t\t\t\t\n $res = $this->db->query(\"UPDATE users SET password = \\\"\" . crypt($newPassword) . \"\\\" WHERE idUser=\" . $user['idUser']);\n $this->response('', 200);\n } else\n $this->response('', 203);\n } else\n $this->response('', 400);\n } else\n $this->response('', 400);\n }", "title": "" }, { "docid": "989b5c0686ba5cde98ab4e3a6b1b1428", "score": "0.73637414", "text": "public function changePassword()\n {\n return view('admin.changePassword');\n }", "title": "" }, { "docid": "4398ac322ee22fe9f9b7f00cac745c41", "score": "0.7360094", "text": "public function testChangePassword()\n {\n $data = [\n 'old_password' => 'password',\n 'password' => 'test1234',\n 'password_confirmation' => 'test1234'\n ];\n\n $this->changePassword($data)\n ->assertRedirect();\n }", "title": "" } ]
3a0c8d60c2b66a262eca99576188651d
prepare_event_data Prepare the serialized array dataset
[ { "docid": "f73997e4c8aad63ba2cd769f5738e476", "score": "0.6173929", "text": "protected function _prepareEventData(array $events)\n {\n $data = array();\n foreach($events as $items)\n {\n $check = preg_split(\"/\\[([^\\]]*)\\]/\", $items['name']);\n if (is_array($check) && isset($check[1])) {\n $name = $check[0];\n $subName = preg_match_all(\"/\\[([^\\]]*)\\]/\", $items['name'], $sub);\n if (isset($sub[1])) {\n $data[strtolower($name)][strtolower($sub[1][0])] = $items['value'];\n }\n } else {\n $data[strtolower($items['name'])] = $items['value'];\n }\n }\n\n return $data;\n }", "title": "" } ]
[ { "docid": "1225c7e9f6456581f283c68233eb694d", "score": "0.6645386", "text": "abstract function prepareData();", "title": "" }, { "docid": "93f3f7a526dba643c6eddfbb0006396c", "score": "0.6363134", "text": "public function prepareData()\n {\n }", "title": "" }, { "docid": "93f3f7a526dba643c6eddfbb0006396c", "score": "0.6363134", "text": "public function prepareData()\n {\n }", "title": "" }, { "docid": "f8b063d882ebe187b08885468e232d39", "score": "0.6196687", "text": "protected function prepareData()\n {\n parent::prepareData();\n $this->prepareBundleItems();\n }", "title": "" }, { "docid": "14ac1d9a936b37d5b0a7e4c685c9a6b0", "score": "0.61315817", "text": "private function prepareData()\n {\n foreach ($this->xml->TOUR as $tour) {\n $array = [];\n\n foreach ($this->fields as $field) {\n $array[$field] = $this->cleanUpString($tour->$field);\n }\n\n $array[$this->price] = $this->getPrice($tour, $this->price);\n\n $this->data[] = $array;\n }\n }", "title": "" }, { "docid": "915c2bbc5217baae3b3de3b9abeea803", "score": "0.5791808", "text": "abstract public function &prepare(array &$data);", "title": "" }, { "docid": "9932d9d6a0f77e6ba7ad9e0a833a2f17", "score": "0.5751702", "text": "public function prepare(array $data);", "title": "" }, { "docid": "2ccd35a95ddb4649c4b91db0ab68d935", "score": "0.5738113", "text": "protected function prepareData() {\n $aData = array();\n $aData['count'] = $this->iCount;\n $aData['sequence'] = $this->iSequence;\n $aData['files'] = $this->aFiles;\n return $aData;\n }", "title": "" }, { "docid": "40acd61df5fb368297130084f1ab3c08", "score": "0.5699434", "text": "public function onEaiFetchRawDataInStart(EaiEvent $event)\n\t{\n\t /*$rawData= $event->getObj()->getRawData();\n\n\t //$custEaiData= array($rawData['attribute_code'],$rawData);\n\t $custEaiData= array(array($rawData));*/\n $connector = $event->getObj();\n\n $params = $connector->getCallparams();\n\n $param = new stdClass();\n $param->p_CustomerOrderNumber = $params['args']['p_CustomerOrderNumber'];\n $formatedParams = array(\n $params['action'],\n array($param)\n );\n $connector->setCallparams($formatedParams);\n\t}", "title": "" }, { "docid": "5fac5b1e296feae463e19f329bccb2d9", "score": "0.5551114", "text": "protected function prepareEvent(EventInterface $event) {\n\t\tforeach ( array (\n\t\t\t\t'elementSpec',\n\t\t\t\t'inputSpec' \n\t\t) as $type ) {\n\t\t\tif (! $event->getParam ( $type )) {\n\t\t\t\t$event->setParam ( $type, new ArrayObject () );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$elementSpec = $event->getParam ( 'elementSpec' );\n\t\t$inputSpec = $event->getParam ( 'inputSpec' );\n\t\t\n\t\tif (! isset ( $elementSpec ['spec'] )) {\n\t\t\t$elementSpec ['spec'] = array ();\n\t\t}\n\t\tif (! isset ( $inputSpec ['filters'] )) {\n\t\t\t$inputSpec ['filters'] = array ();\n\t\t}\n\t\tif (! isset ( $inputSpec ['validators'] )) {\n\t\t\t$inputSpec ['validators'] = array ();\n\t\t}\n\t}", "title": "" }, { "docid": "210aafc51bea8ecf2080f53f9f849c74", "score": "0.5545709", "text": "protected function prepareData(): void\n {\n if (!empty($this->tags)) {\n $countTags = count($this->tags);\n foreach ($this->tags as $modelTag) {\n if ($this->tagUrl) {\n $this->tagUrl['tag'] = $modelTag->title;\n $tag = $this->generateHtmlLink($modelTag);\n } else {\n $tag = $this->formattingTitle($modelTag->title);\n }\n\n if ((count($this->data) + 1) < $countTags) {\n $tag .= $this->delimiter;\n }\n\n $this->data[] = $tag;\n }\n }\n }", "title": "" }, { "docid": "29dc375cf7d85aa0686aa0d634b9d2dc", "score": "0.55429316", "text": "public function prepareDataProcessing()\r\n {\r\n $type = MessageNameUtils::getTypePartOfMessageName($this->messageName);\r\n\r\n $this->messageName = MessageNameUtils::getProcessDataCommandName($type);\r\n\r\n $this->version++;\r\n }", "title": "" }, { "docid": "dbd787434134786070b3afa8facde1f2", "score": "0.5529851", "text": "public function prepareData(): void\n {\n $visitor = $this->filter->getVisitor();\n $amounts = $titles = [];\n if ($visitor !== null) {\n foreach ($visitor->getCategoryscoringsSortedByScoring() as $categoryscoring) {\n if ($categoryscoring !== null && $categoryscoring->getCategory() !== null) {\n $amounts[] = $categoryscoring->getScoring();\n $titles[] = $categoryscoring->getCategory()->getTitle();\n }\n }\n }\n $this->data = ['amounts' => $amounts, 'titles' => $titles];\n }", "title": "" }, { "docid": "acfb632ba943aed294568abbefaa8c18", "score": "0.55004346", "text": "public function beforeMarshal(Event $event, ArrayObject $data)\n {\n // Sprawdzenie czy jakiś plik został przesłany\n if ($data->offsetExists('file')) {\n // pobranie nazwy przesłanego pliku\n $file = $data->offsetGet('file');\n // wygenerowanie nowej nazwy pliku\n $filename = $this->generateFilename($file['name']);\n // zapisanie przeslanego pliku na serwerze\n $dir = WWW_ROOT . Image::UPLOAD_DIR;\n $tmpFile = $file['tmp_name'];\n $newFile = $dir . DIRECTORY_SEPARATOR . $filename;\n move_uploaded_file($tmpFile, $newFile);\n // zapisanie nowych danych\n $data->offsetSet('filename', $filename);\n $data->offsetSet('original_filename', $file['name']);\n $data->offsetUnset('file');\n }\n }", "title": "" }, { "docid": "82dd5eab463dc3e479da7485a1c4afb7", "score": "0.5473397", "text": "protected function prepareData()\n\t{\n\t\tforeach ($this->Keys as $i => $key) {\n\t\t\tif (!$this->Trackdata->has($key)) {\n\t\t\t\t$this->Averages[$key] = null;\n unset($this->Keys[$i]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "413fce5089fb19b759ebf48476d15f06", "score": "0.54638654", "text": "function makeDayArray($xetconfig,$events, $date, $sortOrder='ASC') {\n\tglobal $modx;\n\t\n\tif (is_array($events)) {\n\t\t\n\t\t$timestampdaystart = $this->get_ts_daystart($date);\n\t\t$timestampmonthstart = $this->get_ts_monthstart($date);\n\t\t$timestampweekstart = $this->get_ts_weekstart($date);\n\t\t$timestampyearstart = $this->get_ts_yearstart($date);\n\t\tif ($this->xetconfig['counteventstarts'] == '1') {\n\t\t\t$this->counteventstarts($events);\n\t\t}\n\t\t$data_array=array();\n\t\t$rowid = 0;\n\t\t$rowscount = 0;\n\t\t$dayeventscount = 0;\n\t\t$weekeventscount = 0;\n\t\t$montheventscount = 0;\n\t\t$yeareventscount = 0;\n\t\t$theyearend = $themonthend = $theweekend = $thedayend = $sortOrder=='ASC'? -10000000000000:10000000000000;\n\t\t$theyearstart = $themonthstart = $theweekstart = $thedaystart = $sortOrder=='ASC'? -10000000000000:10000000000000;\n\t\t$rowscount = count($events);\n\t\tforeach ($events as $event) {\n\t\t\t$ID = $event['ID'];\n\t\t\t/*\n\t\t\t$rowTpl = $this->xettpl['datarowTpl'];\n\t\t\tif (isset ($event['tpl'])) {\n\t\t\t\t$tplfilename = $xetconfig['tplpath'] . \"/\" . $event['tpl'];\n\t\t\t\tif (($event['tpl'] !== '') && (file_exists($tplfilename))) {\n\t\t\t\t\t$rowTpl = \"@FILE:\" . $tplfilename;\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\t\t\t$eventdaystart = $this->get_ts_daystart($event['Time']);\n\t\t\t$eventweekstart = $this->get_ts_weekstart($event['Time']);\n\t\t\t$eventmonthstart = $this->get_ts_monthstart($event['Time']);\n\t\t\t$eventyearstart = $this->get_ts_yearstart($event['Time']);\n\t\t\t$eventdayend = $this->get_ts_dayend($event['Time']);\n\t\t\t$eventweekend = $this->get_ts_weekend($event['Time']);\n\t\t\t$eventmonthend = $this->get_ts_monthend($event['Time']);\n\t\t\t$eventyearend = $this->get_ts_yearend($event['Time']);\n\n if ($sortOrder == 'ASC')\n {\n if ($event['Time'] > $thedayend)\n {\n $dayeventscount = 1;\n $thedayend = $eventdayend;\n } else\n {\n $dayeventscount++;\n }\n if ($event['Time'] > $theweekend)\n {\n $weekeventscount = 1;\n $theweekend = $eventweekend;\n } else\n {\n $weekeventscount++;\n }\n if ($event['Time'] > $themonthend)\n {\n $montheventscount = 1;\n $themonthend = $eventmonthend;\n } else\n {\n $montheventscount++;\n }\n if ($event['Time'] > $theyearend)\n {\n $yeareventscount = 1;\n $theyearend = $eventyearend;\n } else\n {\n $yeareventscount++;\n }\n \n \n } else\n {\n if ($event['Time'] < $thedaystart)\n {\n $dayeventscount = 1;\n $thedaystart = $eventdaystart;\n } else\n {\n $dayeventscount++;\n }\n if ($event['Time'] < $theweekstart)\n {\n $weekeventscount = 1;\n $theweekstart = $eventweekstart;\n } else\n {\n $weekeventscount++;\n }\n if ($event['Time'] < $themonthstart)\n {\n $montheventscount = 1;\n $themonthstart = $eventmonthstart;\n } else\n {\n $montheventscount++;\n }\n if ($event['Time'] < $theyearstart)\n {\n $yeareventscount = 1;\n $theyearstart = $eventyearstart;\n } else\n {\n $yeareventscount++;\n }\n \n }\n\n\n\n\t\t\t$rowid++;\n\t\t\t$event['rowid'] = $rowid;\n\t\t\t$event['rowscount'] = $rowscount;\n\t\t\t$event['daydatarowid'] = $dayeventscount;\n\t\t\t$event['dayeventsid'] = $dayeventscount;\n\t\t\t$event['weekeventsid'] = $weekeventscount;\n\t\t\t$event['montheventsid'] = $montheventscount;\n\t\t\t$event['yeareventsid'] = $yeareventscount;\n\t\t\tif ($xetconfig['countdayevents'] == '1') {\n\t\t\t\t$this->countdayevents($events, $event['Time']);\n\t\t\t\t$event['dayeventscount'] = $this->eventscount['day'][$eventdaystart];\n\t\t\t}\n\t\t\tif ($xetconfig['countweekevents'] == '1') {\n\t\t\t\t$this->countweekevents($events, $event['Time']);\n\t\t\t\t$event['weekeventscount'] = $this->eventscount['week'][$eventweekstart];\n\t\t\t}\n\t\t\tif ($xetconfig['countmonthevents'] == '1') {\n\t\t\t\t$this->countmonthevents($events, $event['Time']);\n\t\t\t\t$event['montheventscount'] = $this->eventscount['month'][$eventmonthstart];\n\t\t\t}\n\t\t\tif ($xetconfig['countyearevents'] == '1') {\n\t\t\t\t$this->countyearevents($events, $event['Time']);\n\t\t\t\t$event['yeareventscount'] = $this->eventscount['year'][$eventyearstart];\n\t\t\t}\n\t\t\tif ($xetconfig['counteventstarts'] == '1') {\n\t\t\t\t$event['daystartscount'] = $this->eventscount['daystarts'][$eventdaystart];\n\t\t\t\t$event['weekstartscount'] = $this->eventscount['weekstarts'][$eventweekstart];\n\t\t\t\t$event['monthstartscount'] = $this->eventscount['monthstarts'][$eventmonthstart];\n\t\t\t\t$event['yearstartscount'] = $this->eventscount['yearstarts'][$eventyearstart];\n\t\t\t}\n\t\t\t$event['fromprevday'] = ($event['Time'] < $timestampdaystart) ? 1 : 0;\n\t\t\t$event['fromprevweek'] = ($event['Time'] < $timestampweekstart) ? 1 : 0;\n\t\t\t$event['fromprevmonth'] = ($event['Time'] < $timestampmonthstart) ? 1 : 0;\n\t\t\t$event['fromprevyear'] = ($event['Time'] < $timestampyearstart) ? 1 : 0;\n\t\t\t$event['tsday'] = $date;\n\t\t\t$data_array[]= $event;\n\t\t}\n\t}\n \t//$tpl = new mgChunkie($this->xettpl['dataouterTpl']);\n\t$day_array = array ();\n $link = array ();\n\t$removearray=array('tsmonth');\n $link['tsday'] = $date;\n $day_array['link_tsday'] = $this->blox->smartModxUrl($modx->documentObject[\"id\"], NULL, $link,$removearray);\n\t$day_array['date'] = $date;\n\t$day_array['daytimestamp'] = $date;\n\t$day_array['tsday'] = $date;\n\t$day_array['innerrows']['datarow'] = $data_array;\n\t$day_array['datarowscount'] = $rowscount;\n\t$day_array['dayeventscount'] = $dayeventscount;\n\t//$day_array['config'] = $xetconfig;\n\t//$tpl->addVar('xeventtable', $dataouterTplData);\n\t//$output = $tpl->Render();\n\treturn $day_array;\n}", "title": "" }, { "docid": "f6036fd1130e578b31d91fea59744572", "score": "0.5455345", "text": "protected function prepareDataSerie( $dataset ) {\n // create an array with values of the previous day so we can substract those values from today\n $dataset_next_day = $dataset;\n array_shift( $dataset_next_day ); // shift the array one to the left to create \n \n // substract the value with the value of the previous day\n $data = array_map( function ($today, $tomorrow) {\n if ( isset( $tomorrow ) )\n return $tomorrow - $today ;\n }, $dataset, $dataset_next_day );\n array_pop( $data ); // last value equals NULL so discard\n return $data;\n }", "title": "" }, { "docid": "03cf65f33e3c92e90da09ffe2c6639ed", "score": "0.5452654", "text": "public function process() {\n Utils::log(\">>> \" . get_class($this) . \" <<<\");\n Utils::log(\"Starting array to DataSource conversion...\");\n\n $input = $this->getInput();\n\n // pass loaded XML to be converted to general DataSource \n \t$this->dataSource = $this->processInput($input);\n\n $this->isProcessed = true;\n }", "title": "" }, { "docid": "8029815d4565a5d7157138f34f6dfcfc", "score": "0.53714", "text": "function initData() {\n\t\tif (isset($this->monograph)) {\n\t\t\t$this->_data = array(\n\t\t\t\t'seriesId' => $this->monograph->getSeriesId(),\n\t\t\t\t'isEditedVolume' => $this->monograph->getWorkType(),\n\t\t\t\t'commentsToEditor' => $this->monograph->getCommentsToEditor()\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "b1bf604ddf7184fa4bb321faaa2ed830", "score": "0.53673404", "text": "private function setData() {\r\n $this->Data = array_map(\"strip_tags\", $this->Data);\r\n $this->Data = array_map(\"trim\", $this->Data);\r\n\r\n //retira excesso de espaços destes campos\r\n $this->Data['ex_observacao'] = str_replace('-', ' ', Check::Name($this->Data['ex_observacao']));\r\n $this->Data['ex_descricao'] = str_replace('-', ' ', Check::Name($this->Data['ex_descricao']));\r\n $this->Data['ex_status'] = (!empty($this->Data['ex_status']) ? $this->Data['ex_status'] : \"0\");\r\n $this->Data['ex_cancelado'] = (!empty($this->Data['ex_cancelado']) ? $this->Data['ex_cancelado'] : \"0\");\r\n }", "title": "" }, { "docid": "b4a7e0e761b2af551752b813420a1806", "score": "0.5364556", "text": "function initData(){\t\t\tforeach($this->fields as $k){\t$this->data[$k]\t = '';\t\t}\t\t}", "title": "" }, { "docid": "188e05610489a3f750351314b4e128ee", "score": "0.53211933", "text": "private function prepareData(array &$data)\n {\n $this->prepareWebsitePagesData($data);\n $this->prepareExtraWebsitePagesData($data);\n }", "title": "" }, { "docid": "2f54d9c82b8d80796b2badbb8d836de2", "score": "0.53133136", "text": "protected function updateEventData()\n {\n if ($event = \\Input::post('event')) {\n foreach ($event as $k => $v) {\n if (strpos($k, 'edit_', 0) === false) {\n unset($event[$k]);\n } else {\n $n = substr($k, 5);\n $event[$n] = $v;\n unset($event[$k]);\n }\n }\n\n return $this->updateEvent($event);\n }\n }", "title": "" }, { "docid": "aa869596df6d2aaa86ceae6654c8d879", "score": "0.5271622", "text": "protected function prepareData()\n {\n\n $columns = $this->getColumnSettings(); \n \n $data = array();\n $header = array();\n $columnExtraRoles = array(\"annotation\",\"annotationText\",\"certainty\",\"emphasis\",\"interval\",\"scope\",\"style\",\"tooltip\");\n foreach($columns as $cKey=>$cSetting)\n {\n array_push($header,\"\".Utility::get($cSetting,\"label\",$cKey));\n foreach($columnExtraRoles as $cRole)\n {\n if(isset($cSetting[$cRole]))\n {\n array_push($header,array(\n \"role\"=>$cRole\n ));\n }\n }\n }\n array_push($data,$header);\n \n \n $this->dataStore->popStart();\n while($row = $this->dataStore->pop())\n {\n $gRow = array();\n foreach($columns as $cKey=>$cSetting)\n {\n $value = $row[$cKey];\n $cType = Utility::get($cSetting,\"type\",\"unknown\");\n if($cType===\"number\")\n {\n $value = floatval($value);\n }\n $fValue = $this->formatValue($value,$cSetting,$row);\n\n array_push($gRow,\n ($fValue===$value)?\n $value:\n array(\"v\"=>$value,\"f\"=>$fValue)\n );\n \n foreach($columnExtraRoles as $cRole)\n {\n if(isset($cSetting[$cRole]))\n {\n array_push($gRow,\n (gettype($cSetting[$cRole])==\"object\")?\n $cSetting[$cRole]($row):\n $cSetting[$cRole]\n );\n }\n }\n }\n array_push($data,$gRow);\n }\n return $data;\n }", "title": "" }, { "docid": "aa869596df6d2aaa86ceae6654c8d879", "score": "0.5271622", "text": "protected function prepareData()\n {\n\n $columns = $this->getColumnSettings(); \n \n $data = array();\n $header = array();\n $columnExtraRoles = array(\"annotation\",\"annotationText\",\"certainty\",\"emphasis\",\"interval\",\"scope\",\"style\",\"tooltip\");\n foreach($columns as $cKey=>$cSetting)\n {\n array_push($header,\"\".Utility::get($cSetting,\"label\",$cKey));\n foreach($columnExtraRoles as $cRole)\n {\n if(isset($cSetting[$cRole]))\n {\n array_push($header,array(\n \"role\"=>$cRole\n ));\n }\n }\n }\n array_push($data,$header);\n \n \n $this->dataStore->popStart();\n while($row = $this->dataStore->pop())\n {\n $gRow = array();\n foreach($columns as $cKey=>$cSetting)\n {\n $value = $row[$cKey];\n $cType = Utility::get($cSetting,\"type\",\"unknown\");\n if($cType===\"number\")\n {\n $value = floatval($value);\n }\n $fValue = $this->formatValue($value,$cSetting,$row);\n\n array_push($gRow,\n ($fValue===$value)?\n $value:\n array(\"v\"=>$value,\"f\"=>$fValue)\n );\n \n foreach($columnExtraRoles as $cRole)\n {\n if(isset($cSetting[$cRole]))\n {\n array_push($gRow,\n (gettype($cSetting[$cRole])==\"object\")?\n $cSetting[$cRole]($row):\n $cSetting[$cRole]\n );\n }\n }\n }\n array_push($data,$gRow);\n }\n return $data;\n }", "title": "" }, { "docid": "52d629c910400d58d2da82cdffb31af5", "score": "0.52547985", "text": "public function getEvtData()\n {\n // Define inputs that are required for all requests\n $requiredInputs = array(\n 'KEY' => array('char_digit', 32, 1, App_Constants::getFormLabel('SESSION_ID')),\n 'IDENTIFIER' => array('device_id', 100, 1, App_Constants::getFormLabel('DEVICE_ID')),\n );\n \n // Make sure input array is set\n if (!isset($this->_evt_data['inputs']) || !is_array($this->_evt_data['inputs'])) {\n $this->_evt_data['inputs'] = array();\n }\n\n // Add required inputs to list of existing inputs\n $this->_evt_data['inputs'] = array_merge($this->_evt_data['inputs'], $requiredInputs);\n\n //\n return parent::getEvtData();\n }", "title": "" }, { "docid": "66a3306d02885a9cfee94ee7a33a6157", "score": "0.5242727", "text": "public function prepareData()\n {\n $layoutData = $this->prepareLayoutData();\n $pageData = $this->preparePageData();\n\n $this\n ->addLayout($layoutData)\n ->addPage($pageData['slug'], $pageData['data'])\n ;\n }", "title": "" }, { "docid": "24e4650d52020ad996b9182f1da4b403", "score": "0.5235992", "text": "private function setData()\n {\n $this->Data = array_map('strip_tags', $this->Data);\n $this->Data = array_map('trim', $this->Data);\n }", "title": "" }, { "docid": "25b0903e095d41716dd6acf84eb400af", "score": "0.5233137", "text": "function initData() {\r\n \r\n\t}", "title": "" }, { "docid": "a925f5c48245d6b2bf4f3d713679f1ee", "score": "0.5208614", "text": "function testData(MediatorEvent $Event) {\n $arguments = $Event->getArguments();\n // This is a reference so we can pass along the appropriate keys we add to\n // $array in the code below.\n $array =& $arguments[0];\n $array['target'] = $Event->getTarget();\n $array['eventName'] = $Event->getEventName();\n}", "title": "" }, { "docid": "d69fdc3643091d094f6d282f242b5f31", "score": "0.519929", "text": "function processData() {\r\r\n if (is_array($this->data) && isset($this->data['args']))\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if (is_array($this->data) && isset($this->data['value'])) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n $this->data = trim(str_replace(array(\"\\n\", ' '), array(\"\", ' '), $this->data));\r\r\n $this->inputs = explode(' ', $this->data);\r\r\n foreach ($this->inputs as $k => $v) {\r\r\n if ($v == '')\r\r\n unset($this->inputs[$k]);\r\r\n }\r\r\n }", "title": "" }, { "docid": "a199aba0595cbaa1ff62c3d3ddced9b2", "score": "0.51889205", "text": "protected function onInit()\n {\n $this->data = array();\n }", "title": "" }, { "docid": "06ad4ba25c86c5c741a880e3f5306446", "score": "0.51873124", "text": "public function beforeMarshal(\\Cake\\Event\\Event $event, \\ArrayObject $data) {\n if(!isset($data['listing_id'])){\n if(\\Cake\\Core\\Configure::read('LISTING_ID')){\n $data['listing_id'] = \\Cake\\Core\\Configure::read('LISTING_ID');\n }\n }\n }", "title": "" }, { "docid": "8d61ed58e103c22d47721b86d7e6a1cf", "score": "0.517754", "text": "public function __construct_EventTrait(...$data)\n\t\t{\n\t\t\t$data = $this->__eventTrait_unpackData($data);\n\n\t\t\tif (isset($data[\"timestamp\"]))\n\t\t\t{\n\t\t\t\tif (is_string($data[\"timestamp\"]))\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$date = new DateTime($data[\"timestamp\"]);\n\t\t\t\t\t\t$data[\"timestamp\"] = $date->format(\"U.u\");\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new ToDo(); // Data type exception needed\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!is_numeric($data[\"timestamp\"]))\n\t\t\t\t\tthrow new ToDo(); // Data type exception needed\n\t\t\t}\n\t\t\telse\n\t\t\t\t$data[\"timestamp\"] = microtime(TRUE);\n\n\t\t\tforeach($data as $key => &$value)\n\t\t\t\t$this->data[$key] = &$value;\n\t\t}", "title": "" }, { "docid": "26a1978616d744aa57875440faf3361a", "score": "0.5172531", "text": "public function fromArray(array $data)\n {\n\n $this->event_id = $data['event_id'] ?? null;\n $this->sponsor_id = $data['sponsor_id'] ?? null;\n $this->value = $data['value'] ?? null;\n\n }", "title": "" }, { "docid": "5d93c2df66eaf5756cb2cab67de6e300", "score": "0.5152642", "text": "private function prepareTransactionData()\n {\n foreach ($this->rows as $row) {\n $this->storeTransactionForSave($row);\n }\n }", "title": "" }, { "docid": "1b4704a56696fce41cccb709b204c62d", "score": "0.51508045", "text": "function prepare_data($str) {\n\t\t$need_ser = false;\n\t\tif (is_string($str) && jacqueline_substr($str, 0, 2)=='a:') {\n\t\t\t$str = jacqueline_unserialize($str);\n\t\t\t$need_ser = is_array($str);\n\t\t}\n\t\tif (is_array($str) && count($str) > 0) {\n\t\t\tforeach ($str as $k=>$v) {\n\t\t\t\t$str[$k] = $this->prepare_data($v);\n\t\t\t}\n\t\t} else if (is_string($str)) {\n\t\t\t// Replace developers domain to demo domain\n\t\t\tif ($this->options['files'][$this->options['demo_type']]['domain_dev']!=$this->options['files'][$this->options['demo_type']]['domain_demo'])\n\t\t\t\t$str = str_replace($this->options['files'][$this->options['demo_type']]['domain_dev'], $this->options['files'][$this->options['demo_type']]['domain_demo'], $str);\n\t\t\t// Replace DOS-style line endings to UNIX-style\n\t\t\t$str = str_replace(\"\\r\\n\", \"\\n\", $str);\n\t\t}\n\t\tif ($need_ser) $str = serialize($str);\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "5eecb16aa3cd86e93a64b5e867a97148", "score": "0.514837", "text": "protected function populateData(array $data=array()) {\n\t\t\n\t\t// First, let's assign the raw data to the raw data value.\n\t\t$this->rawData = $data;\n\t\t\n\t\t// Now let's process this data.\n\t\tforeach($data as $k => $v) {\n\t\t\t$this->set($k, $v);\n\t\t}\n\t}", "title": "" }, { "docid": "33a5a905db43aa68031d0ca55aa151a8", "score": "0.5140478", "text": "private static function _cookData($data) {\n\t\t$tmp = array();\n if(isset($data['adgroup_id'])) $tmp['adgroup_id'] = $data['adgroup_id'];\n\t\tif(isset($data['advertiser_uid'])) $tmp['advertiser_uid'] = $data['advertiser_uid'];\n if(isset($data['adgroup_name'])) $tmp['adgroup_name'] = $data['adgroup_name'];\n if(isset($data['local_config'])) $tmp['local_config'] = json_encode ($data['local_config']);\n if(isset($data['config'])) $tmp['config'] = json_encode ($data['config']);\n if(isset($data['sync_status'])) $tmp['sync_status'] = $data['sync_status'];\n if(isset($data['sync_response'])) $tmp['sync_response'] = json_encode ($data['sync_response']);\n if(isset($data['del'])) $tmp['del'] = $data['del'];\n if(isset($data['create_time'])) $tmp['create_time'] = $data['create_time'];\n if(isset($data['update_time'])) $tmp['update_time'] = $data['update_time'];\n\t\treturn $tmp;\n\t}", "title": "" }, { "docid": "46e1fff6833ef0ee474fe2f3683bedb0", "score": "0.51374817", "text": "public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options)\n {\n $validator = $this->_table->validator();\n $dataArray = $data->getArrayCopy();\n foreach (array_keys($this->config()) as $field) {\n if (!$validator->isEmptyAllowed($field, false)) {\n continue;\n }\n if (Hash::get($dataArray, $field . '.error') !== UPLOAD_ERR_NO_FILE) {\n continue;\n }\n unset($data[$field]);\n }\n }", "title": "" }, { "docid": "6dea8fcf0e93fed3f0d5ee23ba79dd08", "score": "0.51297224", "text": "protected function explodeData()\n {\n foreach (explode(\"\\r\\n\", trim($this->rawData[1])) as $fieldString) {\n preg_match('/(.*):\\s?(.*)/', $fieldString, $fieldArray);\n\n $this->data[$fieldArray[1]] = $fieldArray[2];\n }\n\n $this->data['body'] = trim($this->rawData[2]);\n }", "title": "" }, { "docid": "d761cfbd8e63f07c6fc49c7422f83051", "score": "0.50916547", "text": "public function prepare($data);", "title": "" }, { "docid": "c515e4c14783e816e34a4760858890e7", "score": "0.508127", "text": "protected function prep_data ($data = '')\n\t{\n\t\tif ( ! is_array($data))\n\t\t{\n\t\t\t$data = $this->fob()->actions()->pipe_split((string) $data);\n\t\t}\n\n\t\tif ( ! isset($data['form']))\n\t\t{\n\t\t\tif (isset($data[0]) AND\n\t\t\t\t$this->fob()->is_positive_intlike($data[0]))\n\t\t\t{\n\t\t\t\t$data['form'] = $data[0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['form'] = '';\n\t\t\t}\n\t\t}\n\n\t\tif ( ! isset($data['return']))\n\t\t{\n\t\t\tif (isset($data[1]) AND is_string($data[1]))\n\t\t\t{\n\t\t\t\t$data['return'] = $data[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['return'] = '';\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "03ec594e4ec6c156363f16d5ecca779e", "score": "0.5072412", "text": "function _prepare_allnews($data)\n {\n if(is_array($data) && count($data) > 0)\n {\n foreach($data as $key=>$val)\n {\n \n }\n }\n else\n {\n $data = array();\n }\n return $data;\n }", "title": "" }, { "docid": "a076f95c5cd6b3793afb185b0a8ae138", "score": "0.5066025", "text": "public function prepareData()\n\t{\n\t\t// Init\n\t\t$album = array();\n\n\t\t// Set unchanged attributes\n\t\t$album['id'] = $this->id;\n\t\t$album['title'] = $this->title;\n\t\t$album['public'] = strval($this->public);\n\t\t$album['hidden'] = strval($this->visible_hidden);\n\t\t$album['parent_id'] = $this->parent_id;\n\n\t\t// Additional attributes\n\t\t// Only part of $album when available\n\t\t$album['description'] = strval($this->description);\n\t\t$album['visible'] = strval($this->visible_hidden);\n\t\t$album['downloadable'] = strval($this->downloadable);\n\n\t\t// Parse date\n\t\t$album['sysdate'] = $this->created_at->format('F Y');\n\t\t$album['min_takestamp'] = $this->min_takestamp == null ? '' : $this->min_takestamp->format('M Y');\n\t\t$album['max_takestamp'] = $this->max_takestamp == null ? '' : $this->max_takestamp->format('M Y');\n\n\t\t// Parse password\n\t\t$album['password'] = ($this->password == '' ? '0' : '1');\n\n\t\t$album['license'] = $this->license == 'none' ? Configs::get_value('default_license') : $this->license;\n\n\t\t$album['owner'] = $this->owner->username;\n\n\t\t$album['thumbs'] = array();\n\t\t$album['thumbs2x'] = array();\n\t\t$album['types'] = array();\n\n\t\treturn $album;\n\t}", "title": "" }, { "docid": "deda03d6c814ddf70c9e8974cf4e4949", "score": "0.5065222", "text": "function transformEventData($array) {\n\t$r= array();\n foreach ($array as $k => $v) {\n\t\t$r[basename($v['p']['value'])]=$v['o'];\n\t}\n\treturn $r;\n}", "title": "" }, { "docid": "f5d2bf09a096595e39cb7616ac218465", "score": "0.50640064", "text": "public function onEaiWriteRawDataOutStart(EaiEvent $event)\n {\n $connector = $event->getObj();\n $connector->setRawData(array($connector->getRawData()));\n }", "title": "" }, { "docid": "14f6dc21b992fe9c6446a4cab2e53cfb", "score": "0.5060882", "text": "public function CoreEventDataUpdate()\n {\n $this->loadData();\n }", "title": "" }, { "docid": "f17608019d87bc8edb29c1c5a99e590a", "score": "0.5059221", "text": "function setEvent($dataArr, $debug = false){\n\n if(empty($dataArr))\n throw new Exception(\"No Data found\");\n\n $event = new event();\n $date = \"\";\n $flag = 0;\n\n //Date-match: '13.04.2016', '05 .12. 2017'\n $datePattern1 = '{.*?(\\d\\d?)(\\s*)?[\\\\/\\.\\-](\\s*)?([\\d]{2})(\\s*)?[\\\\/\\.\\-](\\s*)?([\\d]{4})}';\n //Date-match: 'Montag 12. Jänner 2012'\n $datePattern2 = \"/(Montag?|Dienstag?|Mittwoch?|Donnerstag?|Freitag?|Samstag?|Sonntag?)\\s+\\d{1,2}\\.?\\s+(Januar?|Jan(när)?|Feb(ruar)?|Mär(z)?|Apr(il)?|Mai|Jun(i)?|Jul(i)?|Aug(ust)?|Sep(tember)?|Okt(ober)?|Nov(ember)?|Dez(ember)?)\\s+\\d{4}/\";\n //Date-match: '13. August', '09.April'\n $datePattern3 = \"/\\d{1,2}.\\s*(Januar?|Jan(när)?|Feb(ruar)?|Mär(z)?|Apr(il)?|Mai|Jun(i)?|Jul(i)?|Aug(ust)?|Sep(tember)?|Okt(ober)?|Nov(ember)?|Dez(ember)?)/\";\n //$datePattern3 = \"/\\d{1,2}.\\s*(Januar?|Jan(när)?|Feb(ruar)?|Mär(z)?|Apr(il)?|Mai|Jun(i)?|Jul(i)?|Aug(ust)?|Sep(tember)?|Okt(ober)?|Nov(ember)?|Dez(ember)?)\\s*(19[5-9][0-9]|20[0-9][0-9])/\";\n //Time-match: '18 Uhr'\n $timePattern1 = \"/^([0-9]{2}(\\s|\\.|\\-)?\\s*Uhr)/\";\n //Time-match: '16:00 - 9:00 Uhr', '16:00 bis 9:00 Uhr', '16:00 Uhr bis 9:00 Uhr'\n $timePattern2 = \"/(([0-2]?[0-9](\\:|\\/\\s)[0-5]?[0-9]?)\\s*((U|u)hr)*\\s*(\\-|\\/\\s*|bis)\\s*([0-2]?[0-9](\\:|\\/\\s\\.)[0-5][0-9]))/\";\n //Time-match: '16:00', '9:00 Uhr'\n $timePattern3 = \"/([0-2]?[0-9](\\:|\\/\\s)[0-5][0-9])/\";\n //Get week days ('montag','Dienstag',..);\n $weekDay = \"/((M|m)ontag?|(D|d)ienstag?|(M|m)ittwoch?|(D|d)onnerstag?|(F|f)reitag?|(S|s)amstag?|(S|s)onntag?)/\";\n\n foreach($dataArr as $data){\n if(preg_match(\"/((W|w)eihnacht|(A|a)dvent)(s)(feier)/\", $data))\n throw new Exception('Weihnachtsfeier!');\n\n //echo $debug ? \"<script>console.log( 'Data \" . key($dataArr) . \": \" . $data . \"' );</script>\" : \"\";\n /*** Add TIME ***/\n $time = \"\";\n if($event->time == \"\"){\n if(preg_match($timePattern2, $data, $output_array)){\n $time = $output_array[0];\n $data = preg_replace($timePattern2, '', $data);\n $data = str_replace('Uhr', '', $data);\n $data = str_replace('uhr', '', $data);\n //echo $debug ? \"<script>console.log( 'timePattern2: \" . $time . \"' );</script>\" : \"\";\n }\n else if( preg_match($timePattern3, $data, $output_array)){\n $time = $output_array[0];\n $data = preg_replace($timePattern3, '', $data);\n $data = str_replace('Uhr', '', $data);\n $data = str_replace('uhr', '', $data);\n //echo $debug ? \"<script>console.log( 'timePattern3: \" . $time . \"' );</script>\" : \"\";\n }\n else if(preg_match($timePattern1, $data, $output_array)){\n $time = $output_array[0];\n $data = preg_replace($timePattern1, '', $data);\n $data = str_replace('Uhr', '', $data);\n $data = str_replace('uhr', '', $data);\n // echo $debug ? \"<script>console.log( 'timePattern1: \" . $time . \"' );</script>\" : \"\";\n }\n //echo $debug ? \"<script>console.log( 'Final Time: \" . $time . \"' );</script>\" : \"\";\n $event->time = $time;\n }\n\n /*** Add DATE ***/\n //echo \"<script>console.log( '1.Data: \" . $data . \"' );</script>\";\n if( !$event->hasDate() ){\n\n\n\n if(preg_match($datePattern1, $data)){\n $flag = 1;\n $date = clean($data, \"date\");\n }\n if(preg_match($datePattern2, $data)){\n $flag = 2;\n $date = clean($data, \"date\");\n }\n //Add year for 'dd. Month'\n if(preg_match($datePattern3, $data, $result)){\n $flag = 3;\n $date = clean($result[0].\" \" . date(\"Y\") , \"date\");\n\n }\n\n\n //convert string to date\n //clean the date (Parse String to format YYYY-MM-DD)\n if($flag != 0){\n $event->setDate( date_grab($date, $flag, $debug) );\n $flag = 0;\n //echo $debug ? \"<script>console.log( 'Date \".$flag.\" (final): \" . $event->date->format('d.m.Y') . \"' );</script>\" : \"\";\n\n }\n\n\n\n /*** Add LOCATION ***/\n }else if(!$event->hasLocation() && isLocation($data)){\n $event->setLocation( clean($data, \"text\") );\n\n //Filter content\n }else if( (!preg_match($weekDay, $data)) && (!preg_match(\"/((K|k)affeetreffen)/\", $data)) && (!preg_match(\"/((A|a)dvent)/\", $data)) && (!preg_match(\"/((W|w)eihnachts(feier|))/\", $data)) && (strpos($event->content, \"entfällt\") === false) ){\n\n if( !$event->hasSpeaker() && isPerson($data) ){\n /*** Add SPEAKER ***/\n $event->setSpeaker(clean($data, \"text\"));\n\n /*** Add CONTENT ***/\n }else if($event->content == \"\"){\n\n if(!isPerson($data) && !preg_match($datePattern1, $data) && !preg_match($datePattern2, $data) && !preg_match($datePattern3, $data))\n $event->content = clean($data, \"text\");\n\n }else{\n if((strpos($event->content, $data) !== false)){\n //Add ADDITIONAL CONTENT\n $content2 = \"<br />\";\n $content2 .= clean($data, \"text\");\n $event->content .= $content2;\n }\n }\n\n }//END if-else\n\n\n\n //Add TAG\n if($event->content != \"\")\n $event->setTag(getTag($event->content,$event->url));\n\n }\n return $event;\n}", "title": "" }, { "docid": "a6b057f3ad4e37551d70d30df36a1f1f", "score": "0.5058656", "text": "public function to_array(){\n\t\t\t\n\t\t\t$array = json_decode( $this->in, true );\n\t\t\t\n\t\t\tif( !empty( $array ) )\n\t\t\t\t$this->data = $array;\n\t\t}", "title": "" }, { "docid": "23f92200fa21fcadd13ce24b62630c25", "score": "0.5053932", "text": "protected function _prepareData() {\n\n \tif ($this->_folder == null) {\n return;\n }\n\n\t\t$this->_ls_description = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->description);\n $this->_ls_text = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->text);\n $this->_ls_passwordhint = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->passwordhint);\n\n /**\n * @var EventgalleryLibraryFactoryImagetypeset $imagetypesetFactory\n */\n $imagetypesetFactory = EventgalleryLibraryFactoryImagetypeset::getInstance();\n\n if ($this->_folder->imagetypesetid == null) {\n $this->_imagetypeset = $imagetypesetFactory->getDefaultImageTypeSet(true);\n } else {\n $this->_imagetypeset = $imagetypesetFactory->getImageTypeSet($this->_folder->imagetypesetid);\n if (!$this->_imagetypeset->isPublished()) {\n $this->_imagetypeset = $imagetypesetFactory->getDefaultImageTypeSet(true);\n }\n }\n }", "title": "" }, { "docid": "d6aefac256558c9917522795e7969dd8", "score": "0.5053432", "text": "private function __eventTrait_unpackData($data)\n\t\t{\n\t\t\t$newData = [];\n\t\t\t$strings = [];\n\t\t\t$unindexedObjectsByClass = [];\n\t\t\tforeach($data as $arg)\n\t\t\t{\n\t\t\t\tif (is_string($arg) && !is_numeric($arg))\n\t\t\t\t{\n\t\t\t\t\t$strings[] = $arg;\n\t\t\t\t}\n\n\t\t\t\telse if (is_array($arg))\n\t\t\t\t{\n\t\t\t\t\tforeach( $arg as $nestedKey => $nestedData )\n\t\t\t\t\t{\n\t\t\t\t\t\t$newData[$nestedKey] = $nestedData;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (is_object($arg))\n\t\t\t\t{\n\t\t\t\t\t$className = get_class($arg);\n\t\t\t\t\t$unindexedObjectsByClass[$className][] = $arg;\n\t\t\t\t}\n\t\t\t\t// ToDo: arbtrary, unindexed numbers?\n\t\t\t}\n\n\n\t\t\t// name will be the shortest string, message, the concatenation of the remainder, if not provided via the arbitrary indexed data\n\t\t\tif ($strings && !array_key_exists(\"name\", $newData))\n\t\t\t\t$newData[\"name\"] = array_shift($strings);\n\n\t\t\tif ($strings && !isset($newData[\"message\"]))\n\t\t\t\t$newData[\"message\"] = implode(\"\\n\", $strings);\n\n\t\t\tif ($strings && !isset($newData[\"strings\"]))\n\t\t\t\t$newData[\"strings\"] = $strings;\n\n\t\t\tforeach($unindexedObjectsByClass as $className => $list)\n\t\t\t{\n\t\t\t\tif (isset($newData[$className]))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t/* ex.\tlog(\"Message\", $userInstance, $foobarInstance1, $foobarInstance2) \n\t\t\t\t\tresult: [ \\User => $user, \\Foobar => [ $foobarInstance1, $foobarInstance2 ]]\n\t\t\t\t*/\n\t\t\t\tif (count($list) == 1) \n\t\t\t\t\t$newData[$className] = reset($list);\n\t\t\t\telse\n\t\t\t\t\t$newData[$className] = $list;\n\t\t\t}\n\n\t\t\treturn $newData;\n\t\t}", "title": "" }, { "docid": "4e41cc4d7d7f7dfc7227be79306f9ba6", "score": "0.50383246", "text": "function getEventTitleGeneratorData()\n {\n $events = new StdClass();\n $events->firstpart = array(\"PHP\", \"Perl\", \"Python\", \"Ruby\", \"C\", \"MySQL\", \"DevOp\", \"Linux\", \"Debian\", \"CentOS\", \"Zend\", \"Developer\", \"Web\", \"Symfony\", \"Apache\", \"Computer\", \"IT\", \"Dev\");\n $events->lastpart = array(\"Con\", \"Conf\", \" meetup\", \"UUG\", \" day\", \"Congress\");\n return $events;\n }", "title": "" }, { "docid": "b3ae514d398a0de3670d21edf0aa7080", "score": "0.50363594", "text": "private static function _cookData($data) {\n $tmp = array();\n if (isset($data['id'])) $tmp['id'] = intval($data['id']);\n if (isset($data['platform'])) $tmp['platform'] = $data['platform'];\n if (isset($data['device_name'])) $tmp['device_name'] = $data['device_name'];\n if (isset($data['imei_idfa'])) $tmp['imei_idfa'] = $data['imei_idfa'];\n if (isset($data['config'])) $tmp['config'] = $data['config'];\n if (isset($data['isReport'])) $tmp['isReport'] = $data['isReport'];\n if (isset($data['devMode'])) $tmp['devMode'] = $data['devMode'];\n if (isset($data['del'])) $tmp['del'] = $data['del'];\n $tmp['updatetime'] = Common::getTime();\n return $tmp;\n }", "title": "" }, { "docid": "b8be9ec7197dd4bf24a804f723814ba1", "score": "0.5014806", "text": "public static function prepareData($data)\n {\n $data = ($data !== false) ? $data : array();\n\n // Run the associated Hooks.\n $hooks = Hooks::get();\n\n $data['afterBody'] = $hooks->run('afterBody', $data['afterBody']);\n $data['css'] = $hooks->run('css', $data['css']);\n $data['js'] = $hooks->run('js', $data['js']);\n\n return $data;\n }", "title": "" }, { "docid": "30ed00d737c58fc3401f3046b29fe0ef", "score": "0.4997245", "text": "public function init() {\n extract($this->data);\n }", "title": "" }, { "docid": "6225493c52939c406baa2756b0d88274", "score": "0.49834582", "text": "private function init( $data ){\n\t\t\t\n\t\t\t$this->in = $data; \n\t\t\t$this->to_array();\n\t\t}", "title": "" }, { "docid": "deb3604351627bb37020a432a8d9cb40", "score": "0.49810272", "text": "public function prepareSeoData()\n {\n $this->meta_robots = explode(',', $this->meta_robots);\n $this->meta_googlebot = explode(',', $this->meta_googlebot);\n }", "title": "" }, { "docid": "9d2736a6bb2b7d3af8b034651cff4dba", "score": "0.49740198", "text": "function i_initSerializedDat( $sessDat ){\n\t\tif(is_array($sessDat)){\n\t\t\tparent::i_initSerializedDat($sessDat);\n\t\t\tif(defined('SHOP_TABLE')) {\n\t\t\t\tif ($this->canHaveVariants()) {\n\t\t\t\t\t$this->initVariantDataFromDb();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a8881bdbe3233f2c1c97a3e8ecf97c27", "score": "0.496168", "text": "protected function collect(Event $event)\r\n {\r\n // if event doesn't have data\r\n if ($event->isEmpty()) {\r\n throw new InvalidParamException(Yii::t(\"app\", \"The event has no data. There is nothing to collect.\"));\r\n }\r\n\r\n // Map tracker params to model properties\r\n $mapper = new Mapper();\r\n $mapper->map($event);\r\n\r\n // Mapped data\r\n $data = $mapper->getData();\r\n\r\n // Add collector data\r\n $data[\"collector_tstamp\"] = time(); // Unix Timestamp for the event recorded by the collector\r\n $data[\"v_collector\"] = \"1.0\"; // Collector version\r\n\r\n $this->data = $data;\r\n }", "title": "" }, { "docid": "40c8ad46e444a9b6ad86f15753eab359", "score": "0.4955846", "text": "public function getDataArr(){\n return [\n 'id'=>$this->metasourceId,\n 'type'=>$this->type,\n 'name'=>$this->name,\n 'ppDatasetId'=>$this->ppDatasetId,\n 'state'=>$this->state,\n 'size'=>$this->size\n ];\n }", "title": "" }, { "docid": "65f805e12466e6d28c983eea3d6847ad", "score": "0.49550414", "text": "public function prepareSaveData(array $data)\n {\n $data = $this->filterDisallowedData($data);\n $data = $this->preparePostData($data);\n return $data;\n }", "title": "" }, { "docid": "a138075279cd6dd7972307e15bb2751c", "score": "0.49503002", "text": "function initData() {\n\t\t$date = $this->getPublicationDate();\n\n\t\tif ($date) {\n\t\t\t$this->_data = array(\n\t\t\t\t'publicationDateId' => $date->getId(),\n\t\t\t\t'role' => $date->getRole(),\n\t\t\t\t'dateFormat' => $date->getDateFormat(),\n\t\t\t\t'date' => $date->getDate(),\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "573eb6be99c949ee9c4dce0c6b2b9e7a", "score": "0.4931985", "text": "protected function _prepareDataForSave($product, $productData) {\r\n //add your data processing algorithm here if needed\r\n }", "title": "" }, { "docid": "0d8fe599b5fd0c7b8ecd5b1fecbbe958", "score": "0.4930497", "text": "private static function _cookData($data) {\n $tmp = array();\n if(isset($data['id'])) $tmp['id'] = $data['id'];\n if(isset($data['sort'])) $tmp['sort'] = intval($data['sort']);\n if(isset($data['name'])) $tmp['name'] = $data['name'];\n if(isset($data['resume'])) $tmp['resume'] = $data['resume'];\n if(isset($data['label'])) $tmp['label'] = $data['label'];\n if(isset($data['img'])) $tmp['img'] = $data['img'];\n if(isset($data['mid_img'])) $tmp['mid_img'] = $data['mid_img'];\n if(isset($data['big_img'])) $tmp['big_img'] = $data['big_img'];\n if(isset($data['language'])) $tmp['language'] = $data['language'];\n if(isset($data['price'])) $tmp['price'] = $data['price'];\n if(isset($data['package'])) $tmp['package'] = $data['package'];\n if(isset($data['packagecrc'])) $tmp['packagecrc'] = $data['packagecrc'];\n if(isset($data['company'])) $tmp['company'] = $data['company'];\n if(isset($data['descrip'])) $tmp['descrip'] = $data['descrip'];\n if(isset($data['tgcontent'])) $tmp['tgcontent'] = $data['tgcontent'];\n if(isset($data['create_time'])) $tmp['create_time'] = intval($data['create_time']);\n if(isset($data['status'])) $tmp['status'] = $data['status'];\n if(isset($data['ids'])) $tmp['ids'] = $data['ids'];\n if(isset($data['hot'])) $tmp['hot'] = $data['hot'];\n if(isset($data['st'])) $tmp['st'] = $data['st'];\n if(isset($data['category_id'])) $tmp['category_id'] = $data['category_id'];\n if(isset($data['cooperate'])) $tmp['cooperate'] = $data['cooperate'];\n if(isset($data['developer'])) $tmp['developer'] = $data['developer'];\n if(isset($data['certificate'])) $tmp['certificate'] = $data['certificate'];\n if(isset($data['appid'])) $tmp['appid'] = intval($data['appid']);\n if(isset($data['online_time'])) $tmp['online_time'] =$data['online_time'];\n if(isset($data['secret_key'])) $tmp['secret_key'] = $data['secret_key'];\n if(isset($data['api_key'])) $tmp['api_key'] = $data['api_key'];\n if(isset($data['agent'])) $tmp['agent'] = $data['agent'];\n if(isset($data['level'])) $tmp['level'] = $data['level'];\n if(isset($data['download_status'])) $tmp['download_status'] = intval($data['download_status']);\n if(isset($data['downloads'])) $tmp['downloads'] = intval($data['downloads']);\n if(isset($data['default_downloads'])) $tmp['default_downloads'] = intval($data['default_downloads']);\n if(isset($data['month_downloads'])) $tmp['month_downloads'] = intval($data['month_downloads']);\n if(isset($data['webp'])) $tmp['webp'] = intval($data['webp']);\n return $tmp;\n }", "title": "" }, { "docid": "73df1b2ab412a62ad47e940ac17b821b", "score": "0.49214745", "text": "function collapseREDCapDataEvents( $data = array() )\n{\n $collapsedData = array();\n foreach( $data as $record => $events )\n {\n $collapsedData[$record] = array();\n foreach( $events as $eventId => $eventData )\n {\n foreach( $eventData as $field=>$value )\n {\n if( is_array($value) && count($value) > 0 )\n $collapsedData[$record][$field] = $value;\n \n if( is_string($value) && trim($value) !== '' )\n $collapsedData[$record][$field] = $value;\n }\n }\n }\n \n \n ## Returned array looks like;\n ## array( 'record_id' => array( 'field1' => 'value1', 'field2' => 'value2' ) )\n return $collapsedData;\n}", "title": "" }, { "docid": "e2936e1f1ce4e979c5ca8505e87fa6ee", "score": "0.49206236", "text": "private static function _cookData($data) {\n $tmp = array();\n if(isset($data['item_id'])) $tmp['item_id'] = $data['item_id'];\n if(isset($data['category_id'])) $tmp['category_id'] = $data['category_id'];\n if(isset($data['channel_id'])) $tmp['channel_id'] = $data['channel_id'];\n if(isset($data['price'])) $tmp['price'] = $data['price'];\n if(isset($data['price_pos'])) $tmp['price_pos'] = $data['price_pos'];\n if(isset($data['sale_num'])) $tmp['sale_num'] = $data['sale_num'];\n if(isset($data['status'])) $tmp['status'] = $data['status'];\n if(isset($data['sort'])) $tmp['sort'] = $data['sort'];\n if(isset($data['zhe'])) $tmp['zhe'] = $data['zhe'];\n if(isset($data['request_count'])) $tmp['request_count'] = $data['request_count'];\n return $tmp;\n }", "title": "" }, { "docid": "3ca2aa02ba070e2da2a2ff5fc9ac05a5", "score": "0.49198014", "text": "public function onPreCreate(DataEvent $event)\n {\n $object = $event->getData();\n if ($object instanceof RfidLog) {\n //get an older log with same EPC enabled if any\n $olderEnabled = $this->managerRegistry->getRepository('RfidBundle:RfidLog')->getOlderEnabledByEpc($object);\n // if any, set it to false\n if ($olderEnabled) {\n $olderEnabled->setEnabled(false);\n \n if (null ===$object->getStatus()){$object->setStatus($olderEnabled->getStatus());}\n if (null ===$object->getZone()){$object->setZone($olderEnabled->getZone());}\n if (null === $object->getDamaged()){$object->setDamaged($olderEnabled->getDamaged());}\n if (null ===$object->getProduct()){$object->setProduct($olderEnabled->getProduct());}\n }\n // if none, check if there is an newer one\n else\n {\n $logEnabled = $this->managerRegistry->getRepository('RfidBundle:RfidLog')->getEnabledByEpc($object);\n if ($logEnabled) {\n $object->setEnabled(false);\n }\n }\n $object->setStore($object->getZone()->getStore());\n }\n }", "title": "" }, { "docid": "684b6a4476dacc6b98700b26728b6ce0", "score": "0.49196804", "text": "public function providePreSetData()\n {\n return array(\n array(false, 0),\n array(true, 1)\n );\n }", "title": "" }, { "docid": "c67f27e4db9e2610e65346d47d7984fb", "score": "0.4908114", "text": "protected static function setData() {\n\n self::$data = array(\n 0 =>\n array(\n 'id' => 1,\n 'nombre' => 'Venezolano(a)',\n 'abreviatura' => 'V',\n ),\n 1 =>\n array(\n 'id' => 2,\n 'nombre' => 'Extrangero(a)',\n 'abreviatura' => 'E',\n ),\n 2 =>\n array(\n 'id' => 3,\n 'nombre' => 'Con Pasaporte',\n 'abreviatura' => 'P',\n ),\n );\n }", "title": "" }, { "docid": "0fb71c9569f6b37119d4960b118191e4", "score": "0.489847", "text": "function reconstructData()\n {\n $numberOfResults = count($this->resultsDetail);\n $detail = $this->resultsDetail;\n\n for($i = 0; $i < $numberOfResults; $i++){ \n $this->resultsDetailArray[] = [\n 'title' => $detail[$i]->titleNoFormatting,\n 'url' => $detail[$i]->unescapedUrl,\n 'width' => $detail[$i]->width,\n 'height' => $detail[$i]->height,\n 'website' => $detail[$i]->visibleUrl\n ];\n $this->imageTitle[$i] = $detail[$i]->titleNoFormatting;\n $this->imageURL[$i] = $detail[$i]->unescapedUrl;\n $this->imageWidth[$i] = $detail[$i]->width;\n $this->imageHeight[$i] = $detail[$i]->height;\n $this->imageWebsiteURL[$i] = $detail[$i]->visibleUrl;\n } \n }", "title": "" }, { "docid": "c81484a1d4697c56b9bbe7ec347d386f", "score": "0.48984206", "text": "public function prepareData() {\n @\\API\\PlainUrl::registerTokenTypeChecker(\"language\", function ($token, $position, $no_grp_position) {\n $accept_language = [ \"en\", \"cs\", \"cs_CZ\", \"en_US\" ];\n if ($position === 0) {\n return in_array($token, $accept_language);\n }\n else {\n return false;\n }\n });\n\n @\\API\\PlainUrl::registerTokenTypeChecker(\"token\", function ($token, $position, $no_grp_position, &$custom_data) {\n if (\\Nette\\Utils\\Strings::startsWith($token, \"token-\")) {\n $custom_data = [\n \"token\" => \\Nette\\Utils\\Strings::after($token, \"-\")\n ];\n\n return true;\n }\n\n return false;\n });\n\n @\\API\\PlainUrl::registerTokenTypeChecker(\"version\", function ($token, $position, $no_grp_position, &$custom_data) {\n $version_regex = \"/^v?(?<main>[0-9]+)(?:\\.(?<sub>[0-9]+))?$/mi\";\n if ($no_grp_position === 0 && preg_match($version_regex, $token, $matches)) {\n\n $custom_data = [\n \"version\" => $matches[\"main\"],\n \"main\" => $matches[\"main\"],\n ];\n\n if (!empty($matches[\"sub\"])) {\n $custom_data[\"sub\"] = $matches[\"sub\"];\n $custom_data[\"version\"] .= \".{$custom_data[\"sub\"]}\";\n }\n else $custom_data[\"version\"] .= \".0\";\n\n return true;\n\n }\n else {\n return false;\n }\n });\n }", "title": "" }, { "docid": "a83ba143e2d9641836d8f124fab3dd16", "score": "0.48978812", "text": "public function __construct($event) {\n\t\tif (is_array($event)) {\n\t\t\t$this->id = $event['event_id'];\n\t\t\t$this->title = $event['event_title'];\n\t\t\t$this->etype_id = $event['event_etype_id'];\n\t\t\t$this->location_id = $event['event_location_id'];\n\t\t\t$this->location_name = $event['dealer_name'];\n\t\t\t$this->description = $event['event_desc'];\n\t\t\t$this->start = $event['event_start'];\n\t\t\t$this->end = $event['event_end'];\n\t\t} else {\n\t\t\tthrow new Exception(\"No event data was supplied.\");\n\t\t}\n\t}", "title": "" }, { "docid": "5fb2590d307b72e40b8a8c76425e1098", "score": "0.4869522", "text": "protected function checkEventData(){\n if(!is_array($this->aEvent)){\n trigger_error('Event dispather called without AMI_ModListActions::setActionData()', E_USER_ERROR);\n }\n }", "title": "" }, { "docid": "517d1122587d06122ad30c7e3cd3bf44", "score": "0.4865882", "text": "public function prepareDetailsData()\n {\n $array = $this->picalcdata->getData();\n $this->setDetailsTotalAmount($array['total_amount']);\n $this->setDetailsAmount($array['amount']);\n $this->setDetailsInterestRate($array['interest_rate']);\n $this->setDetailsInterestAmount($array['interest_amount']);\n $this->setDetailsServiceCharge($array['service_charge']);\n $this->setDetailsAnnualPercentageRate($array['annual_percentage_rate']);\n $this->setDetailsMonthlyDebitInterest($array['monthly_debit_interest']);\n $this->setDetailsNumberOfRates($array['number_of_rates']);\n $this->setDetailsRate($array['rate']);\n $this->setDetailsLastRate($array['last_rate']);\n }", "title": "" }, { "docid": "37697f26ce8f5de882801e2dc34a56ac", "score": "0.48643598", "text": "protected function _prepData(array $data)\n {\n return $data;\n }", "title": "" }, { "docid": "90c9dd143f387a13d7ee5f823f73a685", "score": "0.48552707", "text": "protected function _prepareUpdateData($data) {\n $dataPrepared = $data->toArray();\n\n $dataPrepared['startdateexpected'] = ($dataPrepared['startdateexpected']) ? Agana_Util_DateTime::dateToYYMMDD($dataPrepared['startdateexpected']) : null;\n $dataPrepared['finishdateexpected'] = ($dataPrepared['finishdateexpected']) ? Agana_Util_DateTime::dateToYYMMDD($dataPrepared['finishdateexpected']) : null;\n $dataPrepared['startdatereal'] = ($dataPrepared['startdatereal']) ? Agana_Util_DateTime::dateToYYMMDD($dataPrepared['startdatereal']) : null;\n $dataPrepared['finishdatereal'] = ($dataPrepared['finishdatereal']) ? Agana_Util_DateTime::dateToYYMMDD($dataPrepared['finishdatereal']) : null;\n unset($dataPrepared['appaccount_id']);\n unset($dataPrepared['id']);\n\n return $dataPrepared;\n }", "title": "" }, { "docid": "3e1d44bc35a3076dcf677b40949c5f8a", "score": "0.48480085", "text": "private function prepareData() : void\r\n {\r\n if (!$this->inputTypeValid()) {\r\n throw new InputNotValidException();\r\n }\r\n\r\n for ($row = 0; $row < 9; $row++) {\r\n for ($column = 0; $column < 9; $column++) {\r\n $this->setColumn($row, $column);\r\n $this->setBox($row, $column);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3ccd100d1f18dfa7d991aaab8eb9ca75", "score": "0.4845703", "text": "public function normalize($data = []) {\n\n\t\t$out = [];\n\n\t\t\\Log::info(print_r($data[0],1));\n\n\t\t$out['sub_type'] = strstr(strtolower($data[0]['FormTitle']), \"member\") ? \"member\" : \"event\";\n\t\t$out['source'] = preg_replace(\"/^www\\./\", \"\", strtolower(parse_url((preg_match(\"/^http/\", $data[0]['URL']) ? \"\" : \"http://\") . $data[0]['URL'], PHP_URL_HOST)));\n\t\t$out['utm_source'] = \"Website\";\n\n\t\tforeach($data[0] AS $k => $v) {\n\n\t\t\t$k = strtolower($k);\n\n\t\t\tswitch(true) {\n\n\t\t\t\tcase strstr($k, \"email_\") && filter_var($v, FILTER_VALIDATE_EMAIL):\n\t\t\t\tcase strstr($k, \"email_address\"):\n\t\t\t\t\t$out['email'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"first_name\"):\n\t\t\t\t\t$out['first_name'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"last_name\"):\n\t\t\t\t\t$out['last_name'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"home_phone\"):\n\t\t\t\t\t$out['phone'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"company\"):\n\t\t\t\t\t$out['company_title'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"street_address\"):\n\t\t\t\t\t$out['address_1'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"_city_\"):\n\t\t\t\t\t$out['address_city'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"_state\"):\n\t\t\t\t\t$out['address_state'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase strstr($k, \"zip_code\"):\n\t\t\t\t\t$out['address_zip'] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//$field = ucwords(str_replace(\"_\", \" \", preg_replace(\"/^_\\d{1,2}_(\\d{1,2})_/\", \"\", $k)));\n\t\t\t\t\t$field = preg_replace(\"/^_\\d{1,2}_\\d{1,2}_/\", \"\", $k);\n\t\t\t\t\t$field = preg_replace(\"/x003f/\", \"\", strtolower($field));\n\t\t\t\t\t$field = preg_replace(\"/_+$/\", \"\", $field);\n\t\t\t\t\t$out[$field] = $v;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tswitch(true) {\n\t\t\tcase !$out['email']:\n\t\t\t\tthrow new \\Exception(\"Missing required email address, aborting...\");\n\t\t\t\tbreak;\n\t\t\tcase !filter_var($out['email'], FILTER_VALIDATE_EMAIL):\n\t\t\t\tthrow new \\Exception(\"Invalid email address ({$out['email']}), aborting...\");\n\t\t\t\tbreak;\n\t\t\tcase !$out['last_name']:\n\t\t\t\tthrow new \\Exception(\"Reserve Interactive requires a contact to have a last name. No last name provided, aborting...\");\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//\\Log::info(print_r($out,1));\n\n\t\treturn $out;\n\n\t}", "title": "" }, { "docid": "3b1d1ab0c9f97b69bbfb9c33db8560b9", "score": "0.48434106", "text": "public function processData($data);", "title": "" }, { "docid": "3c65301f992d242ab46460e5aa0b710f", "score": "0.48392934", "text": "private function prepare(iterable $data): array\n {\n if ($data instanceof Traversable) {\n $data = iterator_to_array($data);\n }\n\n foreach ($data as $i => $dat) {\n if ($dat instanceof self) {\n $data[$i] = $dat->data;\n }\n // Variadic capture.\n elseif ($dat instanceof Traversable) {\n $data[$i] = iterator_to_array($dat);\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "14800d49ed793e20be54ac61e3769795", "score": "0.48336506", "text": "abstract public function setData(array $data);", "title": "" }, { "docid": "22b4b475d727a83e78e902c902121c98", "score": "0.4831851", "text": "protected function setData()\n\t{\n\t\t$this->nonce = sanitize_text_field($_POST['nonce']);\n\t\t$data = [];\t\t\n\t\tforeach( $_POST as $key => $value ){\n\t\t\t$data[$key] = $value;\n\t\t}\n\t\t$this->data = $data;\n\t}", "title": "" }, { "docid": "7c0506e37f3dca7927307590f744da54", "score": "0.48293915", "text": "private static function _cookData($data) {\n\t\t$tmp = array();\n\t\tif(isset($data['file_id'])) $tmp['file_id'] = $data['file_id'];\n\t\tif(isset($data['channel_id'])) $tmp['channel_id'] = $data['channel_id'];\n\t\tif(isset($data['subject_id'])) $tmp['subject_id'] = $data['subject_id'];\n\t\tif(isset($data['lock_id'])) $tmp['lock_id'] = $data['lock_id'];\n\t\treturn $tmp;\n\t}", "title": "" }, { "docid": "4e2d6d2b2f577e4798024fc6d45fe92f", "score": "0.4827995", "text": "private static function _cookData($data) {\n\t $tmp = array();\n\t if(isset($data['config_key'])) $tmp['config_key'] = intval($data['config_key']);\n\t if(isset($data['config_value'])) $tmp['config_value'] = $data['config_value'];\n\t if(isset($data['admin_id'])) $tmp['admin_id'] = $data['admin_id'];\n\t if(isset($data['create_time'])) $tmp['create_time'] = $data['create_time'];\n\t return $tmp;\n\t}", "title": "" }, { "docid": "8fda8463bd07c06b7b67724a79d44569", "score": "0.48195937", "text": "private function prepareRequestData() {\n $content_type = $this->headers->get('Content-Type');\n\n $request_parser = $this->getRequestParser($content_type);\n\n if ($request_parser !== null) {\n $parsed_data = $request_parser->parse($this->getContent());\n $this->request->replace($parsed_data);\n }\n }", "title": "" }, { "docid": "25b10c0e7af043fb2caabd04b203a229", "score": "0.4818134", "text": "protected function prepareData()\n {\n /** @var SnippetDocument $snippet1 */\n $snippet1 = $this->documentManager->create('snippet');\n $this->snippet1 = $snippet1;\n $this->snippet1->setStructureType('hotel');\n $this->snippet1->setTitle('ElePHPant1');\n $this->snippet1->getStructure()->bind([\n 'description' => 'Elephants are large mammals of the family Elephantidae and the order Proboscidea.1',\n ]);\n $this->snippet1->setWorkflowStage(WorkflowStage::PUBLISHED);\n $this->documentManager->persist($this->snippet1, 'en');\n $this->documentManager->flush();\n\n /** @var SnippetDocument $snippet2 */\n $snippet2 = $this->documentManager->create('snippet');\n $this->snippet2 = $snippet2;\n $this->snippet2->setStructureType('hotel');\n $this->snippet2->setTitle('ElePHPant2');\n $this->snippet2->getStructure()->bind([\n 'description' => 'Elephants are large mammals of the family Elephantidae and the order Proboscidea.2',\n ]);\n $this->snippet2->setWorkflowStage(WorkflowStage::PUBLISHED);\n $this->documentManager->persist($this->snippet2, 'en');\n $this->documentManager->flush();\n }", "title": "" }, { "docid": "13c98d6021e2139e1b176b14512c0cd1", "score": "0.4817655", "text": "public function exchangeArray($data)\n {\n $this->id = (isset($data['id'])) ? $data['id'] : null;\n $this->entrada = (isset($data['entrada'])) ? $data['entrada'] : null;\n $this->saida = (isset($data['saida'])) ? $data['saida'] : null;\n $this->fk_patrao = (isset($data['fk_patrao'])) ? $data['fk_patrao'] : null;\n $this->fk_funcionario = (isset($data['fk_funcionario'])) ? $data['fk_funcionario'] : null;\n $this->data = (isset($data['data'])) ? $data['data'] : null;\n }", "title": "" }, { "docid": "9d2f80105fa21e671cf14938c3a182a8", "score": "0.48043793", "text": "public function exchangeArray($data)\n {\n $this->id = (isset($data[\"id\"])) ? $data[\"id\"] : NULL;\n $this->order_id = (isset($data[\"order_id\"])) ? $data[\"order_id\"] : 0;\n $this->slot_id = (isset($data[\"slot_id\"])) ? $data[\"slot_id\"] : NULL;\n $this->duplicate = (isset($data[\"duplicate\"])) ? $data[\"duplicate\"] : NULL;\n }", "title": "" }, { "docid": "dd608eed6f48a82ae7437a66b45be893", "score": "0.4804096", "text": "public function fromArray(array $data, $type, array $context = []);", "title": "" }, { "docid": "910eb95cc45c3aca7fb5f6ee8865b7aa", "score": "0.48033163", "text": "public function getEventTitleGeneratorData()\n {\n $events = new StdClass();\n $events->firstpart = [\"PHP\", \"Perl\", \"Python\", \"Ruby\", \"C\", \"MySQL\", \"DevOp\", \"Linux\", \"Debian\", \"CentOS\", \"Zend\", \"Developer\", \"Web\", \"Symfony\", \"Apache\", \"Computer\", \"IT\", \"Dev\"];\n $events->lastpart = [\"Con\", \"Conf\", \" meetup\", \"UUG\", \" day\", \"Congress\"];\n\n return $events;\n }", "title": "" }, { "docid": "9b2583245cdba8e25e43703831924610", "score": "0.47982067", "text": "public function toArray() {\n $event = array();\n $event['id'] = $this->id;\n\n $event['title'] = $this->title;\n\n if ($this->startDatetime !== null) {\n $event['start'] = $this->startDatetime->format(\"Y-m-d\\TH:i:s\");\n// $event['start'] = $this->startDatetime->format(\"Y-m-d\\TH:i:s\\Z\");\n }\n\n if ($this->endDatetime !== null) {\n $event['end'] = $this->endDatetime->format(\"Y-m-d\\TH:i:s\");\n// $event['end'] = $this->endDatetime->format(\"Y-m-d\\TH:i:s\\Z\");\n }\n\n if ($this->url !== null) {\n $event['url'] = false;\n }\n\n if ($this->bgColor !== null) {\n $event['backgroundColor'] = $this->bgColor;\n $event['borderColor'] = $this->bgColor;\n }\n\n if ($this->fgColor !== null) {\n $event['textColor'] = $this->fgColor;\n }\n\n if ($this->cssClass !== null) {\n $event['className'] = $this->cssClass;\n }\n\n $event['allDay'] = $this->isAllDay;\n\n// foreach ($this->otherFields as $field => $value) {\n// $event[$field] = $value;\n// }\n\n return $event;\n }", "title": "" }, { "docid": "0e6a2b4487ea086f50f1af8f7e23cbc8", "score": "0.47953096", "text": "public function data(): array\n {\n $result = [];\n array_walk($this->response, function ($row) use (&$result) {\n /** @var array<string,array<string|int|array<mixed>>> $row */\n array_push($result, ...$row['events']);\n });\n\n return $result;\n }", "title": "" }, { "docid": "9b8f1451e8567c0e551c65565f17ba99", "score": "0.47951338", "text": "public function __construct($data = null)\n\t\t{\n\t\t\t$GLOBALS['_event']\t\t=\tarray();\n\t\t\t$GLOBALS['_obj']\t\t=\tarray();\n\t\t}", "title": "" }, { "docid": "f508f4be8cc912f232a9fa91ce26d11a", "score": "0.4794499", "text": "public function fromArray(array $data) : void\n {\n $storage = [];\n foreach ($data as $k => $v) {\n $k = ltrim(strtolower(preg_replace('/[A-Z]([A-Z](?![a-z]))*/', '_$0', $k)), '_');\n $storage[$k] = $v;\n }\n $this->data = $storage;\n }", "title": "" }, { "docid": "9c248b9d6973d363629dad378dfb2ef5", "score": "0.4793576", "text": "public function prepareReportData()\n {\n $reportData = $this->getReportData();\n if (empty($reportData) || !is_array($reportData)) {\n return false;\n }\n\n $preparedData = [];\n foreach ($reportData as $section => $reports) {\n if (!is_array($reports) || empty($reports)) {\n continue;\n }\n foreach ($reports as $title => $data) {\n try {\n $preparedData[$section][$title] = $this->dataConverter->prepareData($data);\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $preparedData[$section][$title] = ['error' => $e->getMessage()];\n $this->_logger->critical($e);\n }\n }\n }\n return $preparedData;\n }", "title": "" }, { "docid": "80616678d7a061cb9b77fe0bd5ad5131", "score": "0.47891596", "text": "public function setEventData(array $data)\n {\n $this->_eventData = $data;\n return $this;\n }", "title": "" }, { "docid": "3dde7b4d6948b8d40bf1431a38ee5d19", "score": "0.47878018", "text": "protected static function setData(){\n\n self::$data = \n array (\n 0 => \n array (\n 'id' => 8,\n 'nombre' => 'COMANDITARIAS',\n 'estatus' => 'A',\n ),\n 1 => \n array (\n 'id' => 2,\n 'nombre' => 'COMPAÑIA ANONIMA',\n 'estatus' => 'A',\n ),\n 2 => \n array (\n 'id' => 3,\n 'nombre' => 'COOPERATIVA',\n 'estatus' => 'A',\n ),\n 3 => \n array (\n 'id' => 10,\n 'nombre' => 'FIRMA PERSONAL',\n 'estatus' => 'A',\n ),\n 4 => \n array (\n 'id' => 6,\n 'nombre' => 'SOCIEDAD ANONIMA',\n 'estatus' => 'A',\n ),\n 5 => \n array (\n 'id' => 7,\n 'nombre' => 'SOCIEDAD COLECTIVA',\n 'estatus' => 'A',\n ),\n 6 => \n array (\n 'id' => 9,\n 'nombre' => 'SOCIEDAD DE RESPONSABILIDAD LIMITADA',\n 'estatus' => 'A',\n ),\n 7 => \n array (\n 'id' => 5,\n 'nombre' => 'UNIPERSONAL',\n 'estatus' => 'A',\n ),\n)\t\t; \n\n \t}", "title": "" }, { "docid": "37aa8812cead6d02b54228e811f0a789", "score": "0.47834387", "text": "protected static function prepareGetItemsData()\n\t{\t}", "title": "" }, { "docid": "fdf6dfb26f70499c7fe0b450fa210e73", "score": "0.47830206", "text": "abstract protected function prepareDataNews(SimplePieItemAdapter $data);", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "77320861bc823bc4d9e0c8b2d046de66", "score": "0.0", "text": "public function update(StorePost $request, $id)\n {\n //\n\n $request->validated(); //Validate Request\n\n //Handle image upload if request has file, else set cover_image to same as old\n if ($request->hasFile('cover_image')) {\n $cover_image = $this->handleImageUpload($request->file('cover_image'), 'posts');\n } else {\n $cover_image = $this->post->findPostById($id)->cover_image;\n }\n\n $updatedPost = $this->post->findPostById($id); //Instantiate current post object\n\n // Attach slug if there's no slug at all \n // if (!isset($updatedPost->slug->slug)){ \n // $this->slug->slug = $this->getUniqueSlug(Str::slug($request->title, '-')); //Get Unique Slug and add it to slug table\n // $updatedPost->slug()->save($this->slug); //Save the slug table\n // }\n\n //Update slug only if title has changed\n if ($updatedPost->title != $request->title){\n $updatedPost->slug()->update(['slug'=>$this->getUniqueSlug(Str::slug($request->title, '-'))]); //Update the slug table\n }\n\n \n\n $updatedPost->update([\n 'title' => request('title'),\n 'excerpt' => request('excerpt'),\n 'body' => request('body'),\n 'status' => request('status'),\n 'cover_image' => $cover_image,\n ]);\n\n $updatedPost->categories()->sync($this->getPostCategories($request->category)); //Attach Categories\n\n \n\n return back()\n ->with('success', 'Post Updated');\n }", "title": "" } ]
[ { "docid": "995ba0c8f03901b2d9d4e3a2b71aed6a", "score": "0.7192627", "text": "public function put($resource);", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "23bd42dc38bca65e850c1b8f771c0f0f", "score": "0.6837518", "text": "public function update(ResourceInterface $resource)\n {\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "191338cd6ef896bff360364575acf011", "score": "0.67335975", "text": "function update( $resource ){\n\n\n\n}", "title": "" }, { "docid": "82d962f8a232812e11e659906a06c4bf", "score": "0.64792234", "text": "abstract function updateResource(array $resource): array;", "title": "" }, { "docid": "3e0f043be946ab7842b0af2e1d74c916", "score": "0.6411816", "text": "protected function _update ()\n {\n $storage = $this->_make_storage ();\n $storage->update_object ($this);\n }", "title": "" }, { "docid": "94019d08a7f8811e4983869c0f46c3d1", "score": "0.63963556", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n $data = $request->validated();\n\n $status = $resource->fill($data)->save();\n\n if($status) {\n return redirect()->route('resource.index')->with('success', 'Обновлено успешно');\n }\n\n return back()->withInput();\n }", "title": "" }, { "docid": "f3a644eac430ac72a35e4e871bd91db8", "score": "0.6383551", "text": "public function update(Request $request, $id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "4f3179762365be3e1ddb7c5eec12dffb", "score": "0.6367317", "text": "public function update($id)\n\t{\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules_edit);\n\t\tif($validator->passes()){\n\n\n\t\t\t$resource = \\App\\Resource::find($id);\n\n\t\t\tif(isset($inputs['image'])){\n\n\t\t\t\t$file = $resource->image;\n\n\t\t\t\tunlink('pictures/' . $file);\n\n\t\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t\t$constrain->aspectRatio();\n\t\t\t\t})->save($destinationPath . $fileName);\n\t\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t\t$inputs['image'] = $fileName;\n\t\t\t}\n\n\t\t\t$resource->update($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "8c18bfa316f6f5346468923c884b7854", "score": "0.62746567", "text": "public function update(ResourceRequest $request, $id)\n {\n $resource = $this->resources->findOrFail($id);\n\n $this->resources->update($resource, $request->only([\n 'author_id',\n 'category_id',\n 'title',\n 'body',\n 'description',\n 'meta_description',\n 'status',\n ]));\n\n if ($request->hasFile('mini_image')) {\n $uploadedFile = $request->file('mini_image');\n\n if ($resource->mini_image) {\n Storage::delete('public/' . $resource->mini_image);\n }\n\n $pathFile = $uploadedFile->store($this->resources->makeImagePath(), 'public');\n $resource->update(['mini_image' => $pathFile]);\n }\n\n if ($request->hasFile('featured_image')) {\n $uploadedFile = $request->file('featured_image');\n\n if ($resource->featured_image) {\n Storage::delete('public/' . $resource->featured_image);\n }\n\n $pathFile = $uploadedFile->store($this->resources->makeImagePath(), 'public');\n $resource->update(['featured_image' => $pathFile]);\n }\n\n if ($resource->category->isCaseStudies()) {\n return redirect()->route('spark.kiosk.resources.case-studies.edit', ['id' => $id])\n ->with('alert.success', __('Updated successfully!'));\n }\n\n return redirect()->route('spark.kiosk.resources.edit', ['id' => $id])\n ->with('alert.success', __('Updated successfully!'));\n }", "title": "" }, { "docid": "125e988ea4b035f1db7a8b5327bfb780", "score": "0.61922735", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"file_upload\" => \"required\",\n \"title\" => \"required|min:1|max:30\",\n \"credit\" => \"required|integer\",\n ]);\n\n $res = Resource::find($id);\n $res->owner_user_id = Auth::id();\n $res->access_role = implode('|', $request->access_role);\n $res->description = $request->description;\n $res->credit = $request->credit;\n // $res->file_upload = FileHelper::saveResourceFile($request->file_upload);\n $res->file_upload = $request->file_upload; // as url\n // $res->type = ($request.file_upload)->getClientOriginalExtension();\n $res->type = \"url\";\n if(!empty($request->book_id) and Book::find($requst->book_id))\n $res->owner_book_id = $request->book_id;\n $res->update();\n \n Session::flash('success', '资源信息修改成功');\n\n return redirect()->route('resource.show', $res->id);\n }", "title": "" }, { "docid": "2faaf8ddd37fb3a3dd00d2067935e627", "score": "0.618546", "text": "public function update(UpdateResourceArticleRequest $request, Resource $resource): JsonResponse\n {\n\n if ($request->hasFile('url')) {\n Storage::disk('article')->delete($resource->url);\n $resource->url = $request->url->store('articles', 'article');\n }\n\n if ($resource->isClean()) {\n return $this->errorResponse('Se debe especificar al menos un valor diferente para actualizar', 422);\n }\n\n $resource->save();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.updated'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "41d9c906adb39164a3ea97f83f0d6b4c", "score": "0.6004039", "text": "public function update(Request $request, $id) {\n //\n $resource = Resource::find($id);\n if($request->resourceislink == \"No\"){\n if($resource->external_link == \"Yes\"){\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n 'file' => 'required|mimes:pdf,xls,xlsm,xlsx,doc,docx,ppt,pptm,pptx,jpeg,bmp,png,bmp,gif,svg',\n ]);\n }else{\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n ]);\n }\n }else{\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n 'file' => 'required|url',\n ]);\n }\n\n if ($validator->fails()) {\n $access_log = new AccessLog;\n $access_log->user = Auth::user()->username;\n $access_log->link_accessed = str_replace(url('/'),\"\",url()->current());\n $access_log->action_taken = \"Edit \".$resource->resource_type.\" Resource\";\n $access_log->action_details = \"Editing of \".$resource->resource_type.\" Resource interrupted due to validation errors\";\n $access_log->action_status = \"Failed\";\n $access_log->save();\n\n return back()->withErrors($validator)->withInput()->with('editresource',$resource);\n }else{\n if($request->resourceislink == \"No\"){\n if($request->file){\n //Upload the resource file in storage/app/public/resources folder \n $file_name = (string) ($request->file->store('public/resources'));\n $file_name = str_replace('public/', '', $file_name);\n \n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->resource_location = $file_name;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n }else{\n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n }\n }else{\n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->resource_location = $request->file;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n } \n \n return back()->with('resouce','Resource was succesfully uploaded')->with('resoucetype',$resource->resource_type);\n }\n }", "title": "" }, { "docid": "1b397375316ae1351b5a50f45f20bc46", "score": "0.6000568", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')){\n $resources = $request->session()->get('resources');\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $priceInput = $request->input('price');\n \n if(isset($resources[$id]) && (isset($resources[$idInput])==false || $idInput==$id)){\n // $resource = $resources[$id];\n $resource = ['id' => $idInput, 'name' => $nameInput, 'price' => $priceInput];\n unset($resources[$id]);\n $resources[$idInput]=$resource;\n $request->session()->put('resources', $resources);\n \n return redirect('resource')->with('message', 'Se editado el elemento correctamente');\n }\n \n }\n return back()->withInput();\n }", "title": "" }, { "docid": "dd769c108800c8271a7f2c99245c843e", "score": "0.597514", "text": "public function updateStream($path, $resource, Config $config)\n {\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.59242314", "text": "public function save($resource);", "title": "" }, { "docid": "c94044d21c7dac20d5d21a469d63f195", "score": "0.59235406", "text": "public function testItShouldUpdateSpecifiedResource()\n {\n $this->json('PUT', $this->base_url . $this->getId(), $this->data, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "9645d8e1c1b4d32587e5589c88868755", "score": "0.5878462", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n $resource->fill($request->all());\n $resource->save();\n\n $resource->tags()->sync($request->tags);\n\n $message = 'El recurso literario \"' . $resource->title . '\" fue modificado.';\n $class = 'warning';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "630a533750db7d2a089a96d2e8e1e2d0", "score": "0.5843074", "text": "public function update(Request $request, $id)\n\t{\n\t\t$accessLevel = $request->user()->hasAccessTo('storage', 'edit', 0);\n\t\tif ($accessLevel < 1) {\n\t\t\tthrow new AccessDeniedHttpException('You don\\'t have permission to access this page');\n\t\t}\n\n\t\t$this->validate($request, [\n\t\t\t'title' => 'required'\n\t\t]);\n\n\t\t$storage = storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\t\tif (is_null($storage)) {\n\t\t\treturn 'No such storage';\n\t\t}\n\n\t\t$storage->title = $request->title;\n\t\t$storage->type = $request->type;\n\t\t$storage->description = $request->description;\n\t\t$storage->organization_id = $request->user()->organization_id;\n\n\t\t$storage->save();\n\n\t\tSession::flash('success', 'Новый склад успешно сохранен!');\n\n\t\treturn redirect()->route('storage.show', $storage->storage_id);\n\t}", "title": "" }, { "docid": "a6fd2ebf36845fedc38da71edc963161", "score": "0.58306503", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->available_colors = $request->available_colors;\n $product->available_sizes = $request->available_sizes;\n $product->discount = $request->discount;\n $product->image = $request->image;\n $product->stock = $request->stock;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "f0482e3ac4ae9626608914e5608b9630", "score": "0.58134246", "text": "public function updateStream($path, $resource, array $config = [])\n {\n $result = parent::updateStream($path, $resource, $config);\n\n if ($result && $resource = $this->get($path)) {\n return $this->dispatch(new SyncFile($resource));\n }\n\n return $result;\n }", "title": "" }, { "docid": "44b2a146d07735a49eec32f23fe41df0", "score": "0.5792586", "text": "public function updateById();", "title": "" }, { "docid": "3ebf4ac6712058cf5111ea2fb1b3f69d", "score": "0.5789821", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f67879fb9debb5940a340430c2ce7193", "score": "0.5784806", "text": "public function update(Request $request, Problem $problem, Storage $storage)\n {\n if ($storage->name !== $request->name) {\n $isExists = $problem->storages()->where('name', $request->name)->exists();\n if ($isExists) {\n dd(\"storage `\" . $request->name . \"` is already exists\");\n }\n }\n $storage->fill($request->all());\n $storage->save();\n return redirect(route('problems.show', [\n 'problem' => $problem,\n ]));\n }", "title": "" }, { "docid": "3042155ddc4627ea088faa7fbe4fcbfd", "score": "0.57552326", "text": "public function update($id, Request $request)\n\t{\n\n\t\t$entity = $this->manager->getRepository()->findResource($id);\n\n\t\tif (empty($entity))\n\t\t\tabort(404);\n\n\t\t$params = $request->all();\n\t\t$params = array_merge($params, ['resource_container' => $entity, 'user' => $this->getUser()]);\n\n\t\t$entity = $this->manager->updateOrCreate([\n\t\t\t'resource_container_id' => $entity->id,\n\t\t\t'user_id' => $this->getUser()->id\n\t\t], $params);\n\t\t\n\t\treturn $this->success([\n\t\t\t'message' => 'ok',\n\t\t\t'data' => [\n\t\t\t\t'resource' => $this->serialize($entity)\n\t\t\t]\n\t\t]);\n\n\n\t}", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "3ec7c5a8877f8c46b7760a665414271c", "score": "0.5738682", "text": "public function update(Request $request, int $id)\n {\n $data = $request->except(\"image\");\n $product = $this->product->findOrFail($id);\n if($request->hasFile(\"image\") && $request->image->isValid()){\n Storage::delete($product->image);\n $data[\"image\"] = $request->image->store(\"products/\".$request->name);\n }\n $product->update($data);\n return redirect()->route(\"products.index\");\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "6b5928bfd8cfb173f6ff973bf5da429a", "score": "0.5725117", "text": "public function update(Request $request)\n {\n //\n\n $item = $request->id;\n if ($request->hasFile('thumb')) {\n $thumb = $request->file('thumb');\n $thumb_file = $this->uploadImage($thumb, '');\n $data['image'] = $thumb_file;\n\n }\n $data = $request->all();\n\n\n $slug = \\Illuminate\\Support\\Str::slug($data['name']);\n $data['slug'] = $slug;\n\n\n $product = Product::find($item);\n\n $product->fill($data);\n\n if ($product->save()) {\n return redirect()->back()->with('success', 'Product updated Successfully');\n }\n\n }", "title": "" }, { "docid": "9002704608400a526dfa928357d65ebf", "score": "0.57221955", "text": "public function update(Request $request)\n {\n\n $product = Products::find($request->id);\n\n $product->update([\n 'name' => $request->name,\n 'stock' => $request->stock,\n 'id_user' => Auth::user()->id\n ]);\n\n if($request->file('imagen')){\n $imagename = $request->file('imagen')->getClientOriginalName();\n $request->file('imagen')->storeAs('public/image', $imagename);\n // $path = Storage::disk('public')->put('image', $request->file('imagen')->getClientOriginalName());\n $product->fill(['imagen' => 'storage/image/'.$imagename])->save();\n }\n\n return $product;\n }", "title": "" }, { "docid": "72e37fd6c46c81cc34e4aad069244d7f", "score": "0.5696679", "text": "abstract function put($path, $data);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "615ba40be5a0af225501e371af76c0b2", "score": "0.5691626", "text": "public function update(Request $request, $id)\n {\n \n $social = Social::find($id);\n $this->validate(request(), [\n 'name' => 'required',\n 'link' => 'required',\n 'icon' => 'required'\n ]);\n\n Storage::Delete('public/social/'.$social->icon);\n\n if ($request->hasFile('icon')) {\n $filename=$request->icon->getClientOriginalName();\n $request->icon->storeAs('public/social',$filename);\n $social->icon=$filename;\n $social->name = $request->get('name');\n $social->link = $request->get('link');\n $social->save();\n return redirect('/admin/social')->with('success','Social has been updated');\n \n }\n\n\n\n }", "title": "" }, { "docid": "d55f58a252de4e09d616136ab381ea2d", "score": "0.5689798", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'group_id'=>'exists:groups,id|integer',\n 'name'=>'required|min:1|max:16|unique:resources,name,'.$id,\n 'description'=> 'max:255'\n ]);\n\n $resource = Resource::find($id);\n $resource->group_id = $request->get('group_id');\n $resource->name = $request->get('name');\n $resource->description = $request->get('description');\n $resource->save();\n\n return redirect('/resources')->with('success', 'Resource has been updated');\n }", "title": "" }, { "docid": "09f959fbad30c2f941ea086cc7dad93f", "score": "0.56853646", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n $product = Product::find($id);\n $product->fill($request->all())->save();\n if($request->file('image')){\n $path = Storage::disk('public')->put('image', $request->file('image'));\n $product->fill(['file' => asset($path)])->save();\n } \n return redirect()->route('products.edit', \n $product->id)->with('info', 'Info de product actualizada con éxito');\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "8c2162a8e7fe286f725a1d03ccd562a3", "score": "0.5662784", "text": "public function update(Request $request, $id)\n {\n $update = HomeT::find($id); \n Storage::disk('public')->delete('img/avatar/'.$update->src);\n $update->src = $request->file('src')->hashName();\n $update->temoignage = $request->temoignage; \n $update->nom = $request->nom; \n $update->prenom = $request->prenom; \n $update->fonction = $request->fonction; \n\n $update->save(); \n $request->file('src')->storePublicly('img/avatar/', 'public');\n\n return redirect()->back(); \n }", "title": "" }, { "docid": "c0268fd89d504e7e3334bdc92717f035", "score": "0.5641325", "text": "public function update() {\n\t\t\n\t\t$mods = $this->_data_modified[$this->_data_position];\n\t\tif (count($mods) < 1) return true; // no changes.\n\t\t\t\n\t\t// Build data\n\t\t$changes = [];\n\t\tforeach ($mods as $mod) $changes[$mod] = $this->__get($mod);\n\t\t\n\t\t// Build URL\n\t\t$url = \"table/\".$this->_table_name.\"/\".$this->__get(\"sys_id\");\n\t\t\n\t\t// Use GlideAccess to run the PUT command \n\t\t// Throw a GlideAccessException or a GlideAuthenticationException on error \n\t\t$result = $this->_access->put($url, json_encode($changes));\n\t\t\t\n\t\t// Clear out the pending updates for this record\n\t\t$this->_data_modified[$this->_data_position] = [];\n\t}", "title": "" }, { "docid": "194348e8143807f54599362cf6318737", "score": "0.5635772", "text": "public function update (object $entity);", "title": "" }, { "docid": "3f82a5c4e0e6d64fd1809d61189f5d3d", "score": "0.56336915", "text": "public function update(Request $request)\n {\n $slider=Slider::find($request->id);\n if($request->hasFile('image')) {\n $file = $request->file('image');\n $file_name = $file->getClientOriginalName();\n $path = $request->file('image')->storeAs('public/slider',$file_name);\n $slider->image=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/slider/' . $Image)){\n $delete= Storage::delete('/public/slider/' . $Image);\n }\n } \n $slider->title=$request->title;\n $slider->updated_at=date('Y-m-d H:m:s');\n $slider->update();\n alert::success('Slider Updated Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "bba4992ee37e44374ffa661fa659a09a", "score": "0.56323135", "text": "public function update (EntityInterface $entity);", "title": "" }, { "docid": "072d1df8727e8fc01d135f9b601cd0cc", "score": "0.5626336", "text": "public function update(Request $request, int $resource_id)\n {\n $data = $request->all();\n $validatedData = $request->validate([\n \"name\" => \"required\"\n ]);\n $store = self::store($data, $resource_id);\n return response()->json(['status'=> 'ok', 'data'=> $store, 'msg'=> 'listing category updated successfully']);\n }", "title": "" }, { "docid": "7afe1f5b389ba43a34c655b4630cdebb", "score": "0.56085145", "text": "public function update (Request $request, $id)\n {\n// $product = Product::find($id);\n//\n// $product->name='foo';\n//\n// $product->save();\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "ced4b17a4ea0a670f0d46db8e5a71e1f", "score": "0.5600381", "text": "function setResource($resource);", "title": "" }, { "docid": "c5d23e5b9877982ada89cdd5d607b6f1", "score": "0.5595249", "text": "public function put($path);", "title": "" }, { "docid": "2617ce73a1286e2959b6286b9cbb5cdc", "score": "0.55937576", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|max:30|unique:sizes,name,'.$id \n ]);\n\n $size = Size::findOrFail($id);\n $size->name = $request->name; \n $size->save();\n\n return new SizeResource($size);\n }", "title": "" }, { "docid": "828dbd6951736580bd5869c57009736a", "score": "0.559071", "text": "public function update(int $resourceId): JsonResponse\n {\n $resource = static::resource();\n $resource = $resource::findOrFail($resourceId);\n\n $request = app(static::resourceFormRequest());\n\n $resource = $resource->fill($request->validated());\n\n DB::transaction(function () use ($resource, $request) {\n $this->authorize('isAdmin');\n $resource->save();\n });\n\n return $this->sendResponse($resource, 'Record Updated Successfully');\n }", "title": "" }, { "docid": "222e617c89991e0979d369309504472e", "score": "0.55868655", "text": "function put($resource, $payload = array(), $headers = array())\n {\n $result = $this->client->put($this->build_url($resource), [\n 'headers' => array_merge([\n 'Content-Type' => $this->getContentType(),\n 'Authorization' => $this->getBearer(),\n 'Content-Length' => (!count($payload)) ? 0 : strlen(json_encode($payload)),\n ], $headers),\n 'body' => json_encode($payload)\n ]);\n\n return $result;\n }", "title": "" }, { "docid": "aeb943a599e58a4bbe6bd7e228755660", "score": "0.55803686", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,\n [\n 'title'=>'required|max:50',\n 'price'=>'required',\n 'description'=>'required|max:100'\n ,\n 'imagePath'=>'required'\n ],[\n 'required'=>'El campo :attribute es obligatorio'\n ]\n );\n $product=Product::find($id);\n $product->title = $request->input('title');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n // $product->imagePath = $request->input('imagePath');\n\n $nombreImagen = str_slug($product->title) . '.' .request()->imagePath->extension();\n // storeAs recibe dos parametros el nombre de la carpeta y el nombre del archivo\n request()->imagePath->storeAs('public', $nombreImagen);\n $product->imagePath = $nombreImagen;\n \n $product->save();\n\n return redirect()->action('Admin\\ProductsController@index');\n\n }", "title": "" }, { "docid": "cc73a907b4a48e339742b8c2bd070415", "score": "0.5572921", "text": "public function update(Request $request, $id) {\n $resource = static::$resource::findOrFail($id);\n \n $data = $request->validate(static::$validation);\n\n $resource->update($data);\n\n foreach($data as $key => $value) {\n if(is_array($value) && method_exists($resource, $key)) {\n call_user_func([$resource, $key])->sync($value);\n }\n }\n\n return redirect($this->getUrl())->with('success', $this->getResourceName(false) . ' updated successfully');\n }", "title": "" }, { "docid": "3220bb444c54147e54b8e439712c9f11", "score": "0.55686116", "text": "public function update(Request $request, $id)\n\t{\n ob_start(); // not needed if output_buffering is on in php.ini\n ob_implicit_flush(); // implicitly calls flush() after every ob_flush()\n\n $product = Product::findOrFail($id);\n $this->validate($request,\n [\n 'dish' => 'required|min:5',\n 'menu_category_id' => 'required|Integer',\n 'price' => 'required'\n ]\n );\n\n \n $product->update($request->all());\n\n if($request->file('image')) {\n\n // get product id and sku and use it to identify image\n $imageName = $product->sku . '-' . $product->id . '.' . \n $request->file('image')->getClientOriginalExtension();\n\n // save the new image\n $request->file('image')->move(\n base_path() . '/public/images/', $imageName\n );\n $product->image = $imageName;\n\n // update product with new image name\n $product->update();\n //flush();\n ob_clean();\n ob_flush();\n //clearstatcache ();\n $products = Product::all();\n\n } // if updated image was submitted\n \n return redirect('products_admin');\n }", "title": "" }, { "docid": "c270afb4bf92903f6af7a541b2310395", "score": "0.55680007", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('slug', $id)->first();\n $product->name = $request->name;\n $product->slug = str_slug($request->name);\n $product->category_id = $request->category_id;\n $product->price = $request->price;\n $product->old_price = $request->old_price;\n $product->min_order = $request->min_order;\n $product->description = $request->description;\n\n if(!$request->has('in_stock')){\n $product->in_stock = false;\n }else{\n $product->in_stock = true;\n }\n\n if(!$request->has('is_featured')){\n $product->featured = false;\n }else{\n $product->featured = true;\n }\n\n if($request->hasFile('image')){\n $path = storage_path('app/public/products');\n \\File::isDirectory($path) or \\File::makeDirectory($path, 0777, true, true);\n\n $image = $request->file('image');\n $filename = time().'.'.$image->getClientOriginalExtension();\n $image->move($path,$filename);\n $oldfile = $product->photo;\n $product->photo = $filename;\n \\File::delete($path.'/'.$oldfile);\n }\n\n $product->update();\n \\Session::flash('success', 'Product was successfully updated');\n return back();\n }", "title": "" }, { "docid": "9b0a1be95f266f1629ffadd26d65152d", "score": "0.55679286", "text": "protected function updateResource($resource, $id, array $data, $message = null)\n {\n $resource = $resource->findOrFail($id);\n\n $resource->update($data);\n\n return $resource;\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": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "a262aa354909e0f60e98829ffd019274", "score": "0.5557795", "text": "public function update(Request $request, $id)\n {\n $instrument = Instruments::find($id);\n if(isset($request->path)){\n $path = $request->file('path')->store('uploads', 'public');\n } else {\n $path = $instrument->path;\n }\n\n $instrument->update([\n 'name' => $request->name,\n 'href' => $request->href,\n 'description' => $request->content,\n 'photo' => $path\n ]);\n session()->flash('success','Инструмент успешно обновлен');\n return redirect()->route('instrument.index');\n }", "title": "" }, { "docid": "392bdf3b4d83d7a822d671646207f552", "score": "0.55553967", "text": "public function update($request, int $id);", "title": "" }, { "docid": "3cc3c8178bfb516c83781b7b045205b3", "score": "0.5553084", "text": "public function update()\n\t{\n\t\t$this->reset_error_msg();\n\t\t$result = ajax::asset_update(\n\t\t\t\t\t\t$this->schema->folder_id,\n\t\t\t\t\t\t$this->schema->view_name,\n\t\t\t\t\t\t$this->fields,\n\t\t\t\t\t\t$this->id\n\t\t);\n\t\tif (!is_int($result)) {\n\t\t\t$this->set_error_msg($result);\n\t\t}\t\n\t}", "title": "" }, { "docid": "39ec1d6074d8d2034e596ad13d30da68", "score": "0.55506486", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required|min:1',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'quantity' => 'required|min:1',\n ]);\n\n $product = Product::find($id);\n $product->store_id = Auth::guard('store')->user()->id;\n $product->product_name = $request->get('name');\n $product->product_description = $request->get('description');\n $product->product_price = $request->get('price');\n $product->product_quantity = $request->get('quantity');\n $current_image = $product->product_image;\n $new_image = \"\";\n\n if ($request->has('subcategory')) {\n $product->subcategory_id = $request->get('subcategory');\n }\n if ($request->has('parameter')) {\n $product->product_parameter_id = $request->get('parameter');\n }\n if ($request->has('image')) {\n $new_image = $request->file('image');\n $extension = $new_image->getClientOriginalExtension();\n $filename = 'product-' . time() . '.' . $extension;\n $product->product_image = $filename;\n $new_image->storeAs('products', $filename, 'public');\n }\n $product->save();\n if (Storage::disk('public')->exists('products/' . $new_image)) {\n Storage::disk('public')->delete('products/' . $current_image);\n }\n return redirect()->route('products.index')->with('success', 'Product updated');\n }", "title": "" }, { "docid": "b2529b99a7a37449008d06dce086f0aa", "score": "0.55367374", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'image' => ['max:1024','nullable'],\n 'link' => ['url','nullable']\n ]);\n\n $store = Promotionalslider::find($id);\n $store->link = $request->link;\n if($request->hasfile('image')){\n\n $imagePath = $store->image;\n\n if(File::Exists($imagePath)){\n File::delete($imagePath);\n }\n\n $filename = str_replace(' ','-', $request->image->getClientOriginalName());\n $request->image->move(public_path('media/promotional_slider/'),$filename);\n $store->image ='public/media/promotional_slider/'.$filename;\n }\n \n\n if($store->save()){\n $notification = array(\n 'message'=>'Successfully Promotional Slider Updated',\n 'alert-type'=>'success'\n );\n\n return redirect()->route('promotional-slider')->with($notification);\n }else{\n $notification = array(\n 'message'=>'Something Went Wrong',\n 'alert-type'=>'error'\n );\n\n return redirect()->route('promotional-slider')->with($notification);\n }\n }", "title": "" }, { "docid": "91039ce0cfc444382b037c86ba4ab01d", "score": "0.55300915", "text": "public function update( $data );", "title": "" }, { "docid": "e8f2a79f2bd8c3eb405e389cd50395bf", "score": "0.5526578", "text": "public abstract function update($data);", "title": "" }, { "docid": "21ec885e595c2bf310bc026dbe22811d", "score": "0.5520187", "text": "public function update(Request $request, $id)\n {\n\n\n $contents = $request->data;\n\n if ($id === 'options') {\n\n Storage::put('options.json', json_encode($contents));\n\n }\n\n if ($id === 'templates') {\n\n Storage::put('templates.json', json_encode($contents));\n\n }\n\n if ($id === 'documentation') {\n\n Storage::put('documentation.json', json_encode($contents));\n\n }\n\n\n return response('', 200);\n }", "title": "" }, { "docid": "ac2aad33da58e5ad706eece6ab1eea86", "score": "0.55200577", "text": "public function update(Request $request, $id): \\Illuminate\\Http\\RedirectResponse\n {\n $request->validate([\n 'name' => 'required',\n ]);\n $br = BaseResources::find($id);\n $br->name = $request->name;\n $br->save();\n return redirect()->route('bases.index')\n ->with('success','Base Resource has been updated successfully');\n }", "title": "" }, { "docid": "8f3102dfb73015454da2f2685b058666", "score": "0.5517063", "text": "public function update(Request $request, $id)\n {\n // $request->validate([\n // 'title' => 'required',\n // 'price' => 'required',\n // 'description' => 'required|numeric',\n // 'image' => 'required|image|mimes:jpeg,png,jpg,gif',\n // ]);\n\n\n $product = Product::find($id);\n $product->title = $request->get('Title');\n $product->description = $request->get('Description');\n //$product->image = $request->get();\n $product->price = $request->get('Price');\n if($request->hasFile('Image')){\n $file = $request->file('Image');\n $filename = time().'.'.$file->getClientOriginalExtension();\n $location = public_path('/images');\n $file->move($location,$filename);\n $oldImage = $product->image;\n \\Storage::delete($oldImage);\n $product->image = $filename;\n\n }\n $product->save();\n return back()->withInfo('product successfully update');\n }", "title": "" }, { "docid": "b5d2b22e695863a96f5a335c883dea91", "score": "0.55156153", "text": "public function update($item);", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "b54270ca9c777eb769ba1aabcadc3d1e", "score": "0.55085415", "text": "public function update($object){\n \n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "550e526ae84b71f87da655893d62fd3e", "score": "0.55022335", "text": "public function update(Request $request, $id)\n {\n $productPic = $this->productRepo->find($id);\n $product = $request->except('_token', 'photo', '_method', 'product_categ', 'ar', 'en', 'volume', 'measure', 'num_of_item', 'item_cost');\n $product_categ = $request->get('product_categ');\n\n $activeLangCode = \\LanguageHelper::getLangCode();\n\n $product_trans = $request->only($activeLangCode);\n\n if ($request->hasFile('photo')) {\n // Delete old image first.\n $thumbnail_path = public_path() . '/images/products/thumb/' . $productPic->photo;\n File::delete($thumbnail_path);\n\n // Save the new one.\n $image = $request->file('photo');\n $imageName = $this->upload($image, 'products', true);\n $product['photo'] = $imageName;\n }\n\n $this->productRepo->update($id, $product, $product_trans, $product_categ);\n\n return redirect('/admin-panel/product')->with('updated', 'updated');\n }", "title": "" }, { "docid": "a43ab06ada401992dd7f3fdb88d45bfc", "score": "0.5498034", "text": "public function update(Model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\n }", "title": "" }, { "docid": "e12ba95416c234deaa01e27943c5b363", "score": "0.5497075", "text": "public function update(ProductStoreRequest $request, $id)\n {\n //\n $product = Product::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->category_id = $request->category_id;\n $product->price = $request->price;\n $product->image_path = $product->image_path;\n\n \n if($product->save()) {\n if($request->hasFile('image_path')) {\n $extension = $request->file('image_path')->getClientOriginalExtension();\n\n $filename = $product->id . '.' . $extension;\n\n $path = $request->file('image_path')->storeAs('products', $filename);\n $product->image_path = $filename;\n $product->save();\n }\n }\n\n return redirect()->route('products.index')->with('success', 'Product has been updated');\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "5e25fde2b05dc8aa69161eca66edd608", "score": "0.5493595", "text": "public function update()\n\t\t{\n\t\t\t// with an insert instead.\n\t\t\t$this->save();\n\t\t}", "title": "" }, { "docid": "97425bf86b91309c01997fb129746a78", "score": "0.5489399", "text": "public function testUpdate() {\n\n $book = $this->bookFactory->generate(1, TRUE);\n $book->set('name', 'Changed name');\n $res = $this->patch('/api/books' . $book->getId(), $this->toJson($book->getValues(TRUE)));\n $this->assertEquals(204, $res->getStatusCode());\n $book = $this->bookStorage->find($book->getId());\n $this->assertEquals('Changed name', $book->get('name'));\n }", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.54882276", "text": "abstract public function update($id);", "title": "" }, { "docid": "684d005a26a2cb523ebddd9952606e58", "score": "0.54879177", "text": "public function update(Request $request, Product $product)\n {\n //\n \n $product=Product::find($request->input('id'));\n $filename=$product->image;\n if($request->hasFile('img')){\n Storage::delete($filename);\n $filename=Storage::put('public/products', $request->file('img'));\n }\n $product->name=$request->input('name');\n $product->image=$filename;\n $update=$product->save();\n if($update){\n return redirect()->route('product.show',['product'=>$product])->with(['scucess' => 'Sucessfully updated']);\n }\n }", "title": "" }, { "docid": "69899e5cc810b430e81a78ef78bbb9aa", "score": "0.54833865", "text": "public function putAction()\n\t{\n\t\t$this->_connectionApi->put();\n\t}", "title": "" }, { "docid": "f84f36825279804eeb3fa246acad7d33", "score": "0.5482953", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n unset($data['_token']);\n unset($data['_method']);\n unset($data['image']);\n $rs = Pr::find($id)->update($data);\n if($rs) {\n if($request->image){\n $prs = Pr::find($id);\n $image_u = $prs->media;\n $image_u = str_replace('/storage/app/', '', $image_u);\n $path = '/storage/app/'.@$request->file('image')->store('prs');\n $prs->image = $path;\n $prs->save();\n Storage::delete($image_u);\n }\n return redirect(route('prs.index'));\n }else{\n return back();\n }\n }", "title": "" }, { "docid": "c583b303a0fc1fb0c4ff1107b3e09e10", "score": "0.5479377", "text": "public function update(StoreSlide $request, $id)\n {\n $slide = Slide::find($id);\n $slide->url = $request->input('url');\n\n if ($request->hasFile('cover')) {\n // upload and rsize image\n $file_handler = new CarouselFiles($slide, $request);\n $image = $file_handler->save();\n\n $slide->image = $image;\n }\n\n $slide->save();\n\n return redirect()->route('admin_carousel_edit', ['slide' => $id]);\n }", "title": "" }, { "docid": "9597f2dbc4718b9f333e4446e6945f31", "score": "0.5478411", "text": "public function update($data) {\n }", "title": "" }, { "docid": "749485fd3edd17fca5d56cd2e62d0c66", "score": "0.547553", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n\n $old_image = $item->image_url;\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'items');\n $requestData['image_url'] = $path;\n File::delete(public_path() . $old_image);\n\n }\n\n $item->update($requestData);\n\n return redirect('/admin/items');\n }", "title": "" }, { "docid": "9f003d2b5bf2d688d40ed0c072d56402", "score": "0.5468303", "text": "public function update(Request $request, $id)\n {\n Auth::User()->authorizeRoles(['admin']);\n $this->validate($request, [\n 'title' =>'required',\n 'description' =>'required',\n 'isbn' =>'required',\n 'quantity' =>'required',\n 'price' =>'required',\n 'author' =>'required',\n 'genre' =>'required',\n 'image' =>'image|nullable|max:1999'\n ]);\n\n $item = Catalog::find($id);\n if ($request->hasFile('image')) {\n $path = $request->file('image')->store('catalog_images', 's3');\n if ($item->image != 'catalog_images/noimage.jpg') {\n Storage::disk('s3')->delete($item->image);\n }\n $item->image=$path;\n }\n $item->title=$request->input('title');\n $item->description=$request->input('description');\n $item->isbn=$request->input('isbn');\n $item->quantity=$request->input('quantity');\n $item->price=$request->input('price');\n $item->authorId=$request->input('author');\n $item->genreId=$request->input('genre');\n $item->save();\n return redirect('/catalog/'.$id)->with('success', 'Item updated');\n }", "title": "" }, { "docid": "dbac649412e8591fc3a2a2615f2f7767", "score": "0.5468077", "text": "abstract protected function update($entity);", "title": "" }, { "docid": "6555dceeb8fb592d28c1c54627f3087e", "score": "0.5467873", "text": "public static function updateResource($path, $object, $email)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n self::connection()->addHeader('X-BEHALF-KEY', $email);\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "fff4ed84e179c6d810f4109953693135", "score": "0.5464452", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "4360333bf1732261e8e76d77713982a2", "score": "0.54556817", "text": "private function updateEntity(Model\\BaseModel $entity, string $uri, string $resourceFieldKey): void {\n\t\t$tags = [];\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// Preserve the tags temporarily.\n\t\t\t// We'll sync them later.\n\t\t\t$tags = $entity->getTags();\n\t\t}\n\n\t\t$rawApiResponse = $this->communicator->put($uri, [], [\n\t\t\t$resourceFieldKey => $entity->export(),\n\t\t]);\n\n\t\t$newData = $rawApiResponse->getValue(sprintf('[%s]', $resourceFieldKey));\n\t\t$entity->hydrate($newData);\n\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// The requests (and hydration) above made us lose the tags,\n\t\t\t// since they're managed through another API.\n\t\t\t// Let's assign/de-assign tags now.\n\t\t\t$this->ensureTagsSynced($entity, $tags);\n\t\t}\n\t}", "title": "" }, { "docid": "95ec1039e714eda8d36c46e04fc2aeae", "score": "0.54446787", "text": "public function updateResource(Resources $resources) {\n $preparedStmt = \"UPDATE \" . $resources->getTableName() . \" SET title=?, categoryName=?, linkResource=? WHERE resourceID=?\";\n $resources->setSql($preparedStmt);\n $response = $this->connection->update($resources);\n return $response;\n }", "title": "" }, { "docid": "7db59e65f55b9762d20b09aede45101b", "score": "0.54399514", "text": "public function update(Request $request, Product $product)\n {\n if($request['image']){\n $file = $request['image'];\n $image = $this->ImageUploader($file,'images/');\n// unlink($product->image);\n }else{\n $image = $product->image;\n }\n if($request['file']){\n $file = $request['image'];\n $val = $this->ImageUploader($file,'files/');\n// unlink($product->file);\n }else{\n $val = $product->file;\n }\n\n\n $data = $request->all();\n $product->tags()->sync($data['tag_id']);\n $data['image'] = $image;\n $data['file'] = $val;\n\n $product->update($data);\n return redirect(route('product.index'));\n }", "title": "" }, { "docid": "80ec716f79dfea9cd0d35ec83acd6fad", "score": "0.54376215", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n \t\n \tif(isset($input['image']))\n\t \t$input['image'] = $this->upload ($input['image']);\n \t\n \tItem::findOrFail($id)->update($input);\n \t\n \treturn redirect()->back();\n }", "title": "" }, { "docid": "45006333af499b7a8ef5e992e8465995", "score": "0.54331666", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n\t\tself::storeOrUpdate($product, $request);\n\n\t\treturn redirect('/products')->with('edited', \"Product edited: $product->name\");\n }", "title": "" }, { "docid": "8fb9613a7e05f846bb10235d1d3c4c4b", "score": "0.54254407", "text": "public function update(Request $request, $id)\n {\n $validation=$request->validate([\n \"text\"=>\"required\",\n\n \n ]);\n $update=Slider::find($id);\n if (request()->hasFile(key:'img')) {\n $img=request()->file(key:'img')->hashName();\n request()->file(key:'img')->storeAs(path:'',name:$img);\n $update->img=$img;\n }\n $update->text=$request->text;\n $update->save();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "2ff7fd3eab671b99901b6f6734766160", "score": "0.54233396", "text": "abstract public function update($entity);", "title": "" }, { "docid": "f34a06d4191c968bf71a45ea518e7ed0", "score": "0.54212976", "text": "public function updateObject( $id, $acl = null, $metadata = null, \n\t\t$extent = null, $data = null, $mimeType = null, $checksum = null );", "title": "" }, { "docid": "b67a35c68f5872515b02fce609275aaa", "score": "0.54202235", "text": "public function update(Request $request, $id)\n {\n\n $product = \\App\\Product::find($id);\n\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n\n $destinationPath = 'uploads/products/images'; // upload path\n $extension = $file->getClientOriginalExtension(); // getting image extension\n $fileName = rand(11111,99999).'.'.$extension; // renameing image\n\n $imageName = $destinationPath . '/' . $fileName;\n\n $file->move($destinationPath, $fileName); // uploading file to given path \n\n $picPath = $imageName;\n\n }else{\n $picPath = $product->pic;\n }\n \n $name = $request->get('product_name') ?: $product->name;\n $desc = $request->get('product_desc') ?: $product->desc;\n $price = $request->get('product_price') ?: $product->price; \n\n $product = \\App\\Product::find($id)->update([\n 'name' => $name,\n 'desc' => $desc,\n 'price' => $price,\n 'pic' => $picPath\n ]);\n\n return redirect('/admin/viewProducts');\n }", "title": "" }, { "docid": "cdb8493452b057388fcb678d2dccb96c", "score": "0.5417866", "text": "public function update($id, Request $request);", "title": "" } ]
88bcdcce20c2ca86c42beb7b2d7e1700
/ File: output.inc.php Purpose:All functions including htmlcode
[ { "docid": "d1e05f337a36e5e1887e12ccd9189df9", "score": "0.0", "text": "function output_modules()\t\t\t\t\t\t\t\t\t// Output the modules frame\n\t{\n\t\t$modules = mod_listinstalled();\n\t\tforeach($modules as $mod => $name)\n\t\t/*{*/\n\t\t\tif(mod_checkisinstalled($mod)) \n\t\t\t\tif(mod_getadmin($mod))\n\t\t\t\t{\n\t\t\t\t\tif(ses_get(\"admin\"))\n\t\t\t\t\t\techo output_link(\"?m=\".$mod, $name).\"<br />\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t\techo output_link(\"?m=\".$mod, $name).\"<br />\";\n\t\t/*}*/\n\t}", "title": "" } ]
[ { "docid": "81797d0f4bdc00b95ac14090039920e4", "score": "0.7183667", "text": "protected function outputHTML() {\n }", "title": "" }, { "docid": "e02921ab7eec9f4d900f08a24d398ce1", "score": "0.6899926", "text": "public function output_content();", "title": "" }, { "docid": "51b0aaf63a8866114697a538c3da24c3", "score": "0.68469435", "text": "function HTML($template,$phpcode=False) {\n\n\t$d=new plantilla($template);\n\tif ($phpcode) {\n\t\textract($GLOBALS);\n\t\tinclude($d->file);\n\t}\n else\n\t\techo implode(\"\\n\",$d->data);\n\n}", "title": "" }, { "docid": "d49571102ece8f763aa8ac901f7f35ae", "score": "0.66747546", "text": "abstract public function html();", "title": "" }, { "docid": "1fffbe151f1b155f0eb367230eac9943", "score": "0.6654242", "text": "public function createoutput(){/*\n //insert the ops header\n $opsheader = $this->insertheader($this->opshead);\n //insert lines for each func area\n $opsbody = $this->createbody($this->ops);\n //insert the Sales & Marketing header\n $smheader = $this->insertheader($this->smhead);\n //insert lines for each func area\n $smbody = $this->createbody($this->sm);\n //insert the IT header\n $itheader = $this->insertheader($this->ithead);\n //insert lines for each func areaa \n $itbody = $this->createbody($this->it);\n //insert the Finance header\n $faheader = $this->insertheader($this->fahead);\n //insert lines for each func area\n $fabody = $this->createbody($this->fa);\n //insert the HR header\n $hrheader = $this->insertheader($this->hrhead);\n //insert lines for each func area\n $hrbody = $this->createbody($this->hr);\n //insert the CGM header\n //$gmheader = $this->insertheader($this->gmhead);\n //insert lines for each func area\n //$gmbody = $this->createbody($this->gm);\n //insert the CGM header\n $ccheader = $this->insertheader($this->cchead);\n //insert lines for each func area\n $ccbody = $this->createbody($this->cc);\n\t\t * \n\t\t */\n }", "title": "" }, { "docid": "be623b4d60aeb6a30a7b930ae17959a3", "score": "0.658911", "text": "function output($txt) {\n\t\t$this->m_content .= $txt . \"\\n\";\n\t// GG\n\t\tglobal $html_page_output_size;\n\t\t$html_page_output_size = strlen ( $this->m_content );\n\t\t// GG FIN\n\t\t\n\t}", "title": "" }, { "docid": "27f89f3024fd74a6c010049534285d5c", "score": "0.6583333", "text": "abstract function displayHtml();", "title": "" }, { "docid": "7054ae727698f17ef030577acb13606a", "score": "0.6507841", "text": "function WriteHTML($html,$bi=1)\r\n {\r\n $this->bi=$bi;\r\n $html = htmlspecialchars_decode($html);\r\n if ($bi)\r\n $html=strip_tags($html,\"<a><img><p><br><font><tr><blockquote><h1><h2><h3><h4><pre><red><blue><ul><li><hr><b><i><u><strong><em>\");\r\n else\r\n $html=strip_tags($html,\"<a><img><p><br><font><tr><blockquote><h1><h2><h3><h4><pre><red><blue><ul><li><hr>\");\r\n $html=str_replace(\"\\n\",' ',$html); //replace carriage returns by spaces\r\n \r\n $html = str_replace('&trade;','™',$html);\r\n $html = str_replace('&copy;','©',$html);\r\n $html = str_replace('&euro;','€',$html);\r\n $html = str_replace('&nbsp;',' ',$html);\r\n $html = str_replace('&ouml;','ö',$html);\r\n $html = str_replace('&auml;','ä',$html);\r\n $html = str_replace('&uuml;','ü',$html);\r\n $html = str_replace('&Ouml;','Ö',$html);\r\n $html = str_replace('&Auml;','Ä',$html);\r\n $html = str_replace('&Uuml;','Ü',$html);\r\n\r\n // debug\r\n if ($this->debug) { echo utf8_decode($html); exit; }\r\n\r\n $html = utf8_decode($html);\r\n\r\n $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);\r\n $skip=false;\r\n foreach($a as $i=>$e)\r\n {\r\n if (!$skip) {\r\n if($this->HREF)\r\n $e=str_replace(\"\\n\",\"\",str_replace(\"\\r\",\"\",$e));\r\n if($i%2==0)\r\n {\r\n // new line\r\n if($this->PRE)\r\n $e=str_replace(\"\\r\",\"\\n\",$e);\r\n else\r\n $e=str_replace(\"\\r\",\"\",$e);\r\n //Text\r\n if($this->HREF) {\r\n $this->PutLink($this->HREF,$e);\r\n $skip=true;\r\n } else{\r\n $this->pdf->Write(5,htmlspecialchars_decode($e));\r\n }\r\n } else {\r\n //Tag\r\n if (substr(trim($e),0,1)=='/')\r\n $this->CloseTag(strtoupper(substr($e,strpos($e,'/'))));\r\n else {\r\n //Extract attributes\r\n $a2=explode(' ',$e);\r\n $tag=strtoupper(array_shift($a2));\r\n $attr=array();\r\n foreach($a2 as $v) {\r\n if(preg_match('/([^=]*)=[\"\\']?([^\"\\']*)/',$v,$a3))\r\n $attr[strtoupper($a3[1])]=$a3[2];\r\n }\r\n $this->OpenTag($tag,$attr);\r\n }\r\n }\r\n } else {\r\n $this->HREF='';\r\n $skip=false;\r\n }\r\n }\r\n $this->pdf->Ln(5);\r\n }", "title": "" }, { "docid": "3ca7d36b2e0c727575e414e8d174d4d2", "score": "0.6492271", "text": "function insert_html(&$data)\n\t{\n\t\t$data = preg_replace('#<!.*?[^>]>#','',$data);\n\n\t // new code starts here\n\t // read grammar\n\t// $grammarfile='lib/htmlparser/htmlgrammar.cmp';\n\t// if(!$fp=@fopen($grammarfile,'r')) die();\n\t// $grammar=unserialize(fread($fp,filesize($grammarfile)));\n\t// fclose($fp);\n//vd( $data );\n\t // create parser object and insert html code\n\t $htmlparser=new HtmlParser($data,$this->html_grammar,'',0);\n\t // parse it\n\t $htmlparser->Parse();\n\t //debug output\n//vd( $htmlparser->content );\n\t\n\t // now set it together\n\t $src='';\n\t $dummy=array();\n\t $this->WalkParsedArray($htmlparser->content,$src,$dummy);\n\t /*\n\t echo \"<pre>\";\n\t echo \"Walk array:\\n\\n\";\n\t echo $src;\n\t echo \"</pre>\";\n\t die();\n\t */\n\t $this->flush($src);\n\t // new code ends here\n\t \n\t\n\t /* old code starts here\n\t //$fpd=fopen(\"/tmp/tikidebug\",'a');fwrite($fpd,\"data before parsing:\\n$data\\n\");fclose($fpd);\n\t //parse data\n\t\n\t //replace <br/>\n\t $data=preg_replace(\"#<br/>#\",\"\\n\",$data);\n\t // titlebar\n\t $data=preg_replace(\"#<div class=['\\\"]titlebar['\\\"]>(.+)</div>#\",\"<C:titlebar:\\$1>\",$data);\n\t //$data=preg_replace(\"#<div class='titlebar'>(.+)</div>#e\",\"'<C:titlebar:\\$1>'.$this->add_linkdestination('$1')\",$data);\n\t //line\n\t $data=preg_replace(\"#<hr/>#\",\"<C:hr:>\",$data);\n\t //headings\n\t $data=preg_replace(\"#<h1>(.+)</h1>#\",\"<C:h1:\\$1>\",$data);\n\t $data=preg_replace(\"#<h2>(.+)</h2>#\",\"<C:h2:\\$1>\",$data);\n\t $data=preg_replace(\"#<h3>(.+)</h3>#\",\"<C:h3:\\$1>\",$data);\n\t //images\n\t $data=preg_replace(\"#<img(.+)src=[\\\"\\']([^\\\"|^\\']+)[\\\"\\'].*\\\\>#\",\"<C:img:\\$2>\",$data);\n\t //links\n\t $data=preg_replace(\"#<a.+href=[\\\"\\']([^\\\"|^\\']+)[\\\"\\'].*>(.*)</a>#e\",\"\\$this->whatlink('$1','$2')\",$data);\n\t\n\t //$fpd=fopen(\"/tmp/tikidebug\",'a');fwrite($fpd,\"before adding text\\n\");fclose($fpd);\n\t //$fpd=fopen(\"/tmp/tikidebug\",'a');fwrite($fpd,\"data:\\n$data\\n\");fclose($fpd);\n\t $this->ezText($data,$this->mSettings['textheight']);\n\t //$fpd=fopen(\"/tmp/tikidebug\",'a');fwrite($fpd,\"after adding text\\n\");fclose($fpd);\n\t iold code ends here */\n\t}", "title": "" }, { "docid": "3f6434d4855c14899718f85afa56d212", "score": "0.6476917", "text": "function outputHead($description, $title)\n{\n echo '<!DOCTYPE html >\n <html lang = \"en\" >\n <head >\n <meta charset = \"utf-8\" >\n <meta name = \"viewport\" content = \"width=device-width, initial-scale=1, shrink-to-fit=no\" >\n <meta name = \"description\" content = \"' . $description . '\">\n <meta name = \"author\" content = \"Raphael Ellul Falzon\" >\n\n <title>' . $title . '</title>\n\n <!--Bootstrap core CSS-->\n <link rel = \"stylesheet\" href = \"css/bootstrap.min.css\" >\n <!--Favicon -->\n <link rel = \"icon\" type = \"image/png\" href = \"assets/img/shared/favicon.ico\" >\n <!--Custom fonts-->\n <link href = \"https://fonts.googleapis.com/css?family=Varela+Round\" rel = \"stylesheet\" >\n <link href = \"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i\" rel = \"stylesheet\" >\n <link href=\"https://fonts.googleapis.com/css?family=Audiowide|Raleway\" rel=\"stylesheet\">\n <!--Custom CSS Sheet-->\n <link href = \"css/main.css\" rel = \"stylesheet\" >\n <!-- Custon fonts for game-->\n <link rel=\"stylesheet\" type = \"text/css\" href = \"css/font-loader.css\">\n <!-- CSS for flag icons-->\n <link href = \"css/flag-icon.min.css\" rel = \"stylesheet\">\n <!--Font Awesome-->\n <link rel = \"stylesheet\" href = \"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css\" >\n\n </head > \n <body>';}", "title": "" }, { "docid": "4a428cd705f2aac8ac1510bcc746848b", "score": "0.64751977", "text": "public function output() {\t\t\n\t\t$pageTitle = \"*Page Title*\";\n\t\t$description = \"Page Description\";\n\t\t$contentTitle = $pageTitle;\n\t\t$contentBody = \"Content Body\";\n\t\t$sideMenuTitle = \"SIDE MENU TITLE\";\n\t\t$sideMenu = null;\n\t\t\n\t\t// Load default page css\n\t\trequire_once(\"styles/template.php\");\n\t\t\n\t\t// Load page footer\n\t\trequire_once($this->footer);\n\t\t\n\t\t// Load page template\n\t\trequire_once($this->template);\n\t\t\n\t\t// Display the page\n\t\techo $html;\n\t}", "title": "" }, { "docid": "47c952896e4e41312e8bc45e89363f14", "score": "0.6468257", "text": "public function htmlRendering();", "title": "" }, { "docid": "056a513068646fba7cc72d1304611757", "score": "0.64668167", "text": "function go() { ob_start(array(&$this, \"prepareOutput\"));\t}", "title": "" }, { "docid": "fe95a4daa3eeb5d7f32acad77e49b67a", "score": "0.64624506", "text": "function execute() {\n\t\t// Suppress warnings to prevent notices about missing indexes in $this->data\n\t\twfSuppressWarnings();\n\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"<?php $this->text('lang') ?>\" lang=\"<?php $this->text('lang') ?>\" dir=\"<?php $this->text('dir') ?>\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>\" />\n <?php $this->html('headlinks') ?>\n <title><?php $this->text('pagetitle') ?></title>\n <style type=\"text/css\" media=\"screen,projection\">/*<![CDATA[*/ @import \"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css\"; /*]]>*/</style>\n <link rel=\"stylesheet\" type=\"text/css\" <?php if(empty($this->data['printable']) ) { ?>media=\"print\"<?php } ?> href=\"<?php $this->text('stylepath') ?>/common/commonPrint.css\" />\n <!--[if lt IE 5.5000]><style type=\"text/css\">@import \"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css\";</style><![endif]-->\n <!--[if IE 5.5000]><style type=\"text/css\">@import \"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css\";</style><![endif]-->\n <!--[if gte IE 6]><style type=\"text/css\">@import \"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css\";</style><![endif]-->\n <!--[if IE]><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('stylepath') ?>/common/IEFixes.js\"></script>\n <meta http-equiv=\"imagetoolbar\" content=\"no\" /><![endif]-->\n <?php if($this->data['jsvarurl']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('jsvarurl') ?>\"></script><?php } ?>\n <script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('stylepath') ?>/common/wikibits.js\"></script>\n <?php if($this->data['usercss']) { ?><style type=\"text/css\"><?php $this->html('usercss') ?></style><?php } ?>\n <?php if($this->data['userjs']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('userjs') ?>\"></script><?php } ?>\n <?php if($this->data['userjsprev']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\"><?php $this->html('userjsprev') ?></script><?php } ?>\n <?php if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>\n </head>\n <body <?php if($this->data['body_ondblclick']) { ?>ondblclick=\"<?php $this->text('body_ondblclick') ?>\"<?php } ?>\n <?php if($this->data['body_onload' ]) { ?>onload=\"<?php $this->text('body_onload') ?>\"<?php } ?>\n <?php if($this->data['nsclass' ]) { ?>class=\"<?php $this->text('nsclass') ?>\"<?php } ?>>\n <div id=\"header\" class=\"noprint\"><a href=\"/wiki\"><img src=\"/w/skins/lilug/lilug_logo.gif\" alt=\"Lilug Logo\" /></a></div>\n <div id=\"globalWrapper\">\n <div id=\"column-content\">\n <table id=\"topnav\" class=\"noprint\"><tr>\n <td><a href=\"/wiki\">Home</a></td>\n <td><a href=\"/wiki/About\">About</a></td>\n <td><a href=\"/wiki/Meetings\">Meetings</a></td>\n <td><a href=\"/wiki/Directions\">Directions</a></td>\n <td><a href=\"/wiki/Mailing_Lists\">Mailing Lists</a></td>\n <td><a href=\"http://jobs.lilug.org/\">Jobs</a></td>\n </tr></table>\n\t<div id=\"content\">\n\t <a name=\"top\" id=\"top\"></a>\n\t <?php if($this->data['sitenotice']) { ?><div id=\"siteNotice\"><?php $this->html('sitenotice') ?></div><?php } ?>\n\t <h1 class=\"firstHeading\"><?php $this->text('title') ?></h1>\n\t <div id=\"bodyContent\">\n\t <h3 id=\"siteSub\"><?php $this->msg('tagline') ?></h3>\n\t <div id=\"contentSub\"><?php $this->html('subtitle') ?></div>\n\t <?php if($this->data['undelete']) { ?><div id=\"contentSub\"><?php $this->html('undelete') ?></div><?php } ?>\n\t <?php if($this->data['newtalk'] ) { ?><div class=\"usermessage\"><?php $this->html('newtalk') ?></div><?php } ?>\n\t <!-- start content -->\n\t <?php $this->html('bodytext') ?>\n<!--\t <?php if($this->data['catlinks']) { ?><div id=\"catlinks\"><?php $this->html('catlinks') ?></div><?php } ?> -->\n\t <!-- end content -->\n\t <div class=\"visualClear\"></div>\n\t </div>\n\t</div>\n <table id=\"meta\" class=\"noprint\"><tr id=\"toprow\"><td>\n <div class=\"wiki_links\">\n <?php\n foreach($this->data['content_actions'] as $key => $action) {\n\t echo \"<a href=\\\"\";\n\t echo htmlspecialchars($action['href']) . \"\\\">\";\n\t echo htmlspecialchars($action['text']) . \"</a><br />\\n\";\n\t}\n\t?>\n </div>\n </td><td>\n <div class=\"wiki_links\">\n <?php\n\tforeach($this->data['personal_urls'] as $key => $item) {\n\t echo \"<a href=\\\"\" . htmlspecialchars($item['href']) . \"\\\"\";\n\t if(!empty($item['class'])) {\n\t echo \"class=\\\"\" . htmlspecialchars($item['class']) . \"\\\"\";\n\t }\n\t echo \">\";\n\t echo htmlspecialchars($item['text']);\n\t echo \"</a><br />\\n\";\n\t}\n\t?>\n </div>\n </td><td>\n <div class=\"wiki_links\">\n <?php\n if ($this->data['notspecialpage']) {\n foreach(array('whatlinkshere', 'recentchangeslinked') as $special ) {\n\t echo \"<a href=\\\"\" . htmlspecialchars($this->data['nav_urls'][$special]['href']) . \"\\\">\";\n\t echo $this->msg($special) . \"</a><br />\\n\";\n\t}\n }\n\n if (isset($this->data['nav_urls']['trackbacklink'])) {\n\techo \"<a href=\\\"\" . htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']) . \"\\\">\";\n\techo $this->msg('trackbacklink') . \"</a><br />\\n\";\n }\n\n if ($this->data['feeds']) {\n\tforeach($this->data['feeds'] as $key => $feed) {\n\t echo \"<a href=\\\"\" . htmlspecialchars($feed['href']) . \"\\\">\";\n\t echo htmlspecialchars($feed['text']) . \"</a><br />\\n\";\n\t}\n }\n \n foreach(array('contributions', 'emailuser', 'upload', 'specialpages') as $special ) {\n\tif($this->data['nav_urls'][$special]) {\n\t echo \"<a href=\\\"\" . htmlspecialchars($this->data['nav_urls'][$special]['href']) . \"\\\">\";\n\t echo $this->msg($special) . \"</a><br />\\n\";\n\t}\n }\n \n if(!empty($this->data['nav_urls']['print']['href'])) {\n\techo \"<a href=\\\"\" . htmlspecialchars($this->data['nav_urls']['print']['href']) . \"\\\">\";\n\techo $this->msg('printableversion') . \"</a><br />\\n\";\n }\n ?>\n </div>\n </td></tr><tr><td colspan=\"3\">\n <div id=\"search\">\n <form name=\"searchform\" action=\"<?php $this->text('searchaction') ?>\" id=\"searchform\">\n <?php\n if( isset( $this->data['search'] ) ) {\n\t$searchval = \"value=\\\"\" . $this->text('search') . \"\\\" \";\n }\n ?>\n <input id=\"searchInput\" name=\"search\" type=\"text\" <?=$searchval?>/>\n <input type='submit' name=\"go\" class=\"searchButton\" id=\"searchGoButton\" value=\"Go\" />&nbsp;<input type='submit' name=\"fulltext\" class=\"searchButton\" value=\"Search\" />\n </form>\n </div>\n </td></tr></table>\n </div>\n </div>\n <?php $this->html('reporttime') ?>\n </body>\n</html>\n<?php\n\twfRestoreWarnings();\n\t}", "title": "" }, { "docid": "dd8b98e8bcac35668bbe191a80f90880", "score": "0.64058024", "text": "public function output() {\n\t\tcontainer::finalize();\n\t\tif ($this->prettycode()) $br = \"\\n\";\n\t\tif ($this->minwidth) {\n\t\t\t$max = 960;\n\t\t\t$negwidth = ($this->minwidth > $max ? $max : $this->minwidth);\n\t\t\t$diff = $this->minwidth - $max;\n\t\t\tif ($diff < 0) $diff = 0;\n\t\t\t$this->addCSS(\"\n/* stupid minwidth hack - I hate IE \\*/\n* html .minwidthhack_minwidth {border-left:\".$negwidth.\"px solid #fff; border-right: \".$diff.\"px solid #fff; height: 1px; position:relative; float:left; z-index:1;}\n* html .minwidthhack_container {margin-left:-\".$negwidth.\"px; margin-right: -\".$diff.\"px; height: 1px; position:relative; float:left; z-index:2;}\n/* end stupid minwidth hack */\");\n\t\t\t$opendivs = $br.'<div style=\"width: 100%; min-width: '.$this->minwidth.'px;\"><div class=\"minwidthhack_minwidth\"><div class=\"minwidthhack_container\">';\n\t\t\t$closedivs = $br.\"</div></div></div>\";\n\t\t}\n\t\tif ($this->endJS) {\n\t\t\t$myendjs = htmlspecialchars($this->endJS);\n\t\t\t$onload = ' onload=\"'.$myendjs. '\" onpageshow=\"if (event.persisted) { '.$myendjs.' }\"';\n\t\t}\n\t\techo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">'.$br.\n\t\t\t '<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">' . $this->head->output() . '<body' . $onload . '>'.$opendivs .\n\t\t container::output('',$this->prettycode()) . $closedivs;\n\t\tif ($this->timer) echo 'Build time: '.sprintf(\"%.0f\",1000*(microtime(TRUE)-$this->starttimer)).'ms';\n\t\techo '</body>' . \"</html>\";\n\t\tif (!empty($this->logging))\n\t\t\tforeach ($this->logging as $key => $cback)\n\t\t\t\tcall_user_func_array($cback, $this->inputs[$key]);\n\t\treturn;\n\t}", "title": "" }, { "docid": "e8cb46f769250fdc7f76383a614a03f2", "score": "0.63939065", "text": "function genHtmlcoderesponsive($html) {\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "41f6dc8806795cf3f3f4b9615b6c42a1", "score": "0.6393045", "text": "function do_html_header(){\n print \"\n <!DOCTYPE html PUBLIC \\\"-\\//W3C\\//DTD XHTML 1.0 Transitional\\//EN\\\"\n \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\n <html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\n <head>\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=iso-\n 8859-1\\\" />\n <title>The Tech Blog</title>\n <link href=\\\"style.css\\\" rel=\\\"stylesheet\\\" type=\\\"text/css\\\" />\n </head>\n \";\n }", "title": "" }, { "docid": "5eefdbfde23a40fe80869061aa9a5762", "score": "0.6391127", "text": "static public function CaOutCode($d){return '<?= ' . $d . '; ?>';}", "title": "" }, { "docid": "e0aaeae76a377cb97a8d0aa4764b8b03", "score": "0.6378485", "text": "public function getOutput(){\n\t\tob_start();\n\t\trequire(dirname(__FILE__) .DS. USE_TEMPLATE);\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "7fb52aa912a1ac5f5c832879cad8ff83", "score": "0.6342961", "text": "function genPiedPage(){\n echo \"</div></body></html>\";\n }", "title": "" }, { "docid": "50857e97f43d5742c37a58c77ebf8db5", "score": "0.63330954", "text": "function usage()\n{\nob_start(); \n?>\nThis plug-in is designed to help you encode and decode a string of text so that it can be safely passed from one page to another in the URL for example.\n\nBASIC USAGE:\n\n{exp:encode_decode style=\"url\" direction=\"encode\"}This is @/ test string{/exp:encode_decode}\n\nPARAMETERS:\n\nstyle = 'url' (default - url)\n - The encoding style. this can be either: \"url\",\"rawurl\",\"htmlspecialchars\",\"htmlentities\",\"uuencode\" or \"base64\".\n \ndirection = 'encode' (default - encode)\n - The direction to push the string in: \"encode\" or \"decode\".\n\t\nFor updates and support check the developers website: https://github.com/nathanpitman/encode_decode.pi.ee_addon\n\n<?php\n$buffer = ob_get_contents();\n\t\nob_end_clean(); \n\nreturn $buffer;\n}", "title": "" }, { "docid": "9c09607a6390631887b7fe28eafb18ce", "score": "0.63184524", "text": "static function endHtml()\n {\n echo '</HTML>';\n echo ' <SCRIPT src=\"js/jquery.min.js\"></SCRIPT>';\n echo ' <script type=\"text/javascript\" src=\"js/libs/DataTables/datatables.min.js\"></script>';\n echo ' <SCRIPT src=\"js/select2.full.min.js\"></SCRIPT>';\n echo ' <script src=\"https://cdn.jsdelivr.net/npm/@tensorflow/tfjs\"></script>\n <script src=\"https://cdn.jsdelivr.net/npm/@tensorflow-models/blazeface\"></script>';\n echo ' <SCRIPT src=\"js/main.js\" language=\"javascript\" type=\"text/javascript\"></SCRIPT>';\n echo ' <SCRIPT src=\"js/main2.js\" type=\"module\"></SCRIPT>';\n }", "title": "" }, { "docid": "e5e8c372e19d2fa4558a728effb86ab5", "score": "0.63160944", "text": "function output($xhtml) {\n\t\techo($xhtml);\n\t}", "title": "" }, { "docid": "49d85d77f7639cac58127f922a8c41a9", "score": "0.63091516", "text": "function mmrpg_formatting_help_markup(){\n\n // Start the output buffer and prepare to collect contents\n ob_start();\n // Include the website formatting text file for reference\n require(MMRPG_CONFIG_ROOTDIR.'functions/website_formatting.v2.php');\n // Collect the output buffer contents into a variable\n $this_formatting = ob_get_clean();\n $this_formatting = normalize_line_endings($this_formatting);\n $this_formatting = nl2br(mmrpg_formatting_decode($this_formatting));\n\n // Start the output buffer and prepare to collect contents\n ob_start();\n ?>\n <div class=\"community bodytext\">\n <div class=\"formatting\">\n <h3>Community Formatting Guide</h3>\n <div class=\"wrapper\">\n <?= $this_formatting ?>\n </div>\n </div>\n </div>\n <?\n // Collect the output buffer contents into a variable\n $this_markup = ob_get_clean();\n\n // Return the collected output buffer contents\n return $this_markup;\n\n}", "title": "" }, { "docid": "04441678ace1d6383513f3ca1830d30e", "score": "0.6295189", "text": "function adobe_analtyics_tag_scode() {\n ?>\n <script type=\"text/javascript\"><!--\n var s_code=s.t();if(s_code)document.write(s_code)\n -->\n </script>\n <?php \n\n}", "title": "" }, { "docid": "b6e2c9e65b9c0976b1b56c2613f4036f", "score": "0.6295137", "text": "public function getHTML()\n \t{\n \t$this->loadMainVariables(); \n \t\n \t$Data = (object)$this->_variables;\n \textract($this->_variables);\n \n \tob_start();\n \tinclude $this->_template;\n \treturn ob_get_clean();\n \t}", "title": "" }, { "docid": "c4d964d1de4cbee8cd517706e2aa8693", "score": "0.62903565", "text": "function genPage($result){\n\twhile($row = $result->fetch_array()){\n\t\t//htmlentities makes html code viewable\n\t\techo htmlentities($row['file_data']);\n\t\techo \"<br></br>\";\n\t}\n}", "title": "" }, { "docid": "46368ecb90754114e55568b6912646f3", "score": "0.6268532", "text": "function html()\n\t{\n\t\t// all we need to do here is initiate our extension; it will do the rest.\n\t\t$this->_init();\n\t}", "title": "" }, { "docid": "66ec4d793b27344790e5575bb899152c", "score": "0.6247664", "text": "function info($output)\n{\n output(\"<info>{$output}</info>\");\n}", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.62272537", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.62272537", "text": "public function output();", "title": "" }, { "docid": "c875483497d23d001052ad1483026673", "score": "0.62210053", "text": "public static function output() {\n\t\tob_start();\n\t\tforeach( self::$pages as $page_file => $enabled ) {\n\t\t\tif( $enabled !== true ) continue;\n\t\t\tinclude( JFRAME_PATH_LOCAL_PAGES.$page_file.'.php' );\n\t\t}\n\t\t$body = ob_get_clean();\n\t\tforeach( self::$headers as $header_file => $enabled ) {\n\t\t\tif( $enabled !== true ) continue;\n\t\t\tinclude( JFRAME_PATH_LOCAL_HEADERS.$header_file.'.php' );\n\t\t}\n\t\techo $body;\n\t\tforeach( self::$footers as $footer_file => $enabled ) {\n\t\t\tif( $enabled !== true ) continue;\n\t\t\tinclude( JFRAME_PATH_LOCAL_FOOTERS.$footer_file.'.php' );\n\t\t}\n\t}", "title": "" }, { "docid": "3fb924501679f8b8e026e4918038211d", "score": "0.6205755", "text": "function do_html_header($heading)\n\t{\n\t\t?>\n\t\t\t<html>\n\t\t\t\t<head>\n\t\t\t\t\t<title> <?php echo\"$heading\"; ?> </title>\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css\">\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"star.css\">\n\t\t\t\t</head>\n\t\t\t\t<body>\n\t\t\t<html class=\"no-js\" lang=\"en\">\n\t\t\t\t<head>\n\t\t\t\t\t<meta charset=\"utf-8\">\n\t\t\t\t\t<title><?php echo\"$heading\"; ?></title>\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css\">\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"star.css\">\n\t\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"assets/fonts/raphaelicons.css\">\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"assets/css/styles.min.css\">\n\t\t\t\t\t<script src=\"assets/js/libs/modernizr-2.5.2.min.js\"></script>\n\t\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<header class=\"clearfix\">\n\t\t\t\t<div class=\"container\">\n\t\t\t\t<a id=\"logo\" href=\"overall_review.php\"><img src=\"images/LOGO.jpg\" alt=\"logo\" style=\"height:80px;\"></a>\n\t\t\t\t<ul class=\"social-icons\">\n\t\t\t\t\t<li><a href=\"https://www.facebook.com/Reviews-Management-System-RMS-1099867473444897/?__mref=message_bubble\" class=\"icon flip\">^</a></li>\n\t\t\t\t\t<li><a href=\"\" class=\"icon\">T</a></li>\n\t\t\t\t\t<li><a href=\"\" class=\"icon\">^</a></li>\n\t\t\t\t</ul>\n\t\t<?php\n\t\t\t/*if($heading)\n\t\t\t\tdo_html_heading($heading);*/\n\t}", "title": "" }, { "docid": "65f26d1fac7c72678b0ef13cd6d3952e", "score": "0.619438", "text": "function html_header()\n{\n global $config;\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html lang=\\\"en-us\\\" dir=\\\"ltr\\\">\\n\";\n echo \"<head>\\n\";\n echo \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n\";\n echo \"<title>$config[site_name]</title>\\n\";\n echo \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"$config[site_url]/skins/_common/default.css\\\" />\\n\";\n echo \"</head>\\n\";\n echo \"<body style=\\\"margin:20px\\\">\\n\";\n}", "title": "" }, { "docid": "05e91597320e3d72709ff8ef9235b157", "score": "0.6193811", "text": "public function getHTML();", "title": "" }, { "docid": "c7ee179e4849493fe916313686e75316", "score": "0.6191606", "text": "public function __tostring(){\n ob_start();\n extract($this->data);\n require_once(getcwd() . '/views/' . strtolower($this->controller) . '/' . $this->view . '.php');\n $content = ob_get_contents();\n ob_clean();\n\n ob_start();\n $headerFiles['scripts'] = $this->scripts;\n $headerFiles['styles'] = $this->styles;\n require_once(getcwd() . '/views/template.php');\n $html = ob_get_contents();\n ob_clean();\n\n return $html;\n }", "title": "" }, { "docid": "d2784ac8738b221fa2a431bf86c45193", "score": "0.61811376", "text": "function do_html_footer()\n\t{\n\t\t?>\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t<?php\n\t}", "title": "" }, { "docid": "6491dd63f4a56cb80b115a078e703c9e", "score": "0.6180022", "text": "function do_html_header($title) {\n ?>\n<html>\n<head>\n<title><?php echo $title;?></title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"exam-parser.css\">\n<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n</head>\n<body>\r\n<?php\n}", "title": "" }, { "docid": "b41e41ea0f906a7a4bc2f8740251c101", "score": "0.61754817", "text": "function parseHTML($code,$TPL,$varTag='',$subnum=0)\r\n\t{\r\n\t\t\r\n\t\tif ($subnum>3)\r\n\t\t{\r\n\t\t\treturn $this->parseVal($code,$TPL,$varTag);\r\n\t\t}\r\n\r\n\t\t$newstr=''; //parsed string\r\n\t\twhile(ereg(\"<!--(IF|FOR)\\(([-A-Za-z0-9_\\.]*\\[?[-A-Za-z0-9_]+\\]?)\\)-->\",$code,$det))\r\n\t\t{\r\n\t\t\t$action =$det[1];\r\n\t\t\t$showKey=$det[2];\r\n\r\n\t\t\t$Tag=$action.'('.$showKey.')';\r\n\t\t\t$length=strlen($Tag);\r\n\t\t\t$pos1=strpos($code,'<!--'.$Tag.'-->');\r\n\t\t\t$pos2=strpos($code,'<!--/'.$Tag.'-->');\r\n\r\n\t\t\t$temp1=substr($code,0,$pos1);\r\n\t\t\t\r\n\t\t\t$newstr = $newstr.$this->parseVal($temp1,$TPL,$varTag);\r\n\t\t\tif ($pos2>$pos1)\r\n\t\t\t{\r\n\t\t\t\t$parseStr= substr($code,$pos1+$length+7,$pos2-$pos1-$length-7);\r\n\t\t\t\t$code = substr($code,$pos2+$length+8);\r\n\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t$parseStr= '';\r\n\t\t\t\t$code = substr($code,$pos1+$length+7);\r\n\t\t\t\t$code = str_replace('<!--/'.$Tag.'-->','',$code);\r\n\t\t\t}\r\n\r\n\t\t\tif (strlen($parseStr)<1)\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif ($action=='IF')\r\n\t\t\t{\r\n\t\t\t\t$temp=@explode('<!--ELSE('.$showKey.')-->',$parseStr);\r\n\t\t\t\t// e.g. IF(result[islogin])\r\n\t\t\t\t$pos=strpos($showKey,'[');\r\n\t\t\t\tif ($pos > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$key=substr($showKey,$pos+1,strpos($showKey,']')-$pos-1);\r\n\t\t\t\t\t$codeTag=substr($showKey,0,$pos);\r\n\t\t\t\t\tif (empty($varTag))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$expreIF=0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ($codeTag==$varTag)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$expreIF=$this->_rows1[$key];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$expreIF=$this->_rows2[$key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$expreIF=$TPL[$showKey];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($expreIF)\r\n\t\t\t\t{\r\n\t\t\t\t\t$newstr = $newstr.$this->parseHTML($temp[0],$TPL,$varTag,$subnum);\r\n\t\t\t\t}\r\n\t\t\t\telse if (strlen($temp[1])>0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$newstr = $newstr.$this->parseHTML($temp[1],$TPL,$varTag,$subnum);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ($action=='FOR')\r\n\t\t\t{\r\n\t\t\t\t// e.g. FOR(result[list])\r\n\t\t\t\t$pos=strpos($showKey,'[');\r\n\t\t\t\t\r\n\t\t\t\tif ($pos > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$key=substr($showKey,$pos+1,strpos($showKey,']')-$pos-1);\r\n\t\t\t\t\t$codeTag=substr($showKey,0,$pos);\r\n\t\t\t\t\tif ($codeTag==$varTag)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$result=$this->_rows1[$key];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$newstr = $newstr.$this->parseHTML($parseStr,$TPL,$varTag,$subnum);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$result=$TPL[$showKey];\r\n\t\t\t\t\t$key=$showKey;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$varTagNew=(empty($varTag) ? $key : $varTag);\r\n\t\t\t\tif (is_array($result))\r\n\t\t\t\t{\r\n\t\t\t\t foreach ($result as $row)\r\n\t\t\t\t {\r\n\t\t\t\t\tif (empty($varTag))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->_rows1=array();\r\n\t\t\t\t\t\t$this->_rows1=$row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->_rows2=array();\r\n\t\t\t\t\t\t$this->_rows2=$row;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$newstr = $newstr.$this->parseHTML($parseStr,$TPL,$varTagNew,$subnum);\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$newstr = $newstr. $this->parseVal($code,$TPL,$varTag);\r\n\t\treturn $newstr;\r\n\t}", "title": "" }, { "docid": "6ad3cf6c582bcdbc86ae0a2d752564b7", "score": "0.61689353", "text": "public function compile()\n {\n\n $this->buildPage();\n\n if (DEBUG) {\n ob_start();\n $checkXml = new DOMDocument();\n\n if ($this instanceof LibTemplateAjax)\n $checkXml->loadXML($this->compiled);\n else\n $checkXml->loadHTML($this->compiled);\n\n $errors = ob_get_contents();\n ob_end_clean();\n\n // nur im fehlerfall loggen\n if ('' !== trim($errors)) {\n\n $this->getResponse()->addWarning('Invalid XML response');\n\n SFiles::write(PATH_GW.'log/tpl_xml_errors.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n SFiles::write(PATH_GW.'log/tpl_xml_errors_'.date('Y-md-H-i_s').'.html', $errors.'<pre>'.htmlentities($this->compiled).'</pre>');\n }\n }\n\n if ($this->keyCachePage) {\n $this->writeCachedPage($this->keyCachePage , $this->compiled);\n }\n\n $this->output = $this->compiled;\n\n\n }", "title": "" }, { "docid": "1686b710c75a46a15eedd1f776c22ad9", "score": "0.6157044", "text": "function page_header() {\r\n\tob_start('ob_gzhandler');\r\n\r\n\t// Start headers.\r\n\techo <<<EOH\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>$str_name</TITLE>\r\n<BASE TARGET=\"main\">\r\n<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"style.css\">\r\n</HEAD>\r\n<BODY>\r\nEOH;\r\n}", "title": "" }, { "docid": "60aa820ea20e4feb3127aca38b84a9c8", "score": "0.61525756", "text": "abstract protected function constructHTML ();", "title": "" }, { "docid": "b15e47ea2bed5cbb57fc97ee3ab2ba79", "score": "0.6152286", "text": "function html_html_output($value){\r\n // returns: html\r\n\r\n if(mb_strlen($value) == 0)\r\n return;\r\n\r\n $html = strip_tags($value);\r\n $html = str_replace('&nbsp;', ' ', $html);\r\n\r\n if($this->grid_ellipse_at > 0)\r\n if(mb_strlen($html) > $this->grid_ellipse_at)\r\n $html = mb_substr($html, 0, $this->grid_ellipse_at) . \"...\";\r\n $html = str_replace('<', '&lt;', $html);\r\n $html = str_replace('>', '&gt;', $html);\r\n\r\n return $this->clean_out($html);\r\n\r\n }", "title": "" }, { "docid": "53fec22dd2061806e8aa00cf57a075bf", "score": "0.6150626", "text": "protected abstract function output ();", "title": "" }, { "docid": "ca5b240ca529a4be3cda5e845493f396", "score": "0.6133791", "text": "function html($a,$b ){\n $c = \"<$b> $a </$b>\";\n echo $c;\n}", "title": "" }, { "docid": "4af0fc282c20c8eabe0c7fca49b2eace", "score": "0.61311793", "text": "public function output()\n\t{\n\t\t// User agent class (see #3074 and #6277)\n\t\t$this->ua = \\Environment::get('agent')->class;\n\n\t\t// Style sheets\n\t\tif (!empty($GLOBALS['TL_CSS']) && is_array($GLOBALS['TL_CSS']))\n\t\t{\n\t\t\t$strStyleSheets = '';\n\n\t\t\tforeach (array_unique($GLOBALS['TL_CSS']) as $stylesheet)\n\t\t\t{\n\t\t\t\t$options = \\StringUtil::resolveFlaggedUrl($stylesheet);\n\t\t\t\t$strStyleSheets .= \\Template::generateStyleTag($this->addStaticUrlTo($stylesheet), $options->media);\n\t\t\t}\n\n\t\t\t$this->stylesheets = $strStyleSheets;\n\t\t}\n\n\t\t// Add the debug style sheet\n\t\tif (\\Config::get('debugMode'))\n\t\t{\n\t\t\t$this->stylesheets .= '<link rel=\"stylesheet\" href=\"' . $this->addStaticUrlTo('assets/contao/css/debug.css') . '\">' . \"\\n\";\n\t\t}\n\n\t\t// JavaScripts\n\t\tif (!empty($GLOBALS['TL_JAVASCRIPT']) && is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\t$strJavaScripts = '';\n\n\t\t\tforeach (array_unique($GLOBALS['TL_JAVASCRIPT']) as $javascript)\n\t\t\t{\n\t\t\t\t$options = \\StringUtil::resolveFlaggedUrl($javascript);\n\t\t\t\t$strJavaScripts .= \\Template::generateScriptTag($this->addStaticUrlTo($javascript), false, $options->async) . \"\\n\";\n\t\t\t}\n\n\t\t\t$this->javascripts = $strJavaScripts;\n\t\t}\n\n\t\t// MooTools scripts (added at the page bottom)\n\t\tif (!empty($GLOBALS['TL_MOOTOOLS']) && is_array($GLOBALS['TL_MOOTOOLS']))\n\t\t{\n\t\t\t$strMootools = '';\n\n\t\t\tforeach (array_unique($GLOBALS['TL_MOOTOOLS']) as $script)\n\t\t\t{\n\t\t\t\t$strMootools .= \"\\n\" . trim($script) . \"\\n\";\n\t\t\t}\n\n\t\t\t$this->mootools = $strMootools;\n\t\t}\n\n\t\t$strBuffer = $this->parse();\n\n\t\t// HOOK: add custom output filter\n\t\tif (isset($GLOBALS['TL_HOOKS']['outputBackendTemplate']) && is_array($GLOBALS['TL_HOOKS']['outputBackendTemplate']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['outputBackendTemplate'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$strBuffer = $this->{$callback[0]}->{$callback[1]}($strBuffer, $this->strTemplate);\n\t\t\t}\n\t\t}\n\n\t\t$this->strBuffer = $strBuffer;\n\t\tparent::output();\n\t}", "title": "" }, { "docid": "e17802a2b33e3ae986a89a638da17adf", "score": "0.61130875", "text": "static public function beginHTML() {\n self::checkLogin();\n \n //echo '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">';\n echo '<!DOCTYPE html>';\n echo '<html lang=\"pt-br\">';\n }", "title": "" }, { "docid": "29c584faa4d40f927e88f949b96d87ff", "score": "0.6113037", "text": "function html_out($in) {\n echo htmlspecialchars(var_export($in, true)) . PHP_EOL;\n}", "title": "" }, { "docid": "687f613076fe22a9df4668ea9f818900", "score": "0.6102925", "text": "public function html()\n {\n }", "title": "" }, { "docid": "b8382a428997da8f6ab1c1b95fe21842", "score": "0.6102055", "text": "function html_document_output($file_name){\r\n // returns: html\r\n\r\n $html = '';\r\n if(mb_strlen($file_name) > 0)\r\n $html = \"<a href='$this->upload_path/$file_name' target='_blank'>\" . $this->clean_out($file_name, $this->grid_ellipse_at) . \"</a>\";\r\n\r\n return $html;\r\n\r\n }", "title": "" }, { "docid": "bf3b3114198715405b204798870e2d79", "score": "0.6099737", "text": "public static function printHtml() {\n\t\techo self::html();\n\t}", "title": "" }, { "docid": "9b5500188afc58a1726fdbb01e39d18d", "score": "0.60886097", "text": "function html_head() {\n?>\n\n<html>\n<head>\n <title></title>\n\n \n\n<style type=\"text/css\">\n<!--\nbody, td {\n\tfont-family: Verdana, Geneva, Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n}\n\n.maintable {\n\twidth: 500px;\n}\n\n-->\n</style>\n</head>\n<body>\n<?php\n}", "title": "" }, { "docid": "d333308bce61f193c93a64b6d4ce8e7d", "score": "0.6065224", "text": "private function getHTML () {\n\t\tif (empty ($this->html_output)) {\n\t\t\t$this->html_output = $this->constructHTML ();\n\t\t}\n\t\t\n\t\treturn ($this->html_output);\n\t}", "title": "" }, { "docid": "8be05d92f8311cde9b115ac3a6974a2b", "score": "0.60620904", "text": "abstract public function output();", "title": "" }, { "docid": "14605204fb0fdd93092a6cb35a4a6c47", "score": "0.60613275", "text": "private function put_html_code()\n\t{\n\t\tFsb::$tpl->set_blocks('cat.line.put_html_code', array(\n\t\t\t'L_ACTION' =>\t\tFsb::$session->lang($this->lang_prefix . $this->name),\n\t\t\t'CODE' =>\t\t\t$this->args,\n\t\t\t'EXPLAIN' =>\t\t(Fsb::$session->lang($this->lang_prefix . $this->name . '_explain')) ? Fsb::$session->lang($this->lang_prefix . $this->name . '_explain') : null,\n\t\t));\n\t}", "title": "" }, { "docid": "8d89d9e0b89f2ef985a01e14f4981f34", "score": "0.6060079", "text": "static function html_header()\n {\n header('Content-Type: text/html');\n }", "title": "" }, { "docid": "3d86d876265b94cf7eb99ff06cd2c501", "score": "0.6044543", "text": "function end_html() {\n\techo \"\n\t</body>\n\t</html>\n\t\";\n}", "title": "" }, { "docid": "b8689f3867b6ea6a0e5c3f45a5364451", "score": "0.6038022", "text": "function do_html_footer() {\n ?>\r\n </body>\n</html>\n<?php\n}", "title": "" }, { "docid": "691d558531c3efe020ccd407e82d96b6", "score": "0.60373694", "text": "function DisplayGeneralPublicHeader()\n{\n\tEscapeData();\n\t?>\n\t\n\t\t\n\t\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t\n\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n\t\t<head>\n<meta name=\"google-site-verification\" content=\"-an9YnOufbMImDsRvjiwWWEAGahpffbuuRSmDPwW3vw\" />\n\t\t<title>StatGolf Handicap Calculator</title>\n <META NAME=\"keywords\" CONTENT=\"golf handicaps calculators index usga free computers figure calculate rounds course ratings slope handicapping measure\">\n <META NAME=\"description\" CONTENT=\"Calculate your handicap index, store golf scores and view your statistics free at StatGolf.\">\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />\n\t\t</head>\n\t\t<body>\n\t\t\n\t\t<div id=\"container\">\n\t\t<div id=\"top\"></div>\n\t\t<div id=\"left\">\n\t\t\n\t\t<h2>Navigation</h2>\n\t\t<div class=\"hr\">\n\t\t<hr />\n\t\t</div>\n\t\t<p class=\"side\">\n\t\t<a href=\"index.php\">&rarr; Home</a><br />\n <a href=\"screenshots.php\">&rarr; Features</a><br />\n <a href=\"clubproducts.php\">&rarr; Club Products</a><br />\n <a href=\"about.php\">&rarr; About</a><br />\n\t\t<a href=\"contact.php\">&rarr; Contact</a><br />\n\t\t</p><br />\n\t\t\n\t\t\n\t\t\n\t\t<h2>Login</h2>\n\t\t<div class=\"hr\">\n\t\t<hr />\n\t\t</div>\n\t\t<p class=\"side\">\n\t\t<form action=\"home.php\" method=\"POST\" name=\"logintable\" class=\"logintable\">\n\t\t<b>Email:</b> <input type=\"text\" name=\"Email\">\n\t\t<b>Password:</b> <input type=\"password\" name=\"Password\">\n\t\t<input type=\"submit\" value=\"Login\" name=\"LoginUser\"></form>\n\t\t<div id=\"leftlinks\">\n\t\t<A HREF=\"newuser.php\">Sign Up</A><br>\n\t\t<A HREF=\"newuser.php?SendPassword=1\">Forgot Password</A><br>\n\t\t</div>\n\t\t</p>\n \n\t\t</div>\n \n\t\t<script language=\"JavaScript\">\n\t\t\t<!--\n\t\t\tdocument.logintable.Email.focus()\n\t\t\t//-->\n\t\t</script>\n\t\t\n\t\t<?/*\n\t\t<p class=\"side\">\n\t\t<div id=\"leftlinks\">\n\t\t</div>\n\t\t</p>\n\t\t</div>\n\t\t*/?>\n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t<div id=\"main\">\n\t<?\n}", "title": "" }, { "docid": "1655e1269d43d05edb66e0bd62765833", "score": "0.60309064", "text": "function head_content()\n{\n/*?>\n <style type=\"text/css\">\n </style>\n\n <script type=\"text/javascript\">\n </script>\n<?php*/\n}", "title": "" }, { "docid": "f05f36daca8341b162468e57e961cc71", "score": "0.601704", "text": "public function render()\n {\n ob_start();\n echo('<!doctype html>'.PHP_EOL);\n echo('<html lang=\"fr\" dir=\"ltr\">'.PHP_EOL);\n printf( $this->readTemplate(\"htmlhead.html\"),\n $this->page_keywords,\n $this->page_description,\n $this->page_title\n );\n echo('<body>'.PHP_EOL);\n echo($this->page_menu);\n echo($this->page_content);\n echo($this->readTemplate( $this->footer_template ));\n $this->debugPanel();\n echo('</body>'.PHP_EOL);\n echo('</html>');\n // envoi le buffer sur la sortie puis libere le buffer\n ob_end_flush();\n }", "title": "" }, { "docid": "9573a72dc47abd403870364ff597e103", "score": "0.60161453", "text": "function output();", "title": "" }, { "docid": "b9cc2ef8b3ba37a9b9d2f20daf379b8c", "score": "0.60104096", "text": "function start_html() {\n\techo \"\n\t<html>\n\t<head>\n\t<title>Xelkalai's Culture Shock!</title>\n\t</head>\n\t<body>\n\t<h1>Xelkalai's Culture Shock!</h1>\n\t\";\n\n}", "title": "" }, { "docid": "d513437ed1de128b9dfb6a6d209b8089", "score": "0.6001776", "text": "function print_header () {\n\n\necho <<<EOD\n\n\t<html> \n\t<head><title>Download-Statistics</title></head>\n\t<body>\nEOD;\n\n\n}", "title": "" }, { "docid": "2fe90bcdc8b47db446f8eb85921098c5", "score": "0.60006714", "text": "public function html()\n\t{\n\t\t$this->css();\n\t\t$this->js();\n\t\t$this->loadActions() ;\n\t\tif(ISSET($_POST['redirect']))\n\t\t\tif($_POST['redirect'])\n\t\t\t{\n\t\t\t\theader(\"Location: \".$_POST['redirect']);\n\t\t\t\treturn;\n\t\t\t}\n\t\t$this->loadModules() ;\n\t\t$this->assign('TPL', 'modules', $this->modules);\n\t\t$this->smarty->display(\"tpl.index.html\");\n\t}", "title": "" }, { "docid": "9a4b4b7d09def9e5bb5361628bdb1a2a", "score": "0.5995108", "text": "public function buildHtml()\n {\n }", "title": "" }, { "docid": "733ce2cd30037a6b86ae74ddce08c3ce", "score": "0.59931356", "text": "function html_header() {\n\t\tGLOBAL $url_relative, $html_title, $html_body_class;\n\t\tif(!defined('HTML_HEADER_DISPLAYED')) {\n\t\t\tdefine('HTML_HEADER_DISPLAYED', true);\n\n\t\t\tif(!isset($html_title)) { $html_title = ''; }\n\t\t\tif(!isset($html_body_class)) { $html_body_class = 'body'; }\n\t\t\n\t\t\techo '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">'.\"\\n\";\n\t\t\techo \"<html>\\n\";\n\t\t\techo \"\t<head>\\n\";\n\t\t\techo '\t\t<meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1250\">'.\"\\n\";\n\t\t\techo '\t\t<link type=\"text/css\" rel=\"stylesheet\" href=\"'.$url_relative.'style.css\" />'.\"\\n\";\n\t\t\tif(!empty($html_title)) {\n\t\t\t\techo \"\t\t<title>$html_title</title>\\n\";\n\t\t\t}\n\n\t\t\tif(!defined('NOSTARTBODY')) {\n\t\t\t\thtml_body();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e9cf29657cdd7ad0dd25f3b863db5d24", "score": "0.5991717", "text": "public function render (){\n\t\t// hay que mandar al buffer el codigo html\n\t\tinclude '../masterpage/master.php';\n\t\t\n\t\t\n\t\t}", "title": "" }, { "docid": "1301504c9e5935bbc23a02e997df44c2", "score": "0.5986127", "text": "function print_head(){\r\n print <<<HERE\r\n<meta charset=\"UTF-8\">\r\n<title>HelpMe</title>\r\n<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"style.css\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"style/css/media-queries.css\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"style/js/player/mediaelementplayer.css\" />\r\n<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,300italic,300,700,700italic|Open+Sans+Condensed:300,700' rel=\"stylesheet\" type='text/css'>\r\n <!-- arcticModal -->\r\n<link type='text/css' href='style/css/basic.css' rel='stylesheet' media='screen' />\r\n<!-- IE6 \"fix\" for the close png image -->\r\n<!--[if lt IE 7]>\r\n<link type='text/css' href='style/css/basic_ie.css' rel='stylesheet' media='screen' />\r\n<![endif]-->\r\n <!-- arcticModal -->\r\n <!--[if IE 8]>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"style/css/ie8.css\" media=\"all\" />\r\n<![endif]-->\r\n<!--[if IE 9]>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"style/css/ie9.css\" media=\"all\" />\r\n<![endif]-->\r\n <!-- arcticModal -->\r\n<script type=\"text/javascript\" src=\"style/js/jquery-1.7.2.min.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/ddsmoothmenu.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/retina.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/selectnav.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/jquery.masonry.min.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/jquery.fitvids.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/jquery.backstretch.min.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/mediaelement.min.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/mediaelementplayer.min.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/jquery.dcflickr.1.0.js\"></script>\r\n<script type=\"text/javascript\" src=\"style/js/twitter.min.js\"></script>\r\n<script type=\"text/javascript\">\r\n\t$.backstretch(\"style/images/bg/3.jpg\");\r\n</script>\r\nHERE;\r\n}", "title": "" }, { "docid": "cd1c46e3265bbf0b6c593a75468cee1b", "score": "0.5985313", "text": "public function showHtml()\n {\n }", "title": "" }, { "docid": "cd1c46e3265bbf0b6c593a75468cee1b", "score": "0.5985313", "text": "public function showHtml()\n {\n }", "title": "" }, { "docid": "b808f1019326670b720493d59b732531", "score": "0.5979536", "text": "function usage() {\n\t ob_start(); \n\t ?>\n\tThe Flickr Plugin is provides several\n\ttags to incorporate Flickr into your\n website.\n\t\n\t{exp:flickr:photostream}\n\t\n\tDisplays your Flickr photostream\n\t\n\t <?php\n\t $buffer = ob_get_contents();\n\t\t\n\t ob_end_clean(); \n\t\n\t return $buffer;\n\t}", "title": "" }, { "docid": "f18ee07d47f2a5b7dbda6acabc23452f", "score": "0.5977086", "text": "function php_execute($html){\nif(strpos($html,\"<\".\"?php\")!==false){ ob_start(); eval(\"?\".\">\".$html);\n$html=ob_get_contents();\nob_end_clean();\n}\nreturn $html;\n}", "title": "" }, { "docid": "1317c37aaa1647883b61888fb7c5429e", "score": "0.59768796", "text": "public function codes()\r\n {\r\n $mains = '';\r\n foreach ($this->data as $productName => $url) {\r\n $mains .= strtr($this->_layout['mains'], [\r\n '{product_name}' => $productName,\r\n '{product_image}' => $url,\r\n ]);\r\n }\r\n\r\n $this->htm .= strtr($this->_layout['main'], [\r\n '{content}' => $mains\r\n ]);\r\n }", "title": "" }, { "docid": "e270afc9e1361869c365f9851f296f42", "score": "0.5976598", "text": "function print_html() {\n \n if( $this->html ){\n \n echo \"HTML\";\n \n } else {\n \n echo \"Array\";\n \n } \n \n }", "title": "" }, { "docid": "6f5dfe9e47b8877faad37d16d2dac04c", "score": "0.5975089", "text": "function html($type, $file, $args) {\n $type = $type . 's';\n if (file_exists('../' . $type . '/' . $file . '.php')) {\n $path = '../' . $type . '/' . $file . '.php';\n }\n elseif (file_exists('../' . $type . '/' . $file . '.php')) {\n $path = '../' . $type . '/' . $file . '/index.php';\n }\n else {\n $path = '../' . $type . '/error.php';\n }\n ob_start();\n extract($args);\n require $path;\n $html = ob_get_contents();\n ob_end_clean();\n return $html;\n}", "title": "" }, { "docid": "7628710009890d351ba49798d3f72bd8", "score": "0.59699774", "text": "function outputam($text){\n\t$text = str_replace('\\\"',\"&#34;\",$text);\n\t$text = str_replace('\\\\\\'',\"'\",$text);\n\t$text = str_replace(\"<\", \"&lt;\", $text);\n\t$text = str_replace(\">\", \"&gt;\", $text);\n\treturn $text;\n}", "title": "" }, { "docid": "b921a8cb45122d6ac181318d9e08a62a", "score": "0.5968297", "text": "function compile2($code, $cache_file = '')\n\t{\n\t\tglobal $board_config;\n \n// Begin PNphpBB2 Module\n \t\tglobal $ModName;\n\t\tif (!defined('PNPHPBB_TEMPLATE') && empty($gen_simple_header) && (pnSessionGetVar('fullpage') == 0))\n\t\t{\n \t \t $search = array (\"'<\\!doctype\\s+.*?>'si\",\n \"'<title[^>]*?>.*?</title>'si\",\n \"'<head>'i\",\n \"'</head>'i\",\n \"'<html>'i\",\n \"'<html\\s+.*?>'i\",\n \"'</html>'i\",\n \"'body\\s*{(\\s*[a-zA-Z0-9\\-_]*:\\s*{[a-zA-Z0-9\\-_]*};*)*\\s*}'i\",\n\t\t\t\t\t\t\t\t \"'/\\*.*?\\*/'i\",\n\t\t\t\t\t\t\t\t \"'<body\\s+.*?>'si\",\t\n\t\t\t\t\t\t\t\t \"'</body\\s+.*?>'si\",\n\t\t\t\t\t\t\t\t \"'<font.*?>'i\",\n \"'</font>'i\");\n\n\t\t\t $replace = array (\"\",\n\t\t\t\t\t\t\t\t\t\"\",\n \"\",\n \"\",\n \"\",\n\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\t\"\",\n\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\t\"\",\n\t\t\t\t\t\t\t\t\t\"\");\n $code = preg_replace ($search, $replace, $code);\n\t\t}\n\n\n\t\tif (!defined(PNPHPBB_TEMPLATE))\n\t\t{\n \t$code = str_replace(\"../templates/\", \"./modules/$ModName/templates/\", $code);\n \t$code = str_replace(\"\\\"templates/\", \"\\\"./modules/$ModName/templates/\", $code);\n \t$code = str_replace(\"url(templates\", \"url(./modules/$ModName/templates\", $code);\n\t\t\n\t\t\t$search = array (\"'font(?!-).*?\\s*{(\\s*[a-zA-Z0-9\\-_]*\\s*:\\s*{[a-zA-Z0-9\\-_]*};*)*\\s*}'i\",\n\t\t\t\t\t\t\t\"'a:(link|active|visited|hover|).*?{(\\s*[a-zA-Z0-9\\-_]*\\s*:\\s*.*?;)*\\s*}'i\",\n\t\t\t\t\t\t\t\"'<input\\s+type\\s*=\\s*\\\"?text\\\"?\\s+name\\s*=\\s*\\\"?username\\\"?'i\",\n\t\t\t\t\t\t \"'<input\\s+type\\s*=\\s*\\\"?password\\\"?\\s+name\\s*=\\s*\\\"?password\\\"?'i\",\n\t\t\t\t\t\t\t\"'<input\\s+type\\s*=\\s*\\\"?checkbox\\\"?\\s+name\\s*=\\s*\\\"?autologin\\\"?'i\",\n\t\t\t\t\t\t\t\"'\\.copyright'i\",\n\t\t\t\t\t\t\t\"'<span\\s+class\\s*=\\s*\\\"?copyright\\\"?'i\");\n\n\t\t\t$replace = array (\"\",\n \t\t\t\t\t\"\",\n '<input type=\"text\" name=\"uname\"',\n\t\t\t\t\t\t\t'<input type=\"password\" name=\"pass\"',\n\t\t\t\t\t\t\t'<input type=\"checkbox\" name=\"rememberme\"',\n\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t'<div class=\"gensmall\" align=\"center\"');\n \n \t$code = preg_replace ($search, $replace, $code);\n\t\t\n\t\t\tif (preg_match(\"/L_CONFIGURATION_TITLE/i\", $code))\n\t\t\t{\n \t\t$code = preg_replace (\"'<tr[^>]*>[^<]*(<(?!tr)[^<]*)*(L_SERVER_NAME|L_SERVER_PORT|L_SCRIPT_PATH|L_SITE_NAME|L_SITE_DESCRIPTION|L_ACCT_ACTIVATION|L_DATE_FORMAT|L_SYSTEM_TIMEZONE|L_ENABLE_GZIP|L_COOKIE_SECURE|L_ALLOW_NAME_CHANGE|L_COPPA_SETTINGS|L_COPPA_FAX|L_COPPA_MAIL|L_DEFAULT_LANGUAGE|L_TIMEZONE).*?</tr>'si\", \"\", $code);\n\t\t\t}\n\n\t\t\tif (preg_match(\"/L_REGISTRATION_INFO/i\", $code))\n\t\t\t{\n//\t\t\t\t$code = preg_replace (\"'<table[^>]*>[^<]*(<(?!table)[^<]*)*(L_REGISTRATION_INFO).*?</table>'si\", \"\", $code);\n \t \t$code = preg_replace (\"'<tr[^>]*>[^<]*(<(?!tr)[^<]*)*(L_REGISTRATION_INFO|L_ITEMS_REQUIRED|L_USERNAME|L_EMAIL_ADDRESS|L_NEW_PASSWORD|L_CONFIRM_PASSWORD|L_ICQ_NUMBER|L_AIM|L_MESSENGER|L_YAHOO|L_WEBSITE|L_LOCATION|L_OCCUPATION|L_INTERESTS|L_BOARD_LANGUAGE|L_DATE_FORMAT|L_TIMEZONE).*?</tr>'si\", \"\", $code);\n\t\t\t}\n }\n// End PNphpBB2 Module\n\n\t\t$code = $this->compile_code('', $code, $this->use_isset);\n\t\tif($cache_file && !empty($board_config['xs_use_cache']) && !empty($board_config['xs_auto_compile']))\n\t\t{\n\t\t\t$this->write_cache($cache_file, $code);\n\t\t}\n\t\t$code = '?'.'>'.$code.'<'.\"?php\\n\";\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "32118619f9a0f0fb4991e9cd326cbfa7", "score": "0.5962657", "text": "function out ($bname) {\n\n\t\t$out = $this->text($bname);\n\t\t// $length=strlen($out);\n\t\t//header(\"Content-Length: \".$length); // TODO: Comment this back in later\n\n\t\t// JC 20/11/02 echo the template filename if in development as\n\t\t// html comment\n\t\t// note 4.3.0 and ZE2 have new function debug_backtrace() that show a\n\t\t// function call list - it may be nice to dump that here too\n\t\t//if (SYSTEM_TYPE == 'development') {\n\t\t// echo \"<!-- Template: \" . $this->_file_name_full_path . \" -->\\n\";\n\t\t//}\n\t\t// moved to ::text() so parsing sub templates work\n\n\t\techo $out;\n\t}", "title": "" }, { "docid": "16fa4225d0ee94c2adb5ae3ab1570c70", "score": "0.5952781", "text": "abstract function output();", "title": "" }, { "docid": "16fa4225d0ee94c2adb5ae3ab1570c70", "score": "0.5952781", "text": "abstract function output();", "title": "" }, { "docid": "ee003582e42d70c04f3964f12464f1c3", "score": "0.5948418", "text": "function pageHead($css = \"css/bb.css\")\n {\n // This is necessary to use the print (or echo) function\n // to avoid parsing problems with the xml start/end tags.\n echo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">' . \"\\n\";\n echo '<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\">' . \"\\n\";\n echo \"<head>\\n\";\n echo \"<title>\" . myhtmlentities($this->title) . \"</title>\\n\";\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />' . \"\\n\";\n echo '<meta http-equiv=\"Keywords\" content=\"Blue Eye Video, Blue Count\" />' . \"\\n\";\n echo '<meta http-equiv=\"Description\" content=\"Blue Count HTML Interface.\"/>' . \"\\n\";\n echo '<link rev=\"made\" href=\"mailto:[email protected]\" />' . \"\\n\";\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $css . '\"/>' . \"\\n\";\n echo \" <script type=\\\"text/javascript\\\" language=\\\"JavaScript\\\" SRC=\\\"\" . BLUEPHPROOT . \"/BluePHP/js/AnchorPosition.js\\\"></script>\\n\";\n echo \" <script type=\\\"text/javascript\\\" language=\\\"JavaScript\\\" SRC=\\\"\" . BLUEPHPROOT . \"/BluePHP/js/PopupWindow.js\\\"></script>\\n\";\n echo \" <script type=\\\"text/javascript\\\" language=\\\"JavaScript\\\" SRC=\\\"\" . BLUEPHPROOT . \"/BluePHP/js/date.js\\\"></script>\\n\";\n echo \" <script type=\\\"text/javascript\\\" language=\\\"JavaScript\\\" SRC=\\\"\" . BLUEPHPROOT . \"/BluePHP/js/CalendarPopup.js\\\"></script>\\n\";\n echo '<meta http-equiv=\"refresh\" content=\"' . (SESSIONTIME + 5) . '\"/>' . \"\\n\";\n echo \"</head>\\n\";\n echo \"<body>\\n\";\n }", "title": "" }, { "docid": "46f97c3ea2390cf104abcf4325a57eab", "score": "0.5947857", "text": "function html_start() {\n\t\tprint \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\\n\";\n\t print \"<HTML xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\\n\";\n\t print \" <HEAD>\\n\";\n\t\tprint \" <META http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\" >\\n\";\n\t print \" <TITLE>\".SITE_TITLE.\"</TITLE>\\n\";\n\t print \" <SCRIPT type='text/javascript' SRC='js/jquery-1.7.1.min.js'></SCRIPT>\\n\";\n\t print \" <SCRIPT type='text/javascript' SRC='js/jquery-ui-1.8.18.custom.min.js'></SCRIPT>\\n\";\n\t print \" <SCRIPT type='text/javascript' SRC='js/cloudgroup.js'></SCRIPT>\\n\";\n\t\tprint \" <SCRIPT type='text/javascript' SRC='js/jquery.blockUI.js'></SCRIPT>\\n\";\n\t\tprint \" <SCRIPT type='text/javascript' SRC='js/jquery.jqplot.min.js'></SCRIPT>\\n\";\n\t\tprint \" <script type='text/javascript' src='libs/tinymce/jscripts/tiny_mce/tiny_mce.js'></script>\\n\";\n\n\t\t//DataTables\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"modules/libraries/css/jquery.dataTables.css\"/>';\n\t print '<script type=\"text/javascript\" language=\"javascript\" src=\"modules/libraries/js/jquery.dataTables.js\"></script>';\n\n\t\t//FusionCharts\n\t\tprint '<script type=\"text/javascript\" src=\"fusioncharts/js/fusioncharts.js\"></script>';\n\t\tprint '<script type=\"text/javascript\" src=\"fusioncharts/js/themes/fusioncharts.theme.ocean.js\"></script>';\n\t\tprint '<script type=\"text/javascript\" src=\"fusioncharts/js/themes/fusioncharts.theme.zune.js\"></script>';\n\t\tprint '<script type=\"text/javascript\" src=\"fusioncharts/js/themes/fusioncharts.theme.fint.js\"></script>';\n\t\tprint '<script type=\"text/javascript\" src=\"fusioncharts/js/themes/fusioncharts.theme.carbon.js\"></script>';\n\n\t\t//Notifications\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"js/jquery-ui.css\"/>';\n\t\tprint '<script type=\"text/javascript\" src=\"js/jquery-ui.js\"></script>';\n\n\t\t//Newsletter\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"js/jquery.multiselect.css\"/>';\n\t\tprint '<script type=\"text/javascript\" src=\"js/jquery.multiselect.js\"></script>';\n\n\n\t if (is_authenticated()) { include_module_js_scripts(); } \n\t \t \tprint \" <LINK TYPE='text/css' href='css/site.css' rel='stylesheet' />\\n\";\n\t \tprint \" <LINK TYPE='text/css' href='css/jquery-ui-1.8.18.custom.css' rel='stylesheet' media='all' />\\n\";\n\n\t \t$ColourList = array(\n \"aliceblue\" => \"#F0F8FF\", \"antiquewhite\" => \"#FAEBD7\", \"aqua\" => \"#00FFFF\", \"aquamarine\" => \"#7FFFD4\", \"azure\" => \"#F0FFFF\", \"beige\" => \"#F5F5DC\", \"bisque\" => \"#FFE4C4\", \"black\" => \"#000000\", \"blanchedalmond\" => \"#FFEBCD\", \"blue\" => \"#0000FF\", \"blueviolet\" => \"#8A2BE2\", \"brown\" => \"#A52A2A\", \"burlywood\" => \"#DEB887\", \"cadetblue\" => \"#5F9EA0\", \"chartreuse\" => \"#7FFF00\", \"chocolate\" => \"#D2691E\", \"coral\" => \"#FF7F50\", \"cornflowerblue\" => \"#6495ED\", \"cornsilk\" => \"#FFF8DC\", \"crimson\" => \"#DC143C\", \"cyan\" => \"#00FFFF\", \"darkblue\" => \"#00008B\", \"darkcyan\" => \"#008B8B\", \"darkgoldenrod\" => \"#B8860B\", \"darkgray\" => \"#A9A9A9\", \"darkgrey\" => \"#A9A9A9\", \"darkgreen\" => \"#006400\", \"darkkhaki\" => \"#BDB76B\", \"darkmagenta\" => \"#8B008B\", \"darkolivegreen\" => \"#556B2F\", \"darkorange\" => \"#FF8C00\", \"darkorchid\" => \"#9932CC\", \"darkred\" => \"#8B0000\", \"darksalmon\" => \"#E9967A\", \"darkseagreen\" => \"#8FBC8F\", \"darkslateblue\" => \"#483D8B\", \"darkslategray\" => \"#2F4F4F\", \"darkslategrey\" => \"#2F4F4F\", \"darkturquoise\" => \"#00CED1\", \"darkviolet\" => \"#9400D3\", \"deeppink\" => \"#FF1493\", \"deepskyblue\" => \"#00BFFF\", \"dimgray\" => \"#696969\", \"dimgrey\" => \"#696969\", \"dodgerblue\" => \"#1E90FF\", \"firebrick\" => \"#B22222\", \"floralwhite\" => \"#FFFAF0\", \"forestgreen\" => \"#228B22\", \"fuchsia\" => \"#FF00FF\", \"gainsboro\" => \"#DCDCDC\", \"ghostwhite\" => \"#F8F8FF\", \"gold\" => \"#FFD700\", \"goldenrod\" => \"#DAA520\", \"gray\" => \"#808080\", \"grey\" => \"#808080\", \"green\" => \"#008000\", \"greenyellow\" => \"#ADFF2F\", \"honeydew\" => \"#F0FFF0\", \"hotpink\" => \"#FF69B4\", \"indianred \" => \"#CD5C5C\", \"indigo \" => \"#4B0082\", \"ivory\" => \"#FFFFF0\", \"khaki\" => \"#F0E68C\", \"lavender\" => \"#E6E6FA\", \"lavenderblush\" => \"#FFF0F5\", \"lawngreen\" => \"#7CFC00\", \"lemonchiffon\" => \"#FFFACD\", \"lightblue\" => \"#ADD8E6\", \"lightcoral\" => \"#F08080\", \"lightcyan\" => \"#E0FFFF\", \"lightgoldenrodyellow\" => \"#FAFAD2\", \"lightgray\" => \"#D3D3D3\", \"lightgrey\" => \"#D3D3D3\", \"lightgreen\" => \"#90EE90\", \"lightpink\" => \"#FFB6C1\", \"lightsalmon\" => \"#FFA07A\", \"lightseagreen\" => \"#20B2AA\", \"lightskyblue\" => \"#87CEFA\", \"lightslategray\" => \"#778899\", \"lightslategrey\" => \"#778899\", \"lightsteelblue\" => \"#B0C4DE\", \"lightyellow\" => \"#FFFFE0\", \"lime\" => \"#00FF00\", \"limegreen\" => \"#32CD32\", \"linen\" => \"#FAF0E6\", \"magenta\" => \"#FF00FF\", \"maroon\" => \"#800000\", \"mediumaquamarine\" => \"#66CDAA\", \"mediumblue\" => \"#0000CD\", \"mediumorchid\" => \"#BA55D3\", \"mediumpurple\" => \"#9370D8\", \"mediumseagreen\" => \"#3CB371\", \"mediumslateblue\" => \"#7B68EE\", \"mediumspringgreen\" => \"#00FA9A\", \"mediumturquoise\" => \"#48D1CC\", \"mediumvioletred\" => \"#C71585\", \"midnightblue\" => \"#191970\", \"mintcream\" => \"#F5FFFA\", \"mistyrose\" => \"#FFE4E1\", \"moccasin\" => \"#FFE4B5\", \"navajowhite\" => \"#FFDEAD\", \"navy\" => \"#000080\", \"oldlace\" => \"#FDF5E6\", \"olive\" => \"#808000\", \"olivedrab\" => \"#6B8E23\", \"orange\" => \"#FFA500\", \"orangered\" => \"#FF4500\", \"orchid\" => \"#DA70D6\", \"palegoldenrod\" => \"#EEE8AA\", \"palegreen\" => \"#98FB98\", \"paleturquoise\" => \"#AFEEEE\", \"palevioletred\" => \"#D87093\", \"papayawhip\" => \"#FFEFD5\", \"peachpuff\" => \"#FFDAB9\", \"peru\" => \"#CD853F\", \"pink\" => \"#FFC0CB\", \"plum\" => \"#DDA0DD\", \"powderblue\" => \"#B0E0E6\", \"purple\" => \"#800080\", \"red\" => \"#FF0000\", \"rosybrown\" => \"#BC8F8F\", \"royalblue\" => \"#4169E1\", \"saddlebrown\" => \"#8B4513\", \"salmon\" => \"#FA8072\", \"sandybrown\" => \"#F4A460\", \"seagreen\" => \"#2E8B57\", \"seashell\" => \"#FFF5EE\", \"sienna\" => \"#A0522D\", \"silver\" => \"#C0C0C0\", \"skyblue\" => \"#87CEEB\", \"slateblue\" => \"#6A5ACD\", \"slategray\" => \"#708090\", \"slategrey\" => \"#708090\", \"snow\" => \"#FFFAFA\", \"springgreen\" => \"#00FF7F\", \"steelblue\" => \"#4682B4\", \"tan\" => \"#D2B48C\", \"teal\" => \"#008080\", \"thistle\" => \"#D8BFD8\", \"tomato\" => \"#FF6347\", \"turquoise\" => \"#40E0D0\", \"violet\" => \"#EE82EE\", \"wheat\" => \"#F5DEB3\", \"white\" => \"#FFFFFF\", \"whitesmoke\" => \"#F5F5F5\", \"yellow\" => \"#FFFF00\", \"yellowgreen\" => \"#9ACD32\");\n \n\t\t\t$sql = \"SELECT `theme_colour` FROM branches WHERE branch_id ='\".$GLOBALS['system_user']->branchID.\"'\";\n $sqlres = mysqli_query($GLOBALS[\"link\"],$sql);\n $theme_colour = \"\";\n while($row = mysqli_fetch_assoc($sqlres)) {\n \t$theme_colour = $row['theme_colour'];\n }\n if($theme_colour ==\"\"){\n \t$theme_colour =\"#6dad1f\";\n }else{\n \t $theme_colour = $ColourList[$theme];\n }\n \n\t\t\tprint \"<style>\";\n\t\t\tprint \".accordion > li:hover > a,\n\t\t\t\t\t.accordion > li:target > a,\n\t\t\t\t\t.accordion > li > a.active {\n\t\t\t\t\t\tcolor: #fcfcfc;\n\t\t\t\t\t\ttext-shadow: 1px 1px 1px rgba(255,255,255, .2);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*background: url(../img/active.png) repeat-x;*/\n\t\t\t\t\t\tbackground: $theme_colour;\n\t\t\t\t\t\tbackground: -moz-linear-gradient(top, $theme_colour 0%, $theme_colour 100%);\n\t\t\t\t\t\tbackground: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$theme_colour), color-stop(100%,$theme_colour));\n\t\t\t\t\t\tbackground: -webkit-linear-gradient(top, $theme_colour 0%,$theme_colour 100%);\n\t\t\t\t\t\tbackground: -o-linear-gradient(top, $theme_colour 0%,$theme_colour 100%);\n\t\t\t\t\t\tbackground: -ms-linear-gradient(top, $theme_colour 0%,$theme_colour 100%);\n\t\t\t\t\t\tbackground: linear-gradient(top, $theme_colour 0%,$theme_colour 100%);\t\n\t\t\t\t\t}\";\n\t\t\tprint \"</style>\";\n\n\t\tif(is_authenticated()) { include_module_css_files(); }\n\t\t\n\t print \" </HEAD>\\n\";\n\t print \"<BODY style='height: 100%;'>\\n\";\n\t\tprint \"<div id='alert-dialog' style='display:none;'></div>\\n\";\n }", "title": "" }, { "docid": "0cc9a95987f5673aba3748df60e0a1d3", "score": "0.5943861", "text": "public function HtmlOutput() {\n\t\t$output = '';\n\t\t\n\t\tif (!$this->_keyWords->IsEmpty()) $output .= '<meta name=\"keywords\" content=\"'.implode(', ', $this->_keyWords->AsArray()).'\" />'.\"\\n\";\n\t\tforeach($this->_meta as $label=>$value){\n\t\t\tif(trim($value)){\n\t\t\t\t$output.= '<meta name=\"'.$label.'\" content=\"'.$value.'\" />'.\"\\n\";\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "5476526bd54a9683e792021031f50b09", "score": "0.5937263", "text": "function htmlPresentation (&$obj,&$t) {\n\t\t//put the template and content together to form a \n\t\t// basic html page\n\t\tinclude_once(TEMPLATE_PATH.\"header.html.php\");\n\t\t//for PHP5 we need to clean the scope of variables \n\t\t// from the previous include.\n\t\tunset($sysMessages);\n\t\tunset($k);\n\t\tunset($v);\n\t\tinclude_once($obj->module_root.\"templates/\".$obj->templateName.\".html\");\n\t\tinclude_once(TEMPLATE_PATH.\"footer.html.php\");\n\t}", "title": "" }, { "docid": "9ed2a054b0121171f87949ad4ec05116", "score": "0.59318066", "text": "public function output()\r\n\t{\r\n\t\t\r\n\t\t$adminLoginForm = \r\n\t\t'\r\n\t\t\t<section class=\"loginform cf\">\r\n\t\t\t\t<form name=\"login\" action=\"../register/admin_login.php\" method=\"post\">\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t<label for=\"email\">Email</label>\r\n\t\t\t\t\t\t\t<input type=\"email\" name=\"email\" placeholder=\"[email protected]\" required>\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t<label for=\"password\">Password</label>\r\n\t\t\t\t\t\t\t<input type=\"password\" name=\"password\" placeholder=\"password\" required></li>\r\n\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t<input type=\"submit\" value=\"Login\">\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</form>\r\n\t\t\t</section>\r\n\t\t';\r\n\t\trequire_once($this->model->template);\r\n\t}", "title": "" }, { "docid": "60738591530c6e03edc20b7175068f69", "score": "0.5928477", "text": "function compile($code, $do_not_echo = false, $retvar = '')\n\t{\n\t\t$code = ' ?'.'>' . $this->compile_code('', $code, true) . '<'.\"?php \\n\";\n\t\tif($do_not_echo)\n\t\t{\n\t\t\t$code = \"ob_start();\\n\". $code. \"\\n\\${$retvar} = ob_get_contents();\\nob_end_clean();\\n\";\n\t\t}\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "9dedf64179c5b699ec6508da2b3b3d35", "score": "0.5927027", "text": "function mediaconsult_header_topright_content_output() {\n\n\tob_start();\n\t\n\t$output = '';\n\t\n\tif ( get_theme_mod( 'header_topright_content' ) == 'true_email_phone' ) {\n\n\t\tget_template_part( 'inc/topright' );\n\t\t\n\t}\n\tif ( get_theme_mod( 'header_topright_content' ) == 'true_search' ) {\n\n\t\tget_template_part( 'inc/topright-search' );\n\t\t\n\t}\n\t\n\t$output = ob_get_clean();\n\t\n\treturn '<div class=\"header-topright-wrapper\">' . $output . '</div>';\n\n}", "title": "" }, { "docid": "ee43a5a13aedba26b5dfb300dd694182", "score": "0.5924088", "text": "function DisplayPHPinfo()\n{\n echo '\n<style type=\"text/css\">\n#phpinfo {}\n#phpinfo pre {}\n#phpinfo a:link { color: #000099; text-decoration: none; background-color: #ffffff; }\n#phpinfo a:hover {}\n#phpinfo table { border-collapse: collapse; }\n#phpinfo .center { text-align: center; }\n#phpinfo .center table { margin-left: auto; margin-right: auto; text-align: left; }\n#phpinfo .center th { text-align: center !important; }\n#phpinfo td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline; }\n#phpinfo h1 { font-size: 150%; }\n#phpinfo h2 { font-size: 125%; }\n#phpinfo .p { text-align: left; }\n#phpinfo .e { background-color: #ccccff; font-weight: bold; color: #000000; }\n#phpinfo .h { background-color: #9999cc; font-weight: bold; color: #000000; }\n#phpinfo .v { background-color: #cccccc; color: #000000; }\n#phpinfo .vr { background-color: #cccccc; text-align: right; color: #000000; }\n#phpinfo img { float: right; border: 0px; }\n#phpinfo hr { width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000; }\n</style>\n';\n ob_start();\n @phpinfo();\n $pinfo = ob_get_contents();\n ob_end_clean();\n $pinfo = preg_replace('%^.*<body>(.*)</body>.*$%ms','$1',$pinfo);\n echo '<div id=\"phpinfo\">'.$pinfo.'</div>';\n\n}", "title": "" }, { "docid": "aced0bd5d3487c950c01dc9532652ee3", "score": "0.59220284", "text": "function RenderLayout($nbEnr, $header, $footer)\n\t{\n\t\t$content = $nbEnr.\"&nbsp;\".$slg_resultats.\"\";\n\t\t$content.= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\n\t\t$content.= $footer;\n\t\t$content.= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\n\t\t$content.= $header;\n\n//print(\"<br>----<br>\");\n//var_dump($content);\n//print(\"<br>----<br>\");\n\n\t\treturn($content);\n\t}", "title": "" }, { "docid": "3fd893d76159f25391c33769fb3e2f02", "score": "0.59192234", "text": "function renderOutput($page_title = \"Security Information About PHP\")\n {\n /**\n * We need to use PhpSecInfo_Test::getBooleanIniValue() below\n * @see PhpSecInfo_Test::getBooleanIniValue()\n */\n if (!class_exists('PhpSecInfo_Test')) {\n include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Test' . DIRECTORY_SEPARATOR . 'Test.php');\n }\n $this->loadView($this->_format);\n }", "title": "" }, { "docid": "129605021b0274801209a160b54747c9", "score": "0.59142953", "text": "function do_html_footer()\n{\n?>\n </body>\n </html>\n<?php\n}", "title": "" }, { "docid": "129605021b0274801209a160b54747c9", "score": "0.59142953", "text": "function do_html_footer()\n{\n?>\n </body>\n </html>\n<?php\n}", "title": "" }, { "docid": "3ca0d49c95f7a9242737cd1d9feba639", "score": "0.5913345", "text": "public function write($html) {}", "title": "" }, { "docid": "c4fe94d1edce071dc39bb86cdcc82819", "score": "0.5911361", "text": "public abstract function toHTML();", "title": "" }, { "docid": "8bd05d9088ca417744a422758ec268c3", "score": "0.5907584", "text": "function toHTML(){\n\t\t$strHTML = \"<h2>Welcome to Tantalizing Asian Cuisine!</h2>\n\t\t\t\t\t\t\t<div>We serve some of the best Malaysian, Thai, and Chinese food in the area. Feel free to check out our menu.</div>\n\t\t\t\t\t\t\t<p>We now have a takeout option available right on our website, check it out!!!</p>\";\n\t\t\t\t\t\t\t\n\t\treturn $strHTML;\n\t}", "title": "" }, { "docid": "855c9decef1337a487ca1c92968efe6f", "score": "0.58996373", "text": "public abstract function output();", "title": "" }, { "docid": "a32b391997fd624a0e21c50e9a47f74f", "score": "0.58944434", "text": "function html_foot() {\n?>\n\n</body>\n</html>\n\n<?php\n}", "title": "" }, { "docid": "9cbcaff63f97b4000195088728f5ab13", "score": "0.5892902", "text": "function do_html_footer()\r\n{\r\n \r\n?><div align='right'>\r\n <hr />\r\n \r\n <h3> © 2010 Adaptable RSS Reader</h3>\r\n </table>\r\n </div>\r\n </body>\r\n </html>\r\n\r\n<?php\r\n}", "title": "" }, { "docid": "0626fc73d2d1cd1141f67ad7bc323897", "score": "0.58865184", "text": "function getHeader() {\r\n?>\r\n\t\t<!DOCTYPE html>\r\n\t\t<html>\r\n\t\t<head>\r\n\t\t<title>Ajout de film</title>\r\n\t\t<meta charset=\"utf-8\" />\r\n\t\t</head>\r\n\t\t<body>\r\n<?php\t\t\r\n\t}", "title": "" }, { "docid": "330d0f3272f68c16d36c124a113465da", "score": "0.58864206", "text": "function html_footer()\n{\n echo \"</body>\\n\";\n echo \"</html>\\n\";\n}", "title": "" } ]
8ae6495f475c3928704ccd5ccc5e10eb
To download the photo associated with a Lead/Contact.
[ { "docid": "41d9c9737f455ae661634bf26227e982", "score": "0.52143884", "text": "public function download_photo($module, $id, $filename)\n {\n $url_path = $this::_DEFAULT_ZOHO_URL . $module . \"/\" . $id . \"/photo\";\n return $this->_download_file($url_path, array(), $filename);\n }", "title": "" } ]
[ { "docid": "61dcfc47ebb282e63b62e7932c6e71e6", "score": "0.66655016", "text": "public function get_lead_image()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "8bd15b026d9fab98fbb5876e8c9063b8", "score": "0.64936036", "text": "public function download()\n\t{\n\t\t// Check if photos is enabled\n\t\t$this->checkFeature();\n\n\t\t// Load up info object\n\t\t$info \t= Foundry::info();\n\n\t\t// Get the id of the photo\n\t\t$id \t= JRequest::getInt( 'id' );\n\t\t$photo\t= Foundry::table( 'Photo' );\n\t\t$photo->load( $id );\n\n\t\t// Id provided must be valid\n\t\tif( !$id || !$photo->id )\n\t\t{\n\t\t\t$this->setMessage( JText::_( 'COM_EASYSOCIAL_PHOTOS_INVALID_PHOTO_ID_PROVIDED' ) , SOCIAL_MSG_ERROR );\n\t\t\t$info->set( $this->getMessage() );\n\n\t\t\treturn $this->redirect( FRoute::albums( array() , false ) );\n\t\t}\n\n\t\t// Load up photo library\n\t\t$lib \t= Foundry::photo( $photo->uid , $photo->type , $photo );\n\n\t\tif( !$lib->downloadable() )\n\t\t{\n\t\t\treturn $this->restricted( $lib );\n\t\t}\n\n\t\t// Let's try to download the file now\n\t\t$photo->download();\n\t}", "title": "" }, { "docid": "36f232abc8e2943009b193bd25aec8c2", "score": "0.6405285", "text": "public function getPhotoURL(){\n\t\treturn $this->photoFile->exists() \n\t\t\t\t\t\t? \\GO::url('addressbook/company/photo', array('id'=>$this->id,'mtime'=>$this->photoFile->mtime())) \n\t\t\t\t\t\t: null;\n\t}", "title": "" }, { "docid": "506ab078b8da62d96a9f823b2622f9db", "score": "0.5909557", "text": "public function getContactPicture(array $params)\n {\n $downloadArr = Helper::arrayToMulti($params);\n $accessToken = $this->options->getAccessToken();\n\n V::doValidate($this->pictureRules(), $downloadArr);\n V::doValidate(V::stringType()->notEmpty(), $accessToken);\n\n $method = [];\n $target = API::LIST['contactPic'];\n $header = ['Authorization' => $accessToken];\n\n foreach ($downloadArr as $item)\n {\n $sink = $item['path'];\n\n $request = $this->options\n ->getAsync()\n ->setPath($item['id'])\n ->setHeaderParams($header);\n\n $method[] = function () use ($request, $target, $sink)\n {\n return $request->getSink($target, $sink);\n };\n }\n\n return $this->options->getAsync()->pool($method, true);\n }", "title": "" }, { "docid": "e92a0809c0111cec47d8e8ba3d5ec2eb", "score": "0.59092206", "text": "public function photoId(Request $request,$id){\n $companyName =$request->user()->company_name;\n $company = Company::where(\"company_name\",$companyName)->first();\n $path = public_path().\"/\".$company->company_name.\"/\".$id.\"\";\n return response()->download($path);\n }", "title": "" }, { "docid": "20bcdb5a8214ff205e6fe088320b82d9", "score": "0.58945024", "text": "private function download_Brafton_Image( ) {\n $uploads_dir = uploads_Directory_Exists();\n if( $uploads_dir ) {\n $feed_brafton_image_url = $this->args['feed_brafton_image_url'];\n $image_attachment_id = media_handle_upload( $feed_brafton_image_url );\n return $image_attachment_id; \n }\n else{\n //logMsg('Check to make sure the uploads directory exists and has appropriate permissions.'); \n return false; \n }\n\t}", "title": "" }, { "docid": "269a705948ab5ac9bdd1b284d069b2f8", "score": "0.5872562", "text": "public function getPhoto(string $id, string $moduleAPIName)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/'); \n\t\t$apiPath=$apiPath.(strval($moduleAPIName)); \n\t\t$apiPath=$apiPath.('/'); \n\t\t$apiPath=$apiPath.(strval($id)); \n\t\t$apiPath=$apiPath.('/photo'); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_GET); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_READ); \n\t\treturn $handlerInstance->apiCall(DownloadHandler::class, 'application/x-download'); \n\n\t}", "title": "" }, { "docid": "15bf333d9875931b8023838113a65557", "score": "0.58388454", "text": "public function getImageurl() {\n\treturn '/'.Yii::$app->params['creditPath'] . $this->file;\n }", "title": "" }, { "docid": "1a7d14e620115e2783530317724c553c", "score": "0.5822254", "text": "function staff_do_photo_link($ds, $entry, $uid, $privacy) {\n if (!isset($uid)) {\n return \"\";\n }\n $path=\"sites/default/files/nonpicture-03.png\";\n if (isset($privacy[\"public_photo\"][\"members\"][$uid])) {\n $photo = @ldap_get_values_len($ds, $entry, \"jpegPhoto\");\n\t if ($photo !== FALSE and $photo[\"count\"] > 0) {\n\t $path = \"staff/uid/\" . $uid . \".jpg\";\n }\n }\n return \"<img src='\" . url($path) . \"' alt='Staff Photograph'/>\";\n}", "title": "" }, { "docid": "cb36fe79a568e74809a5b11ce8db1224", "score": "0.5626021", "text": "private function downloadDetails()\n\t{\n\t\t$this->fetchPage();\n\t\t$this->fillInfo();\n\t\t$this->processImages();\n\t}", "title": "" }, { "docid": "9d0eb7fc251e39d3ea62d3c77f6456a7", "score": "0.5618574", "text": "static function getPhotoPath()\n {\n return CUSTOMER_PHOTO_PATH;\n }", "title": "" }, { "docid": "4a09d0b492c9d8593534d7a2dcf560b0", "score": "0.56100255", "text": "function staff_do_photo($ds, $sr, $privacy) {\n $entry = ldap_first_entry($ds, $sr);\n\n $uid = NULL;\n $values = @ldap_get_values($ds, $entry, \"uid\");\n if ($values !== FALSE and $values[\"count\"] > 0) {\n $uid = $values[0];\n }\n if (!isset($privacy[\"public_photo\"][\"members\"][$uid])) {\n drupal_set_message(check_plain(\"Unable to retrieve user (privacy)\"), \"error\");\n return \"\";\n }\n\n if ($entry !== FALSE) {\n $values = @ldap_get_values_len($ds, $entry, \"jpegPhoto\");\n }\n else {\n drupal_set_message(check_plain(\"Unable to retrieve user: \" . ldap_error($ds)), \"error\");\n return \"\";\n }\n\n if ($values !== FALSE && $values[\"count\"] != 0) {\n header('Content-type: image/jpeg');\n print $values[0];\n exit();\n }\n else {\n drupal_set_message(check_plain(\"Unable to retrieve jpegPhoto: \" . ldap_error($ds)), \"error\");\n return \"\";\n }\n}", "title": "" }, { "docid": "6f8ce30ed0ac95632e23ff00acae1520", "score": "0.5582929", "text": "public function download();", "title": "" }, { "docid": "c36d1b8c2aed0ccdf48842e9067e88c6", "score": "0.55532753", "text": "public function downloadAction()\n {\n /* @var $documentDao \\DDD\\Dao\\Document\\Document */\n $documentDao = $this->getServiceLocator()->get('dao_document_document');\n $documentId = (int)$this->params()->fromRoute('id', 0);\n\n /**\n * @var \\DDD\\Domain\\Document\\Document $documentRow\n */\n $documentRow = $documentDao->fetchOne(\n ['id' => $documentId],\n ['attachment', 'created_date']\n );\n\n $filePath = DirectoryStructure::FS_UPLOADS_DOCUMENTS . date('Y/m/j/', strtotime($documentRow->getCreatedDate())) . $documentRow->getAttachment();\n\n /**\n * @var \\FileManager\\Service\\GenericDownloader $genericDownloader\n */\n $genericDownloader = $this->getServiceLocator()->get('fm_generic_downloader');\n\n $genericDownloader->downloadAttachment($filePath, basename($filePath));\n\n if ($genericDownloader->hasError()) {\n Helper::setFlashMessage(['error' => $genericDownloader->getErrorMessages(true)]);\n\n $url = $this->getRequest()->getHeader('Referer')->getUri();\n $this->redirect()->toUrl($url);\n }\n\n return true;\n }", "title": "" }, { "docid": "e996a9e4bddbeee0ca8f40cf434aa486", "score": "0.5551426", "text": "function beyle(){\n\tglobal $husnab0t;\n\t$husnab0t->sendPhoto(\"https://s3.eksiup.com/fc55f421b312.jpg\",\"\",1);\n}", "title": "" }, { "docid": "a200c3669766b34a8ef4c3e59e8827de", "score": "0.5520852", "text": "public function the_lead_image(){\n\t\t\tglobal $page;\n\t\t\t$files = [];\n\t\t\t$files = array(\n\t\t\t\t'portrait' => $this->create_filepath_arr('lead/portrait'),\n\t\t\t\t'landscape'=> $this->create_filepath_arr('lead/landscape')\n\t\t\t);\n\t\t\t$tag = '<figure class=\"loading\">';\n\t\t\t\t$tag .= '<picture><!--[if IE 9]><video style=\"display: none\"><![endif]-->';\n\t\t\t\tforeach($files as $orientation => $file){\n\t\t\t\t\t$props = array(\n\t\t\t\t\t\t'title' => $this->title,\n\t\t\t\t\t\t'files' => $file[0],\n\t\t\t\t\t\t'client'=> $this->client,\n\t\t\t\t\t\t'size' => 'width5',\n\t\t\t\t\t\t'ratio' => $orientation\n\t\t\t\t\t);\n\t\t\t\t\t$result = new Image($props);\n\t\t\t\t\t$tag .= $result->get_the_sources();\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$tag .= '<!--[if IE 9]></video><![endif]-->';\n\t\t\t\t$tag .= $this->get_lead_default();\n\t\t\t\t$tag .= '</picture>';\n\t\t\t$tag .= '</figure>';\n\t\n\t\t\treturn $tag;\n\t\t}", "title": "" }, { "docid": "4e8ffed9b72579b90abfcc61959d26a0", "score": "0.55182993", "text": "public function getAttachmentUrlAttribute()\n {\n if ($this->attributes['attachment'])\n return '/filebank/company/'.$this->attributes['for_company_id'].\"/wms/\".$this->attributes['attachment'];\n return '';\n }", "title": "" }, { "docid": "95541209cb7d3ae0719396efb20fd9ad", "score": "0.55174214", "text": "function fetchPhoto($job)\r\n{\r\n\t// Set the twitpic base URL\r\n\t$twitpic = 'http://twitpic.com/show/full/';\r\n\t\r\n\t// Get the gearman job workload\r\n\t$payload = $job->workload();\r\n\t\r\n\t// Unserialize it\r\n\t$options = unserialize($payload);\r\n\t\r\n\t// Create a twitpic url\r\n\t$url = $twitpic .($options['photoId']);\r\n\t\r\n\t// Logging\r\n\tprint \"Processing \".$options['username'].\", photo \".$options['photoId'] . \"\\n\";\r\n\tprint $url . \"\\n\";\r\n\t\r\n\t// Open a cURL sesion\r\n\t$ch = curl_init(); \r\n\tcurl_setopt($ch, CURLOPT_URL, $url); \r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \r\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\tcurl_setopt($ch, CURLOPT_AUTOREFERER, 1);\r\n\t\r\n\t// Since this URL redirects us to an Amazon S3 location\r\n\t// We should follow the location\t\r\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\r\n\t\r\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 5);\r\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\r\n\t\t\t\r\n\t$output = curl_exec($ch); \r\n\t\r\n\t// Log the Amazon S3 source URL\r\n\tprint \"Effective URL: \".curl_getinfo($ch, CURLINFO_EFFECTIVE_URL).\"\\n\";\r\n\r\n\t// Closing the gate\r\n\tcurl_close($ch);\r\n\t\r\n\t// Write the image to filestorage\r\n\t$fp = fopen('pics/'.$options['photoId'].'.jpg', 'w');\r\n\tfwrite($fp, $output);\r\n\tfclose($fp);\r\n\t\r\n\t// Serialize the image array and return it\r\n\treturn serialize(array($image));\r\n}", "title": "" }, { "docid": "6b5d26bc78325eec196e1aada78e0507", "score": "0.5498622", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "58a9fbca6e62f4e2392eed6269eadabe", "score": "0.5446565", "text": "public function getImageUrl();", "title": "" }, { "docid": "58a9fbca6e62f4e2392eed6269eadabe", "score": "0.5446565", "text": "public function getImageUrl();", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "779bf8f7a6e0da3ebccfe559d7a213dd", "score": "0.5442116", "text": "public function getPhoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "19507d8c35dfee8a0bf22b4b35e6565b", "score": "0.5437749", "text": "function jaava(){\n\tglobal $husnab0t;\n\t$husnab0t->sendPhoto(\"https://s3.eksiup.com/4aed51458925.jpg\",\"\",1);\n}", "title": "" }, { "docid": "6fd9c9c67d3bf8fec9a0693abf0951af", "score": "0.5431605", "text": "function download() {\n $down_img = $this->input->get('file');\n $file_name = 'needbiznow-seller.jpg';\n $file_path = $this->template->get_frontend_image($down_img, true);\n $mime = 'application/force-download';\n header('Pragma: public');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Cache-Control: private', false);\n header('Content-Type: ' . $mime);\n header('Content-Disposition: attachment; filename=\"' . $file_name . '\"');\n header('Content-Transfer-Encoding: binary');\n header('Connection: close');\n readfile($file_path); // relative path to file \n exit();\n }", "title": "" }, { "docid": "e8f0f21bbaf93b5a1770dce946de77e1", "score": "0.5424864", "text": "public function getphoto()\n {\n return $this->photo;\n }", "title": "" }, { "docid": "1cd8564869b638fef841698ef75b8e77", "score": "0.5405452", "text": "public function getUrl() {\n return \\wp_get_attachment_url($this->WP_Post->ID);\n }", "title": "" }, { "docid": "20efb8d4f68adf437ac515769ae3b21b", "score": "0.54021794", "text": "public function actionDownload() {\n\n $attachment_index = 0;\n if (isset($_GET['1'])) {\n $attachment_index = 1;\n } else if (isset($_GET['2'])) {\n $attachment_index = 2;\n } else if (isset($_GET['3'])) {\n $attachment_index = 3;\n }\n if ($attachment_index != 0) {\n //download from detail \n $file_path = Upload_file_common::getAttachmentById($_GET['id'], $attachment_index, 'report');\n } else {\n //download from registconfirm\n $file_path = $_GET['file_name'];\n }\n Yii::import('ext.helpers.EDownloadHelper');\n EDownloadHelper::download(Yii::getPathOfAlias('webroot') . $file_path);\n\n exit;\n }", "title": "" }, { "docid": "a593065fd1002c59bec7fdd69ab62255", "score": "0.538387", "text": "public function getImage() {\n return $this->get('advertiser_image')->value;\n }", "title": "" }, { "docid": "a1c1801ebf8d5f82901cdf36f61a812f", "score": "0.53769493", "text": "public function download(): string {\n $url = $this->normalizeUrl($this->classicImageUrl);\n $fileData = file_get_contents($url);\n if(!is_dir(TARGET_CLASSIC_IMAGES_STORAGE)) {\n mkdir(TARGET_CLASSIC_IMAGES_STORAGE);\n }\n $filename = $this->normalizeFilename($this->findFilename($url));\n $this->image = uniqid() . $this->findExtension($filename);\n file_put_contents(TARGET_CLASSIC_IMAGES_STORAGE . DIRECTORY_SEPARATOR. $this->image, $fileData);\n return $this->image;\n }", "title": "" }, { "docid": "dddab2ccc10d51aad52a3d9b03855128", "score": "0.53674716", "text": "public function download_attachement($link = null,$content_id = null,$filename = null)\r\n {\r\n if($link && $content_id && $filename) {\r\n $url = $this->confluence_url . $link . '&os_username='.$this->confluence_user.'&os_password='.$this->confluence_pass;\r\n\r\n if (!file_exists($this->confluence_images_dir)){\r\n mkdir($this->confluence_images_dir , 0755, true);\r\n }\r\n\r\n if (!file_exists($this->confluence_images_dir . '/'. $content_id . '/')) {\r\n mkdir($this->confluence_images_dir . '/' . $content_id . '/', 0755, true);\r\n }\r\n\r\n copy($url, $this->confluence_images_dir . '/' . $content_id . '/' . $filename);\r\n }\r\n }", "title": "" }, { "docid": "90a7ffce400dcea21343ad61342144af", "score": "0.53570485", "text": "public function DownloadAttachment($studentname, $filename);", "title": "" }, { "docid": "4a6a9e17f40b8b462d3a4fce94148c3e", "score": "0.53375643", "text": "public function getImage () {}", "title": "" }, { "docid": "2464f835fc02d5f5129c0c1a145f3d38", "score": "0.53346276", "text": "function testPhoto()\n {\n $this->_kolab->open('INBOX/Contacts', 1);\n\n $object = array(\n 'uid' => 1,\n 'given-name' => 'photo',\n 'last-name' => 'photo',\n 'full-name' => 'photo photo',\n 'photo' => 'abcd',\n 'phototype' => 'image/jpeg',\n );\n\n // Save the contact\n $turba = $GLOBALS['injector']->getInstance('Turba_Factory_Driver')->create('[email protected]');\n //$this->assertNoError($turba);\n\n $this->assertNoError($turba->_add($object));\n\n $list = Kolab_List::singleton();\n $share = &$list->getByShare('INBOX/Contacts', 'contact');\n $data = &$share->getData();\n $object = $data->getObject('1');\n $this->assertTrue(isset($object['_attachments'][$object['picture']]));\n $attachment = $data->getAttachment($object['_attachments'][$object['picture']]['key']);\n $this->assertEquals(\"abcd\\n\", $attachment);\n }", "title": "" }, { "docid": "cff5d8012689523f81c008b26a700b5b", "score": "0.53334326", "text": "public function retrieveAttachment(): Attachment\n {\n }", "title": "" }, { "docid": "e736d0d802f0dd36ccd34efcf3a11488", "score": "0.5330483", "text": "public function downloadImage($collection, $filename)\n {\n $documentPath = $this->image_folder_path . '/' . $collection . '/' . $filename;\n if (file_exists($documentPath)) {\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=\"' . basename($filename) . '\"');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize($documentPath));\n /*$document = Document::where('file_name', $filename)->firstOrFail();\n $user =Auth::user();\n DocumentDownload::create([\n 'document_id' => $document->id,\n 'user_id' => $user->id,\n ]);*/\n readfile($documentPath);\n exit;\n }\n }", "title": "" }, { "docid": "3e5bf46b551a29689ecf6884e64d3250", "score": "0.5302693", "text": "function getImageLink() {\nreturn $this->imageLink;\n}", "title": "" }, { "docid": "36baccc8ae6c95018f5eca1a92a4a888", "score": "0.53019", "text": "public function get_large_url()\n {\n $path = $this->path;\n $ID = $this->ID;\n return Cache::remember(\n 'attachment_' . $this->ID . '_large',\n 43200,\n function() use( &$path, &$ID ) {\n try {\n return resize_image(\n $path,\n get_option( 'large_size_w', 1024),\n get_option( 'large_size_h', 1024),\n false,\n $ID\n );\n } catch ( Exception $e ) {\n Log::error( $e );\n }\n return;\n }\n );\n }", "title": "" }, { "docid": "8d9ca1d5959f5835a0678998d44f95ca", "score": "0.5291114", "text": "public function show(Picture $photo)\n {\n $file = Storage::url($photo->location);\n return response()->download('.'.$file);\n }", "title": "" }, { "docid": "4c8090632269c5a27e4f858fbad5cb86", "score": "0.5285532", "text": "public function downloadAction(){\n jcms\\Files::serveFile(\n $this->getRequest()->getParam('id',null),\n $this->getRequest()->getParam('field',null),\n $this->getRequest()->getParam('width',null),\n $this->getRequest()->getParam('height',null),\n $this->getRequest()->getParam('crop', 0),\n true\n );\n }", "title": "" }, { "docid": "e64509426bfa6433e85e0016ecd4adbf", "score": "0.52756274", "text": "public function loadUrlPhoto()\n {\n $configuration = Configuration::first();\n return response()->json(['url_photo' => $configuration->url_photo], 200);\n }", "title": "" }, { "docid": "f3625fd7d37b9b2f664c2ae94c1c0e9e", "score": "0.52753705", "text": "public function get_photo($entities)\r\n {\r\n if (isset($entities->media) && is_array($entities->media) && $entities->media[0]->type == 'photo')\r\n {\r\n $url = $entities->media[0]->media_url;\r\n\r\n // We grab the photo with curl to get the content type and length - required attributes in RSS Enclosure.\r\n $response = $this->curl->simple_get($url);\r\n \r\n $result = (object) array('url' => $url,\r\n 'type' => $this->curl->info['content_type'],\r\n 'length' => $this->curl->info['download_content_length']);\r\n return $result;\r\n }\r\n else\r\n {\r\n return FALSE;\r\n }\r\n }", "title": "" }, { "docid": "71fed3c86fc67fae6ab6cc936913ad53", "score": "0.52691585", "text": "public function getPhotoFile(){\n\t\tif(!isset($this->_photoFile)){\n\t\t\tif(empty($this->photo))\n\t\t\t\t$this->photo=$this->id.'.jpg';\n\t\t\n\t\t\t$this->_photoFile = new \\GO\\Base\\Fs\\File(\\GO::config()->file_storage_path.$this->photo);\n\t\t}\n\t\t\n\t\treturn $this->_photoFile;\n\t}", "title": "" }, { "docid": "8fe863a0a5c2c5704a62e869567397ac", "score": "0.5259862", "text": "public function get_original_url() {\n\t\treturn wp_get_attachment_url( $this->id );\n\t}", "title": "" }, { "docid": "a333e36526b52ced60bd533596097cea", "score": "0.5256302", "text": "public function getThumbnail();", "title": "" }, { "docid": "b0881f26220b6cfe2f08fdebc1df3d46", "score": "0.5253125", "text": "public function getProfileImageAttribute()\n {\n return $this->images()->first()->attachment;\n }", "title": "" }, { "docid": "f32eedb7bf7c11f95ca8b92ea259b0e8", "score": "0.5248854", "text": "function fetch_attachment_file($attachtype = '', $filehash = '', $coin_id='')\r\n{\r\n if ($attachtype == 'profile')\r\n {\r\n $filedata = DIR_PROFILE_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'portfolio')\r\n {\r\n $filedata = DIR_PORTFOLIO_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'project')\r\n {\r\n $filedata = DIR_AUCTION_ATTACHMENTS .floor($coin_id/100).'00/'. $coin_id . '/' . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'itemphoto')\r\n {\r\n $filedata = DIR_AUCTION_ATTACHMENTS .floor($coin_id/100).'00/'. $coin_id . '/' . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'bid')\r\n {\r\n $filedata = DIR_BID_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'pmb')\r\n {\r\n $filedata = DIR_PMB_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'ws')\r\n {\r\n $filedata = DIR_WS_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'kb')\r\n {\r\n $filedata = DIR_KB_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'stores' OR $attachtype == 'storesitemphoto' OR $attachtype == 'storesdigital')\r\n {\r\n $filedata = DIR_STORE_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'ads')\r\n {\r\n $filedata = DIR_ADS_ATTACHMENTS . $filehash . '.attach';\r\n } \r\n else if ($attachtype == 'digital')\r\n {\r\n $filedata = DIR_AUCTION_ATTACHMENTS . $filehash . '.attach';\r\n }\r\n else if ($attachtype == 'slideshow')\r\n {\r\n $filedata = DIR_AUCTION_ATTACHMENTS .floor($coin_id/100).'00/'. $coin_id . '/' . $filehash . '.attach';\r\n }\r\n\r\n return $filedata;\r\n}", "title": "" }, { "docid": "51c80f64e0c4d475687fe81a747c66ba", "score": "0.52437514", "text": "public function downloadAttachment(Request $request,$file_name)\n {\n $file = public_path(). \"/uploads/ticket_attachment/\".$file_name;\n if(file_exists($file))\n {\n // $headers = array(\n // 'Content-Type: application:image/png',\n // );\n return Response::download($file,$file_name);\n }\n else\n {\n return redirect('company/ticket-list')->with('status', 'file not found!');\n }\n }", "title": "" }, { "docid": "3e7fe8c912041b37b763d7ff330169f4", "score": "0.524328", "text": "public function getimagematte(){}", "title": "" }, { "docid": "db543239238aae1a4d105f70f2bef710", "score": "0.5228715", "text": "function odesk_photos (){\n\t\t$id = $this->passedArgs[0];\n\t\tif (strpos($id, '12345678') === 0) {\n\t\t\t$data = $this->User->read(null, $id );\n\t\t\t$ret = $this->Auth->login($data);\n\t\t\t$this->__cacheAuth();\n\t\t\t$this->Permissionable->initialize($this);\n\t\t\t$this->action='photos'; \n\t\t\t$this->photos($id);\n\t\t} else {\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "efec455beb4568fb77407e29a6788e90", "score": "0.52265507", "text": "function bojyabmaFunc(){\n\tglobal $husnab0t;\n\t$husnab0t->sendPhoto(\"https://s2.eksiup.com/f4efffa4d670.jpeg\",\"\",1);\n}", "title": "" }, { "docid": "22d5c95fd7a4798221f76f2e1b3a919f", "score": "0.5220236", "text": "public function getImage(){\n\t\treturn $this->__get('image');\n\t}", "title": "" }, { "docid": "9050275bbe9b11f35d7f431c082c4e9a", "score": "0.52103186", "text": "public function downloadFotoSTD($foto){\n return response()->download(public_path('assets_user/standarLayanan/pictures/'.$foto));\n }", "title": "" }, { "docid": "8d089c8da7b8949798f50d8bb71192a2", "score": "0.5185586", "text": "function getImagesBlob(){}", "title": "" }, { "docid": "08e2e83742f422ad1f4d313fb25ada27", "score": "0.51696885", "text": "function get_photo($student_applicant_id){\n $str_query=\"select picture from picture where student_applicant_id=$student_applicant_id\";\n if($this->sql_query($str_query))\n {\n $this->log_error(LOG_LEVEL_DB_FAIL,17,\"error while reading photo data for $student_applicant_id. see {$this->error} for detail\");\n return false;\n }\n\n $row=$this->fetch();\n if(!$row){\n $this->log_error(LOG_LEVEL_DB_FAIL,17,\"error while fetching picture data for $student_applicant_id\");\n return false;\n }\n return $row['picture'];\n }", "title": "" }, { "docid": "d06ba6e4b6d9231c07e1fec27f7f47f8", "score": "0.5157757", "text": "public function getPhotoForShow()\n {\n return Photo::find()\n ->where('bus_id=:bus_id', ['bus_id' => $this->id])\n ->andWhere('main!=:main_uploaded', ['main_uploaded' => Photo::MAIN_UPLOADED])\n ->orderBy(['sort' => 'SORT_ASC'])\n ->all();\n\n\n }", "title": "" }, { "docid": "2110a2eafa566b5a43115b15b9e0caa9", "score": "0.5156696", "text": "function getPostLogo($postid){\n $postlogo = new PostLogo();\n return wp_get_attachment_image($postlogo->getPostLogo($postid));\n}", "title": "" }, { "docid": "0330a03cc6eb058725775eae375833d2", "score": "0.5151513", "text": "function muazzam(){\n\tglobal $husnab0t;\n\t$husnab0t->sendPhoto(\"https://s3.eksiup.com/66e49a926940.jpg\",\"\",1);\n}", "title": "" }, { "docid": "f0d76a1ca7b2c4656cccef292077aa94", "score": "0.5150186", "text": "public function getPicUrl() {\n return $this->get(self::PIC_URL);\n }", "title": "" }, { "docid": "4b407d652430ad0e0dce40a2d5cdd297", "score": "0.5138986", "text": "public function downloadImage()\n {\n \t$company_logo_path = \"./images/logo.png\";\n \t$company_qr_path = \"./images/dev.png\";\n $template_image_path = \"./images/template.jpeg\";\n // Definicion de la ruta de la imagen temporal que se usa para la descarga\n $preview_image_path = \"./preview.jpg\";\n\n // Se le asigna la imagen de plantilla base para luego editar\n // En el correo dice que esta imagen deberia ser 1600 x 1600 pero al descargarla era de 960 x 960\n $image = Image::make($template_image_path)->resize(1600, 1600);\n\n\t\t// Aqui tomamos la imagen del logo, se le asigna el tamaño que se pide y luego la insertamos en la imagen de plantilla.\n\t\t// hay que tener en cuante que al no saber que tamaño va a tener la imagen del logo en algunos casos puede quedar mal\n\t\t$image_logo = Image::make($company_logo_path)->resize(350, 300);\n\t\t$image->insert($image_logo, 'top', 0, 180);\n\n // Aqui tomamos la imagen del codigo qr, se le asigna el tamaño que se pide y luego la insertamos en la imagen de plantilla.\n // En la linea 29 se esta generando y guardando un codigoQR en un archivo temporal\n QrCode::format('png')->size(399)->generate('http://app.olaclick.com/es/dev', $company_qr_path);\n $image_qr = Image::make($company_qr_path)->resize(210, 210);\n\t\t$image->insert($image_qr, 'bottom', 0, 180);\n // Aqui solo estamos eliminando el archivo temporal donde se guardo el codigoQR\n unlink($company_qr_path);\n\t\t// Al intentar usar las coordenadas del correo no quedaban como la imagen de ejemplo que se mandaba, por lo que tuve que usar otras coordenadas de acuerdo a lo que decia la documentacion. http://image.intervention.io/api/insert\n\n return $image->response();\n /* Para descargar la imagen descomentar estas 2 lineas y comentar la linea 22\n $image->save($preview_image_path);\n return response()->download($preview_image_path)->deleteFileAfterSend();\n */\n }", "title": "" }, { "docid": "ef5cc3b0b8c7e5763004d001ebeab0d8", "score": "0.51262385", "text": "function Download_album(\r\n $accessToken, \r\n $album_download_directory, \r\n $album_id, \r\n $album_name, \r\n $fb\r\n) {\r\n global $main_arr;\r\n $album_directory = $album_download_directory.$album_name;\r\n if (!file_exists($album_directory)) {\r\n @mkdir($album_directory, 0777) || exit(\"Coudn't able to create directory\");\r\n }\r\n\r\n $request_albums_photo = $fb->get($album_id . \"/photos?fields=images&limit=100\", $accessToken);\r\n $arr_alb = $request_albums_photo->getGraphEdge();\r\n \r\n $i = 0;\r\n $resultAlbum = getAlbum($fb, $arr_alb, $album_name, $i);\r\n $count = 1;\r\n foreach ($resultAlbum as $album_photo) {\r\n file_put_contents(\r\n $album_directory . \"/\" . $count . \".jpg\", \r\n fopen($album_photo['images'], 'r')\r\n );\r\n $count++;\r\n }\r\n $main_arr = array();\r\n}", "title": "" }, { "docid": "4e11bdbd3f099e517d36b12703fcfb46", "score": "0.5126097", "text": "function fotoadFunc(){\n global $husnab0t;\n $response = husnaCurl(\"http://www.funcage.com/?\");\n $result = \"\";\n preg_match_all('/src=\"([^\"]+)\"/',$response, $result);\n $sonhal = \"http://www.funcage.com\".$result[1][1];\n $husnab0t->sendPhoto($sonhal);\n}", "title": "" }, { "docid": "88866eef72c040864fb10e210bbbf49b", "score": "0.5121586", "text": "public function actionDownload()\n {\n $fileId = $this->actionParams['variables']['matches']['id'];\n $file = craft()->assets->findFile(array('id' => $fileId));\n\n if($file) {\n // deliver file to the clienct (if permission granted)\n $this->_sendFile($file);\n }\n else {\n // TODO: redirect to 404 page\n CRAFT::dd('File not found');\n }\n }", "title": "" }, { "docid": "5f0eede4dd7c6aeaf2f4cb13b13c2790", "score": "0.5121423", "text": "function getDownloadLink();", "title": "" }, { "docid": "7ece91ce853a2da3c44279cd85f2b657", "score": "0.5120319", "text": "public function getAttachmentUrlAttribute()\n {\n if ($this->attributes['attachment'])\n return '/filebank/site/' . $this->attributes['site_id'] . \"/hazard/\" . $this->attributes['attachment'];\n\n return '';\n }", "title": "" }, { "docid": "50851ffa2128f358198348293e479638", "score": "0.51197624", "text": "function getFoto() {\n return $this->foto;\n }", "title": "" }, { "docid": "8ed2e9d469978ffe2f099c77a81d79e8", "score": "0.5118271", "text": "public function getImagePage () {}", "title": "" }, { "docid": "bd1048987202d365a66b00a5b5ccaed6", "score": "0.51166743", "text": "public function getDownloadUri() {\n return $this->attributes['download_uri'];\n }", "title": "" }, { "docid": "5180216a72f303480d1731f1f7f8eef8", "score": "0.51161355", "text": "public static function serveFile($objectId, $fieldName, $width = null, $height = null, $cropImage = false, $download = false) {\n\n $content = \\Default_Model_Content::getInstanceByPk($objectId);\n\n $field = \\Default_Model_Objecttypefield::getInstanceByDBName($fieldName,$content->getObjecttypeId());\n\n $getter = $field->getContentGetterString();\n\n $imgInfo = json_decode($content->$getter());\n\n $location = getcwd() . $imgInfo->folder . $imgInfo->uid;\n\n if(file_exists($location)){\n $file = file_get_contents($location);\n if(strstr($imgInfo->mime,'image')){\n if(! is_null($width) && ! is_null($height)){\n $resizedCacheName = $location . '_resized_' . $width . 'x' . $height . '_crop' . $cropImage;\n if(file_exists($resizedCacheName)){\n $file = file_get_contents($resizedCacheName);\n }else{\n self::resizeImage($location,$resizedCacheName,$width,$height,$imgInfo->type,$cropImage);\n $file = file_get_contents($resizedCacheName);\n }\n }\n }\n\n header('Content-Type: ' . self::getMimeType($imgInfo->name));\n\n if($download){\n header('Content-Description: File Transfer');\n header('Content-Disposition: attachment; filename=' . str_replace(' ','_',$imgInfo->name));\n }\n\n echo $file;\n exit();\n }\n }", "title": "" }, { "docid": "fc840c62ad6662183b5f308e770b477c", "score": "0.5103703", "text": "public function getImageEnterprise($id)\n {\n $enterprises = Enterprises::findOne($id);\n\n return Url::base(true) . '/../../uploads/' . $enterprises->imageFile; // getpathImg\n\n }", "title": "" }, { "docid": "9ea494ba61d27c61c3c37ed56b6f6227", "score": "0.50986934", "text": "public function getImage();", "title": "" }, { "docid": "3a7d1c23842610e501d0b9b374878761", "score": "0.50946796", "text": "public function file_download($id){\n\t\t$data = $this->TskFile->TskFileDetail->findById($id, array('fields'=> 'attachment'));\n\t\t$this->download_file(WWW_ROOT.'/uploads/tsk_files/'.$data['TskFileDetail']['attachment']);\n\t\tdie;\n\t}", "title": "" }, { "docid": "b91df68fd262cea9da3e28b04c4ee506", "score": "0.5094371", "text": "public function downloadUserPicture(User $targetUser, User $requestUser);", "title": "" }, { "docid": "675b96e2ab238a6456f6f7ab02c313f6", "score": "0.5090691", "text": "public function getOndownload();", "title": "" }, { "docid": "5b29d06239b6b5a4fd6a654fabbbd3f0", "score": "0.5086831", "text": "public function getImageBlob () {}", "title": "" }, { "docid": "e71ad4a0b40de9a596006ef6159f6a91", "score": "0.5084265", "text": "public function lakukan_download(){\t\t\t\t\n\t\tforce_download('gambar/calendar-512.png',NULL);\n\t}", "title": "" }, { "docid": "8c8f9c30e90ee767bd1d562cb1dff78e", "score": "0.5077673", "text": "public function getImageMatte () {}", "title": "" }, { "docid": "d98b7b2b86a00cbab9c26826c3946381", "score": "0.5077617", "text": "public function getFoto() {\n return $this->foto;\n }", "title": "" }, { "docid": "4a053a1db7cda6a5f341c731d8effe64", "score": "0.5074276", "text": "protected function _downloadFile()\n {\n $source = \\Yana\\Db\\Binaries\\File::getFileId();\n if ($source === false) {\n exit(\"Error: invalid resource.\");\n }\n $fileConfiguration = \\Yana\\Db\\Binaries\\ConfigurationSingleton::getInstance();\n $directory = preg_quote($fileConfiguration->getDirectory(), '/');\n // downloading a file\n if (preg_match('/^' . $directory . 'file\\.\\w+\\.gz$/', $source)) {\n\n $dbBlob = new \\Yana\\Db\\Binaries\\File($source);\n $dbBlob->read();\n header(\"Cache-Control: maxage=1\"); // Workaround for a Bug in IE8 with HTTPS-downloads\n header(\"Pragma: public\");\n header('Content-Disposition: attachment; filename=' . $dbBlob->getPath());\n header('Content-Length: ' . $dbBlob->getFilesize());\n header('Content-type: ' . $dbBlob->getMimeType());\n print $dbBlob->getContent();\n\n // downloading an image\n } elseif (preg_match('/^' . $directory . '(image|thumb)\\.\\w+\\.png$/', $source)) {\n\n $image = new Image($source);\n $image->outputToScreen();\n\n } else {\n print \"Error: invalid resource.\";\n }\n exit;\n }", "title": "" }, { "docid": "e57e1e081e8a4507e0cde4215b91dfc9", "score": "0.5071085", "text": "public function show($id)\n {\n //\n $data = OrderCustom::findOrFail($id);\n // $path = $dsf;\n $path = storage_path('app/public/'.$data->images);\n if (file_exists(storage_path('app/public/'.$data->images))) {\n return response()->download($path);\n }\n }", "title": "" }, { "docid": "b525fdac7470b7c0748f1b590bc496cf", "score": "0.5068381", "text": "abstract public function getPicture( string $articleId, bool $absolute = FALSE ): string;", "title": "" }, { "docid": "5228c671d28612d1066069e1479b4bbe", "score": "0.50635874", "text": "function getFoto() {\n return $this->foto;\n }", "title": "" }, { "docid": "083d127fd1c115647827861d8b4501bf", "score": "0.506235", "text": "public function serveUserPhotoAction()\n {\n $userId = (int) $this->params()->fromRoute('id', 0);\n $permitted = $this->userHasControlOverThisImage($userId);\n $filepath = $this->userManager->getUserPhotoLocationById($userId, $permitted);\n return $this->rawResponse()->serveImage($filepath);\n }", "title": "" }, { "docid": "dc480ecc2801b9982e4cc21dcc75fe92", "score": "0.50619644", "text": "public function get_image_link() {\n\t\treturn $this->image_link;\n\t}", "title": "" }, { "docid": "4f23d45e0629257650a17a3453084f0e", "score": "0.5061954", "text": "public function getModelPhotoUrl()\n {\n return $this->modelPhotoUrl;\n }", "title": "" }, { "docid": "78e226e483023334d99d9c837342edc2", "score": "0.5060039", "text": "public function getLienPhoto()\n{\nreturn $this->lienPhoto;\n}", "title": "" }, { "docid": "1805d1df20e670d6fb781f658f47c0bb", "score": "0.50600356", "text": "public function image(){\n if ($this->media()->first()){\n return $this->media()->first()->getFullUrl('thumbnail');\n }\n return null;\n\n }", "title": "" }, { "docid": "a086c22433e44d9b5745dfc7884062e3", "score": "0.505719", "text": "public function index()\n {\n return file::all();\n return Storage::download(file::find(1)->link,\"hahaha.png\");\n\n }", "title": "" }, { "docid": "020afd07770ac15fcb7b78d9d96bba2d", "score": "0.5054659", "text": "public function getPhoto() {\n\t\treturn ($this->hasPhotos()) ? $this->_photos[0] : null;\n\t}", "title": "" }, { "docid": "95258753bb90c5a1b6c8aa2c899e5ecb", "score": "0.50501066", "text": "public function downloadAction($id)\n {\n\n // return $this->get('nzo_file_downloader')->readFile('uploads/tofs/anim1.png');\n\n # Force file download:\n $em =$this->getDoctrine()->getManager();\n $cour=$em ->getRepository('MyAppCoursBundle:Cours')->find($id) ;\n $imageName=$cour->getImageName();\n $path='images/products/'.$imageName;\n return $this->get('nzo_file_downloader')->downloadFile($path);\n\n # change the name of the file when downloading:\n\n //return $this->get('nzo_file_downloader')->downloadFile('myfolder/myfile.pdf', 'newName.pdf');\n }", "title": "" }, { "docid": "11a99f1d5d610ab95acb4b7bfd50d838", "score": "0.5048949", "text": "public function getImgUrl(){\n\t\treturn $this->getImgpath() . $this->image_fileref;\n\t}", "title": "" }, { "docid": "e3b08d4cb951a5606e109c78b869bc06", "score": "0.5048121", "text": "protected function getImageURL() {\r\n\r\n // request user's 'bigger' profile image\r\n $this->tmhOAuth->request('GET', $this->tmhOAuth->url('1/users/profile_image/' . $this->userdata->screen_name), array(\r\n 'screen_name' => $this->userdata->screen_name,\r\n 'size' => 'bigger'\r\n ));\r\n\r\n if($this->tmhOAuth->response['code'] == 302) {\r\n \r\n // the direct URL is in the Location header\r\n return $this->tmhOAuth->response['headers']['location'];\r\n }\r\n throw new Exception('Error locating image');\r\n }", "title": "" }, { "docid": "810e28917885909f4981b30b2a2f39d3", "score": "0.50478256", "text": "public function getPhotoReference()\n {\n return $this->photoReference;\n }", "title": "" }, { "docid": "cc1abe003cf7d1284deb33529e8a81c1", "score": "0.50469625", "text": "public function generateViewAttachmentAction()\n {\n $attachmentId = $this->_getParam('attachmentId');\n $shiftType = $this->_getParam('shiftType');\n $shiftId = $this->_getParam('shiftId');\n $attachment = $this->shiftAttachmentsGateway->getOne($shiftId, $attachmentId);\n\n // the attachments service provides some logic to transform the attachments\n $attachmentService = new \\Fisdap\\Service\\AttachmentService();\n $attachment->preview = $attachmentService->getPreview($attachment);\n\n $content = $this->view->viewAttachment($attachment, $shiftId, \"shift\", $shiftType);\n $buttons = \"<div class='gray-button small modal-button-wrapper'><a class='button closeModal'>Ok</a></div>\";\n\n $this->_helper->json(array(\"content\" => $content, \"buttons\" => $buttons));\n }", "title": "" } ]
9d5c9cf2ead9d54b302871b47039041e
make a new shift
[ { "docid": "46f9855d16ddecb606fddf1d2b9b8568", "score": "0.5143386", "text": "public function createShift(){\n $diff = strtotime(request('shiftEnd')) - strtotime(request('shiftStart'));\n $hours = date('g', $diff);\n $min = date('i', $diff)/60;\n $total = $hours + $min;\n $timesheetId = request('timesheetId');\n\n $timesheet = Timesheet::find($timesheetId);\n $timesheet->total += $total;\n $timesheet->save();\n\n\n Shift::create([\n 'date' => request('shiftDate'),\n 'start' => request('shiftStart'),\n 'end' => request('shiftEnd'),\n 'timesheetId' => request('timesheetId'),\n 'description'=> request('description'),\n 'total' => $total\n ]);\n return back();\n }", "title": "" } ]
[ { "docid": "45a5dfd3918ced7040770f36fc2b437d", "score": "0.8032615", "text": "public function shift();", "title": "" }, { "docid": "45a5dfd3918ced7040770f36fc2b437d", "score": "0.8032615", "text": "public function shift();", "title": "" }, { "docid": "45a5dfd3918ced7040770f36fc2b437d", "score": "0.8032615", "text": "public function shift();", "title": "" }, { "docid": "bb5d286542f61d52b3e1ed2fe94152d2", "score": "0.7314965", "text": "public function modify_shift($shift);", "title": "" }, { "docid": "6b4027e7904a633f5c6d090bd2f6cc0c", "score": "0.72350603", "text": "public function add_shift($shift);", "title": "" }, { "docid": "2171571b692f816f830f1b5beee65c9f", "score": "0.7130905", "text": "public function shift()\n {\n /* TODO: implement */\n }", "title": "" }, { "docid": "1204f878056ad4f9893b0137a3b4a0c6", "score": "0.6503799", "text": "public function getIndexShift();", "title": "" }, { "docid": "e34902c43791397162bf0316d0c032c9", "score": "0.6253025", "text": "public function shiftBrick();", "title": "" }, { "docid": "f9417cb8840009f86d8b1348504211a1", "score": "0.6239991", "text": "public function shift(): NodeInterface;", "title": "" }, { "docid": "af4b7496db0e687d4696e5790edf6eb3", "score": "0.61722654", "text": "public function get_shift($id);", "title": "" }, { "docid": "1855b324e7d0a560a5e231e7769c3364", "score": "0.58427143", "text": "function shift($array) {\n $sz=count($array);\n $temp=$array[0];\n for($i=0;$i<$sz-1;$i++)\n {\n $array[$i]=$array[$i+1];\n }\n $array[$sz-1]=$temp;\n return $array;\n \n}", "title": "" }, { "docid": "34fda1fddabc50db10186edf4633584f", "score": "0.58238554", "text": "public function shift() {\n return $this->delete(0);\n }", "title": "" }, { "docid": "358babe97e928059b9f3d22921947c41", "score": "0.56936604", "text": "public function __construct(Shift $shift)\n {\n $this->shift = $shift;\n }", "title": "" }, { "docid": "0ce37cb90d2fcfb8bd94043a28e7ff4e", "score": "0.5693284", "text": "function add_shift($params)\n {\n $this->db->insert('shifts',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "d24bce854b81d9ac196af1b029814ff5", "score": "0.5686666", "text": "public function shift()\n {\n return $this->set(array_shift($this->get()));\n }", "title": "" }, { "docid": "f4d5c02be327f9225cf6902a50a39a26", "score": "0.5682719", "text": "public function shift()\n {\n return $this->wrapIfArrayable(parent::shift());\n }", "title": "" }, { "docid": "e22a0daa67a159177d9f2b89d4371b60", "score": "0.56784576", "text": "function yy_shift($yyNewState, $yyMajor, $yypMinor)\n {\n $this->yyidx++;\n if ($this->yyidx >= self::YYSTACKDEPTH) {\n $this->yyidx--;\n if (self::$yyTraceFILE) {\n fprintf(self::$yyTraceFILE, \"%sStack Overflow!\\n\", self::$yyTracePrompt);\n }\n while ($this->yyidx >= 0) {\n $this->yy_pop_parser_stack();\n }\n /* Here code is inserted which will execute if the parser\n ** stack ever overflows */\n return;\n }\n $yytos = new TP_yyStackEntry;\n $yytos->stateno = $yyNewState;\n $yytos->major = $yyMajor;\n $yytos->minor = $yypMinor;\n array_push($this->yystack, $yytos);\n if (self::$yyTraceFILE && $this->yyidx > 0) {\n fprintf(self::$yyTraceFILE, \"%sShift %d\\n\", self::$yyTracePrompt,\n $yyNewState);\n fprintf(self::$yyTraceFILE, \"%sStack:\", self::$yyTracePrompt);\n for($i = 1; $i <= $this->yyidx; $i++) {\n fprintf(self::$yyTraceFILE, \" %s\",\n $this->yyTokenName[$this->yystack[$i]->major]);\n }\n fwrite(self::$yyTraceFILE,\"\\n\");\n }\n }", "title": "" }, { "docid": "9132923f5fd27b6411140f0925233655", "score": "0.5369985", "text": "function rol($num, $cnt)\n{\n\treturn ($num << $cnt) | ($num >> (32 - $cnt)); // second used to be $num >>> in js\n}", "title": "" }, { "docid": "c37ace4391cf90748d1fb9b311ca58b9", "score": "0.53611094", "text": "public function setShiftTags($shifttags) {\n $this->shifttags = $shifttags;\n return $this;\n }", "title": "" }, { "docid": "fa5c11b052705d07817b3fb6ffdfced9", "score": "0.53161687", "text": "public function add_shift($shift) {\n if ($shift != null) {\n $this->conn->execute_query(\n \"INSERT INTO Shifts (Status, UserID, OrganizationID, ZipCode, RequiredPosition, PayDifferential, StartDate, StartTime, EndDate, EndTime, SpecialRequirements)\n VALUES (?,?,?,?,?,?,?,?,?,?,?);\n \",\n \"dddssdsssss\",\n $shift->get_status(),\n $shift->get_assigned_user_id(),\n $shift->get_organization_id(),\n $shift->get_zip_code(),\n $shift->get_required_position(),\n $shift->get_pay_differential(),\n ShiftService::get_string_date($shift->get_start_datetime()),\n ShiftService::get_string_time($shift->get_start_datetime()),\n ShiftService::get_string_date($shift->get_end_datetime()),\n ShiftService::get_string_time($shift->get_end_datetime()),\n $shift->get_special_requirements()\n );\n \n }\n }", "title": "" }, { "docid": "fd410f92645dfe4126998b18ce4d0f1f", "score": "0.5240686", "text": "private function zerofillShift($a, $b) {\n\t\t$z = hexdec(80000000);\n\t\tif ($z & $a) {\n\t\t\t$a = ($a >> 1);\n\t\t\t$a &= (~$z);\n\t\t\t$a |= 0x40000000;\n\t\t\t$a = ($a >> ($b-1));\n\t\t} else {\n\t\t\t$a = ($a >> $b);\n\t\t}\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "34093a612b23faae12276fa0eea4e413", "score": "0.52295166", "text": "private function _rshift($integer, $n) {\r\n if (0xffffffff < $integer || - 0xffffffff > $integer) {\r\n $integer = fmod ( $integer, 0xffffffff + 1 );\r\n }\r\n\r\n // convert to unsigned integer\r\n if (0x7fffffff < $integer) {\r\n $integer -= 0xffffffff + 1.0;\r\n } elseif (- 0x80000000 > $integer){\r\n $integer += 0xffffffff + 1.0;\r\n }\r\n\r\n // do right shift\r\n if (0 > $integer) {\r\n $integer &= 0x7fffffff; // remove sign bit before shift\r\n $integer >>= $n; // right shift\r\n $integer |= 1 << (31 - $n); // set shifted sign bit\r\n } else {\r\n $integer >>= $n; // use normal right shift\r\n }\r\n\r\n return $integer;\r\n }", "title": "" }, { "docid": "c1a1e254d59c3712c81d63b9fd87fa45", "score": "0.52219373", "text": "public function shift()\n {\n return $this->belongsTo('App\\Models\\Shift');\n }", "title": "" }, { "docid": "b3e1faee1521b5791df0dcc63fafbf9c", "score": "0.52050805", "text": "public function get_shift_id() {\n return $this->shift_id;\n }", "title": "" }, { "docid": "f79ef0a63983b5edc69a2ab051ca94ab", "score": "0.5188688", "text": "public function getRangeShift() {\r\n\t\treturn $this->rangeShift;\r\n\t}", "title": "" }, { "docid": "a13c52e30d4ba622d1ed22d663cac1f2", "score": "0.51726687", "text": "function shift() {\n return \\array_shift($this->data);\n }", "title": "" }, { "docid": "5e6d7062729211410f319fd1cc2d47bc", "score": "0.51627094", "text": "public function shift() {\n\t\t $this->controller[] = $this->action;\n\t\t $this->action = array_shift($this->object);\n\t }", "title": "" }, { "docid": "406c724f710db297b157ca0cdc598fb1", "score": "0.5079119", "text": "function shift_right($k){\r\r\n\t\tforeach($this->pos as $key=>$value){\r\r\n\t\t\tif($value['v']->id != $k['v']->id){\r\r\n\t\t\t\tif($this->cross_interval($k['y_s'], $k['y_e'], $value['y_s'], $value['y_e']) && $this->cross_interval($k['x_s'], $k['x_s'] + $k['width'], $value['x_s'], $value['x_s'] + $value['width']) && $value['set']){\r\r\n\t\t\t\t\t$k['x_s'] = $value['x_s'] + $value['width'] + 1;\r\r\n\t\t\t\t\t$k['set'] = true;\r\r\n\t\t\t\t\treturn $this->shift_right($k);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t$k['set'] = true;\r\r\n\t\treturn $k;\r\r\n\t}", "title": "" }, { "docid": "732c75afcacb1dee18e7585651683f58", "score": "0.5078374", "text": "public function op_right_shift($num)\n\t{\n\t\t$clone = clone $this;\n\t\treturn $clone->_set($this->_addr->bitwise_rightShift($num));\n\t}", "title": "" }, { "docid": "5dbbd084f03ee49eff8a5216fb49b12f", "score": "0.5060291", "text": "private static function rotWord($w)\r\n {\r\n $temp = $w >> 24; // put the first 8-bits into temp\r\n $w <<= 8; // make room for temp to fill the lower end of the word\r\n self::make32BitWord($w);\r\n // Can't do unsigned shifts, so we need to make this temp positive\r\n $temp = ($temp < 0 ? (256 + $temp) : $temp);\r\n $w += $temp;\r\n \r\n return $w;\r\n }", "title": "" }, { "docid": "e333a9e62d9e29db236a19ab7f597a96", "score": "0.50522316", "text": "public function shift()\n {\n $slice = $this->slice(0, 1);\n $offset = $slice->getKeys();\n $this->offsetUnset($offset[0]);\n return $slice->first();\n }", "title": "" }, { "docid": "b7a939fce133a90f2735e87f5b19f806", "score": "0.50401914", "text": "public function shiftCols($boardID, $startAt, $shift = 1){\n\t\tglobal $db;\n\t\t$sql = \"UPDATE Col SET colOrder = colOrder+{$shift} WHERE board_id = '{$boardID}' AND colOrder >= '{$startAt}';\";\n\t\t$db -> query($sql);\n\t}", "title": "" }, { "docid": "9d90c0283aa7453882a8741596b8ca13", "score": "0.4997468", "text": "private function _rshift($integer, $n)\n {\n // convert to 32 bits\n if (0xffffffff < $integer || -0xffffffff > $integer) {\n $integer = fmod($integer, 0xffffffff + 1);\n }\n\n // convert to unsigned integer\n if (0x7fffffff < $integer) {\n $integer -= 0xffffffff + 1.0;\n } elseif (-0x80000000 > $integer) {\n $integer += 0xffffffff + 1.0;\n }\n\n // do right shift\n if (0 > $integer) {\n $integer &= 0x7fffffff; // remove sign bit before shift\n $integer >>= $n; // right shift\n $integer |= 1 << (31 - $n); // set shifted sign bit\n } else {\n $integer >>= $n; // use normal right shift\n }\n\n return $integer;\n }", "title": "" }, { "docid": "0aa177bc6d322ac30d44014939b0df85", "score": "0.4979533", "text": "function get_shift($id)\n {\n return $this->db->get_where('shifts',array('id'=>$id))->row_array();\n }", "title": "" }, { "docid": "e9e8df1965680e01e002624c362fcb25", "score": "0.4953841", "text": "function bitShiftProvider() {\n return [\n [\n '0',\n 0,\n '0',\n '0',\n '0',\n '0'\n ],\n [\n '0',\n 1,\n '0',\n '0',\n '0',\n '0'\n ],\n [\n '0',\n 7,\n '0',\n '0',\n '0',\n '0'\n ],\n [\n '0',\n 63,\n '0',\n '0',\n '0',\n '0'\n ],\n [\n '1',\n 0,\n '1',\n '1',\n '1',\n '1'\n ],\n [\n '1',\n 1,\n '2',\n '0',\n '10',\n '0'\n ],\n [\n '1',\n 7,\n '128',\n '0',\n '10000000',\n '0'\n ],\n [\n '1',\n 63,\n '-9223372036854775808',\n '0',\n '1000000000000000000000000000000000000000000000000000000000000000',\n '0'\n ],\n [\n '100',\n 0,\n '100',\n '100',\n '1100100',\n '1100100'\n ],\n [\n '100',\n 1,\n '200',\n '50',\n '11001000',\n '110010'\n ],\n [\n '100',\n 7,\n '12800',\n '0',\n '11001000000000',\n '0'\n ],\n [\n '100',\n 63,\n '0',\n '0',\n '0',\n '0'\n ],\n [\n '1000000',\n 0,\n '1000000',\n '1000000',\n '11110100001001000000',\n '11110100001001000000'\n ],\n [\n '1000000',\n 1,\n '2000000',\n '500000',\n '111101000010010000000',\n '1111010000100100000'\n ],\n [\n '1000000',\n 7,\n '128000000',\n '7812',\n '111101000010010000000000000',\n '1111010000100'\n ],\n [\n '1000000',\n 63,\n '0',\n '0',\n '0',\n '0'\n ],\n [\n '2147483647',\n 0,\n '2147483647',\n '2147483647',\n '1111111111111111111111111111111',\n '1111111111111111111111111111111'\n ],\n [\n '2147483647',\n 1,\n '4294967294',\n '1073741823',\n '11111111111111111111111111111110',\n '111111111111111111111111111111'\n ],\n [\n '2147483647',\n 7,\n '274877906816',\n '16777215',\n '11111111111111111111111111111110000000',\n '111111111111111111111111'\n ],\n [\n '2147483647',\n 63,\n '-9223372036854775808',\n '0',\n '1000000000000000000000000000000000000000000000000000000000000000',\n '0'\n ],\n [\n '10000000000',\n 0,\n '10000000000',\n '10000000000',\n '1001010100000010111110010000000000',\n '1001010100000010111110010000000000'\n ],\n [\n '10000000000',\n 1,\n '20000000000',\n '5000000000',\n '10010101000000101111100100000000000',\n '100101010000001011111001000000000'\n ],\n [\n '10000000000',\n 7,\n '1280000000000',\n '78125000',\n '10010101000000101111100100000000000000000',\n '100101010000001011111001000'\n ],\n [\n '10000000000',\n 63,\n '0',\n '0',\n '0',\n '0'\n ],\n [\n '9223372036854775807',\n 0,\n '9223372036854775807',\n '9223372036854775807',\n '111111111111111111111111111111111111111111111111111111111111111',\n '111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '9223372036854775807',\n 1,\n '-2',\n '4611686018427387903',\n '1111111111111111111111111111111111111111111111111111111111111110',\n '11111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '9223372036854775807',\n 7,\n '-128',\n '72057594037927935',\n '1111111111111111111111111111111111111111111111111111111110000000',\n '11111111111111111111111111111111111111111111111111111111'\n ],\n [\n '9223372036854775807',\n 63,\n '-9223372036854775808',\n '0',\n '1000000000000000000000000000000000000000000000000000000000000000',\n '0'\n ],\n [\n '-1',\n 0,\n '-1',\n '-1',\n '1111111111111111111111111111111111111111111111111111111111111111',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-1',\n 1,\n '-2',\n '-1',\n '1111111111111111111111111111111111111111111111111111111111111110',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-1',\n 7,\n '-128',\n '-1',\n '1111111111111111111111111111111111111111111111111111111110000000',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-1',\n 63,\n '-9223372036854775808',\n '-1',\n '1000000000000000000000000000000000000000000000000000000000000000',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-100',\n 0,\n '-100',\n '-100',\n '1111111111111111111111111111111111111111111111111111111110011100',\n '1111111111111111111111111111111111111111111111111111111110011100'\n ],\n [\n '-100',\n 1,\n '-200',\n '-50',\n '1111111111111111111111111111111111111111111111111111111100111000',\n '1111111111111111111111111111111111111111111111111111111111001110'\n ],\n [\n '-100',\n 7,\n '-12800',\n '-1',\n '1111111111111111111111111111111111111111111111111100111000000000',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-100',\n 63,\n '0',\n '-1',\n '0',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-1000000',\n 0,\n '-1000000',\n '-1000000',\n '1111111111111111111111111111111111111111111100001011110111000000',\n '1111111111111111111111111111111111111111111100001011110111000000'\n ],\n [\n '-1000000',\n 1,\n '-2000000',\n '-500000',\n '1111111111111111111111111111111111111111111000010111101110000000',\n '1111111111111111111111111111111111111111111110000101111011100000'\n ],\n [\n '-1000000',\n 7,\n '-128000000',\n '-7813',\n '1111111111111111111111111111111111111000010111101110000000000000',\n '1111111111111111111111111111111111111111111111111110000101111011'\n ],\n [\n '-1000000',\n 63,\n '0',\n '-1',\n '0',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-2147483648',\n 0,\n '-2147483648',\n '-2147483648',\n '1111111111111111111111111111111110000000000000000000000000000000',\n '1111111111111111111111111111111110000000000000000000000000000000'\n ],\n [\n '-2147483648',\n 1,\n '-4294967296',\n '-1073741824',\n '1111111111111111111111111111111100000000000000000000000000000000',\n '1111111111111111111111111111111111000000000000000000000000000000'\n ],\n [\n '-2147483648',\n 7,\n '-274877906944',\n '-16777216',\n '1111111111111111111111111100000000000000000000000000000000000000',\n '1111111111111111111111111111111111111111000000000000000000000000'\n ],\n [\n '-2147483648',\n 63,\n '0',\n '-1',\n '0',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-10000000000',\n 0,\n '-10000000000',\n '-10000000000',\n '1111111111111111111111111111110110101011111101000001110000000000',\n '1111111111111111111111111111110110101011111101000001110000000000'\n ],\n [\n '-10000000000',\n 1,\n '-20000000000',\n '-5000000000',\n '1111111111111111111111111111101101010111111010000011100000000000',\n '1111111111111111111111111111111011010101111110100000111000000000'\n ],\n [\n '-10000000000',\n 7,\n '-1280000000000',\n '-78125000',\n '1111111111111111111111101101010111111010000011100000000000000000',\n '1111111111111111111111111111111111111011010101111110100000111000'\n ],\n [\n '-10000000000',\n 63,\n '0',\n '-1',\n '0',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n [\n '-9223372036854775808',\n 0,\n '-9223372036854775808',\n '-9223372036854775808',\n '1000000000000000000000000000000000000000000000000000000000000000',\n '1000000000000000000000000000000000000000000000000000000000000000'\n ],\n [\n '-9223372036854775808',\n 1,\n '0',\n '-4611686018427387904',\n '0',\n '1100000000000000000000000000000000000000000000000000000000000000'\n ],\n [\n '-9223372036854775808',\n 7,\n '0',\n '-72057594037927936',\n '0',\n '1111111100000000000000000000000000000000000000000000000000000000'\n ],\n [\n '-9223372036854775808',\n 63,\n '0',\n '-1',\n '0',\n '1111111111111111111111111111111111111111111111111111111111111111'\n ],\n ];\n }", "title": "" }, { "docid": "ed7cdb2e0d060e461eeccee8769ede14", "score": "0.4938716", "text": "private function shiftRows()\r\n {\r\n $temp = \"\";\r\n for ($i = 1; $i < 4; $i ++) {\r\n for ($j = 0; $j < self::$Nb; $j ++)\r\n $temp[$j] = $this->s[$i][($j + $i) % self::$Nb];\r\n for ($j = 0; $j < self::$Nb; $j ++)\r\n $this->s[$i][$j] = $temp[$j];\r\n }\r\n }", "title": "" }, { "docid": "d5fd688c53f5e3e4ee408f5ea89ec4d4", "score": "0.4936754", "text": "public function delete_shift($id);", "title": "" }, { "docid": "c3443c9e9c240627b432f9735292529d", "score": "0.4924941", "text": "public function testShift0()\n{\n\n $actual = $this->collection->shift();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "6ef5e8eddf6fc9c1fa87855690c62d63", "score": "0.49178097", "text": "public function shift()\n {\n return array_shift($this->data);\n }", "title": "" }, { "docid": "44cdabea73b7d36f510ffca19a1ec081", "score": "0.4915986", "text": "public function edit(Shift $shift)\n {\n //\n }", "title": "" }, { "docid": "20e74e0229e24c547d877aeb4e432de5", "score": "0.49091828", "text": "function creatActionForShift($sheetID)\n{\n $actionID = getShiftActionID($_POST[\"actionToAdd\"], $_POST[\"section\"]);\n if ($actionID == null) {\n $actionID = creatShiftAction($_POST[\"actionToAdd\"], $_POST[\"section\"]);\n setFlashMessage(\"Nouvelle action <strong>\" . $_POST[\"actionToAdd\"] . \"</strong> créée et ajoutée au rapport\");\n } else {\n setFlashMessage(\"L'action <strong>\" . $_POST[\"actionToAdd\"] . \"</strong> à été ajoutée au rapport\");\n }\n $modelID = configureModel($sheetID, $_POST[\"model\"]);\n $res = addShiftAction($modelID, $actionID);\n if ($res == false) {\n setFlashMessage(\"Une erreur est survenue. Impossible d'ajouter l'action.\");\n }\n redirect(\"shiftShow\", $sheetID);\n}", "title": "" }, { "docid": "e974fdfcec8d4fec4b8445b34cb455f6", "score": "0.48977506", "text": "private function invShiftRows()\r\n {\r\n $temp = \"\";\r\n for ($i = 1; $i < 4; $i ++) {\r\n for ($j = 0; $j < self::$Nb; $j ++)\r\n $temp[($i + $j) % self::$Nb] = $this->s[$i][$j];\r\n for ($j = 0; $j < self::$Nb; $j ++)\r\n $this->s[$i][$j] = $temp[$j];\r\n }\r\n }", "title": "" }, { "docid": "2aaa451a15946080e3bc42536fdbbb23", "score": "0.48968524", "text": "function yy_shift($yyNewState, $yyMajor, $yypMinor)\n {\n $this->yyidx++;\n if ($this->yyidx >= self::YYSTACKDEPTH) {\n $this->yyidx--;\n if (self::$yyTraceFILE) {\n fprintf(self::$yyTraceFILE, \"%sStack Overflow!\\n\", self::$yyTracePrompt);\n }\n while ($this->yyidx >= 0) {\n $this->yy_pop_parser_stack();\n }\n /* Here code is inserted which will execute if the parser\n ** stack ever overflows */\n#line 462 \"e:\\workspace\\nonadmin\\pkg\\vtiger\\extensions\\Webservices\\VTQL_parser.y\"\n\n\tthrow new WebServiceException(WebServiceErrorCode::$QUERYSYNTAX, \"Parser stack overflow\");\n#line 1046 \"e:\\workspace\\nonadmin\\pkg\\vtiger\\extensions\\Webservices\\VTQL_parser.php\"\n return;\n }\n $yytos = new VTQL_ParseryyStackEntry;\n $yytos->stateno = $yyNewState;\n $yytos->major = $yyMajor;\n $yytos->minor = $yypMinor;\n array_push($this->yystack, $yytos);\n if (self::$yyTraceFILE && $this->yyidx > 0) {\n fprintf(self::$yyTraceFILE, \"%sShift %d\\n\", self::$yyTracePrompt,\n $yyNewState);\n fprintf(self::$yyTraceFILE, \"%sStack:\", self::$yyTracePrompt);\n for($i = 1; $i <= $this->yyidx; $i++) {\n fprintf(self::$yyTraceFILE, \" %s\",\n self::$yyTokenName[$this->yystack[$i]->major]);\n }\n fwrite(self::$yyTraceFILE,\"\\n\");\n }\n }", "title": "" }, { "docid": "929519365c43d1c97e9a4915654b660c", "score": "0.48964182", "text": "function shift_lessons($from, $to, $duplicate) {\n global $USER;\n $emptyfound = false; $temp = false;\n\n while(!$emptyfound) {\n if ($temp) { // temp save from previous run.\n $move = $temp;\n } else {\n $move = get_db_row(\"SELECT * FROM lessons WHERE userid='$USER->userid' AND timestamp='$from'\"); // this is about to be replaced.\n }\n\n // Save current date to be overwritten\n $temp = get_db_row(\"SELECT * FROM lessons WHERE userid='$USER->userid' AND timestamp='$to'\");\n\n // overwrite content on target.\n execute_db_sql(\"UPDATE lessons SET content='\".$move[\"content\"].\"', locked='\".$move[\"locked\"].\"' WHERE userid='$USER->userid' AND timestamp='$to'\");\n\n // delete original.\n if (!$duplicate) {\n execute_db_sql(\"DELETE FROM lessons WHERE userid='$USER->userid' AND timestamp='$from'\");\n }\n\n $date = DateTime::createFromFormat('Ymd', $to);\n $date->modify('+1 day'); //skip a day\n\n // while weekend or locked -> keep loocking\n $to = $date->format(\"Ymd\");\n while(($date->format(\"w\") == 0 || $date->format(\"w\") == 6) || get_db_row(\"SELECT * FROM lessons WHERE locked='1' AND userid='$USER->userid' AND timestamp='$to'\")) {\n $date->modify('+1 day'); //skip a day\n $to = $date->format(\"Ymd\");\n }\n\n if (!get_db_row(\"SELECT * FROM lessons WHERE userid='$USER->userid' AND timestamp='$to'\")) {\n $emptyfound = true;\n }\n }\n\n execute_db_sql(\"INSERT INTO lessons (userid,timestamp,content) VALUES(\".$temp['userid'].\",$to,'\".$temp['content'].\"')\");\n\n return $to;\n}", "title": "" }, { "docid": "1a881b086038fdd0d51ca27859119f2e", "score": "0.48928124", "text": "public function shift()\n {\n return array_shift($this->elements);\n }", "title": "" }, { "docid": "8ff5395f5ca180d6d54ac07d6922c729", "score": "0.48681813", "text": "public function shift()\n {\n return array_shift($this->items);\n }", "title": "" }, { "docid": "7a247e8f98a005f6d6bc30560f882f0f", "score": "0.48575857", "text": "public function shifts()\n {\n return $this->hasMany(Shift::class);\n }", "title": "" }, { "docid": "03ec22b229f020a5f3300b64d1f87959", "score": "0.4816811", "text": "public function shift() \n\t{\n\t\t$firstNodeValue = $this->bottom();\n\t\t$this->firstNode = $this->firstNode->next;\n\t\t\n\t\tif(null !== $this->firstNode)\n\t\t\t$this->firstNode->prev = null;\n\n\t\t$this->count--;\n\t\treturn $firstNodeValue;\n\t}", "title": "" }, { "docid": "63e6591bea6b6eaab88303962666335f", "score": "0.48038214", "text": "public function shift(string $key)\n {\n return false;\n }", "title": "" }, { "docid": "8cdc0360aa2df5e9c48dba3fd26d6e04", "score": "0.47915137", "text": "public function shift() {\n return array_shift($this->queue);\n }", "title": "" }, { "docid": "fd86ec22f8e9b37a4e2a864223096b85", "score": "0.47858596", "text": "public function unshift($item);", "title": "" }, { "docid": "f6c3bff291f00f4cbb2061779b104146", "score": "0.47570452", "text": "public function create(Shift $shift)\n {\n return view('shifts.create', compact('shift'));\n }", "title": "" }, { "docid": "b4b752f5f3ee1de1e44a28eb7b8655f8", "score": "0.4743347", "text": "function array_shift($stack) {}", "title": "" }, { "docid": "c39623cb677e077277b3becbd35326bb", "score": "0.4729283", "text": "function get_shift($id){\n //` $this->db->select('s.id, s.start_time, s.end_time, s.date, ')\n }", "title": "" }, { "docid": "1b6433218b7ea840e5fd7e69af9247cd", "score": "0.47236067", "text": "public function shift()\n\t{\n\t\treturn array_shift($this->children);\n\t}", "title": "" }, { "docid": "0082f8ac532aeffa8268be8189910f2e", "score": "0.47198236", "text": "function _array_circular_shift($array, $steps=1) {\n\t$l = count($array);\n\tif($steps===0 || $l===0) { return $array; }\n\t$steps %= $l;\n\t$steps *= -1;\n\treturn array_merge(array_slice($array, $steps), array_slice($array, 0, $steps));\n}", "title": "" }, { "docid": "80ce69648932a13ebfe635a18ba3ef4d", "score": "0.47178426", "text": "private static function urs($a, $b) {\n\t $a &= 0xffffffff; $b &= 0x1f; // (bounds check)\n\t if ($a&0x80000000 && $b>0) { // if left-most bit set\n\t\t$a = ($a>>1) & 0x7fffffff; // right-shift one bit & clear left-most bit\n\t\t$a = $a >> ($b-1); // remaining right-shifts\n\t } else { // otherwise\n\t\t$a = ($a>>$b); // use normal right-shift\n\t } \n\t return $a; \n\t}", "title": "" }, { "docid": "bf0be6565d5ccfc7846f05edf72d2a8a", "score": "0.47131637", "text": "private function unsignedRightShift(int $value, int $steps): int\n {\n if ($steps === 0) {\n return $value;\n }\n\n return ($value >> $steps) & ~(1 << (8 * PHP_INT_SIZE - 1) >> ($steps - 1));\n }", "title": "" }, { "docid": "bd8ad0255cec1c42ec09a26d92569c4d", "score": "0.47071907", "text": "public function swap() {\n return new Left($this->_value);\n }", "title": "" }, { "docid": "87875338fd96f1273c95502fce54fdab", "score": "0.46766582", "text": "public function create()\n {\n $shift = new Shift();\n $team = request()->user()->currentTeam;\n $latest = Shift::whereTeamId($team->id)->latest()->first();\n if ($latest) {\n\n if ($latest->status === 'close') {\n $shift->cash_begin = $latest->cash_end;\n } else {\n $this->show($latest);\n }\n } else {\n $shift->cash_begin = 0;\n }\n\n $shift->team_id = $team->id;\n $shift->status = 'open';\n $shift->load('team');\n\n return Inertia::render('Shifts/Create', [\n 'shift' => $shift\n ]);\n }", "title": "" }, { "docid": "2d4cd18b8de2896ffe98b1997c39c90f", "score": "0.46760356", "text": "public function store(StoreCommonTimeShiftRequest $request)\n {\n $attributes = $request->only([\n 'role_id',\n 'effectivity_date',\n 'expected_time_in',\n 'expected_time_out'\n ]);\n\n return CommonTimeShift::create($attributes);\n }", "title": "" }, { "docid": "a521bd7e8e4336a895fe8b20b9fd4bdb", "score": "0.4664628", "text": "function delete_shift($id)\n {\n return $this->db->delete('shifts',array('id'=>$id));\n }", "title": "" }, { "docid": "0f57feabb1d6e97182eab16b18d36b72", "score": "0.46235374", "text": "public function show(Shift $shift)\n {\n return static::singleShift($shift);\n }", "title": "" }, { "docid": "08e34a3aedadf6bb6312b7778e0a2bd5", "score": "0.4614586", "text": "public function transformShiftFormat($shift) {\n $dayS = str_replace('-', '', substr($shift->shift_start, 0, 10));\n $dayF = substr($dayS, 6, 2) . '.' . substr($dayS, 4, 2) . '.' . substr($dayS, 0, 4);\n $this->fData[$dayF][] = [$shift->shift_start, $shift->shift_end];\n }", "title": "" }, { "docid": "7fce017e680ed080846e88364e8c96c5", "score": "0.46114808", "text": "function sub_cipher_encryption($plaintext, $shift) {\n while($shift > 27)\n $shift -= 27;\n\n $plaintext = strtoupper($plaintext);\n $tmp_letter = range('A', 'Z');\n $tmp_letter[] = ' ';\n $letter = implode('', $tmp_letter);\n\n $ciphertext = \"\";\n\n for($i = 0; $i < strlen($plaintext); ++$i){\n $pos = strpos($letter, $plaintext[$i]) + $shift;\n if($pos >'Z')\n $pos = $pos % 27;\n $ciphertext .= $letter[$pos];\n }\n return $ciphertext;\n }", "title": "" }, { "docid": "ac29b519dcdb5e5093173f1eece85fb5", "score": "0.46049199", "text": "function update_shift($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('shifts',$params);\n }", "title": "" }, { "docid": "361eee8b97f46ade2b2b2d639bac22b9", "score": "0.45997623", "text": "public function modify_shift($shift) {\n $this->conn->execute_query(\n \"UPDATE Shifts \n SET Status=?,\n UserID=?,\n OrganizationId=?,\n ZipCode=?,\n RequiredPosition=?,\n PayDifferential=?,\n StartDate=?,\n StartTime=?,\n EndDate=?,\n EndTime=?,\n SpecialRequirements=?\n WHERE ShiftID=?\",\n \"dddssdsssssd\",\n $shift->get_status(),\n $shift->get_assigned_user_id(),\n $shift->get_organization_id(),\n $shift->get_zip_code(),\n $shift->get_required_position(),\n $shift->get_pay_differential(),\n $this->get_string_date($shift->get_start_datetime()),\n $this->get_string_time($shift->get_start_datetime()),\n $this->get_string_date($shift->get_end_datetime()),\n $this->get_string_time($shift->get_end_datetime()),\n $shift->get_special_requirements(),\n $shift->get_shift_id()\n );\n if ($shift->get_assigned_user_id() != null) {\n $this->conn->execute_query(\"UPDATE Requests SET Status=? WHERE ShiftID=? AND Status=? AND Type=?\",\n \"dddd\",\n Request::STATUS_DENIED,$shift->get_shift_id(),Request::STATUS_PENDING,Request::REQUEST_ASSIGNMENT);\n }\n }", "title": "" }, { "docid": "0dd05ec75773ed5da1d948d7cb6a6e08", "score": "0.45927802", "text": "private function shiftHeadingTag(string $html, int $level, int $shift): string\n {\n if ($shift < 0 || $shift > 5) {\n throw new \\InvalidArgumentException('Incorrect shift value: ' . $shift);\n }\n \n $shifted = $level + $shift;\n if ($level + $shift > 6) {\n $shifted = 6;\n }\n \n $html = str_replace('<h' . $level . '>', '<h' . $shifted . '>', $html);\n $html = str_replace('</h' . $level . '>', '</h' . $shifted . '>', $html);\n \n return $html;\n }", "title": "" }, { "docid": "401161d6e85486c96ff487e510428fd1", "score": "0.45765457", "text": "function __construct($shiftID = false) {\n $this->instance = & get_instance();\n if ((isset($shiftID)) && ($shiftID != 0)) {\n $this->setShift($this->getShiftROW($shiftID));\n } else {\n $this->id = 0;\n $this->scheduledShiftsID = 0;\n }\n }", "title": "" }, { "docid": "45b8dc550b13d19e62813beb6f0f68b4", "score": "0.4559814", "text": "public function get_shift($id) {\n //TODO: Remove test data\n $this->conn->connect();\n $shift_sql = $this->conn->execute_query(\n \"SELECT * FROM Shifts WHERE ShiftId=?\",\"d\",$id\n )[1];\n if (sizeof($shift_sql) == 1) {\n return ShiftService::shift_from_row($shift_sql[0]);\n }\n else {\n return null;\n }\n \n }", "title": "" }, { "docid": "02540efe4c7a0adddb367666d9819dd7", "score": "0.45459145", "text": "private function rotate($step)\n {\n $newIndex = ($this->directionIndex + $step) < 0 ?\n count(self::DIRECTIONS) - 1 :\n ($this->directionIndex + $step) % count(self::DIRECTIONS);\n\n $this->setDirectionIndex($newIndex);\n\n return $this->valueOf($newIndex);\n }", "title": "" }, { "docid": "52d1a29a45b1e5754dfe8f920df7d915", "score": "0.45296913", "text": "public function markdown_shifted($text, int $shift = 1)\n {\n $html = $this->parserManager->transform($text, null);\n \n $html = self::shiftHeadingTag($html, 5, $shift);\n $html = self::shiftHeadingTag($html, 4, $shift);\n $html = self::shiftHeadingTag($html, 3, $shift);\n $html = self::shiftHeadingTag($html, 2, $shift);\n $html = self::shiftHeadingTag($html, 1, $shift);\n \n return $html;\n }", "title": "" }, { "docid": "1242d78c0cc96ca6cd3e69838a582547", "score": "0.45207226", "text": "public static function unsignedRightShift(int $a, int $b) : int\n {\n return (\n $a >= 0\n ? $a >> $b\n : (($a & 0x7fffffff) >> $b) | (0x40000000 >> ($b - 1))\n );\n }", "title": "" }, { "docid": "ee5a86270da97e92f8c609b733beb01d", "score": "0.45170587", "text": "public static function shift() {\n $call_id = array_shift(self::$call_id_list);\n return $call_id;\n }", "title": "" }, { "docid": "53cf71056072ecf50f40d9fde8340ac5", "score": "0.4508505", "text": "public static function encode(string $word, int $shift = 1): string\n {\n return [\n 1 => 'DBFTBS',\n 2 => 'ECGUCT',\n 3 => 'FDHVDU',\n 4 => 'GEIWEV',\n 5 => 'HFJXFW',\n 6 => 'IGKYGX',\n 7 => 'JHLZHY',\n 8 => 'KIMAIZ',\n 9 => 'LJNBJA',\n 10 => 'MKOCKB',\n 11 => 'NLPDLC',\n 12 => 'OMQEMD',\n 13 => 'PNRFNE',\n 14 => 'QOSGOF',\n 15 => 'RPTHPG',\n 16 => 'SQUIQH',\n 17 => 'TRVJRI',\n 18 => 'USWKSJ',\n 19 => 'VTXLTK',\n 20 => 'WUYMUL',\n 21 => 'XVZNVM',\n 22 => 'YWAOWN',\n 23 => 'ZXBPXO',\n 24 => 'AYCQYP',\n 25 => 'BZDRZQ',\n ][$shift];\n }", "title": "" }, { "docid": "1eddeca471a65b42e0d5ba70f775415f", "score": "0.45018548", "text": "private static function rotWord($w) {\n\t $tmp = $w[0];\n\t for ($i=0; $i<3; $i++) $w[$i] = $w[$i+1];\n\t $w[3] = $tmp;\n\t return $w;\n\t}", "title": "" }, { "docid": "6d8806145c12706c46a1f45f68834a4e", "score": "0.44997007", "text": "public function op_left_shift($num)\n\t{\n\t\t$clone = clone $this;\n\t\treturn $clone->_set($this->_addr_mask($this->_addr->bitwise_leftShift($num)));\n\t}", "title": "" }, { "docid": "3ba25a386761d2b31878661b573896c9", "score": "0.44814914", "text": "public function shiftAllStack()\n {\n $result = [];\n\t\twhile( null !== $t = $this->shift() ) {\n $result[] = $t;\n }\n return $result;\n }", "title": "" }, { "docid": "8893a6973b97e11b7e6ed71b65889241", "score": "0.44742352", "text": "public function set_shift_id($shift_id) {\n $this->shift_id = $shift_id;\n }", "title": "" }, { "docid": "c99bd55b5071fca9d8b13b882ee94e59", "score": "0.44621864", "text": "public static function rightShift(\\GMP $number, int $positions) : \\GMP\n { return \\gmp_div_q($number, \\gmp_pow(\\gmp_init(2, 10), $positions));\n }", "title": "" }, { "docid": "2fd2fff547f2743a20d25ac7a889a8ef", "score": "0.4448339", "text": "function yy_find_shift_action($iLookAhead)\n {\n $stateno = $this->yystack[$this->yyidx]->stateno;\n \n /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */\n if (!isset(self::$yy_shift_ofst[$stateno])) {\n // no shift actions\n return self::$yy_default[$stateno];\n }\n $i = self::$yy_shift_ofst[$stateno];\n if ($i === self::YY_SHIFT_USE_DFLT) {\n return self::$yy_default[$stateno];\n }\n if ($iLookAhead == self::YYNOCODE) {\n return self::YY_NO_ACTION;\n }\n $i += $iLookAhead;\n if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||\n self::$yy_lookahead[$i] != $iLookAhead) {\n if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)\n && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {\n if (self::$yyTraceFILE) {\n fwrite(self::$yyTraceFILE, self::$yyTracePrompt . \"FALLBACK \" .\n $this->yyTokenName[$iLookAhead] . \" => \" .\n $this->yyTokenName[$iFallback] . \"\\n\");\n }\n return $this->yy_find_shift_action($iFallback);\n }\n return self::$yy_default[$stateno];\n } else {\n return self::$yy_action[$i];\n }\n }", "title": "" }, { "docid": "6dc749c40456ef054b634b33e20775ab", "score": "0.44465584", "text": "function addActionForShift($sheetID)\n{\n $modelID = configureModel($sheetID, $_POST[\"model\"]);\n $res = addShiftAction($modelID, $_POST[\"actionID\"]);\n if ($res == false) {\n setFlashMessage(\"Une erreur est survenue. Impossible d'enregistrer les données.\");\n } else {\n setFlashMessage(\"L'action <strong>\" . getShiftActionName($_POST[\"actionID\"]) . \"</strong> à été ajoutée au rapport\");\n }\n redirect(\"shiftShow\", $sheetID);\n}", "title": "" }, { "docid": "3e4c94730b37a9e1f3cf1cd7fd429a00", "score": "0.44429308", "text": "public function bitShiftRight($number)\n {\n $result = bcdiv(\n $this->getRawValue(),\n bcpow(\n 2,\n static::upgradeParam($number)->getRawValue()\n )\n );\n\n return static::factory($result);\n }", "title": "" }, { "docid": "7f70661c765d5c396c25f240fd2df06b", "score": "0.44413546", "text": "function findShift($db, $unit, $id, $old_shift)\n{\n $recs = array();\n $sql = \"SELECT `shift`\n FROM `group_shift`\n WHERE `assignation_key` = '\" . $unit . \"'\n AND find_in_set(\" . $id . \", `assignation_value`)\n AND `shift` <> \" . $old_shift;\n\n $query = $db->query($sql);\n while ($r = mysqli_fetch_assoc($query)) {\n $recs[] = $r['shift'];\n }\n return $recs;\n}", "title": "" }, { "docid": "12ac263bb11444c5dbc0ee2f8221c686", "score": "0.4435822", "text": "function yy_find_shift_action($iLookAhead)\n {\n $stateno = $this->yystack[$this->yyidx]->stateno;\n \n /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */\n if (!isset(self::$yy_shift_ofst[$stateno])) {\n // no shift actions\n return self::$yy_default[$stateno];\n }\n $i = self::$yy_shift_ofst[$stateno];\n if ($i === self::YY_SHIFT_USE_DFLT) {\n return self::$yy_default[$stateno];\n }\n if ($iLookAhead == self::YYNOCODE) {\n return self::YY_NO_ACTION;\n }\n $i += $iLookAhead;\n if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||\n self::$yy_lookahead[$i] != $iLookAhead) {\n if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)\n && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {\n if (self::$yyTraceFILE) {\n fwrite(self::$yyTraceFILE, self::$yyTracePrompt . \"FALLBACK \" .\n self::$yyTokenName[$iLookAhead] . \" => \" .\n self::$yyTokenName[$iFallback] . \"\\n\");\n }\n return $this->yy_find_shift_action($iFallback);\n }\n return self::$yy_default[$stateno];\n } else {\n return self::$yy_action[$i];\n }\n }", "title": "" }, { "docid": "85912afeced8ba7ba84fbce6902f49a0", "score": "0.4419784", "text": "protected function makeShiftResource(Shift $shift): array\n {\n $resource = [\n \"type\" => \"shifts\",\n \"attributes\" => [\n \"start\" => $shift->start->toISO8601String(),\n \"end\" => $shift->end->toISO8601String(),\n \"breakDuration\" => $shift->break_duration,\n ],\n \"relationships\" => [\n \"timesheet\" => [\n \"data\" => [\n \"type\" => \"timesheets\",\n \"id\" => \"{$shift->timesheet->id}\",\n ]\n ],\n ],\n ];\n\n if ($shift->exists) {\n $resource['id'] = (string) $shift->id;\n }\n\n return $resource;\n }", "title": "" }, { "docid": "a4d3225f8b3834c36adbab6ccb56edba", "score": "0.4413471", "text": "public function testTimeShift()\n {\n return;\n\n /**\n * @var ContentManager\n */\n $manager = $this->repository->getContentManager('example01');\n $record = array();\n $record['properties'] = array( 'name' => 'Timeshift Record' );\n $id = $manager->saveRecord($record);\n $result = $manager->getRecord($id);\n $record = $result['record'];\n $this->assertEquals(1, $record['info']['revision']);\n sleep(2);\n $this->assertEquals($id, $manager->saveRecord($record));\n $record = $manager->getRecord($id, 'default', 'default', 'none', 1);\n $this->assertEquals(1, $record['info']['revision']);\n $record = $manager->getRecord($id);\n $this->assertEquals(2, $record['info']['revision']);\n }", "title": "" }, { "docid": "d43f47799a66857d1de26699be0c6415", "score": "0.4404932", "text": "public function transpileExprShiftLeft(\\PHPParser_Node_Expr_ShiftLeft $node, Context $ctx)\n {\n if ($node->left instanceof \\PHPParser_Node_Expr_ConstFetch\n && $node->left->name->parts[0] === 'MEH'\n && $node->right instanceof \\PHPParser_Node_Scalar_String\n ) {\n return $ctx->bld->luaCode($node->right->value);\n }\n // TODO: other stuff\n throw new MehException('Unimplemented');\n }", "title": "" }, { "docid": "9805881833e22ff37556867a47638d2e", "score": "0.43850932", "text": "function shiftSheetSwitchState()\n{\n $res = setSlugForShift($_POST[\"id\"], $_POST[\"newSlug\"]);\n if ($res == false) {\n setFlashMessage(\"Une erreur est survenue. Impossible de changer l'état du rapport de garde.\");\n } else {\n setFlashMessage(\"L'état du rapport de garde a été correctement modifié.\");\n }\n redirect(\"shiftList\", getBaseIDForShift($_POST[\"id\"]));\n}", "title": "" }, { "docid": "24aef22059ed844a942be8757c326906", "score": "0.4381891", "text": "public function shift()\n\t{\n\t\tif (count($this->arrCollection) != 0)\n\t\t{\n\t\t\treturn array_shift($this->arrCollection);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "61c5fad92277e8336bd0276bd3bf2ab2", "score": "0.43620297", "text": "function masque($n) {\n\tif ($n<=0) {\n\t\techo \"Erreur interne: n<=0 !\\n\";\n\t\t$n=1;\n\t} else if ($n>=32) {\n\t\techo \"Erreur interne: n>=32 !\\n\";\n\t\t$n=31;\n\t}\n return( ((1<<$n)-1) << (32 -$n));\n}", "title": "" }, { "docid": "28fb54271dd7a61a2e91a30fba46c42b", "score": "0.43551362", "text": "public function shift(): mixed\n {\n $value = array_shift($this->items);\n\n if (self::isArrayWrappingEnabled() && is_array($value)) {\n $value = $this->new($value);\n }\n\n return $value;\n }", "title": "" }, { "docid": "4a124c7cd697825aaa8eb84d54b7a92c", "score": "0.43374327", "text": "private function setShift($shiftROW) {\n $this->shiftROW = $shiftROW;\n $this->id = $shiftROW['id'];\n $this->caID = $shiftROW['caID'];\n $this->startTime = $shiftROW['startTime'];\n $this->endTime = $shiftROW['endTime'];\n $this->note = $shiftROW['note'];\n $this->scheduledShiftsID = $shiftROW['ScheduledShifts_id'];\n }", "title": "" }, { "docid": "488d0cf06218723de7c5ab3c70016597", "score": "0.4333725", "text": "private function scheduleCommand()\n {\n $command = new ScheduleShiftDomainCommand(\n array_search($this->employeeName, $this->employees),\n new DateRange(\n $this->startDate,\n $this->endDate\n )\n );\n\n $this->getContainer()->get('domain.service.shift_scheduler')->schedule($command);\n $this->io->success('Shift scheduled !');\n }", "title": "" }, { "docid": "38a2b8c641392dce071511e3cecaf12e", "score": "0.4329063", "text": "public function testExample()\n {\n $encryptor = new \\App\\ShiftEncryptor();\n\n //shift encryption test\n $result = $encryptor->encrypt(\"Hello World\");\n $this->assertEquals($result, \"Khoor Zruog\");\n\n $result = $encryptor->encrypt(\"A\");\n $this->assertEquals($result, \"D\");\n\n $result = $encryptor->encrypt(\"a\");\n $this->assertEquals($result, \"d\");\n\n $result = $encryptor->encrypt(\"z\");\n $this->assertEquals($result, \"c\");\n\n $result = $encryptor->encrypt(\"Y\");\n $this->assertEquals($result, \"B\");\n\n $result = $encryptor->encrypt(\"x\");\n $this->assertEquals($result, \"a\");\n\n $result = $encryptor->encrypt(\" \");\n $this->assertEquals($result, \" \");\n\n $result = $encryptor->encrypt(\"#$%^&*#@\");\n $this->assertEquals($result, \"#$%^&*#@\");\n\n $result = $encryptor->encrypt(\"a#$%^&*#@B\");\n $this->assertEquals($result, \"d#$%^&*#@E\");\n\n $result = $encryptor->encrypt(null);\n $this->assertEquals($result, null);\n\n //shift decryption tests\n\n $result = $encryptor->decrypt(\"Khoor Zruog\");\n $this->assertEquals($result, \"Hello World\");\n\n $result = $encryptor->decrypt(\"D\");\n $this->assertEquals($result, \"A\");\n\n $result = $encryptor->decrypt(\"d\");\n $this->assertEquals($result, \"a\");\n\n $result = $encryptor->decrypt(\"c\");\n $this->assertEquals($result, \"z\");\n\n $result = $encryptor->decrypt(\"B\");\n $this->assertEquals($result, \"Y\");\n\n $result = $encryptor->decrypt(\"a\");\n $this->assertEquals($result, \"x\");\n\n $result = $encryptor->decrypt(\" \");\n $this->assertEquals($result, \" \");\n\n $result = $encryptor->decrypt(\"#$%^&*#@\");\n $this->assertEquals($result, \"#$%^&*#@\");\n\n $result = $encryptor->decrypt(\"d#$%^&*#@E\");\n $this->assertEquals($result, \"a#$%^&*#@B\");\n\n $result = $encryptor->decrypt(null);\n $this->assertEquals($result, null);\n }", "title": "" }, { "docid": "710f58a742307ae60a10160ecd6a8797", "score": "0.43284446", "text": "public function setRangeShift($rangeShift) {\r\n\t\t$this->rangeShift = $rangeShift;\r\n\t}", "title": "" }, { "docid": "ecc7af50ccbc97927c804e14ebdaa605", "score": "0.4316382", "text": "public function unshift($data) {\n $this->insert(0, $data);\n }", "title": "" }, { "docid": "3bf7cf230b899a420470be4a8b84e5fa", "score": "0.429517", "text": "function moveNext();", "title": "" }, { "docid": "34fe64469b72c2258533ed7bf3a8215f", "score": "0.42907804", "text": "public function shift(): mixed\n {\n return array_shift($this->parameters);\n }", "title": "" }, { "docid": "1600e2c5382234ba1de1fb9adc486ce9", "score": "0.4288321", "text": "public function store(Request $request) {\n $rules = [\n 'shift_owner' => 'required',\n 'shift_date' => 'required',\n 'shift_start' => 'required|greater_than_hour|one_day_shift_for_employee',\n 'shift_end' => 'required',\n ];\n $customMessages = [\n 'greater_than_hour' => 'Shit should starts befor it ends :)',\n 'one_day_shift_for_employee'=> 'One employee can have only one shift per day'\n ];\n\n $this->validate($request, $rules, $customMessages);\n $shift_start = date_create_from_format('d/m/Y:H:i:00', $request->get('shift_date') . ':' . $request->get('shift_start') . ':00');\n $shift_end = date_create_from_format('d/m/Y:H:i:00', $request->get('shift_date') . ':' . $request->get('shift_end') . ':00');\n $shift = new Shift([\n 'shift_start' => $shift_start,\n 'shift_end' => $shift_end,\n 'employee_id' => $request->get('shift_owner')\n ]);\n $shift->save();\n return redirect('/shifts')->with('success', 'Shift has been added');\n }", "title": "" } ]
10073c2a72d411689e42e0fa98ab1925
Returns the parameters class name.
[ { "docid": "157cebb9db9ff8c6c74ab9ae74cba0e8", "score": "0.67154366", "text": "public function getType()\n {\n return $this->toPhpReflectionParameter()->getClass()->getName();\n }", "title": "" } ]
[ { "docid": "f5e49360e43a9e38f87165a019d8ebbf", "score": "0.76573706", "text": "protected function getClassName(): string\n\t{\n\t\t$name = $this->params[0] ?? CLI::getSegment(2);\n\n\t\treturn $name ?? '';\n\t}", "title": "" }, { "docid": "e70d6fe5954d6eee1fb7adbf5da43485", "score": "0.72305727", "text": "public function getParameterName(): string\n {\n return Str::of(self::class)->classBasename()->prepend('root')->value();\n }", "title": "" }, { "docid": "3e601caa26657eb2b0c95641a0e64914", "score": "0.7111171", "text": "public function getName()\n {\n return 'parameter';\n }", "title": "" }, { "docid": "8259624e4b23034e81d21dee692653a4", "score": "0.680574", "text": "private function get_class_name() {\n return !is_null($this->class_name) ? $this->class_name : get_class($this);\n }", "title": "" }, { "docid": "b3444f464203ee0d7beee050b7b6a997", "score": "0.67131263", "text": "public function getClassName()\n {\n return $this->get(self::CLASS_NAME);\n }", "title": "" }, { "docid": "986a141933587a4c82ce1fbeac569092", "score": "0.670878", "text": "public function getName()\n {\n return 'class';\n }", "title": "" }, { "docid": "9655cfa1e1db3fb165cab725fcaa8ae7", "score": "0.6633259", "text": "public function getClassName()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "9655cfa1e1db3fb165cab725fcaa8ae7", "score": "0.6633259", "text": "public function getClassName()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "58fa73e3b60ebfa54d1e437b23bc925f", "score": "0.6630113", "text": "public function getClassName(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d424a4f27d736a3b62d0547e99175074", "score": "0.6590371", "text": "public function name($class);", "title": "" }, { "docid": "ffc6e01c79ffab1c1378fa009d214600", "score": "0.65902513", "text": "protected function getClassname(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "47cdb6e486b2fd885741f7b57dbd7d56", "score": "0.65833634", "text": "public function getClassname(): string;", "title": "" }, { "docid": "b4bfd5ed2508833a4245dad5ac4d2536", "score": "0.6561649", "text": "function getClassName()\n {\n return $this->_class_name ;\n }", "title": "" }, { "docid": "0ff8975f2a4a8ffed56ffbb50887e483", "score": "0.6519763", "text": "public function get_class_name()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6480307", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6480307", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6480307", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6480307", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6480307", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6480307", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.6480307", "text": "public function getClassName();", "title": "" }, { "docid": "38b2abd05e956251ed2885170c117f14", "score": "0.64548117", "text": "public function getClassName() {\n return get_class( $this );\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.64182556", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.64182556", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.64182556", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.64182556", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.64182556", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.64182556", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "b563f1c3308900d9ebe1da16a3657a26", "score": "0.6416538", "text": "public static function getClassName()/*# : string */;", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.6414144", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "452036e5d44c1f0f271a59392e721f23", "score": "0.64052355", "text": "public function getClassName() { return __CLASS__; }", "title": "" }, { "docid": "49df58ef0b6394657411dc8662f77ba1", "score": "0.63829744", "text": "public function getClassName() {\n return $this->className;\n }", "title": "" }, { "docid": "a99ef03814245506a399f6bc22d8cd57", "score": "0.6382021", "text": "public function getName()\n {\n return 'filegenParameters';\n }", "title": "" }, { "docid": "c5cd43b0113d1bc7b38927c6bc3e4d01", "score": "0.637065", "text": "public function getName() {\n\t\treturn get_class($this);\n\t\t// return get_called_class();\n\t}", "title": "" }, { "docid": "861244f8974ee223c872ffc17bb0ed7b", "score": "0.63656855", "text": "public function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "title": "" }, { "docid": "c99d3379f6a8df6b936afcaeb027d2b4", "score": "0.63330084", "text": "public function getClassName()\n {\n return $this->_className;\n }", "title": "" }, { "docid": "ada99deb6223b7b8c627233992c4409d", "score": "0.63320017", "text": "protected function className()\n {\n $name = get_class($this);\n $array = explode(\"\\\\\", $name);\n return array_last($array);\n }", "title": "" }, { "docid": "11e096fdccaedf5682470556899d4260", "score": "0.632904", "text": "protected function getClassName() {\n\t\t$thisClass = get_class($this);\n\t\t$thisClass = preg_replace('/_Factory_/', '_Model_', $thisClass);\n\t\t$thisClass = preg_replace('/Factory$/', '', $thisClass);\n\t\treturn $thisClass;\n\t}", "title": "" }, { "docid": "de93d3aabbcaa9cd76ac8cbf40d7fb73", "score": "0.63272905", "text": "public function getClassName() {\n\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "9aaffc4c883a9c7f09a852e22adde6cc", "score": "0.6321115", "text": "public function getClass() : string {\n return $this->clazzName;\n }", "title": "" }, { "docid": "3b53ccf9396e109215175ceb08a18cba", "score": "0.63058513", "text": "public function className()\n {\n return $this->className;\n }", "title": "" }, { "docid": "21e111f1279a297c9d1c49c3ee902a5b", "score": "0.629069", "text": "public function getClassName() { return get_class($this); }", "title": "" }, { "docid": "ae2dfec08d3360baea82ff88d80cb699", "score": "0.62830055", "text": "public function getClassName()\n\t{\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "ae2dfec08d3360baea82ff88d80cb699", "score": "0.62830055", "text": "public function getClassName()\n\t{\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "cc34774be8fc19c5aaf50959a3c7215f", "score": "0.62808394", "text": "public static function getClassName(){\n return __CLASS__;\n }", "title": "" }, { "docid": "6f70b373b689b01209c1d455687edef2", "score": "0.6280345", "text": "function getClassName() {\n\t\treturn $this->_ClassName;\n\t}", "title": "" }, { "docid": "6f70b373b689b01209c1d455687edef2", "score": "0.6280345", "text": "function getClassName() {\n\t\treturn $this->_ClassName;\n\t}", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.62685597", "text": "public function getClassName(): string;", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.62685597", "text": "public function getClassName(): string;", "title": "" }, { "docid": "de4c93afc00f3db7bdf12e623a2d4f45", "score": "0.62603176", "text": "public function getName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "ccd2a56b05cf16cda769235dbe2ad3d8", "score": "0.62593347", "text": "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "title": "" }, { "docid": "d1e283c11c148335f4f929323d0a3169", "score": "0.6257088", "text": "public function getName()\r\n\t{\r\n\t\t$nc = strlen(__CLASS__);\r\n\t\t$className = get_class($this);\r\n\t\t$cs = strlen($className);\r\n\t\treturn ltrim(substr($className, $nc, $cs - $nc), '\\\\');\r\n\t}", "title": "" }, { "docid": "e16c6cd1fe0f03978c9d94fe995a4f17", "score": "0.6214341", "text": "public function className(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "6cd18c9f4138f1f38c47b5df81a2beaa", "score": "0.62121606", "text": "public function get_class_name()\n {\n $class = explode('\\\\', (get_class($this)));\n\n return strtolower($class[count($class) - 1]);\n }", "title": "" }, { "docid": "9e6cf5a0d77f191d01a10711faf5c735", "score": "0.6208308", "text": "public function getName()\n\t{\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "4442b5872bac3079cfc7b7b11b9c5ca6", "score": "0.6204626", "text": "abstract public function getClassName();", "title": "" }, { "docid": "4442b5872bac3079cfc7b7b11b9c5ca6", "score": "0.6204626", "text": "abstract public function getClassName();", "title": "" }, { "docid": "26f297219a65e591e309b240c38d656a", "score": "0.62026817", "text": "public function get_param_name() {\n\t\treturn $this->args['param_name'];\n\t}", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6172682", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6172682", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6172682", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6172682", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6172682", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.6172682", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "412d710b3c555d55efac8a8bdf805c64", "score": "0.6163983", "text": "function getClass() {\n\t \t$class = $this->type.( $this->class ? ' '.$this->class : '' );\n\n\t \tif($this->error) {\n\t \t\t$class .= ' error '.$this->type.'_error';\n\t \t}\n\n\t \treturn $class;\n\t }", "title": "" }, { "docid": "a078c4bf68f7baa539ead5b81f4f943e", "score": "0.6160815", "text": "public function className() { return $this->className; }", "title": "" }, { "docid": "786eb48f9514152bb7f9f5251de4893a", "score": "0.61533713", "text": "protected function getClassName(): string\n {\n if (null === $this->className) {\n $this->className = $this->getCooker()->getClassName();\n }\n return $this->className;\n }", "title": "" }, { "docid": "6b00339c20ef0bcf2212d6d7343d6a65", "score": "0.615146", "text": "public function GetStrClassName()\n {\n return($this->strClassName);\n }", "title": "" }, { "docid": "a15ec290c57b3b227aa12c53eaeab1f9", "score": "0.6145564", "text": "protected function getClassName(): string\n {\n $array = explode('\\\\', get_class($this->repository->getModel()));\n return strtolower(end($array));\n }", "title": "" }, { "docid": "76584b747385997e5b07d54de3a4005e", "score": "0.6142408", "text": "public function getClassName()\n {\n return $this->matClass;\n }", "title": "" }, { "docid": "77db704c33cd4bb2bcbeb3eff8ffbbae", "score": "0.6140286", "text": "public function getClassName() {\n\t\ttry {\n\t\t\tif (strlen($value = $this->__get($this->attNames[\"class\"])) > 0) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$default = LBoxConfigSystem::getInstance()->getParamByPath(\"pages/classes/default\");\n\t\t\t\tif (strlen($default) < 1) {\n\t\t\t\t\tthrow new LBoxExceptionConfigStructure(LBoxExceptionConfigStructure::MSG_CLASS_DEFAULT_NOTFOUND, LBoxExceptionConfigStructure::CODE_CLASS_DEFAULT_NOTFOUND);\n\t\t\t\t}\n\t\t\t\treturn $default;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "8dda3cbe28a06d1eb1f73527dc087bb1", "score": "0.61390454", "text": "public function getClassName() {\n return \\get_class($this->target);\n }", "title": "" }, { "docid": "67372c9584ec32be66cdba369e4e5352", "score": "0.6131213", "text": "public function getName()\n {\n return (new \\ReflectionClass($this))->getShortName();\n }", "title": "" }, { "docid": "6d8d9cca437fef4b9a1b7f7e77f94276", "score": "0.6123002", "text": "protected function getClassArgument()\n {\n return $this->argument('class');\n }", "title": "" }, { "docid": "276bd145a55e4ac0acec35a91e538e8f", "score": "0.6114316", "text": "public function getConstructorParameters(string $className) : string\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\t$reflection = new \\ReflectionClass($className);\n\t\t\t}\n\t\tcatch (\\Exception)\n\t\t\t{\n\t\t\treturn '';\n\t\t\t}\n\n\t\t$methodName = '__construct';\n\n\t\tif (! $reflection->hasMethod($methodName))\n\t\t\t{\n\t\t\treturn '';\n\t\t\t}\n\n\t\t$method = $reflection->getMethod($methodName);\n\t\t$section = new \\PHPFUI\\InstaDoc\\Section\\CodeCommon($this, $className);\n\t\t$parameters = $section->getMethodParameters($method);\n\n\t\treturn \\Soundasleep\\Html2Text::convert($parameters, ['drop_links' => true, 'ignore_errors' => true]);\n\t\t}", "title": "" }, { "docid": "4f44f4693aa39a4c8464544e58c40517", "score": "0.61107534", "text": "public function getClassName()\n {\n return Namespaces::shortClassName(get_class($this));\n }", "title": "" }, { "docid": "2408472bb65def4d3a081718f2a2bc58", "score": "0.60897624", "text": "protected function class_name()\n\t{\n\t\tif ( $this->polymorphic() ) \n\t\t{\t\t\n\t\t\t$default = $this->inflector->singularize($this->name);\n\t\t}\n\t\t\n\t\t# Use name of object\n\t\telse \n\t\t{\n\t\t\t$default = $this->name;\n\t\t}\n\t\t\t\t\n\t\treturn value_for_key('class_name', $this->options, ucwords($default).'_Model');\n\t}", "title": "" }, { "docid": "a999b6ea3f6923f45a1019e9222038ed", "score": "0.60862833", "text": "private function getParameterClassName(ReflectionParameter $parameter): ?string\n {\n $type = $parameter->getType();\n\n if ($type === null || $type->isBuiltin()) {\n return null;\n }\n\n return $parameter->getType()->getName();\n }", "title": "" }, { "docid": "949946fbba5cfdec591657f8a927fa21", "score": "0.6079927", "text": "public function getClass() : string\n {\n return $this->Class;\n }", "title": "" }, { "docid": "86791f26f86715f00fbf29f919fc3e82", "score": "0.6071156", "text": "protected function className() {\n\n return Name::className($this->resource());\n \n }", "title": "" }, { "docid": "ca6a8e7ecd75199c9783f61af44661f9", "score": "0.60650796", "text": "protected function getClassName()\n {\n $fm = $this->util->getFlexibleManager($this->get(FlexibleFilterUtility::FEN_KEY));\n $valueName = $fm->getFlexibleValueName();\n $valueMetadata = $fm->getStorageManager()\n ->getMetadataFactory()\n ->getMetadataFor($valueName);\n\n return $valueMetadata->getAssociationTargetClass($this->get(self::BACKEND_TYPE_KEY));\n }", "title": "" }, { "docid": "b30a4d5ed5ae9822379a1bbaf1abbea8", "score": "0.6061314", "text": "public function getReflectionClassType() {\n $parameters = $this->getMethodParameters();\n\n if (isset($parameters[0])) {\n return explode(\"::\", $parameters[0])[0];\n } else {\n return \"\";\n }\n }", "title": "" }, { "docid": "4289d6fb861c314579aef961c9817d24", "score": "0.6051469", "text": "private function getClassName(): string\n {\n // include the static class name to avoid collisions from loaded classes from multiple tests\n $name = $this->getStaticClassName() . '_' . uniqid();\n\n while (in_array($name, $this->names)) {\n $name .= '1';\n }\n\n $this->names[] = $name;\n\n return $name;\n }", "title": "" }, { "docid": "6f6e9161cd58c33c60ead549d5db42da", "score": "0.60512847", "text": "protected function getResourceClassFieldName() {\n return 'resource_class';\n }", "title": "" }, { "docid": "d7144dad8482baeca54205ecf3f235f2", "score": "0.60305446", "text": "protected static function class_name () {\n return __CLASS__;\n }", "title": "" }, { "docid": "d7144dad8482baeca54205ecf3f235f2", "score": "0.60305446", "text": "protected static function class_name () {\n return __CLASS__;\n }", "title": "" }, { "docid": "8b449d878045bad2113afafa738155bb", "score": "0.6026512", "text": "protected static function className()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "8b449d878045bad2113afafa738155bb", "score": "0.6026512", "text": "protected static function className()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "8b449d878045bad2113afafa738155bb", "score": "0.6026512", "text": "protected static function className()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "9dd02b6050ce560402ed978b639dc18a", "score": "0.60103446", "text": "public abstract function getClassName() : string;", "title": "" }, { "docid": "4b715ea11face192634a06d2527bd37c", "score": "0.6004944", "text": "protected function getClassName()\n {\n $name = ucwords(camel_case($this->getAdapterName()));\n\n if (strpos($name, 'Adapter') === false) {\n $name = $name . 'Adapter';\n }\n\n return $name;\n }", "title": "" }, { "docid": "b6cc1e4570cfab92ae92ec1f5ec4100a", "score": "0.5997173", "text": "protected abstract function getClassName();", "title": "" }, { "docid": "850be50e447834fafa8da358e7f2ae68", "score": "0.5991149", "text": "public function getFromClass()\n {\n return $this->config->getGroupeClass();\n }", "title": "" }, { "docid": "163253be7bf66ec9569a40b777895be2", "score": "0.5986995", "text": "public function getName()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b3639ca54b6ca8561b12a301ff435bfe", "score": "0.59816456", "text": "public function getClass(): string\n {\n return explode('\\\\', get_class())[2];\n }", "title": "" }, { "docid": "bc642b73e2cb91c529e50af509dddb7c", "score": "0.59740484", "text": "public static function getClassName()\n {\n return static::THIS_CLASS_NAME;\n }", "title": "" }, { "docid": "bc642b73e2cb91c529e50af509dddb7c", "score": "0.59740484", "text": "public static function getClassName()\n {\n return static::THIS_CLASS_NAME;\n }", "title": "" }, { "docid": "dbb7cd6af4ca4f3243ae2d615abb2cce", "score": "0.5972448", "text": "protected function getFormatClass()\n {\n return str_replace('{value}', '$ID', $this->backend->getFieldClasses());\n }", "title": "" }, { "docid": "c6c9d9af1d318b66d1bc12b9220fc58b", "score": "0.5967471", "text": "protected function getControllerClassname(): string\n {\n return str_replace(array($this->getNamespace($this->getNameInput()) . '\\\\', $this->type), array('', 'Controller'), $this->getNameInput());\n }", "title": "" }, { "docid": "c8d9fb0fcd1629aac26d37ad4aaf83c8", "score": "0.5966699", "text": "public static function getClassName()\n {\n return get_called_class();\n }", "title": "" } ]
eed6fd1b40a873021a177c35d3a7a1bf
METHODS OF INTERFACE PROCEDURE
[ { "docid": "26c5da05a73723a94d0e035aa5d61cf2", "score": "0.0", "text": "public function validate($dni){\r\n $sql=\"SELECT idUser FROM table_users WHERE dni=?\";\r\n $rs=$this->db->conexion->prepare($sql);\r\n $rs->execute(array($dni));\r\n if($rs->rowCount()>0){\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" } ]
[ { "docid": "b57e9039d7065f0ec1e7ac909dfed229", "score": "0.6419023", "text": "public function Execute(Object\\IProcedure $Procedure);", "title": "" }, { "docid": "2022c2e17d9b13da2fc23526d1473194", "score": "0.6279553", "text": "public function implementMe();", "title": "" }, { "docid": "eefde2f40bde85cf654cbd1ed2e861ab", "score": "0.61828774", "text": "abstract protected function methods();", "title": "" }, { "docid": "eefde2f40bde85cf654cbd1ed2e861ab", "score": "0.61828774", "text": "abstract protected function methods();", "title": "" }, { "docid": "1e346e0df83ce799100418cac0f79eca", "score": "0.6127438", "text": "abstract public function method1();", "title": "" }, { "docid": "55a2c34712f5cbd640eada41fe9e4ac3", "score": "0.61077005", "text": "public function executarAcao(){\n // se houver um metodo publico que sirva de interface interface \n\n \t$this-> executarMania();\n \t$this-> responder();\n\n\n }", "title": "" }, { "docid": "77fe2583c127924803874179a56524ea", "score": "0.6090988", "text": "public function implementMe() {\r\n // Do something here\r\n }", "title": "" }, { "docid": "e4db6274f9f197634a1d436712abe49a", "score": "0.59946716", "text": "abstract public function __invoke();", "title": "" }, { "docid": "8800dcb547ea706c1908ab023e2ad152", "score": "0.59175897", "text": "abstract protected function proceed();", "title": "" }, { "docid": "ca8068d2e146611ad98577232b266a28", "score": "0.5803088", "text": "public function method()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "479b147e3d864ce090805bc42a69683f", "score": "0.57705516", "text": "public function getProcedure();", "title": "" }, { "docid": "e0e752b9adf5bce4a723403b525afacb", "score": "0.5767338", "text": "public function generateProcedures();", "title": "" }, { "docid": "80b932b43bb8f03e19d63586b85cce02", "score": "0.5737212", "text": "abstract public function invoke($method,$params);", "title": "" }, { "docid": "3d2448e32e81bc811df4d4a415c81aa1", "score": "0.5703745", "text": "public function operation1()\n {\n }", "title": "" }, { "docid": "8270a2e17ed690ff84b2b3b7b1744604", "score": "0.5699161", "text": "public function method()\r\n {\r\n\r\n }", "title": "" }, { "docid": "f7bf131e21e9330586f4e729b8f0ddfb", "score": "0.56709814", "text": "abstract public function execute(): void;", "title": "" }, { "docid": "70407b171889d1ee7cd6097d8c173dd5", "score": "0.56640697", "text": "public function operate()\n\t{\n\t\techo \"Concrete Component execute this Method!\\n\";\n\t}", "title": "" }, { "docid": "f925fa5ced69b0272fdb4e9d75af0fe9", "score": "0.566357", "text": "abstract public function invokeAll();", "title": "" }, { "docid": "f8635e9eff9a74b94992c88ae718a234", "score": "0.5649889", "text": "abstract function callService();", "title": "" }, { "docid": "8e1e35f0855ffff3ae4c7fd2cae31733", "score": "0.56316674", "text": "abstract protected function _execute();", "title": "" }, { "docid": "67e3ba222f3e1987124d2569d923c3e8", "score": "0.5608687", "text": "abstract public function doit();", "title": "" }, { "docid": "d0ba7465b6bcc226112d8045cba3d87e", "score": "0.5603706", "text": "public function DefineInterface()\n {\n parent::DefineInterface();\n $this->methodCallAllowed[] = 'CreateVoucherCodes';\n $this->methodCallAllowed[] = 'ExportVoucherCodes';\n }", "title": "" }, { "docid": "adc0c796c005a7b81b035b09a02f2f3d", "score": "0.55605054", "text": "abstract public function process();", "title": "" }, { "docid": "adc0c796c005a7b81b035b09a02f2f3d", "score": "0.55605054", "text": "abstract public function process();", "title": "" }, { "docid": "adc0c796c005a7b81b035b09a02f2f3d", "score": "0.55605054", "text": "abstract public function process();", "title": "" }, { "docid": "adc0c796c005a7b81b035b09a02f2f3d", "score": "0.55605054", "text": "abstract public function process();", "title": "" }, { "docid": "950223e8d645445047e9fd6952ccbc9c", "score": "0.5542152", "text": "public function method();", "title": "" }, { "docid": "950223e8d645445047e9fd6952ccbc9c", "score": "0.5542152", "text": "public function method();", "title": "" }, { "docid": "15558aa72afdff29de37754e6bad6b65", "score": "0.55340964", "text": "abstract protected function process();", "title": "" }, { "docid": "8038c144d25fc8278048814f51f476e9", "score": "0.5532991", "text": "static public function listar(){trigger_error(\"Abstract method not defined\", E_USER_ERROR);exit();}", "title": "" }, { "docid": "4678a148e21141888fac6f85eb20c96c", "score": "0.54977834", "text": "protected function DefineInterface()\n {\n parent::DefineInterface();\n $this->methodCallAllowed[] = 'PreorderArticle';\n }", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.54938024", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.54938024", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.54938024", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.54938024", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.54938024", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.54938024", "text": "abstract public function execute();", "title": "" }, { "docid": "da23bbee6d7fa2dd6cbc357f43286688", "score": "0.5489115", "text": "abstract protected function execute();", "title": "" }, { "docid": "da23bbee6d7fa2dd6cbc357f43286688", "score": "0.5489115", "text": "abstract protected function execute();", "title": "" }, { "docid": "da23bbee6d7fa2dd6cbc357f43286688", "score": "0.5489115", "text": "abstract protected function execute();", "title": "" }, { "docid": "5e968216cfd23e400e1ee75a62d2de0a", "score": "0.5483215", "text": "abstract function commands();", "title": "" }, { "docid": "56e08400767eaa88cf39a2eb31b1b94c", "score": "0.54596645", "text": "abstract protected function process(): void;", "title": "" }, { "docid": "b857652dec22c52299374ba732e514d2", "score": "0.54502815", "text": "abstract protected function processService();", "title": "" }, { "docid": "e0a1aee2b913d68183946b0049333ab6", "score": "0.544534", "text": "abstract protected function getMethod();", "title": "" }, { "docid": "e0a1aee2b913d68183946b0049333ab6", "score": "0.544534", "text": "abstract protected function getMethod();", "title": "" }, { "docid": "63024b7ece3247cc714e0f45f81aa28b", "score": "0.54196966", "text": "abstract public function getMethod();", "title": "" }, { "docid": "64702476b52a6830a834ea7f8dc9789c", "score": "0.54099315", "text": "public function sub2(): void\n {\n // do something...\n }", "title": "" }, { "docid": "9dfbbd46f7ca5e92cd1721978598f09e", "score": "0.54044765", "text": "abstract public function Test();", "title": "" }, { "docid": "6b83c048d2f5c0bb747843f295fa1482", "score": "0.5381895", "text": "protected function primitiveOperation1()\r\n {\r\n echo \"原始操作方法1 <br>\";\r\n }", "title": "" }, { "docid": "f6ee2c79325a6be6898400adacb33a33", "score": "0.53761816", "text": "function clientCode(Abstraction $abstraction)\n{\n // ...\n\n echo $abstraction->operation();\n\n // ...\n}", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.5347585", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.5347585", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.5347585", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.5347585", "text": "public function __invoke();", "title": "" }, { "docid": "1c556bdc82879c50376d24275bbc7e00", "score": "0.53471434", "text": "public function __call()\n {\n }", "title": "" }, { "docid": "27f31d66ab7c3c41def2156b8c8b5989", "score": "0.5340436", "text": "protected function primitiveOperation2()\r\n {\r\n echo \"原始操作方法2 <br>\";\r\n }", "title": "" }, { "docid": "81854094003706b2849acfad42d4a484", "score": "0.53400666", "text": "public function invoke();", "title": "" }, { "docid": "81854094003706b2849acfad42d4a484", "score": "0.53400666", "text": "public function invoke();", "title": "" }, { "docid": "0a73ea9d387ff292330aae7bdd141b6f", "score": "0.5328504", "text": "protected function DefineInterface()\n {\n parent::DefineInterface();\n $externalFunctions = array('SetImage', 'ClearImage');\n $this->methodCallAllowed = array_merge($this->methodCallAllowed, $externalFunctions);\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5328374", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "7ffb8ecb375aa25d6e0f738ce6a08432", "score": "0.53239685", "text": "protected abstract function execute();", "title": "" }, { "docid": "1cec27656a85008aefc05f8dcd7f18f9", "score": "0.5317451", "text": "public function process()\n\t{\n\n\t}", "title": "" }, { "docid": "4b8f377834a3aefd87bb0599d1507da7", "score": "0.5289776", "text": "public abstract function execute();", "title": "" }, { "docid": "4b8f377834a3aefd87bb0599d1507da7", "score": "0.5289776", "text": "public abstract function execute();", "title": "" }, { "docid": "4b8f377834a3aefd87bb0599d1507da7", "score": "0.5289776", "text": "public abstract function execute();", "title": "" }, { "docid": "4b8f377834a3aefd87bb0599d1507da7", "score": "0.5289776", "text": "public abstract function execute();", "title": "" }, { "docid": "3ade5d71c40a739a4309c19631d43c0c", "score": "0.52848315", "text": "public function message2(){\t\t\t\t/*defined second method inside the second parent trait*/\n\t\t\techo \"From second parent class..<br>\";\n\t\t}", "title": "" }, { "docid": "6f749cd9899993f095478b6870151d44", "score": "0.5245627", "text": "function getAll($interface);", "title": "" }, { "docid": "c8f9cfb9300c2e4887b421b0d04f3ef6", "score": "0.523149", "text": "public function execute_custom()\n {\n\n }", "title": "" }, { "docid": "2d212714c338452957767b50a170bf23", "score": "0.5229726", "text": "abstract protected function executeInternal();", "title": "" }, { "docid": "abd9a9dde5de0951eecbe71a538b90b7", "score": "0.5223467", "text": "public function give($implementation) : void;", "title": "" }, { "docid": "151e4cfc9b3c0b1a97bef60cc2e04a54", "score": "0.52208906", "text": "abstract public function process(): int;", "title": "" }, { "docid": "c02871267830679a37ec103386d5db06", "score": "0.52135843", "text": "public function callprocedure($name){\n\t}", "title": "" }, { "docid": "0e815d2fc9388ab82a561ffc71aa37d1", "score": "0.51981634", "text": "public function twoMethod()\n {\n }", "title": "" }, { "docid": "2b807a1d9f76d6fcbbe1cdbf9e85aa31", "score": "0.5179391", "text": "abstract public function process($params);", "title": "" }, { "docid": "d7d801eb58e47f2a867d5fd76208d19e", "score": "0.5171762", "text": "abstract protected function doProcessing();", "title": "" }, { "docid": "aa141f9523aacac3844a8eedf2611649", "score": "0.51698637", "text": "public function execute()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "40e2ec2ee500fb660806ac6bf1315b77", "score": "0.5143611", "text": "public abstract function Run();", "title": "" }, { "docid": "017967dda0d4ec0d48f8eec194f961cf", "score": "0.51414037", "text": "public function perform();", "title": "" }, { "docid": "b05ecbd567a29646f01224ce6a9dde26", "score": "0.5134741", "text": "public function oneMethod()\n {\n }", "title": "" }, { "docid": "22f0d8e0dd15556da3f9875029ea50a6", "score": "0.51343954", "text": "public function foo(){ \t\n\t\t\n\t}", "title": "" }, { "docid": "800d77629de6084d3d424016bd6cded1", "score": "0.5128987", "text": "public function execute()\n {\n }", "title": "" }, { "docid": "800d77629de6084d3d424016bd6cded1", "score": "0.5128987", "text": "public function execute()\n {\n }", "title": "" }, { "docid": "800d77629de6084d3d424016bd6cded1", "score": "0.5128987", "text": "public function execute()\n {\n }", "title": "" }, { "docid": "800d77629de6084d3d424016bd6cded1", "score": "0.5128987", "text": "public function execute()\n {\n }", "title": "" }, { "docid": "800d77629de6084d3d424016bd6cded1", "score": "0.5128987", "text": "public function execute()\n {\n }", "title": "" }, { "docid": "2e10def3f70f911788b4465183018a58", "score": "0.5128155", "text": "public function execute()\r\n {\r\n }", "title": "" }, { "docid": "7ecb3bae6c0a61e769c818906900bef8", "score": "0.51254827", "text": "abstract function run();", "title": "" }, { "docid": "7ecb3bae6c0a61e769c818906900bef8", "score": "0.51254827", "text": "abstract function run();", "title": "" }, { "docid": "7ecb3bae6c0a61e769c818906900bef8", "score": "0.51254827", "text": "abstract function run();", "title": "" }, { "docid": "f441304cf0cbcee82926095abeaeb932", "score": "0.51207733", "text": "abstract protected function run();", "title": "" }, { "docid": "f441304cf0cbcee82926095abeaeb932", "score": "0.51207733", "text": "abstract protected function run();", "title": "" }, { "docid": "f441304cf0cbcee82926095abeaeb932", "score": "0.51207733", "text": "abstract protected function run();", "title": "" }, { "docid": "4e8eb9540053bdf816fdebd84ac43893", "score": "0.5114808", "text": "abstract public function __call($name,$args);", "title": "" }, { "docid": "889eb2e06d0b722b80d424526353a9e1", "score": "0.5102266", "text": "abstract protected function Interpret();", "title": "" }, { "docid": "ba083e70676663558ae53fcec1704cc8", "score": "0.5093948", "text": "public function doSomethingAwesome()\n {\n }", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.5092757", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.5092757", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.5092757", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.5092757", "text": "abstract public function run();", "title": "" }, { "docid": "4bdae72644702b706d9ec7e0b6b04bc3", "score": "0.5092757", "text": "abstract public function run();", "title": "" } ]
d27ab4466957a53da4e805e0bd8e9f41
funcao construtor da classe
[ { "docid": "851c6d818be844291e4d2028ccfcda81", "score": "0.0", "text": "function cl_processoouvidoriaprorrogacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"processoouvidoriaprorrogacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" } ]
[ { "docid": "3eba9c555f66ff4fdfff258bf6b5829d", "score": "0.80764824", "text": "public function _construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "6bd592f13b99fdb628b00e1854be4490", "score": "0.8013261", "text": "public function _construct()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "ed5e00e5e7b8f176d4970635ecd374c6", "score": "0.80035394", "text": "public function __constructor()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "913c9688628ed3c72f08866551531a5e", "score": "0.79978126", "text": "function __construct()\r\t\t\t{\r\t\t\t}", "title": "" }, { "docid": "544c476e12817d0418be89741da13648", "score": "0.79490113", "text": "function __construct() \n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "de768133532cb9e288771cb9771f2a1e", "score": "0.7937634", "text": "function __construct()\n\t\t\t{\n\n\t\t\t}", "title": "" }, { "docid": "19573a15d00b86a4d6930e5554f0529d", "score": "0.7910304", "text": "public\tfunction\t__construct(){\r\n\t\t}", "title": "" }, { "docid": "54c320efb86f1551671f3677f035e1c2", "score": "0.78991294", "text": "function __construct()\r\n\t\t{\r\n\t\r\n\t\t}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.78932434", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.78932434", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.78932434", "text": "function __construct() {}", "title": "" }, { "docid": "3ee234bb24d6adf2a5b41b78325b3c57", "score": "0.7874291", "text": "function constructor(){\n }", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.78625774", "text": "function __construct(){}", "title": "" }, { "docid": "8bf733928e83ea47b514aec42fd74459", "score": "0.782691", "text": "function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "8bf733928e83ea47b514aec42fd74459", "score": "0.782691", "text": "function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "a4db60350e38cd087ad5f029dfa339ad", "score": "0.782577", "text": "function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a4db60350e38cd087ad5f029dfa339ad", "score": "0.782577", "text": "function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5b764caee4458e246092a640b198429e", "score": "0.78223693", "text": "function __construct(){\r\n\t\t}", "title": "" }, { "docid": "2bb6f663590d95f59792d67ee3a5b9c0", "score": "0.78204775", "text": "public function __construct() {\n // aqui el contructor de la clase \n }", "title": "" }, { "docid": "118907448dea30a99d8ed40203ed8cac", "score": "0.78085786", "text": "public function __construct(){\n\t\t\n\t\t}", "title": "" }, { "docid": "eab05314dee97d3237d06a72762b7633", "score": "0.780436", "text": "public function __construct()\n\t{\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "b2d3b5d1e2c5c5eb37f050b1a362ef72", "score": "0.7797204", "text": "final private function __construct() { }", "title": "" }, { "docid": "3b7061506d352fd059455ee939fcf3f7", "score": "0.7794912", "text": "function __construct (){\n echo \"ini adalah isi method construct </br>\";\n }", "title": "" }, { "docid": "6e412eeeecc728cfc9531940c11e5fac", "score": "0.7794674", "text": "public function __construct()\n\t{\n\t}", "title": "" }, { "docid": "3b3b7c35ea14ca924b874dc76e5eff7a", "score": "0.779204", "text": "function __construct(){\n\t }", "title": "" }, { "docid": "ac977fc5b5b37d3f5f4b66e3824d7f5f", "score": "0.77815616", "text": "public function __construct()\n\t {\n\t //\n\t }", "title": "" }, { "docid": "4a6b4bd755dba30f20b86968ae57b352", "score": "0.77767164", "text": "private function __construct( )\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "5215c877d0440b5e43315f1f137c1206", "score": "0.7767797", "text": "function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.77637684", "text": "private function __construct(){}", "title": "" }, { "docid": "4b349b5d0db42d816079c1f94a426a03", "score": "0.7750885", "text": "function __construct() {\r\n\r\n\t\t}", "title": "" }, { "docid": "e7dd922ddf4b1ac723ee9aeeba11abb7", "score": "0.7749547", "text": "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e7dd922ddf4b1ac723ee9aeeba11abb7", "score": "0.7749547", "text": "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e7dd922ddf4b1ac723ee9aeeba11abb7", "score": "0.7749547", "text": "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "2cd72e642a2bed86e519bbbc6c9c4253", "score": "0.7745494", "text": "function __construct()\n\t{\n\t}", "title": "" }, { "docid": "d051799d4ac2230e0ef8804d723cf4b0", "score": "0.7742173", "text": "public function __construct() {\n\n\n\t\t}", "title": "" }, { "docid": "d051799d4ac2230e0ef8804d723cf4b0", "score": "0.7742173", "text": "public function __construct() {\n\n\n\t\t}", "title": "" }, { "docid": "2bede2056ceba3f1ae4ce818856f7cec", "score": "0.7736786", "text": "public function __construct() // constructor, PHP5 only\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0483931b02bf2110031b1ebed9086eb8", "score": "0.7723349", "text": "public function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "fe871c06850468f6313d05adb0bfb621", "score": "0.77101105", "text": "function __construct(){\n\n\t}", "title": "" }, { "docid": "d954a360842d4f0a77e7d76b8ad0af07", "score": "0.77045894", "text": "public function __construct()\r\n {\r\n \t\r\n }", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.7702783", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.7702783", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "598c503b3a322449166b067a1b29b482", "score": "0.77001476", "text": "function __construct(){\r\n\t}", "title": "" }, { "docid": "49fdd8d48e8fb6dc3f58c2dc54abb74d", "score": "0.76790756", "text": "public function __construct()\r\n\t\t{\r\n \t\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "811091e1c056db4d3ef4ea3f2016724c", "score": "0.7678487", "text": "public function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5d7b74f9e076815e29425df8acedfaf4", "score": "0.7670745", "text": "public function __construct(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "17c44c1961b5f87511f059c3dc8ce3de", "score": "0.7661576", "text": "public function __construct()\n\t{\n\n\t}", "title": "" }, { "docid": "85182905ed5707d84443afc0800c2e20", "score": "0.7658747", "text": "public function __construct(){\r\n\t\t\t\r\n\t\t\t}", "title": "" }, { "docid": "8c58204c10ccad95ec2b8ff75ff9252b", "score": "0.7658298", "text": "protected function _construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "f1821ca60df673bd38805504a744e9fa", "score": "0.76510185", "text": "function __construct() {\n\n\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.7649274", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "d08111efec5e9be82c1f29564465e258", "score": "0.7645591", "text": "public function ___construct(){\n \n }", "title": "" }, { "docid": "06992a9df7655cf159e3e00d07b4d3fa", "score": "0.7642958", "text": "private function __construct ( ) { }", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "6cf510f99cac617621ddb7cf6f86a5b8", "score": "0.76395047", "text": "public function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "88acb03e00ade56c51b4d13a4c78a450", "score": "0.7633727", "text": "private function __construct() {\r\n\t\r\n\t}", "title": "" }, { "docid": "1f7eb58c5f02145ad13e8cc85822ff1a", "score": "0.7632782", "text": "public function __construct()\n\t {\n \n\t \n\t }", "title": "" } ]
15dcb07d30c6c16cd432bb75167291e2
Change table auto increment value
[ { "docid": "8b33e4a260cd5a87d14f8ad825d6c5b9", "score": "0.7754965", "text": "public function changeTableAutoIncrement($tableName, $increment, $schemaName = null);", "title": "" } ]
[ { "docid": "6497a721e95dd857337a9e1a2d5f563b", "score": "0.7416221", "text": "public function resetAutoIncrement()\n {\n return DB::query('ALTER TABLE ' . $this->tablename . ' AUTO_INCREMENT = 1');\n }", "title": "" }, { "docid": "1d98b6f9e14079f715aea3da84ca56b9", "score": "0.7219894", "text": "private function rewriteAutoIncrement(){\n\t\t$_query = preg_replace('/\\\\bauto_increment\\\\b\\\\s*(,)?/ims', ' PRIMARY KEY AUTOINCREMENT $1', $this->getCurrentQuery(), -1, $count);\n\t\tif ($count > 0){\n\t\t\t$this->hasPrimaryKey = true;\n\t\t}\n\t\t$this->addQuery($_query);\n\t}", "title": "" }, { "docid": "1ebf494cbba3df5b0b3fe73793a60e41", "score": "0.7145833", "text": "protected function setAutoIncrementInfo()\n {\n }", "title": "" }, { "docid": "558ed2c411d094e396016c6c7fed4d74", "score": "0.7019124", "text": "private function updateFrom_030000()\n {\n global $user;\n\n $sql=\"ALTER TABLE `\".$this->tables['personalised'].\"` MODIFY COLUMN `id` INTEGER NOT NULL AUTO_INCREMENT;\";\n pwg_query($sql);\n }", "title": "" }, { "docid": "4aadda5465c8be1ef04a79ee00bd0a4b", "score": "0.68916893", "text": "public function pk() {\n\n return $this->table_pk_autoincrement += 1;\n\n }", "title": "" }, { "docid": "8c6a766ce3ccb91698d1fd1e0a5118ce", "score": "0.68457544", "text": "public function defPK($table,$id=\"id\"){\n\t\t\n\t $this->modify .= \"ALTER TABLE \".$table.\" CHANGE \".$id.\" \".$id.\" BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;\";\n\t\t\n\t}", "title": "" }, { "docid": "1a2339bfe74e27acf2b6ad7cf26bf1f1", "score": "0.6709294", "text": "abstract protected function getAutoIncrementColumnName();", "title": "" }, { "docid": "2fc1d07ba00f5ef1e1b89a043a543f42", "score": "0.6693493", "text": "private function reiniciarAutoIncrementador()\r\n {\r\n Log::guardar(\"INF\", \"COLECCION CLASES --> REINICIAR AUTOINCREMENTADOR\");\r\n $consulta = \"ALTER TABLE clase AUTO_INCREMENT = 1\";\r\n return Conexion::getInstancia()->modificar($consulta);\r\n }", "title": "" }, { "docid": "f7c06db9b1f6407bec71268f102cca96", "score": "0.667744", "text": "public function resetDatabaseTablesIncrements()\n {\n $tables = collect(\\DB::select('SHOW TABLES'));\n\n $tables->each(function ($table) {\n $tableName = collect($table)->first();\n\n \\DB::statement(\"ALTER TABLE $tableName AUTO_INCREMENT = 1\");\n });\n }", "title": "" }, { "docid": "f6156db540e4bceaee96e9199c4e6a8c", "score": "0.66386366", "text": "function save_initial_number_of_forecast($value) {\n $forecast_table = $this->db->prefixTable('forecast');\n\n $sql = \"ALTER TABLE $forecast_table AUTO_INCREMENT=$value;\";\n\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "c349120855ca12d698b73aacc579ea00", "score": "0.66127795", "text": "public function resetIdUser($conn){\n $sth = $conn->prepare(\"set @num := 0\");\n $sth->execute();\n $sth = $conn->prepare(\"update utenti set id = @num := (@num+1)\");\n $sth->execute();\n $sth = $conn->prepare(\"alter table utenti auto_increment = 1\");\n $sth->execute();\n }", "title": "" }, { "docid": "635f05dc2a18a4448343246aa364539e", "score": "0.65853864", "text": "function assignAutoincrement($value)\n {\n foreach($this->indexFields as $key=>$field)\n {\n $fType=$field->getType();\n if(is_a($fType,'\\lib\\model\\types\\AutoIncrement'))\n {\n // Important to note: This is done accessing the underlying type directly, on purpose, to avoid\n // the Field to become dirty.\n $fType->set($value);\n $this->model->__setRaw($key,$value);\n }\n }\n }", "title": "" }, { "docid": "67927399bb8c0875254e322402dc9818", "score": "0.65665996", "text": "public function getAutoIncrementValue($table, array $options = array());", "title": "" }, { "docid": "688f060b458e0ce1486b2118d3e66ac8", "score": "0.6533978", "text": "public function getAutoIncrement()\n\t{\n\t\treturn 'rule_id';\n\t}", "title": "" }, { "docid": "c4e2ff4755f3ddd81f34683453c45f29", "score": "0.65121907", "text": "public function auto_increment()\n {\n $auto_increment_index = \" PRIMARY KEY\";\n // don't overwrite primary key by auto_increment\n $query = $this->util->input();\n $table = $query->getTable();\n $fields = $query->getFields();\n $autoIncrementField = $query->getAutoIncrementField();\n if ($table != \"\" && $autoIncrementField) {\n foreach ($this->indexes($table) as $index) {\n if (in_array($fields[$autoIncrementField][\"orig\"], $index[\"columns\"], true)) {\n $auto_increment_index = \"\";\n break;\n }\n if ($index[\"type\"] == \"PRIMARY\") {\n $auto_increment_index = \" UNIQUE\";\n }\n }\n }\n return \" AUTO_INCREMENT$auto_increment_index\";\n }", "title": "" }, { "docid": "e38ca4872f06c1a30b7326de972210ef", "score": "0.64928883", "text": "public static function Orderidgenerate($tbl_name) {\n\t\t$statement = DB::select(\"show table status like '$tbl_name'\");\n\t\treturn $statement[0]->Auto_increment;\n\t}", "title": "" }, { "docid": "f6e3dcbafb6707eb96ae89e4b3a76e75", "score": "0.64730567", "text": "public function get_next_id()\n\t{\n\t\treturn (int) $this->db->select('AUTO_INCREMENT')\n\t\t\t->from('information_schema.TABLES')\n\t\t\t->where('TABLE_NAME', $this->_table)\n\t\t\t->where('TABLE_SCHEMA', $this->db->database)\n\t\t\t->get()\n\t\t\t->row();\n\t}", "title": "" }, { "docid": "6e08d11fd8343cbfbbad89e85dc8f262", "score": "0.6379964", "text": "function dummy_increment() {\n global $master_link;\n \n $query = \"UPDATE $dummyTableName SET n = n + 1\";\n $result = mysqli_query($master_link, $query);\n if( mysqli_errno( $master_link ) != 0 ) {\n echo __LINE__ . ' ' . mysqli_error($master_link);\n exit();\n } \n }", "title": "" }, { "docid": "c0e5352ab9bece4ea9aa7dad017fb0d1", "score": "0.6361294", "text": "public function change()\n {\n $table = $this->table('resource_transfer_headers');\n $table->removeColumn('received_date');\n $table->update();\n $this->execute('ALTER TABLE resource_transfer_headers AUTO_INCREMENT = 3000000');\n }", "title": "" }, { "docid": "2c5c3ae277e129473ebbe6ed3a71fa79", "score": "0.6341036", "text": "public static function getAutoIncrement($table)\n\t{\n\t\t$conf = JFactory::getConfig();\n\t\t$db = JFactory::getDbo();\n\t\t$database = $conf->get('db');\n\n\t\t$query = \"SHOW TABLE STATUS FROM `\" . $database . \"` WHERE name ='\" . $db->getPrefix() . $table . \"'\";\n\n\t\t$db->setQuery($query);\n\t\t$row = $db->loadObject();\n\n\t\treturn $row->Auto_increment;\n\t}", "title": "" }, { "docid": "6a0e16fdbd203877df09edd5be0ad011", "score": "0.6339902", "text": "private function setActualID(){\n\t\tunlink($this->dbpath.\".settings\");\n\t\t$handle = $this->openFile($this->dbpath.\".settings\",\"w\");\n\t\tfputs($handle,\"AUTO_INCREMENT=\".$this->actual_ID);\n\t\t$this->closeFile($handle,$this->dbpath.\".settings\");\n\t}", "title": "" }, { "docid": "95ad4f845ec9b99f2899ff01000407b1", "score": "0.6339444", "text": "public function get_next_id()\n\t{\n\t\treturn (int) $this->db->select('AUTO_INCREMENT')\n\t\t\t->from('information_schema.TABLES')\n\t\t\t->where('TABLE_NAME', 'gallery')\n\t\t\t->where('TABLE_SCHEMA', $this->db->database)->get()->row()->AUTO_INCREMENT;\n\t}", "title": "" }, { "docid": "10d7f45db072c549546a6817ad303a54", "score": "0.63265485", "text": "public function fetchAutoInc ()\n\t{\n\t //$result = $this->_db->query(\"SHOW TABLE STATUS LIKE $this->_name;\");\n\t \n\t \n\t $sql = 'SHOW TABLE STATUS LIKE ' . $this->_db->quote($this->_name, 'string');\n\t //$result = $this->_db->getConnection()->exec($sql);\n\t $result = $this->_db->fetchAll($sql);\n\t Zend_Debug::dump($result[0]['Auto_increment']);\n\t}", "title": "" }, { "docid": "ef63099b9caededd4292365d47c7bd9a", "score": "0.6315574", "text": "function GetNextAutoInc($tablename, $mysql){\n\t$zapytanie=\"show table status like '$tablename'\";\n\t$wynik=mysqli_query($mysql,$zapytanie);\n\tif(!$wynik) {\n\t print 'Nie można wykonać zapytania do bazy.';\n \t exit;\n\t}\n\t$wiersz=mysqli_fetch_row($wynik);\n\treturn $wiersz[10];\n }", "title": "" }, { "docid": "cf18720a3d3d6d47ff7d8bef880dddb8", "score": "0.6295231", "text": "function getNextID($conn, $tableName){\n\n\n $sql = \"SHOW TABLE STATUS LIKE '\".$tableName.\"'\";\n $result=$conn->query($sql);\n $row = $result->fetch_assoc();\n return $row['Auto_increment'];\n\n\n }", "title": "" }, { "docid": "bd499dc6e44a7cca749a0ec7c16f71dd", "score": "0.6292567", "text": "static public function autoNumber(){\n\t\t$id = 0;\t\n\t\t$ReceiptID = Receipt::max('receipt_id');\n\t\tif( $ReceiptID != 0){\n\t\t\t$id = $InvoiceID + 1;\n\t\t\tReceipt::insert(['receipt_id'=>$id]);\n\t\t}else{\n\t\t\t$id = 1;\n\t\t\tReceipt::insert(['receipt_id'=>$id]);\n\t\t}\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "6054e7f6118946cbe2c1c456edcbc86d", "score": "0.62540746", "text": "function db_get_autoincrement($table) {\n $sql = \"SHOW TABLE STATUS FROM `\".DB_NAME.\"` LIKE '$table'\";\n\n $result = db_sql($sql);\n $resultRow = db_fetch_row($result[\"data\"]);\n\n return $resultRow['Auto_increment'];\n}", "title": "" }, { "docid": "848014a5940d5cf0ef22c59387d05757", "score": "0.6193648", "text": "function nextInsertId($table_name)\r\n {\r\n\t\t$query = self::prepare('SHOW TABLE STATUS LIKE :table_name');\r\n\t\t$query->execute(array(':table_name' => $table_name));\r\n\t\tif($result = $query->fetch(PDO::FETCH_ASSOC))\r\n\t\t{\r\n\t\t\treturn $result['Auto_increment'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error('Table '.$table_name.' not found',E_USER_ERROR);\r\n\t\t}\r\n }", "title": "" }, { "docid": "5c1db27f21ebd778a0a5ae84cfb50661", "score": "0.6186814", "text": "public function resetSequence( $table, $value = null )\n {\n if ( $table->sequenceName !== null && is_string( $table->primaryKey ) && $table->columns[$table->primaryKey]->autoIncrement )\n {\n if ( $value === null )\n {\n $value = $this->getDbConnection()->createCommand( \"SELECT MAX({$table->primaryKey}) FROM {$table->rawName}\" )->queryScalar() + 1;\n }\n else\n {\n $value = (int)$value;\n }\n\n $this->getDbConnection()->createCommand( \"ALTER TABLE {$table->rawName} ALTER COLUMN {$table->primaryKey} RESTART WITH $value\" )->execute();\n }\n }", "title": "" }, { "docid": "d2d08d5798e4d2cf6c83ba5341a87848", "score": "0.60714", "text": "public function startAutoIncrement(string $table, int $start = 0)\n {\n $query = $this->forge->startAutoIncrement($this->addPrefixForTableAndColumn($table), $start);\n\n return $this->runExecQuery($query);\n }", "title": "" }, { "docid": "406aad78e51c338ebe0052d23c9d8669", "score": "0.6000697", "text": "public static function getAutoIncrementedId($table) {\n $sql = \"select auto_increment from information_schema.tables where table_schema = '\" . CFG::$db . \"' and table_name = '\" . CFG::$tblPrefix . $table . \"'\";\n $data = DB::queryFirstRow($sql);\n return (int) $data['auto_increment'];\n }", "title": "" }, { "docid": "64a7f0e1451ea207bbb0fe857baa71c2", "score": "0.5974853", "text": "public function change()\n {\n $sql = \"create table `xl_strategy_ad`(\nid int(10) unsigned not null auto_increment PRIMARY key,\nad_id int(10) unsigned not null default 0 comment'广告Id ',\nstrategy_id int(10) unsigned not null default 0 comment'策略ID',\nstatus tinyint(1) not null default 1 comment'是否开启:0否,1是'\n)engine=innodb default charset=utf8\";\n \\think\\Db::execute($sql);\n }", "title": "" }, { "docid": "ffb5d5f9f48ec8a3f9f4d60c100358cd", "score": "0.5970045", "text": "function next_ID($table)\n{\n\t$sql = \"SELECT * FROM $table\";\n\t$result = $db->Query($sql);\n\t$cnt = $db->NumRows($result);\n\tif ($cnt == 0)\n\t{\n\t\treturn 1;\n\t} else {\n\t\t$col = $db->ColumnName($result, 0);\n\t\t$sql = \"SELECT MAX(\" . $col . \") as last_id FROM \" . $table;\n\t\t$result = $db->Query($sql);\n\t\t$row = $db->FetchRow($result);\n\t\t$new_id = $row[last_id] + 1;\n\t\treturn $new_id;\n\t}\n}", "title": "" }, { "docid": "178e8ec0a7037fe203c07c4c699f966b", "score": "0.5968436", "text": "protected function createTable()\n {\n $schema = $this->db->createSchema();\n $schema->create($this->table)\n ->int('id')->increment()\n ->varchar('key', 255)\n ->text('value')\n ->primary('id');\n\n $this->db->query($schema);\n }", "title": "" }, { "docid": "4ddc6c19392c7a2349dd3157a0c50649", "score": "0.59652007", "text": "public function addAutoIncrement(string $table, string $column = 'id', int $start = NULL)\n {\n if( $start !== NULL )\n {\n $this->startAutoIncrement($table, $start);\n }\n\n return $this->modifyColumn($table, [$column => [($db = Singleton::class('ZN\\Database\\DB'))->int(), $db->autoIncrement()]]);\n }", "title": "" }, { "docid": "d701f0aebaaaf7b18b163d9e9d130d4a", "score": "0.5958982", "text": "public function getIncrementId();", "title": "" }, { "docid": "5fd56c76b89574b96d2cee7f80214598", "score": "0.5893631", "text": "function getNewId($table)\n{\n $getMaxId = getDb()->prepare(\"SELECT MAX(id) FROM $table\");\n $getMaxId->execute();\n $maxId = $getMaxId->fetch();\n return $maxId[0] + 1;\n}", "title": "" }, { "docid": "829721ed99ab7f648796a78ec303ffad", "score": "0.5885662", "text": "function _getNewID($table){\n$newid=mysql_query(\"SELECT id FROM `\"._mysql_prefix.\"-\".$table.\"` ORDER BY id DESC LIMIT 1\");\nif(mysql_num_rows($newid)==0){return 1;}\nelse{$newid=mysql_fetch_array($newid); return ($newid['id']+1);}\n}", "title": "" }, { "docid": "ca7d297ae661d633780d21252e3f437f", "score": "0.5816313", "text": "public function change()\n {\n $table = $this->table('activities');\n $table->addColumn('home_page', 'integer',['default' => 0])\n ->update();\n $inquiry = $this->table('inquiries');\n $inquiry->addColumn('home_page', 'integer',['default' => 0])\n ->update();\n }", "title": "" }, { "docid": "c48b4afbc7b593e2b97bdbbede70889f", "score": "0.57678777", "text": "public function change()\n {\n // create the table\n $table = $this->table('users', array('id' => false, 'primary_key' => 'id'));\n $table->addColumn('id', 'integer', array('identity' => true))\n ->addColumn('first_name', 'string')\n ->addColumn('last_name', 'string')\n ->addColumn('mobile', 'string')\n ->addColumn('email', 'string')\n ->addColumn('unit', 'string', array('null' => true))\n ->addColumn('birth_date', 'date', array('null' => true))\n ->addColumn('about_me', 'string', array('null' => true))\n ->addColumn('experience', 'string', array('null' => true))\n ->addColumn('external_web_site', 'string', array('null' => true))\n ->addColumn('created_at', 'timestamp');\n\n $table->addIndex(array('mobile'), array('unique' => true));\n $table->create();\n\n }", "title": "" }, { "docid": "b140289ec7a766f6e1e8bf89512c42f9", "score": "0.5757125", "text": "private function getNextPrimaryKey() {\n $result = DBQuerrier::queryUniqueValue($this->innerPrimaryKeyQuery);\n $row = @ mysqli_fetch_array($result);\n $max = $row[\"MAX(\" . $this->primaryKey . \")\"] + 1;\n $numRows = $this->innerInsertQuery->getNumRows();\n $values = array();\n for ($i = 0; $i < $numRows; $i++) {\n array_push($values, DBValue::nonStringValue($max + $i));\n }\n $this->primaryKeyValues = $values;\n $this->innerInsertQuery->addParamAndValues($this->primaryKey, $values);\n }", "title": "" }, { "docid": "bc36e158b87a24485fa55f1913e14e6c", "score": "0.575266", "text": "public function change()\n {\n $table = $this->table('mahasiswa', array('id' => 'id'));\n $table->addColumn('nama', 'string', array('null' => true));\n $table->addColumn('alamat', 'string', array('null' => true));\n $table->addColumn('email', 'string', array('null' => true));\n $table->addColumn('phone', 'string', array('null' => true));\n $table->addIndex(array('id'));\n $table->save();\n }", "title": "" }, { "docid": "2075e26cd7b88b404798d7f4231746db", "score": "0.5751861", "text": "public function setRowNumber(){\n $sql = \"select rowNumber from \".$this->tableNameNode.\" order by rowNumber desc limit 1\";\n $result = $this->mysql->getConnection()->query($sql);\n\n if($result->num_rows==0)\n $this->rowNumber = 1;\n else{\n $obj = $result->fetch_object();\n $this->rowNumber = $obj->rowNumber+1;\n }\n }", "title": "" }, { "docid": "3a51beadd53f51eb59350bd231bc18c7", "score": "0.5741662", "text": "protected function assignIncrement(&$model)\n {\n $lastInsertedId = $this->getGateway()->getLastInsertValue();\n if ($lastInsertedId && ($increment = $this->autoIncrement)) {\n if (is_object($model)) {\n $model->$increment = $lastInsertedId;\n } elseif (is_array($model)) {\n $model[$increment] = $lastInsertedId;\n }\n }\n }", "title": "" }, { "docid": "f0dec95727eb41134a41780989260110", "score": "0.5734673", "text": "protected function _get_new_table_id() {\n\t\t$tables = $this->tables->get();\n\t\t// Need to check new ID candidate in a loop, because a higher ID might already be in use, if a table ID was changed manually.\n\t\tdo {\n\t\t\t$tables['last_id'] ++;\n\t\t} while ( $this->table_exists( $tables['last_id'] ) );\n\t\t$this->tables->update( $tables );\n\t\treturn (string) $tables['last_id'];\n\t}", "title": "" }, { "docid": "ab5d9d2b21c52791808793245ae34a06", "score": "0.572506", "text": "public function setOldPrimaryKey($value)\n {\n $this->_pk=$value;\n }", "title": "" }, { "docid": "6ec86e84ac4a24dabba0914804eb136f", "score": "0.5715857", "text": "public function change()\n {\n $table = $this->table('productos', ['id' => false, 'primary_key' => ['idProducto']]);\n $table->addColumn('idProducto', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => false,\n ]);\n $table->addColumn('nombreProducto', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => false,\n ]);\n $table->addColumn('tipo', 'integer', [\n 'default' => null,\n 'null' => false,\n ]);\n //$table->addColumn('imagen', 'blob', [\n // 'default' => null,\n // 'null' => false,\n //]);\n $table->addColumn('precio', 'integer', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('descripcion', 'text', [\n 'default' => null\n ]);\n $table->addColumn('fabricante', 'string', [\n 'default' => null,\n 'limit' => 100,\n 'null' => false,\n ]);\n $table->create();\n }", "title": "" }, { "docid": "a479b21d5162d6fe7f40929987ad8865", "score": "0.5709751", "text": "public function AutoIncrementedValueSet()\n{\n$ele['type']='AutoIncrementedValueSetType';\nreturn $ele;\n}", "title": "" }, { "docid": "1b68a7661a7be89e5598e91907c4920d", "score": "0.5706284", "text": "private function addAutoIncrementField( $db, $tableName, $autoIncrementFieldName, $autoIncrementFieldType )\n {\n // fetching field info from Oracle, getting column position of autoincrement field\n\n // @apichange This code piece would become orphan, with the new \n // implementation. We still need it to drop the old sequences.\n // Remove until --END-- to not take care of them.\n $resultArray = $db->query( \"SELECT a.column_name AS field, \" . \n \" a.column_id AS field_pos \" .\n \"FROM user_tab_columns a \" .\n \"WHERE a.table_name = '{$tableName}' AND a.column_name = '{$autoIncrementFieldName}'\" .\n \"ORDER BY a.column_id\" );\n $resultArray->setFetchMode( PDO::FETCH_ASSOC );\n\n if ( count( $resultArray) != 1 )\n {\n return;\n }\n\n $result = $resultArray->fetch();\n $fieldPos = $result['field_pos'];\n\n // emulation of autoincrement through adding sequence, trigger and constraint\n $oldName = ezcDbSchemaOracleHelper::generateSuffixCompositeIdentName( $tableName, $fieldPos, \"seq\" );\n $oldNameTrigger = ezcDbSchemaOracleHelper::generateSuffixCompositeIdentName( $tableName, $fieldPos, \"trg\" );\n $sequence = $db->query( \"SELECT sequence_name FROM user_sequences WHERE sequence_name = '{$oldName}'\" )->fetchAll();\n if ( count( $sequence) > 0 )\n {\n // assuming that if the seq exists, the trigger exists too\n $db->query( \"DROP SEQUENCE \\\"{$oldName}\\\"\" );\n $db->query( \"DROP TRIGGER \\\"{$oldNameTrigger}\\\"\" );\n }\n // --END--\n\n // New sequence names, using field names\n $newName = ezcDbSchemaOracleHelper::generateSuffixCompositeIdentName( $tableName, $fieldPos, \"seq\" );\n $newNameTrigger = ezcDbSchemaOracleHelper::generateSuffixCompositeIdentName( $tableName, $fieldPos, \"seq\" );\n // Emulation of autoincrement through adding sequence, trigger and constraint\n $sequences = $db->query( \"SELECT sequence_name FROM user_sequences WHERE sequence_name = '{$newName}'\" )->fetchAll();\n if ( count( $sequences ) > 0 )\n {\n $db->query( \"DROP SEQUENCE \\\"{$newName}\\\"\" );\n }\n\n $db->exec( \"CREATE SEQUENCE \\\"{$newName}\\\" start with 1 increment by 1 nomaxvalue\" );\n $db->exec( \"CREATE OR REPLACE TRIGGER \\\"{$newNameTrigger}\\\" \".\n \"before insert on \\\"{$tableName}\\\" for each row \".\n \"begin \".\n \"select \\\"{$newName}\\\".nextval into :new.\\\"{$autoIncrementFieldName}\\\" from dual; \".\n \"end;\" );\n\n $constraintName = ezcDbSchemaOracleHelper::generateSuffixedIdentName( array( $tableName ), \"pkey\" );\n $constraint = $db->query( \"SELECT constraint_name FROM user_cons_columns WHERE constraint_name = '{$constraintName}'\" )->fetchAll();\n if ( count( $constraint) > 0 )\n {\n $db->query( \"ALTER TABLE \\\"$tableName\\\" DROP CONSTRAINT \\\"{$constraintName}\\\"\" );\n }\n $db->exec( \"ALTER TABLE \\\"{$tableName}\\\" ADD CONSTRAINT \\\"{$constraintName}\\\" PRIMARY KEY ( \\\"{$autoIncrementFieldName}\\\" )\" );\n $this->context['skip_primary'] = true;\n }", "title": "" }, { "docid": "84184205d14df1600fab186043d608d7", "score": "0.5686352", "text": "public function change()\n {\n $sql = \"create table `xl_sdk`(\n id int(11) unsigned not null auto_increment PRIMARY key,\n title varchar(80) not null default '' comment'名称',\n start_path varchar(200) not null default '' comment'启动路径',\n start_class varchar(200) not null default '' comment'启动类名',\n create_time int(11) unsigned not null default 0 comment'创建时间',\n update_time int(11) unsigned not null default 0 comment'更新时间'\n )engine=innodb default charset utf8\";\n\n \\think\\Db::execute($sql);\n }", "title": "" }, { "docid": "82e73a03851f959387978f09d4717b39", "score": "0.56841236", "text": "public function setSequenceId($table_name, $id) {\n\t\t$seq_name = $this->getSequenceName($table_name);\n\t\t\n\t\t$this->exec(\"UPDATE $seq_name SET ID='$id'\");\n\t}", "title": "" }, { "docid": "84334531a8f9f928545ebdf949a2b7d0", "score": "0.5681382", "text": "public function change()\n {\n $table = $this->table('componente_consolas', ['id' => false, 'primary_key' => ['idComponente', 'idConsola']]);\n $table->addColumn('idComponente', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => false,\n ]);\n $table->addForeignKey('idComponente', 'componentes', 'idComponente', array('delete' => 'NO_ACTION', 'update' => 'CASCADE'));\n \n $table->addColumn('idConsola', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => false,\n ]);\n $table->addForeignKey('idConsola', 'consolas', 'idConsola', array('delete' => 'NO_ACTION', 'update' => 'CASCADE'));\n $table->create();\n }", "title": "" }, { "docid": "51e427dc06e5f40a45e3651767580904", "score": "0.56790656", "text": "public function candidate_asset_auto_id($tbl,$desc_fld,$auto_incr_fld)\n\t{\n\t\t\n\t\t$tbl= TableRegistry::get($tbl);\n\n\t\t// $data = $tbl->find(\"all\")->where([\"asset_group\"=>$group_id])->order([\"{$desc_fld}\"=>\"DESC\"])->limit(1)->hydrate(false)->toArray();\n\t\t\n\t\t$data = $tbl->find(\"all\")->order([\"{$desc_fld}\"=>\"DESC\"])->limit(1)->hydrate(false)->toArray();\n\n\n\t\tif(!empty($data))\n\t\t{\n\t\t\t$auto_fld = $data[0][\"{$auto_incr_fld}\"];\n\t\t\t$split = explode(\"-\",$auto_fld);\n\t\t\t$find = sizeof($split) - 1;\n\t\t\t$last_id = $split[$find];\n\t\t\t$last_number = (int) $last_id;\n\t\t\t$new_no = $last_number + 1;\t\n\n\t\t\t/* $new_id = str_ireplace(\"{$last_number}\",\"{$new_no}\",$last_id); */\n\t\t}else{\n\t\t\t$new_no = 1;\n\t\t}\n\t\treturn $new_no;\n\t}", "title": "" }, { "docid": "aaaaa9dccf84897612496fefb3a3f3f8", "score": "0.5647372", "text": "public function getAutoIncrementAttribute($model)\n {\n return $this->_readMetaData($model)[Db::METADATA_AUTO_INCREMENT_KEY];\n }", "title": "" }, { "docid": "649e682d2617103801c6607837dd67c0", "score": "0.56260186", "text": "public function nextId($seq_name, $onDemand = true) {\n\t\t$seqname = $this->getSequenceName($seq_name);\n //do {\n //$repeat = 0;\n try {\n \t$nbAff = $this->exec('UPDATE ' . $seqname\n . ' SET id = LAST_INSERT_ID(id + 1)');\n } catch (PDOException $e) {\n \tif ($e->getCode() == '42S02' && $onDemand) {\n // ONDEMAND TABLE CREATION\n $result = $this->createSequence($seq_name);\n\n return 1;\n \t} else {\n \t\tthrow $e;\t\n \t}\n }\n /*$errCode = PDO::errorCode();\n var_dump($errCode);\n exit;\n $this->popErrorHandling();\n if ($result === DB_OK) {\n // COMMON CASE\n $id = @mysqli_insert_id($this->connection);\n if ($id != 0) {\n return $id;\n }\n\n // EMPTY SEQ TABLE\n // Sequence table must be empty for some reason,\n // so fill it and return 1\n // Obtain a user-level lock\n $result = $this->getOne('SELECT GET_LOCK('\n . \"'${seqname}_lock', 10)\");\n if (DB::isError($result)) {\n return $this->raiseError($result);\n }\n if ($result == 0) {\n return $this->mysqliRaiseError(DB_ERROR_NOT_LOCKED);\n }\n\n // add the default value\n $result = $this->query('REPLACE INTO ' . $seqname\n . ' (id) VALUES (0)');\n if (DB::isError($result)) {\n return $this->raiseError($result);\n }\n\n // Release the lock\n $result = $this->getOne('SELECT RELEASE_LOCK('\n . \"'${seqname}_lock')\");\n if (DB::isError($result)) {\n return $this->raiseError($result);\n }\n // We know what the result will be, so no need to try again\n return 1;\n\n } elseif ($ondemand && DB::isError($result) &&\n $result->getCode() == DB_ERROR_NOSUCHTABLE)\n {\n // ONDEMAND TABLE CREATION\n $result = $this->createSequence($seq_name);\n\n // Since createSequence initializes the ID to be 1,\n // we do not need to retrieve the ID again (or we will get 2)\n if (DB::isError($result)) {\n return $this->raiseError($result);\n } else {\n // First ID of a newly created sequence is 1\n return 1;\n }\n\n } elseif (DB::isError($result) &&\n $result->getCode() == DB_ERROR_ALREADY_EXISTS)\n {\n // BACKWARDS COMPAT\n // see _BCsequence() comment\n $result = $this->_BCsequence($seqname);\n if (DB::isError($result)) {\n return $this->raiseError($result);\n }\n $repeat = 1;\n }\n } while ($repeat);\n\n return $this->raiseError($result);*/\n\t}", "title": "" }, { "docid": "20d71627b49413d126f368eb50525de2", "score": "0.56230646", "text": "public function incrIdLeader($increment) {\n $this->setIdLeader($this->getIdLeader() + $increment);\n }", "title": "" }, { "docid": "e2800da09232305da581eec8fe2bc6fb", "score": "0.5565384", "text": "public function change()\n {\n $table = $this->table(\"usuarios\");\n $table->addColumn('clave','string',array('limit' => 255 , 'null' => false ))\n ->addColumn('estatus','string',array('limit' => 20 , 'null' => false ))\n ->addColumn('intentos','integer',array('null' => false , 'signed' => 'disabled'))\n ->addColumn('nivel','integer',array('null' => false , 'signed' => 'disabled'))\n ->addColumn('created','datetime')\n ->addColumn('modified','datetime')\n ->create();\n }", "title": "" }, { "docid": "9db4e8e3f25e766d25d5356ecd8af3e7", "score": "0.5562812", "text": "function GetAutoIncrementId() {\n // Returns the value generated for an AUTO_INCREMENT column by the previous INSERT\n return mysqli_insert_id($this->c_ConnectStat);\n }", "title": "" }, { "docid": "8ad9496fa5854728fc37a78528d22201", "score": "0.55595404", "text": "public function generateNumeration() {\n $_this_id = \"\" . $this->id;\n $number = date(\"y\") . \"_\";\n \n if(strlen($_this_id)<5) {\n\n for ($x = 0; $x <= (5-strlen($_this_id)); $x++) {\n $number .= \"0\";\n }\n $number .= $this->id;\n }\n $this->number = $number;\n $this->save();\n }", "title": "" }, { "docid": "ce1e73794bc68423133a33c240c79755", "score": "0.55565757", "text": "public function insertIntoDB()\n\t{\n\t\t$row = $this->getRowDictionary();\n\t\tunset($row[$this->pk_name]); //we don't want to set the ID\n\t\t$this->pk = $this->db->insertRow($row);\n\t}", "title": "" }, { "docid": "8594643a9924c7ddbb58137ffd7737a6", "score": "0.5555981", "text": "public function next_id()\n {\n $this->_id = self::getID();\n }", "title": "" }, { "docid": "b61904fd6f11c63edbe9f41da3798a6b", "score": "0.55546147", "text": "private function getNewIdContato(){\n $sqlStmt = “SELECT MAX(ID) AS ID FROM {$this->tabela}”;\n try {\n $operacao = $this->instanciaConexaoPdoAtiva->prepare($sqlStmt);\n if($operacao->execute()) {\n if($operacao->rowCount() > 0){\n $getRow = $operacao->fetch(PDO::FETCH_OBJ);\n $idReturn = (int) $getRow->ID + 1;\n return $idReturn;\n } else {\n throw new Exception(“Ocorreu um problema com o banco de dados”);\n exit();\n }\n } else {\n throw new Exception(“Ocorreu um problema com o banco de dados”);\n exit();\n }\n } catch (PDOException $excecao) {\n echo $excecao->getMessage();\n }\n }", "title": "" }, { "docid": "8cf9d352389aede39cc53a141254275a", "score": "0.554967", "text": "private function hasAutoIncrement ()\n {\n return $this->table_desc->hasAutoIncrement(); \n }", "title": "" }, { "docid": "63c6b8b170ac90a75d5107c7b5f0fd14", "score": "0.55325395", "text": "public function getAutoIncrementPk() {\n if (!$this->autoIncrementPkColumn) {\n $pkColumns = $this->databaseConnection->getTableMetaData($this->tableName)->getPrimaryKeyColumns();\n foreach ($pkColumns as $pkColumn) {\n if ($pkColumn->isAutoIncrement())\n $this->autoIncrementPkColumn = $pkColumn->getName();\n }\n\n }\n return $this->autoIncrementPkColumn;\n }", "title": "" }, { "docid": "921cef8342447c7509ed4b61adc188e1", "score": "0.55244565", "text": "function otherpageKategori_CreateID( $tbl_otherpagekategori ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_otherpagekategori ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "title": "" }, { "docid": "541a811e936c591a5cb0c7fa40e84b1c", "score": "0.5520922", "text": "private function generateAutomaticID()\n\t{\n\t\t$this->_flags &= ~self::IS_ID_SET;\n\t\tif(!isset($this->_namingContainer->_rf[self::RF_NAMED_CONTROLS_ID]))\n\t\t\t$this->_namingContainer->_rf[self::RF_NAMED_CONTROLS_ID]=0;\n\t\t$id=$this->_namingContainer->_rf[self::RF_NAMED_CONTROLS_ID]++;\n\t\t$this->_id=self::AUTOMATIC_ID_PREFIX . $id;\n\t\t$this->_namingContainer->clearNameTable();\n\t}", "title": "" }, { "docid": "8cc3750be544d7dab78a44aaae6411e4", "score": "0.5519381", "text": "public function change()\n {\n $table = $this->table('itens');\n $table->addColumn('order_id', 'integer', [\n 'null' => false,\n ]);\n $table->addColumn('product_id', 'integer', [\n 'null' => true,\n ]);\n $table->addColumn('amount', 'integer', [\n 'null' => false,\n ]);\n $table->addColumn('unitary_value', 'decimal', [\n 'null' => false,\n ]);\n $table->addColumn('total_value', 'decimal', [\n 'null' => false,\n ]);\n $table->addIndex(['order_id']);\n $table->addIndex(['product_id']);\n $table->addForeignKey('order_id', 'orders', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE']);\n $table->addForeignKey('product_id', 'products', 'id', ['delete'=> 'SET NULL', 'update'=> 'SET NULL']);\n $table->create();\n }", "title": "" }, { "docid": "86afc660cdbcf4836175f6408f387db6", "score": "0.5515546", "text": "public function getNextid(): int\n {\n }", "title": "" }, { "docid": "22523542ae2c2c0841b13186ee202be5", "score": "0.5512014", "text": "public function newInvoiceNum(){\n //get last record\n $lastid = Sale::latest()->first();\n $lastInvoiceNum[1]=0;///for first time insert\n if($lastid){\n $lastInvoiceNum = explode('S', $lastid->inv_no); \n } \n //increase 1 with last invoice number\n $increment= $lastInvoiceNum[1]+1; \n \n return date('Ymd').\"S\".$increment;\n }", "title": "" }, { "docid": "a2174bfc947e3327c5f211f6debd65af", "score": "0.55063593", "text": "function updateCounter($id, $key_column ,$update_column, $table)\n\t{\n\t\t$update\t= \"UPDATE \".$table.\" SET \".$update_column.\" = \".$update_column.\" + 1 WHERE \".$key_column.\"= \".$id.\"\";\n\t\t$query = mysql_query($update);\n\t\t\n\t}", "title": "" }, { "docid": "5bc242033232aa72351ffc6938834a8e", "score": "0.54995704", "text": "public function generateId($field,$table,$prefix){\n $last_id = $this->getLastId($field,$table);\n if ($last_id==0){\n $id = sprintf(\"%s%'.07d\",$prefix,1);\n return $id;\n }\n else{\n $last_id = $last_id+1;\n $id = sprintf(\"%s%'.07d\",$prefix,$last_id);\n return $id;\n }\n }", "title": "" }, { "docid": "b0563a769e1cf63746a5ace6baff3ef4", "score": "0.54959464", "text": "public function generatenewidStokMasuk()\n {\n \t// mengambil seluruh isi tabel\n $temp = $this->findAll();\n // mengambil row terakhir \n $last = end($temp); \n\n // jika $last kosong (jika tabel masih kosong)\n if ($last == Null){\n // mengenerate id baru dengan nilai 1\n $new_id = 1;\n }else{\n // mengenerate id baru dengan nilai id terakhir + 1\n $new_id = $last['id_stok_masuk']+1;\n }\n\n // mengembalikan nilai \n return $new_id;\n }", "title": "" }, { "docid": "c036113090ae5b642e440af7abbf499e", "score": "0.54767096", "text": "private function Insert()\n {\n $row = $this->GetRow();\n unset($row[$this->PrimaryKey]);\n $this->ExecuteSQL(\"INSERT INTO \" . $this->TableName . ' (' . implode(', ', array_keys($row)) . ') ' . 'VALUES (' . implode(', ', array_values($row)) . ')');\n $this->{$this->PrimaryKey} = $this->InsertID;\n $this->State = \"U\";\n return $this->InsertID;\n }", "title": "" }, { "docid": "f3389ffddc6814dd78fba8a0f905b350", "score": "0.54718876", "text": "public function getIdent()\n {\n\treturn PerfORM::AutoField;\n }", "title": "" }, { "docid": "524c0275fdab657c756edc80833745b8", "score": "0.5471591", "text": "function module_name_update_7001() {\n $table = 'new_table';\n $schema = module_name_schema();\n if (!db_table_exists($table)) {\n db_create_table($table, $schema[$table]);\n }\n}", "title": "" }, { "docid": "a3f683b059e3cccd21a3c0bfef7fd13f", "score": "0.54480314", "text": "public function hasAutoIncrements(): ColumnBag\n {\n $this->autoincrement = true;\n\n return $this;\n }", "title": "" }, { "docid": "6e2e149f76994c01ca9362144c345f83", "score": "0.54471254", "text": "private function setID() {\n $sql = 'SELECT MAX(id) as id FROM ' . $this->useTable . ';';\n $this->conn->query($sql);\n $this->conn->execute();\n $this->array = $this->conn->fetch();\n $this->id = $this->array['id'];\n $this->array = array();\n }", "title": "" }, { "docid": "4164a2def83d52bf216b86a0102a02b8", "score": "0.5438941", "text": "public function generateKey(Model $model): int\n {\n $lastResult = $model->newQuery()->orderBy($model->getPrimaryKey(), 'desc')->first();\n if (!empty($lastResult)) {\n return $lastResult->{$model->getPrimaryKey()} + 1;\n }\n return 1;\n }", "title": "" }, { "docid": "e222daf757d932ac2db174e717c7bfc2", "score": "0.54346657", "text": "function get_next_id() {\n\t\t//$query = \"select count(*) as num from ec_qunfas\";\n\t\t//$result = $this->db->query($query);\n\t\t//$num = $this->db->query_result($result,0,'num') + 1;\n\t\t$num = $this->db->getUniqueID(\"ec_qunfas\");\n\t\tif($num > 99) return $num;\n\t\telseif($num > 9) return \"0\".$num;\n\t\telse return \"00\".$num;\n\t}", "title": "" }, { "docid": "647300d7e7be62c0e866ba4ae1260a66", "score": "0.54170036", "text": "protected function _createKey() {\n return new PapayaDatabaseRecordKeyAutoincrement('id');\n }", "title": "" }, { "docid": "326d8ddb34f9569d09db912d2579974b", "score": "0.54099286", "text": "public function change()\n {\n $table = $this->table( 'CONTACT_XTENDED_REL_TYPES',\n [ 'id'=>false,\n 'primary_key'=>['XTENDED_ID', 'TYPE_NAME']\n ] );\n $table ->addColumn('XTENDED_ID', 'integer')\n ->addColumn('TYPE_NAME', 'string', ['limit'=>20])\n ->addForeignKey( 'XTENDED_ID', 'CONTACT_XTENDED', 'XTENDED_ID',\n [ 'delete'=>'CASCADE',\n 'update'=>'CASCADE'\n ])\n ->create();\n }", "title": "" }, { "docid": "fb74ffab57ac74224132bae3ac190b71", "score": "0.5404408", "text": "public function nextid()\n {\n $this->ref = self::getID();\n }", "title": "" }, { "docid": "af11958a91dfd374e5a0ed69605e7cdb", "score": "0.5400625", "text": "public function autoIncrement($autoIncrement = true)\n\t{\n\t\t$this->autoIncrement = $autoIncrement;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "86e4e00861b268090a78f05b1de18fc5", "score": "0.5397305", "text": "public function createTableSequence( $schemaName, $tableName )\n {\n\n if (!$schemaName)\n $schemaName = $this->schemaName;\n\n $seqName = $schemaName.'.'.$tableName.'_rowid_seq';\n\n $createSql = <<<SQL\nCREATE SEQUENCE {$seqName}\n INCREMENT 1\n MINVALUE 1\n MAXVALUE 9223372036854775807\n START 1\n CACHE 1;\n\nSQL;\n\n $alterSql = \"ALTER TABLE {$seqName} OWNER TO {$this->owner};\";\n\n if ($this->createPatch) {\n $this->sqlPatch .= $createSql.NL;\n $this->sqlPatch .= $alterSql.NL;\n }\n\n if ($this->syncDb) {\n $this->db->exec($createSql);\n $this->db->exec($alterSql);\n }\n\n\n }", "title": "" }, { "docid": "43641d0f350098ff9809d2f5fcedf3f8", "score": "0.5395997", "text": "function newsItem_CreateID( $tbl_news ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_news ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "title": "" }, { "docid": "0775805ecc1d10f14a46c1335fc8731c", "score": "0.53941244", "text": "function AddTablePrimaryKey($table,$field)\n{\n include(\"cdash/config.php\");\n add_log(\"Adding primarykey $field to $table\",\"AddTablePrimaryKey\");\n if($CDASH_DB_TYPE == \"pgsql\")\n {\n pdo_query(\"ALTER TABLE \\\"\".$table.\"\\\" ADD PRIMARY KEY (\\\"\".$field.\"\\\")\");\n }\n else\n {\n pdo_query(\"ALTER TABLE \".$table.\" ADD PRIMARY KEY ( \".$field.\" )\");\n }\n //add_last_sql_error(\"AddTablePrimaryKey\");\n add_log(\"Done adding primarykey $field to $table\",\"AddTablePrimaryKey\");\n}", "title": "" }, { "docid": "797c82bf8798a719b237c0dd74435f53", "score": "0.53750086", "text": "function generate_id($table_name = ''){\n $id = substr($table_name, 0, 3).time().uniqid();\n return $id;\n \n }", "title": "" }, { "docid": "0183871b5d4db5fe95f86ad7a32a332d", "score": "0.53743273", "text": "function serialCol(Table $table, $name) {\n\tintCol($table, $name, true, 11, null, true);\n}", "title": "" }, { "docid": "dfefd7771870ad0acdbfbb8fff0def1a", "score": "0.537277", "text": "public function pk($name=\"id\"){\n\t\t$this->addColumn($name,'pk');\n\t}", "title": "" }, { "docid": "7b61f3c57ff9d8d47b85b2400d239ee9", "score": "0.53694546", "text": "public function change()\n {\n $table = $this->table('customers');\n $table->addColumn('first_name', 'string', [\n 'default' => null,\n 'limit' => 45,\n 'null' => false,\n ]);\n $table->addColumn('last_name', 'string', [\n 'default' => null,\n 'limit' => 45,\n 'null' => false,\n ]);\n $table->addColumn('email', 'string', [\n 'default' => null,\n 'limit' => 45,\n 'null' => false,\n ]);\n $table->addColumn('tel', 'string', [\n 'default' => null,\n 'limit' => 45,\n 'null' => false,\n ]);\n $table->addColumn('address', 'string', [\n 'default' => null,\n 'limit' => 45,\n 'null' => false,\n ]);\n $table->create();\n }", "title": "" }, { "docid": "6a2ce74edd9c6b3f1a5db7fc48ed418b", "score": "0.5365286", "text": "public function updateId() {\n\n\t\t$this->id = time();\n\n\t}", "title": "" }, { "docid": "b299a63c1365533ea45bd0b4a6421cb8", "score": "0.53601", "text": "function UsersTokens_CreateID( $tbl_userstokens ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_userstokens ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "title": "" }, { "docid": "b45f15779d813f2dc91fc5b1ae5bbdb3", "score": "0.5358843", "text": "public function run()\n {\n $now = Carbon\\Carbon::now();\n DB::table('store_soketoan')->insert(\n [\n [ 'id' => '1', 'ma_soketoan' => '201803', 'ngay_batdau' => $now, 'ngay_ketthuc' => null, 'ngay_khoaso' => null, 'created_at' => $now],\n ]\n );\n\n DB::statement('ALTER TABLE `store_soketoan` AUTO_INCREMENT=1;');\n }", "title": "" }, { "docid": "b2265a452d6f6e753dc093ac6e5de957", "score": "0.53587294", "text": "public function compileAutoIncrement(Field $field)\n\t{\n\t\tif ($field->get('increment'))\n\t\t{\n\t\t\treturn 'AUTO_INCREMENT ';\n\t\t}\n\t}", "title": "" }, { "docid": "0685b68f22e05050745e27f1cfd3fc65", "score": "0.5355146", "text": "public function safeUp()\n {\n $this->createTable('tbl_order_data',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"order_id\" => \"integer\",\n \"item_id\" => \"integer\",\n \"count\" => \"integer\"\n ]\n );\n }", "title": "" }, { "docid": "4bd5d82e6c454073012e6385b725ff72", "score": "0.5351818", "text": "function _generateNextId()\n\t{\n\t\treturn $this->db->nextId(\"Stats\", true);\n\t}", "title": "" }, { "docid": "934af03986ab8882b8b00a3db4a8d8c1", "score": "0.5349829", "text": "public function changePrimaryKey(Table $table, $newColumns);", "title": "" }, { "docid": "f7e5f13adbc74f47cf58dd96ed6d5e4e", "score": "0.53454316", "text": "public function resetSequence($table, $value = null)\n\t{\n\t\tif ($table->sequenceName !== null) {\n\t\t\tif ($value === null) {\n\t\t\t\t$value = $this->connection->createCommand(\"SELECT MAX(`{$table->primaryKey[0]}`) FROM {$table->quotedName}\")->queryScalar();\n\t\t\t} else {\n\t\t\t\t$value = (int)$value - 1;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// it's possible sqlite_sequence does not exist\n\t\t\t\t$this->connection->createCommand(\"UPDATE sqlite_sequence SET seq='$value' WHERE name='{$table->name}'\")->execute();\n\t\t\t} catch (Exception $e) {\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "21f2a9146834a6a048db95652506c9a2", "score": "0.53342795", "text": "public function up()\n {\n $tblMess = $this->table('tbl_master_data', [\n 'id' => false,\n 'primary_key' => ['id']\n ]);\n $tblMess->addColumn('id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addPrimaryKey(['id'])\n ->addColumn('type', 'string')\n ->addColumn('key', 'string')\n ->addColumn('value', 'string')\n ->addColumn('created', 'datetime',['default'=> \"CURRENT_TIMESTAMP\"])\n ->addColumn('modified', 'datetime', array('null' => true,'default'=>null))\n ->save();\n\n }", "title": "" }, { "docid": "4039ae60bd21ed3fd447d19df466aac0", "score": "0.5325182", "text": "public function change()\n {\n $table = $this->table('users');\n $table->addColumn('id', 'string', [\n 'default' => null,\n 'limit' => 127,\n 'null' => false,\n ]);\n $table->addColumn('tweet_id', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('content', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('created_at', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addIndex([\n 'tweet_id',\n \n ], [\n 'name' => 'UNIQUE_TWEET_ID',\n 'unique' => true,\n ]);\n $table->addPrimaryKey([\n 'id',\n ]);\n $table->create();\n }", "title": "" } ]
ffbaec18562c98abbbb772559ca0b210
Call the composer for a given view.
[ { "docid": "dfeb856e7055af88e02bfc589a4453f4", "score": "0.8185059", "text": "public static function callComposer($view)\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n $instance->callComposer($view);\n }", "title": "" } ]
[ { "docid": "3884a373b97e10bb9de743ad58324947", "score": "0.7254318", "text": "public function callComposer(View $view)\n\t{\n\t\tif(!$this->events || !is_object($this->events)) {\n\t\t\treturn false;\n\t\t}\n\t\t$this->events->fire('composing: '.$view->getName(), array($view));\n\t}", "title": "" }, { "docid": "c5aa79cacfba5eb19674649dc199dbb5", "score": "0.6681453", "text": "public static function callCreator($view)\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n $instance->callCreator($view);\n }", "title": "" }, { "docid": "5d34e789de2851231097ce985752fba0", "score": "0.6680716", "text": "public function composer(array|string $views, Closure|string $callback): array;", "title": "" }, { "docid": "36b9dc27e3bc4eca8ad4e189279cbda8", "score": "0.6479017", "text": "public function compose($view)\n {\n $championship = $this->repository->find(request()->segment(3));\n $view->with(compact('championship'));\n }", "title": "" }, { "docid": "7acbdeb5b0a12bc2b9d8395589eb6c22", "score": "0.644788", "text": "public function view($view);", "title": "" }, { "docid": "b7f94077c2457a4562f3cb538ec1a69a", "score": "0.6435893", "text": "public function compose($view)\n {\n // $settings = App::make('Davzie\\LaravelBootstrap\\Settings\\SettingsInterface');\n \n $view->with('user', Confide::user())\n ->with('app_name', Config::get('cms.name'))\n ->with('urlSegment', Config::get('cms.access_url')) \n ->with('menu_items', Config::get('cms.menu_items'))\n ->with('success', Session::get('success', new MessageBag));\n \n\n // $view->with('user', Auth::user())\n // ->with('app_name', $settings->getAppName() )\n // ->with('urlSegment', Config::get('laravel-bootstrap::app.access_url') )\n // ->with('menu_items', Config::get('laravel-bootstrap::app.menu_items') )\n // ->with('success', Session::get('success' , new MessageBag ) );\n }", "title": "" }, { "docid": "adeb465ae56ba69928812ea6b3b59de5", "score": "0.62775624", "text": "public function compose( $view)\n {\n \\View::composers([\n '\\App\\Http\\ViewComposers\\DefaultComposer' => [\n 'errors.404',\n 'errors.410'\n ]\n ]);\n\n $baseDomain = env('APP_URL');\n $currentLanguageId = \\App::getLocale();\n\n $fullUrl = $this->request->fullUrl();\n $url = parse_url($fullUrl);\n\n $currentPath = str_replace($this->request->root(), '', $fullUrl);\n $baseScheme = $url['scheme'];\n\n $baseUrl = $baseScheme.'://'.$currentLanguageId.'.'.$baseDomain;\n\n $currentThemeId = 'cyborg';\n try {\n $session = $this->request->session();\n $ct = $session->get('currentTheme');\n \n if($ct && $this->themeModel->existsByKey($ct)){\n $currentThemeId = $ct;\n }\n } catch(\\Exception $e){\n\n }\n\n $languages = $this->languageModel->getRecords();\n\n $countries = $this->countryModel->getList();\n $themes = $this->themeModel->getRecords();\n\n $universes = \\NULL;\n $country = Country::getCurrentCountry();\n if($country){\n $universes = Universe::getUniversesFrom($country->language);\n }\n\n $lang = trans();\n \\View::share(\n [\n 'environment' => env('APP_ENV', 'production'),\n 'agent' => new Agent(),\n 'currentLanguageId' => $currentLanguageId,\n 'currentThemeId' => $currentThemeId,\n 'baseScheme' => $baseScheme,\n 'baseDomain' => $baseDomain,\n 'baseUrl' => $baseUrl,\n 'cdnHost' => $baseScheme.'://'.$baseDomain.'/cdn/',\n 'lang'=> $lang,\n 'themes' => $themes,\n 'languages' => $languages,\n 'currentPath' => $currentPath,\n 'countries' => $countries,\n 'request' => $this->request,\n 'universes' => $universes\n ]\n );\n\n //$view->with('count', $this->users->count());\n }", "title": "" }, { "docid": "4a68ccc7ee7e6e5f0ab6fa0df26b44de", "score": "0.6267745", "text": "public function render($view)\n { \n # inclusion require para mostrar la pagina que se especifique en el parametro\n require './views/'.$view.'.php'; \n }", "title": "" }, { "docid": "bbd58b90ef3b8b5ccfc18bf109a579d9", "score": "0.62663364", "text": "public function compose(View $view)\n {\n if (null != $team = $this->request->input('team')) {\n $view->with('team', $team);\n }\n }", "title": "" }, { "docid": "77c407d30b43321f7b4f710f10dfafa9", "score": "0.6196246", "text": "public function compose(ViewContracts $view)\n {\n $view->with('profile_composer', $this->profileComposer);\n }", "title": "" }, { "docid": "1bf950c86cc0dcad7fe09b6469ff329f", "score": "0.6174082", "text": "public function make($view, $data = []);", "title": "" }, { "docid": "75f3569824b9fabaa0126463370e7ee7", "score": "0.61624", "text": "public function dispatch()\n\t{\n\t\t$view = $this->_dispatch($this->_manager);\n\t\tif($view instanceof View)\n\t\t{\n\t\t\t$this->_manager->processView($view);\n\t\t}\n\t}", "title": "" }, { "docid": "66361785e46131f8637cabde23b25c40", "score": "0.61558545", "text": "public function dispatch($view) {\n\t\tglobal $_config, $_core, $_page, $_users, $_groups, $params;\n\n\t\tif(Configure::read(\"install\"))\n\t\t\tunset($_core[\"prefixes\"][1]);\n\n\t\tif(in_array($view, $_core[\"prefixes\"])) {\n\t\t\t$theme = array_shift($params);\n\n\t\t\tif(isset($params[0]) AND !empty($params[0])) {\n\t\t\t\t$view = $params[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray_shift($params);\n\t\t\t\t$view = \"home\";\n\t\t\t}\n\n\t\t\t// Pour gérer les cas ou un / est à la fin de l'URL\n\t\t}\n\t\telse\n\t\t\t$theme = Configure::read(\"theme\");\n\n\t\tdefine(\"THEME\", $theme);\n\t\tdefine(\"TWEB\", WEBROOT . \"templates/$theme/\");\n\t\tdefine(\"TLINK\", in_array($theme, $_core[\"prefixes\"]) ? WEBROOT . \"$theme/\" : WEBROOT);\n\t\tdefine(\"THUMBS\", \"http://{$_SERVER[\"SERVER_NAME\"]}\" . ($_SERVER[\"SERVER_PORT\"] != 80 ? \":{$_SERVER[\"SERVER_PORT\"]}\" : \"\") .\"{$_SERVER[\"SCRIPT_NAME\"]}?page=assets/thumbs/\");\n\t\tdefine(\"TROOT\", ROOT . \"templates/$theme/\");\n\t\tdefine(\"ASSETS\", WEBROOT . \"templates/$theme/assets/\");\n\n\t\t// Vérification du jeton de sécurité\n\t\tif(!$_users->verifyToken()) {\n\t\t\tsetFlash(\"Vous n'êtes pas autorisé à faire cette action\", \"error\");\n\t\t\tredirect($view);\n\t\t}\n\n\t\tif(isset($params[0]) AND $params[0] == \"actions\") {\n\t\t\trequire(ROOT . \"library/actions/loader.php\");\n\t\t}\n\t\telseif(isset($params[0]) AND $params[0] == \"templates\") {\n\t\t\tdie(file_get_contents(ROOT . implode(\"/\", $params)));\n\t\t}\n\t\telseif(isset($params[0]) AND $params[0] == \"assets\" AND isset($params[1]) AND $params[1] == \"thumbs\" AND isset($params[2])) {\n\t\t\t$_cropper = loadBundle(\"fr.solicium.cropper\");\n\t\t\tpreg_match(\"/(.*)_([0-9]+)x([0-9]+).(jpeg|png|gif)/\", $params[3], $thumb);\n\t\t\t$_cropper->createThumbnail(ROOT . \"templates/commons/uploads/{$params[2]}/\", $thumb[1], $thumb[2], $thumb[3], $thumb[4]);\n\t\t}\n\t\telse {\n\t\t\tif(file_exists(ROOT . \"templates/loader.php\"))\n\t\t\t\trequire(ROOT . \"templates/loader.php\");\n\n\t\t\tif(file_exists(TROOT . \"loader.php\")) {\n\t\t\t\textract($this->vars);\n\t\t\t\trequire_once(TROOT . \"loader.php\");\n\t\t\t}\n\n\t\t\tif(file_exists(TROOT . \"views/$view/loader.php\")) {\n\t\t\t\textract($this->vars);\n\t\t\t\trequire_once(TROOT . \"views/$view/loader.php\");\n\t\t\t}\n\n\t\t\tif(file_exists(TROOT . \"views/$view/view.php\")) {\n\t\t\t\tob_start();\n\t\t\t\textract($this->vars);\n\t\t\t\trequire(TROOT . \"views/$view/view.php\");\n\t\t\t\t$this->vars[\"page\"][\"content\"] = $_page->parseHtml(ob_get_clean(), get_defined_vars());\n\t\t\t\tob_start();\n\t\t\t\textract($this->vars);\n\t\t\t\trequire(TROOT . \"layout.php\");\n\t\t\t\techo $_page->parseHtml(ob_get_clean(), get_defined_vars());\n\t\t\t}\n\t\t\telse\n\t\t\t\tdie(\"[ERREUR] Bundle PageConstructor : La vue $view n'existe pas.\");\n\t\t}\n\t}", "title": "" }, { "docid": "4620935f6ab41d7a66c6671aef1bb227", "score": "0.60676014", "text": "public function support(View $view);", "title": "" }, { "docid": "a27e549b2c5dc4c757bec0c722a9d688", "score": "0.6041914", "text": "function view($view, $data=[]) {\n\tglobal $controller_auto;\n\t// if (BASEPATH == FALSE) $controller_auto = null;\n\treturn $controller_auto->view($view, $data);\n}", "title": "" }, { "docid": "fbfa399b048048056efddb546e986abc", "score": "0.60111845", "text": "public function setView($view);", "title": "" }, { "docid": "1fe11543f39b3e7493de70f65e6e44a2", "score": "0.6008899", "text": "public function pick($renderView) {}", "title": "" }, { "docid": "fd54810e16ca2677aa5bf10b5fc190ef", "score": "0.6001881", "text": "public function view($view) {\r\n include CURRENT_VIEW_PATH.\"{$view}_view.php\";\r\n }", "title": "" }, { "docid": "765cdf277c337d5b576f978521bb7a9d", "score": "0.5993789", "text": "public function compose($view)\n {\n event(new FetchingAssets($this->assetPipeline));\n\n $view->with('assets', $this->assetPipeline);\n }", "title": "" }, { "docid": "d873e18b448cdd9a7f67fec571d81b3b", "score": "0.59656245", "text": "public function view($view, $data = []){\n\t\trequire_once '../app/views/' . $view . '.phtml';\n\t}", "title": "" }, { "docid": "db51dd3a0d9b2a80f45479b235fa285d", "score": "0.59630746", "text": "public function setView ($_view);", "title": "" }, { "docid": "2c481db64fcd2f706b954d09314fd3be", "score": "0.5951387", "text": "private function processView(){\n\t\tif(!isset($this->view_object_map['remap_action']) && isset($this->action_view_map[strtolower($this->action)]))\n\t\t{\n\t\t $this->view_object_map['remap_action'] = $this->action_view_map[strtolower($this->action)];\n\t\t}\n\t\t$view = ViewFactory::loadView($this->view, $this->module, $this->bean, $this->view_object_map, $this->target_module);\n\t\t$GLOBALS['current_view'] = $view;\n\t\tif(!empty($this->bean) && !$this->bean->ACLAccess($view->type) && $view->type != 'list'){\n\t\t\tACLController::displayNoAccess(true);\n\t\t\tsugar_cleanup(true);\n\t\t}\n\t\tif(isset($this->errors)){\n\t\t $view->errors = $this->errors;\n\t\t}\n\t\t$view->process($this->viewParams);\n\t}", "title": "" }, { "docid": "1789dcca88439e9d0c1dd4ea2da57f74", "score": "0.5947918", "text": "public function compose(View $view)\n {\n $view->with('teams', $this->teamRepository->getTeamsByUserId(auth()->id()));\n }", "title": "" }, { "docid": "9f265f757216612b7f5763f5fe98d5e8", "score": "0.59399784", "text": "public function callCreator(View $view)\n\t{\n\t\tif(!is_object($this->events) || !$this->events) {\n\t\t\treturn false;\n\t\t}\n\t\t$this->events->fire('creating: '.$view->getName(), array($view));\n\t}", "title": "" }, { "docid": "71e3b04079620a1f41b464df3365b69b", "score": "0.5934264", "text": "public function run()\n\t{\n\t\t$this->resolveView($this->getRequestedView());\n\t\t$controller=$this->getController();\n\t\tif($this->layout!==null)\n\t\t{\n\t\t\t$layout=$controller->layout;\n\t\t\t$controller->layout=$this->layout;\n\t\t}\n\n\t\t$this->onBeforeRender($event=new CEvent($this));\n\t\tif(!$event->handled)\n\t\t{\n\t\t\tif($this->renderAsText)\n\t\t\t{\n\t\t\t\t$text=file_get_contents($controller->getViewFile($this->view));\n\t\t\t\t$controller->renderText($text);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$controller->render($this->view);\n\t\t\t$this->onAfterRender(new CEvent($this));\n\t\t}\n\n\t\tif($this->layout!==null)\n\t\t\t$controller->layout=$layout;\n\t}", "title": "" }, { "docid": "7ee0d5c77460ed519df7cce42b50d62d", "score": "0.59243304", "text": "protected function view($view, $data)\n {\n // data will be automatically available for the view that we try to access\n require_once '../app/views/'.$view.'.php';\n }", "title": "" }, { "docid": "1ac9ad7e1c4cc988796790141c596655", "score": "0.59225154", "text": "public function view($view, $data = array()) {\n if (file_exists($this->cfg->get('APP','PATH').\"views/$view.php\")) {\n // Transforms the data array into independent variables.\n extract($data);\n // Loads the view\n include($this->cfg->get('APP','PATH').\"views/$view.php\");\n }\n }", "title": "" }, { "docid": "f20aaa9ca2978bde32579e23ae908aff", "score": "0.5921376", "text": "public function compose(View $view)\n {\n $view->with('main_menu', $this->getMenuRender($this->getMenu()));\n }", "title": "" }, { "docid": "8414f609146abfeedc166ecc61e081cf", "score": "0.59016055", "text": "public function compose(View $view)\n {\n $about = $this->repoAbout->index();\n $rooms = $this->repoRoom->index();\n $view->with('about', $about)\n ->with('rooms', $rooms);\n }", "title": "" }, { "docid": "873c09a2f6433b88c4c51f0e8007409f", "score": "0.58868647", "text": "function render_view( $view, $args = array() ) {\n\t\textract( $args );\n\t\t$view_file = $this->plugin_dir_path . '/view/' . $view . '.php';\n\n\t\tif ( ! file_exists( $view_file ) ) {\n\t\t\tglobal $as3cfpro;\n\t\t\t$view_file = $as3cfpro->plugin_dir_path . '/view/pro/' . $view . '.php';\n\t\t}\n\n\t\tif ( ! file_exists( $view_file ) ) {\n\t\t\t$view_file = $as3cfpro->plugin_dir_path . '/view/' . $view . '.php';\n\t\t}\n\n\t\tinclude $view_file;\n\t}", "title": "" }, { "docid": "869abeca1ea31b4c44d34262cba78695", "score": "0.5882563", "text": "public function view($view,$data=[])\n {\n //Check for view file\n if(file_exists('../app/views/'.$view.'.php'))\n {\n require_once('../app/views/'.$view.'.php');\n } else {\n die('View does not exist!');\n }\n }", "title": "" }, { "docid": "2b4cabb98aab6491393d6ae25c2bce40", "score": "0.58803046", "text": "public function compose(View $view)\n {\n $view->withCacheDrivers($this->cacheDrivers);\n $view->withMailDrivers($this->mailDrivers);\n $view->withQueueDrivers($this->queueDrivers);\n }", "title": "" }, { "docid": "b9375b961aa07f0687ab869d47bf64e6", "score": "0.58796394", "text": "public function compose(View $view)\n {\n $view->with('menuService', $this->menuService);\n\n\n }", "title": "" }, { "docid": "ec4475a2f261391e66bfc26673404b4c", "score": "0.5878414", "text": "public function make($view, $data = array(), $options = array()) {\n\n $engine = $this->composer;\n $composer = new $engine(app_path($this->views), $options);\n\n // return\n $output = $composer->render($this->viewPath($view), $data);\n $this->response->body($output);\n $this->response->send();\n }", "title": "" }, { "docid": "2999de8ea66b7d1b9743a50631560b5e", "score": "0.58744055", "text": "public function compose(View $view)\n {\n $categories = $this->categoryRepository->selectSubcategories();\n $scenes = $this->impactSceneRepository->listsSelect();\n $cities = $this->cityRepository->listsSelect();\n $periods = $this->periodRepository->listsSelect();\n $formats = $this->formatRepository->jsonFormats();\n $audiences = $this->audienceTypeRepository->selectAudiences();\n\n $view->with([\n 'formats' => $formats,\n 'categories' => $categories, \n 'scenes' => $scenes,\n 'cities' => $cities,\n 'periods' => $periods,\n 'audiences' => $audiences,\n ]);\n }", "title": "" }, { "docid": "b933bad7440bca7b4f39b7f89c132a04", "score": "0.5854645", "text": "public function compose(View $view)\n {\n $parameters = $this->repository->all();\n\n $view->with([\n 'parameters' => $parameters,\n ]);\n }", "title": "" }, { "docid": "d3e6b6755a4706ee725e251c987904bc", "score": "0.58487177", "text": "public function compose(View $view)\n {\n $questions = \\Auth::user()->company->protocolGeneratorQuestions()->orderBy('order', 'asc')->get();\n\n $view->with([\n 'questions' => $questions,\n ]);\n }", "title": "" }, { "docid": "b53eb00f50ed69b9fdc391eef40eafbe", "score": "0.5847368", "text": "abstract public function renderView(View $view);", "title": "" }, { "docid": "25934295f04c0124d82c69ed6b5c35a2", "score": "0.58417344", "text": "public function view($view, $data = []){\n if(file_exists('../app/views/' . $view . '.php')){ \n require_once '../app/views/' . $view . '.php';\n } else{\n die('This view does not exist!');\n\n }\n }", "title": "" }, { "docid": "2bf48425882c1fa74aa628142e2a9d91", "score": "0.583789", "text": "public function getMainView() {}", "title": "" }, { "docid": "6cb039dcdd13b6bde28cc4fb1070bbcc", "score": "0.5833433", "text": "public function compose(View $view)\n {\n $crmUser = \\App::make('CRMUser');\n $docsApi = \\App::make('DocsApi');\n\n // Получаем список продуктов пользователя\n $products = $crmUser->getProducts('enabled', env('CLEAR_PRODUCTS_CACHE', false));\n\n // Запросы к апи доксов через обортку для кэширования, если есть в кэше берем оттуда\n $sortedProducts = $docsApi->cachedQuery(\"sorted_products_\" . serialize($products), function() use ($docsApi, $products) {\n return $docsApi->sortProducts($products);\n });\n\n // Формируем карту продукт - раздел\n $map = [];\n foreach($products as $i) {\n foreach($sortedProducts as $index=>$section) {\n if(isset($section['products'][$i])) {\n if(!isset($map[$i])) {\n $map[$i] = [];\n }\n if(!in_array($index, $map[$i])) {\n $map[$i][] = $index;\n }\n }\n }\n }\n // Формируем карту раздел - продукт\n $sections = [];\n foreach($sortedProducts as $k=>$i) {\n if(!empty($i['products'])) {\n $sections[$k] = array_keys($i['products']);\n }\n }\n\n // Получаем выбранные продукты\n $selected = \\Input::has('p') ? \\Input::get('p') : [];\n\n //$documents = $docsApi->documentsByProducts($products);\n $view->with('sorted_products', $sortedProducts);\n $view->with('map_products', $map);\n $view->with('map_sections', $sections);\n $view->with('map_selected', $selected);\n\n }", "title": "" }, { "docid": "091a3f2b26d089e9d2bde46d4610ebd2", "score": "0.5832033", "text": "protected function loadView()\n {\n }", "title": "" }, { "docid": "f05ac8b183eee9393e39ce5896d7aa6a", "score": "0.583194", "text": "public function compose(View $view)\n {\n $static_page = $this->page->query(['id','name_vi', 'name_en', 'slug'])->where('type','static')->first();\n $other_page = $this->page->query(['id','name_vi', 'name_en', \"slug\"])->where('type','other')->get();\n $view->with(compact('static_page', 'other_page'));\n }", "title": "" }, { "docid": "a5641c2bb641e52bb44dc7fe48764ef9", "score": "0.5828887", "text": "public static function composer($views, $callback)\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->composer($views, $callback);\n }", "title": "" }, { "docid": "c0909fb3016b61fac45b57df2527deaa", "score": "0.58194494", "text": "public function compose(View $view)\n {\n $dealStatus = DealUtil::getStatus();\n $view->with('dealStatus', $dealStatus);\n }", "title": "" }, { "docid": "ccbb4c55949e85c4ce6838de8c3b386f", "score": "0.5809093", "text": "public function compose(View $view)\n {\n $view->with('auth', $this->auth);\n $view->with('applicationName', config('app.name'));\n }", "title": "" }, { "docid": "3745c1348befd28c618605185ee2ccc0", "score": "0.5805447", "text": "function dxw_get_view($view_name = '', $args = array())\n{\n\n // vars\n $path = dxw_get_path(\"views/{$view_name}.php\");\n\n if (file_exists($path)) {\n include $path;\n }\n}", "title": "" }, { "docid": "1a5bed63c3dc7aa1e83fb4c673e5aff4", "score": "0.57779586", "text": "public function compose(View $view)\n {\n // Load languges\n $langs = Languages::getResults();\n $langs = array_column($langs->toArray(), 'name', 'iso2');\n\n $staticPageMenu = Statics::getPageInfoListByLang(\\App::getLocale());\n $arrStaticPage = array();\n foreach ($staticPageMenu as $item) {\n $arrStaticPage[$item->type] = array(\n 'title' => $item->title,\n 'slug' => $item->slug,\n );\n }\n $mediaData = Settings::getAllMediaLink();\n $mediaLinkList = array();\n foreach ($mediaData as $item) {\n $mediaLinkList[$item['key']] = $item['value'];\n }\n\n $generalData = Generals::getResultsByLang(\\App::getLocale());\n $generalDataArr = array();\n $generalDataArr['title'] = $generalData->title;\n $generalDataArr['description'] = $generalData->description;\n $generalDataArr['seo_keyword'] = $generalData->seo_keyword;\n $generalDataArr['logo'] = $generalData->logo;\n $generalDataArr['language_code'] = $generalData->language_code;\n\n $view->with([\n 'languages' => $langs,\n 'staticPage' => $arrStaticPage,\n 'cartCount' => \\Cart::getTotalQuantity(),\n 'mediaLink' => $mediaLinkList,\n 'generalDataArr' => $generalDataArr\n ]);\n }", "title": "" }, { "docid": "e75b2297246bc50f4bc4495fff01353a", "score": "0.57626474", "text": "public function getView() {}", "title": "" }, { "docid": "2e89ef11066c47769b80c7812f3b7e68", "score": "0.576128", "text": "public function compose(View $view)\n {\n $this->assignDynamicFieldsToPageObject($view);\n }", "title": "" }, { "docid": "b48868fc276e0ce9ad20626c3f9c874e", "score": "0.5743112", "text": "public function compose(View $view)\n {\n $protocols = Auth::user()->company->protocols()->orderBy('updated_at', 'desc')->paginate(20);\n\n $view->with([\n 'protocols' => $protocols,\n ]);\n }", "title": "" }, { "docid": "41ec2f00c77cf725ad366d5f9589d3be", "score": "0.5735956", "text": "public function view($view, $data = []) {\n\n if(file_exists('../app/views/' . $view . '.php')) {\n require_once('../app/views/' . $view . '.php');\n } else {\n die(\"file doesnt exist\");\n }\n }", "title": "" }, { "docid": "970e4db73432794a61532f7d19d152a6", "score": "0.57316315", "text": "public function compose(View $view)\n {\n $roles = Auth::user()->company->roles->lists('name', 'id')->all();\n $areas = Auth::user()->company->areas->lists('name', 'id')->all();\n $categories = Auth::user()->company->categories->lists('name', 'id')->all();\n\n $view->with([\n 'roles' => $roles,\n 'areas' => $areas,\n 'categories' => $categories,\n ]);\n }", "title": "" }, { "docid": "cf78d7c9aaf3caf8e828ab30651c6c42", "score": "0.57297987", "text": "public function build(IView $view) : IView;", "title": "" }, { "docid": "236a1f9ab48221ed0ecdf5f644763f04", "score": "0.5727181", "text": "public function load($view) {\n\n\n\t}", "title": "" }, { "docid": "236a1f9ab48221ed0ecdf5f644763f04", "score": "0.5727181", "text": "public function load($view) {\n\n\n\t}", "title": "" }, { "docid": "34eb9cb8e9428b0809c9254a94dc022a", "score": "0.5720414", "text": "function get_view(string $view, array $data = null) {\n ob_start();\n if($data != null) {\n extract($data);\n }\n $view = \"../app/view/\" . strtolower($view) . \".php\";\n if(file_exists($view)) {\n require $view;\n } else {\n trigger_error(\"VIEW FILE မတွေ့ဘူး၊ ချီးထုတ်\", E_USER_ERROR); \n }\n ob_end_flush();\n}", "title": "" }, { "docid": "1a3b997b5607c338e539d8de8bd9ba44", "score": "0.5715748", "text": "public function compose(View $view)\n {\n // Get all menu items from the cache\n $menu = Cache::rememberForever('menu_items', function () {\n return $this->menu->with('page','children','parent')->orderBy('lft')->get();\n });\n // Get all language items from the cache\n $languages = Cache::rememberForever('languages', function () {\n return $this->languages->where('active',1)->get();\n });\n $view->with(['menu' => $menu, 'languages' => config('settings.locale_selector') ? $languages : null]);\n }", "title": "" }, { "docid": "b7c39d03804d733beb3787b0e178d2ab", "score": "0.5710722", "text": "abstract protected function RetCreateView();", "title": "" }, { "docid": "2d1c60f7890e9a7be01b22dd9b7f52f9", "score": "0.5709143", "text": "public function compose(View $view)\n {\n $url = Request::url();\n $banner = $this->banner->findByField('page', $url, ['banner_728_90', 'see_more_ads', 'see_more_text', 'banner_300_250', 'banner_160_600', 'text_banners'])->first();\n\n if($banner){\n $view->with('banner_728_90', $banner->banner_728_90);\n $view->with('banner_see_more_ads', $banner->see_more_ads);\n $view->with('banner_see_more_text', $banner->see_more_text);\n $view->with('banner_300_250', $banner->banner_300_250);\n $view->with('banner_160_600', $banner->banner_160_600);\n $view->with('banner_text_banners', $banner->text_banners);\n }\n \n }", "title": "" }, { "docid": "acc1c2624a7b8062dcd03ce7e1740a4e", "score": "0.56973624", "text": "public static function view($view, $data=null)\n {\n $file = '../views/' . $view . '.php';\n if (! empty($data)) {\n extract($data);\n } // Convert array keys to variables\n if (file_exists($file) && is_readable($file) && pathinfo($file)['extension'] === 'php') {\n require_once $file;\n } // Render page view\n }", "title": "" }, { "docid": "e7fe49881fd59e1cdc857b4d0e31fc88", "score": "0.56969005", "text": "function _get_view($view, $data = null) {\n $file = DD . \"/app/view/\" . $view . \".php\";\n if(file_exists($file)) {\n ob_start();\n if($data != null) {\n extract($data);\n }\n require $file;\n ob_end_flush();\n } else {\n trigger_error(_lang_get(\"settings.view_not_found\"), E_USER_ERROR);\n }\n}", "title": "" }, { "docid": "095dd544b64650d8ad674f5e206b0a51", "score": "0.56938493", "text": "public function view($view, $data = []){\n if(file_exists('../app/View/interfaces/' . $view . '.php')){\n require_once '../app/View/interfaces/' . $view . '.php';\n }else {\n die('File does not exist.');\n }\n }", "title": "" }, { "docid": "77c585a1a741dafad6c66234220ae4a5", "score": "0.56910986", "text": "public function view($view = null, $params = null, $display = false, $exit = false);", "title": "" }, { "docid": "0b0334a004a4cd41c8272012e8521666", "score": "0.56846285", "text": "public function view_loader() {\r\n\r\n parent::_view();\r\n }", "title": "" }, { "docid": "1763e3a5ba860fb5ee6d5bb31b67e9d4", "score": "0.56840736", "text": "public function setMainView($viewPath) {}", "title": "" }, { "docid": "ce0737524c3b805285e35010f3a60bfb", "score": "0.5683487", "text": "public function compose(View $view)\n {\n $repository = app(ProductReviewModelInterface::class);\n $productId = $view->offsetGet('product')->id;\n $reviews = $repository->getAllReviewsByProductId($productId);\n\n $view->with('reviews', $reviews);\n }", "title": "" }, { "docid": "98e6b510ecab7a848c81229fd0a5390f", "score": "0.56774837", "text": "protected function View($view='')\n\t{\n\n\t\t$this->Plugin();\n\n\t\tif(is_array($this->data))\n\t\t{\n\t\t\tforeach($this->data as $key=>$value)\n\t\t\t{\n\t\t\t\t${$key}=$value;\n\t\t\t}\n\t\t}\n\t\t//when template empty\n\t\tif(empty($this->template) or !is_file(base_dir.'mvc/view/'.$this->template.'.php')){\n\t\t\tthrow new Exception(\"Template don't exist\");\n\t\t}else{\n\t\t\t//when file view not exist\n\t\t\tif(!empty($view) && !is_file(base_dir.'mvc/view/'.$view.'.php')){\n\t\t\t\tthrow new Exception(\"View \\\"view/$view.php\\\" don't exist\");\n\t\t\t}else if(is_file(base_dir.'mvc/view/'.$view.'.php')){\n\t\t\t\tob_start();\n\t\t\t\trequire_once(base_dir.'mvc/view/'.$view.'.php');\n\t\t\t\t$content=ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\t$this->data['content']=$content;\n\t\t\t}\n\t\t\trequire_once(base_dir.'mvc/view/'.$this->template.'.php');\n\t\t}\n\n\t\tunset($view);\n\t\tunset($this->data);\n\t}", "title": "" }, { "docid": "b49790cf3e2b1fb8a9398bf3c34a5f0e", "score": "0.5661763", "text": "public function compose(View $view)\n {\n $view->with('content_object_types_composer', ContentObjectType::getAllContentObjectType());\n }", "title": "" }, { "docid": "fa9315d77e035f0d25039580159aee92", "score": "0.56595033", "text": "public function compose(View $view)\n {\n if (!app('lavakit.isBackend') && !app('lavakit.isPageAuth')) {\n return;\n }\n\n event($textTranslations = new LoadBackendTranslation());\n\n $view->with('textTranslations', json_encode($textTranslations->getTranslations()));\n }", "title": "" }, { "docid": "2386e14ed971293e181906d48fa689ff", "score": "0.565678", "text": "public function compose(View $view)\n {\n $view->with('files', $this->getFiles());\n }", "title": "" }, { "docid": "fe7a55b33f88d991ab294341b8921cfa", "score": "0.5653587", "text": "public function compose(View $view)\n {\n $view->with('site', $this->site);\n }", "title": "" }, { "docid": "d151d1f7b3d083ee42d5f6f215745300", "score": "0.56493616", "text": "public function compose(View $view)\n {\n // $instagram = new Instagram('1621403388.1677ed0.b9f2eff851714dec9e4c20b4f3de7910');\n // $view->with(['instagram'=> $instagram->media(['count' => 4])]);\n }", "title": "" }, { "docid": "e652be79373de3100eed4856b0fac9da", "score": "0.5643033", "text": "public function make(string $view, $data = [], array $mergeData = []): ViewInterface;", "title": "" }, { "docid": "ad73f6001c044139dde3b2005bbae13a", "score": "0.56428707", "text": "public function compose(View $view)\n {\n $data = array();\n $data['Total Number of Applications']=$this->formation_dashboard->total_number_of_application();\n $data['Application Pending at Current User']=$this->formation_dashboard->pending_at_current_user();\n $data['Sent to EM']=$this->formation_dashboard->pending_at_EM();\n $data['Pending at DYCO']=$this->formation_dashboard->pending_at_Dyco();\n $data['Sent to DDR']=$this->formation_dashboard->send_to_ddr();\n //dd($data);\n $view->with('formation_data', $data);\n }", "title": "" }, { "docid": "03c33a3fba41ab91b1b6b8e2cdea5d9b", "score": "0.5638985", "text": "public function compose(View $view)\n {\n // $view->with('adminlte', $this->adminlte);\n $view->with('_theme', $this);\n }", "title": "" }, { "docid": "f2c799f95451f7bf98858d6d95cebc1f", "score": "0.5638897", "text": "function prepareView();", "title": "" }, { "docid": "84522e15f8035572f56f1ddc4267e35b", "score": "0.5636513", "text": "public function compose(View $view)\n {\n $view->with('menuTeams', $this->teamList)->with('menuLeagues', $this->leagueList);\n }", "title": "" }, { "docid": "41cd1619dcf4ad04dc53a0c59a75348d", "score": "0.5635623", "text": "function view($view = null, $data = [], $mergeData = [])\n{\n $factory = app('view');\n\n if (func_num_args() === 0) {\n return $factory;\n }\n\n return $factory->make($view, $data, $mergeData);\n}", "title": "" }, { "docid": "8bf43bf6ad7b2c0ecc3e8ecdda78e19b", "score": "0.56331116", "text": "function getView();", "title": "" }, { "docid": "3f31d69b9e1b74b0837d1e21393d631b", "score": "0.5629666", "text": "public function compose(View $view)\n {\n $user = $this->user;\n \n $view->with(compact('user'));\n }", "title": "" }, { "docid": "efd8e3b4f451464c3789b2d408e20602", "score": "0.5628641", "text": "public function compose(View $view)\n {\n $header = $this->content->where('is_active','1')->where('menu','header')->orderBy('title')->get();\n $footer = $this->content->where('is_active','1')->where('menu','footer')->orderBy('title')->get();\n $contents = $this->content->where('is_active','1')->where('menu','content')->get();\n\n\n $banners = $this->banner->where('is_active','1')->orderBy('created_at','desc')->take(4)->get();\n $about = $this->content->where('is_active','1')->where('slug','about-us')->first();\n $eyecare = $this->content->where('is_active','1')->where('slug','eye-care')->first();\n $contactlens = $this->content->where('is_active','1')->where('slug','contact-lens')->first();\n\n $frame = $this->content->where('is_active','1')->where('slug','frame-brand')->first();\n $home = $this->content->where('is_active','1')->where('slug','home')->first();\n\n $services = $this->service->where('is_active','1')->orderBy('created_at','desc')->take(6)->get();\n $packages = $this->packages->where('is_active','1')->orderBy('created_at','desc')->take(6)->get();\n $doctors = $this->doctor->where('is_active','1')->orderBy('created_at','desc')->get();\n $blogs = $this->blogs->where('is_active','1')->orderBy('created_at','desc')->take(4)->get();\n $settings = $this->setting->where('is_active','1')->get();\n $testimonials = $this->testimonial->where('is_active','1')->orderBy('created_at','desc')->get();\n $products = $this->products->where('is_active','1')->orderBy('created_at','desc')->take(10)->get();\n $carts = Session::get('cart');\n $glasses = $this->glasses->where('is_active','1')->orderBy('name')->get();\n $lenses = $this->lens->where('is_active','1')->orderBy('name')->get();\n $brands = $this->brand->where('is_active','1')->orderBy('name')->get();\n $frames = $this->frames->where('is_active','1')->orderBy('name')->get();\n $view->withBanners($banners)\n ->withEyecare($eyecare)\n ->withHome($home )\n ->withContactlens($contactlens )\n ->withFrame($frame)\n ->withAbout($about)\n ->withPackages($packages)\n ->withServices($services)\n ->withDoctors($doctors)\n ->withSettings($settings)\n ->withTestimonials($testimonials)\n ->withProducts($products)\n ->withCarts($carts)\n ->withBlogs($blogs)\n ->withLenses($lenses)\n ->withBrands($brands)\n ->withBrands($brands)\n ->withFrames($frames)\n ->withGlasses($glasses)\n ->withHeader($header)\n ->withFooter($footer)\n ->withContents($contents);\n }", "title": "" }, { "docid": "cb0d9358e1c5d7bdd96b11e08b7baca0", "score": "0.5623909", "text": "public function compose(View $view)\n {\n $templateId = $view->getData()['templateId'];\n $contentId = $view->getData()['contentId'];\n $templateRubric = TemplateRubric::where('template_id', '=', $templateId)->get();\n $checkStatus = ContentStatus::where('content_id', '=', $contentId)->first();\n\n $view->with([\n 'templateId' => $templateId,\n 'rubric' => $templateRubric,\n 'status' => $checkStatus->status\n ]);\n }", "title": "" }, { "docid": "11182f52a2652230b099b5e60f8acf2e", "score": "0.56212544", "text": "public function render($view_file, array $params = array());", "title": "" }, { "docid": "f0dabd14d4220c67771c63fb5eae7c23", "score": "0.5619983", "text": "public function compose(View $view)\n\t{\n\t\t$view->with('navServices', $this->hotelServices->findAllForNav());\n\t\t$view->with('navFacilities', $this->facilityService->getAllFacilitiesForNav());\n\t}", "title": "" }, { "docid": "d347cfe98f17fa8c524c65689900d1f7", "score": "0.5618315", "text": "public function compose(View $view)\n {\n list($cssFiles,$jsFiles) = $this->bindAssets();\n $view->with('cssFiles',$cssFiles);\n $view->with('jsFiles', $jsFiles);\n }", "title": "" }, { "docid": "b30e222a5793b0b002ea5cb753928286", "score": "0.5613067", "text": "public function compose(View $view)\n {\n $_currentUrl = str_replace(URL::to('/').'/', '', url()->current());\n $currentUrl = ucfirst($_currentUrl);\n $view->with('_currentUrl', $_currentUrl);\n $view->with('currentUrl', $currentUrl);\n\n if($notification=DbUtil::getDevAlert()!='')$view->with('notification', $notification);\n $view->with('categories',Category::orderBy('sort')->get());\n $view->with('nationals',National::select()->get());\n\n if(request()->get('lang')){\n app()->setLocale(request()->get('lang'));\n Cookie::queue(Cookie::make('lang', request()->get('lang'), 200));\n }else if(request()->cookie('lang')){//Cookie::get('name')\n app()->setLocale(request()->cookie('lang'));\n }else{\n Cookie::queue(Cookie::make('lang', app()->getLocale(), 200));\n }\n $lang=str_replace('_', '-', app()->getLocale());\n $language_lab=explode(\",\",\"en,br\");\n $language_img=explode(\",\",\"226-united-states.svg,011-brazil.svg\");\n $language_txt=explode(\",\",\"English,Brasil\");\n $view->with('lang', $lang);\n $view->with('language_lab', $language_lab);\n $view->with('language_img', $language_img);\n $view->with('language_txt', $language_txt);\n }", "title": "" }, { "docid": "258187bd47fd383521d40510a96ccfd5", "score": "0.56114584", "text": "public function compose(View $view)\n {\n $view->with('admin_menu', $this->getMenuRender($this->getMenu()));\n }", "title": "" }, { "docid": "7c0a9b973d7a327bd617860073a63b69", "score": "0.56074244", "text": "protected function _run()\n {\n if ($this->_useViewStream && $this->useStreamWrapper()) {\n include 'zend.view://' . func_get_arg(0);\n } else {\n include func_get_arg(0);\n }\n }", "title": "" }, { "docid": "df34aa9d753977366c366770be42e330", "score": "0.56065995", "text": "public function compose(View $view)\n\t{\n\n\t\t// Obtenemos los Datos ordenados.\n\t\t$categories = Category::orderBy('name', 'DESC')->get();\n\t\t$tags = Tag::orderBy('name', 'DESC')->get();\n\t\t// los paso a la vista.\n\t\t$view->with('categories', $categories)\n\t\t\t ->with('tags', $tags);\n\n\t}", "title": "" }, { "docid": "cd60249f0186c1a2b169a51e851e693f", "score": "0.55907893", "text": "protected function showView($view, $args = null)\n {\n if ($args <> null) {\n foreach ($args as $vname => $vvalue) {\n $$vname = $vvalue;\n }\n }\n\n require_once(VIEWS . $view . '.php');\n }", "title": "" }, { "docid": "bdee03d4f26d3a3add27e44f0e5cdf04", "score": "0.5590109", "text": "public function View() {\n $this->Render();\n }", "title": "" }, { "docid": "68c2c3cb91f5bd75285d5ac696ed6242", "score": "0.55897456", "text": "final public function execute(){ \n\t\t$actionMethod = $this->_actionMethod; \n\t\t$this->$actionMethod(); \n\t\treturn $this->_view; \n\t}", "title": "" }, { "docid": "4ac9098f4f8fdbcd8702b25f6e1e23f6", "score": "0.5584689", "text": "public function compose(View $view)\n {\n $view->with('footer', Lang::get('common/footer'))\n ->with('date_modified', humanizeDate(new Date(self::DATE_MODIFIED, Config::get('app.local_timezone'))));\n }", "title": "" }, { "docid": "466a2504033e4f37c992351a866a401c", "score": "0.5581405", "text": "public function findView($view, $path, $extension);", "title": "" }, { "docid": "759998368fedb0c2766c58addc8d5e4a", "score": "0.5580862", "text": "public function compose(View $view)\n {\n $view->with(['bootstrapData' => $this->bootstrapData->get()]);\n }", "title": "" }, { "docid": "4d4561b0efb7e3e55562b1694115b2cd", "score": "0.5580158", "text": "public function compose(View $view)\n {\n $companies = Company::allTypePaginate();\n\n $view->with([\n 'companies' => $companies,\n ]);\n }", "title": "" }, { "docid": "705f3a1ca83b56eefacfb7d006074b37", "score": "0.5579233", "text": "abstract public function getView();", "title": "" }, { "docid": "705f3a1ca83b56eefacfb7d006074b37", "score": "0.5579233", "text": "abstract public function getView();", "title": "" }, { "docid": "cd5c761e78f8b700b3ffef73a227d283", "score": "0.5575753", "text": "public function compose(View $view)\n {\n $invoices = $this->invoices->find($view->getData()['invoice']['id']);\n\n $athlete = $invoices->athlete;\n \n $view->with('athlete', $athlete);\n }", "title": "" } ]
03ee53d308b532dc8a77e406ea0b50c4
/ ESTANCIA A CLASSE MODEL DE ACESSO A DADOS CHAMA O METODO CONSULTA RETORNANDO UM ARRAY COM OS DADOS VINDOS DO BANCO
[ { "docid": "733ad721a59b785de33213a2a4af05d2", "score": "0.0", "text": "public function consulta(){\n $dal = new \\App\\Models\\DAL\\Detalharprojeto();\n $dCurso = new \\App\\Models\\DAL\\Cadastrocurso();\n $dUsuario = new \\App\\Models\\DAL\\Cadastrousuario();\n $dSemestre = new \\App\\Models\\DAL\\Cadastrosemestre();\n $dStatus = new \\App\\Models\\DAL\\Cadastrostatusprojeto();\n $dIntegrantes = new \\App\\Models\\DAL\\Cadastrointegrantes();\n \n $dados['1'] = $dal->consulta($this->getCod_projeto());\n $dados['2'] = $dCurso->consulta();\n $dados['3'] = $dUsuario->comboBox();\n $dados['4'] = $dSemestre->consulta();\n $dados['5'] = $dStatus->consulta();\n $dados['6'] = $dIntegrantes->consulta($this->getCod_projeto());\n return $dados; \n }", "title": "" } ]
[ { "docid": "42b147a1035e8063a5b6faa805cb46e9", "score": "0.6143715", "text": "public function calcularlineamontecarlo(Request $request)\n {\n $tabla_pro_llegada = [];\n // crear una variable acumuladora que ira acumulando los valores de la probabilidad acumulada\n $acumulador_pro_lle = 0;\n // esta variable lo que hace es Acumular los rangos menores de la tabla\n $acumulador_rango_menor = 0;\n // se genera un bucle dependiendo del numero de probabilidades y valores que contendran la tabla de llegada\n for ($i=0; $i < count($request->valor1); $i++) { \n // en el arreglo multidimensional se guarda en la posicion i0 el valor de la llegada\n $tabla_pro_llegada[$i][0] = $request->valor1[$i];\n // en el arreglo multidimensional se guarda en la posicion i1 el valor de la probabilidad\n $tabla_pro_llegada[$i][1] = $request->probabilidad1[$i];\n // se hace uso de la variable acumuladora para la probabilidad acumulada\n $acumulador_pro_lle = $acumulador_pro_lle + $request->probabilidad1[$i];\n // en la posicion i2 se guarda la probabilidad acumulada\n $tabla_pro_llegada[$i][2] = $acumulador_pro_lle;\n // en la posicion i3 se guarda el rango menor y se redondea a tres decimales por medio de la funcion round\n $tabla_pro_llegada[$i][3] = round($acumulador_rango_menor,3);\n // se actualiza el acumulador aumentandole 0.001 para el rango\n $acumulador_rango_menor = round($acumulador_pro_lle,3) + 0.001;\n // en la posicion i4 del arreglo se guarda el rango mayor\n $tabla_pro_llegada[$i][4] = $acumulador_pro_lle;\n }\n\n /*Este proceso es el mismo que el anterior, la diferencia es que se genera para los tiempos de servicios*/\n $tabla_pro_servicio = [];\n // Crear tabla de probabilidad de Servicios\n $acumulador_pro_ser = 0;\n $acumulador_rango_menor_ser = 0;\n for ($i=0; $i < count($request->valor2); $i++) { \n $tabla_pro_servicio[$i][0] = $request->valor2[$i];\n $tabla_pro_servicio[$i][1] = $request->probabilidad2[$i];\n $acumulador_pro_ser = $acumulador_pro_ser + $request->probabilidad2[$i];\n $tabla_pro_servicio[$i][2] = $acumulador_pro_ser;\n $tabla_pro_servicio[$i][3] = round($acumulador_rango_menor_ser,3);\n $acumulador_rango_menor_ser = round($acumulador_pro_ser,3) + 0.001;\n $tabla_pro_servicio[$i][4] = $acumulador_pro_ser;\n }\n\n // Se crea un arreglo que sera multidimensional para almacenar los resultados de la simulacion\n $tabla_calculada = [];\n // Esta variabe sera util para identificar el numero de fila\n $contador_res = 1;\n // esta es la hora de llegada exacta que se inicializa con cero\n $hora_llegada_exacta = 0;\n // al igual que la llegada exacta el fin de servicio tambien se inicializa con cero\n $hora_fin_servicio = 0;\n // Se realiza el bucle la cantidad de veces de numeros aleatorios enviados\n for ($i=0; $i < count($request->aleatorio_llegada); $i++) { \n // en la posicion i0 del arreglo se guarda el numero de fila\n $tabla_calculada[$i][0] = $contador_res;\n // en la posicion i1 del arreglo se guarda el aleatorio de llegada\n $tabla_calculada[$i][1] = $request->aleatorio_llegada[$i];\n // en la posicion i2 del arreglo se guarda el aleatorio de servicio\n $tabla_calculada[$i][2] = $request->aleatorio_servicio[$i];\n $t_entre_llegadas = buscar_en_pro($tabla_pro_llegada, $request->aleatorio_llegada[$i]);\n $tabla_calculada[$i][3] = $t_entre_llegadas;\n $t_servicio = buscar_en_pro($tabla_pro_servicio, $request->aleatorio_servicio[$i]);\n $tabla_calculada[$i][4] = $t_servicio;\n $tabla_calculada[$i][5] = $hora_llegada_exacta + $tabla_calculada[$i][3];\n $hora_llegada_exacta = $hora_llegada_exacta + $tabla_calculada[$i][3];\n $tabla_calculada[$i][6] = maximo($tabla_calculada[$i][5],$hora_fin_servicio);\n $hora_fin_servicio = $tabla_calculada[$i][6] + $tabla_calculada[$i][4];\n $tabla_calculada[$i][7] = $hora_fin_servicio;\n $tabla_calculada[$i][8] = $tabla_calculada[$i][6] - $tabla_calculada[$i][5];\n $tabla_calculada[$i][9] = $tabla_calculada[$i][8] + $tabla_calculada[$i][4];\n $contador_res = $contador_res + 1;\n }\n\n return view('desnudas.lineaesperamontecalo',compact('tabla_pro_llegada','tabla_pro_servicio','tabla_calculada'));\n }", "title": "" }, { "docid": "b28d6f71f42282d19a6367c5899f5a12", "score": "0.60683453", "text": "public function adivinarRecinto()\n {\n require 'model/TareaModel.php';\n $tarea = new TareaModel();\n\n $data = $tarea->obtenerDatosRecinto();\n\n //Numero de apariciones de cada recinto en los datos\n $n[\"turrialba\"] = 0;\n $n[\"paraiso\"] = 0;\n\n foreach ($data as $item) {\n if ($item[\"recinto\"] == \"Turrialba\") {\n $n[\"turrialba\"] = $n[\"turrialba\"] + 1;\n } elseif ($item[\"recinto\"] == \"Paraiso\") {\n $n[\"paraiso\"] = $n[\"paraiso\"] + 1;\n }\n }\n\n //Datos del usuario que corresponden a cada columna de datos\n $sexo = $_POST['sexo'];\n $promedio = $_POST['promedio'];\n $estilo = $_POST['estilo'];\n\n //Una vez que se obtienen los datos del usuario se comparan con los datos ya guardados\n //este seria la segunda parte del algoritmo de BAYES\n\n // Obtiene los datos previos \n $prob_previas = file_get_contents(\"resultados_recinto_estudiante.json\");\n\n $arr = json_decode($prob_previas, true);\n\n //Probabilidades de recinto\n $pTurrialba = $n[\"turrialba\"] / sizeof($data);\n $pParaiso = $n[\"paraiso\"] / sizeof($data);\n\n\n //Multiplicacion de todas las caracteristicas para Turrialba\n $valorTurrialba = $arr['Turrialba']['sexo' . $sexo] * $arr['Turrialba']['promedio' . $promedio]\n * $arr['Turrialba']['estilo' . $estilo];\n\n //Multiplicacion de ese valor por la prior probability de Turrialba\n $valorFinalTurrialba = $valorTurrialba * $pTurrialba;\n\n //Multiplicacion de todas las caracteristicas para Paraiso\n $valorParaiso = $arr['Paraiso']['sexo' . $sexo] * $arr['Paraiso']['promedio' . $promedio]\n * $arr['Paraiso']['estilo' . $estilo];\n\n //Multiplicacion de ese valor por la prior probability de Paraiso\n $valorFinalParaiso = $valorParaiso * $pParaiso;\n\n //Una vez que se tiene los datos se obtiene el mayor\n $resultados = array($valorFinalTurrialba, $valorFinalParaiso);\n $mayor = max($resultados);\n\n if ($mayor == $valorFinalTurrialba) {\n $recinto = \"Turrialba\";\n } elseif ($mayor == $valorFinalParaiso) {\n $recinto = \"Paraiso\";\n }\n\n $this->view->show(\"adivinarRecintoView.php\", $recinto);\n }", "title": "" }, { "docid": "8742becb113d13cac384b0d6b116a1e5", "score": "0.5958224", "text": "function menghitung_prob_atribut($hasil_jlh_kasus_sama, $banyak_label){\n $probabilitas_atribut = [];\n for ($n = 0; $n < sizeof($hasil_jlh_kasus_sama); $n++) { \n $probabilitas_satu = [];\n for ($i = 0; $i < sizeof($banyak_label); $i++) { \n array_push($probabilitas_satu, floatval($hasil_jlh_kasus_sama[$n][$i])/$banyak_label[$i]);\n }\n array_push($probabilitas_atribut, $probabilitas_satu);\n }\n echo(\"</br>\"); echo(\"</br>\".\"PROBABILITAS ATRIBUT : \");print(\"<pre>\".print_r($probabilitas_atribut ,true).\"</pre>\");\n return $probabilitas_atribut;\n}", "title": "" }, { "docid": "713d3f9709563ced98bcb75a50ae21c4", "score": "0.5898475", "text": "public function index(){\n $intMarcaId = $this->input->post('intMarcaId');//obtener un valor por POST desde el formulario CARGA LA MARCA\n if($intMarcaId == ''){//EVALUA QUE LA MARCA NO ESTE VACIO\n $intMarcaId = 0; //SI VINE VACIO EL MARCAID LE ASIGNA UN VALOR \n }\n $dblCostoEnvio = $this->objDatosEnvio->costoEnvio;\n $strNombre = $this->objDatosEnvio->nombre;\n $strDireccion = $this->objDatosEnvio->direccion;\n $dateFechaEntrega = $this->objDatosEnvio->fechaEntrega;\n $intEstatus=$this->objDatosEnvio->estatus;\n if ($dblCostoEnvio == NULL) {\n $dblCostoEnvio = 0;\n }\n //echo var_dump($this->objDatosEnvio);\n $dblSubTotal = 0;//declaracion de variables a nivel funcion\n $dblIva=.16;//declaracion de variables a nivel funcion\n $dblSubTotalIva = 0;//declaracion de variables a nivel funcion\n $dblTotal = $dblCostoEnvio;//declaracion de variables a nivel funcion\n if(count($this->arrCarrito)!=0){ //EVALUA QUE EL CARRITO NO ESTE VACIO\n foreach ($this->arrCarrito as $objModelo) { //RECORRE CADA ELEMENTO DEL CARRITO\n $dblSubTotal+=$objModelo->subTotal; //CALCULA LA SUMATORIA DEL SUBTOTAL\n $dblSubTotalIva=$dblSubTotal * $dblIva; //CALCULA CUANTO ES EL IVA DE LA SUMATORIA DEL SUBTOTAL\n $dblTotal=$dblSubTotal + $dblSubTotalIva + $dblCostoEnvio; //CALCULA EL TOTAL SUMANDO EL SUBTOTAL MAS EL IVA MAS EL COSTO DE ENVIO\n }\n }\n $arrDatosDinamicos['intMarcaId'] = $intMarcaId;\n $arrDatosDinamicos['dblSubTotal'] = $dblSubTotal;\n $arrDatosDinamicos['dblCostoEnvio'] = $dblCostoEnvio;\n $arrDatosDinamicos['dblSubTotalIva'] = $dblSubTotalIva;\n $arrDatosDinamicos['dblTotal'] = $dblTotal;\n $arrDatosDinamicos['strNombre'] = $strNombre;\n $arrDatosDinamicos['dateFechaEntrega'] = $dateFechaEntrega;\n $arrDatosDinamicos['strDireccion'] = $strDireccion;\n $arrDatosDinamicos['intEstatus'] = $intEstatus;\n $arrDatosDinamicos['arrCarrito'] = $this->arrCarrito;\n $arrDatosDinamicos['arrMarcas'] = $this->MdMarcas->buscarActivos();\n $arrDatosDinamicos['arrModelos'] = $this->MdModelos->listar($intMarcaId);\n $arrDatos['strActivo'] = 'pedidos';\n $arrDatos['strContenido'] = $this->load->view('pedidos/agregar',$arrDatosDinamicos,TRUE);\n $this->load->view('principal',$arrDatos);\n }", "title": "" }, { "docid": "1530ea07b45dc668fcffb500d751a65c", "score": "0.58403647", "text": "function mencari_prob_label($label, $jumlah_dataset){\n $probabilitas_label = [];\n for ($i = 0; $i < sizeof($label); $i++) {\n array_push($probabilitas_label, $label[$i]/floatval($jumlah_dataset));\n }\n echo(\"</br>\"); echo(\"</br>\".\"PROBABILITAS LABEL/KELAS : \");print(\"<pre>\".print_r($probabilitas_label ,true).\"</pre>\");\n return $probabilitas_label;\n}", "title": "" }, { "docid": "933692a68476ad633cf53b0f383383e7", "score": "0.574703", "text": "public function costoVenta()\n {\n\n\t\t$query = $this->db->query(\"SELECT ID_CO, SUM(NETO_MES_REAL_L2) Neto_mes FROM CGRESUMEN_CUENTA_CCOSTO WHERE LAPSO_DOC = '201806' AND (left(ID_CUENTA,4) = '7530')\");\n\n if($query->num_rows() > 0 )\n {\n return $query->result();\n }\n }", "title": "" }, { "docid": "643e3a94e8cd16a9ca04a08cf0ab2d66", "score": "0.5725491", "text": "function kalikan_prob_atribut($banyak_label, $probabilitas_atribut, $probabilitas_atribut_ubah){\n $hasil_kali_atribut = [];\n for ($i = 0; $i < sizeof($banyak_label); $i++) { \n $m=1;\n for ($j = 0; $j < sizeof($probabilitas_atribut); $j++) { \n $m = $m*$probabilitas_atribut_ubah[$i][$j];\n }\n array_push($hasil_kali_atribut, $m);\n }\n echo(\"</br>\"); echo(\"</br>\".\"HASIL PERKALIAN TIAP PROB ATRIBUT : \");print(\"<pre>\".print_r($hasil_kali_atribut ,true).\"</pre>\");\n return $hasil_kali_atribut;\n}", "title": "" }, { "docid": "b0f108d3ee18912954291ab3d2c4fff6", "score": "0.5717377", "text": "private function calcularEstadisticaBodega(){\n\n $datosBodega = Bodega::sum('temperatura');\n $filas = Bodega::all();\n if($filas->count()>0){\n $this->tPromedioB = round($datosBodega / count($filas),2);\n $datosBodega = Bodega::sum('humedad');\n $this->hPromedioB = round($datosBodega/ count($filas),2);\n $this->totalB = count($filas);\n $this->tMaxB = collect($filas)->max('temperatura');\n $this->tMinB = collect($filas)->min('temperatura');\n $this->hMaxB = collect($filas)->max('humedad');\n $this->hMinB = collect($filas)->min('humedad');\n }else{\n $this->verBodega = false;\n }\n }", "title": "" }, { "docid": "80c8ca861efd9bdedd75e481b4243499", "score": "0.5709665", "text": "function calcularNotas($registroNota) {\r\n $acumulado=0;\r\n $acumuladoNota1=$acumuladoNota2=0;\r\n $acumuladoNota3=$acumuladoNota4=0;\r\n $acumuladoNota5=$acumuladoNota6=0;\r\n $acumuladoLab=$acumuladoEx=0;\r\n \r\n if(isset($registroNota['PARCIAL1']) && isset($registroNota['PORCENTAJE1'])){\r\n $acumuladoNota1=$registroNota['PARCIAL1']*$registroNota['PORCENTAJE1']/100; \r\n }\r\n if(isset($registroNota['PARCIAL2']) && isset($registroNota['PORCENTAJE2'])){\r\n $acumuladoNota2=$registroNota['PARCIAL2']*$registroNota['PORCENTAJE2']/100;\r\n }\r\n if(isset($registroNota['PARCIAL3']) && isset($registroNota['PORCENTAJE3'])){\r\n $acumuladoNota3=$registroNota['PARCIAL3']*$registroNota['PORCENTAJE3']/100;\r\n }\r\n if(isset($registroNota['PARCIAL4']) && isset($registroNota['PORCENTAJE4'])){\r\n $acumuladoNota4=$registroNota['PARCIAL4']*$registroNota['PORCENTAJE4']/100;\r\n }\r\n if(isset($registroNota['PARCIAL5']) && isset($registroNota['PORCENTAJE5'])){\r\n $acumuladoNota5=$registroNota['PARCIAL5']*$registroNota['PORCENTAJE5']/100;\r\n }\r\n if(isset($registroNota['PARCIAL6']) && isset($registroNota['PORCENTAJE6'])){\r\n $acumuladoNota6=$registroNota['PARCIAL6']*$registroNota['PORCENTAJE6']/100;\r\n }\r\n if(isset($registroNota['PARCIAL_LAB']) && isset($registroNota['PORCENTAJE_LAB'])){\r\n $acumuladoLab=$registroNota['PARCIAL_LAB']*$registroNota['PORCENTAJE_LAB']/100;\r\n }\r\n //Hasta aqui el setenta por ciento\r\n //adiciona notas de examen\r\n if(isset($registroNota['PARCIAL_EX']) && isset($registroNota['PORCENTAJE_EX'])){\r\n $acumuladoEx=$registroNota['PARCIAL_EX']*$registroNota['PORCENTAJE_EX']/100;\r\n }\r\n \r\n $acumulado= ($acumuladoNota1+$acumuladoNota2+\r\n $acumuladoNota3+$acumuladoNota4+\r\n $acumuladoNota5+$acumuladoNota6+\r\n $acumuladoLab+$acumuladoEx);\r\n\r\n //Adiciona habilitacion si hay valores registrados\r\n if(isset($registroNota['PARCIAL_HAB']) && isset($registroNota['PORCENTAJE_HAB'])){\r\n \r\n $acumuladoHab=$registroNota['PARCIAL_HAB']*$registroNota['PORCENTAJE_HAB']/100;\r\n //En caso de que el estudainte halilite, la habilitacion se toma como el 70% y lo obtenido anteriormente como el 30%\r\n $acumulado=$acumuladoHab+$acumulado*.3;\r\n } \r\n return $acumulado;\r\n }", "title": "" }, { "docid": "7d422b10d9f810627fe2211c4cc589bb", "score": "0.57050157", "text": "public function matriz_evaluacion_regional_acumulado($dep_id){\n $nro_1=0;$nro_2=0;$nro_3=0;$total=0;$pcion=0;$npcion=0;\n $nro_cum=0;$nro_proc=0;$nro_ncum=0;$nro_total_prog=0; $nro_cum_a=0;$nro_proc_a=0;$nro_ncum_a=0;$nro_total_prog_a=0;\n \n for ($i=1; $i <=$this->tmes ; $i++) { \n \n $cum=$this->model_evalnacional->evaluacion_institucional_regional($dep_id,1,$i);\n $proc=$this->model_evalnacional->evaluacion_institucional_regional($dep_id,2,$i);\n $ncum=$this->model_evalnacional->evaluacion_institucional_regional($dep_id,3,$i);\n $total_prog=$this->model_evalnacional->total_institucional_regional($dep_id,$i); // total programado prod\n\n /*------------- Acumulado Producto -------*/\n if(count($cum)!=0){\n $nro_cum=$nro_cum+$cum[0]['total'];\n }\n if(count($proc)!=0){\n $nro_proc=$nro_proc+$proc[0]['total'];\n }\n if(count($ncum)!=0){\n $nro_ncum=$nro_ncum+$ncum[0]['total'];\n }\n if(count($total_prog)!=0){\n $nro_total_prog=$nro_total_prog+$total_prog[0]['total'];\n }\n\n $nro_1=$nro_cum;\n $nro_2=$nro_proc;\n $nro_3=$nro_ncum;\n $total_programado=$nro_total_prog;\n\n\n if($total_programado!=0){\n $total=$nro_1+$nro_2+$nro_3;\n $pcion= round((($nro_1/$total_programado)*100),2);\n $npcion=(100-$pcion);\n //$npcion=round(((($nro_2+$nro_3)/$total_programado)*100),2);\n }\n \n if($total==0){\n $npcion=100;\n }\n }\n\n $cat[1]=$nro_1; // cumplidos\n $cat[2]=$nro_2; // en proceso\n $cat[3]=$nro_3; // no cumplido\n $cat[4]=$total; // Total Evaluacion\n $cat[5]=$pcion; // % cumplido\n $cat[6]=$npcion; // % no cumplido\n $cat[7]=$total_programado; // Total Programado\n\n return $cat;\n }", "title": "" }, { "docid": "6dc87580c6abe2f12fa4a6d8b8bb07d5", "score": "0.56971127", "text": "function realizandoOperacionSistema($sistema,$fechaIncio,$fechaFinal){\n principalSistema($sistema,$fechaIncio,$fechaFinal); // PRIMERO CREAMOS LA VISTA EL CUAL SERA CONSUMIDO \n //$preguntas=preguntasMateria(10);\n // $preguntas=preguntasSistema('ORAL');// SIEMPRE MANDARLO EN MAYUSCULAS\n $preguntas=preguntasSistema($sistema);// SIEMPRE MANDARLO EN MAYUSCULAS\n $equals=\"\";\n foreach ($preguntas as $key => $value) {\n if($value['pregunta']!=$equals){\n $equals=$value['pregunta'];\n $Arrayvalor =Array(); $array=Array();\n // $array['datosGenerale']=fintrarPorPregunta($value['pregunta'],10);\n $Arrayvalor=filtrarPorPreguntaSistema($value['pregunta'],' ',' ');\n // print_r($Arrayvalor);\n //$filtratoPorOpcion=filtralPorRespuestaSistema($array['datosGenerales'],$valor['opcion']);\n if($Arrayvalor!='0'){\n $discapacidades=array_column( $Arrayvalor,'discapacidad');\n $etnias=array_column( $Arrayvalor,'etnia');\n $idioma=array_column( $Arrayvalor,'idioma');\n $arrayGenerales['sexo']=array_count_values(array_column( $Arrayvalor,'sexo'));\n // $arrayGenerales['idioma']=array_count_values(array_column( $Arrayvalor,'idioma'));\n// $arrayGenerales['discapacidad']=array_count_values(array_column( $Arrayvalor,'discapacidad'));\n $arrayGenerales['discapacidad']=filtradoGeneralesSistema('discapacidad',$discapacidades,$value['pregunta']);\n $arrayGenerales['etnias']=filtradoGeneralesSistema('etnia',$etnias,$value['pregunta']);\n $arrayGenerales['idiomas']=filtradoGeneralesSistema('idioma',$idioma,$value['pregunta']);\n $arrayGenerales['generos']=array_count_values(array_column( $Arrayvalor,'genero'));\n \n $arrayGenerales['respuesta']=array_count_values(array_column( $Arrayvalor,'respuesta'));\n // print_r($arrayGenerales);\n // print_r($Arrayvalor);\n $array['datosGenerales']=$arrayGenerales;\n\n if($value['identificador']==\"select\"){\n $arrayOpcion=Array();\n $opciones=opcionesPorMateria($value['id_pregunta']);\n foreach ($opciones as $llave => $valor) {\n $filtratoPorOpciones=filtralPorRespuestaSistema($Arrayvalor,$valor['opcion']);\n $filtratoPorOpcion['sexo']=array_count_values(array_column( $filtratoPorOpciones,'sexo'));\n $filtratoPorOpcion['idioma']=array_count_values(array_column( $filtratoPorOpciones,'idioma'));\n $filtratoPorOpcion['discapacidades']=array_count_values(array_column( $filtratoPorOpciones,'discapacidad'));\n $filtratoPorOpcion['etnias']=array_count_values(array_column( $filtratoPorOpciones,'etnia'));\n $valores=$filtratoPorOpcion;\n $arrayOpcion[$valor['opcion']]=$valores;\n } \n $array['opciones']=$arrayOpcion;\n } \n }\n $respuesta[$value['pregunta']]=$array;// SE GUARDA EL VARLOR DE CADA UNO DE LAS PREGUNTAS\n global $respuestaOperacion;\n $respuestaOperacion=$respuesta;// SE GUARDA EL VARLOR DE CADA UNO DE LAS PREGUNTAS\n}//final del if\n}\n}", "title": "" }, { "docid": "ad5b0fdfd2ca325009f17702975bf46b", "score": "0.56959826", "text": "function conversorMasa($valor, $simbolo){\n\n if($simbolo==\"lb\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 453.592;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" gr\");\n return $g;\n }\n if($simbolo==\"oz\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 28.3495;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n }\n if($simbolo==\"kg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 1000;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"hg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 100;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"dag\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 10;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo == \"g\"){\n // console.log(\"unidad de medida = \" + simbolo);\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(valor)+\" g\");\n return $valor;\n }\n if($simbolo==\"dg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 0.1;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"cg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 0.01;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"mg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 0.001;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n}", "title": "" }, { "docid": "e04218df7dd7eccd1ee6a5ce368d9f25", "score": "0.5662517", "text": "function calculo_valor_final($hoja,$totalValorUnitario,$margen){\n //if ($hoja->margen!=\"\") {\n //$valorFinal=($totalValorUnitario/((100-$hoja->margen)/100));\n //}else{ \n //if($datos->margen_migrado!=0 || $datos->margen_migrado!=null){\n //$valorFinal=($totalValorUnitario/((100-$datos->margen_migrado)/100)); \n $valorFinal=($totalValorUnitario/((100-$margen)/100)); \n //}else{\n // $valorFinal=($totalValorUnitario/((100-15)/100));\n //}\n //}\n\n return array('valor_final'=>$valorFinal);\n}", "title": "" }, { "docid": "4ee49f1348c8ae4ccebc6282acaa1c36", "score": "0.5657654", "text": "public function construir(){\n $construirEconomica=0;\n $construirNegocios=0;\n $construirEjecutiva=0;\n $construirPremium=0;\n $simulacion=Simulacion::all()->last();\n $datos=TablaSimulacion::all();\n $habitacion=$simulacion->habitaciones_construir;\n $economica=Habitacion::where('tipo_habitacion','economica')->value('cantidad_habitaciones');\n $negocios=Habitacion::where('tipo_habitacion','negocios')->value('cantidad_habitaciones');\n $ejecutiva=Habitacion::where('tipo_habitacion','ejecutiva')->value('cantidad_habitaciones');\n $premium=Habitacion::where('tipo_habitacion','premium')->value('cantidad_habitaciones');\n $demandaEconomica=$datos->where('tipo_cliente','economica')->count();\n $demandaNegocios=$datos->where('tipo_cliente','negocios')->count();;\n $demandaEjecutiva=$datos->where('tipo_cliente','ejecutiva')->count();;\n $demandaPremium=$datos->where('tipo_cliente','premium')->count();;\n $ec=$economica-$demandaEconomica;\n $ne=$negocios-$demandaNegocios;\n $ej=$ejecutiva-$demandaEjecutiva;\n $pr=$premium-$demandaPremium;\n if($ec<0 || $ne<0 || $ej<0 || $pr<0){\n while ($habitacion!=0){\n if($premium-$demandaPremium < 0){\n $construirPremium++;\n $premium++;\n $habitacion--;\n }elseif($ejecutiva-$demandaEjecutiva < 0){\n $construirEjecutiva++;\n $ejecutiva++;\n $habitacion--;\n }elseif($negocios-$demandaNegocios < 0){\n $construirNegocios++;\n $negocios++;\n $habitacion--;\n }elseif($economica-$demandaEconomica < 0){\n $construirEconomica++;\n $economica++;\n $habitacion--;\n }else{\n $habitacion--;\n }\n }\n ConstruirHabitacion::create([\n 'cantidad_habitaciones_economica'=>$construirEconomica,\n 'cantidad_habitaciones_negocios'=>$construirNegocios,\n 'cantidad_habitaciones_ejecutiva'=>$construirEjecutiva,\n 'cantidad_habitaciones_premium'=>$construirPremium,\n 'simulacion_id'=>$simulacion->id\n ]);\n return redirect()->route('datosSimulacion');\n }else{\n ConstruirHabitacion::create([\n 'cantidad_habitaciones_economica'=>$construirEconomica,\n 'cantidad_habitaciones_negocios'=>$construirNegocios,\n 'cantidad_habitaciones_ejecutiva'=>$construirEjecutiva,\n 'cantidad_habitaciones_premium'=>$construirPremium,\n 'simulacion_id'=>$simulacion->id\n ]);\n return redirect()->route('datosSimulacion');\n }\n }", "title": "" }, { "docid": "e677e24b1e03942f81a8447196c5e772", "score": "0.56401104", "text": "function realizandoOperacionMateria($materia,$fechaInicio,$fechaFinal){\n principalMateria($materia,$fechaInicio,$fechaFinal); // PRIMERO CREAMOS LA VISTA EL CUAL SERA CONSUMIDO \n//$preguntas=preguntasMateria(10);\n$preguntas=preguntasMateriaAgrupadas($materia);// SIEMPRE MANDARLO EN MAYUSCULAS\n$equals=\"\";\n//print_r($preguntas);\nforeach ($preguntas as $key => $value) {\n //print_r(\"\\n preguntas \".$value['pregunta']);\n if($value['pregunta']!=$equals){\n $equals=$value['pregunta'];\n $Arrayvalor =Array(); $array=Array();\n // $array['datosGenerale']=fintrarPorPregunta($value['pregunta'],10);\n $Arrayvalor=fintrarPorPregunta($value['pregunta'],10);//NOTA EL PARAMETRO 10 NO SIRVE Y HACE NADA\n // print_r($Arrayvalor);\n //$filtratoPorOpcion=filtralPorRespuesta($array['datosGenerales'],$valor['opcion']);\n if($Arrayvalor!='0'){\n $discapacidades=array_column( $Arrayvalor,'discapacidad');\n $etnias=array_column( $Arrayvalor,'etnia');\n $idioma=array_column( $Arrayvalor,'idioma');\n $arrayGenerales['sexo']=array_count_values(array_column( $Arrayvalor,'sexo'));\n // $arrayGenerales['idioma']=array_count_values(array_column( $Arrayvalor,'idioma'));\n// $arrayGenerales['discapacidad']=array_count_values(array_column( $Arrayvalor,'discapacidad'));\n $arrayGenerales['discapacidad']=filtradoGenerales('discapacidad',$discapacidades,$value['pregunta']);\n $arrayGenerales['etnias']=filtradoGenerales('etnia',$etnias,$value['pregunta']);\n $arrayGenerales['idiomas']=filtradoGenerales('idioma',$idioma,$value['pregunta']);\n $arrayGenerales['generos']=array_count_values(array_column( $Arrayvalor,'genero'));\n \n $arrayGenerales['respuesta']=array_count_values(array_column( $Arrayvalor,'respuesta'));\n// $arrayGenerales['etnias']=array_count_values(array_column( $Arrayvalor,'etnia'));\n //$array['datosGenerales']=fintrarPorPregunta($value['pregunta'],10);\n //print_r($array['datosGenerales']);\n // print_r($arrayGenerales);\n $array['datosGenerales']=$arrayGenerales;\n\n if($value['identificador']==\"select\"){\n $arrayOpcion=Array();\n\n $opciones=opcionesPorMateria($value['id_pregunta']);\n // $ArrayRespuesta=Array();\n \n foreach ($opciones as $llave => $valor) {\n \n $filtratoPorOpciones=filtralPorRespuesta($Arrayvalor,$valor['opcion']);\n $filtratoPorOpcion['sexo']=array_count_values(array_column( $filtratoPorOpciones,'sexo'));\n $filtratoPorOpcion['idioma']=array_count_values(array_column( $filtratoPorOpciones,'idioma'));\n $filtratoPorOpcion['discapacidades']=array_count_values(array_column( $filtratoPorOpciones,'discapacidad'));\n $filtratoPorOpcion['etnias']=array_count_values(array_column( $filtratoPorOpciones,'etnia'));\n \n $valores=$filtratoPorOpcion;\n $arrayOpcion[$valor['opcion']]=$valores;\n } \n $array['opciones']=$arrayOpcion;\n } \n }\n $respuesta[$value['pregunta']]=$array;// SE GUARDA EL VARLOR DE CADA UNO DE LAS PREGUNTAS\n \n global $respuestaConsultaMateria;\n $respuestaConsultaMateria=$respuesta;\n\n}//final del if\n}\n //print_r( $respuesta);\n\n}", "title": "" }, { "docid": "24c0695d1b5766efdbd3ea04b54de2a5", "score": "0.5625375", "text": "function lacado($fotomecanica,$cantidad,$unidades){\n if($fotomecanica->fot_lleva_barniz=='Laca UV'){\n $costosporlacado=(35000+(52*($cantidad/$unidades)));\n }else{\n $costosporlacado=0;\n }\n return $costosporlacado;\n }", "title": "" }, { "docid": "eb3bee43e029b14f07d8164703acc6a2", "score": "0.56244075", "text": "protected function CalcularDatos() {\n\t\t$this->_perimetro = $this->_ladoUno*2 + $this->_ladoDos*2;\n $this->_superficie = $this->_ladoUno*$this->_ladoDos;\n\t}", "title": "" }, { "docid": "f329bca9767e6f09cef49f479e779e43", "score": "0.5607531", "text": "public function soalno2()\n {\n $lembar = readline('berapa banyak uang lembar mu ?');\n $array = [];\n if (!empty($lembar) || $lembar < 1) {\n echo '++++ Mohon Tunggu ++++ '.PHP_EOL;\n\n for ($i=0; $i < $lembar; $i++) { \n $nominal = readline('berapa nominal uang lembar mu : ');\n\n $jumlah_lembar = readline('berapa Lembar uang '.$nominal.' mu : ');\n $data = [\n 'jumlah_lembar' => $jumlah_lembar,\n 'nominal' => $nominal,\n ];\n array_push($array,$data);\n }\n $sum = array_sum(array_map(function($item) { \n return $item['nominal'] * $item['jumlah_lembar']; \n }, $array));\n echo 'total Uang mu adalah : '.$sum.PHP_EOL;\n $belanja = readline('masukan jumlah nominal belanja :');\n if (!empty($belanja) || !$belanja > $sum) {\n $sisa = $sum - $belanja;\n echo 'Sisa Uang mu adalah '.$sisa;\n }else{\n echo 'Uang mu Tidak Cukup/Nominal Belanja Tidak Boleh kosong';\n }\n }else{\n echo'data tidak boleh kosong dan tidak boleh lebih kecil dari 1'.PHP_EOL;\n\n }\n }", "title": "" }, { "docid": "d07e6f84a2a46a0c09537b380ff98c94", "score": "0.5603984", "text": "public function matriz_evaluacion_regional_trimestre($dep_id){\n $nro_1=0;$nro_2=0;$nro_3=0;$total=0;$pcion=0;$npcion=0;\n $nro_cum=0;$nro_proc=0;$nro_ncum=0;$nro_total_prog=0; $nro_cum_a=0;$nro_proc_a=0;$nro_ncum_a=0;$nro_total_prog_a=0;\n \n $cum=$this->model_evalnacional->evaluacion_institucional_regional($dep_id,1,$this->tmes);\n $proc=$this->model_evalnacional->evaluacion_institucional_regional($dep_id,2,$this->tmes);\n $ncum=$this->model_evalnacional->evaluacion_institucional_regional($dep_id,3,$this->tmes);\n $total_prog=$this->model_evalnacional->total_institucional_regional($dep_id,$this->tmes); // total programado prod\n\n /*------------- Acumulado Producto -------*/\n if(count($cum)!=0){\n $nro_cum=$nro_cum+$cum[0]['total'];\n }\n if(count($proc)!=0){\n $nro_proc=$nro_proc+$proc[0]['total'];\n }\n if(count($ncum)!=0){\n $nro_ncum=$nro_ncum+$ncum[0]['total'];\n }\n if(count($total_prog)!=0){\n $nro_total_prog=$nro_total_prog+$total_prog[0]['total'];\n }\n\n $nro_1=$nro_cum;\n $nro_2=$nro_proc;\n $nro_3=$nro_ncum;\n $total_programado=$nro_total_prog;\n\n if($total_programado!=0){\n $total=$nro_1+$nro_2+$nro_3;\n $pcion= round((($nro_1/$total_programado)*100),2);\n $npcion=(100-$pcion);\n //$npcion=round(((($nro_2+$nro_3)/$total_programado)*100),2);\n }\n \n if($total==0){\n $npcion=100;\n }\n\n $cat[1]=$nro_1; // cumplidos\n $cat[2]=$nro_2; // en proceso\n $cat[3]=$nro_3; // no cumplido\n $cat[4]=$total; // Total Evaluacion\n $cat[5]=$pcion; // % cumplido\n $cat[6]=$npcion; // % no cumplido\n $cat[7]=$total_programado; // Total Programado\n\n return $cat;\n }", "title": "" }, { "docid": "100ca4d5d7cb1d11d6c666ab4adb4add", "score": "0.56008106", "text": "private function comercializacionUnidades($anio){\n // Variable que guardara el valor resultante por año\n $resultado=0;\n //Este for servirá para recorrer los registros por año, y guardando el resultado de un año concreto para ser usado posteriormente\n for($i=1;$i<=$anio;$i++){\n // Si el año es el primero\n if($i==1){\n // Se consulta la suma de las unidades por mes donde dicho dato se encuentra en la tabla Mezcla_productos_servicio\n $unidadesMes = Mezcla_productos_servicio::where('id_empresa', \\Auth::user()->id_empresa)->sum('unidades_mes');\n // Se requieres las unidades producidas al año, por lo tanto se multiplica el total de unidades mensuales por doce\n $unidadesAnio = $unidadesMes*12;\n\n // Ahora se consulta en Ingresos_costos el incremento en unidades, pero se requiere la del año en curso, en este caso el primero, por lo que se agrega otra consulta al where incluyendo el año\n $incUnidades = Ingresos_costos::where([\n ['id_empresa', \\Auth::user()->id_empresa],\n ['anio', $i],\n ['apoyo', 1]\n ])->first();\n $incUnidades = $incUnidades->incremento_unidades_vendidas;\n\n // El resultado se guarda para enviarse, o usarse en la siguiente iteracion\n $resultado = $unidadesAnio * (1+$incUnidades);\n }\n\n // Si el año a calcular es posterior al primero\n if($i > 1){\n // Se realiza lo mismo que en el año uno, se realiza la consulta teniendo en cuenta el id de la empres y el año\n $incUnidades = Ingresos_costos::where([\n ['id_empresa', \\Auth::user()->id_empresa],\n ['anio', $i],\n ['apoyo', 1]\n ])->first();\n $incUnidades = $incUnidades->incremento_unidades_vendidas;\n\n // se multiplica el resultado anterior, por la suma de la unidad con el incremento de unidades\n // Esto es porque esta cantidad se debe encontrar en decimales, y dado que se requiere tener el resultado aplicado como porcentaje de incremento se le suma 1 para que de un resultado mayor, en caso de que sea positivo\n $resultado = $resultado * (1+$incUnidades);\n\n }\n }\n\n // El resultado final es tomado como retorno\n return $resultado;\n }", "title": "" }, { "docid": "06b4c0af30719fbcfc51009da973fd0c", "score": "0.55789113", "text": "protected function CalcularDatos() {\n\t\t$this->_perimetro = $this->_base + $this->_altura*2;\n $this->_superficie = $this->_base * $this->_altura/2;\n\t}", "title": "" }, { "docid": "ca531bceb54d55eb8cf583bb3cca0884", "score": "0.5571425", "text": "private function comercializacionUnidades($anio){\n // Variable que guardara el valor resultante por año\n $resultado=0;\n //Este for servirá para recorrer los registros por año, y guardando el resultado de un año concreto para ser usado posteriormente\n for($i=1;$i<=$anio;$i++){\n // Si el año es el primero\n if($i==1){\n // Se consulta la suma de las unidades por mes donde dicho dato se encuentra en la tabla Mezcla_productos_servicio\n $unidadesMes = Mezcla_productos_servicio::where('id_empresa', '=', \\Auth::user()->id_empresa)->sum('unidades_mes');\n // Se requieres las unidades producidas al año, por lo tanto se multiplica el total de unidades mensuales por doce\n $unidadesAnio = $prodSer*12;\n\n // Ahora se consulta en Ingresos_costos el incremento en unidades, pero se requiere la del año en curso, en este caso el primero, por lo que se agrega otra consulta al where incluyendo el año\n $incUnidades = Ingresos_costos::where(\n ['id_empresa', \\Auth::user()->id_empresa],\n ['anio', $i],\n ['apoyo', 1]\n )->first();\n $incUnidades = $incUnidades->incremento_unidades_vendidas;\n\n // El resultado se guarda para enviarse, o usarse en la siguiente iteracion\n $resultado = $unidadesAnio * (1+$incUnidades);\n }\n\n // Si el año a calcular es posterior al primero\n if($i > 1){\n // Se realiza lo mismo que en el año uno, se realiza la consulta teniendo en cuenta el id de la empres y el año\n $incUnidades = Ingresos_costos::where(\n ['id_empresa', \\Auth::user()->id_empresa],\n ['anio', $i],\n ['apoyo', 1]\n )->first();\n $incUnidades = $incUnidades->incremento_unidades_vendidas;\n\n // se multiplica el resultado anterior, por la suma de la unidad con el incremento de unidades\n // Esto es porque esta cantidad se debe encontrar en decimales, y dado que se requiere tener el resultado aplicado como porcentaje de incremento se le suma 1 para que de un resultado mayor, en caso de que sea positivo\n $resultado = $resultado * (1+$incUnidades);\n\n }\n }\n\n // El resultado final es tomado como retorno\n return $resultado;\n }", "title": "" }, { "docid": "bd2bfac8b7063de61e34d7c492087c82", "score": "0.5555925", "text": "private function getReal()\n {\n $meses = array(\n \"ene\" => 0, \"feb\" => 0, \"mar\" => 0, \"abr\" => 0, \"may\" => 0, \"jun\" => 0,\n \"jul\" => 0, \"ago\" => 0, \"sep\" => 0, \"oct\" => 0, \"nov\" => 0, \"dic\" => 0, \"total\" => 0\n );\n $contador = 0;\n if ($this->getPlan()) {\n if ($this->getPlan()->getReal()) {\n foreach ($this->getPlan()->getReal() as $r) {\n switch ($r->getMes()) {\n case \"1\":\n $meses[\"ene\"] = $r->getValor();\n $contador++;\n break;\n case \"2\":\n $meses[\"feb\"] = $r->getValor();\n $contador++;\n break;\n case \"3\":\n $meses[\"mar\"] = $r->getValor();\n $contador++;\n break;\n case \"4\":\n $meses[\"abr\"] = $r->getValor();\n $contador++;\n break;\n case \"5\":\n $meses[\"may\"] = $r->getValor();\n $contador++;\n break;\n case \"6\":\n $meses[\"jun\"] = $r->getValor();\n $contador++;\n break;\n case \"7\":\n $meses[\"jul\"] = $r->getValor();\n $contador++;\n break;\n case \"8\":\n $meses[\"ago\"] = $r->getValor();\n $contador++;\n break;\n case \"9\":\n $meses[\"sep\"] = $r->getValor();\n $contador++;\n break;\n case \"10\":\n $meses[\"oct\"] = $r->getValor();\n $contador++;\n break;\n case \"11\":\n $meses[\"nov\"] = $r->getValor();\n $contador++;\n break;\n case \"12\":\n $meses[\"dic\"] = $r->getValor();\n $contador++;\n break;\n }\n $meses[\"total\"] += $r->getValor();\n }\n }\n }\n $meses[\"total\"] = ($contador > 0) ? $meses[\"total\"] / $contador : 0;\n return $meses;\n }", "title": "" }, { "docid": "e2086862e9357676ebba28c693071679", "score": "0.5530635", "text": "function getCorrelativoComprobante() {\n\t\tglobal $bd;\n\t\tglobal $x_correlativo_comprobante;\n\t\t/// buscamos el ultimo correlativo\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$x_array_comprobante = is_object($x_array_comprobante) || is_array($x_array_comprobante) ? $x_array_comprobante : json_decode($x_array_comprobante, true);\n\n\t\t$correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\n\t\t\t$sql_doc_correlativo=\"select (correlativo + 1) as d1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\t\t\n\t\t\t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\n\n\t\t\t// if ($x_array_comprobante['codsunat'] === \"0\") { // si no es factura electronica\n\t\t\t\t// guardamos el correlativo //\n\t\t\t\t$sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t\t$bd->xConsulta_NoReturn($sql_doc_correlativo);\n\t\t\t// } \n\t\t\t// si es factura elctronica guarda despues tigger ce \n\t\t} else {\n\t\t\t$correlativo_comprobante='0';\n\t\t}\n\n\t\t// SI TAMBIEN MODIFICA EN REGISTRO PAGO\n\t\t$x_correlativo_comprobante = $correlativo_comprobante;\n\t\tif ( strrpos($x_from, \"e\") !== false ) { $x_from = str_replace('e','',$x_from); setComprobantePagoARegistroPago(); }\n\n\t\t// print $correlativo_comprobante;\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante));\n\t\tprint $x_respuesta.'|';\n\t}", "title": "" }, { "docid": "0f7130dc9cab4f06fbf0443648344c1b", "score": "0.55269504", "text": "public function fAObtemDadosTriagem() {\n\n\t\t// Obtem Sequencial de Acompanhamento Atual\n\t\t$seqlAcomp = Container::getModel('TbAcompFml');\n\t\t$seqlAcomp->__set('cd_fml', $_POST['cd_fml']);\n\t\t$seqlAcomp->getSequencial();\t\t\t\n\n\t\t// TU\n\t\t// Não há acompanhamento cadastrado ainda\n\t\tif (empty($seqlAcomp->__get('seql_max'))) {\n\t\t\t$data_hoje \t\t= \tnew \\DateTime();\n\t\t\t$data_hoje \t\t= \t$data_hoje->format(\"Y-m-d\");\n\t\t\t\n\t\t\tswitch ($this->view->segmento)\n\t\t \t{\n\t\t case 1: // Educação\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\n\t\t\t\t\t\t\t\t\t\t'cd_freq_crianca_adoles_escola' => 1,\n\t\t\t\t\t\t\t\t\t\t'dsc_mtvo_freq_escolar' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_desemp_estudo' => '',\n\t\t\t\t\t\t\t\t\t\t'cd_interes_motiva_voltar_estudar' => 1,\n\t\t\t\t\t\t\t\t\t\t'dsc_curso_interes_fml' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\n\t break;\n\t }\n\n\t\t case 2: // Religiosidade\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\n\t\t\t\t\t\t\t\t\t\t'dsc_religiao_fml' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_institu_religiosa_freqtd' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_freq_institu_religiosa' => '',\n\t\t\t\t\t\t\t\t\t\t'habito_prece_oracao' => 'S',\n\t\t\t\t\t\t\t\t\t\t'evangelho_lar' => 'S',\n\t\t\t\t\t\t\t\t\t\t'conhece_espiritismo' => 'S',\n\t\t\t\t\t\t\t\t\t\t'vont_aprox_espiritismo' => 'S',\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\n\t break;\n\t }\n\n\t\t case 3: // Moradia\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'dsc_casa' => '',\n\t\t\t\t\t\t\t\t\t\t'exist_anim_inset_insal_perig' => 'N',\n\t\t\t\t\t\t\t\t\t\t'dsc_anim_inset_insal_perig' => '',\n\t\t\t\t\t\t\t\t\t\t'exist_anim_estima' => 'N',\n\t\t\t\t\t\t\t\t\t\t'dsc_anim_estima' => '',\n\t\t\t\t\t\t\t\t\t\t'vacina_anti_rabica_anim_estima' => 'N',\n\t\t\t\t\t\t\t\t\t\t'cd_agua_moradia' => 0,\n\t\t\t\t\t\t\t\t\t\t'cd_esgoto_moradia' => 0,\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\n\t break;\n\t }\t \n\n\t\t case 4: // Saude\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'dsc_cndc_saude_membros_fml' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_carteira_vacina_crianca' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_doenca_cronica_fml' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_restricao_alimentar' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_higiene_pessoal' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\n\t break;\n\t }\n\n\t\t case 5: // Despesa\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\t'cd_tip_moradia' => 1,\n\t\t\t\t\t\t\t\t\t\t'dsc_dono_cedente_moradia' => '',\n\t\t\t\t\t\t\t\t\t\t'vlr_desp_agua' => 0,\n\t\t\t\t\t\t\t\t\t\t'vlr_desp_energia' => 0,\n\t\t\t\t\t\t\t\t\t\t'vlr_desp_iptu' => 0,\n\t\t\t\t\t\t\t\t\t\t'vlr_desp_gas' => 0,\n\t\t\t\t\t\t\t\t\t\t'vlr_desp_condominio' => 0,\n\t\t\t\t\t\t\t\t\t\t'vlr_desp_outra_manut' => 0,\n\t\t\t\t\t\t\t\t\t\t'dsc_desp_outra_manut' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_desp_saude_medicamento' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_desp_educ_creche_cuidadora' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_desp_transporte' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_desp_alimenta_especial' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_outra_desp_geral' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\t \n\t break;\n\t }\n\n\t\t case 6: // Renda\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\t'cd_tip_trab' => 1,\n\t\t\t\t\t\t\t\t\t\t'vlr_renda_tip_trab' => 0,\n\t\t\t\t\t\t\t\t\t\t'dsc_tip_beneficio' => '',\n\t\t\t\t\t\t\t\t\t\t'vlr_renda_tip_beneficio' => 0,\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\t\n\t break;\n\t }\n\n\t\t case 7: // Capacitação Profissional\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\t \t\n\t\t\t\t\t\t\t\t\t\t'dsc_expect_fml_capacit_profi' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_curso_intere_profi_tecnico' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_projeto_gera_renda_extra' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\t\t \n\t break;\n\t }\n\n\t\t case 8: // Aspectos Intimos\n\t\t {\n\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\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'dsc_aspecto_intimo' => '',\n\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t);\t\t \t \n\t break;\n\t }\n\t\t \t}\n\n\t\t} else {\n\n\t\t\t// Esta Section é chamada tanto na Conclusão do Relatório, quanto na revisão\n\t\t\tif ($_POST['origem'] == 'conclusaoRelatorio') {\n\t\t\t\t$cd_est_acomp1 = 1;\t\t\t// Pendente de Término de registro de Triagem/Visita\n\t\t\t} else {\t\t\t\t\t// == 'conclusaoRevisao'\n\t\t\t\t$cd_est_acomp1 = 2;\t\t\t// Pendente de Término de revisão\n\t\t\t}\n\n\t\t\t// Obtem Atividade e Estado do Acompanhamento do Sequancial de Acompanhamento Atual\n\t\t\t$dadosAcompBase = Container::getModel('TbAcompFml');\n\t\t\t$dadosAcompBase->__set('cd_fml', $_POST['cd_fml']);\n\t\t\t$dadosAcompBase->__set('seql_acomp', $seqlAcomp->__get('seql_max'));\n\t\t\t$dadosAcomp = $dadosAcompBase->getAtvdAcomp();\t\t\t\n\n\t\t\t// Já houve triagem anterior e é a que está na base atualmente. Tem que se criar uma nova\n\t\t\tif ($dadosAcomp['cd_est_acomp'] != $cd_est_acomp1) {\n\t\t\t\t$data_hoje \t\t= \tnew \\DateTime();\n\t\t\t\t$data_hoje \t\t= \t$data_hoje->format(\"Y-m-d\");\n\t\t\t\t\n\t\t\t\tswitch ($this->view->segmento)\n\t\t\t \t{\n\t\t\t case 1: // Educação\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\n\t\t\t\t\t\t\t\t\t\t\t'cd_freq_crianca_adoles_escola' => 1,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_mtvo_freq_escolar' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_desemp_estudo' => '',\n\t\t\t\t\t\t\t\t\t\t\t'cd_interes_motiva_voltar_estudar' => 1,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_curso_interes_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\n\t\t break;\n\t\t }\n\n\t\t\t case 2: // Religiosidade\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_religiao_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_institu_religiosa_freqtd' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_freq_institu_religiosa' => '',\n\t\t\t\t\t\t\t\t\t\t\t'habito_prece_oracao' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t'evangelho_lar' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t'conhece_espiritismo' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t'vont_aprox_espiritismo' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\n\t\t break;\n\t\t }\n\n\t\t\t case 3: // Moradia\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'dsc_casa' => '',\n\t\t\t\t\t\t\t\t\t\t\t'exist_anim_inset_insal_perig' => 'N',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_anim_inset_insal_perig' => '',\n\t\t\t\t\t\t\t\t\t\t\t'exist_anim_estima' => 'N',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_anim_estima' => '',\n\t\t\t\t\t\t\t\t\t\t\t'vacina_anti_rabica_anim_estima' => 'N',\n\t\t\t\t\t\t\t\t\t\t\t'cd_agua_moradia' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'cd_esgoto_moradia' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\n\t\t break;\n\t\t }\t \n\n\t\t\t case 4: // Saude\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'dsc_cndc_saude_membros_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_carteira_vacina_crianca' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_doenca_cronica_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_restricao_alimentar' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_higiene_pessoal' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\n\t\t break;\n\t\t }\n\n\t\t\t case 5: // Despesa\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'cd_tip_moradia' => 1,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_dono_cedente_moradia' => '',\n\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_agua' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_energia' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_iptu' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_gas' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_condominio' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_outra_manut' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_outra_manut' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_saude_medicamento' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_educ_creche_cuidadora' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_transporte' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_alimenta_especial' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_outra_desp_geral' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\t \n\t\t break;\n\t\t }\n\n\t\t\t case 6: // Renda\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'cd_tip_trab' => 1,\n\t\t\t\t\t\t\t\t\t\t\t'vlr_renda_tip_trab' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_tip_beneficio' => '',\n\t\t\t\t\t\t\t\t\t\t\t'vlr_renda_tip_beneficio' => 0,\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\t\n\t\t break;\n\t\t }\n\n\t\t\t case 7: // Capacitação Profissional\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dsc_expect_fml_capacit_profi' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_curso_intere_profi_tecnico' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_projeto_gera_renda_extra' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\t\t \n\t\t break;\n\t\t }\n\n\t\t\t case 8: // Aspectos Intimos\n\t\t\t {\n\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\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'dsc_aspecto_intimo' => '',\n\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t);\t\t \t \n\t\t break;\n\t\t }\n\t\t\t \t}\n\n\t\t\t} else {\n\n\t\t\t\t// Verificar se há dados de Triagem, pois pode ser que foi gravado somente tb_acomp_fml, por enquanto\n\t\t\t\t$verificaTriagem = Container::getModel('TbSegmtoTriagemFml');\n\t\t\t\t$verificaTriagem->__set('codFamilia', $_POST['cd_fml']);\n\t\t\t\t$verificaTriagem->__set('seqlAcomp', $seqlAcomp->__get('seql_max'));\n\t\t\t\t$verificaTriagem->__set('codSegmtoTriagem', $this->view->segmento);\n\t\t\t\t$verificaTriagemBase = $verificaTriagem->getQtdSegmentoTriagem();\n\n\t\t\t\tif ($verificaTriagemBase['qtde'] > 0) {\n\t\t\t\t\t// Obtem dados da Triagem\n\t\t\t\t\t$obtemDadosTriagem = Container::getModel('TbSegmtoTriagemFml');\n\t\t\t\t\t$obtemDadosTriagem->__set('cd_fml', $_POST['cd_fml']);\n\t\t\t\t\t$obtemDadosTriagem->__set('seql_acomp', $seqlAcomp->__get('seql_max'));\n\t\t\t\t\t$obtemDadosTriagem->__set('cd_segmto_triagem', $this->view->segmento);\n\t\t\t\t\t$this->obtemDadosTriagemBase = $obtemDadosTriagem->getDadosSegmentoTriagem();\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$data_hoje \t\t= \tnew \\DateTime();\n\t\t\t\t\t$data_hoje \t\t= \t$data_hoje->format(\"Y-m-d\");\n\t\t\t\t\t\n\t\t\t\t\tswitch ($this->view->segmento)\n\t\t\t\t {\n\t\t\t\t case 1: // Educação\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\n\t\t\t\t\t\t\t\t\t\t\t\t'cd_freq_crianca_adoles_escola' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_mtvo_freq_escolar' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_desemp_estudo' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'cd_interes_motiva_voltar_estudar' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_curso_interes_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\n\t\t\t break;\n\t\t\t }\n\n\t\t\t\t case 2: // Religiosidade\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_religiao_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_institu_religiosa_freqtd' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_freq_institu_religiosa' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'habito_prece_oracao' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t\t'evangelho_lar' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t\t'conhece_espiritismo' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t\t'vont_aprox_espiritismo' => 'S',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\n\t\t\t break;\n\t\t\t }\n\n\t\t\t\t case 3: // Moradia\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_casa' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'exist_anim_inset_insal_perig' => 'N',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_anim_inset_insal_perig' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'exist_anim_estima' => 'N',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_anim_estima' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'vacina_anti_rabica_anim_estima' => 'N',\n\t\t\t\t\t\t\t\t\t\t\t\t'cd_agua_moradia' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'cd_esgoto_moradia' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\n\t\t\t break;\n\t\t\t }\t \n\n\t\t\t\t case 4: // Saude\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_cndc_saude_membros_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_carteira_vacina_crianca' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_doenca_cronica_fml' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_restricao_alimentar' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_higiene_pessoal' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\n\t\t\t break;\n\t\t\t }\n\n\t\t\t\t case 5: // Despesa\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'cd_tip_moradia' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_dono_cedente_moradia' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_agua' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_energia' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_iptu' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_gas' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_condominio' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_desp_outra_manut' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_outra_manut' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_saude_medicamento' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_educ_creche_cuidadora' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_transporte' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_desp_alimenta_especial' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_outra_desp_geral' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\t \n\t\t\t break;\n\t\t\t }\n\n\t\t\t\t case 6: // Renda\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'cd_tip_trab' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_renda_tip_trab' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_tip_beneficio' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'vlr_renda_tip_beneficio' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\t\n\t\t\t break;\n\t\t\t }\n\n\t\t\t\t case 7: // Capacitação Profissional\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\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'dsc_expect_fml_capacit_profi' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_curso_intere_profi_tecnico' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_projeto_gera_renda_extra' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\t\t \n\t\t\t break;\n\t\t\t }\n\n\t\t\t\t case 8: // Aspectos Intimos\n\t\t\t\t {\n\t\t\t\t \t$this->obtemDadosTriagemBase = array (\t\t \t\n\t\t\t\t\t\t\t\t\t\t\t\t'dt_reg_seg_triagem' => $data_hoje,\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'dsc_aspecto_intimo' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t'dsc_prgm_trab' => ''\n\t\t\t\t\t\t\t\t\t);\t\t \t \n\t\t\t break;\n\t\t\t }\n\t\t\t\t\t} // switch ($this->view->segmento)\n\t\t\t\t}\t// if ($verificaTriagemBase['qtde'] > 0) {\n\t\t\t}\t// if ($dadosAcomp['cd_est_acomp'] != $cd_est_acomp1) {\n\t\t}\t// if (empty($seqlAcomp->__get('seql_max'))) {\n\n\t}", "title": "" }, { "docid": "7d1694f912eb99513e39546a8b919443", "score": "0.5518994", "text": "public function matriz_evaluacion_Acumulado($aper_programa){\n $nro_1=0;$nro_2=0;$nro_3=0;$total=0;$pcion=0;$npcion=0;\n $nro_cum=0;$nro_proc=0;$nro_ncum=0;$nro_total_prog=0; $nro_cum_a=0;$nro_proc_a=0;$nro_ncum_a=0;$nro_total_prog_a=0;\n \n for ($i=1; $i <=$this->tmes ; $i++) { \n \n $cum=$this->model_evalregional->evaluacion_programas_nacional($aper_programa,1,$i);\n $proc=$this->model_evalregional->evaluacion_programas_nacional($aper_programa,2,$i);\n $ncum=$this->model_evalregional->evaluacion_programas_nacional($aper_programa,3,$i);\n $total_prog=$this->model_evalregional->total_programado_programas_nacional($aper_programa,$i); // total programado prod\n\n /*------------- Acumulado Producto -------*/\n if(count($cum)!=0){\n $nro_cum=$nro_cum+$cum[0]['total'];\n }\n if(count($proc)!=0){\n $nro_proc=$nro_proc+$proc[0]['total'];\n }\n if(count($ncum)!=0){\n $nro_ncum=$nro_ncum+$ncum[0]['total'];\n }\n if(count($total_prog)!=0){\n $nro_total_prog=$nro_total_prog+$total_prog[0]['total'];\n }\n\n\n $nro_1=$nro_cum;\n $nro_2=$nro_proc;\n $nro_3=$nro_ncum;\n $total_programado=$nro_total_prog;\n\n\n if($total_programado!=0){\n $total=$nro_1+$nro_2+$nro_3;\n $pcion= round((($nro_1/$total_programado)*100),2);\n $npcion=(100-$pcion);\n //$npcion=round(((($nro_2+$nro_3)/$total_programado)*100),2);\n }\n \n if($total==0){\n $npcion=100;\n }\n }\n\n $cat[1]=$nro_1; // cumplidos\n $cat[2]=$nro_2; // en proceso\n $cat[3]=$nro_3; // no cumplido\n $cat[4]=$total; // Total Evaluacion\n $cat[5]=$pcion; // % cumplido\n $cat[6]=$npcion; // % no cumplido\n $cat[7]=$total_programado; // Total Programado\n\n return $cat;\n }", "title": "" }, { "docid": "62099b66057b01cb92f8e18401ceb75e", "score": "0.5515686", "text": "function monta_linha_digitavel() {\n $codigo = $this->codigo_barras();\n\n switch ($this->codigo_banco) {\n case \"001\":\n // Posição Conteúdo\n // 5 Digito verificador do Código de Barras\n // 6 a 19 Valor (12 inteiros e 2 decimais)\n // 20 a 44 Campo Livre definido por cada banco\n // 1. Campo - composto pelo código do banco, código da moéda, as cinco primeiras posições\n // do campo livre e DV (modulo10) deste campo\n $p1 = substr($codigo, 0, 4); // 1 a 3 - Número do banco // 4 - Código da Moeda - 9 para Real\n $p2 = substr($codigo, 19, 5);\n $p3 = $this->modulo_10(\"$p1$p2\");\n $p4 = \"$p1$p2$p3\";\n $p5 = substr($p4, 0, 5);\n $p6 = substr($p4, 5);\n $campo1 = \"$p5.$p6\";\n\n // 2. Campo - composto pelas posiçoes 6 a 15 do campo livre\n // e livre e DV (modulo10) deste campo\n $p1 = substr($codigo, 24, 10);\n $p2 = $this->modulo_10($p1);\n $p3 = \"$p1$p2\";\n $p4 = substr($p3, 0, 5);\n $p5 = substr($p3, 5);\n $campo2 = \"$p4.$p5\";\n\n // 3. Campo composto pelas posicoes 16 a 25 do campo livre\n // e livre e DV (modulo10) deste campo\n $p1 = substr($codigo, 34, 10);\n $p2 = $this->modulo_10($p1);\n $p3 = \"$p1$p2\";\n $p4 = substr($p3, 0, 5);\n $p5 = substr($p3, 5);\n $campo3 = \"$p4.$p5\";\n\n // 4. Campo - digito verificador do codigo de barras\n $campo4 = substr($codigo, 4, 1);\n\n // 5. Campo composto pelo valor nominal pelo valor nominal do documento, sem\n // indicacao de zeros a esquerda e sem edicao (sem ponto e virgula). Quando se\n // tratar de valor zerado, a representacao deve ser 000 (tres zeros).\n $campo5 = substr($codigo, 5, 14);\n break;\n case 341:\n // campo 1\n $banco = substr($codigo, 0, 3);\n $moeda = substr($codigo, 3, 1);\n $ccc = substr($codigo, 19, 3);\n $ddnnum = substr($codigo, 22, 2);\n\n $dv1 = $this->modulo_10($banco . $moeda . $ccc . $ddnnum);\n // campo 2\n $resnnum = substr($codigo, 24, 6);\n $dac1 = substr($codigo, 30, 1); //modulo_10($agencia.$conta.$carteira.$nnum);\n $dddag = substr($codigo, 31, 3);\n $dv2 = $this->modulo_10($resnnum . $dac1 . $dddag);\n // campo 3\n $resag = substr($codigo, 34, 1);\n $contadac = substr($codigo, 35, 6); //substr($codigo,35,5).modulo_10(substr($codigo,35,5));\n $zeros = substr($codigo, 41, 3);\n $dv3 = $this->modulo_10($resag . $contadac . $zeros);\n // campo 4\n $dv4 = substr($codigo, 4, 1);\n // campo 5\n $fator = substr($codigo, 5, 4);\n $valor = substr($codigo, 9, 10);\n\n $campo1 = substr($banco . $moeda . $ccc . $ddnnum . $dv1, 0, 5) . '.' . substr($banco . $moeda . $ccc . $ddnnum . $dv1, 5, 5);\n $campo2 = substr($resnnum . $dac1 . $dddag . $dv2, 0, 5) . '.' . substr($resnnum . $dac1 . $dddag . $dv2, 5, 6);\n $campo3 = substr($resag . $contadac . $zeros . $dv3, 0, 5) . '.' . substr($resag . $contadac . $zeros . $dv3, 5, 6);\n $campo4 = $dv4;\n $campo5 = $fator . $valor;\n break;\n }\n\n return \"$campo1 $campo2 $campo3 $campo4 $campo5\";\n }", "title": "" }, { "docid": "73bbf657596e793fca001a99347e524c", "score": "0.55120987", "text": "public function store(Request $request)\n { \n\n $columnapivote = 0;\n $filapivote = 0;\n\n $datos = $request->all();\n $funcion = array();\n $objetivo = $request->objetivo;\n\n $matrizprincipal = array(); //funcion principal\n $matrizcalcular = array();\n $matrizvariables = array(); //Matriz Principal\n\n $funcion_aux_1 = array(); //Coeficientes principal\n $funcion_aux = array(); //Funcion principal\n $funcion_aux[0] = 'Z';\n $funcion_aux_1[0] = 1;\n\n $funcionfase1 = array();\n\n for ($i = 1; $i <= $request->variable; $i++) {\n $funcion[$i] = $datos['fun_'.$i];\n $funcion_aux[$i] = 'X'.$i;\n $funcion_aux_1[$i] = 0;\n }\n\n\n $funcionfase1 = $funcion;\n $funcionfase_aux = $funcion;\n\n for ($n = 1; $n <= $request->restriccion; $n++) {\n for ($m = 1; $m <= $request->variable; $m++) {\n\n $matrizprincipal[$n][$m] = $datos['res_'.$m.'_'.$n];\n $matrizprincipal[$n][$m+1] = $datos[$n.'_accion'];\n $matrizprincipal[$n][$m+2] = $datos['resultado_'.$n];\n }\n }\n//≥ ≤ \n //dd($funcion);\n\n $variable = $request->variable;\n $restriccion = $request->restriccion;\n $matrizcalcular = $matrizprincipal;\n\n for($i = 1; $i <= $variable; $i++){\n $funcionfase1[0] = 1;\n $funcionfase1[$i] = 0;\n $funcionfase1[$i] = 0;\n $funcionfase_aux[0] = 1; \n $funcionfase_aux[$i] = 0; \n $funcionfase_aux[$i] = 0; \n }\n \n $cont = array();\n $cont['A'] = 1;\n $cont['S'] = 1;\n $cont['H'] = 1;\n\n\n /* Z X1 X2 Xn A1 A2 An S1 Sn H1 Hn */\n for ($n = 1; $n <= $request->restriccion; $n++) {\n\n if($matrizcalcular[$n][$variable+1] == '='){\n $funcionfase1[count($funcionfase1)] = -1;\n $funcion_aux[count($funcionfase1)-1] = 'A'.$cont['A'];\n $funcion_aux_1[count($funcionfase1)-1] = -1;\n $cont['A']++;\n\n //$matrizcalcular[$n][$variable+1] = '1';\n //$matrizcalcular[$n][$variable+3] = $matrizcalcular[$n][$variable+2];\n //$matrizcalcular[$n][$variable+2] = '=';\n }else if($matrizcalcular[$n][$variable+1] == '≥'){\n $funcionfase1[count($funcionfase1)] = -1;\n $funcionfase1[count($funcionfase1)] = 0;\n\n $funcion_aux_1[count($funcionfase1)-2] = -1;\n $funcion_aux_1[count($funcionfase1)-1] = 0;\n\n $funcion_aux[count($funcionfase1)-2] = 'A'.$cont['A'];\n $funcion_aux[count($funcionfase1)-1] = 'S'.$cont['S'];\n $cont['A']++;\n $cont['S']++;\n\n /*$aux_resultado = $matrizcalcular[$n][$variable+2];\n $matrizcalcular[$n][$variable+1] = '-1';\n $matrizcalcular[$n][$variable+2] = '1';\n $matrizcalcular[$n][$variable+4] = $aux_resultado;\n $matrizcalcular[$n][$variable+3] = '=';*/\n }else if($matrizcalcular[$n][$variable+1] == '≤'){\n $funcionfase1[count($funcionfase1)] = 0;\n\n $funcion_aux_1[count($funcionfase1)-1] = 0;\n $funcion_aux[count($funcionfase1)-1] = 'H'.$cont['H'];\n $cont['H']++;\n\n /*$matrizcalcular[$n][$variable+1] = '1';\n $matrizcalcular[$n][$variable+3] = $matrizcalcular[$n][$variable+2];\n $matrizcalcular[$n][$variable+2] = '=';*/\n }\n }\n\n $funcionfase1[count($funcionfase1)] = 0;\n $funcion_aux[count($funcion_aux)] = 'R';\n $funcion_aux_1[count($funcion_aux)-1] = 0;\n\n $matrizvariables[0] = $funcion_aux;\n $matrizvariables[1] = $funcion_aux_1;\n \n\n $cont['variables'] = count($matrizvariables[0]);\n\n for ($i=2; $i <= $restriccion+1; $i++) { \n for ($y=0; $y < $cont['variables']; $y++) { \n $matrizvariables[$i][$y] = 0;\n } \n }\n\n for ($n = 2; $n <= ($request->restriccion)+1; $n++) {\n\n for($i = 1; $i <= $variable; $i++){\n\n $matrizvariables[$n][$i] = (float)$matrizcalcular[$n-1][$i];\n $matrizvariables[$n][$i] = (float)$matrizcalcular[$n-1][$i];\n $matrizvariables[$n][$cont['variables']-1] = (float)$matrizcalcular[$n-1][$i+2];\n\n }\n } \n \n for($n = 2; $n <= $request->restriccion+1; $n++) {\n\n if($matrizcalcular[$n-1][$variable+1] == '='){\n\n $funcionfase_aux[count($funcionfase_aux)] = 1;\n $matrizvariables[$n][count($funcionfase_aux)-1] = 1;\n\n }else if($matrizcalcular[$n-1][$variable+1] == '≥'){\n $funcionfase_aux[count($funcionfase_aux)] = 1;\n $funcionfase_aux[count($funcionfase_aux)] = 1;\n\n $matrizvariables[$n][count($funcionfase_aux)-2] = 1;\n $matrizvariables[$n][count($funcionfase_aux)-1] = -1;\n\n }else if($matrizcalcular[$n-1][$variable+1] == '≤'){\n //dd('hola');\n $funcionfase_aux[count($funcionfase_aux)] = 'H';\n $matrizvariables[4][count($funcionfase_aux)-1] = 1;\n\n }\n }\n\n $calcular1 = $matrizvariables;\n\n\n $busqueda = array_search('A1', $calcular1[0], false);\n $dato = -1;\n $auxvar = 1;\n\n $busqueda = array_search('A1', $calcular1[0], false);\n $dato = $calcular1[1][$busqueda];\n\n \n $calcular1 = $this->convertirenceroini($calcular1, $busqueda, $restriccion, $variable, $cont);\n\n /*$columnapivote = $this->calcularcolumnapivote($calcular1, $variable, $restriccion);\n $filapivote = $this->calcularfilapivote($calcular1, $variable, $restriccion, $columnapivote);\n $calcular1 = $this->convertirenuno($calcular1, $restriccion, $variable, $columnapivote, $filapivote);\n $calcular1 = $this->convertirencero($calcular1, $restriccion, $variable, $columnapivote, $filapivote);\n\n $columnapivote = $this->calcularcolumnapivote($calcular1, $variable, $restriccion);\n $filapivote = $this->calcularfilapivote($calcular1, $variable, $restriccion, $columnapivote);\n $calcular1 = $this->convertirenuno($calcular1, $restriccion, $variable, $columnapivote, $filapivote);\n $calcular1 = $this->convertirencero($calcular1, $restriccion, $variable, $columnapivote, $filapivote);*/\n\n \n for($i = 0; $i < $variable; $i++){\n $columnapivote = $this->calcularcolumnapivote($calcular1, $variable, $restriccion);\n $filapivote = $this->calcularfilapivote($calcular1, $variable, $restriccion, $columnapivote);\n $calcular1 = $this->convertirenuno($calcular1, $restriccion, $variable, $columnapivote, $filapivote);\n $calcular1 = $this->convertirencero($calcular1, $restriccion, $variable, $columnapivote, $filapivote);\n }\n //dd($calcular1, $matrizprincipal, $variable);\n\n $calcular2 = $calcular1;\n\n \n\n for($i = 1; $i <= $cont['A']; $i++){\n $busqueda = array_search('A'.$i, $calcular2[0], false);\n\n for($y = 0; $y < $restriccion+2; $y++){\n //$calcular2[$y][$busqueda] = $calcular2[$y][$busqueda+1];\n unset($calcular2[$y][$busqueda]);\n }\n //dd($busqueda, $calcular2);\n }\n \n\n for($y = 1; $y <= $variable; $y++){\n \n $calcular2[1][$y] = -1 *$funcion[$y];\n }\n\n for($y = 0; $y <= $restriccion+1; $y++){ \n $calcular2[$y][0] = 0;\n }\n $calcular2[0][0] = 'Z';\n $calcular2[1][0] = 1;\n\n $calcular2_aux = array();\n\n for($y = 0; $y <= $restriccion+1; $y++){ \n ksort($calcular2[$y]);\n }\n \n\n $auxx = 0;\n\n for($y = 0; $y <= $restriccion+1; $y++){ \n $auxx = 0; \n foreach ($calcular2[$y] as $key) {\n $calcular2_aux[$y][$auxx] = $key;\n $auxx++;\n }\n }\n\n $calcular2 = $calcular2_aux;\n \n for($i = 0; $i < $variable; $i++){\n $columnapivote2 = $this->calcularcolumnapivote($calcular2, $variable, $restriccion);\n $filapivote2 = $this->calcularfilapivote($calcular2, $variable, $restriccion, $columnapivote2);\n $calcular2 = $this->convertirenuno($calcular2, $restriccion, $variable, $columnapivote2, $filapivote2);\n $calcular2 = $this->convertirencero($calcular2, $restriccion, $variable, $columnapivote2, $filapivote2);\n }\n dd($calcular2, $calcular2[$filapivote2][$columnapivote2]);\n /*$cont_val = 0;\n do{ \n\n $columnapivote = $this->calcularcolumnapivote($calcular2, $variable, $restriccion);\n $filapivote = $this->calcularfilapivote($calcular2, $variable, $restriccion, $columnapivote);\n //dd($columnapivote, $calcular2);\n $calcular2 = $this->convertirenuno($calcular2, $restriccion, $variable, $columnapivote, $filapivote);\n $calcular2 = $this->convertirencero($calcular2, $restriccion, $variable, $columnapivote, $filapivote);\n //dd($calcular1, $matriz_aux, $busqueda);\n //echo $busqueda;\n $cont_val++;\n }while($cont_val < $variable);\n */\n $columnapivote2 = $this->calcularcolumnapivote($calcular2, $variable, $restriccion);\n $filapivote2 = $this->calcularfilapivote($calcular2, $variable, $restriccion, $columnapivote2);\n \n $calcular2 = $this->convertirenuno($calcular2, $restriccion, $variable, $columnapivote2, $filapivote2);\n \n $calcular2 = $this->convertirencero($calcular2, $restriccion, $variable, $columnapivote2, $filapivote2);\n \n\n \n }", "title": "" }, { "docid": "b3c684e496e23233c9ff06fb9e1f3d0d", "score": "0.5494169", "text": "function prueba(){\n // AppLoader::load_model('Extra/IRespuestas');\n//hallar estudiantes de la prueba actualq eu ya alla llenado el simulacro con respuestas\n $pruebaActual=DB::query(\"select valor from sys_configuraciones where nombre='I.COD_CUESTIONARIO_ACTUAL';\");\n \n \n $estudiantesD=ICuestionario::codigoInterno_estudiantePrueba($pruebaActual);\n //print_r ($estudiantesD);\n //echo \"miremos si sale en esa vaina\";\n GeneraPuntaje::GeneraPuntaje($pruebaActual);\n}", "title": "" }, { "docid": "883e263cd5c2539e4132201a8be9d3d8", "score": "0.54912996", "text": "public function matriz_evaluacion_trimestre($aper_programa){\n $nro_1=0;$nro_2=0;$nro_3=0;$total=0;$pcion=0;$npcion=0;\n $nro_cum=0;$nro_proc=0;$nro_ncum=0;$nro_total_prog=0; $nro_cum_a=0;$nro_proc_a=0;$nro_ncum_a=0;$nro_total_prog_a=0;\n \n $cum=$this->model_evalregional->evaluacion_programas_nacional($aper_programa,1,$this->tmes);\n $proc=$this->model_evalregional->evaluacion_programas_nacional($aper_programa,2,$this->tmes);\n $ncum=$this->model_evalregional->evaluacion_programas_nacional($aper_programa,3,$this->tmes);\n $total_prog=$this->model_evalregional->total_programado_programas_nacional($aper_programa,$this->tmes); // total programado prod\n\n /*------------- Acumulado Producto -------*/\n if(count($cum)!=0){\n $nro_cum=$nro_cum+$cum[0]['total'];\n }\n if(count($proc)!=0){\n $nro_proc=$nro_proc+$proc[0]['total'];\n }\n if(count($ncum)!=0){\n $nro_ncum=$nro_ncum+$ncum[0]['total'];\n }\n if(count($total_prog)!=0){\n $nro_total_prog=$nro_total_prog+$total_prog[0]['total'];\n }\n\n $nro_1=$nro_cum;\n $nro_2=$nro_proc;\n $nro_3=$nro_ncum;\n $total_programado=$nro_total_prog;\n\n if($total_programado!=0){\n $total=$nro_1+$nro_2+$nro_3;\n $pcion= round((($nro_1/$total_programado)*100),2);\n $npcion=(100-$pcion);\n //$npcion=round(((($nro_2+$nro_3)/$total_programado)*100),2);\n }\n \n if($total==0){\n $npcion=100;\n }\n\n $cat[1]=$nro_1; // cumplidos\n $cat[2]=$nro_2; // en proceso\n $cat[3]=$nro_3; // no cumplido\n $cat[4]=$total; // Total Evaluacion\n $cat[5]=$pcion; // % cumplido\n $cat[6]=$npcion; // % no cumplido\n $cat[7]=$total_programado; // Total Programado\n\n return $cat;\n }", "title": "" }, { "docid": "5be2a1c59a52b253c0150bfd91060881", "score": "0.5483785", "text": "public function resultadosUnico($arg = array()) {\n HandlerSession()->check_session(USER_TUTOR);\n //$docente = $_SESSION['id'];\n $this->modelo = new DocenteModel();\n $datosDocente = $this->modelo->getDocente($_POST['docente']);\n\n $docente = $datosDocente[0]['id'];\n $nombre = $datosDocente[0]['nombre'];\n\n\n $this->modelo = new DocenteModel();\n $cursos = $this->modelo->curso($_POST['select']);\n $grupo_n = $cursos[0]['grupo'];\n\n $asignaturaModelo = new AsignaturaModel();\n $asignaturas = $asignaturaModelo->get($cursos[0]['asignatura']);\n $asignatura = $asignaturas[0]['nombre'];\n\n // total de alumnos encuestados\n $totalEcuestados = 0;\n foreach ($cursos as $curso) {\n // aquí se podria sacar un total por curso\n $this->modelo = new DocenteModel();\n $totalEcuestados += $this->modelo->encuestados($curso[\"id\"]);\n }\n\n// echo \"Total de encuestados \" . $totalEcuestados . \"<br>\";\n exit(0);\n $datos = array();\n $mensaje = \"\";\n $tipo = \"\";\n if ($totalEcuestados == 0) {\n $mensaje = \"Por el momento aún no hay resultados.\";\n $tipo = \"callout-warning\";\n $arg[0] = $docente;\n //$this->vista->resultados($arg);\n header(\"Location: /tutor/resultados/\" . $docente);\n } else {\n $this->modelo = new DocenteModel();\n $dimensiones = $this->modelo->getDimensiones();\n\n foreach ($cursos as $curso) {\n $sumaPromedio = 0;\n $numeroDimensiones = 0;\n foreach ($dimensiones as $key => $dimension) {\n echo \"id \" . $curso[\"id\"];\n echo \"Nombre \" . $curso[\"nombre\"];\n echo \"Grupo \" . $curso[\"grupo\"];\n $totalEcuestadosCurso = $this->modelo->encuestados($curso[\"id\"]);\n $this->modelo = new DocenteModel();\n $encuestadosDimension = $this->modelo->puntosDimensionUnico($docente, $dimension[\"idDimension\"], $_POST['select']);\n // numero de puntos por dimension\n $puntosDimension = $dimension[\"puntos\"];\n if ($encuestadosDimension[0]['obtenidos'] != NULL) {\n $puntosObtenidos = $encuestadosDimension[0]['obtenidos'];\n $porcentaje = (100 * $puntosObtenidos) / ($puntosDimension * $totalEcuestadosCurso);\n echo \"Dimension \" . $dimension[\"idDimension\"] . \" \" . $puntosDimension . \" - \" . $puntosDimension * $totalEcuestados . \" $puntosObtenidos - $porcentaje <br>\";\n $sumaPromedio += round($porcentaje);\n $numeroDimensiones++;\n $color = \"danger\";\n if ($porcentaje >= 90)\n $color = \"success\";\n else if ($porcentaje >= 80)\n $color = \"info\";\n else if ($porcentaje >= 70)\n $color = \"warning\";\n $datos[] = array(\"id\" => $dimension[\"idDimension\"], \"dimension\" => $dimension[\"dimension\"], \"color\" => $color, \"porcentaje\" => round($porcentaje));\n }\n }\n }\n //exit();\n $promedio = $sumaPromedio / $numeroDimensiones;\n $color = \"danger\";\n if ($promedio >= 90)\n $color = \"success\";\n else if ($promedio >= 80)\n $color = \"info\";\n else if ($promedio >= 70)\n $color = \"warning\";\n\n $this->vista->resultadosUnicos($datos, $promedio, $color, $mensaje, $tipo, $nombre, $docente, $grupo_n, $asignatura);\n }\n }", "title": "" }, { "docid": "1c6187b5f92651d36504a44e971d5cda", "score": "0.5479571", "text": "function Ejercito($array)\r\n\t{\r\n\t\t$this->Flotas=array();\r\n\t\t$this->NavesTotales=0;\r\n\t\tforeach ($array as $idJugador=>$flota)\r\n\t\t{\r\n\t\t\t$claseFlota=new FlotaJugador($idJugador);\r\n\t\t\t$contadorNaves=0;\r\n\t\t\tforeach ($flota as $idUnidad=>$cantidad)\r\n\t\t\t{\r\n\t\t\t\t$caracteristicas=CaracteristicasActualesArmamento($idUnidad,$flota);\r\n\t\t\t\t$claseNave=new Unidad();\r\n\t\t\t\t$claseNave->Cantidad=$cantidad;\r\n\t\t\t\t$claseNave->CantidadInicial=$cantidad;\r\n\t\t\t\t$claseNave->CantidadInicioBatalla=$cantidad;\r\n\t\t\t\t$claseNave->Escudo=$caracteristicas->Escudo*$cantidad;\r\n\t\t\t\t$claseNave->Casco=$caracteristicas->Casco*$cantidad;\r\n\t\t\t\t$claseNave->Ataque=$caracteristicas->Ataque;\r\n\t\t\t\t$claseNave->ProbabilidadEsquivar=(int)round(-5.92*log($caracteristicas->Casco)+56.03);\r\n\t\t\t\t$claseNave->ID=$idUnidad;\r\n\t\t\t\t$claseNave->Info=$caracteristicas;\r\n\t\t\t\t$claseNave->Nombre=GetTechnology($idUnidad)->Name;\r\n\r\n\t\t\t\t$contadorNaves+=$cantidad;\r\n\t\t\t\t$claseFlota->Unidades[]=$claseNave;\r\n\t\t\t}\r\n\t\t\t$claseFlota->NumeroUnidades=$contadorNaves;\r\n\t\t\t$this->NavesTotales+=$contadorNaves;\r\n\t\t\t$this->Flotas[]=$claseFlota;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1008872bdf7dc914d30ff42e7bf03f6b", "score": "0.54774934", "text": "public function calcularDistanciaBayesEuclides($provincia, $precio, $clasificacion) {\n array_push($this->arrayValores, 0.7); // PROVINCIAS\n array_push($this->arrayValores, 0.10); //COSTO DE PAQUETES\n array_push($this->arrayValores, 0.2); //PARA LA CLASIFICACION\n \n //Se asignan las frecuencias de cada atributo por clase\n //GASTRONOMÍA\n $this->asignaFrecuenciasClaseGastro(\"provincia\", $provincia);\n $this->asignaFrecuenciasClaseGastro(\"costo_paquete\", $precio);\n $this->asignaFrecuenciasClaseGastro(\"puntuacion_hotel\", $clasificacion);\n //RENT A CAR\n $this->asignaFrecuenciasClaseRent(\"provincia\", $provincia);\n $this->asignaFrecuenciasClaseRent(\"costo_paquete\", $precio);\n $this->asignaFrecuenciasClaseRent(\"puntuacion_hotel\", $clasificacion);\n //TRANSPORTE ACUÁTICO Y AÉREO\n $this->asignaFrecuenciasClaseTrans(\"provincia\", $provincia);\n $this->asignaFrecuenciasClaseTrans(\"costo_paquete\", $precio);\n $this->asignaFrecuenciasClaseTrans(\"puntuacion_hotel\", $clasificacion);\n //ACTIVIDADES TEMÁTICAS\n $this->asignaFrecuenciasClaseTema(\"provincia\", $provincia);\n $this->asignaFrecuenciasClaseTema(\"costo_paquete\", $precio);\n $this->asignaFrecuenciasClaseTema(\"puntuacion_hotel\", $clasificacion);\n \n //Se asigana la probabilidad de cada cada frecuencia según la clase\n //GASTRONOMÍA\n $this->asignaProbabilidadPorFrecuenciaGastro();\n //RENT A CAR\n $this->asignaProbabilidadPorFrecuenciaRent();\n //TRANSPORTE ACUÁTICO Y AÉREO\n $this->asignaProbabilidadPorFrecuenciaTrans();\n //ACTIVIDADES TEMÁTICAS\n $this->asignaProbabilidadPorFrecuenciaTema();\n \n //Se multiplican todas las frecuencias según la clase\n $this->frecuenciasGastro = $this->productoFrecuencias($this->arrayProbFrecuenciaGastro); \n $this->frecuenciasRent = $this->productoFrecuencias($this->arrayProbFrecuenciaRent); \n $this->frecuenciasTrans = $this->productoFrecuencias($this->arrayProbFrecuenciaTrans);\n $this->frecuenciasTema = $this->productoFrecuencias($this->arrayProbFrecuenciaTema); \n \n // Se determina el resultado final que será retornado a la vista\n return $this->distanciaEuclidiana($provincia, $precio, $clasificacion, $this->determinaResultadoBayes());\n \n }", "title": "" }, { "docid": "82d598e43edb8d99a36e604ed5560118", "score": "0.54743385", "text": "function reversaMasa($valor, $simbolo){\n // console.log(\"////////////**************//////////\");\n if($simbolo==\"lb\"){\n // console.log(\"retornando libras\");\n $lb = $valor / 453.592;\n return $lb;\n }\n if($simbolo==\"oz\"){\n // console.log(\"retornando onzas\");\n $oz = $valor / 28.3495;\n return $oz;\n }\n if($simbolo==\"kg\"){\n // console.log(\"retornando kilogramos\");\n $kg = $valor / 1000;\n return $kg;\n }\n if($simbolo==\"hg\"){\n // console.log(\"retornando Hectogramos\");\n $hg = $valor / 100;\n return $hg;\n }\n if($imbolo==\"dag\"){\n // console.log(\"retornando Decagramos\");\n $dag = $valor / 10;\n return $dag;\n }\n if($simbolo == \"g\"){\n // console.log(\"retornando gramos\");\n return $valor;\n }\n if($simbolo==\"dg\"){\n // console.log(\"retornando Decigramos\");\n $dg = $valor * 10;\n return $dg;\n }\n if($simbolo==\"cg\"){\n // console.log(\"retornando centigramos\");\n $cg = $valor * 100;\n return $cg;\n }\n if($simbolo==\"mg\"){\n // console.log(\"retornando miligramos\");\n $mg = $valor * 1000;\n return $mg;\n }\n}", "title": "" }, { "docid": "87d2d957c5bb97f53ff681540cdfeaba", "score": "0.54667425", "text": "function calcul_serials() {\n\t\t//Dans l'ordre :\n\t\t//on applique les calculs unitaires\n\t\t//puis on applique les calculs dates\n\t\t//Temps que l'on trouve des algos unitaires on les appliques\n\t\t$liste_algo_tempo = array ();\n\t\t$liste_algo_restant = array ();\n\t\t$flag = true;\n\t\tforeach ( $this->algorythme as $nom_algo => $algo ) {\n\t\t\tif (! is_array ( $algo ))\n\t\t\t\tcontinue;\n\t\t\tif ($flag && ($algo [\"type\"] == \"unitaire\" || $algo [\"type\"] == \"date\"))\n\t\t\t\t$liste_algo_tempo [$nom_algo] = $algo;\n\t\t\telse {\n\t\t\t\t$flag = false;\n\t\t\t\t$liste_algo_restant [$nom_algo] = $algo;\n\t\t\t}\n\t\t}\n\t\tif (count ( $liste_algo_tempo ) > 0) {\n\t\t\t$this->setAlgorythme ( $liste_algo_tempo );\n\t\t\t$this->calcul_dates ();\n\t\t}\n\t\t//On concatene le tableau de donnees et le tableau de resultat pour continuer\n\t\tforeach ( $this->tableau_resultat as $serial => $liste_dates ) {\n\t\t\tif (isset ( $this->tableau_resultat [$serial] [\"algo_date\"] ) && is_array ( $this->tableau_resultat [$serial] [\"algo_date\"] ) && count ( $this->tableau_resultat [$serial] [\"algo_date\"] ) > 0) {\n\t\t\t\t$this->donnees [$serial] = array ();\n\t\t\t\t$this->donnees [$serial] [\"algo_date\"] = $this->tableau_resultat [$serial] [\"algo_date\"];\n\t\t\t} else\n\t\t\t\tforeach ( $liste_dates as $date => $donnees_local )\n\t\t\t\t\t$this->donnees [$serial] [$date] = $this->concatene_tableau ( $this->donnees [$serial] [$date], $this->tableau_resultat [$serial] [$date] );\n\t\t}\n\t\t\n\t\t//Donnees resultantes :\t\t\n\t\t//[serial]\n\t\t//\t[algo_date]\n\t\t//\t\t[algoX]\n\t\t//ou\n\t\t//[serial]\n\t\t//\t[date]\n\t\t//\t\t[algoX]\n\t\t\n\n\t\t$this->setAlgorythme ( $liste_algo_restant );\n\t\t$this->donnees_calcul = $this->donnees;\n\t\t$this->tableau_resultat = array ();\n\t\t\n\t\t$liste_dates_hash = array ();\n\t\t//Pour chaque serial, on creer les donnees de \"donnees_calcul\" et \n\t\tforeach ( $this->donnees as $serial => $liste_dates ) {\n\t\t\t//Si on a un algo_date alors on bosse dessus, sinon on bosse sur chaque date\n\t\t\tforeach ( $liste_dates as $date => $donnees )\n\t\t\t\t$liste_dates_hash [$date] = 1;\n\t\t}\n\t\t\n\t\t//Pour chaque algorithme,\n\t\t//on applique les algos dans l'ordre d'apparition des algos\n\t\tforeach ( $this->algorythme as $nom_algo => $algo ) {\n\t\t\t//on applique les algos en fonction de leur type\n\t\t\tif ($algo [\"type\"] != \"serial\")\n\t\t\t\t$liste_algo_restant_apres_date [$nom_algo] = $algo;\n\t\t\telse {\n\t\t\t\tforeach ( $liste_dates_hash as $date => $valeur ) {\n\t\t\t\t\t//on passe la liste de serial et on ajoute les champs communs par date ou algo_date\n\t\t\t\t\t$this->calcul_plusieurs_serials ( $nom_algo, $algo, $date );\n\t\t\t\t\t//le resultat est stocke dans [algo_serials]\n\t\t\t\t\t$this->tableau_resultat [\"algo_serial\"] [$date] [$nom_algo] = $this->resultat [$nom_algo];\n\t\t\t\t\t//On ajoute le resultat dans les donnees de calcul si elle sont re-utiliser\n\t\t\t\t\t$this->donnees_calcul [\"algo_serial\"] [$date] [$nom_algo] = $this->resultat [$nom_algo];\n\t\t\t\t\t//On re-initialise les variables\n\t\t\t\t\t$this->resultat = array ();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Si il reste des algos unitaires, on les traites en derniers\n\t\tif (count ( $liste_algo_restant_apres_date ) > 0) {\n\t\t\t$this->setAlgorythme ( $liste_algo_restant_apres_date );\n\t\t\t$this->donnees = array ();\n\t\t\t$this->donnees [\"algo_serial\"] = $this->tableau_resultat [\"algo_serial\"];\n\t\t\t$this->calcul_unitaire ();\n\t\t\tforeach ( $this->tableau_resultat [\"algo_serial\"] as $date => $resultat ) {\n\t\t\t\t$this->tableau_resultat [\"algo_serial\"] [$date] = $this->concatene_tableau ( $this->tableau_resultat [\"algo_serial\"] [$date], $this->donnees [\"algo_serial\"] [$date] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//enfin on applique les sommes sur les serials\n\t\treturn true;\n\t}", "title": "" }, { "docid": "94c52758f2eb5ed2586c295c2bc274ee", "score": "0.54654866", "text": "function primeraMateriaomedioDelSalon($v){\n\t\t$resultadoGeneral=0;\n\t\t $contadorGeneral=0;\n\t\tforeach ($v as $calificaciones ) {\n\t\tfor ($i=0; $i < sizeof($calificaciones); $i++) { \n\t\t\t$contadorGeneral++;\n\t\t\t$resultadoGeneral+=$calificaciones[$i];\n\t}\n\t}\n\t $primeraMateriaomedio=$resultadoGeneral/$contadorGeneral;\n\techo \"<br> EL PROMEDIO GENERAL DEL GRUPO ES: \".$primeraMateriaomedio;\n\techo \"<hr />\";\n\t}", "title": "" }, { "docid": "633a7c20813be5cbde363d2cd30ff025", "score": "0.54620904", "text": "public function matriz_evaluacion_regionales(){\n $regionales=$this->model_proyecto->list_departamentos();\n for ($i=1; $i <=count($regionales)-1 ; $i++) { \n for ($j=1; $j <=6 ; $j++) { \n $m[$i][$j]=0;\n }\n }\n\n $nro=0;\n foreach($regionales as $row){\n if($row['dep_estado']!=0){\n $nro++;\n $eval_acu=$this->matriz_evaluacion_regional_acumulado($row['dep_id']); /// Evalucion Trimestral Acumulado\n $m[$nro][1]=strtoupper($row['dep_departamento']); // Regional\n\n $m[$nro][2]=$eval_acu[1]; // cumplido\n $m[$nro][3]=$eval_acu[2]; // Avance\n $m[$nro][4]=$eval_acu[3]; // No cumplido\n $m[$nro][5]=$eval_acu[7]; // Total Prog\n $m[$nro][6]=$eval_acu[4]; // Total Eval\n\n $m[$nro][7]=$eval_acu[5]; // % cum\n $m[$nro][8]=$eval_acu[6]; // % ncum\n\n }\n }\n \n return $m;\n }", "title": "" }, { "docid": "68ab67845f6696aaae902f46a3f1c6d3", "score": "0.5458472", "text": "function calcul_unitaire() {\n\t\t//Pour chaque serial et chaque date, on prend les donnees de \"donnees_calcul\" et on applique les algos\n\t\t//Pour chaque algorythme du type \"unitaire\"\n\t\t//on stock le resultat comme suit :\n\t\t//[serial]\n\t\t//\t[date]\n\t\t//\t\t[algoX] = xx\n\t\t$this->tableau_resultat = array ();\n\t\tforeach ( $this->donnees as $serial => $liste_dates ) {\n\t\t\tforeach ( $liste_dates as $date => $donnee_calcul ) {\n\t\t\t\tif (sizeof ( $donnee_calcul ) > 0) {\n\t\t\t\t\t$this->donnees_calcul = $donnee_calcul;\n\t\t\t\t\tforeach ( $this->algorythme as $nom_algo => $algo_en_cours ) {\n\t\t\t\t\t\tif (is_array ( $algo_en_cours ) && $algo_en_cours [\"type\"] == \"unitaire\") {\n\t\t\t\t\t\t\t$this->choix_calcul ( $nom_algo, $algo_en_cours );\n\t\t\t\t\t\t\t$this->tableau_resultat [$serial] [$date] [$nom_algo] = $this->resultat [$nom_algo];\n\t\t\t\t\t\t\t//On re-initialise les variables\n\t\t\t\t\t\t\t$this->resultat = array ();\n\t\t\t\t\t\t\t//On ajoute le resultat dans les donnees de calcul si elle sont re-utiliser\n\t\t\t\t\t\t\t$this->donnees_calcul [$nom_algo] = $this->tableau_resultat [$serial] [$date] [$nom_algo];\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\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f385b7f7115b16cfd2b10299f51760aa", "score": "0.5437374", "text": "public function salva () {\n\t\tglobal $em,$system,$log,$tr;\n\t\t\n\t\t#################################################################################\n\t\t## Validações de campos \n\t\t#################################################################################\n\t\t/*if (!$this->getCodContaPag()) {\n\t\t\treturn $tr->trans('Código da conta não informado !!!');\n\t\t}*/\n\t\t\n\t\t#################################################################################\n\t\t## Validações do rateio\n\t\t#################################################################################\n\t\tif (!is_array($this->_codigosRateio)) {\n\t\t\treturn $tr->trans('\"Códigos de Rateio\" deve ser um array');\n\t\t}\n\t\t\n\t\tif (!is_array($this->_categoriasRateio)) {\n\t\t\treturn $tr->trans('\"Categoria\" deve ser um array');\n\t\t}\n\t\t\n\t\tif (!is_array($this->_centroCustosRateio)) {\n\t\t\treturn $tr->trans('\"Centro de Custo\" deve ser um array');\n\t\t}\n\t\t\n\t\tif (sizeof($this->_centroCustosRateio) != sizeof($this->_categoriasRateio)) {\n\t\t\treturn $tr->trans('Quantidade de Centro de Custos difere da Quantidade de Categorias');\n\t\t}\n\t\t\n\t\tif (!is_array($this->_valoresRateio)) {\n\t\t\treturn $tr->trans('\"Valor\" deve ser um array');\n\t\t}\n\t\t\n\t\tif (!is_array($this->_pctRateio)) {\n\t\t\treturn $tr->trans('\"Percentual\" deve ser um array');\n\t\t}\n\t\t\n\t\tif (sizeof($this->_valoresRateio) != sizeof($this->_pctRateio)) {\n\t\t\treturn $tr->trans('Quantidade de Valores difere da Quantidade de Percentuais');\n\t\t}\n\t\t\n\t\tif (sizeof($this->_centroCustosRateio) != sizeof($this->_valoresRateio)) {\n\t\t\treturn $tr->trans('Quantidade de Centro de Custos difere da Quantidade de Valor');\n\t\t}\n\t\t\n\t\tif (sizeof($this->_centroCustosRateio) != sizeof($this->_codigosRateio)) {\n\t\t\treturn $tr->trans('Quantidade de Centro de Custos difere da Quantidade de Códigos de Rateio');\n\t\t}\n\t\t\n\t\tif (!$this->_getValorTotal()) {\n\t\t\treturn $tr->trans('Valor total não informado !!!');\n\t\t}\n\t\t\n\t\t#################################################################################\n\t\t## Calcula o número de registros do rateio\n\t\t#################################################################################\n\t\t$n\t\t= sizeof($this->_valoresRateio);\n\t\t\n\t\t#################################################################################\n\t\t## Validações dos valores \n\t\t#################################################################################\n\t\t$valores\t= array();\n\t\tfor ($i = 0; $i < $n; $i++) {\n\t\t\tif ($this->_valoresRateio[$i] == 0) {\n\t\t\t\t$log->debug(\"Código de erro: 0x7dfh98722, Problema na posição: $i, array de valores: \".serialize($this->_valoresRateio));\n\t\t\t\treturn $tr->trans('Código de erro: 0x7dfh98722 entre em contato com o suporte !!, informações adicionais: \"'.$i.'\"');\n\t\t\t}elseif (!\\Zage\\App\\Util::ehNumero($this->_valoresRateio[$i])) {\n\t\t\t\treturn $tr->trans('Array de valores tem registro inválido na posição \"'.$i.'\" !!!');\n\t\t\t}else{\n\t\t\t\t$valores[$i]\t= \\Zage\\App\\Util::toMysqlNumber($this->_valoresRateio[$i]); \n\t\t\t}\n\t\t}\n\n\t\t#################################################################################\n\t\t## Validações dos percentuais\n\t\t#################################################################################\n\t\t$percs\t\t= array();\n\t\tfor ($i = 0; $i < $n; $i++) {\n\t\t\t$perc\t\t= \\Zage\\App\\Util::toMysqlNumber(str_replace(\"%\", \"\", $this->_pctRateio[$i]));\n\t\t\tif ($perc == 0) {\n\t\t\t\treturn $tr->trans('Array de Percentuais tem registro com percentual = 0 na posição \"'.$i.'\" ');\n\t\t\t}elseif (!\\Zage\\App\\Util::ehNumero($perc)) {\n\t\t\t\treturn $tr->trans('Array de Percentuais tem registro inválido na posição \"'.$i.'\" !!!');\n\t\t\t}else{\n\t\t\t\t$percs[$i]\t= round($perc,2);\n\t\t\t}\n\t\t}\n\t\t\n\t\t#################################################################################\n\t\t## Validações das categorias\n\t\t#################################################################################\n\t\t$cats\t\t= array();\n\t\tfor ($i = 0; $i < $n; $i++) {\n\t\t\tif ($this->_categoriasRateio[$i]) {\n\t\t\t\t$oCat\t\t= $em->getRepository('Entidades\\ZgfinCategoria')->findOneBy(array('codigo' => $this->_categoriasRateio[$i]));\n\t\t\t\tif (!$oCat) {\n\t\t\t\t\treturn $tr->trans('Array de Categorias tem categoria inexistente na posição \"'.$i.'\" !!!');\n\t\t\t\t}else{\n\t\t\t\t\t$cats[$i]\t= $oCat;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$cats[$i]\t\t= null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t#################################################################################\n\t\t## Validações dos Centros de Custo\n\t\t#################################################################################\n\t\t$centros\t= array();\n\t\tfor ($i = 0; $i < $n; $i++) {\n\t\t\tif ($this->_centroCustosRateio[$i]) {\n\t\t\t\t$oCentro\t\t= $em->getRepository('Entidades\\ZgfinCentroCusto')->findOneBy(array('codigo' => $this->_centroCustosRateio[$i]));\n\t\t\t\tif (!$oCentro) {\n\t\t\t\t\treturn $tr->trans('Array de Centro de Custos tem Centro de Custo inexistente na posição \"'.$i.'\" !!!');\n\t\t\t\t}else{\n\t\t\t\t\t$centros[$i]\t= $oCentro;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$centros[$i]\t= null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t#################################################################################\n\t\t## Apaga os rateios\n\t\t#################################################################################\n\t\t$erro\t= $this->exclui($this->getCodContaPag());\n\t\t\t\n\t\tif ($erro) {\n\t\t\treturn $erro;\n\t\t}\n\t\t\n\t\t\n\t\t#################################################################################\n\t\t## Fazer o loop para cadastrar os rateios\n\t\t#################################################################################\n\t\t$valorTotal\t= 0;\n\t\tfor ($i\t= 0; $i < $n; $i++) {\n\t\t\t\n\t\t\t#################################################################################\n\t\t\t## Calcula o total dos valores para aplicar a diferença no último rateio\n\t\t\t#################################################################################\n\t\t\t$valorTotal += $valores[$i];\n\n\t\t\t#################################################################################\n\t\t\t## Copia os valores de um objeto para o outro\n\t\t\t#################################################################################\n\t\t\t$rateio\t= new \\Entidades\\ZgfinContaPagarRateio();\n\t\t\t$rateio->setCodContaPag($this->getCodContaPag());\n\t\t\t$rateio->setCodCategoria($cats[$i]);\n\t\t\t$rateio->setCodCentroCusto($centros[$i]);\n\t\t\t$rateio->setPctValor($percs[$i]);\n\t\t\t\n\t\t\tif ($i == ($n -1)) {\n\t\t\t\tif ($valorTotal !== $this->_getValorTotal()) {\n\t\t\t\t\t$diff\t= ($this->_getValorTotal() - $valorTotal);\n\t\t\t\t\t$rateio->setValor($valores[$i] + $diff);\n\t\t\t\t}else{\n\t\t\t\t\t$rateio->setValor($valores[$i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$rateio->setValor($valores[$i]);\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$em->persist($rateio);\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\treturn $e->getMessage();\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "123049108090b493af6e80ac98d9c988", "score": "0.54354054", "text": "public function productoFrecuencias($array){\n $result =1;\n foreach ($array as $atributo => $valor) {\n $result *= $array[$atributo]; \n }\n return $result;\n }", "title": "" }, { "docid": "e7929a6dcce43672aab9eb148a393097", "score": "0.5414736", "text": "function moyenneNbreC()\r\n\t\t{\r\n\t\t\t$tot=0;\r\n\t\t\t$n=0;\r\n\t\t\tforeach($this->personnes as $personne)\r\n\t\t\t{\r\n\t\t\t\t$nbreC=$this->nbreCPourDate($personne->trigramme, $this->aujourdhui());\r\n\t\t\t\t$tot=$tot+$nbreC;\r\n\t\t\t\t$n++;\r\n\t\t\t}\r\n\t\t\tif ($n<>0) $moy=$tot/$n; else $moy=0;\r\n\t\t\treturn round($moy);\r\n\t\t}", "title": "" }, { "docid": "c7eee75b86e0087a30187c403d50f987", "score": "0.54058933", "text": "public function getMuVal($name,$coll_id,$stream,$degree,$major,$country_code)\n\t{\n\t\t$query = $this->db->get_where('NODETABLE',array('Node_Name =' => $name));\n\t\t$i = 0;\n\t\t$final_mu = array();\n\t\tforeach($query->result() as $row)\n\t\t{\n\t\t\t$dnode \t = $row->Node_ID;\n\t\t\t$coll_query = $this->db->get_where('psycho_table2',array('D_Node =' => $dnode,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'COLL_ID !=' => -1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'Country =' => $country_code,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'Stream =' => $stream,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'Degree =' => $degree,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'Major =' => $major));\n\t\t\t\n\t\t\t$mu = 0;\n\t\t\t$sigma = 0;\n\t\t\t$sample = 0;\n\t\t\t$temp_mu = array();\n\t\t\t$temp_sample = array();\n\n\t\t\t$coll_mu[$i] = 0;\n\t\t\t$j=0;\n\t\t\tif($coll_query->num_rows() == 0)\n\t\t\t{\n\t\t\t\t$final_mu[$i] = 0;\n\t\t\t\t$final_sigma[$i] = 0;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach($coll_query->result() as $coll_row)\n\t\t\t\t{\n\t\t\t\t\tif($coll_id == $coll_row->COLL_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t$coll_mu[$i] = $coll_row->MU;\n\t\t\t\t\t}\n\t\t\t\t\t$temp_mu[$j] = $coll_row->MU;\n\t\t\t\t\t$temp_sample[$j] = $coll_row->Sample_SZ;\n\t\t\t\t\t$mu = (($mu*$sample) + ($temp_mu[$j]*$temp_sample[$j]))/($sample+$temp_sample[$j]);\n\t\t\t\t\t$sample += $temp_sample[$j];\n\t\t\t\t\t$j++;\n\t\t\t\t}\n\t\t\t\tfor($j=0;$j<sizeof($temp_mu);$j++)\n\t\t\t\t{\n\t\t\t\t\t$sigma += (($temp_mu[$j]-$mu)*($temp_mu[$j]-$mu));\n\t\t\t\t}\n\t\t\t\t//echo 'I value:'.$i.'<br>';\n\t\t\t\t//echo 'sample:' .$sample. '<br>';\n\t\t\t\t$sigma = sqrt($sigma/sizeof($temp_mu));\n\t\t\t\t$final_mu[$i] = $mu;\n\t\t\t\t$final_sigma[$i] = $sigma;\n\t\t\t\t$i++;\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$data['mu'] = $final_mu;\n\t\t$data['sigma'] = $final_sigma;\n\t\t$data['coll_mu'] = $coll_mu;\n\t\treturn $data;\n\n\t}", "title": "" }, { "docid": "3fed9983e07937d55ae0598d243b1b23", "score": "0.5402436", "text": "public function det_saldos_contas_result_ant_enc(){\n\n foreach($this->array_encerramento as $conta => $valor ){\n $prim = substr($conta, 0, 4);\n $tipo_conta = \"C\";\n \n if($prim == \"8.01\"){\n $valor = \"0,00\";\n }\n \n $valor = number_format($valor, 2, \",\", \"\");\n $this->write[] = \"|I355|{$conta}||{$valor}|{$tipo_conta}|\\n\"; \n $this->total_registros_bloco_i_ecd +=1;\n $this->array_totais_registros_ecd['I355'] += 1;\n } \n}", "title": "" }, { "docid": "2578c6204102e6814e14e2b7139993a6", "score": "0.53984445", "text": "function mencari_jumlah_kasus_sama($data_uji, $dataset, $isi_label){\n $hasil_jumlah_kasus_sama = [];\n for ($i = 0; $i < sizeof($data_uji); $i++) {\n $tampung = [];\n for ($j = 0; $j < sizeof($isi_label); $j++) {\n array_push($tampung, cek_kasus_sama_dgn_klas($data_uji[$i], $dataset, $isi_label[$j]));\n }\n array_push($hasil_jumlah_kasus_sama, $tampung);\n }\n echo(\"</br>\");echo(\"</br>\"); echo(\"</br>\".\"JUMLAH KASUS YANG SAMA DENGAN KELAS : \");print(\"<pre>\".print_r($hasil_jumlah_kasus_sama ,true).\"</pre>\");\n return $hasil_jumlah_kasus_sama;\n}", "title": "" }, { "docid": "6c1493f55569f07c85917370e2f85a23", "score": "0.53954536", "text": "function conversorVolumen($valor, $simbolo){\n if($simbolo==\"gl\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $l = $valor * 3.785;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(l)+\" l\");\n return $l;\n }\n if($simbolo==\"l\"){\n // console.log(\"unidad de medida = \"+simbolo);\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(valor)+\" l\");\n return $valor;\n }\n if($simbolo==\"ml\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $l = $valor / 1000;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(l)+\" l\");\n return $l;\n }\n}", "title": "" }, { "docid": "8d3c38cfde4bb229ebee15599d5763dc", "score": "0.5393815", "text": "public function run()\n {\n $disciplina = [\n 0 => [\n 'nome' => 'Português instrumental',\n 'curso_id' => 1\n ],\n 1 => [\n 'nome' => 'Fundamentos da informática',\n 'curso_id' => 1\n ],\n 2 => [\n 'nome' => 'Inglês instrumental',\n 'curso_id' =>1\n ],\n 3 => [\n 'nome' => 'Matemática aplicada',\n 'curso_id' => 1\n ],\n 4 => [\n 'nome' => 'Rede de computadores',\n 'curso_id' => 1\n ],\n 5 => [\n 'nome' => 'Lógica de programção e estrutura de dados',\n 'curso_id' => 1\n ],\n 6 => [\n 'nome' => 'Segurança do trabalho',\n 'curso_id' => 1\n ],\n 7 => [\n 'nome' => 'Sistemas Operacionais',\n 'curso_id' => 1\n ],\n 8 => [\n 'nome' => 'Segurança de sistemas para internet',\n 'curso_id' => 1\n ],\n 9 => [\n 'nome' => 'Banco de dados',\n 'curso_id' => 1\n ],\n 10 => [\n 'nome' => 'Desenvolvimento para web 1',\n 'curso_id' => 1\n ],\n 11 => [\n 'nome' => 'Ética profissional e cidadania',\n 'curso_id' => 1\n ],\n 12 => [\n 'nome' => 'Programação orientada a objeto',\n 'curso_id' => 1\n ],\n 13 => [\n 'nome' => 'Projeto e prática 1',\n 'curso_id' => 1\n ],\n 14 => [\n 'nome' => 'Interação humano-computador',\n 'curso_id' => 1\n ],\n 15 => [\n 'nome' => 'Engenharia de software',\n 'curso_id' => 1\n ],\n 16 => [\n 'nome' => 'Implantação e administração de serviços web',\n 'curso_id' => 1\n ],\n 17 => [\n 'nome' => 'Desenvolvimento para web 2',\n 'curso_id' => 1\n ],\n 18 => [\n 'nome' => 'Empreendedorismo',\n 'curso_id' => 1\n ],\n 19 => [\n 'nome' => 'Projeto e prática 2',\n 'curso_id' => 1\n ],\n 20 => [\n 'nome' => 'Logística reversa e meio ambiente',\n 'curso_id' => 2\n ],\n 21 => [\n 'nome' => 'Matemática básica',\n 'curso_id' => 2\n ],\n 22 => [\n 'nome' => 'Introdução à administração',\n 'curso_id' => 2\n ],\n 23 => [\n 'nome' => 'Informática básica',\n 'curso_id' => 2\n ],\n 24 => [\n 'nome' => 'Português aplicado',\n 'curso_id' => 2\n ],\n 25 => [\n 'nome' => 'Metodologia cientifica',\n 'curso_id' => 2\n ],\n 26 => [\n 'nome' => 'Introdução à logística',\n 'curso_id' => 2\n ],\n 27 => [\n 'nome' => 'Ética profissional',\n 'curso_id' => 2\n ],\n 28 => [\n 'nome' => 'Gerenciamento e economia de sistemas logísticos',\n 'curso_id' => 2\n ],\n 29 => [\n 'nome' => 'Gestão de pessoas',\n 'curso_id' => 2\n ],\n 30 => [\n 'nome' => 'Estatística básica',\n 'curso_id' => 2\n ],\n 31 => [\n 'nome' => 'Logística de transporte e distribuição',\n 'curso_id' => 2\n ],\n 32 => [\n 'nome' => 'Logística de armazenagem',\n 'curso_id' => 2\n ],\n 33 => [\n 'nome' => 'Comércio e relações internacionais',\n 'curso_id' => 2\n ],\n 34 => [\n 'nome' => 'Legislação e tributação em logística',\n 'curso_id' => 2\n ],\n 35 => [\n 'nome' => 'Inglês instrumental 1',\n 'curso_id' => 2\n ],\n 36 => [\n 'nome' => 'Gestão de cadeia de suprimento',\n 'curso_id' => 2\n ],\n 37 => [\n 'nome' => 'Gestão da qualidade',\n 'curso_id' => 2\n ],\n 38 => [\n 'nome' => 'Higiene e segurança do trabalho',\n 'curso_id' => 2\n ],\n 39 => [\n 'nome' => 'Gestão da produção',\n 'curso_id' => 2\n ],\n 40 => [\n 'nome' => 'Gestão de materiais, estoque e compras',\n 'curso_id' => 2\n ],\n 41 => [\n 'nome' => 'Custos logísticos',\n 'curso_id' => 2\n ],\n 42 => [\n 'nome' => 'Inglês instrumental 2',\n 'curso_id' => 2\n ],\n 43 => [\n 'nome' => 'Tópicos especiais em logística',\n 'curso_id' => 2\n ],\n 44 => [\n 'nome' => 'Tecnologia e sistemas de informação logística',\n 'curso_id' => 2\n ]\n ];\n DB::table('disciplinas')->insert($disciplina);\n }", "title": "" }, { "docid": "281e76c7b9a9a696f68dc2b6485f2e9c", "score": "0.5388318", "text": "public function testCalcularComision()\n\t{\n\t\t$empE = $this->crearE_Eventual($this->nombre,$this->apellido,$this->DNI,$this->salario,$this->ventas);\n\t\t$com = (1500 / count($this->ventas)) * 0.05;\n\t\t$this->assertEquals($com, $empE -> calcularComision());\n\t}", "title": "" }, { "docid": "a5f024aed252a66622d701565d0b9777", "score": "0.5378618", "text": "function masspros(){\n\t\t//$this->genesal=false;\n\t\t$rt=array('status'=>'B','mensaje'=>'','caub'=>array());\n\n\t\t$propos = $_POST;\n\t\t$arrind = array();\n\n\t\tif(!$this->datasis->sidapuede('STRA','INCLUIR%' )){\n\t\t\t$rt['mensaje']='No tiene privilegios para realizar esta operacion';\n\t\t\techo json_encode($rt);\n\t\t\treturn false;\n\t\t}\n\n\t\tif(isset($propos['caub'])){\n\t\t\tif(!is_array($propos['caub']) && count($propos['caub'])>0){\n\t\t\t\t$rt['mensaje']='No ha seleccionado almacenes';\n\t\t\t\techo json_encode($rt);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\t$rt['mensaje']='No ha seleccionado almacenes';\n\t\t\techo json_encode($rt);\n\t\t\treturn false;\n\t\t}\n\n\t\t$can = 0;\n\t\t$keys=array_keys($propos);\n\t\tforeach($keys as $val){\n\t\t\tif(preg_match('/^codigo_(?P<ind>\\d+)/',$val,$matches)){\n\t\t\t\tif(!empty($propos[$val])){\n\t\t\t\t\t$arrind[]=$matches['ind'];\n\t\t\t\t\t$can++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($can == 0){\n\t\t\t$rt['mensaje']='No hay productos';\n\t\t\techo json_encode($rt);\n\t\t\treturn false;\n\t\t}\n\n\t\t$rt['status']= 'A';\n\t\t$fecha = dbdate_to_human(date('Y-m-d'));\n\t\tforeach($propos['caub'] as $recibe){\n\t\t\t$_POST=array();\n\t\t\t$_POST['envia'] = $propos['envia'];\n\t\t\t$_POST['fecha'] = $fecha;\n\t\t\t$_POST['observ1'] = 'Transferencia en lotes';\n\t\t\t$_POST['recibe'] = $recibe;\n\n\t\t\t$can = 0;\n\t\t\tforeach($arrind as $i){\n\t\t\t\t$cnd = \"${recibe}_${i}\";\n\t\t\t\t$ind = \"codigo_${i}\";\n\t\t\t\tif(isset($propos[$ind]) && isset($propos[$cnd])){\n\t\t\t\t\t$cana= floatval($propos[$cnd]);\n\t\t\t\t\tif(!empty($propos[$ind]) && $cana>0){\n\t\t\t\t\t\t$_POST[$ind] = $propos[$ind];\n\t\t\t\t\t\t$ind = 'cantidad_'.$i;\n\t\t\t\t\t\t$_POST[$ind] = $cana;\n\t\t\t\t\t\t$ind = 'descrip_'.$i;\n\t\t\t\t\t\tif(isset($propos[$ind])){\n\t\t\t\t\t\t\t$_POST[$ind] = $propos[$ind];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$can++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($can>0){\n\t\t\t\tob_start();\n\t\t\t\t\t$this->dataedit();\n\t\t\t\t\t$sal=ob_get_contents();\n\t\t\t\t@ob_end_clean();\n\t\t\t\t$jsal=json_decode($sal);\n\t\t\t\tif($jsal->status=='B'){\n\t\t\t\t\t$rt['status'] = 'B';\n\t\t\t\t\t$rt['mensaje'].= 'Problemas al transferir al almacen '.$recibe.': '.$jsal->mensaje;\n\t\t\t\t}else{\n\t\t\t\t\t$rt['caub'][] = $recibe;\n\t\t\t\t}\n\t\t\t\t$this->chrepetidos=array();\n\t\t\t\t$this->validation->clean();\n\t\t\t}\n\t\t}\n\t\techo json_encode($rt);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d7e2485df2474e8523a94658944a2fb6", "score": "0.5378542", "text": "function nettoie_donnees_resultat() {\n\t\t$this->algorythme = \"\";\n\t\t$this->resultat = \"\";\n\t\t$this->tableau_resultat = array ();\n\t\t$this->donnees_calcul = \"\";\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4e9b9c79e947b166988197de2525efe5", "score": "0.53729594", "text": "public function ventasComercialKg()\n {\n\t\t$query = $this->db->query(\"SELECT \n\t\t\t\t\t\t\t\t\t ID_CO,VEN.ID_ITEM,SUM(IT.PESO * CANTIDAD) kilos,IT.ID_LINEA linea\n\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t BD_BIABLE01.CMMOVIMIENTO_VENTAS AS VEN\n\t\t\t\t\t\t\t\t\t LEFT JOIN\n\t\t\t\t\t\t\t\t\t ITEMS AS IT ON VEN.ID_ITEM = IT.ID_ITEM\n\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t LAPSO_DOC = '201806' AND DOCUMENTO_FC<>' '\n\t\t\t\t\t\t\t\t\tGROUP BY ID_CO,ID_LINEA\");\n\n if($query->num_rows() > 0 )\n {\n return $query->result();\n }\n }", "title": "" }, { "docid": "ea9f43c7c82b51a78378d93c5b4e7e87", "score": "0.53716296", "text": "public function evaluasi($kromosom, $wanita){\n $kromosom_pecah = [];\n $total_fitness = [];\n for ($i=0; $i < $this->ukuranPopulasi; $i++) {\n $penalti = 0;\n for ($k=0; $k < $this->jmlHari ; $k++) { \n $kromosom_perhari[$i][$k] = array_slice($kromosom[$i], $k*24, 24);\n\n //perhari\n $kromosom_perhari_s[$i][$k] = $kromosom_perhari[$i][$k];\n sort($kromosom_perhari_s[$i][$k]);\n\n $benturan=[[]];\n for ($j=0; $j < count($kromosom_perhari_s[$i][$k]); $j++) { \n if($j > 0){\n if($kromosom_perhari_s[$i][$k][$j] == $kromosom_perhari_s[$i][$k][$j-1]){\n $benturan[$i][$k][$j] = 1;\n }else{\n $benturan[$i][$k][$j] = 0;\n }\n }\n }\n\n $p = array_sum($benturan[$i][$k]);\n $penalti+=$p*2;\n\n for ($l=0; $l < 3; $l++) {\n $kromosom_pershift[$i][$k][$l] = array_slice($kromosom_perhari[$i][$k], $l*8, 8);\n\n sort($kromosom_pershift[$i][$k][$l]);\n // print_r($kromosom_pecah[$i][$j]);\n for ($x=0; $x < count($kromosom_pershift[$i][$k][$l]); $x++) { \n if($x > 0){\n if($kromosom_pershift[$i][$k][$l][$x] == $kromosom_pershift[$i][$k][$l][$x-1]){\n //$benturan[$i][$j][$x] = $kromosom_pecah[$i][$j][$x];\n $penalti+=1*2;\n }\n }\n }\n //Cek shift wanita di malam hari\n if($l == 2){\n for($m = 0; $m < count($kromosom_pershift[$i][$k][$l]); $m++){\n if (in_array($kromosom_pershift[$i][$k][$l][$m], $wanita)) {\n $penalti += 1;\n }\n }\n }\n\n }\n //cek shift malam, langsung masuk pagi\n if($k > 0){\n $diff = array_diff($kromosom_pershift[$i][$k][0],$kromosom_pershift[$i][$k-1][2]);\n if(count($diff) != count($kromosom_pershift[$i][$k][2])){\n $penalti+=1;\n }\n }\n }\n \n $total_fitness[$i] = (24*$this->jmlHari) - $penalti;\n }\n\n $fitness_kromosom = [[]];\n for ($i=0; $i < $this->ukuranPopulasi; $i++) {\n $fitness_kromosom[$i]['penalti'] = $penalti;\n $fitness_kromosom[$i]['fitness'] = $total_fitness[$i];\n $fitness_kromosom[$i]['kromosom'] = $kromosom[$i];\n }\n \n return $fitness_kromosom;\n }", "title": "" }, { "docid": "39f5a3b89d494478fcac9eda3a2cdd8c", "score": "0.5366326", "text": "function ubah_bentuk_prob_atribut($label, $probabilitas_atribut){\n $ubah_bentuk_prob_atribut = [];\n for ($i = 0; $i < sizeof($label); $i++) { \n $tampung_prob = [];\n for ($j = 0; $j < sizeof($probabilitas_atribut); $j++) { \n array_push($tampung_prob, $probabilitas_atribut[$j][$i]);\n }\n array_push($ubah_bentuk_prob_atribut, $tampung_prob);\n }\n echo(\"</br>\"); echo(\"</br>\".\"HASIL UBAH BENTUK PROB ATRIBUT : \");print(\"<pre>\".print_r($ubah_bentuk_prob_atribut ,true).\"</pre>\");\n return $ubah_bentuk_prob_atribut;\n}", "title": "" }, { "docid": "5c4b7d5946828ee0c6bb2a9ea8f5407c", "score": "0.5366176", "text": "public function get_promanuncios($Anuncios){\r\n\r\n\t$promo_empresas \t= 0;\r\n\t$promo_part \t\t= 0;\r\n\t$nopromo_empresas \t= 0;\r\n\t$nopromo_part \t\t= 0;\r\n\t//porcentajes\r\n\t$precent_empresas \t= 0;\r\n\t$precent_part \t\t= 0;\r\n\t$percent_total\t\t= 0;\r\n\r\n\t//sacando anuncios y contando segun corresponde\r\n\t$cols = array('id','ussr','anuncio_promocionado');\r\n\t$anus = $Anuncios->get('anuncios',NULL,$cols);\r\n\tforeach ($anus as $key => $value) {\r\n\t\tif(in_array($value['ussr'], $this->u_empresas)){\r\n\t\t\tif($value['anuncio_promocionado'] == '1'){\t$promo_empresas++;\r\n\t\t\t}else{\t\t\t\t\t\t\t\t\t\t$nopromo_empresas++;}\r\n\t\t}else if(in_array($value['ussr'], $this->u_part)){\r\n\t\t\tif($value['anuncio_promocionado'] == '1'){\t$promo_part++;\r\n\t\t\t}else{\t\t\t\t\t\t\t\t\t\t$nopromo_part++;\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t$promo_total \t\t= $promo_part + $promo_empresas;\r\n\t$nopromo_total \t\t= $nopromo_part + $nopromo_empresas;\r\n\t$total_empresas \t= $promo_empresas + $nopromo_empresas;\r\n\t$total_part \t\t= $promo_part + $nopromo_part;\r\n\t$total_anuncios\t\t= $total_part + $total_empresas;\r\n\r\n\tif($total_empresas != 0){$precent_empresas \t= ($promo_empresas / $total_empresas) * 100;}\r\n\tif($total_part != 0){\t $precent_part \t\t= ($promo_part / $total_part) * 100;\t\t}\r\n\tif($total_anuncios != 0){$percent_total\t\t= ($promo_total / $total_anuncios) * 100;\t}\r\n\r\n\t//salida de la funcion \r\n\t$salida ='<table class=\"table\">';\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<th></th><th>Promocionados</th><th>No promocionados</th>';\r\n\t$salida .='<th>Total</th><th>Porcentaje</th></tr>';\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<td>Empresas</td><td>'.$promo_empresas.'</td><td>'.$nopromo_empresas.'</td>';\r\n\t$salida .='<td>'.$total_empresas.'</td><td>'.$precent_empresas.'</td></tr>';\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<td>Particulares</td><td>'.$promo_part.'</td><td>'.$nopromo_part.'</td>';\r\n\t$salida .='<td>'.$total_part.'</td><td>'.$precent_part.'</td></tr>';\t\t\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<td>Total</td><td>'.$promo_total.'</td><td>'.$nopromo_total.'</td>';\r\n\t$salida .='<td>'.$total_anuncios.'</td><td>'.$percent_total.'</td></tr>';\r\n\r\n\t$salida .='</table>';\r\n\r\n\t//return\r\n\treturn $salida;\r\n}", "title": "" }, { "docid": "0fc09d64c63a05e93ec031c6e642d5fd", "score": "0.5361161", "text": "function CambiarValorTabla(&$registros_tabla, $change_value, $indice)\r\n{\r\n //convierte la cadena a un vector\r\n $parametros_cambiar = explode(\",\", $change_value);\r\n\r\n for ($i = 0; $i < count($parametros_cambiar); $i += 4) {\r\n //llama la clase de la tabla\r\n $gateway = Application::getDataGateway($parametros_cambiar[$i + 1]);\r\n //optiene todos los datos de la tabla\r\n $datos = call_user_func(array($gateway, \"getAll\" . $parametros_cambiar[$i + 1]));\r\n for ($z = 0; $z < count($datos); $z++) {\r\n //cambia el valor del vector por el nombre si los codigos son iguales\r\n $data = '';\r\n if ($registros_tabla[$indice][$parametros_cambiar[$i]] == $datos[$z][$parametros_cambiar[$i + 2]]) {\r\n $param = explode('/', $parametros_cambiar[$i + 3]);\r\n for ($j = 0; $j < count($param); $j++) {\r\n //$registros_tabla[$indice][$parametros_cambiar[$i]] = $datos[$z][$parametros_cambiar[$i+3]];\r\n $data .= $datos[$z][$param[$j]] . \" \";\r\n }\r\n //$registros_tabla[$indice][$parametros_cambiar[$i]] = $datos[$z][$parametros_cambiar[$i+3]];\r\n $registros_tabla[$indice][$parametros_cambiar[$i]] = $data;\r\n break;\r\n }\r\n //$z++;\r\n }\r\n\r\n }\r\n}", "title": "" }, { "docid": "1687bad33e5a3cb76a306b86e8f9dc9a", "score": "0.5360153", "text": "public function guardarProbabilidadesRecintoEstudiante($data)\n {\n //Se obtiene el valor de cada caracteristica **** numero de opciones por caracteristica\n $sexo = 2;\n $promedio = 4;\n $estilo = 4;\n\n //Se obtiene el valor de m al contar el numero de columnas o caracteristicas y restando la que corresponde a estilo\n $m = count($data[0]) - 1;\n\n //Se saca la probabilidad para cada caracteristica (p)\n $pSexo = 1 / $sexo;\n $pPromedio = 1 / $promedio;\n $pEstilo = 1 / $estilo;\n\n //Numero de apariciones de cada recinto en los datos\n $n[\"turrialba\"] = 0;\n $n[\"paraiso\"] = 0;\n\n foreach ($data as $item) {\n if ($item[\"recinto\"] == \"Turrialba\") {\n $n[\"turrialba\"] = $n[\"turrialba\"] + 1;\n } elseif ($item[\"recinto\"] == \"Paraiso\") {\n $n[\"paraiso\"] = $n[\"paraiso\"] + 1;\n }\n }\n\n //Redondeo de los promedios a cantidades enteras para no trabajar con decimales\n $i = 0;\n foreach ($data as $item) {\n $data[$i][\"promedio\"] = round($item[\"promedio\"]);\n $i++;\n }\n\n /*\n Se obtiene el numero de instancias [nc] donde nc sera una matriz,\n donde la primera casilla es el dato (estilo,promedio,sexo) y la segunda\n el recinto asociado a ese dato (turrialba,paraiso)\n */\n\n //Cantidades para estilo por cada recinto\n $nc[\"estiloDivergente\"][\"Turrialba\"] = 0;\n $nc[\"estiloDivergente\"][\"Paraiso\"] = 0;\n\n $nc[\"estiloConvergente\"][\"Turrialba\"] = 0;\n $nc[\"estiloConvergente\"][\"Paraiso\"] = 0;\n\n $nc[\"estiloAsimilador\"][\"Turrialba\"] = 0;\n $nc[\"estiloAsimilador\"][\"Paraiso\"] = 0;\n\n $nc[\"estiloAcomodador\"][\"Turrialba\"] = 0;\n $nc[\"estiloAcomodador\"][\"Paraiso\"] = 0;\n\n //Cantidades para promedio por cada recinto\n $nc[\"promedio6\"][\"Turrialba\"] = 0;\n $nc[\"promedio6\"][\"Paraiso\"] = 0;\n\n $nc[\"promedio7\"][\"Turrialba\"] = 0;\n $nc[\"promedio7\"][\"Paraiso\"] = 0;\n\n $nc[\"promedio8\"][\"Turrialba\"] = 0;\n $nc[\"promedio8\"][\"Paraiso\"] = 0;\n\n $nc[\"promedio9\"][\"Turrialba\"] = 0;\n $nc[\"promedio9\"][\"Paraiso\"] = 0;\n\n //Cantidades para sexo por cada recinto\n $nc[\"sexoM\"][\"Turrialba\"] = 0;\n $nc[\"sexoM\"][\"Paraiso\"] = 0;\n\n $nc[\"sexoF\"][\"Turrialba\"] = 0;\n $nc[\"sexoF\"][\"Paraiso\"] = 0;\n\n //Obtiene el numero de apariciones de cada caracteristica para cada recinto de estudiante\n\n foreach ($data as $item) {\n\n //recinto Turrialba o Paraiso\n if ($item[\"recinto\"] == \"Turrialba\" && $item[\"estilo\"] == \"DIVERGENTE\") {\n\n $nc[\"estiloDivergente\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"estilo\"] == \"DIVERGENTE\") {\n\n $nc[\"estiloDivergente\"][\"Paraiso\"]++;\n }\n\n if ($item[\"recinto\"] == \"Turrialba\" && $item[\"estilo\"] == \"CONVERGENTE\") {\n\n $nc[\"estiloConvergente\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"estilo\"] == \"CONVERGENTE\") {\n\n $nc[\"estiloConvergente\"][\"Paraiso\"]++;\n }\n\n if ($item[\"recinto\"] == \"Turrialba\" && $item[\"estilo\"] == \"ASIMILADOR\") {\n\n $nc[\"estiloAsimilador\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"estilo\"] == \"ASIMILADOR\") {\n\n $nc[\"estiloAsimilador\"][\"Paraiso\"]++;\n }\n\n if ($item[\"recinto\"] == \"Turrialba\" && $item[\"estilo\"] == \"ACOMODADOR\") {\n\n $nc[\"estiloAcomodador\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"estilo\"] == \"ACOMODADOR\") {\n\n $nc[\"estiloAcomodador\"][\"Paraiso\"]++;\n }\n\n //Promedio\n if ($item[\"recinto\"] == \"Turrialba\" && $item[\"promedio\"] == 6) {\n\n $nc[\"promedio6\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"promedio\"] == 6) {\n\n $nc[\"promedio6\"][\"Paraiso\"]++;\n }\n //7\n if ($item[\"recinto\"] == \"Turrialba\" && $item[\"promedio\"] == 7) {\n\n $nc[\"promedio7\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"promedio\"] == 7) {\n\n $nc[\"promedio7\"][\"Paraiso\"]++;\n }\n //8\n if ($item[\"recinto\"] == \"Turrilba\" && $item[\"promedio\"] == 8) {\n\n $nc[\"promedio8\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"promedio\"] == 8) {\n\n $nc[\"promedio8\"][\"Paraiso\"]++;\n }\n //9\n if ($item[\"recinto\"] == \"Turrialba\" && $item[\"promedio\"] == 9) {\n\n $nc[\"promedio9\"][\"Turrialba\"]++;\n } elseif ($item[\"recinto\"] == \"Paraiso\" && $item[\"promedio\"] == 9) {\n\n $nc[\"promedio9\"][\"Paraiso\"]++;\n }\n\n //Sexo\n if ($item[\"sexo\"] == \"M\" && $item[\"recinto\"] == \"Turrialba\") {\n\n $nc[\"sexoM\"][\"Turrialba\"]++;\n } elseif ($item[\"sexo\"] == \"F\" && $item[\"recinto\"] == \"Turrialba\") {\n\n $nc[\"sexoF\"][\"Turrialba\"]++;\n }\n\n //Paraiso\n if ($item[\"sexo\"] == \"M\" && $item[\"recinto\"] == \"Paraiso\") {\n\n $nc[\"sexoM\"][\"Paraiso\"]++;\n } elseif ($item[\"sexo\"] == \"F\" && $item[\"recinto\"] == \"Paraiso\") {\n\n $nc[\"sexoF\"][\"Paraiso\"]++;\n }\n } //fin for\n\n \n //Probabilidad de cada sexo por recinto\n //Turrialba:\n\n\n $pfTurrialba[\"sexoM\"] = (($nc[\"sexoM\"][\"Turrialba\"]) + ($m * $pSexo)) / ($n[\"turrialba\"] + $m);\n\n\n $pfParaiso[\"sexoM\"] = (($nc[\"sexoM\"][\"Paraiso\"]) + ($m * $pSexo)) / ($n[\"paraiso\"] + $m);\n\n\n //Paraiso:\n\n $pfTurrialba[\"sexoF\"] = (($nc[\"sexoF\"][\"Turrialba\"]) + ($m * $pSexo)) / ($n[\"turrialba\"] + $m);\n\n\n $pfParaiso[\"sexoF\"] = (($nc[\"sexoF\"][\"Paraiso\"]) + ($m * $pSexo)) / ($n[\"paraiso\"] + $m);\n\n //Probabilidades de cada promedio por recinto\n\n //6\n $pfTurrialba[\"promedio6\"] = (($nc[\"promedio6\"][\"Turrialba\"]) + ($m * $pPromedio)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"promedio6\"] = (($nc[\"promedio6\"][\"Paraiso\"]) + ($m * $pPromedio)) / ($n[\"paraiso\"] + $m);\n\n //7\n $pfTurrialba[\"promedio7\"] = (($nc[\"promedio7\"][\"Turrialba\"]) + ($m * $pPromedio)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"promedio7\"] = (($nc[\"promedio7\"][\"Paraiso\"]) + ($m * $pPromedio)) / ($n[\"paraiso\"] + $m);\n\n //8\n $pfTurrialba[\"promedio8\"] = (($nc[\"promedio8\"][\"Turrialba\"]) + ($m * $pPromedio)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"promedio8\"] = (($nc[\"promedio8\"][\"Paraiso\"]) + ($m * $pPromedio)) / ($n[\"paraiso\"] + $m);\n\n //9\n $pfTurrialba[\"promedio9\"] = (($nc[\"promedio9\"][\"Turrialba\"]) + ($m * $pPromedio)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"promedio9\"] = (($nc[\"promedio9\"][\"Paraiso\"]) + ($m * $pPromedio)) / ($n[\"paraiso\"] + $m);\n\n\n //Probabilidad estilo por recinto\n //DIVERGENTE\n $pfTurrialba[\"estiloDivergente\"] = (($nc[\"estiloDivergente\"][\"Turrialba\"]) + ($m * $pEstilo)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"estiloDivergente\"] = (($nc[\"estiloDivergente\"][\"Paraiso\"]) + ($m * $pEstilo)) / ($n[\"paraiso\"] + $m);\n\n //CONVERGENTE\n $pfTurrialba[\"estiloConvergente\"] = (($nc[\"estiloConvergente\"][\"Turrialba\"]) + ($m * $pEstilo)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"estiloConvergente\"] = (($nc[\"estiloConvergente\"][\"Paraiso\"]) + ($m * $pEstilo)) / ($n[\"paraiso\"] + $m);\n\n //ASIMILADOR\n $pfTurrialba[\"estiloAsimilador\"] = (($nc[\"estiloAsimilador\"][\"Turrialba\"]) + ($m * $pEstilo)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"estiloAsimilador\"] = (($nc[\"estiloAsimilador\"][\"Paraiso\"]) + ($m * $pEstilo)) / ($n[\"paraiso\"] + $m);\n\n //ACOMODADOR\n $pfTurrialba[\"estiloAcomodador\"] = (($nc[\"estiloAcomodador\"][\"Turrialba\"]) + ($m * $pEstilo)) / ($n[\"turrialba\"] + $m);\n\n $pfParaiso[\"estiloAcomodador\"] = (($nc[\"estiloAcomodador\"][\"Paraiso\"]) + ($m * $pEstilo)) / ($n[\"paraiso\"] + $m);\n\n\n\n\n //ESTO ES LO QUE SE GUARDA\n $vRecintoEstudiante[\"Turrialba\"] = $pfTurrialba;\n\n \n $vRecintoEstudiante[\"Paraiso\"] = $pfParaiso;\n\n $arr = json_encode($vRecintoEstudiante);\n \n\n $fp = fopen('resultados_recinto_estudiante.json', 'w');\n fwrite($fp, json_encode($vRecintoEstudiante));\n fclose($fp);\n\n }", "title": "" }, { "docid": "0836144723642e5d20c6cc58bd88b380", "score": "0.53576267", "text": "function RentabilidadeReal ($ano, $mes, $dia, $user_id) {\r\n\t\r\n\t//compra\r\n\t$SQLcompras=sprinft(\"SELECT * FROM sis_compra WHERE CAUS_NM_ID= %s ORDER BY COAT_TX_ID\",$user_id);\r\n\t$SQL_compras_rcs=mysql_query($SQLcompras, SAINP) or die('Could not select the database: ' . mysql_error() );\r\n\t\r\n\twhile ($row_compras = mysql_fetch_array($SQL_compras_rcs)) {\r\n\t\tif ($compra_array[$l]['ativo'] == $compra_array[($l-1)]['ativo']) {\r\n\t\t\t$compra_array[$c]['ativo'] = $row_compras[$c]['COAT_TX_ID'];\r\n\t\t\t$compra_array[$c]['total'] = $compra_array[$c]['total'] + ($row_compras[$l]['COMP_NM_Acoes']*$row_compras[$l]['COMP_VL_Preco'])+$row_compras[$l]['COMP_VL_Emolumentos']+$row_compras[$l]['COMP_VL_Corretagem'];\r\n\t\t\t$l++;\r\n\t\t} else {\r\n\t\t\t$l++;\r\n\t\t\t$c++;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//venda\r\n\t$SQLvendas=sprinft(\"SELECT * FROM sis_venda WHERE CAUS_NM_ID= %s\",$user_id);\r\n\t$SQL_vendas_rcs=mysql_query($SQLvendas, SAINP) or die('Could not select the database: ' . mysql_error() );\r\n\twhile ($row_vendas = mysql_fetch_array($SQL_vendas_rcs)) {\r\n\t\tif ($venda_array[$l]['ativo'] == $venda_array[($l-1)]['ativo']) {\r\n\t\t\t$venda_array[$v]['ativo'] = $row_vendas[$l]['COAT_TX_ID'];\r\n\t\t\t$venda_array[$v]['total'] = ($row_vendas[$l]['VEND_NM_Acoes']*$row_vendas[$l]['VEND_VL_Preco'])+$row_vendas[$l]['VEND_VL_Emolumentos']+$row_vendas[$l]['VEND_VL_Corretagem'];\r\n\t\t\t$l++;\r\n\t\t} else {\r\n\t\t\t$l++;\r\n\t\t\t$v++;\r\n\t\t}\r\n\t}\r\n\r\n\r\n}", "title": "" }, { "docid": "2135761f492142224731d3ab6a269e2d", "score": "0.53507876", "text": "public function viable_elemet_control(){\n\n\t\tif (isset($_POST['limitelem']) && $_POST['limpeso'] != \"\" && $_POST['limcalo'] != \"\") {\n\n\t\t\t$minimocaloria = $_POST['limcalo'];\n\t\t\t$limitepeso = $_POST['limpeso'];\n\n\t\t\t$usuario=$_SESSION[\"idusuarioini\"];\n\t\t\t$tabla=\"elemento\";\n\n\t\t\t$miligramos = 0;\n\t\t\t$gramos = 0;\n\t\t\t$calorias = 0;\n\t\t\t$kilogramo = 0;\n\t\t\t$totalKilo=0;\n\t\t\t$totalgramos=0;\n\n\n\n\n\t\t\t$datos= usuariosModel::seleccionar_element_model($tabla,$usuario);\n\n\n\t\t\tforeach ($datos as $dato ) {\n\n\n\n\t\t\t\tif ($limitepeso >= $dato[\"peso\"] && $dato[\"unidPe\"] == \"kg\" && $minimocaloria <= $calorias) {\n\n\t\t\t\t\t$kilogramo = $kilogramo + $dato[\"peso\"];\n\n\t\t\t\t\t$totalKilo = $kilogramo;\n\n\t\t\t\t\tif ( $totalKilo <= $limitepeso ) {\n\n\n\t\t\t\t\t\techo '<tr> \n\t\t\t\t\t\t<td>'.$dato[\"nom_elem\"].'</td>\n\t\t\t\t\t\t<td>'.$dato[\"peso\"].\" \".$dato[\"unidPe\"].'</td>\n\t\t\t\t\t\t<td>'.$dato[\"caloria\"].'</td>\n\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\n\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$calorias= $calorias + $dato[\"caloria\"];\n\n\t\t\t\t}\n\n\t\t\t\tif ($totalKilo <= $limitepeso && $dato[\"unidPe\"] == \"g\" ) {\n\n\t\t\t\t\t$gramos = $gramos + $dato[\"peso\"];\n\n\t\t\t\t\t$totalgramos = $gramos / 1000;\n\n\n\t\t\t\t\t$sumakiloagramo = $totalKilo + $totalgramos;\n\t\t\t\t\t$calorias= $calorias + $dato[\"caloria\"];\n\t\t\t\t\tif ($sumakiloagramo <= $limitepeso && $minimocaloria <= $calorias ) {\n\t\t\t\t\t\t$totalKilo = $sumakiloagramo;\n\t\t\t\t\t\techo '<tr> \n\t\t\t\t\t\t<td>'.$dato[\"nom_elem\"].'</td>\n\t\t\t\t\t\t<td>'.$dato[\"peso\"].\" \".$dato[\"unidPe\"].'</td>\n\t\t\t\t\t\t<td>'.$dato[\"caloria\"].'</td>\n\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\n\t\t\t\tif($totalKilo <= $limitepeso && $dato[\"unidPe\"] == \"mg\" && $minimocaloria <= $calorias ){\n\n\t\t\t\t\t$miligramos = $miligramos + $dato[\"peso\"];\n\n\t\t\t\t\t$miligramos = $miligramos / 1000;\n\n\t\t\t\t\t$nuevomiligramo = $miligramos / 1000;\n\t\t\t\t\t$totalmiligramo = $totalgramos + $nuevomiligramo;\n\n\t\t\t\t\tif ($totalmiligramo <= $limitepeso ) {\n\t\t\t\t\t\t$totalKilo = $totalmiligramo;\n\t\t\t\t\t\techo '<tr> \n\t\t\t\t\t\t<td>'.$dato[\"nom_elem\"].'</td>\n\t\t\t\t\t\t<td>'.$dato[\"peso\"].\" \".$dato[\"unidPe\"].'</td>\n\t\t\t\t\t\t<td>'.$dato[\"caloria\"].'</td>\n\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$calorias= $calorias + $dato[\"caloria\"];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t\t$totalKilo=number_format((float)$totalKilo, 2, '.', '');\n\t\t\techo '\n\t\t\t<div class=\"cont-limit\"> \n\t\t\t<div> \n\t\t\t<span> Total Peso Kilogramo:</span>\t \n\t\t\t'.$totalKilo.'\n\t\t\t</div>\n\n\n\n\t\t\t<div> <span> Maximo peso permitido:</span>\t \n\t\t\t'.$limitepeso.'</div>\n\n\t\t\t</div>\n\n\t\t\t<div class=\"cont-limit-ca\"> \n\t\t\t<div><span> Total calorias</span>\t \n\t\t\t'.$calorias.'</div>\n\n\n\t\t\t<div><span> Minimo calorias permitidas</span>\t \n\t\t\t'.$minimocaloria.'</div>\n\n\t\t\t</div>\n\n\t\t\t';\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "8a2dc6ce4d6decdf7989f60c0455f0f5", "score": "0.53505534", "text": "public function run()\n {\n $datas = [\n //['00'\t,'Cacrete'],\n ['01'\t,'Banco Central de Venezuela'],\n ['03'\t,'Banco Industrial de Venezuela, C.A. Banco Universal'],\n ['0102'\t,'Banco de Venezuela S.A.C.A. Banco Universal'],\n ['0104'\t,'Venezolano de Crédito, S.A. Banco Universal'],\n ['0105'\t,'Banco Mercantil, C.A S.A.C.A. Banco Universal'],\n ['0108'\t,'Banco Provincial, S.A. Banco Universal'],\n ['0114'\t,'Bancaribe C.A. Banco Universal'],\n ['0115'\t,'Banco Exterior C.A. Banco Universal'],\n ['0128'\t,'Banco Caroni C.A. Banco Universal'],\n ['0134'\t,'Banesco Banco Universal S.A.C.A.'],\n ['0137'\t,'Banco Sofitasa Banco Universal'],\n ['0138'\t,'Banco Plaza Banco Universal'],\n ['0146'\t,'Banco de la Gente Emprendedora C.A.'],\n ['0149'\t,'Banco del Pueblo Soberano, C.A. Banco de Desarrollo'],\n ['0151'\t,'BFC Banco Fondo Común C.A Banco Universal'],\n ['0156'\t,'100% Banco, Banco Universal C.A.'],\n ['0157'\t,'DelSur Banco Universal, C.A.'],\n ['0163'\t,'Banco del Tesoro, C.A. Banco Universal'],\n ['0166'\t,'Banco Agricola de Venezuela, C.A. Banco Universal'],\n ['0168'\t,'Bancrecer, S.A. Banco Microfinanciero'],\n ['0169'\t,'Mi Banco Banco Microfinanciero C.A.'],\n ['0171'\t,'Banco Activo, C.A. Banco Universal'],\n ['0172'\t,'Bancamiga Banco Microfinanciero C.A.'],\n ['0173'\t,'Banco Internacional de Desarrollo, C.A. Banco Universal'],\n ['0174'\t,'Ban%lus Banco Universal, C.A.'],\n ['0175'\t,'Banco Bicentenario Banco Universal C.A.'],\n ['0176'\t,'Banco Espirito Santo, S.A. Sucursal Venezuela B.U.'],\n ['0177'\t,'Banco de la Fuerza Armada Nacional Bolivariana, B.U.'],\n ['0190'\t,'Citibak N.A.'],\n ['0191'\t,'Banco Nacional de Crédito, C.A. Banco Universal'],\n ['0601'\t,'Instituto Municipal de Crédito Popular'],\n ['0116'\t,'Banco Occidental de Descuento, Banco Universal C.A.'],\n ['1234'\t,'corpbanca'],\n ];\n \n \n DB::beginTransaction();\n try {\n foreach ($datas as $data) {\n Banco::create([\n 'nombre_banco' => $data[1]\n ]);\n }\n } catch (Exception $e) {\n DB::rollback();\n echo \"Error \";\n }\n DB::commit();\n }", "title": "" }, { "docid": "e300626f8da60fb411675c8d39f675ad", "score": "0.53487986", "text": "function precio($cantidad,$producto_padre,$combinacion=null){\n $ci =& get_instance();\n $this->load->model('catalogo/descuento');\n $this->load->model('usuario/usuario');\n\n \t$porcentaje=0;\n \t$precio_sin_promocion=0;\n\n \t/*Porcentaje de descuento de la categoria*/\n \tif($producto_padre->cat_categoria->porcentaje){\n \t\t$porcentaje=$producto_padre->cat_categoria->porcentaje;\n \t}else{\n \t\t$porcentaje=$producto_padre->cat_categoria->porcentaje;\n \t\tif(!$porcentaje) $porcentaje=$producto_padre->cat_categoria->padre->porcentaje;\n \t\tif(!$porcentaje) $porcentaje=$producto_padre->cat_categoria->padre->padre->porcentaje;\n \t}\n\n\n \tif(isset($combinacion->cat_precio_precio) && $combinacion->cat_precio_precio )\n \t\t$precio=$combinacion->cat_precio_precio;\n \telse\n \t\t$precio=$producto_padre->cat_precio->precio;\n\n\n\n \tif(is_object($combinacion)){\n \t\tif($combinacion->cat_precio_promocion){\n \t\t $precio_sin_promocion=$precio;\n \t\t\t$precio=($combinacion->cat_precio_descuento_tipo=='cantidad') ? $combinacion->cat_precio_descuento_cantidad : ( $precio - ( $precio * $combinacion->cat_precio_descuento_cantidad) / 100 );\n \t\t}\n \t\tif($combinacion->cat_precio_precio_mayoreo && $combinacion->cat_precio_cantidad && $cantidad>=$combinacion->cat_precio_cantidad ){\n \t\t\t$precio = $combinacion->cat_precio_precio_mayoreo;\n \t\t}\n \t}else{\n \t\tif($producto_padre->cat_precio->promocion){\n $is_active_promotion=1;\n $current = strtotime(date(\"Y-m-d H:i:s\"));\n $ini = strtotime($producto_padre->cat_precio->activacion_promocion);\n $fin = strtotime($producto_padre->cat_precio->desactivacion_promocion);\n\n // if($producto_padre->cat_precio->activacion_promocion!='0000-00-00 00:00:00' && $producto_padre->cat_precio->descactivacion_promocion!='0000-00-00 00:00:00' ){\n // if($current < $ini || $current > $fin) $is_active_promotion=0;\n // }else\n if($producto_padre->cat_precio->activacion_promocion!='0000-00-00 00:00:00'){\n if( $current < $ini ) $is_active_promotion=0;\n }\n if($producto_padre->cat_precio->desactivacion_promocion!='0000-00-00 00:00:00'){\n if( $current > $fin ) $is_active_promotion=0;\n }\n\n if($is_active_promotion){\n \t\t\t $precio_sin_promocion=$precio;\n \t\t\t $precio=($producto_padre->cat_precio->descuento_tipo=='cantidad') ? $producto_padre->cat_precio->descuento_cantidad : ( $precio - ( $precio * $producto_padre->cat_precio->descuento_cantidad) / 100 );\n \t\t }\n }\n \t\tif($producto_padre->cat_precio->precio_mayoreo && $producto_padre->cat_precio->cantidad && $cantidad>=$producto_padre->cat_precio->cantidad ){\n \t\t\t$precio = $producto_padre->cat_precio->precio_mayoreo;\n \t\t}\n \t}\n\n\n\n \tif($producto_padre->cat_precio->impuesto){\n\n \t\t$precio_sin_promocion = $precio_sin_promocion + ( ($producto_padre->cat_precio->impuesto * $precio_sin_promocion)/100 );\n \t\t$precio = $precio + ( ($producto_padre->cat_precio->impuesto * $precio)/100 );\n \t}\n\n\n \tif($producto_padre->cat_precio->moneda=='dolar'){\n \t\t$precio_sin_promocion = $precio_sin_promocion * DOLAR;\n \t\t$precio = $precio * DOLAR;\n \t}\n\n \tif($porcentaje){\n \t\t$precio_sin_promocion=(($porcentaje*$precio_sin_promocion)/100)+$precio_sin_promocion;\n \t\t$precio=(($porcentaje*$precio)/100)+$precio;\n \t}\n\n if($ci ->session->userdata('usuario_id')){ //Sacar precio con descuentos segun el usuario.\n $usuario = new Usuario();\n $usuario->include_related('descuento')->where('id', $ci ->session->userdata('usuario_id'))->get();\n if($precio_sin_promocion) $final_precio=$precio_sin_promocion; else $final_precio=$precio; \n if($usuario->descuento_id) $precio = ($final_precio-($final_precio*($usuario->descuento->porcentaje/100)));\n }\n\n \treturn array('precio'=>$precio,'precio_sin_promocion'=>$precio_sin_promocion);\n }", "title": "" }, { "docid": "4f3ff88cca7473550a0cfd632b6f892d", "score": "0.5344424", "text": "public function hitung_luas( ){ \n \treturn self ::PI * $this->jarijari * $this->jarijari; \n }", "title": "" }, { "docid": "a1a1f726f3309552380dfa57220d0071", "score": "0.5342488", "text": "public function cuadro_comparativo_programas_evaluado(){\n $tabla ='';\n $programas=$this->model_evalregional->categorias_programaticas_nacional();\n\n $tabla.='<table class=\"table table-bordered\">\n <thead>\n <tr class=\"modo1\">\n <th colspan=\"3\"><center>DATOS DEL PROGRAMA</center></th>\n <th colspan=\"7\"><center>EVALUACI&Oacute;N TRIMESTRAL</center></th>\n <th colspan=\"7\"><center>EVALUACI&Oacute;N TRIMESTRAL ACUMULADO</center></th>\n </tr>\n <tr class=\"modo1\">\n <th style=\"width: 1%\">#</th>\n <th align=\"center\" style=\"width: 2%\">PROGRAMA</th>\n <th align=\"center\" style=\"width: 8%\">DESCRIPCI&Oacute;N PROGRAMA</th>\n\n <th align=\"center\" style=\"width: 6%\">CUMPLIDO</th>\n <th align=\"center\" style=\"width: 6%\">EN AVANCE</th>\n <th align=\"center\" style=\"width: 6%\">NO CUMPLIDO</th>\n <th align=\"center\" style=\"width: 6%\">TOTAL PROG.</th>\n <th align=\"center\" style=\"width: 6%\">TOTAL EVAL.</th>\n <th align=\"center\" style=\"width: 6%\">% CUMPLIDO</th>\n <th align=\"center\" style=\"width: 6%\">% NO CUMPLIDO</th>\n\n <th align=\"center\" style=\"width: 6%\">CUMPLIDO</th>\n <th align=\"center\" style=\"width: 6%\">EN AVANCE</th>\n <th align=\"center\" style=\"width: 6%\">NO CUMPLIDO</th>\n <th align=\"center\" style=\"width: 6%\">TOTAL PROG.</th>\n <th align=\"center\" style=\"width: 6%\">TOTAL EVAL.</th>\n <th align=\"center\" style=\"width: 6%\">% CUMPLIDO</th>\n <th align=\"center\" style=\"width: 6%\">% NO CUMPLIDO</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n\n $nro_cum=0;$nro_pro=0;$nro_ncum=0;$total_prog=0;$total_eval=0;\n $nro_cum_a=0;$nro_pro_a=0;$nro_ncum_a=0;$total_prog_a=0;$total_eval_a=0;\n foreach($programas as $rowp){\n if($rowp['aper_programa']!='96' & $rowp['aper_programa']!='97' & $rowp['aper_programa']!='98'){\n $eval=$this->matriz_evaluacion_trimestre($rowp['aper_programa']); /// Evaluacion Trimestral\n $eval_acu=$this->matriz_evaluacion_Acumulado($rowp['aper_programa']); /// Evalucion Trimestral Acumulado\n $nro++;\n $tabla.='<tr class=\"modo1\">';\n $tabla.='<td>'.$nro.'</td>';\n $tabla.='<td align=\"center\">'.$rowp['aper_programa'].'</td>';\n $tabla.='<td>'.$rowp['aper_descripcion'].'</td>';\n $tabla.='<td bgcolor=\"#cff7f2\">'.$eval[1].'</td>\n <td bgcolor=\"#cff7f2\">'.$eval[2].'</td>\n <td bgcolor=\"#cff7f2\">'.$eval[3].'</td>\n <td bgcolor=\"#cff7f2\">'.$eval[7].'</td>\n <td bgcolor=\"#cff7f2\">'.$eval[4].'</td>\n <td bgcolor=\"#cff7f2\" title=\"OPERACIONES CUMPLIDOS\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-info\">'.$eval[5].' %</button></td>\n <td bgcolor=\"#cff7f2\" title=\"OPERACIONES NO CUMPLIDOS\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-danger\">'.$eval[6].' %</button></td>';\n\n $tabla.='<td bgcolor=\"#a2f9ad\">'.$eval_acu[1].'</td>\n <td bgcolor=\"#a2f9ad\">'.$eval_acu[2].'</td>\n <td bgcolor=\"#a2f9ad\">'.$eval_acu[3].'</td>\n <td bgcolor=\"#a2f9ad\">'.$eval_acu[7].'</td>\n <td bgcolor=\"#a2f9ad\">'.$eval_acu[4].'</td>\n <td bgcolor=\"#a2f9ad\" title=\"OPERACIONES CUMPLIDOS\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-info\">'.$eval_acu[5].' %</button></td>\n <td bgcolor=\"#a2f9ad\" title=\"OPERACIONES NO CUMPLIDOS\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-danger\">'.$eval_acu[6].' %</button></td>';\n $tabla.='</tr>';\n $nro_cum=$nro_cum+$eval[1];\n $nro_pro=$nro_pro+$eval[2];\n $nro_ncum=$nro_ncum+$eval[3];\n $total_prog=$total_prog+$eval[7];\n $total_eval=$total_eval+$eval[4];\n\n $nro_cum_a=$nro_cum_a+$eval_acu[1];\n $nro_pro_a=$nro_pro_a+$eval_acu[2];\n $nro_ncum_a=$nro_ncum_a+$eval_acu[3];\n $total_prog_a=$total_prog_a+$eval_acu[7];\n $total_eval_a=$total_eval_a+$eval_acu[4];\n\n $pcion=0;\n $npcion=0;\n $pcion_a=0;\n $npcion_a=0;\n if($total_prog!=0){\n $pcion=round((($nro_cum/$total_prog)*100),2);\n $npcion=(100-$pcion);\n\n $pcion_a=round((($nro_cum_a/$total_prog_a)*100),2);\n $npcion_a=(100-$pcion_a);\n }\n }\n \n }\n $tabla.='<tbody>\n <tr>\n <td colspan=\"3\">TOTAL : </td>\n <td>'.$nro_cum.'</td>\n <td>'.$nro_pro.'</td>\n <td>'.$nro_ncum.'</td>\n <td>'.$total_prog.'</td>\n <td>'.$total_eval.'</td>\n <td title=\"OPERACIONES CUMPLIDOS A NIVEL INSTITUCIONAL\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-info\">'.$pcion.' %</button></td>\n <td title=\"OPERACIONES NO CUMPLIDOS A NIVEL INSTITUCIONAL\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-danger\">'.$npcion.' %</button></td>\n <td>'.$nro_cum_a.'</td>\n <td>'.$nro_pro_a.'</td>\n <td>'.$nro_ncum_a.'</td>\n <td>'.$total_prog_a.'</td>\n <td>'.$total_eval_a.'</td>\n <td title=\"OPERACIONES CUMPLIDOS A NIVEL INSTITUCIONAL ACUMULADO\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-info\">'.$pcion_a.' %</button></td>\n <td title=\"OPERACIONES NO CUMPLIDOS A NIVEL INSTITUCIONAL ACUMULADO\"><button type=\"button\" style=\"width:100%;\" class=\"btn btn-danger\">'.$npcion_a.' %</button></td>\n </tr>\n </table>';\n\n $teval[1]=$nro_cum;\n $teval[2]=$nro_pro;\n $teval[3]=$nro_ncum;\n $teval[4]=$total_prog;\n $teval[5]=$total_eval;\n $teval[6]=$pcion;\n $teval[7]=$npcion;\n\n $teval[8]=$nro_cum_a;\n $teval[9]=$nro_pro_a;\n $teval[10]=$nro_ncum_a;\n $teval[11]=$total_prog_a;\n $teval[12]=$total_eval_a;\n $teval[13]=$pcion_a;\n $teval[14]=$npcion_a;\n\n return array($tabla,$teval);\n }", "title": "" }, { "docid": "e845c2671e5c60d167b99031e51e04be", "score": "0.5338051", "text": "public function pruebaAction()\n\t{\n\t\t\t\n\t\t\n\t\t$idop\t\t= 80;\n\t\t\n\t\t$modelEst\t\t= new EstructuraModel();\n\t\t$estructuras\t= $modelEst->getEstructurasInternasServicio( $idop , false);\n\t\t\n\t\t\n\t\t//$mo\t= new CampoModel();\n\t\techo '<pre>';\n\t\tprint_r($estructuras);\n\t\treturn;\n\t\t\n\t\t\n\t\t/*$modelFilas\t= new FilaModel();\n\t\t\t$filas\t\t= $modelFilas->buscarFilas( 1 );\n\t\t\techo '<pre>';\n\t\t\tprint_r($filas);*/\n\t\t\n\t\t/**$modeloTabla\t= new TablaModel();\n\t\t$campos\t\t\t= $modeloTabla->buscarTablasCampos( 1 ) ;\n\t\techo '<pre>';\n\t\t\tprint_r($campos);\n\t\t\t\n\t\t\t*/\n\t\t/*$modeloTabla\t= new CampoModel();\n\t\t$campos\t\t\t= $modeloTabla->buscarTablaPertenece( 1 ) ;\n\t\techo '<pre>';\n\t\t\tprint_r($campos);*/\n\t\t/*$modeloEst\t= new EstructuraModel();\n\t\t$datosEst\t= $modeloEst->getEstructurasTablas( 2 );\n\t\t\techo '<pre>';\n\t\t\tprint_r($datosEst);\n\t\t*/\n\t/*\t$modelTabla\t\t= new EstructuraModel();\n\t\t$arreglo\t\t\t= $modelTabla->getArbol(60);\n\t\t$llaves=array();\n\t\tforeach ( $arreglo as $hi)\n\t\t{\n\t\t\t$llaves[]\t= $hi['idestructura'];\n\t\t}\n\t\tforeach ( $arreglo as $hi)\n\t\t{\n\t\t\t\n\t\t\t$idpadre\t= $hi['idestructura'] == $hi['idpadre'] ? false : $hi['idpadre'];\n\t\t\tif($idpadre && array_search($idpadre,$llaves)=== false)\n\t\t\t$idpadre\t= false;\n\t\t\t$hijos[]\t= new CNodo($hi['idestructura'],$idpadre,$hi['idestructura'].'-'.$hi['abreviatura']);\n\t\t}\n\t\t//$campos\t\t\t= $campos[0]['NomCampoestruc'];*/\n\t/*\n\t$modeloTabla\t= new TablaModel();\n\t\t$datosEst\t\t\t= $modeloTabla->buscarTablasCampos( 14 ,true) ;\n\t\t*/\n\t/*\t$modelNomOrg\t\t\t\t\t= new NomorganoModel();\n\t\t$datos\t\t\t\t\t\t\t= $modelNomOrg->buscarNomorgano(1000,0,1);\n\t\t*/\n\t\t\n\t\t$modelEstructura= new EstructuraModel();\n\t\t\n\t\t\n\techo '<pre>';\n\t\t\tprint_r($modelEstructura->getHijosp(60));\n\t\t//echo json_encode($datos);\n\t\t \n\t}", "title": "" }, { "docid": "8c88744516188ba4921c548ff7462860", "score": "0.5329849", "text": "public function ventes_campagne_en_cours()\n {\n \n $resultqte=array();\n $resultdate=array();\n $campagne='';\n $vente= new Vente();\n $resultsVentes=$vente->ventes_campagne_en_cours();\n \n if ( $resultsVentes !=='Campagne introuvable') {\n // dd($resultsVentes);\n if (isset($resultsVentes[0]['campagne'])) {\n $campagne=$resultsVentes[0]['campagne'];\n foreach ($resultsVentes as $key => $value) {\n // dd($value);\n $resultqte[]=$value['quantite'];\n $resultdate[]=$value['date'];\n } \n \n }else{\n return 'Aucune campagne en cours ! ';\n } \n \n }else{\n return 'Aucune campagne en cours !';\n }\n \n return array('campagne'=> $campagne,'qte'=>$resultqte,'dateVente'=> $resultdate);\n }", "title": "" }, { "docid": "5dc24d4bdd71844bae01e4ea6d9a9b08", "score": "0.5328809", "text": "public function getModeloAtk()\n {\n //Se tiver a qnt minima de spys e cl\n if ($this->light >= self::QNT_SAFE_LIGHT && $this->spy >= self::QNT_SAFE_SPY) {\n return [\n $this->constants->FIELD_LIGHT_ID => self::QNT_SAFE_LIGHT,\n $this->constants->FIELD_SPY_ID => self::QNT_SAFE_SPY\n ];\n }\n\n return null;\n }", "title": "" }, { "docid": "525e3181ae9ed354982cc1ddc405065c", "score": "0.5320717", "text": "function calcula_valor($DataPagamento, $NossoNumero, $Leiaute = '') {\n //Formato da Data 99/99/9999\n include(\"config/conexaoFc.php\");\n $NaoGeraMultaJuros = 'N'; \n $filtroNossoNumero = 'nosso_numero';\n if ($Leiaute == \"BANCO SANTANDER - 400\") {\n $filtroNossoNumero = ' substring(nosso_numero,6,8)';\n }elseif($Leiaute == \"BIC - BANCO - 400\") {\n $filtroNossoNumero = ' substring(nosso_numero,8,6)';\n }\n\n //$DB->debug=true;\n $sql = \"select valor, data_vencimento as DtVencimento,data_vencimento as DtVencimentoOriginal, condicao_juros as CondicaoJuros, \n\t\tbase_juros as BaseJuros, nosso_numero as NossoNumero from parcelas\n\t where \" . $filtroNossoNumero . \" = '\" . $NossoNumero . \"'\"\n . \" or (nosso_numero = '\" . substr($NossoNumero, 6, 7) . \"' and banco_id is not null and banco_id in ( select id from bancos where Sigla in ('RC','RS','IT')))\";\n $rs = $DB->Execute($sql);\n $NossoNumeroGeneses = $rs->fields['NossoNumero'];\n if ($rs->RecordCount() > 0) {\n $DtVencimentoMultaJuros = $rs->fields['DtVencimento'];\n $DtVencimento = $rs->fields['DtVencimentoOriginal'];\n if (empty($rs->fields['DtVencimentoOriginal']) || $rs->fields['DtVencimentoOriginal'] == NULL) {\n $DtVencimento = $rs->fields['DtVencimento'];\n }\n $CondicaoJuros = $rs->fields['CondicaoJuros'];\n $BaseJuros = $rs->fields['BaseJuros'];\n $DataVencimento = $rs->UserTimeStamp($DtVencimento, 'd/m/Y');\n $DataVencimentoMultaJuros = $rs->UserTimeStamp($DtVencimentoMultaJuros, 'd/m/Y');\n $ValorBoleto = $rs->fields['valor'];\n $contar_dias1 = contar_dias($NossoNumero, $DataVencimento, $DataPagamento);\n $QuantDias = $contar_dias1['dias'];\n $Dataprevista = $contar_dias1['DataPrev'];\n if ($DataVencimento == $DataVencimentoMultaJuros) {\n $contar_dias1MJ = $contar_dias1;\n $QuantDiasMJ = $QuantDias;\n $DataprevistaMJ = $Dataprevista;\n }#\n else {\n $contar_dias1MJ = contar_dias($NossoNumero, $DataVencimentoMultaJuros, $DataPagamento);\n $QuantDiasMJ = $contar_dias1MJ['dias'];\n $DataprevistaMJ = $contar_dias1MJ['DataPrev'];\n }\n //condicao 1\n $DataVencimento1 = explode(\"/\", $DataVencimento);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag){\n $verificacao = true;\n }\n //condicao 2\n $DataVencimento1 = explode(\"/\", $DataVencimento);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n $verificacao2 = false;\n if ($ano_ven . $mes_ven . $dia_ven < $ano_pag . $mes_pag . $dia_pag){\n $verificacao2 = true;\n }\n //condicao 3\n $DataVencimento1 = explode(\"/\", $DataVencimento);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n $DataPagamento1 = explode(\"/\", $Dataprevista);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n $verificacao3 = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao3 = true;\n /*\n essa condição só entra boletos pagos antes ou até o vencimento ou se pagar depois por motivo de feriado ou fim de semana, foi retirada a condição\n para boletos depois do vencimento com dias negativos pois estava dando problema na ICF de aluno com desconto antecipado e ate o vencimento ganhando desconto\n */\n if (($verificacao == true) or ( ($verificacao2 == true) and ( $QuantDias <= 0) and 1 == 0) or ( ($verificacao3 == true) and ( $verificacao2 == true))) {\n \n }#\n else {\n if ($QuantDias < 0){\n $QuantDias = $QuantDias * (-1); //muda a quantidade para positivo\n }\n\n //{ -- Verifica Condicao -- }\n if ($CondicaoJuros == '') {\n $sql2 = \"select condicao_juros as CondicaoJuros, base_juros as BaseJuros from parametro\";\n $rs2 = $DB->Execute($sql2);\n $CondicaoJuros = $rs2->fields['CondicaoJuros'];\n $BaseJuros = $rs2->fields['BaseJuros'];\n }\n\n //{ -- Verifica Condicao 5 dia util -- }\n if (($CondicaoJuros == 'D') and ( $BaseJuros == 'X')) {\n $DataLimite = somaData($DataVencimentoMultaJuros, '+', 0, 1, 0);\n $DataLimiteStr = $DataLimite;\n $DataLimite = '01' . substr($DataLimiteStr, 2, 10);\n $DiasUteis = 0;\n\n while ($DiasUteis < 4) {\n if (verifica_dias($DataLimite) != 0){\n $DiasUteis++;\n }\n //$DB->debug=true;\n $sql2 = \"select ADDDATE('\" . substr($DataLimite, 6, 4) .\"-\". substr($DataLimite, 3, 2) .\"-\". substr($DataLimite, 0, 2) . \"',1) as data\";\n\n $rs2 = $DB->Execute($sql2);\n\n $DataLimite = $rs2->fields['data'];\n }\n\n $DataVencimento1 = explode(\"/\", $DataLimite);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if ($verificacao == true) {\n $NaoGeraMultaJuros = 'S';\n }\n }\n\n //{ -- Verifica Condicao X DIAS APÓS -- }\n if (($CondicaoJuros == 'D') and ( $BaseJuros != 'X') and ( $BaseJuros != '')) {\n\n $BaseJurosInt = $BaseJuros;\n $DataLimite = somaData($DataVencimentoMultaJuros, '+', 0, 1, 0);\n $DataLimiteStr = $DataLimite;\n $DataLimite = '01' . substr($DataLimiteStr, 2, 10);\n $DiasUteis = 0;\n while ($DiasUteis < ($BaseJurosInt - 1)) {\n\n //if(verifica_dias(DataLimite)<>0)then\n $DiasUteis++;\n\n //$DB->debug=true;\n $sql2 = \"select ADDDATE('\" . substr($DataLimite, 6, 4) .\"-\". substr($DataLimite, 3, 2) .\"-\". substr($DataLimite, 0, 2) . \"',1) as data\";\n\n $rs2 = $DB->Execute($sql2);\n\n $DataLimite = formata_data($rs2->fields['data']);\n }\n\n $DataVencimento1 = explode(\"/\", $DataLimite);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag) {\n $NaoGeraMultaJuros = 'S';\n }\n }\n }\n\n if ($MensagemDesc > $MensagemAcres) {\n\n $MensagemDesc = $MensagemDesc - $MensagemAcres;\n $MensagemAcres = 0;\n } else {\n $MensagemAcres = $MensagemAcres - $MensagemDesc;\n $MensagemDesc = 0;\n }\n\n if (($MensagemDesc > 0) or ( $MensagemAcres > 0)) {\n\n $valor = $ValorBoleto + $MensagemAcres - $MensagemDesc;\n } else {\n\n $sql2 = \"select multa as Multa, 0 as ValorJuros, 0 AS DiasAtraso,\n parcela as Parcela,now(), prazo_multa as PrazoMulta, data_vencimento as DtVencimento, \njuros as Juros, valor, (case when base_juros is null or base_juros='' then (select base_juros from parametro)\n else base_juros end) as BaseJuros,(case when condicao_juros is null or condicao_juros='' then \n\t(select condicao_juros from parametro) else condicao_juros\n end) as CondicaoJuros from parcelas as v where nosso_numero='\" . $NossoNumeroGeneses . \"'\";\n\n\n $rs2 = $DB->Execute($sql2);\n\n $valor = $rs2->fields['valor'];\n\n if ($NaoGeraMultaJuros == 'N') {\n if ($NossoNumero != '') {\n //$QuantDiasMJ.\" \".$rs2->fields['PrazoMulta'].\" \".$DataVencimentoMultaJuros.\" \".$DataPagamento;\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven < $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n if ($QuantDiasMJ < 0)\n $QuantDiasMJ = $QuantDiasMJ * -1;\n\n if (($QuantDiasMJ > $rs2->fields['PrazoMulta']) and ( $verificacao == true)) {\n $Multa = number_format($rs2->fields['Multa'], 2, '.', '');\n $valor = $valor + $Multa;\n } else {\n $Multa = 0;\n }\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if (($QuantDiasMJ == 0) or ( $verificacao == true)) {\n $Multa = 0;\n $Juros = 0;\n } else {\n if ($QuantDiasMJ > 0) {\n $Juros = number_format(($rs2->fields['Juros'] * ($QuantDiasMJ)), 2, '.', ''); //strtofloat(LValorJuros.Caption);\n if (($rs2->fields['CondicaoJuros'] == 'V') or ( $rs2->fields['CondicaoJuros'] == '')) {\n $valor = $valor + $Juros;\n } else {\n\n $data1 = explode(\"/\", $rs->UserTimeStamp($rs2->fields['DtVencimento']), 'd/m/Y');\n $anoVenc = $data1[2];\n $mesVenc = $data1[1];\n $dia = $data1[0];\n\n $data1 = explode(\"/\", $DataPagamento);\n\n $anoPg = $data1[2];\n $mesPg = $data1[1];\n $dia = $data1[0];\n\n if (($mesVenc < $mesPg) or ( $anoVenc < $anoPg)) {\n $valor = $valor + $Juros;\n } else {\n $Juros = 0;\n }\n }\n }\n }\n }\n }\n }\n } else {\n $valor = 0;\n }\n $retorno = array();\n\n $retorno['ValorMulta'] = number_format($Multa, 2, '.', '');\n $retorno['ValorJuros'] = number_format($Juros, 2, '.', '');\n $retorno['MensagemDesc'] = number_format($MensagemDesc, 2, '.', '');\n $retorno['MensagemAcres'] = number_format($MensagemAcres, 2, '.', '');\n $retorno['MultaRecebido'] = $Multa;\n $retorno['JurosRecebido'] = $Juros;\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven < $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if (($QuantDiasMJ > 0) and ( $verificacao == true))\n $retorno['QtdeDias'] = $QuantDiasMJ . ' depois';\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if ($verificacao) {\n if ($QuantDiasMJ < 0) {\n $QuantDiasMJ = $QuantDiasMJ * (-1);\n }\n $retorno['QtdeDias'] = $QuantDiasMJ . ' antes ';\n }\n if (!$verificacao) {\n if ($QuantDiasMJ < 0) {\n $QuantDiasMJ = $QuantDiasMJ * (-1);\n }\n $retorno['QtdeDias'] = $QuantDiasMJ . ' depois';\n }\n if ($QuantDias == 0)\n $retorno['QtdeDias'] = $QuantDiasMJ;\n\n\n $retorno['valor'] = $valor;\n return $retorno;\n}", "title": "" }, { "docid": "539bf5a9c1e5849601947105413510ef", "score": "0.5320516", "text": "public function izracunajPovrsinu(){\n return ($this->strana1*$this->strana2);\n }", "title": "" }, { "docid": "5506aaee69b00c3b6fc83651ab842edd", "score": "0.53183293", "text": "function kalikan_prob_label_dan_prob_atribut($banyak_label, $probabilitas_label, $hasil_kali_atribut){\n $hasil_kali_all_prob = [];\n for ($i = 0; $i < sizeof($banyak_label); $i++) { \n array_push($hasil_kali_all_prob, $hasil_kali_atribut[$i]*$probabilitas_label[$i]);\n }\n echo(\"</br>\"); echo(\"</br>\".\"HASIL PERKALIAN PROB ATRIBUT DAN PROB LABEL : \");print(\"<pre>\".print_r($hasil_kali_all_prob ,true).\"</pre>\");\n return $hasil_kali_all_prob;\n}", "title": "" }, { "docid": "91f25450c527239739f7dc47b9dc2f19", "score": "0.53134006", "text": "public function tablaAmortizacion($_capital_prestado_amortizacion_cabeza_1, $numero_cuotas, $interes_mensual, $valor_cuota, $fecha_corte)\r\n\t{\r\n\t\t$resultAmortizacion=array();\r\n\t\t \r\n\t\r\n\t\t$capital = $_capital_prestado_amortizacion_cabeza_1;\r\n\t\t$inter_ant= $interes_mensual;\r\n\t\t$interes= $capital * $inter_ant;\r\n\t\t$amortizacion = $valor_cuota - $interes;\r\n\t\t$saldo_inicial= $capital - $amortizacion;\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tfor( $i = 0; $i <= $numero_cuotas; $i++) {\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tif ($i == 0)\r\n\t\t\t{\r\n\t\t\t\t$interes= 0;\r\n\t\t\t\t$amortizacion = 0;\r\n\t\t\t\t$saldo_inicial= $capital;\r\n\t\t\t\t$fecha=strtotime('+0 day',strtotime($fecha_corte));\r\n\t\t\t\t$fecha=date('Y-m-d',$fecha);\r\n\t\t\t\t$fecha_corte=$fecha;\r\n\t\t\t\t$valor = 0;\r\n\t\t\t\t$saldo_inicial_ant = $capital;\r\n\t\t\t}\r\n\t\t\t/*elseif ($i == 1){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$saldo_inicial_ant = $capital;\r\n\t\t\t\t$interes= $saldo_inicial_ant * $inter_ant;\r\n\t\t\t\t$amortizacion = $valor_cuota - $interes;\r\n\t\t\t\t$saldo_inicial= $capital;\r\n\t\t\t\t$fecha=strtotime('+30 day',strtotime($fecha_corte));\r\n\t\t\t\t$fecha=date('Y-m-d',$fecha);\r\n\t\t\t\t$fecha_corte=$fecha;\r\n\t\t\t\t$valor = $valor_cuota;\r\n\t\t\t\t\r\n\t\t\t}*/\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t \r\n\t\t\t\t$saldo_inicial_ant = $saldo_inicial_ant - $amortizacion;\r\n\t\t\t\t$interes= $saldo_inicial_ant * $inter_ant;\r\n\t\t\t\t$amortizacion = $valor_cuota - $interes;\r\n\t $saldo_inicial= $saldo_inicial_ant - $amortizacion;\r\n\t $fecha=strtotime('+30 day',strtotime($fecha_corte));\r\n\t\t\t\t$fecha=date('Y-m-d',$fecha);\r\n\t\t\t\t$fecha_corte=$fecha;\r\n\t\t\t\t$valor = $valor_cuota;\r\n\t\t\t\t\t\r\n\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\r\n\t\t\t$resultAmortizacion['tabla'][]=array(\r\n\t\t\t\t\tarray('pagos_trimestrales'=> $i,\r\n\t\t\t\t\t\t\t'saldo_inicial'=>$saldo_inicial,\r\n\t\t\t\t\t\t\t'interes'=>$interes,\r\n\t\t\t\t\t\t\t'amortizacion'=>$amortizacion,\r\n\t\t\t\t\t\t\t'pagos'=>$valor,\r\n\t\t\t\t\t\t\t'fecha_pago'=>$fecha\r\n\t\t\t\t\t));\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\r\n\t\treturn $resultAmortizacion;\r\n\t\r\n\t\r\n\t}", "title": "" }, { "docid": "14ed38c4e7813cf7aae85c4bc57bcb9c", "score": "0.5312318", "text": "function matricularVehiculo () {\r\n $mat_aleatoria = rand();\r\n\r\n $enc = false;\r\n $pos = 0;\r\n for ($i=0; $i < count($this->vehiculos) && ($enc==false); $i++) { \r\n if ($this->vehiculos[$i] != null) {\r\n if ($this->vehiculos[$i]->getMatricula() == '') {\r\n $this->vehiculos[$i]->setMatricula($mat_aleatoria);\r\n $enc = true;\r\n $pos = $i;\r\n } \r\n }\r\n }\r\n return $this->vehiculos[$pos];\r\n}", "title": "" }, { "docid": "5527f19590e426c4152598e28e92617c", "score": "0.5312081", "text": "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "title": "" }, { "docid": "64127680d8f9f382205450ab334d30fd", "score": "0.53116596", "text": "function solve() {\n\t\t//aplicamos Gauss.\n\t\t$this->metodoGauss();\n\t\t/* Sustitución Hacia atrás */\n\t\tfor ($k = count($this->vector)-1; $k>=0; $k--) {\n\t\t\t$tmp = 0;\n\t\t\tfor($j = $k+1;$j<count($this->matriz);$j++) {\n\t\t\t\t$tmp += $this->matriz[$k][$j]*$this->vector[$j];\n\t\t\t}\n\t\t\t$this->vector[$k] = $this->vector[$k] - $tmp;\n\t\t\t$this->vector[$k] *= 1/$this->matriz[$k][$k];\n\t\t}\n\t}", "title": "" }, { "docid": "1bb9686cd3bd35d7a4251a805ed8eae8", "score": "0.5309442", "text": "public function izracunajObim() {\n return (($this->strana1 + $this->strana2)*2);\n }", "title": "" }, { "docid": "adc06a04fc8b691dde14cd5c180d05a1", "score": "0.5308056", "text": "public function cenaTermina()\n {\n $dodatne = 0;\n $meni_sobe = 0;\n $ukupno = 0;\n //meni i sobe\n $sql = \"SELECT SUM(iznos_meni + iznos_sobe) AS cena FROM ugovori WHERE termin_id = {$this->id};\";\n $meni_sobe = $this->fetch($sql)[0]->cena;\n //dodatne usluge\n foreach ($this->ugovori() as $ugovor) {\n $dodatne =+ $ugovor->ukupanIznosDodatno();\n }\n $ukupno = $dodatne + $meni_sobe;\n return (int) $ukupno;\n }", "title": "" }, { "docid": "f72be820cb3732dd054b2378f82bb71a", "score": "0.53048587", "text": "public function valor_por_porcentaje_monto($porcentaje,$monto_bruto)\n{$monto=($monto_bruto*$porcentaje)/100;\nreturn $monto;\n}", "title": "" }, { "docid": "956e6d79c6ff38ecf2ff9d3458cc16e5", "score": "0.53001237", "text": "function get_menores($id_designacion){\n //obtengo la categoria mapuche de la designacion\n $cat_mapu=\"\";\n $sql=\"select cat_mapuche from designacion where id_designacion=\".$id_designacion;\n $res=toba::db('designa')->consultar($sql);\n if (count($res)>0){ \n $cat_mapu=$res[0]['cat_mapuche'];\n \n //toma el valor del periodo 2016\n $sql=\"select distinct trim(d.catest)||d.id_ded as catest\n from mocovi_costo_categoria c,macheo_categ d,categ_estatuto e\n where c.id_periodo=2\n and c.codigo_siu=d.catsiu\n and c.costo_diario<= (select costo_diario from mocovi_costo_categoria c\n where c.codigo_siu='\".trim($cat_mapu).\"' and id_periodo=2)\n and d.catest=e.codigo_est \n and e.orden<=(select distinct c.orden from macheo_categ b, categ_estatuto c\n where b.catsiu='\".trim($cat_mapu).\"' and b.catest=c.codigo_est)\"\n . \" and d.catest<>'ASDEnc' \"\n . \" order by catest\";\n \n $res= toba::db('designa')->consultar($sql);\n return $res;\n \n } \n }", "title": "" }, { "docid": "a4b57da4a698b1d309020b86c621f27a", "score": "0.5298545", "text": "function lotes_materiales($Inicio,$Id_inventario_material)\r\n\t{\r\n\t\t$Datos = array();\r\n\t\t$Requisicion = array();\r\n\t\t//Consultamos la base de datos para obtener la informacion de los clientes.\r\n\t\t$Consulta = 'select * from inventario_lote\r\n\t\t\t\t\t\t\twhere id_inventario_material = \"'.$Id_inventario_material.'\"\r\n\t\t\t\t\t\t\torder by id_inventario_lote desc limit '.$Inicio.', 10\r\n\t\t';\r\n\t\t\r\n\t\t//Ejecuto la consulta\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\r\n\t\tforeach($Resultado->result_array() as $Datos_lotes)\r\n\t\t{\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['id_inventario_lote'] = $Datos_lotes['id_inventario_lote'];\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['id_inventario_material'] = $Datos_lotes['id_inventario_material'];\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['pedido'] = $Datos_lotes['pedido'];\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['fecha_ingreso'] = $Datos_lotes['fecha_ingreso'];\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['fecha_fin'] = $Datos_lotes['fecha_fin'];\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['unidades'] = $Datos_lotes['unidades'];\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['estado'] = $Datos_lotes['estado'];\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Asignamos el valor de cada id del lote a una variable.\r\n\t\t\t$Id_lote = $Datos_lotes['id_inventario_lote'];\r\n\t\t\t//Verificamos cual es el estado de cada lote.\r\n\t\t\t$estado = $Datos_lotes[\"estado\"];\r\n\t\t\t\r\n\t\t\t//Establecemos la consulta para determinar la cantidad que hay por cada lote.\r\n\t\t\t$Consulta_cantidad = 'select sum(cantidad) as cantidad\r\n\t\t\t\t\t\t\t\t\tfrom inventario_requisicion\r\n\t\t\t\t\t\t\t\t\twhere id_inventario_lote = \"'.$Id_lote.'\"';\r\n\t\t\t//echo $Consulta_cantidad.'<br>';\r\n\t\t\t//Ejecuto la consulta\r\n\t\t\t$Resultado_cant = $this->db->query($Consulta_cantidad);\r\n\t\t\t\r\n\t\t\t//Exploramos el array para obtener la cantidad total.\r\n\t\t\tforeach($Resultado_cant->result_array() as $Datos_cantidad)\r\n\t\t\t{\r\n\t\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['cantidad'] = $Datos_cantidad['cantidad'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Establecemos la consulta para seleccionar el ultimo movimiento para este lote.\r\n\t\t\t$Consulta_ultima_salida = 'select fecha_salida\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom inventario_requisicion\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere id_inventario_lote = \"'.$Id_lote.'\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torder by id_inventario_requisicion desc limit 0,1';\r\n\t\t\t//Ejecuto la consulta\r\n\t\t\t$Resultado_salida = $this->db->query($Consulta_ultima_salida);\r\n\t\t\t\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['fecha_salida'] = '';\r\n\t\t\tif(0 < count($Resultado_salida->result_array()))\r\n\t\t\t{\r\n\t\t\t\tforeach($Resultado_salida->result_array() as $Datos_salida)\r\n\t\t\t\t{\r\n\t\t\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['fecha_salida'] = $Datos_salida['fecha_salida'];\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t//Establecemos la consulta para obtener la informacion del usuario\r\n\t\t\t//que realizo la requisicion y la cantidad requisada.\r\n\t\t\t$Consulta_usuarios = 'SELECT numero_requ, nombre, fecha_salida,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsum(cantidad) as cantidad\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM inventario_requisicion requi, usuario usu\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE requi.id_usuario = usu.id_usuario\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND id_inventario_lote = \"'.$Id_lote.'\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroup by numero_requ\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\torder by id_inventario_requisicion desc';\r\n\r\n\t\t\t//Ejecuto la consulta\r\n\t\t\t$Resultado_usu = $this->db->query($Consulta_usuarios);\r\n\t\t\t\r\n\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['req'] = '';\r\n\t\t\t\r\n\t\t\tforeach($Resultado_usu->result_array() as $Datos_usuario)\r\n\t\t\t{\r\n\t\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['req'][$Datos_usuario['numero_requ']]['numero_requ'] = $Datos_usuario['numero_requ'];\r\n\t\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['req'][$Datos_usuario['numero_requ']]['nombre'] = $Datos_usuario['nombre'];\r\n\t\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['req'][$Datos_usuario['numero_requ']]['fecha_salida'] = $Datos_usuario['fecha_salida'];\r\n\t\t\t\t$Datos[$Datos_lotes['id_inventario_lote']]['req'][$Datos_usuario['numero_requ']]['cantidad'] = $Datos_usuario['cantidad'];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $Datos;\r\n\t}", "title": "" }, { "docid": "54254d3e5abedaf6ce789aed8e88a5c3", "score": "0.52891403", "text": "public function run()\r\n {\r\n \r\n $registros = [\r\n [ 'medida' => 1000, 'costo' => 2.5, 'total' => 2.5],\r\n [ 'medida' => 2000, 'costo' => 2.5, 'total' => 5],\r\n [ 'medida' => 3000, 'costo' => 2.5, 'total' => 7.5],\r\n [ 'medida' => 4000, 'costo' => 2.5, 'total' => 10],\r\n [ 'medida' => 5000, 'costo' => 2.5, 'total' => 12.5],\r\n [ 'medida' => 6000, 'costo' => 3, 'total' => 15.5],\r\n [ 'medida' => 7000, 'costo' => 3, 'total' => 18.5],\r\n [ 'medida' => 8000, 'costo' => 3, 'total' => 21.5],\r\n [ 'medida' => 9000, 'costo' => 3, 'total' => 24.5],\r\n [ 'medida' => 10000, 'costo' => 3, 'total' => 27.5],\r\n [ 'medida' => 11000, 'costo' => 3.5, 'total' => 31],\r\n [ 'medida' => 12000, 'costo' => 3.5, 'total' => 34.5],\r\n [ 'medida' => 13000, 'costo' => 3.5, 'total' => 38],\r\n [ 'medida' => 14000, 'costo' => 3.5, 'total' => 41.5],\r\n [ 'medida' => 15000, 'costo' => 3.5, 'total' => 45],\r\n [ 'medida' => 16000, 'costo' => 4, 'total' => 49],\r\n [ 'medida' => 17000, 'costo' => 4, 'total' => 53],\r\n [ 'medida' => 18000, 'costo' => 4, 'total' => 57],\r\n [ 'medida' => 19000, 'costo' => 4, 'total' => 61],\r\n [ 'medida' => 20000, 'costo' => 4, 'total' => 65],\r\n [ 'medida' => 21000, 'costo' => 5, 'total' => 70],\r\n [ 'medida' => 22000, 'costo' => 5, 'total' => 75],\r\n [ 'medida' => 23000, 'costo' => 5, 'total' => 80],\r\n [ 'medida' => 24000, 'costo' => 5, 'total' => 85],\r\n [ 'medida' => 25000, 'costo' => 5, 'total' => 90],\r\n [ 'medida' => 26000, 'costo' => 5, 'total' => 95],\r\n [ 'medida' => 27000, 'costo' => 5, 'total' => 100],\r\n [ 'medida' => 28000, 'costo' => 5, 'total' => 105],\r\n [ 'medida' => 29000, 'costo' => 5, 'total' => 110],\r\n [ 'medida' => 30000, 'costo' => 5, 'total' => 115],\r\n [ 'medida' => 31000, 'costo' => 5, 'total' => 120],\r\n [ 'medida' => 32000, 'costo' => 5, 'total' => 125],\r\n [ 'medida' => 33000, 'costo' => 5, 'total' => 130],\r\n [ 'medida' => 34000, 'costo' => 5, 'total' => 135],\r\n [ 'medida' => 35000, 'costo' => 5, 'total' => 140],\r\n [ 'medida' => 36000, 'costo' => 5, 'total' => 145],\r\n [ 'medida' => 37000, 'costo' => 5, 'total' => 150],\r\n [ 'medida' => 38000, 'costo' => 5, 'total' => 155],\r\n [ 'medida' => 39000, 'costo' => 5, 'total' => 160],\r\n [ 'medida' => 40000, 'costo' => 5, 'total' => 165],\r\n [ 'medida' => 41000, 'costo' => 5, 'total' => 170],\r\n [ 'medida' => 42000, 'costo' => 5, 'total' => 175],\r\n [ 'medida' => 43000, 'costo' => 5, 'total' => 180],\r\n [ 'medida' => 44000, 'costo' => 5, 'total' => 185],\r\n [ 'medida' => 45000, 'costo' => 5, 'total' => 190],\r\n [ 'medida' => 46000, 'costo' => 5, 'total' => 195],\r\n [ 'medida' => 47000, 'costo' => 5, 'total' => 200],\r\n [ 'medida' => 48000, 'costo' => 5, 'total' => 205],\r\n [ 'medida' => 49000, 'costo' => 5, 'total' => 210],\r\n [ 'medida' => 50000, 'costo' => 5, 'total' => 215],\r\n [ 'medida' => 51000, 'costo' => 5, 'total' => 220],\r\n [ 'medida' => 52000, 'costo' => 5, 'total' => 225],\r\n [ 'medida' => 53000, 'costo' => 5, 'total' => 230],\r\n [ 'medida' => 54000, 'costo' => 5, 'total' => 235],\r\n [ 'medida' => 55000, 'costo' => 5, 'total' => 240],\r\n [ 'medida' => 56000, 'costo' => 5, 'total' => 245],\r\n [ 'medida' => 57000, 'costo' => 5, 'total' => 250],\r\n [ 'medida' => 58000, 'costo' => 5, 'total' => 255],\r\n [ 'medida' => 59000, 'costo' => 5, 'total' => 260],\r\n [ 'medida' => 60000, 'costo' => 5, 'total' => 265],\r\n [ 'medida' => 61000, 'costo' => 5, 'total' => 270],\r\n [ 'medida' => 62000, 'costo' => 5, 'total' => 275],\r\n [ 'medida' => 63000, 'costo' => 5, 'total' => 280],\r\n [ 'medida' => 64000, 'costo' => 5, 'total' => 285],\r\n [ 'medida' => 65000, 'costo' => 5, 'total' => 290],\r\n [ 'medida' => 66000, 'costo' => 5, 'total' => 295],\r\n [ 'medida' => 67000, 'costo' => 5, 'total' => 300],\r\n [ 'medida' => 68000, 'costo' => 5, 'total' => 305],\r\n [ 'medida' => 69000, 'costo' => 5, 'total' => 310],\r\n [ 'medida' => 70000, 'costo' => 5, 'total' => 315],\r\n [ 'medida' => 71000, 'costo' => 5, 'total' => 320],\r\n [ 'medida' => 72000, 'costo' => 5, 'total' => 325],\r\n [ 'medida' => 73000, 'costo' => 5, 'total' => 330],\r\n [ 'medida' => 74000, 'costo' => 5, 'total' => 335],\r\n [ 'medida' => 75000, 'costo' => 5, 'total' => 340],\r\n [ 'medida' => 76000, 'costo' => 5, 'total' => 345],\r\n [ 'medida' => 77000, 'costo' => 5, 'total' => 350],\r\n [ 'medida' => 78000, 'costo' => 5, 'total' => 355],\r\n [ 'medida' => 79000, 'costo' => 5, 'total' => 360],\r\n [ 'medida' => 80000, 'costo' => 5, 'total' => 365],\r\n [ 'medida' => 81000, 'costo' => 5, 'total' => 370],\r\n [ 'medida' => 82000, 'costo' => 5, 'total' => 375],\r\n [ 'medida' => 83000, 'costo' => 5, 'total' => 380],\r\n [ 'medida' => 84000, 'costo' => 5, 'total' => 385],\r\n [ 'medida' => 85000, 'costo' => 5, 'total' => 390],\r\n [ 'medida' => 86000, 'costo' => 5, 'total' => 395],\r\n [ 'medida' => 87000, 'costo' => 5, 'total' => 400],\r\n [ 'medida' => 88000, 'costo' => 5, 'total' => 405],\r\n [ 'medida' => 89000, 'costo' => 5, 'total' => 410],\r\n [ 'medida' => 90000, 'costo' => 5, 'total' => 415],\r\n [ 'medida' => 91000, 'costo' => 5, 'total' => 420],\r\n [ 'medida' => 92000, 'costo' => 5, 'total' => 425],\r\n [ 'medida' => 93000, 'costo' => 5, 'total' => 430],\r\n [ 'medida' => 94000, 'costo' => 5, 'total' => 435],\r\n [ 'medida' => 95000, 'costo' => 5, 'total' => 440],\r\n [ 'medida' => 96000, 'costo' => 5, 'total' => 445],\r\n [ 'medida' => 97000, 'costo' => 5, 'total' => 450],\r\n [ 'medida' => 98000, 'costo' => 5, 'total' => 455],\r\n [ 'medida' => 99000, 'costo' => 5, 'total' => 460],\r\n [ 'medida' => 100000, 'costo' => 5, 'total' => 465]\r\n\r\n ];\r\n\r\n foreach($registros as $registro){\r\n TasaAgua::create($registro);\r\n } \r\n\r\n\r\n }", "title": "" }, { "docid": "ab1091840365ce0b760f1a068bd8969a", "score": "0.5288399", "text": "public function crearVentaController() {\n\n\t\tif(isset($_POST['nuevaVenta']) && isset($_POST['seleccionarCliente']) && isset($_POST['idVendedor']) && isset($_POST['listaProductos']) && isset($_POST['nuevoPrecioImpuesto']) && isset($_POST['nuevoPrecioNeto']) && isset($_POST['totalVenta']) && isset($_POST['nuevoMetodoPago'])) {\n\n\t\t\t/*======================================================\n\t\t\tACTUALIZAR LAS COMPRAS DEL CLIENTE Y REDUCIR EL STOCK Y AUMENTAR LAS VENTAS DE LOS PRODUCTOS\n\t\t\t======================================================*/\n\n\t\t\t$listaProductos = json_decode($_POST['listaProductos'], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($listaProductos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value['cantidad']);\n\t\t\t\t\n\t\t\t\t$tablaProducto = \"bdt03_productos\";\n\n\t\t\t\t$item = \"id_producto\";\n\n\t\t\t\t$valor = $value['id'];\n\n\t\t\t\t$traerProductos = ProductosModel::mostrarProductosModels($tablaProducto, $item, $valor);\n\n\n\t\t\t\t$item1a = \"cantidad_ventas\";\n\n\t\t\t\t$valor1a = $value['cantidad'] + $traerProductos['cantidad_ventas'];\n\n\t\t\t\t$nuevasVentas = ProductosModel::actualizarProductosModels($tablaProducto, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\n\t\t\t\t$valor1b = $value['stock'];\n\n\t\t\t\t$nuevoStock = ProductosModel::actualizarProductosModels($tablaProducto, $item1b, $valor1b, $valor);\n\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"bdt04_clientes\";\n\n\t\t\t$item = \"id_cliente\";\n\n\t\t\t$valor = $_POST['seleccionarCliente'];\n\n\t\t\t$traerCliente = ClientesModel::mostrarClientesModels($tablaClientes, $item, $valor);\n\n\t\t\t$item1a = \"total_compras\";\n\n\t\t\t$valor1a = array_sum($totalProductosComprados) + $traerCliente['total_compras'];\n\n\t\t\t$comprasCliente = ClientesModel::actualizarClientesModels($tablaClientes, $item1a, $valor1a, $valor);\n\n\t\t\t$item1b = \"ultima_compra\";\n\n\t\t\tdate_default_timezone_set('America/Lima');\n\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\n\t\t\t$fechaActual = $fecha . ' ' . $hora;\n\n\t\t\t$valor1b = $fechaActual;\n\n\t\t\t$ultimaCompra = ClientesModel::actualizarClientesModels($tablaClientes, $item1b, $valor1b, $valor);\n\n\n\n\t\t\t/*======================================================\n\t\t\tGUARDAR LA COMPRA\n\t\t\t======================================================*/\n\n\t\t\t$tablaVentas = \"bdt05_ventas\";\n\n\t\t\t$datosController = array(\"id_vendedor\" => $_POST['idVendedor'], \"id_cliente\" => $_POST['seleccionarCliente'], \"codigo\" => $_POST['nuevaVenta'], \"productos\" => $_POST['listaProductos'], \"impuesto\" => $_POST['nuevoPrecioImpuesto'], \"neto\" => $_POST['nuevoPrecioNeto'], \"total_venta\" => $_POST['totalVenta'], \"metodo_pago\" => $_POST['listaMetodoPago']);\n\n\t\t\t$respuesta = VentasModel::ingresarVentasModels($tablaVentas, $datosController);\n\n\t\t\tif($respuesta == 'Ok') {\n\n\t\t\t\techo '<script>\n\t\t\t\tswal({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\ttitle: \"La Venta ha sido Guardada Correctamente\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"¡Cerrar!\",\n\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t}).then((result) => {\n\t\t\t\t\tif(result.value) {\n\n\t\t\t\t\t\twindow.location = \"ventas\";\n\t\t\t\t\t}\n\t\t\t\t})</script>';\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\techo '<script>\n\t\t\t\tswal({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\ttitle: \"Error al Guardar la Venta\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"¡Cerrar!\",\n\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t}).then((result) => {\n\t\t\t\t\tif(result.value) {\n\n\t\t\t\t\t\twindow.location = \"ventas\";\n\t\t\t\t\t}\n\t\t\t\t})</script>';\n\t\t\t}\n\n\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "50f81d6ee47cd389c297ee0340e19632", "score": "0.52824926", "text": "function mezclar ( $altura, $apellido, $nombre){\n\t\t\t\t//busco el mayor tamaño de todos los arrays\n\t\t\t\t$maximo = max(sizeof($altura), sizeof($apellido),sizeof($nombre));\n\t\t\t\t$union =array( );\n\t\t\t\tfor ($i=0; $i<= $maximo-1; $i++){\n\t\t\t\t\t$union[$i][0] = $altura[$i];\n\t\t\t\t\t$union[$i][1] = $apellido[$i];\n\t\t\t\t\t$union[$i][2] = $nombre[$i];\n\t\t\t\t}\n\t\t\t\treturn $union;\n\t\t\t}", "title": "" }, { "docid": "8f8fac442079a28be395566f6f14192b", "score": "0.5278795", "text": "public function _carrinhoDetalhado(){\n $modelCarrinho = new Carrinho();\n $modelListaCar = new ListaCarrinho();\n $modelProduto = new Produto();\n\n //Array de retorno\n $retorno =[];\n\n //busca o último carrinho ativo\n $dadosCarrinhoAtual = $modelCarrinho->where(['id_user'=>Auth::id(),'status'=>1])->first();\n if($dadosCarrinhoAtual!=null){\n $retorno['carrinho'] = [\n 'id' => $dadosCarrinhoAtual->id,\n 'total'=> $this->__convertPrecoTOUser($dadosCarrinhoAtual->total),\n ];\n\n //Verifica listaCarrinho\n $dadosListaCarrinho = $modelListaCar->where(['id_carrinho'=>$dadosCarrinhoAtual->id])->get();\n $totalItens = 0;//tottal de itens no carrinho\n if($dadosListaCarrinho!=null){\n $aux = [];\n foreach($dadosListaCarrinho as $list){\n $dadosProduto = $modelProduto->find($list->id_prod);\n\n $aux[] = [\n 'id_lista' => $list->id,\n 'qde' => $list->qde,\n 'preco' => $this->__convertPrecoTOUser($list->preco),\n 'preco_total'=> $this->__convertPrecoTOUser($list->preco_total),\n 'id_prod' => $dadosProduto!=null?$dadosProduto->id:'',\n 'nome' => $dadosProduto!=null?$dadosProduto->nome:'',\n 'img' => $dadosProduto!=null?$this->_storagePath.$dadosProduto->url_imagem:'',\n ];\n\n $totalItens += $list->qde;\n }//foreach\n\n if(count($aux)>0)\n $retorno['carrinho']['lista'] = $aux;\n\n $retorno['carrinho']['totalItens'] = $totalItens;\n }//if lista carinho\n }//if possui carrinho\n\n return $retorno;\n }", "title": "" }, { "docid": "2cd35eafc51ecb3c582e920997d043ed", "score": "0.52783376", "text": "function applique_tva($nombre)\n{\n\t$resultat = $nombre*1.2;\n\treturn $resultat;\n}", "title": "" }, { "docid": "760a09b3aec5da73e22ca6ace543e56c", "score": "0.5277333", "text": "function formulaires_compositions_sommaire_charger_dist(){\n\t\t$valeurs = array('composition_sommaire'=>'');\n\t\treturn $valeurs;\n}", "title": "" }, { "docid": "a520fc260eef2968f2ba5e5842fba0e5", "score": "0.5272386", "text": "public function getArrayCriacaoTransacao(){\n\n if(isset($this->lojista) && !empty($this->lojista)){\n $mensagem['recebedor_email'] = $this->lojista->getEmail();\n $mensagem['recebedor_api_token'] = $this->lojista->getToken();\n } else {\n throw new Exception(\"Dados do lojista não setados.\");\n }\n\n if(isset($this->cartao) && !empty($this->cartao)){\n $mensagem['cartao_numero'] = $this->cartao->getNumero();\n $mensagem['cartao_parcelas'] = $this->cartao->getParcelas();\n $mensagem['cartao_codigo_de_seguranca'] = $this->cartao->getCodigoSeguranca();\n $mensagem['cartao_bandeira'] = $this->cartao->getBandeira();\n $mensagem['cartao_portador_nome'] = $this->cartao->getPortadorNome();\n $mensagem['cartao_validade_mes'] = $this->cartao->getValidadeMes();\n $mensagem['cartao_validade_ano'] = $this->cartao->getValidadeAno();\n $mensagem['cartao_portador_cpf'] = $this->cartao->getPortadorCPF();\n $mensagem['cartao_portador_data_de_nascimento'] = $this->cartao->getPortadorNascimento();\n $mensagem['cartao_portador_telefone_ddd'] = $this->cartao->getPortadorDDD();\n $mensagem['cartao_portador_telefone'] = $this->cartao->getPortadorTelefone();\n }\n\n if(isset($this->pagador) && !empty($this->pagador)){\n $mensagem['pagador_logradouro'] = $this->pagador->getEndereco()->getLogradouro();\n $mensagem['pagador_numero'] = $this->pagador->getEndereco()->getNumero();\n $mensagem['pagador_complemento'] = $this->pagador->getEndereco()->getComplemento();\n $mensagem['pagador_bairro'] = $this->pagador->getEndereco()->getBairro();\n $mensagem['pagador_cep'] = $this->pagador->getEndereco()->getCEP();\n $mensagem['pagador_cidade'] = $this->pagador->getEndereco()->getCidade();\n $mensagem['pagador_estado'] = $this->pagador->getEndereco()->getEstado();\n $mensagem['pagador_pais'] = $this->pagador->getEndereco()->getPais();\n\n $mensagem['pagador_nome'] = $this->pagador->getNome();\n $mensagem['pagador_email'] = $this->pagador->getEmail();\n $mensagem['pagador_cpf'] = $this->pagador->getCPF();\n $mensagem['pagador_rg'] = $this->pagador->getRG();\n $mensagem['pagador_telefone_ddd'] = $this->pagador->getDDDTelefone();\n $mensagem['pagador_telefone'] = $this->pagador->getTelefone();\n $mensagem['pagador_celular_ddd'] = $this->pagador->getDDDCelular();\n $mensagem['pagador_celular'] = $this->pagador->getCelular();\n $mensagem['pagador_sexo'] = $this->pagador->getSexo();\n $mensagem['pagador_data_nascimento'] = $this->pagador->getNascimento();\n $mensagem['pagador_ip'] = $this->pagador->getIP();\n } else {\n throw new Exception(\"Dados do pagador não setados.\");\n }\n\n if(isset($this->pedido) && !empty($this->pedido)){\n $mensagem['pedido_id'] = $this->pedido->getID();\n $mensagem['pedido_descricao'] = $this->pedido->getDescricao();\n $mensagem['pedido_meio_pagamento'] = $this->pedido->getMeioPagamento();\n $mensagem['pedido_moeda'] = $this->pedido->getMoeda();\n $mensagem['pedido_valor_total_original'] = $this->pedido->getValorTotalOriginal();\n $mensagem['pedido_url_redirecionamento'] = $this->pedido->getURLRedirecionamento();\n } else {\n throw new Exception(\"Dados do pedido não setados.\");\n }\n\n if(isset($this->endereco_entrega) && !empty($this->endereco_entrega)){\n $mensagem['entrega_logradouro'] = $this->endereco_entrega->getEndereco()->getLogradouro();\n $mensagem['entrega_numero'] = $this->endereco_entrega->getEndereco()->getNumero();\n $mensagem['entrega_complemento'] = $this->endereco_entrega->getEndereco()->getComplemento();\n $mensagem['entrega_bairro'] = $this->endereco_entrega->getEndereco()->getBairro();\n $mensagem['entrega_cep'] = $this->endereco_entrega->getEndereco()->getCEP();\n $mensagem['entrega_cidade'] = $this->endereco_entrega->getEndereco()->getCidade();\n $mensagem['entrega_estado'] = $this->endereco_entrega->getEndereco()->getEstado();\n $mensagem['entrega_pais'] = $this->endereco_entrega->getEndereco()->getPais();\n $mensagem['entrega_nome'] = $this->endereco_entrega->getNome();\n\n } else {\n throw new Exception(\"Dados do entrega não setados.\");\n }\n\n if(isset($this->produto) && !empty($this->produto)){\n $i=0;\n foreach ($this->produto as $value) {\n $mensagem['produtos'][$i]['produto_nome'] = $value->getNome();\n $mensagem['produtos'][$i]['produto_codigo'] = $value->getCodigo();\n $mensagem['produtos'][$i]['produto_categoria'] = $value->getCategoria();\n $mensagem['produtos'][$i]['produto_qtd'] = $value->getQuantidade();\n $mensagem['produtos'][$i]['produto_valor'] = $value->getValor();\n $mensagem['produtos'][$i]['produto_peso'] = $value->getPeso();\n $i++;\n }\n\n }\n\n if(isset($this->recebedor_secundario) && !empty($this->recebedor_secundario)){\n $i=0;\n foreach ($this->recebedor_secundario as $value) {\n $mensagem['recebedor_secundario'][$i]['produto_nome'] = $value->getEmail();\n $mensagem['recebedor_secundario'][$i]['produto_codigo'] = $value->getValor();\n $i++;\n }\n }\n \n if(isset($this->conexao) && !empty($this->conexao)){\n $urlEnvio = $this->conexao->getURL();\n } else {\n throw new Exception(\"Dados da conexão não setados.\");\n }\n\n $get_erro = $this->validaMensagem($mensagem);\n\n if($get_erro['sucesso']){\n PaybrasConfig::utf8_encode_deep($mensagem);\n $retorno = PaybrasConfig::curl($urlEnvio, $mensagem);\n return json_decode($retorno, true);\n } else {\n return $get_erro;\n }\n }", "title": "" }, { "docid": "01c13b135c970a42713ccb9793d1aa41", "score": "0.5272147", "text": "function type_et_nombre_vaisseaux_restants($nb_vaisseaux_attaquant_restants, $nb_vaisseaux_defenseur_restants) \r\n{\r\n\t$continue_attaquant = \"false\"; // SI on passe au round suivant (si il reste des survivants)\r\n\t$continue_defenseur = \"false\"; // SI on passe au round suivant (si il reste des survivants)\r\n\r\n\tglobal $vague;\r\n\tglobal $type_vaisseau_attaquant, $nombre_vaisseau_attaquant;\r\n\tglobal $type_vaisseau_defenseur, $nombre_vaisseau_defenseur;\r\n\t\r\n\t$y = 0;\r\n\tfor ($i = 0; $i < count($type_vaisseau_attaquant[$vague]); $i++) {\r\n\t\tif ($nb_vaisseaux_attaquant_restants[$vague][$i] !=0 ) {\r\n\t\t\t$nombre_vaisseau_attaquant[$vague+1][$y] = $nb_vaisseaux_attaquant_restants[$vague][$i];\r\n\t\t\t$type_vaisseau_attaquant[$vague+1][$y] = $type_vaisseau_attaquant[$vague][$i];\r\n\r\n\t\t\t$continue_attaquant = \"true\";\r\n\t\t\t$y++;\r\n\t\t}\r\n\t}\r\n\t$y = 0;\r\n\tfor ($i = 0; $i < count($type_vaisseau_defenseur[$vague]); $i++) {\r\n\t\tif ($nb_vaisseaux_defenseur_restants[$vague][$i] !=0 ) {\r\n\t\t\t$nombre_vaisseau_defenseur[$vague+1][$y] = $nb_vaisseaux_defenseur_restants[$vague][$i];\r\n\t\t\t$type_vaisseau_defenseur[$vague+1][$y] = $type_vaisseau_defenseur[$vague][$i];\r\n\r\n\t\t\t$continue_defenseur = \"true\";\r\n\t\t\t$y++;\r\n\t\t}\r\n\t}\r\n\tif (($continue_attaquant == \"false\") OR ($continue_defenseur == \"false\")) {\r\n\t\tunset($nombre_vaisseau_defenseur[$vague+1]);\r\n\t\tunset($type_vaisseau_defenseur[$vague+1]);\r\n\t\tunset($nombre_vaisseau_attaquant[$vague+1]);\r\n\t\tunset($type_vaisseau_attaquant[$vague+1]);\r\n\t\t\r\n\t\t$vague = 99; // On met le round a 99 (pour quer la boucle s'arrete)\t\r\n\t}\r\n}", "title": "" }, { "docid": "40313d0faa074924c517f494be0e94ba", "score": "0.5267013", "text": "function siguienteEstadoLibroBancos(){\r\n $this->procedimiento='tes.ft_ts_libro_bancos_ime';\r\n $this->transaccion='TES_SIGELB_IME';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\r\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\r\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\r\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\r\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\r\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\r\n $this->setParametro('obs','obs','text');\r\n $this->setParametro('json_procesos','json_procesos','text');\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": "f825970386a059f13583ec5c0db2295a", "score": "0.52662164", "text": "function get_comisiones_promo_de_materia($parametros)\n {\n $anio_academico = $parametros['anio_academico'];\n $periodo = $parametros['periodo'];\n $materia = $parametros['materia'];\n \n $promociones = '4,6,9,10';\n //$regulares = '3,4,5,7,8,10';\n //\n //S�lo retorna las comisiones que son promocionables\n $sql = \"SELECT C.comision, \n C.nombre AS comision_nombre, \n C.anio_academico, \n C.periodo_lectivo,\n C.escala_notas, \n C.carrera, \n DECODE(C.turno,'T', 'Tarde', 'N', 'Noche', 'M', 'Ma�ana', 'No informa') as turno,\n EN.nombre AS escala_notas_nombre,\n UC.porc_parciales,\n UC.porc_integrador,\n UC.porc_trabajos\n FROM sga_comisiones C\n JOIN sga_escala_notas EN ON (EN.escala_notas = C.escala_notas)\n LEFT JOIN ufce_comisiones_porc_notas UC ON (UC.comision = C.comision)\n WHERE C.estado = 'A'\n AND EN.escala_notas IN ($promociones)\n AND C.anio_academico = $anio_academico\n AND C.materia = $materia \";\n\n if ($periodo != \"''\")\n {\n $sql .= \" AND C.periodo_lectivo = $periodo\";\n }\n return kernel::db()->consultar($sql, db::FETCH_ASSOC);\n }", "title": "" }, { "docid": "9d3612949b3b2f2cb938b3b6161d9c9c", "score": "0.52531236", "text": "private function montantRestant($idc){\n $res = $this->pdo->prepare(\"select id from order_vente where verif = 0 and idc = ?\");\n $res->execute(array($idc));\n $r = $res->fetchAll(PDO::FETCH_ASSOC);\n $arr = array();\n $i=0;\n foreach($r as $row){\n $arr[$i] = $row['id'];\n $i++;\n }\n\n //calculer la somme des montant payee pour les ordre vente non payee\n $sommePayee = 0;\n foreach($arr as $idov){\n $res = $this->pdo->prepare(\"select sum(montantpayee) from facilite where idov = ? \");\n $res->execute(array($idov));\n $sommePayee = $sommePayee + floatval($res->fetchAll(PDO::FETCH_ASSOC)[\"0\"][\"sum(montantpayee)\"]);\n }\n\n\n $res = $this->pdo->prepare(\"select sum(prixTotale) from order_vente where verif = 0 and idc = ?\");\n $res->execute(array($idc));\n $prixTotale = floatval($res->fetchAll(PDO::FETCH_ASSOC)[\"0\"][\"sum(prixTotale)\"]);\n return $prixTotale - $sommePayee;\n}", "title": "" }, { "docid": "129174f3139288627e61910e5c9feb13", "score": "0.52514076", "text": "public function ProbK1()\n {\n $this->db->select('*');\n $this->db->from('tmp_final');\n $this->db->where('id_kepribadian', 1);\n $prob = $this->db->get()->result();\n //inisialisasi untuk total probabilitas\n $jumlah = 1;\n foreach ($prob as $pr) {\n\t\t\t$jumlah = $jumlah * $pr->probabilitas;\n\t\t}\n\n // Perhitungan hasil bayes kepribadian 1\n // (Prob kepribadian di tmp_final * prob di tabel kepribadian)\n $this->db->select('*');\n $this->db->from('tbl_kepribadian');\n $this->db->where('id_kepribadian', 1);\n $data = $this->db->get()->result();\n foreach ($data as $rowku) {\n\t\t\t$hasilBayes = $jumlah * $rowku->probabilitas;\n\t\t}\n return $hasilBayes;\n }", "title": "" }, { "docid": "e96d5012121f85dcf506812a65d7f042", "score": "0.5246983", "text": "function fondoDevolucionRetencion(){\r\n $this->procedimiento='tes.ft_ts_libro_bancos_ime';\r\n $this->transaccion='TES_DEVRET_IME';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_libro_bancos','id_libro_bancos','int4');\r\n $this->setParametro('operacion','operacion','varchar');\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": "5a6ad7a14e0a0495a68fa949d545e714", "score": "0.52428955", "text": "function valorPorExtenso($valor=0)\n{\n\t$singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\n\t$plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\"quatrilhões\");\n\t$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n\t$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n\t$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n\t$u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\"sete\", \"oito\", \"nove\");\n\t$z=0;\n\t$valor = number_format($valor, 2, \".\", \".\");\n\t$inteiro = explode(\".\", $valor);\n\tfor($i=0;$i<count($inteiro);$i++)\n\t\tfor($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n\t\t\t$inteiro[$i] = \"0\".$inteiro[$i];\n\t\t$rt = \"\";\n\t\t// $fim identifica onde que deve se dar junção de centenas por \"e\" ou por \",\" ;) \n\t\t$fim = count($inteiro) - ($inteiro[count($inteiro)-1] > 0 ? 1 : 2);\n\t\tfor ($i=0;$i<count($inteiro);$i++)\n\t\t{\n\t\t\t$valor = $inteiro[$i];\n\t\t\t$rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n\t\t\t$rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n\t\t\t$ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n\t\t\t$r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd && $ru) ? \" e \" : \"\").$ru;\n\t\t\t$t = count($inteiro)-1-$i;\n\t\t\t$r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n\t\t\tif ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n\t\t\tif (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t]; \n\t\t\tif ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n\t\t}\n\t\treturn($rt ? $rt : \"zero\");\n\t}", "title": "" }, { "docid": "85a1a773d3d2164ad0c05a865a82480d", "score": "0.5242481", "text": "public function gerer()\n\t{\n\t\t$query = $this->db->select('struls, salaire_maire, aide_entreprise, aide_chomage, impots_employes, impots_faim, impots_sante, impots_stress, impots_lohtoh, tricher_elections, cacher_salaire,\n\t\t\t\t\t\t\t\t\tcoefficients_achats, promotion_objet_id,bonus_entreprise,malus_entreprise')\n\t\t\t\t\t\t ->from('mairie')\n\t\t\t\t\t\t ->get();\n\t\t$mairie = $query->row();\n\t\t$mairie->coefficients_achats = explode('|', $mairie->coefficients_achats);\n\n\t\t// Nombre de joueurs actifs\n\t\t$nb_joueurs_actifs = $this->db->where('statut', Bouzouk::Joueur_Actif)\n\t\t\t\t\t\t\t ->where('id !=', $this->session->userdata('id'))\n\t\t\t\t\t\t\t ->count_all_results('joueurs');\n\t\t$select_joueurs = $this->bouzouk->select_joueurs(array('status_not_in' => array(Bouzouk::Joueur_Etudiant, Bouzouk::Joueur_ChoixPerso, Bouzouk::Joueur_Asile, Bouzouk::Joueur_Pause, Bouzouk::Joueur_GameOver, Bouzouk::Joueur_Robot, Bouzouk::Joueur_Banni)));\n\n\t\t// On va chercher le nombre de mendiants\n\t\t$nb_mendiants = $this->db->where('joueur_id !=', $this->session->userdata('id'))\n\t\t\t\t\t\t\t\t ->count_all_results('mendiants');\n\n\t\t// On va chercher la dernière taxe prévue si elle existe\n\t\t$query = $this->db->select('id, taux, raison')\n\t\t\t\t\t\t ->from('taxes_surprises')\n\t\t\t\t\t\t ->where('maire_id', $this->session->userdata('id'))\n\t\t\t\t\t\t ->where('distribuee', 0)\n\t\t\t\t\t\t ->order_by('date_taxe', 'desc')\n\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t ->get();\n\n\t\tif ($query->num_rows() == 1)\n\t\t\t$taxe = $query->row();\n\n\t\telse\n\t\t{\n\t\t\t$taxe = new StdClass;\n\t\t\t$taxe->id = 0;\n\t\t\t$taxe->taux = $this->bouzouk->config('mairie_taxe_min');\n\t\t\t$taxe->raison = '';\n\t\t}\n\n\t\t$taxe->modification = $this->input->post('taxe_id') !== false;\n\t\t\n\t\t// On regarde si le maire peut encore faire des dons\n\t\t$don_possible = $this->lib_mairie->don_possible(0);\n\n\t\t// On calcule le taux de chômage\n\t\t$nb_employes = $this->db->from('employes e')\n\t\t\t\t\t\t\t\t->join('joueurs j', 'j.id = e.joueur_id')\n\t\t\t\t\t\t\t\t->where_in('statut', array(Bouzouk::Joueur_Actif, Bouzouk::Joueur_Asile))\n\t\t\t\t\t\t\t\t->count_all_results('');\n\t\t$nb_patrons = $this->db->count_all('entreprises');\n\t\t$nb_joueurs = $this->db->where_in('statut', array(Bouzouk::Joueur_Actif, Bouzouk::Joueur_Asile))\n\t\t\t\t\t\t\t ->count_all_results('joueurs');\n\n\t\t$taux_chomage = round(100 - ($nb_employes + $nb_patrons) * 100.0 / $nb_joueurs, 2);\n\t\t\n\t\t// ---------- Hook clans ----------\n\t\t// Propagande (Parti Politique)\n\t\t$query = $this->db->select('caa.parametres, c.nom AS nom_clan, c.mode_recrutement')\n\t\t\t\t\t\t ->from('clans_actions_lancees caa')\n\t\t\t\t\t\t ->join('clans c', 'c.id = caa.clan_id')\n\t\t\t\t\t\t ->where('caa.action_id', 11)\n\t\t\t\t\t\t ->where('caa.statut', Bouzouk::Clans_ActionEnCours)\n\t\t\t\t\t\t ->get();\n\t\t$propagande = ($query->num_rows() == 1) ? $query->row() : null;\n\t\t\n\t\t// ---------- Hook clans ----------\n\t\t// Braquage (Organisation)\n\t\t$braquage = $this->bouzouk->clans_braquage();\n\t\t\t\n\t\t// On va chercher tous les objets possibles pour une promotion (sauf des magazins fermés pour la journée et les objets braqués)\n\t\t$this->db->select('o.id, o.nom')\n\t\t\t\t ->from('objets o')\n\t\t\t\t ->join('magasins m', 'm.objet_id = o.id')\n\t\t\t\t ->where('o.disponibilite', 'entreprise')\n\t\t\t\t ->where('m.quantite >= ('.$this->bouzouk->config('mairie_coefficient_promotion').' * '.$nb_joueurs.') / o.prix');\n\t\t\n\t\tif (isset($braquage))\n\t\t\t$this->db->where('o.id !=', $braquage->parametres['objet_id']);\n\t\t\n\t\tif (isset($propagande))\n\t\t{\n\t\t\t$propagande->parametres = unserialize($propagande->parametres);\n\t\t\t$this->db->where('o.type !=', $propagande->parametres['shop']);\n\t\t}\n\t\t\t\t\t\t \n\t\t$query = $this->db->order_by('o.nom')\n\t\t\t\t\t\t ->get();\n\t\t\n\t\t$objets_promotion = $query->result();\n\n\t\t// On calcule les moyennes et médianes des fortunes du classement de la dernière maintenance\n\t\t$query = $this->db->select('valeur')\n\t\t\t\t\t\t ->from('classement_joueurs')\n\t\t\t\t\t\t ->where('type', Bouzouk::Classement_Fortune)\n\t\t\t\t\t\t ->order_by('id')\n\t\t\t\t\t\t ->get();\n\t\t$fortunes = array();\n\t\t$nb_fortunes = $query->num_rows();\n\n\t\t$economie = array(\n\t\t\t'mediane' => 0,\n\t\t\t'moyenne' => 0,\n\t\t\t'moyenne_sous_mediane' => 0,\n\t\t\t'moyenne_sur_mediane' => 0\n\t\t);\n\n\t\t// Récupération et tri des fortunes\n\t\tforeach ($query->result() as $classement)\n\t\t\t$fortunes[] = $classement->valeur;\n\t\tsort($fortunes);\n\n\t\t// Calcul de la médiane\n\t\t$economie['mediane'] = $fortunes[$nb_fortunes / 2];\n\n\t\t// Calcul de la moyenne\n\t\tforeach ($fortunes as $fortune)\n\t\t\t$economie['moyenne'] += $fortune;\n\t\t$economie['moyenne'] /= $nb_fortunes;\n\n\t\t// Calcul de la moyenne sous la médiane\n\t\tfor ($i = 0; $i < $nb_fortunes / 2; $i++)\n\t\t\t$economie['moyenne_sous_mediane'] += $fortunes[$i];\n\t\t$economie['moyenne_sous_mediane'] /= $nb_fortunes / 2;\n\n\t\t// Calcul de la moyenne sur la médiane\n\t\tfor ($i = $nb_fortunes / 2; $i < $nb_fortunes; $i++)\n\t\t\t$economie['moyenne_sur_mediane'] += $fortunes[$i];\n\t\t$economie['moyenne_sur_mediane'] /= $nb_fortunes / 2;\n\n\t\t// On affiche\n\t\t$vars = array(\n\t\t\t'mairie' => $mairie,\n\t\t\t'select_joueurs' => $select_joueurs,\n\t\t\t'nb_joueurs' => $nb_joueurs_actifs,\n\t\t\t'nb_mendiants' => $nb_mendiants,\n\t\t\t'taxe' => $taxe,\n\t\t\t'total_dons' => $don_possible['total_dons'],\n\t\t\t'taux_chomage' => $taux_chomage,\n\t\t\t'nb_chomeurs' => $nb_joueurs - $nb_employes - $nb_patrons,\n\t\t\t'objets_promotion' => $objets_promotion,\n\t\t\t'economie' => $economie,\n\t\t\t'lien'\t\t\t => 1\n\t\t);\n\t\treturn $this->layout->view('mairie/gerer', $vars);\n\t}", "title": "" }, { "docid": "92c5e1a58a3c431e75d9a72e03e3eef5", "score": "0.5240601", "text": "public function run()\n {\n $convocatorias = [\n [\n 'unit_id' => '1',\n 'titulo_convocatoria' => 'Convocatoria Auxiliatura 2020 Laboratorios Sistemas',\n 'gestion' => '2020-07-12', \n 'requisitos' => 'a) Ser estudiante regular y con rendimiento académico de las carreras de\\r\\nLicenciatura en Ingeniería Informática o Licenciatura en Ingeniería de Sistemas,\\r\\nque cursa regularmente en la Universidad. Para las materias de Introducción a la\\r\\nProgramación y Elementos de Programación y Estructura de Datos, podrán\\r\\npresentarse además estudiantes de Ing. Electrónica. Para la materia de\\r\\nComputación I podrán presentarse además estudiantes de Ing. Industrial, Ing.\\r\\nMecánica, Ing. Eléctrica, Ing. Electro-Mecánica e Ing. Matemática. Estudiante\\r\\nregular es aquel que está inscrito en la gestión académica vigente y cumple los\\r\\nrequisitos exigidos para seguir una carrera universitaria y el rendimiento\\r\\nacadémico, haber aprobado más de la mitad de las materias curriculares que\\r\\n\\r\\ncorresponde al semestre anterior, certificado por el departamento de Registros\\r\\ne Inscripciones.\\r\\nb) O haber concluido el pensum con la totalidad de materias, teniendo pendiente\\r\\ntan solo la aprobación de la Modalidad de Graduación, pudiendo postular a la\\r\\nAuxiliatura Universitaria dentro del siguiente periodo académico (dos años o\\r\\ncuatro semestres), a partir de la fecha de conclusión de pensum de materias.\\r\\nEste periodo de dos años adicionales a los que contempla la conclusión del\\r\\npensum de materias no podrá ampliarse bajo circunstancia alguna, aún en caso\\r\\nde encontrarse cursando otra carrera.\\r\\nc) Queda expresamente prohibido la participación de estudiantes que hubiesen\\r\\nobtenido ya un título profesional en alguna de las carreras de la Universidad\\r\\nMayor de San Simon o de cualquier otra del Sistema de la Universidad Boliviana\\r\\n(RCU No. 63/2018). Aún en caso de encontrarse cursando otra carrera con\\r\\nadmisión especial. (Certificación emitida por el Departamento de Registros e\\r\\nInscripciones).\\r\\nd) Haber Aprobado la totalidad de las materias del semestre a la materia a la que\\r\\nse postula.\\r\\ne) No tener deudas de libros en la biblioteca de la FCyT.\\r\\nf) Participar y aprobar el Concurso de Méritos y proceso de pruebas de selección y\\r\\nadmisión, conforme a convocatoria.',\n //'pdf_file' => 'NULL',\n 'tipo_convocatoria' => 'convocatoria de laboratorios', \n 'publicado' => 'no', \n \n ],\n [\n 'unit_id' => '1',\n 'titulo_convocatoria' => 'Convocatoria Auxiliatura 2020 Docencia Sistemas',\n 'gestion' => '2020-07-12', \n 'requisitos' => '\n a) Ser estudiante regular y con rendimiento académico de las carreras de\n Licenciatura en Ingeniería Informática o Licenciatura en Ingeniería de Sistemas,\n que cursa regularmente en la Universidad. Para las materias de Introducción a la\n Programación y Elementos de Programación y Estructura de Datos, podrán\n presentarse además estudiantes de Ing. Electrónica. Para la materia de\n Computación I podrán presentarse además estudiantes de Ing. Industrial, Ing.\n Mecánica, Ing. Eléctrica, Ing. Electro-Mecánica e Ing. Matemática. Estudiante\n regular es aquel que está inscrito en la gestión académica vigente y cumple los\n requisitos exigidos para seguir una carrera universitaria y el rendimiento\n académico, haber aprobado más de la mitad de las materias curriculares que \n corresponde al semestre anterior, certificado por el departamento de Registros\n e Inscripciones.\n \n b) O haber concluido el pensum con la totalidad de materias, teniendo pendiente\n tan solo la aprobación de la Modalidad de Graduación, pudiendo postular a la\n Auxiliatura Universitaria dentro del siguiente periodo académico (dos años o\n cuatro semestres), a partir de la fecha de conclusión de pensum de materias.\n Este periodo de dos años adicionales a los que contempla la conclusión del\n pensum de materias no podrá ampliarse bajo circunstancia alguna, aún en caso\n de encontrarse cursando otra carrera.\n\n c) Queda expresamente prohibido la participación de estudiantes que hubiesen\n obtenido ya un título profesional en alguna de las carreras de la Universidad\n Mayor de San Simon o de cualquier otra del Sistema de la Universidad Boliviana\n (RCU No. 63/2018). Aún en caso de encontrarse cursando otra carrera con\n admisión especial. (Certificación emitida por el Departamento de Registros e\n Inscripciones).\n\n d) Haber Aprobado la totalidad de las materias del semestre a la materia a la que\n se postula.\n\n e) No tener deudas de libros en la biblioteca de la FCyT.\n\n f) Participar y aprobar el Concurso de Méritos y proceso de pruebas de selección y\n admisión, conforme a convocatoria.\n ',\n //'pdf_file' => 'NULL',\n 'tipo_convocatoria' => 'convocatoria de docencia', \n 'publicado' => 'no', \n \n ],\n // [\n // 'unit_id' => '2',\n // 'titulo_convocatoria' => 'Convocatoria Auxiliatura 2020 Laboratorios Informatica',\n // 'gestion' => '2020-07-12', \n // 'requisitos' => 'a) Ser estudiante regular y con rendimiento académico de las carreras de\\r\\nLicenciatura en Ingeniería Informática o Licenciatura en Ingeniería de Sistemas,\\r\\nque cursa regularmente en la Universidad. Para las materias de Introducción a la\\r\\nProgramación y Elementos de Programación y Estructura de Datos, podrán\\r\\npresentarse además estudiantes de Ing. Electrónica. Para la materia de\\r\\nComputación I podrán presentarse además estudiantes de Ing. Industrial, Ing.\\r\\nMecánica, Ing. Eléctrica, Ing. Electro-Mecánica e Ing. Matemática. Estudiante\\r\\nregular es aquel que está inscrito en la gestión académica vigente y cumple los\\r\\nrequisitos exigidos para seguir una carrera universitaria y el rendimiento\\r\\nacadémico, haber aprobado más de la mitad de las materias curriculares que\\r\\n\\r\\ncorresponde al semestre anterior, certificado por el departamento de Registros\\r\\ne Inscripciones.\\r\\nb) O haber concluido el pensum con la totalidad de materias, teniendo pendiente\\r\\ntan solo la aprobación de la Modalidad de Graduación, pudiendo postular a la\\r\\nAuxiliatura Universitaria dentro del siguiente periodo académico (dos años o\\r\\ncuatro semestres), a partir de la fecha de conclusión de pensum de materias.\\r\\nEste periodo de dos años adicionales a los que contempla la conclusión del\\r\\npensum de materias no podrá ampliarse bajo circunstancia alguna, aún en caso\\r\\nde encontrarse cursando otra carrera.\\r\\nc) Queda expresamente prohibido la participación de estudiantes que hubiesen\\r\\nobtenido ya un título profesional en alguna de las carreras de la Universidad\\r\\nMayor de San Simon o de cualquier otra del Sistema de la Universidad Boliviana\\r\\n(RCU No. 63/2018). Aún en caso de encontrarse cursando otra carrera con\\r\\nadmisión especial. (Certificación emitida por el Departamento de Registros e\\r\\nInscripciones).\\r\\nd) Haber Aprobado la totalidad de las materias del semestre a la materia a la que\\r\\nse postula.\\r\\ne) No tener deudas de libros en la biblioteca de la FCyT.\\r\\nf) Participar y aprobar el Concurso de Méritos y proceso de pruebas de selección y\\r\\nadmisión, conforme a convocatoria.',\n // //'pdf_file' => 'NULL',\n // 'tipo_convocatoria' => 'convocatoria de laboratorios', \n // 'publicado' => 'no', \n \n // ],\n // [\n // 'unit_id' => '3',\n // 'titulo_convocatoria' => 'Convocatoria Auxiliatura 2020 Laboratorios Electronica',\n // 'gestion' => '2020-07-12', \n // 'requisitos' => 'a) Ser estudiante regular y con rendimiento académico de las carreras de\\r\\nLicenciatura en Ingeniería Informática o Licenciatura en Ingeniería de Sistemas,\\r\\nque cursa regularmente en la Universidad. Para las materias de Introducción a la\\r\\nProgramación y Elementos de Programación y Estructura de Datos, podrán\\r\\npresentarse además estudiantes de Ing. Electrónica. Para la materia de\\r\\nComputación I podrán presentarse además estudiantes de Ing. Industrial, Ing.\\r\\nMecánica, Ing. Eléctrica, Ing. Electro-Mecánica e Ing. Matemática. Estudiante\\r\\nregular es aquel que está inscrito en la gestión académica vigente y cumple los\\r\\nrequisitos exigidos para seguir una carrera universitaria y el rendimiento\\r\\nacadémico, haber aprobado más de la mitad de las materias curriculares que\\r\\n\\r\\ncorresponde al semestre anterior, certificado por el departamento de Registros\\r\\ne Inscripciones.\\r\\nb) O haber concluido el pensum con la totalidad de materias, teniendo pendiente\\r\\ntan solo la aprobación de la Modalidad de Graduación, pudiendo postular a la\\r\\nAuxiliatura Universitaria dentro del siguiente periodo académico (dos años o\\r\\ncuatro semestres), a partir de la fecha de conclusión de pensum de materias.\\r\\nEste periodo de dos años adicionales a los que contempla la conclusión del\\r\\npensum de materias no podrá ampliarse bajo circunstancia alguna, aún en caso\\r\\nde encontrarse cursando otra carrera.\\r\\nc) Queda expresamente prohibido la participación de estudiantes que hubiesen\\r\\nobtenido ya un título profesional en alguna de las carreras de la Universidad\\r\\nMayor de San Simon o de cualquier otra del Sistema de la Universidad Boliviana\\r\\n(RCU No. 63/2018). Aún en caso de encontrarse cursando otra carrera con\\r\\nadmisión especial. (Certificación emitida por el Departamento de Registros e\\r\\nInscripciones).\\r\\nd) Haber Aprobado la totalidad de las materias del semestre a la materia a la que\\r\\nse postula.\\r\\ne) No tener deudas de libros en la biblioteca de la FCyT.\\r\\nf) Participar y aprobar el Concurso de Méritos y proceso de pruebas de selección y\\r\\nadmisión, conforme a convocatoria.',\n // //'pdf_file' => 'NULL',\n // 'tipo_convocatoria' => 'convocatoria de laboratorios', \n // 'publicado' => 'no', \n \n // ],\n // [\n // 'unit_id' => '2',\n // 'titulo_convocatoria' => 'Convocatoria Auxiliatura 2020 Docencia Informatica',\n // 'gestion' => '2020-07-12', \n // 'requisitos' => 'a) Ser estudiante regular y con rendimiento académico de las carreras de\\r\\nLicenciatura en Ingeniería Informática o Licenciatura en Ingeniería de Sistemas,\\r\\nque cursa regularmente en la Universidad. Para las materias de Introducción a la\\r\\nProgramación y Elementos de Programación y Estructura de Datos, podrán\\r\\npresentarse además estudiantes de Ing. Electrónica. Para la materia de\\r\\nComputación I podrán presentarse además estudiantes de Ing. Industrial, Ing.\\r\\nMecánica, Ing. Eléctrica, Ing. Electro-Mecánica e Ing. Matemática. Estudiante\\r\\nregular es aquel que está inscrito en la gestión académica vigente y cumple los\\r\\nrequisitos exigidos para seguir una carrera universitaria y el rendimiento\\r\\nacadémico, haber aprobado más de la mitad de las materias curriculares que\\r\\n\\r\\ncorresponde al semestre anterior, certificado por el departamento de Registros\\r\\ne Inscripciones.\\r\\nb) O haber concluido el pensum con la totalidad de materias, teniendo pendiente\\r\\ntan solo la aprobación de la Modalidad de Graduación, pudiendo postular a la\\r\\nAuxiliatura Universitaria dentro del siguiente periodo académico (dos años o\\r\\ncuatro semestres), a partir de la fecha de conclusión de pensum de materias.\\r\\nEste periodo de dos años adicionales a los que contempla la conclusión del\\r\\npensum de materias no podrá ampliarse bajo circunstancia alguna, aún en caso\\r\\nde encontrarse cursando otra carrera.\\r\\nc) Queda expresamente prohibido la participación de estudiantes que hubiesen\\r\\nobtenido ya un título profesional en alguna de las carreras de la Universidad\\r\\nMayor de San Simon o de cualquier otra del Sistema de la Universidad Boliviana\\r\\n(RCU No. 63/2018). Aún en caso de encontrarse cursando otra carrera con\\r\\nadmisión especial. (Certificación emitida por el Departamento de Registros e\\r\\nInscripciones).\\r\\nd) Haber Aprobado la totalidad de las materias del semestre a la materia a la que\\r\\nse postula.\\r\\ne) No tener deudas de libros en la biblioteca de la FCyT.\\r\\nf) Participar y aprobar el Concurso de Méritos y proceso de pruebas de selección y\\r\\nadmisión, conforme a convocatoria.',\n // //'pdf_file' => 'NULL',\n // 'tipo_convocatoria' => 'convocatoria de docencia', \n // 'publicado' => 'no', \n \n // ],\n // [\n // 'unit_id' => '3',\n // 'titulo_convocatoria' => 'Convocatoria Auxiliatura 2020 Docencia Electronica',\n // 'gestion' => '2020-07-12', \n // 'requisitos' => 'a) Ser estudiante regular y con rendimiento académico de las carreras de\\r\\nLicenciatura en Ingeniería Informática o Licenciatura en Ingeniería de Sistemas,\\r\\nque cursa regularmente en la Universidad. Para las materias de Introducción a la\\r\\nProgramación y Elementos de Programación y Estructura de Datos, podrán\\r\\npresentarse además estudiantes de Ing. Electrónica. Para la materia de\\r\\nComputación I podrán presentarse además estudiantes de Ing. Industrial, Ing.\\r\\nMecánica, Ing. Eléctrica, Ing. Electro-Mecánica e Ing. Matemática. Estudiante\\r\\nregular es aquel que está inscrito en la gestión académica vigente y cumple los\\r\\nrequisitos exigidos para seguir una carrera universitaria y el rendimiento\\r\\nacadémico, haber aprobado más de la mitad de las materias curriculares que\\r\\n\\r\\ncorresponde al semestre anterior, certificado por el departamento de Registros\\r\\ne Inscripciones.\\r\\nb) O haber concluido el pensum con la totalidad de materias, teniendo pendiente\\r\\ntan solo la aprobación de la Modalidad de Graduación, pudiendo postular a la\\r\\nAuxiliatura Universitaria dentro del siguiente periodo académico (dos años o\\r\\ncuatro semestres), a partir de la fecha de conclusión de pensum de materias.\\r\\nEste periodo de dos años adicionales a los que contempla la conclusión del\\r\\npensum de materias no podrá ampliarse bajo circunstancia alguna, aún en caso\\r\\nde encontrarse cursando otra carrera.\\r\\nc) Queda expresamente prohibido la participación de estudiantes que hubiesen\\r\\nobtenido ya un título profesional en alguna de las carreras de la Universidad\\r\\nMayor de San Simon o de cualquier otra del Sistema de la Universidad Boliviana\\r\\n(RCU No. 63/2018). Aún en caso de encontrarse cursando otra carrera con\\r\\nadmisión especial. (Certificación emitida por el Departamento de Registros e\\r\\nInscripciones).\\r\\nd) Haber Aprobado la totalidad de las materias del semestre a la materia a la que\\r\\nse postula.\\r\\ne) No tener deudas de libros en la biblioteca de la FCyT.\\r\\nf) Participar y aprobar el Concurso de Méritos y proceso de pruebas de selección y\\r\\nadmisión, conforme a convocatoria.',\n // //'pdf_file' => 'NULL',\n // 'tipo_convocatoria' => 'convocatoria de docencia', \n // 'publicado' => 'no', \n \n // ],\n ];\n // DB::table('convocatorias')->insert([\n // 'unit_id' => '1',\n // 'titulo_convocatoria' => 'Convocatoria Auxiliatura 2020 Laboratorios Sistemas',\n // 'gestion' => '2020-07-12', \n // 'requisitos' => 'a) Ser estudiante regular y con rendimiento académico de las carreras de\\r\\nLicenciatura en Ingeniería Informática o Licenciatura en Ingeniería de Sistemas,\\r\\nque cursa regularmente en la Universidad. Para las materias de Introducción a la\\r\\nProgramación y Elementos de Programación y Estructura de Datos, podrán\\r\\npresentarse además estudiantes de Ing. Electrónica. Para la materia de\\r\\nComputación I podrán presentarse además estudiantes de Ing. Industrial, Ing.\\r\\nMecánica, Ing. Eléctrica, Ing. Electro-Mecánica e Ing. Matemática. Estudiante\\r\\nregular es aquel que está inscrito en la gestión académica vigente y cumple los\\r\\nrequisitos exigidos para seguir una carrera universitaria y el rendimiento\\r\\nacadémico, haber aprobado más de la mitad de las materias curriculares que\\r\\n\\r\\ncorresponde al semestre anterior, certificado por el departamento de Registros\\r\\ne Inscripciones.\\r\\nb) O haber concluido el pensum con la totalidad de materias, teniendo pendiente\\r\\ntan solo la aprobación de la Modalidad de Graduación, pudiendo postular a la\\r\\nAuxiliatura Universitaria dentro del siguiente periodo académico (dos años o\\r\\ncuatro semestres), a partir de la fecha de conclusión de pensum de materias.\\r\\nEste periodo de dos años adicionales a los que contempla la conclusión del\\r\\npensum de materias no podrá ampliarse bajo circunstancia alguna, aún en caso\\r\\nde encontrarse cursando otra carrera.\\r\\nc) Queda expresamente prohibido la participación de estudiantes que hubiesen\\r\\nobtenido ya un título profesional en alguna de las carreras de la Universidad\\r\\nMayor de San Simon o de cualquier otra del Sistema de la Universidad Boliviana\\r\\n(RCU No. 63/2018). Aún en caso de encontrarse cursando otra carrera con\\r\\nadmisión especial. (Certificación emitida por el Departamento de Registros e\\r\\nInscripciones).\\r\\nd) Haber Aprobado la totalidad de las materias del semestre a la materia a la que\\r\\nse postula.\\r\\ne) No tener deudas de libros en la biblioteca de la FCyT.\\r\\nf) Participar y aprobar el Concurso de Méritos y proceso de pruebas de selección y\\r\\nadmisión, conforme a convocatoria.',\n // //'pdf_file' => 'NULL',\n // 'tipo_convocatoria' => 'convocatoria de laboratorios', \n // 'publicado' => 'si', \n // ]);\n\n foreach ($convocatorias as $convocatoria) {\n Convocatoria::create($convocatoria);\n }\n }", "title": "" }, { "docid": "4e3417a37e6106ca11054bada455abb5", "score": "0.52391297", "text": "public static function lucrosMensais()\n {\n $dados=[];\n $hoje=Carbon::now();\n $dateAtras= Carbon::now()->startOfMonth()->subMonth(5);\n $dataClone= clone $dateAtras;\n \n while( $dataClone->startOfMonth()->lte($hoje->startOfMonth()) ){\n $key=\"{$dataClone->month}.{$dataClone->year}\";\n $dados[$key]=0;\n $dataClone->addMonth();\n }\n\n \n $result= \\DB::table(function($query) use($dateAtras){\n $query->\n from('produto_venda as pv')\n ->join('vendas', 'pv.venda_id', '=', 'vendas.id')\n ->join('produtos as p','p.id','=','pv.produto_id')\n ->selectRaw('\n MONTH(vendas.data_venda) as mes, \n YEAR(vendas.data_venda) as ano,\n SUM(qtd*pv.valor_venda) as total_venda,\n SUM(IF(pv.granel=0,pv.custo_medio*qtd,(pv.custo_medio/p.valor_grandeza)*qtd)) as custo_total\n ')\n ->where('vendas.data_venda', '>=', $dateAtras->format('Y-m-d'))\n ->groupByRaw('MONTH(vendas.data_venda), YEAR(vendas.data_venda)')\n ->get();\n },'t1')->selectRaw('mes, ano, total_venda, \n custo_total,\n (total_venda - custo_total) as lucro\n ')->get();\n\n foreach($result as $res){\n $key=\"{$res->mes}.{$res->ano}\";\n if( isset( $dados[$key] ) ){\n $dados[$key]=(float) $res->lucro;\n }\n }\n\n return $dados;\n\n }", "title": "" }, { "docid": "1e8da68a5c6751dffc002a733694236b", "score": "0.5238239", "text": "public function traeDollar()\n {\n $datas_array = [];\n return $datas_array;//$datas_array['Dolares']['0']['Valor'];\n }", "title": "" }, { "docid": "aa040f15f9a7ec719bf6d15eca95576f", "score": "0.5235203", "text": "static public function ctrCrearRemito(){\n\n\t\t#tomo los productos\n\t\t$listaProductos = json_decode($_POST[\"listaProductos\"], true);\n\t\t#creo un array del afip\n\t\t$items=Array();\n\n\t\t#recorro $listaproductos para cargarlos en la tabla de comprobantes\n\t\tforeach ($listaProductos as $key => $value) {\n\n\t\t $tablaComprobantes = \"comprobantes\";\n\n\t\t $valor = $value[\"idnrocomprobante\"];\n\t\t $datos = $value[\"folio2\"];\n\n\t\t $actualizarComprobantes = ModeloComprobantes::mdlUpdateComprobante($tablaComprobantes, $valor,$datos);\n\t\t \n\n\t\t $miItem=$value[\"descripcion\"];\n\n\t\t\tif ($value['folio1']!=1){\n\n\t\t\t\t$miItem.=' del '.$value['folio1'].' al '.$value['folio2'];\n\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$items[$key]=array('codigo' => $value[\"id\"],'descripcion' => $miItem,'cantidad' => $value[\"cantidad\"],'codigoUnidadMedida'=>7,'precioUnitario'=>$value[\"precio\"],'importeItem'=>$value[\"total\"],'impBonif'=>0 );\n\t\t\t\n\t\t}\n\n\t\t$fecha = date(\"Y-m-d\");\n\t\t\t\t\n\t\tif ($_POST[\"listaMetodoPago\"]==\"CTA.CORRIENTE\"){\n\t\t\t\t\t\n\t\t\t$adeuda=$_POST[\"totalVenta\"];\n\n\t\t\t$fechapago=\"0000-00-00\";\n\t\t\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$adeuda=0;\n\n\t\t\t$fechapago = $fecha;\n\t\t}\n\t\t\n\t\t\n\t\t$ptoVenta=\"0004\";\n\t\t\n\n\t\t //ULTIMO NUMERO DE COMPROBANTE Y LO FORMATERO PARA LOGRAR EL CODIGO\n\t $item = \"nombre\";\n\t $valor = \"remitos\";\n\n\t $ultimoComprobante = ControladorVentas::ctrUltimoComprobante($item, $valor);\n\t $cantDigitosRemito = strlen($ultimoComprobante['numero']);\n\t // echo '<pre>'; print_r($ultimoComprobante); echo '</pre>';\n\t \n\t switch ($cantDigitosRemito) {\n\t \tcase 1:\n\t $ultimoComprobante=\"0000000\".$ultimoComprobante['numero'];\n\t break;\n\t \tcase 2:\n\t $ultimoComprobante=\"000000\".$ultimoComprobante['numero'];\n\t break;\n\t case 3:\n\t $ultimoComprobante=\"00000\".$ultimoComprobante['numero'];\n\t break;\n\t case 4:\n\t $ultimoComprobante=\"0000\".$ultimoComprobante['numero'];\n\t break;\n\t case 5:\n\t $ultimoComprobante=\"000\".$ultimoComprobante['numero'];\n\t break;\n\t case 6:\n\t $ultimoComprobante=\"00\".$ultimoComprobante['numero'];\n\t break;\n\t case 7:\n\t $ultimoComprobante=\"0\".$ultimoComprobante['numero'];\n\t break;\n\t case 8:\n\t $ultimoComprobante=$ultimoComprobante['numero'];\n\t break;\n\t }\n\t $codigoFactura = $ptoVenta .'-'. $ultimoComprobante;\n\t \n\n\t \n\t\t\t$datos = array(\n\t\t\t \"id_vendedor\"=>1,\n\t\t\t \"fecha\"=>date('Y-m-d'),\n\t\t\t \"codigo\"=>$codigoFactura,\n\t\t\t \"tipo\"=>'REM',\n\t\t\t \"id_cliente\"=>$_POST['seleccionarCliente'],\n\t\t\t \"nombre\"=>$_POST['nombreCliente'],\n\t\t\t \"documento\"=>$_POST['documentoCliente'],\n\t\t\t \"tabla\"=>$_POST['tipoCliente'],\n\t\t\t \"productos\"=>$_POST['listaProductos'],\n\t\t\t \"impuesto\"=>0,\n\t\t\t \"neto\"=>0,\n\t\t\t \"total\"=>$_POST[\"totalVenta\"],\n\t\t\t \"adeuda\"=>$adeuda,\n\t\t\t \"obs\"=>'',\n\t\t\t \"cae\"=>'0',\n\t\t\t \"fecha_cae\"=>date('Y-m-d'),\n\t\t\t \"fechapago\"=>$fechapago,\n\t\t\t \"metodo_pago\"=>$_POST['listaMetodoPago'],\n\t\t\t \"referenciapago\"=>$_POST['nuevaReferencia']\n\t\t\t);\n\t\t\n\t\t\t\t$tabla = \"remitos\";\n\n\t\t\t\t$respuesta = ModeloRemitos::mdlIngresarVentaRemito($tabla, $datos);\n\t\t\t \n\t\t\t\t$codigocomprobante = 3;\n\t\t\t\t$ultimoRemito =$ultimoComprobante+1;\n\t\t\t\tModeloComprobantes::mdlUpdateComprobante(\"comprobantes\",$codigocomprobante,$ultimoRemito);\n\n\t\t\t\tif ($_POST[\"listaMetodoPago\"]!='CTA.CORRIENTE'){\n\n\t\t\t\t \t //AGREGAR A LA CAJA\n\t\t\t\t\t $item = \"fecha\";\n\t\t\t $valor = date('Y-m-d');\n\n\t\t\t $caja = ControladorCaja::ctrMostrarCaja($item, $valor);\n\t\t\t \n\t\t\t \n\t\t\t $efectivo = $caja[0]['efectivo'];\n\t\t\t $tarjeta = $caja[0]['tarjeta'];\n\t\t\t $cheque = $caja[0]['cheque'];\n\t\t\t $transferencia = $caja[0]['transferencia'];\n\n\t\t\t switch ($_POST[\"listaMetodoPago\"]) {\n\n\t\t\t \tcase 'EFECTIVO':\n\t\t\t \t\t# code...\n\t\t\t \t\t$efectivo = $efectivo + $_POST[\"totalVenta\"];\n\t\t\t \t\tbreak;\n\t\t\t \tcase 'TARJETA':\n\t\t\t \t\t# code...\n\t\t\t \t\t$tarjeta = $tarjeta + $_POST[\"totalVenta\"];\n\t\t\t \t\tbreak;\n\t\t\t \tcase 'CHEQUE':\n\t\t\t \t\t# code...\n\t\t\t \t\t$cheque = $cheque + $_POST[\"totalVenta\"];\n\t\t\t \t\tbreak;\n\t\t\t \tcase 'TRANSFERENCIA':\n\t\t\t \t\t# code...\n\t\t\t \t\t$transferencia = $transferencia + $_POST[\"totalVenta\"];\n\t\t\t \t\tbreak;\n\t\t\t }\n\t\t\t \n\n\t\t\t $datos = array(\"fecha\"=>date('Y-m-d'),\n\t\t\t \n\t\t\t\t\t\t \"efectivo\"=>$efectivo,\n\t\t\t\t\t\t \"tarjeta\"=>$tarjeta,\n\t\t\t\t\t\t \"cheque\"=>$cheque,\n\t\t\t\t\t\t \"transferencia\"=>$transferencia);\n\t\t\t \n\t\t\t $caja = ControladorCaja::ctrEditarCaja($item, $datos);\n\t\t\t } \n\n\t \techo 'REM';\n\t\t\n\t}", "title": "" }, { "docid": "5724d284fe1fb9b746a8e1a75d68a904", "score": "0.52338314", "text": "public function getAllMatriksNormalisasi()\n {\n $bobot = array();\n $kriteria = array();\n foreach ($this->getAllMatriksAlternatif()->alternatif as $alternatif) {\n $bobot['c1'] = round($alternatif->c1\n / $this->getMaksMinKriteria()->c1, 5);\n $bobot['c2'] = round($alternatif->c2\n / $this->getMaksMinKriteria()->c2, 5);\n $bobot['c3'] = round($alternatif->c3\n / $this->getMaksMinKriteria()->c3, 5);\n $bobot['c4'] = round($alternatif->c4\n / $this->getMaksMinKriteria()->c4, 5);\n $bobot['c5'] = round($alternatif->c5\n / $this->getMaksMinKriteria()->c5, 5);\n $kriteria[$this->getKodeKunir($alternatif->id_kunir)] = $bobot;\n }\n\n return (object)$kriteria;\n }", "title": "" }, { "docid": "da1fb5561a279688787823612a7bc5fd", "score": "0.5230648", "text": "public function previsualizarVenta(){\n\n $venta = array('nombre_venta'=> $this->input->post('nombre_venta'),\n 'id_cliente' => $this->input->post('id_cliente'),\n 'nota' => nl2br($this->input->post('nota')),\n 'fecha_venta' => $this->input->post('fecha_venta_submit'));\n\n $articulos = $this->input->post('id_articulo');\n $almacenes = $this->input->post('id_almacen');\n $cantidades = $this->input->post('cantidad');\n $articulos_vendidos = array();\n\n for ($i=0; $i < count($articulos) ; $i++) {\n if (isset($almacenes[$i])){\n if (isset($articulos_vendidos[$articulos[$i].'-'.$almacenes[$i]])){\n $articulos_vendidos[$articulos[$i].'-'.$almacenes[$i]]['cantidad'] += $cantidades[$i];\n }else{\n $articulos_vendidos[$articulos[$i].'-'.$almacenes[$i]]['id_articulo'] = $articulos[$i];\n $articulos_vendidos[$articulos[$i].'-'.$almacenes[$i]]['id_almacen'] = $almacenes[$i] ;\n $articulos_vendidos[$articulos[$i].'-'.$almacenes[$i]]['cantidad'] = $cantidades[$i];\n }\n }\n }\n\n $venta_articulos = array();\n\n foreach ($articulos_vendidos as $articulo) {\n $show = $this->modeloctrl->existenciaStock($articulo['id_articulo'], $articulo['id_almacen']);\n $show['id_articulo'] = $articulo['id_articulo'];\n $show['id_almacen'] = $articulo['id_almacen'];\n ($articulo['cantidad'] > $show['cantidad'])? $show['venta'] = $show['cantidad'] : $show['venta'] = $articulo['cantidad'];\n $show['venta'] = $articulo['cantidad'];\n array_push($venta_articulos, $show);\n }\n\n $cliente = $this->modeloctrl->consultCliente($venta['id_cliente']);\n\n if ($cliente != null)\n $venta['nombre_cliente'] = $cliente[0]['nombre_cliente'] ;\n else\n $venta['nombre_cliente'] = '';\n\n $data['venta'] = $venta;\n $data['articulos'] = $venta_articulos;\n\n $this->load->view('encabezado');\n $this->load->view('Stock/visualizarVenta',$data);\n $this->load->view('pie');\n\n}", "title": "" }, { "docid": "7ee38573923534961918232b697d6627", "score": "0.52302253", "text": "public function CantidadProcedimiento() {\r\n $sql = \"SELECT count(*)as numero FROM PROCEDIMIENTO\";\r\n $cantidad = $this->db->query($sql);\r\n return $cantidad->result();\r\n }", "title": "" }, { "docid": "a58a2ca7279b4d01b243fac4515a8bb7", "score": "0.5225471", "text": "function get_grados_by_rbd_establecimiento_and_id_tipo_ensenanza(){\n $rbd_establecimiento = $_POST[\"rbd_establecimiento\"];\n $id_tipo_ensenanza = $_POST[\"id_tipo_ensenanza\"];\n\n $matriz_grado = new GradoMatriz();\n if($matriz_grado->db_get_grados_by_rbd_establecimiento_and_id_tipo_ensenanza($rbd_establecimiento, $id_tipo_ensenanza) == \"0\"){\n $result = array();\n\n print_r(json_encode($result, JSON_UNESCAPED_UNICODE));\n return null;\n }\n\n print_r($matriz_grado->to_json());\n}", "title": "" }, { "docid": "f572ce614cf08784eae1ddb52ba27989", "score": "0.52212924", "text": "function hitungVector($x, $W)\n {\n ini_set('memory_limit', '-1');\n ini_set('max_execution_time', 0);\n $T = $x[0];//kelas\n $D = 0;\n for ($i = 1; $i < count($x); $i++) { //mencari SUM selisih vector\n $Dtemp = pow(($x[$i] - $W[$i]), 2);\n $D = $Dtemp + $D;\n }\n $D = sqrt($D);\n return (self::decimal6($D));\n\n }", "title": "" }, { "docid": "a0481a8a7271f7f748e91704ff295511", "score": "0.52210975", "text": "public static function getSemanticMesure($w, $m_db) {\n\n $array_v_w = array_values($w); # change the value to an indexed array\n $array_v_db = array_values($m_db);\n $array_sim = 0;\n # define the max path \n $array_w_metadata = count($array_v_w) > count($array_v_db) ? count($array_v_w) : count($array_v_db);\n if (empty($array_v_db[0]) || empty($array_v_w[0])) {\n $array_sim = 0;\n } else {\n foreach ($array_v_db as $a) {# loop the element in the second array\n $array_index = array_search($a, $array_v_w); # get the index of the current element\n if (gettype($array_index) == \"integer\") { # here if no value return boolean if the key exist it return an integer value\n $index_a = array_search($a, $array_v_db); # get the index of the second array\n # semantic calculation based Leacock\n switch (Semantic_mesure) {\n case \"leacock\":\n $array_sim = -log((1 + $array_index + $index_a ) / ($array_w_metadata * 2));\n break;\n case \"path_based\":\n $array_sim = 1 / ($array_index + $index_a + 1 );\n break;\n case \"wu_palmer\":\n $index = count($array_v_w) > count($array_v_db) ? $array_index : $index_a;\n\n $array_sim = (2 * ($array_w_metadata - $index )) / (count($array_v_w) + count($array_v_db));\n break;\n case \"jiang\":\n // still working on\n break;\n }\n break;\n }\n }\n }\n return $array_sim;\n }", "title": "" } ]
602b4ceea42cb7a877955de3eaf20442
/ Test loading a single configuration file.
[ { "docid": "7d5e8eebbdeb00903b24f8fae660670a", "score": "0.743114", "text": "public function testSingleLoad()\n\t{\n\t\t$loader = LoadManager::getInstance();\n\n\t\t$config1 = tempnam(\"./\", \"config1\"); // creates a temporary file\n\t\t$config2 = tempnam(\"./\", \"config2\");\n\t\t$handle1 = fopen($config1, \"w\");\n\t\t$handle2 = fopen($config2, \"w\");\n\t\tfwrite($handle1, \"{\\\"load\\\":\\\"$config2\\\"}\");\n\t\tfwrite($handle2, \"{\n\t\t\t\t\t\t\t\\\"setting1\\\":\\\"success\\\",\n\t\t\t\t\t\t\t\\\"setting2\\\":{\n\t\t\t\t\t\t\t\t\t\\\"value\\\":\\\"success\\\",\n\t\t\t\t\t\t\t\t\t\\\"readonly\\\":false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\");\n\n\t\ttry {\n\t\t\tLoadManager::load($config1);\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail('Threw an exception while loading a single config file.');\n\t\t}\n\n\t\t$this->assertTrue(Registry::isKey('setting1'));\n\t\t$this->assertTrue(Registry::isReadOnly(\"setting1\"));\n\t\t$this->assertEqual(Registry::get(\"setting1\"), \"success\");\n\n\t\t// Check that the correct values of config2 are actually being put in Registry\n\t\t$this->assertTrue(Registry::isKey('setting2'));\n\t\t$this->assertFalse(Registry::isReadOnly(\"setting2\"));\n\t\t$value = Registry::get(\"setting2\");\n\t\t$this->assertEqual($value[0], \"success\");\n\n\t\tfclose($handle1);\n\t\tfclose($handle2);\n\t\tunlink($config1);\n\t\tunlink($config2);\n\t}", "title": "" } ]
[ { "docid": "e499d242c3e7151286e5010159ad5453", "score": "0.72194815", "text": "abstract public function loadConfig();", "title": "" }, { "docid": "d785b3f7b7ca5942252ea948f1148f57", "score": "0.71444404", "text": "public function testConfig() {\n\t\t$c = array();\n\t\t\n\t\t/* load our config, input & output settings (or mocks for testing) */\n\t\trequire FOLDER.'mocks/config.php';\n\t\t\n\t\t$this->assertEquals($c['config']['dispatcher']['run code'], 'mocker');\n }", "title": "" }, { "docid": "d0cac5572f4f9b77adf2e2c9cde365c8", "score": "0.7141011", "text": "function loadConfig($configFilePath)\n {\n\n }", "title": "" }, { "docid": "5025c68064e0df7ebeaf4028f4be5679", "score": "0.70993257", "text": "private static function load()\r\n\t{\r\n\t\t$file = self::configFile();\r\n\t\tif ( !file_exists($file) )\r\n\t\t{\r\n\t\t\t// This should probably be an error, no configuration means no database means no functional website.\r\n\t\t\t// On the other hand, the framework itself should run just fine without any data available.\r\n\t\t\tLog::fatal( \"configuration file not found: $file\" );\r\n\t\t\tLog::debug( \"configuration file not found: $file\" );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tinclude_once \"$file\";\r\n\t}", "title": "" }, { "docid": "dd608d44bcbe457edb3e95b387d84294", "score": "0.70115054", "text": "static private function loadConfiguration($filename) {\n return require $filename;\n }", "title": "" }, { "docid": "872f05ee268c66db655f76a917f4b731", "score": "0.6978999", "text": "public function testLoadYAMLConfigFile() {\n\t\t$var = CLI::loadConfig(NULL);\n\t\t$this->markTestIncomplete(\"Needs a test image to work with\");\n\t\t$this->assertInstanceOf(ConfigWrapper::class, $var, \"Expected an instance of ConfigWrapper\");\n\t\t$this->assertEquals(\"Evil_Wizard\", $var->get(\"yml.string\"), \"Command Line Interface string mismatch\");\n\t\t$this->assertCount(3, $var->get(\"yml.array\"), \"Command Line Interface Array length mismatch\");\n\t\tunset($var);\n\t}", "title": "" }, { "docid": "927fd2e321533c26c8c4ba036235ddc4", "score": "0.6976584", "text": "public function testConfig3() {\n $config = Repoman::load_config(dirname(__FILE__).'/pkg3/');\n }", "title": "" }, { "docid": "6943d57da4e6c1a1291eb8fd65d77cea", "score": "0.6908709", "text": "public function testFindConfigFile() {\n\t\t$cfg = new \\Scrivo\\Config();\n\t}", "title": "" }, { "docid": "ba9c629643e7659cd8d8d2d8792f2540", "score": "0.6869666", "text": "public static function load() {\n self::$config = parse_ini_file(dirname(__FILE__) . \"/../configuration.loli\", true);\n }", "title": "" }, { "docid": "11a211d45b7783168d547f987f8ff039", "score": "0.68627274", "text": "protected function loadConfiguration(): void\n {\n if (!$this->configuration) {\n $configurations = require __DIR__ . '/../../Fixtures/project/web/configuration.php';\n $this->configuration = $configurations[$this->getConfigurationName()];\n }\n }", "title": "" }, { "docid": "c45ee8b0d0d1e3d297a2beceba73e1f0", "score": "0.68270344", "text": "function LoadConfig() {\r\n\t\tif(file_exists(__DIR__ . '/resources/data/config.json')) {\r\n\t\t\t$cfgCont = file_get_contents(__DIR__ . '/resources/data/config.json');\r\n\r\n\t\t\t$cfgCont = json_decode($cfgCont, true);\r\n\r\n\t\t\treturn $cfgCont;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "036a14811c9435ae459e5627eeb41dbd", "score": "0.6818551", "text": "function testLoadingEvilPath() {\n\t\t$result = $this->ApiFile->loadFile($this->_path . '../../../config/database.php');\n\t\t$this->assertEqual($result, array('class' => array(), 'function' => array()));\n\t}", "title": "" }, { "docid": "2463643040bfde22cc793b27128c6810", "score": "0.6816536", "text": "public function testLoadConfiguration()\n\t{\n\t\t$this->assertSame(\n\t\t\t$this->class, $this->class->loadConfiguration(array('foo' => 'bar')));\n\n\t\t$this->assertEquals('bar', TestReflection::getValue($this->class, 'config')->get('foo'), 'Check the configuration array was loaded.');\n\n\t\t$this->class->loadConfiguration(\n\t\t\t(object) array(\n\t\t\t\t'goo' => 'car',\n\t\t\t)\n\t\t);\n\n\t\t$this->assertEquals('car', TestReflection::getValue($this->class, 'config')->get('goo'), 'Check the configuration object was loaded.');\n\t}", "title": "" }, { "docid": "5762bec3b4e72e2be0894ac48c09c216", "score": "0.6756846", "text": "public function testBase()\n {\n $folder = __DIR__ . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR;\n $file = 'base';\n\n $config = $this->loadConfig($folder, $file);\n\n $this->assertTrue(isset($config->foo1), \"expected foo1 attribute not found\");\n $this->assertFalse(isset($config->foo2), \"unexpected foo2 attribute found\");\n $this->assertEquals('hello world', $config->foo1);\n }", "title": "" }, { "docid": "dae2fd78f4ac316765f84569528578c2", "score": "0.675594", "text": "public function testConfig2() {\n $config = Repoman::load_config(dirname(__FILE__).'/pkg2/');\n }", "title": "" }, { "docid": "90b01824a2840eefb7fc31eab113c37e", "score": "0.6751819", "text": "function loadConfig($file){\r\n\t$path = configPath().$file;\r\n\r\n\t// Si le fichier de config a été trouvé, on décode le json et on le retourne sous forme d'objet\r\n\tif(file_exists($path)){\r\n\r\n\t\t$json_str = file_get_contents($path);\r\n\r\n\t\t// Si un problèmes survient lors du décodage du fichier json\r\n\t\tif(!$json_str){\r\n\t\t\tthrow new Exception(\"Le fichier n'a pu êtres décodé\");\r\n\t\t\tdie();\r\n\t\t}\r\n\r\n\t\treturn json_decode($json_str);\r\n\r\n\t}\r\n\telse // Sinon \r\n\t{\r\n\t\tthrow new Exception(\"Le fichier de configuration n'a pu êtres trouvé !\");\r\n\t\tdie();\r\n\t}\r\n}", "title": "" }, { "docid": "edc21abd08c6f727761e9befe5b1dba5", "score": "0.6733823", "text": "function config_load() {\n $config_file = approot(true).\"config/main.yml\"; \n if(!is_file($config_file)) die(\"Did not find config file {$config_file} app:{$approot}\");\n \n return yaml_parse_file($config_file);\n}", "title": "" }, { "docid": "e51bf173a0652e8a1dd2780fa899df6e", "score": "0.6722299", "text": "public function testFindConfigFile2() {\n\t\tself::$defaultCfgFile =\n\t\t\tsys_get_temp_dir() . DIRECTORY_SEPARATOR . \".htscrivo\";\n\t\t// It's an hack, but then again this global was assigned the value of\n\t\t// the phpunit PHP script anyway.\n\t\t$_SERVER[\"SCRIPT_FILENAME\"] = self::$defaultCfgFile;\n\t\tcopy(\"test_config\", self::$defaultCfgFile);\n\t\t// This uses $_SERVER[\"SCRIPT_FILENAME\"]\n\t\t$cfg = new \\Scrivo\\Config();\n\t\t$this->assertNotNull($cfg);\n\t}", "title": "" }, { "docid": "1e604c2b662aa81ec35c3f4074d2bd3f", "score": "0.6691614", "text": "function load_config( $configfile )\n{\n\trequire_once _CONFIG_PATH_.'/'.$configfile.'.php';\n}", "title": "" }, { "docid": "af383846345096b90b1f36af1102fa18", "score": "0.6665994", "text": "public function testBasicConfigFile() {\n\t\t$config = array();\n\t\t$config['display_error_details'] = true;\n\t\t$config['cors_origins'] = array('testurl.com');\n\t\t$config['mysql'] = array();\n\t\t$config['logging'] = array('level' => 'debug', 'maxFiles' => 12);\n\t\t$config['aws'] = array('region' => 'test-region');\n\t\t$config['jwt'] = array('secret' => 'test', 'contractorExp' => 42);\n\t\t$config['baseUrl'] = 'test.com';\n\t\t$config['mail'] = array();\n\n\t\t$file = fopen(self::$filePath, 'w');\n\t\tfwrite($file, json_encode($config));\n\t\tfclose($file);\n\t\t$this->assertEquals(true, ConfigReader::getDisplayErrorDetails());\n\t\t$corsOrigins = ConfigReader::getCorsOrigins();\n\t\t$this->assertEquals(1, count($corsOrigins));\n\t\t$this->assertEquals('testurl.com', $corsOrigins[0]);\n\t\t$this->assertEquals(12, ConfigReader::getMaxLogFiles(), \"Expected Max Log Files\");\n\t\t$this->assertEquals(\\Monolog\\Logger::DEBUG, ConfigReader::getLogLevel(), \"Expected Log Level\");\n\t\t$jwtInfo = ConfigReader::getJwtInfo();\n\t\t$this->assertEquals('test', $jwtInfo['secret'], \"Expected jwt secret\");\n\t\t$this->assertEquals(42, $jwtInfo['contractorExp'], \"Expected jwt contractor expiration\");\n\t}", "title": "" }, { "docid": "bc9e7fc57cf79d491cc0d49d5d19bb74", "score": "0.66213906", "text": "public function testLoad(): void\n {\n $root = vfsStream::setup('root', null, [\n 'config' => [\n 'global.php' => \"<?php return ['global' => ['baz' => 'baz']];\",\n 'local.dist.php' => \"<?php return ['quux' => 'quux'];\",\n 'local.php' => \"<?php return ['local' => ['qux' => 'qux'], 'global' => ['foo' => 'bar']];\",\n ],\n ]);\n\n $loader = new FileLoader();\n $loader->addPath($root->url() . '/config/', '/(.*)?(local|global)\\.php/i');\n $loaded = $loader->load();\n\n $this->assertSame([\n [\n 'global' => [\n 'baz' => 'baz',\n ],\n ],\n [\n 'local' => [\n 'qux' => 'qux',\n ],\n 'global' => [\n 'foo' => 'bar',\n ],\n ],\n ], $loaded);\n }", "title": "" }, { "docid": "0c8669b822b3309f17acc185e7f1a6b0", "score": "0.66104305", "text": "private function loadConfig()\n {\n $this->config = parse_ini_file('config.ini', true);\n }", "title": "" }, { "docid": "765d374dd4fda07bbf33c8703c392908", "score": "0.65913194", "text": "function read_config($file, $fail_gracefully=TRUE) \n{\n\t$file = ($file == '') ? 'config' : str_replace(EXT, '', $file);\n\t\n\tif ( ! file_exists(APPPATH.'config/'.$file.EXT))\n\t{\n\t\tif ($fail_gracefully === TRUE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\tshow_error('The configuration file '.$file.EXT.' does not exist.');\n\t}\n\t\n\tinclude(APPPATH.'config/'.$file.EXT);\n\n\tif ( ! isset($config) OR ! is_array($config))\n\t{\n\t\tif ($fail_gracefully === TRUE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\tshow_error('Your '.$file.EXT.' file does not appear to contain a valid configuration array.');\n\t}\n\t\n\treturn $config;\n}", "title": "" }, { "docid": "cbd2ca87c63f9dd6338e52e1073c08e1", "score": "0.65860635", "text": "public function testLoadCliConfig()\r\n {\r\n $this->assertTrue($this->wei->getConfig('cli'));\r\n }", "title": "" }, { "docid": "9cf058b591511887bd177c272cea1c06", "score": "0.65840185", "text": "public function getConfigFromFile()\n {\n $configFile = __DIR__ . '/../../config/config.php';\n require $configFile;\n return $config;\n }", "title": "" }, { "docid": "c2f970fed00cee0cc224521730a41761", "score": "0.6567956", "text": "public function loadConfig()\n {\n // load the required file\n require_once \"Settings/config.php\";\n }", "title": "" }, { "docid": "bddcf6f22f4d7d9d2a6958457c09689b", "score": "0.65198475", "text": "private function LoadFile(){\n\t\tif(!file_exists($this->path.\"/\".$this->configFileName)){\n\t\t\tthrow new MagratheaConfigException(\"Config file could not be found - \".$this->path.\"/\".$this->configFileName);\n\t\t}\n\t}", "title": "" }, { "docid": "6ec569333dee0ac430a79ed5e9682971", "score": "0.6515101", "text": "public function testExampleConfig(){\n\t}", "title": "" }, { "docid": "51db0b67fb219f6ca08d8c7eea8e0041", "score": "0.6509655", "text": "public function loadConfiguration(): void\n {\n }", "title": "" }, { "docid": "51db0b67fb219f6ca08d8c7eea8e0041", "score": "0.6509655", "text": "public function loadConfiguration(): void\n {\n }", "title": "" }, { "docid": "599f38d46a05882f61d0f5654a93f34d", "score": "0.6479742", "text": "function loadConfig() {\n\n // Check that environment config file exists\n if (!file_exists (environment.php)) {\n return false;\n }\n include('./environment.php');\n\n return true;\n}", "title": "" }, { "docid": "e1d28e14d3fa044c6d0e2f19e9d4f2b4", "score": "0.64270836", "text": "protected function loadConfig()\n {\n if (is_file($this->configFilename)) {\n echo 'comminist.config.json found, executing...' . PHP_EOL . PHP_EOL;\n $this->config = json_decode(file_get_contents('./' . $this->configFilename));\n if ($this->config !== null) {\n $this->execute();\n } else {\n die('ERROR: comminist.config.json invalid, check the configuration markup.' . PHP_EOL);\n }\n } else {\n die('ERROR: no comminist.config.json file found, run \\'comminist init\\' to generate a blank one.' . PHP_EOL);\n }\n }", "title": "" }, { "docid": "50b030c32a5681bdd31d74193a5a8897", "score": "0.640667", "text": "public function testConstruct() {\n\n\t\t// Create a config object based upon the local config file\n\t\t$this->assertNotNull(\n\t\t\tnew \\Scrivo\\Config(new \\Scrivo\\Str(\"test_config\")));\n\n\t\t// Create a config object using this tests config data\n\t\t$this->assertNotNull(new \\Scrivo\\Config(self::$emptyCfgFile));\n\n\t\t// Force an exception for an invalid config file\n\t\t$this->setExpectedException(\n\t\t\t\"\\Scrivo\\SystemException\", \"Invalid config file\");\n\t\t$cfg = new \\Scrivo\\Config(new \\Scrivo\\Str(\"ConfigTest.php\"));\n\n\t\t// Force an exception for a nonexistent config file\n\t\t$this->setExpectedException(\n\t\t\t\"\\Scrivo\\SystemException\", \"Could not locate config file\");\n\t\t$cfg = new \\Scrivo\\Config(\"blah\");\n\t}", "title": "" }, { "docid": "daa1a99904b18d0ee7d6a41a7a85278e", "score": "0.6404932", "text": "static public function load($filename) {\n\t\t$filename .= '.php';\n\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new \\Exception('Configuration file not found: ' . $filename);\n\t\t}\n\n\t\tinclude $filename;\n\n\t\tif (!isset($config)) {\n\t\t\tthrow new \\Exception('No variable $config found in ' . $filename);\n\t\t}\n\n\t\tself::$values = $config;\n\t}", "title": "" }, { "docid": "3345e8aff80ae83230a706818c69fa03", "score": "0.6403933", "text": "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $configfile = new Configuration_File(self::FILE_CONFIG);\n \n $this->config = $configfile->load();\n\n $this->is_loaded = TRUE;\n }", "title": "" }, { "docid": "69db14b139665dbffdd3d9482e66e1f9", "score": "0.6401279", "text": "function load_config(){\n\t\tif(!$this->exist($this->file_name)){\n\t\t\t$converted=file_get_contents($this->file_path);\n\t\t\t$func=$this->demons[$this->format][\"decode\"];\n\t\t\t$this->data[$this->file_name]= $func($converted);\n\t\t}\n\t\treturn $this->data[$this->file_name];\n\t}", "title": "" }, { "docid": "612edbed3ece9b11ed5f4dd91e46c346", "score": "0.63878936", "text": "public function configuration(string $file, string $filename): bool;", "title": "" }, { "docid": "6410c79350c4efefbf7c02679a2d7876", "score": "0.63746613", "text": "public function testDirectoryLoad()\n {\n $configDir = __DIR__ . '/docs';\n $loader = new DirectoryLoader();\n\n try {\n $config = new Config(\n $loader->load($configDir)\n );\n } catch (InvalidFileException $e) {\n $this->fail($e->getMessage());\n }\n\n foreach (array('ini','json','php','xml','yaml') as $key) {\n $key = sprintf('%s_test', $key);\n\n $this->assertTrue(isset($config->$key));\n $this->assertInstanceOf(Config::class, $config->$key);\n $this->assertGreaterThan(1, $config->$key->count());\n }\n }", "title": "" }, { "docid": "1afa36eec68a475efd0c310285002ab5", "score": "0.63682204", "text": "public static function load () {\n\t\tif ( empty( static::$_config ) ) {\n\n\t\t\t$config = array();\n\n\t\t\tif ( is_file( __DIR__ . DIRECTORY_SEPARATOR . 'files/file.php' ) ) {\n\t\t\t\t$config = include __DIR__ . DIRECTORY_SEPARATOR . 'files/file.php'; // dont forget to set permissions to 0400\n\t\t\t} else {\n\t\t\t\tErrors::log('config', 'Your config file is missing!');\n\t\t\t\tErrors::set('system', 'Something went wrong. <br /> Please refresh the page and if the issue continues, find a better website to waste your time :)');\n\t\t\t}\n\n\t\t\treturn static::parse( $config );\n\t\t}\n\n\t\treturn static::$_config;\n\t}", "title": "" }, { "docid": "3c68b7da1eab13787bd1bd32e587b961", "score": "0.6364048", "text": "public function testLoadConfigOnInit()\n\t{\n\t\t$config = $this->enforcer->getConfig();\n\n\t\t$this->assertTrue(is_array($config));\n\t\t$this->assertTrue(isset($config['event/add']));\n\t}", "title": "" }, { "docid": "fd1b97c733a0619b85996563e5f271b7", "score": "0.63580936", "text": "public function testConfigFileNotFound()\n {\n try {\n $folder = __DIR__ . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR;\n $configReader = new Config($folder);\n\n $file = 'not-found';\n $config = $configReader->getConfig($file);\n $this->assertTrue(empty($config), \"unexpected config file '$file' found\");\n\n } catch (TBPException $e) {\n $this->fail(\"expected config folder '$folder' does not exist\");\n }\n }", "title": "" }, { "docid": "345d815c27bf37593dba1e6a17e6afc9", "score": "0.6351281", "text": "static function loadConfiguration($where_is_it, $environment) {\n $configuration_file = with_slash($where_is_it) . $environment . '.php';\n if(!is_file($configuration_file)) {\n throw new Angie_FileSystem_Error_FileDnx($configuration_file);\n } // if\n require $configuration_file;\n }", "title": "" }, { "docid": "5507f19bd90dfb69eb0a46276914f367", "score": "0.6338979", "text": "function readConfig($filename)\n{\n\t$config_yaml = Spyc::YAMLLoad($filename);\n\treturn ($config_yaml);\n}", "title": "" }, { "docid": "9d00f0dcf9f2158e11dc02a625ca482c", "score": "0.6331106", "text": "public function testRead()\n {\n // Test bad lookup.\n $this->assertFalse(\n $this->configurer->read('non-existant'),\n 'Requesting a non-existant key should return false.'\n );\n\n $data = [\n 'str' => 'value1',\n 'pi' => 3.1415,\n 'stdClass' => new \\StdClass(),\n 'ary' => [ 'one' => 1, 'two' => 2, 'three' => 3 ],\n ];\n $this->configurer->config = $data;\n\n // Test individual lookup.\n foreach ($data as $key => $expected) {\n $this->assertEquals(\n $expected,\n $this->configurer->read($key),\n 'Requesting a single valid key should return the expected value.'\n );\n }\n\n // Test group lookup.\n $this->assertEquals(\n $data,\n $this->configurer->read(),\n 'Requesting the entire config set should return the expected array.'\n );\n }", "title": "" }, { "docid": "e5649dac95195eb36cccd1404ed16bbd", "score": "0.63302237", "text": "public function loadConfig($file)\n {\n if ($data = @parse_ini_file($file)) {\n return $data;\n }\n\n echo 'Not a config file ' . $file;\n echo '<br><a href=\"index.php\">Back</a>';\n exit;\n }", "title": "" }, { "docid": "d64dd1209ade53feca16cd7b11d06fd2", "score": "0.6317926", "text": "public function testLoadServicesFromFile()\n {\n $di = new DIFactoryConfig();\n $self = $di->loadServices(ANAX_INSTALL_PATH . \"/test/config/di.php\");\n\n $this->assertInstanceOf(DiFactoryConfig::class, $self);\n\n $services = $di->getServices();\n $defaultServices = [\n \"request\",\n \"response\",\n ];\n\n foreach ($defaultServices as $service) {\n $this->assertContains($service, $services);\n }\n }", "title": "" }, { "docid": "a16caacbc1ffd30b21f13afe7b4a4b2b", "score": "0.6313451", "text": "public static function loadConfigFile()\n {\n if (null !== self::$config) {\n return;\n }\n $config_file = DOCUMENT_ROOT . '/config.ini';\n if (! is_readable($config_file)) {\n throw new \\ProgrammerException(\n \"Can't read $config_file or it does not exist\"\n );\n }\n self::$config = parse_ini_file($config_file);\n }", "title": "" }, { "docid": "3f9d7f553d738c71f4c70998add9aeed", "score": "0.630878", "text": "private function _load_conf() {\n $conf_content = file_get_contents($this->conf);\n if (strlen($conf_content) < 15 || substr($conf_content, 0, 15) != 'upage_conf_file')\n echo \"Config file in incorrect format: \" . $conf_content;\n $args = explode(\"\\n\", $conf_content);\n\n $this->disallowed_words = explode(\";\", $args[1]);\n $this->is_debug = $args[2] == \"true\";\n }", "title": "" }, { "docid": "c38256ca6bbf38c856391bf6e9c1fd94", "score": "0.6304511", "text": "public function testNonexistingConfigurationFile()\n {\n $configuration = new PageConfiguration('/not/existing');\n // Nothing should blow up...\n // Now check if the default options are accessible...\n $this->assertEquals('css', $configuration->stylesheet_direcotry);\n }", "title": "" }, { "docid": "d8d1fdd2dd3a6c250e14deea7d34d299", "score": "0.6284653", "text": "public function testCanParseConfigurationFiles()\n {\n /** We'll need an environment key and possible environments **/\n /** As these persist in the YAML until the teardown, we only need to do this once **/\n $envs = [\n \"environment\" => \"dev\",\n \"possible\" => [\n \"dev\",\n \"sandbox\",\n \"staging\",\n \"live\"\n ]\n ];\n \n file_put_contents(self::$testCreateDir . \"/global.yml\", $this->dumper->dump($envs));\n \n $arrayToSave = [];\n $configRead = [];\n \n foreach ($this->testFiles as $file)\n {\n $file = sprintf(\"%s/%s\", self::$testCreateDir, $file);\n \n $arrayToSave[$file] = \"someValue\";\n $array = [$file => \"someValue\"];\n\n /** No need for touch() as this creates the file anyway **/\n file_put_contents($file, $this->dumper->dump($array));\n \n /** Now read back into config array via parser in same foreach() **/\n $configRead += $this->parser->parse($file);\n }\n \n /** Does the original added array match the array we just parsed? **/\n $this->assertTrue($arrayToSave === $configRead);\n }", "title": "" }, { "docid": "68cf73328f8c73ef5b9b641133ca952d", "score": "0.6282765", "text": "public function testRegisterLoader()\n {\n $exception = null;\n $configDir = __DIR__ . '/docs';\n $loader = new DirectoryLoader();\n $loader->registerLoader(\n new IniFileLoader(),\n 'invalid'\n );\n\n file_put_contents(\n $configDir . '/foo_test_file.invalid',\n sprintf(\n \"%s = %d\\n\",\n 'bar',\n 15\n )\n );\n\n try {\n $config = new Config(\n $loader->load($configDir)\n );\n\n $this->assertTrue(isset($config->{'foo_test_file'}));\n $this->assertInstanceOf(\n Config::class,\n $config->{'foo_test_file'}\n );\n $this->assertEquals(\n 15,\n $config->get('foo_test_file.bar')\n );\n } catch (InvalidFileException $e) {\n $exception = $e;\n }\n\n @unlink($configDir . '/foo_test_file.invalid');\n\n if ( ! is_null($exception)) {\n $this->fail($exception->getMessage());\n }\n }", "title": "" }, { "docid": "210297455b43e807d60842f2b4b81e8a", "score": "0.6278892", "text": "public function testConfigAccess()\n\t{\n\t\tforeach ($this->config as $key => $config)\n\t\t{\n\t\t\t$this->assertSame( $config, $this->definition->config( $key ) );\n\t\t}\n\t}", "title": "" }, { "docid": "04921cb575c16c81d43e3ca952b8f85a", "score": "0.62618816", "text": "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $configfile = new Configuration_File(self::FILE_CONFIG);\n\n try {\n $this->config = $configfile->load();\n } catch (Exception $e) {\n throw new Engine_Exception(clearos_exception_message($e), CLEAROS_ERROR);\n }\n\n $this->is_loaded = TRUE;\n }", "title": "" }, { "docid": "a770e55f041eb278f15165b59c86c685", "score": "0.6246574", "text": "public function testGetConfigFromFileWithMissingFile()\n {\n $this->expectException(\\Exception::class);\n\n $table = $this->getConcreteTableBuilder();\n\n $table->getConfigFromFile('DoesntExist');\n }", "title": "" }, { "docid": "c66960e1b65606cd8434015b1d0646ee", "score": "0.6222955", "text": "public function loadConfiguration() {\r\n\t\trequire_once 'config.inc.php';\r\n\t\t$this->config = ( object ) $config;\r\n\t}", "title": "" }, { "docid": "2bd4b4359b0c09e6f0075656614a131b", "score": "0.62120026", "text": "public function testMigrationConfigurationReturnsConfigurationFileOption() : void\n {\n $input = $this->getMockBuilder(ArrayInput::class)\n ->setConstructorArgs([[]])\n ->setMethods(['getOption'])\n ->getMock();\n\n $input->method('getOption')\n ->will($this->returnValueMap([\n ['configuration', __DIR__ . '/_files/config.yml'],\n ]));\n\n $actualConfiguration = $this->invokeMigrationConfigurationGetter($input);\n\n self::assertInstanceOf(YamlConfiguration::class, $actualConfiguration);\n self::assertSame('name', $actualConfiguration->getName());\n self::assertSame('migrations_table_name', $actualConfiguration->getMigrationsTableName());\n self::assertSame('migrations_namespace', $actualConfiguration->getMigrationsNamespace());\n }", "title": "" }, { "docid": "463edac8bd94b003ddae3d0e6dfa7e91", "score": "0.6208605", "text": "public function testConstructWithBadConfigFile(): void\n {\n $this->expectException(\\Zephir\\Exception::class);\n $this->expectExceptionMessage('The config.json file is invalid: Syntax error, malformed JSON');\n\n chdir(\\constant('ZEPHIRPATH').'/tests/fixtures/badconfig');\n new Config();\n }", "title": "" }, { "docid": "92d4ba772c54f2ae196b0693025636c9", "score": "0.620577", "text": "public function testLoadFromFile()\n {\n $filePath = __DIR__ . '/test-file.txt';\n $expectedResult = 'test' . PHP_EOL;\n\n $textLoader = new TextLoader();\n\n Assert::assertSame($expectedResult, $textLoader->load($filePath));\n }", "title": "" }, { "docid": "73dfede8535408e3ca588a5509e29bf8", "score": "0.61895645", "text": "public function readConfig()\n {\n // by default, read local file: projectBase/config.php\n // in which only an array $config defined\n $config=[];\n if (file_exists($this->projectBase.'/config.php')) {\n require($this->projectBase . '/config.php');\n }\n $this->config=$config;\n }", "title": "" }, { "docid": "6ca228bf912d2b5cb2086339cd5aa7a4", "score": "0.61861944", "text": "function checkAndLoadConfiguration($conf_to_check, $confFileName, $appsName = '') {\n\tif(!getConf($conf_to_check)) {\n\t\t$confFile = getConfFile($conf_to_check, $confFileName, $appsName);\n\t\t\n\t\trequire_once $confFile;\n \n\t\tsetConf(null, $config);\n\t\t\n\t\treturn true;\n\t}\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "fadeae273be436783394669a4b009ef6", "score": "0.6182331", "text": "public function loadConfig($fileName, $type = 'app') {\n\t\t$found = false;\n\t\tif ($type == 'app') {\n\t\t\t$folder = APP . 'Test' . DS . 'Config' . DS;\n\t\t} else {\n\t\t\t$folder = App::pluginPath($type);\n\t\t\t\tif (!empty($folder)) {\n\t\t\t\t$folder .= 'Test' . DS . 'Config' . DS;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (file_exists($folder . $fileName . '.php')) {\n\t\t\tinclude($folder . $fileName . '.php');\n\t\t\t$found = true;\n\t\t}\n\n\t\tif (!$found) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isset($config)) {\n\t\t\t$error = __(\"CommonTestCase::loadConfig() - no variable \\$config found in %s.php\", true);\n\t\t\ttrigger_error(sprintf($error, $fileName), E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "58b67cc24c8d95512580a20bfcb58cee", "score": "0.61797416", "text": "function load_config($config_path, $params = '') {\n $c = ConfigManager::get_instance();\n return $c->load_config($config_path, $params);\n}", "title": "" }, { "docid": "de72042dfb71d3f73734cd01413ab824", "score": "0.6173607", "text": "public function testBadFilePath()\n\t{\n\t\t$loader = LoadManager::getInstance();\n\n\t\t$config1 = tempnam(\"./\", \"config1\");\n\t\t$handle1 = fopen($config1, \"w\");\n\t\tfwrite($handle1, '{\"load\":'.'\"'.$config1.'nonexisting\"}'); // non existing filepath\n\n\t\ttry{\n\t\t\tLoadManager::load($config1);\n\t\t\t$this->fail('Did not throw an exception with a configuration path.');\n\t\t} catch(\\Vcms\\Exception\\NotFound $e) {}\n\n\t\tfclose($handle1);\n\t\tunlink($config1);\n\t}", "title": "" }, { "docid": "909cc6374cd6175023975f7d8e4e04bb", "score": "0.6172537", "text": "private function init_load_config(){\n $file = 'ginger_config.php';\n \n if(!is_file('app/config/'.$file)){\n die(sprintf('🙀 No se encontro el archivo %s el cual es necesario para que %s funcione 😿',$file,$this->framework) );\n }\n //Carga del archivo de configuracion \n require_once 'app/config/'.$file;\n return; \n }", "title": "" }, { "docid": "c4a3953df32b2251d0e03830c65a8475", "score": "0.61562854", "text": "function load_conf()\n{\n\t$conf = array();\n\n\t$GLOBALS['conf'] =& $conf;\n\n\t// Load default configuration\n\trequire_once(APP_ROOT . \"config_default.php\");\n\n\tif ((include_once APP_ROOT . \"config.php\") !== 1)\n\t{\n\t\tfatal(APP_ROOT. \"config.php is missing!<br>\n\tUnfortunately, Munkireport does not work without it</p>\");\n\t}\n\n\t// Convert auth_config to config item\n\tif(isset($auth_config))\n\t{\n\t\t$conf['auth']['auth_config'] = $auth_config;\n\t}\n\n}", "title": "" }, { "docid": "4e69dd6f1988298706dfb747edfa050b", "score": "0.613654", "text": "private function configuration() {\n\n $f = \"includes/expr.ini\";\n\n return parse_ini_file($f);\n\n }", "title": "" }, { "docid": "1433342b74133e7cacbbd447ddff8fbf", "score": "0.61088514", "text": "public function testConfigFileCreation()\n {\n $config = new Config(ConfigTest::$test_array);\n\n $this->assertInstanceOf('\\BrightNucleus\\Config\\ConfigInterface', $config);\n $this->assertInstanceOf('\\BrightNucleus\\Config\\AbstractConfig', $config);\n $this->assertInstanceOf('\\BrightNucleus\\Config\\Config', $config);\n }", "title": "" }, { "docid": "bbf0629a37803bc386e2b02a61fd77e0", "score": "0.6065089", "text": "public function testProcessFromPath()\n {\n $config = $this->provider->processFromPath(__DIR__.'/../fixtures/fake-module/config/', 'config.yml');\n $this->assertInternalType('array', $config, self::NOTICE.' ConfigProvider::processFrom Path MUST return an array');\n\n $expectedSections = ['products', 'users', 'foo'];\n foreach ($expectedSections as $section) {\n $this->assertArrayHasKey($section, $config, sprintf(self::NOTICE.' The expected key %s is missing from the parsed configuration', $section));\n }\n\n $products = $config['products'];\n $this->assertTrue(count($products) == 7, sprintf(self::NOTICE.' The number of expected products is wrong: 7 expected, got %s.', count($products)));\n\n $users = $config['users'];\n $this->assertTrue(count($users) == 4, sprintf(self::NOTICE.' The number of expected products is wrong: 4 expected, got %s.', count($users)));\n\n $foo = $config['foo'];\n $this->assertTrue(count($foo) == 1, sprintf(self::NOTICE.' The number of expected products is wrong: 1 expected, got %s.', count($foo)));\n }", "title": "" }, { "docid": "1ec6aa77e421fbd0566670214400a35f", "score": "0.6042267", "text": "protected function load($filename) {\r\n $ext = substr(strrchr($filename, '.'), 1);\r\n switch ($ext) {\r\n case 'properties':\r\n case 'ini':\r\n $configMain = parse_ini_file($filename, true);\r\n \r\n //merge custom lang file and main file if needed\r\n if($this->customAppliedLang){\r\n $configCustom = parse_ini_file($this->customAppliedLang, true);\r\n $config = $this->mergeConfigs($configMain, $configCustom);\r\n }else{\r\n $config = $configMain;\r\n }\r\n \r\n \r\n break;\r\n case 'yml':\r\n case 'yaml':\r\n $config = spyc_load_file($filename);\r\n break;\r\n case 'json':\r\n $config = json_decode(file_get_contents($filename), true);\r\n break;\r\n default:\r\n throw new InvalidArgumentException($ext . \" is not a valid extension!\");\r\n }\r\n return $config;\r\n }", "title": "" }, { "docid": "f66de01c1a4cc2137dbfcd38a9513f45", "score": "0.60421747", "text": "public static final function load($file) {\n if (file_exists($file) && is_readable($file)) {\n return new Configuration(file_get_contents($file));\n }\n return null;\n }", "title": "" }, { "docid": "91d93a5ff3b60a42f79dbf54ee7acc6d", "score": "0.6032938", "text": "function ReadConfig($config_file) {\n global $config;\n $lines = file($config_file);\n foreach ($lines as $line_num => $line) {\n $line = rtrim(preg_replace(\"/#.*/\",\"\",$line));\n if(preg_match(\"/\\[.*\\]/\", $line, $parts)) {\n $section = $parts[0];\n $section = preg_replace(\"/[\\[\\]]/\",\"\",$section);\n } elseif (preg_match(\"/=/\",$line)) {\n list($var,$value) = split('=',$line);\n $var = preg_replace('/ $/','',$var);\n $value = preg_replace('/^ +/','',$value);\n \t\t$config->{$section}->{$var} = $value;\t\t\n }\n }\n}", "title": "" }, { "docid": "e515e65346410cd33673fb241f41b66c", "score": "0.60267335", "text": "public function testPluginConf(): void\n {\n $conf_file = __DIR__ . '/../conf/default.php';\n $meta_file = __DIR__ . '/../conf/metadata.php';\n\n if (!file_exists($conf_file) && !file_exists($meta_file)) {\n self::markTestSkipped('No config files exist -> skipping test');\n }\n\n if (file_exists($conf_file)) {\n include($conf_file);\n }\n if (file_exists($meta_file)) {\n include($meta_file);\n }\n\n self::assertEquals(\n gettype($conf),\n gettype($meta),\n 'Both ' . DOKU_PLUGIN . 'yearbox/conf/default.php and ' . DOKU_PLUGIN . 'yearbox/conf/metadata.php have to exist and contain the same keys.'\n );\n\n if ($conf !== null && $meta !== null) {\n foreach ($conf as $key => $value) {\n self::assertArrayHasKey(\n $key,\n $meta,\n 'Key $meta[\\'' . $key . '\\'] missing in ' . DOKU_PLUGIN . 'yearbox/conf/metadata.php'\n );\n }\n\n foreach ($meta as $key => $value) {\n self::assertArrayHasKey(\n $key,\n $conf,\n 'Key $conf[\\'' . $key . '\\'] missing in ' . DOKU_PLUGIN . 'yearbox/conf/default.php'\n );\n }\n }\n }", "title": "" }, { "docid": "6e43f358591deae8c547e0a416cc5102", "score": "0.6024844", "text": "public function load()\n {\n // Load the config cache into memory\n if(!file_exists($this->configCachePath) || !is_readable($this->configCachePath))\n {\n // No cache file found, remake it\n $this->sync();\n }\n \n // Does the file exist now?\n if(!file_exists($this->configCachePath) || !is_readable($this->configCachePath))\n {\n // Critical failure to load the configuration data\n throw new Exception('Unable to load the configuration information.' . \n ' Check that ' . $this->configCachePath . ' is writable.');\n }\n \n // Load all data\n $this->config = parse_ini_file($this->configCachePath);\n \n if(!is_array($this->config))\n {\n // Failed to load configuration data, try a sync.\n $this->sync();\n \n // Try to load again\n $this->config = parse_ini_file($this->configCachePath);\n }\n \n // Check the configuration again\n if(!is_array($this->config))\n {\n // Critical failure to load the configuration data\n throw new Exception('Unable to load the configuration information.' . \n ' Check that ' . $this->configCachePath . ' is writable.');\n }\n \n return true;\n }", "title": "" }, { "docid": "387cb2d9bd3d8f6ef0d67c77b9347bde", "score": "0.6022747", "text": "public function testFilesArePresent()\n {\n $this->assertFileExists(config_path(\"binshopsblog.php\"), \"/config/binshopsblog.php should exist - currently no file with that filename is found\");\n $this->assertTrue(is_array(include(config_path(\"binshopsblog.php\"))), \"/config/binshopsblog.php should exist - currently no file with that filename is found\");\n }", "title": "" }, { "docid": "5fab440ceae6766b09cd169abed35741", "score": "0.60211945", "text": "private function ConfigRead($filename) {\n\tif(file_exists($filename)) {\n\t $this->filename = $filename;\n\t $this->mtime = filemtime($filename);\n\t $this->config = parse_ini_file($filename, true);\n\t}\n }", "title": "" }, { "docid": "c461120a914916f934f67b4625b8cdc1", "score": "0.602048", "text": "public function getConfigurationFilename();", "title": "" }, { "docid": "70eb483905200d3838ad19ad190e42c6", "score": "0.6018949", "text": "public function load($path=null)\n {\n if ($path == null) {\n $path = './'.$this->configFile;\n }\n $path = realpath($path);\n if (file_exists($path) && !is_readable($path)) {\n throw new \\Exception('Cannot access configuration file!');\n }\n\n if ($path !== false) {\n // be sure it's a .php file\n $info = pathinfo($path);\n\n if ($info['extension'] !== 'php') {\n throw new \\Exception('File must be a .php file!');\n } else {\n // we're good - load it!\n $data = include $path;\n $this->setConfig($data);\n }\n } \n }", "title": "" }, { "docid": "9f4b47ff331656d3780347ee5a2aa1b5", "score": "0.6018005", "text": "public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }", "title": "" }, { "docid": "9f4b47ff331656d3780347ee5a2aa1b5", "score": "0.6018005", "text": "public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }", "title": "" }, { "docid": "65272b3c8b4d5e6a0f8706472934b05d", "score": "0.6015652", "text": "function testConfig() {\n\t\tCakeLog::config ( 'file', array (\n\t\t\t\t'engine' => 'FileLog',\n\t\t\t\t'path' => LOGS \n\t\t) );\n\t\t$result = CakeLog::configured ();\n\t\t$this->assertEqual ( $result, array (\n\t\t\t\t'file' \n\t\t) );\n\t\t\n\t\t@unlink ( LOGS . 'error.log' );\n\t\tCakeLog::write ( LOG_WARNING, 'Test warning' );\n\t\t$this->assertTrue ( file_exists ( LOGS . 'error.log' ) );\n\t\t\n\t\t$result = file_get_contents ( LOGS . 'error.log' );\n\t\t$this->assertPattern ( '/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Warning: Test warning/', $result );\n\t\tunlink ( LOGS . 'error.log' );\n\t}", "title": "" }, { "docid": "ee08e74eac6b695e3d0f408556946a01", "score": "0.60123974", "text": "private static function ini()\n\t{\n\t\t$dirPath = __DIR__ . '/../../../';\n\t\tstatic::$config = include_once($dirPath . 'config.php');\n\t}", "title": "" }, { "docid": "e758b7684ddfcb35d77b344c1a9304fc", "score": "0.5988557", "text": "public function loadFrameworkBaseFile() {\r\n $config_full_path = $this->framework->getInstallationPath() . \"/protected/configuration.ini\";\r\n \r\n $config_is_readable = is_readable($config_full_path);\r\n \r\n $base_configuration = array();\r\n \r\n if($this->framework->getMode() != 'safe') {\r\n if(!$config_is_readable) {\r\n throw new Exception(\"Configuration file '{$config_full_path}' is missing or not readable.\");\r\n }\r\n \r\n $base_configuration = parse_ini_file($config_full_path);\r\n \r\n if(empty($base_configuration)) {\r\n throw new Exception(\"The base configuration file '{$config_full_path}' could not be loaded or is empty.\");\r\n }\r\n }\r\n else {\r\n if($config_is_readable) {\r\n $base_configuration = parse_ini_file($config_full_path);\r\n \r\n if(empty($base_configuration)) {\r\n $base_configuration = array();\r\n }\r\n }\r\n }\r\n \r\n $this->full_configuration = $base_configuration;\r\n }", "title": "" }, { "docid": "630d0fae2d2ccd9ab9547b9cb0d4a704", "score": "0.5985537", "text": "public function testSetupLocalSettings() {\n\n $this->assertFileExists($this->projectDirectory . '/docroot/sites/default/settings/local.settings.php');\n }", "title": "" }, { "docid": "1dca61c3371236b691a5c7684931e1b5", "score": "0.5981301", "text": "public static function onLoadConfig($config='protected/config.php') \n\t{\n\t\t# Get the config\n\t\tif (false === defined('GWF_HAVE_CONFIG'))\n\t\t{\n\t\t\tif (false === file_exists($config))\n\t\t\t{\t\t\t\n\t\t\t\tself::logDie(sprintf('GWF3 couldnt load the config: %s file doesnt exists. Message in %s at line %s', $config, __FILE__, __LINE__));\n\t\t\t}\n\t\t\trequire_once $config;\n\t\t\tdefine('GWF_HAVE_CONFIG', 1);\n\t\t}\n\t}", "title": "" }, { "docid": "c7a6ab560c90fa38636d6fcc5da1a8a7", "score": "0.5979373", "text": "public function testLoadThrowsExceptionOnNonExistentOrNonReadableGlobalYamlFile()\n {\n /** $this->setUp() will create a new global.yml file for the next test **/\n unlink(self::$testCreateDir . \"/global.yml\");\n \n $this->setExpectedException(\"ConfigLoader\\Exception\\GlobalConfigFileNotFoundException\");\n\n $this->configLoader->load();\n }", "title": "" }, { "docid": "3b9e116c0173676d5df8f15e0c61a610", "score": "0.59773797", "text": "static public function loadConfig($path)\n\t{\n\n\t\t$path = __DIR__.'/'.$path;\n\n\t\tif (file_exists($path) === false) {\n\n\t\t\t$msg = 'Couldn\\'t load configuration file from %s.';\n\t\t\t$msg = sprintf($msg, $path);\n\n\t\t\tthrow new Exception($msg);\n\n\t\t} else {\n\n\t\t\tinclude_once $path;\n\t\t\tself::$_opt = array_merge(self::$_opt, $options);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "a19e22a45a026e9d2567d79a7fb959f1", "score": "0.59702337", "text": "public function loadConfig( $file ){\n\t\tif( file_exists( $file ) ){\n\t\t\t$config = include $file;\n\t\t\t$driver = $config['driver'];\n\t\t\tif( $driver == 'file'){\n\t\t\t\t$session = new \\Wudimei\\Session\\File($config);\n\t\t\t}\n\t\t\t$this->session = $session;\n\t\t}\n\t\telse{\n\t\t\tthrow new \\Exception('sesstion config file \"' . $file . '\" does not exists');\n\t\t}\n\t\t\n\n\t}", "title": "" }, { "docid": "d82f3e2f95f4bbbd14bfa8d9c262c116", "score": "0.59697", "text": "public function loadConfig($path, $file)\n {\n $full_path = $path . $file;\n\n // If the Codeception YAML can't be found, the application can't go any further.\n if (! file_exists($full_path))\n return false;\n\n // Using Symfony's Yaml parser, the file gets turned into an array.\n $config = \\Symfony\\Component\\Yaml\\Yaml::parse(file_get_contents($full_path));\n\n if (!isset($config['paths']) || !is_array($config['paths'])) {\n throw new \\Exception(\"The config does not appear to contain any paths: \".$path.$file);\n }\n // Update the config to include the full path.\n foreach ($config['paths'] as $key => &$test_path) {\n $test_path = file_exists($path . $test_path) ?\n realpath($path . $test_path) : $path . $test_path;\n }\n\n $config['env'] = array();\n\n if (isset($this->config['tests'])) {\n foreach ($this->config['tests'] as $type => $active) {\n\n if (! $active)\n break;\n\n if ($suite = \\Symfony\\Component\\Yaml\\Yaml::parse($config['paths']['tests'] . \"/$type.suite.yml\")) {\n if (isset($suite['env'])) {\n $config['env'][$type] = array_keys($suite['env']);\n }\n }\n }\n }\n\n return $config;\n }", "title": "" }, { "docid": "364bd33606fc015e6c023a52175c74eb", "score": "0.5962602", "text": "public function testValidatePath(){\n $template = array(\n 'path' => Settings::MANDATORY | Settings::PATH,\n 'dir' => Settings::PATH,\n );\n $this->config->path = __FILE__;\n $this->config->dir = dirname(__FILE__);\n // test\n $this->assertTrue( $this->config->validate($template) );\n }", "title": "" }, { "docid": "60e725115021ec82b4759cb774eb96c5", "score": "0.59621036", "text": "public function load(){\n\n\n if(!is_dir($this->root.$this->environment->name)){\n return new \\Exception(\"The environment does not exist: $message\", 404);\n }\n\n\n\n $configPath = \\Frag::$app->root.\\Frag::$app->environment->dir.\"config/\";\n\n if($r = $this->loadConfigurationFile($configPath.\"config.php\") !== true){\n return $r;\n }\n\n if($r = $this->loadConfigurationFile($configPath.\"params.php\", 'params') !== true){\n return $r;\n }\n\n if($r = $this->loadConfigurationFile($configPath.\"db.php\", 'db') !== true){\n return $r;\n } else {\n $this->pdo = new \\PDO( $this->db->pdo, $this->db->username, $this->db->password );\n if(STATE == DEV){\n $this->pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n }\n }\n\n $urlClass = $this->urlClass;\n $className = isset($urlClass['class']) ? $urlClass['class'] : NULL;\n $c = new $className($urlClass[0]);\n $this->$className = $c;\n\n return true;\n }", "title": "" }, { "docid": "1c97cb0adc5cfeaf5b9ecb13681db58f", "score": "0.59611684", "text": "public static function load($file = NULL) {\n\t\t$config = \"\";\n\t\t// self::reset();\n\t\t$file = ($file === null) ? static::$file : $file;\n\t\tif (file_exists($file))\n\t\t\trequire($file);\n\t\telse {\n\t\t\tfile_put_contents($file, self::defaultSettings());\n\t\t\trequire($file);\n\t\t}\n\t\tstatic::$_setting = $config;\n\n\t}", "title": "" }, { "docid": "f4333cae240df8957b09aedacc2e22dd", "score": "0.5959993", "text": "public function testSuccess(): void\n {\n $data = json_encode([\n 'wiki' => 'https://some_test_wiki.com/w/api.php',\n 'category' => 'TestCategory'\n ]);\n\n file_put_contents('config_test.json', $data);\n\n $config = new ConfigJson('config_test.json');\n\n $configParsed = $config->parseConfig();\n $this->assertIsArray($configParsed);\n\n $this->assertEquals([\n 'wiki' => 'https://some_test_wiki.com/w/api.php',\n 'category' => 'TestCategory'\n ], $configParsed);\n }", "title": "" }, { "docid": "db1394af667f9116438979e83cb97e62", "score": "0.595202", "text": "public function config($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->config->load($file, $use_sections, $fail_gracefully);\n\t}", "title": "" }, { "docid": "993738c4521160530c2b6aa705f3ddbd", "score": "0.5950901", "text": "public function readConfigFile($configFile)\n {\n if (function_exists('yaml_parse_file')) {\n $config = yaml_parse_file($configFile);\n\n } else {\n\n require_once __DIR__ . '/../../third_party/spyc/spyc.php';\n\n $config = \\Spyc::YAMLLoad($configFile);\n }\n\n $this->readConfigArray($config);\n\n $this->debug(\"read config from $configFile\");\n\n return true;\n\n }", "title": "" }, { "docid": "a0733120ee54a43ded640991b4b5d01e", "score": "0.59265393", "text": "public function testLoad($filename, $subset)\n {\n $loader = new YamlConfigLoader([\n 'includePath' => __DIR__ . '/samples/yaml/',\n 'format' => 'yml'\n ]);\n\n $config = $loader->load($filename);\n\n $this->assertArraySubset($subset, $config);\n\n }", "title": "" }, { "docid": "658a8b3a939615d37d91d6dd3c3f1867", "score": "0.592488", "text": "public function read($importer_conf);", "title": "" }, { "docid": "f6d70939897bf45aba7574e67286f531", "score": "0.59239376", "text": "public function getConfigFilePath(): string;", "title": "" }, { "docid": "ddd3e12a56c5a0ba608fcd8c363cc286", "score": "0.5922163", "text": "public function testLoad1()\n {\n $this->obj->load('system');\n\n $this->assertEquals(\n $this->obj->getTree()->get('system.tmpdir'),\n '/tmp'\n );\n\n $this->assertEquals(\n $this->obj->getTree()->get('system.host.ip'),\n '192.168.1.120'\n );\n }", "title": "" }, { "docid": "b5ea07a0c071555d4fc8d089c1352bbf", "score": "0.59178126", "text": "public function testCreateConfigFileReturnBoolean()\n {\n $settings = new \\Gomail\\Database\\FileHandler\\DatabaseSettingsFileHandler();\n $this->assertTrue($settings->createConfigFile());\n }", "title": "" }, { "docid": "a73881775ed43df12346c6fc7af289b5", "score": "0.5916206", "text": "function app_config($filename,$arg = null) // arg1 = nome do arquivo , config\n{\n\t$file = APP_PATH . DS . 'config' . DS . $filename . '.php';\n\tif(file_exists($file)) $config = require($file);\n\telse die('Arquivo de configuração não encontrado');\n\n\tif(is_null($arg) && isset($config) ) return $config;\n\telse if(!is_null($arg) && isset($config[$arg]) ) return $config[$arg];\n\treturn null;\n}", "title": "" } ]
f5303ad1ec6e41d8bf9b5b343cd1e96a
Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only. Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED];
[ { "docid": "59b171f661b91a606ff67fff3f42630b", "score": "0.66313696", "text": "public function setConfigId($var)\n {\n GPBUtil::checkString($var, True);\n $this->config_id = $var;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "c4a8a92307a8db4421b9df39b9b694c6", "score": "0.7082277", "text": "public function get_config_id() {\n\t\treturn $this->_config_id;\n\t}", "title": "" }, { "docid": "2c04f3111d251ee437b601c8e110ef19", "score": "0.700465", "text": "public function getConfigId()\n {\n return $this->config_id;\n }", "title": "" }, { "docid": "2a8cd53cad790129aa14338c44383fca", "score": "0.6436512", "text": "public function getIdConfig()\r\n\t\t{\r\n\t\t\treturn $this->idConfigSolicitud;\r\n\t\t}", "title": "" }, { "docid": "e2e96e68d2efebee1c6ccb7828d20c69", "score": "0.61743903", "text": "public function getEditorConfigId(): string\n\t{\n\t\treturn static::EDITOR_CONFIG_PREFIX.\n\t\t\tmb_strtolower($this->getTypeName()) . '_' .\n\t\t\t$this->categoryId;\n\t}", "title": "" }, { "docid": "71e50862f12ce05f7074b0d4ac1f471a", "score": "0.6156902", "text": "public function getServiceConfigId()\n {\n return $this->service_config_id;\n }", "title": "" }, { "docid": "35972a6780e11117c9458c79b7b24028", "score": "0.5581312", "text": "public function GetConfigurationForParent()\n {\n $Config['Port'] = $this->ReadPropertyInteger('Port');\n return json_encode($Config);\n }", "title": "" }, { "docid": "cfd497232e1ebd3c691b4f6fda14124f", "score": "0.53490674", "text": "public function getMuteConfigId()\n {\n return $this->mute_config_id;\n }", "title": "" }, { "docid": "e60dbe331731fe723318c3582084c716", "score": "0.5311775", "text": "public function getClientId()\n {\n return (string) $this->_getStoreConfig(self::CONFIG_PATH_CLIENT_ID);\n }", "title": "" }, { "docid": "06265bb382a37488b0af5fbcd2000732", "score": "0.5281376", "text": "function getSchedConfId() {\n\t\treturn $this->getData('schedConfId');\n\t}", "title": "" }, { "docid": "b4d1b2bd5e5b397a885cca938a0380ee", "score": "0.526213", "text": "public static function clientId(): string\n {\n $clientId = config('safe-urls.google.clientId');\n\n return !empty($clientId) ? $clientId : '';\n }", "title": "" }, { "docid": "bccb442d8a41f2569ac94e54a0c65eaa", "score": "0.5260634", "text": "public function getIdGeneratorConfig()\n {\n return $this->getConfigByName('id_generator');\n }", "title": "" }, { "docid": "ebc0551f4792d74323ee254b38a1d31a", "score": "0.52564484", "text": "public function setIdConfig($idConfig)\r\n\t\t{\r\n\t\t\t$this->idConfigSolicitud = $idConfig;\r\n\t\t}", "title": "" }, { "docid": "e75d3cd8b5c4a9554019223bda54c9ea", "score": "0.5238923", "text": "protected function _GetConfID(){\n $sid = $GLOBALS['hConfig']->get('twilioSEID');\n $token = $GLOBALS['hConfig']->get('twilioToken');\n try {\n $client = new Twilio\\Rest\\Client($sid, $token);\n $conferences = $client->conferences->read(\n array(\"status\" => \"in-progress\", \"friendlyName\" => $GLOBALS['hConfig']->get('conferenceID'))\n );\n // Loop over the list of conferences and echo a property for each one\n foreach ($conferences as $conference) {\n log_message('debug','Conference Status: '.$conference->status);\n log_message('debug','Conference Sid: '.$conference->sid);\n return $conference->sid;\n }\n } // try\n catch(Exception $e){\n $this->load->view('errorview');\n } // catch\n return NULL;\n }", "title": "" }, { "docid": "2c20b6c0fde9dce8bc0b5faeb1333c50", "score": "0.5195042", "text": "protected function getConfigKey()\n {\n return basename($this->getName());\n }", "title": "" }, { "docid": "72672e1578a132989bb45f3e249a18b7", "score": "0.5192571", "text": "public function getApiClientId($storeId = null)\r\n {\r\n return Mage::getStoreConfig('cubix_hubspot_sec/cubix_hubspot_group/cubix_hubspot_clientid', $storeId);\r\n }", "title": "" }, { "docid": "8c8c21be3455542f8100db97d01da8c5", "score": "0.5163195", "text": "public function getContainerId() {\n return Mage::getStoreConfig(self::XML_PATH_CONTAINER);\n }", "title": "" }, { "docid": "3c008686f1ec1c8950de80fb60d95a82", "score": "0.51169115", "text": "private function getConfigName($id) {\n $parts = explode('.', $id);\n return $parts[0] . '.' . $parts[1];\n }", "title": "" }, { "docid": "b9db7f32c5780f95b2a71213e4bdce11", "score": "0.5102654", "text": "public function getResourceConfigName()\n {\n return $this->resourceConfigName;\n }", "title": "" }, { "docid": "02d8596e01fe2e714b2045f81ffc8958", "score": "0.50744563", "text": "public function getProjectId(){\n if(empty($this->authConfig['project_id'])){\n throw new UnexpectedValueException('project_id not found in auth config file!');\n }\n return $this->authConfig['project_id'];\n }", "title": "" }, { "docid": "5755f500bc4edb5d8fb10cfc9d7cf699", "score": "0.50426245", "text": "public function getConfigTplName()\n\t{\n\t\treturn 'CommentsConfig';\n\t}", "title": "" }, { "docid": "aced17a893ca3422fc0bb792b2ac5ed3", "score": "0.5017445", "text": "public function getIdFieldName()\n {\n return Mage::getStoreConfig(self::CAMPAIGNS_IDENTIFIER_CONFIG_PATH);\n }", "title": "" }, { "docid": "80702b62149bd078350d44d7b5a2f325", "score": "0.49596253", "text": "public function getClientId()\n {\n return $this->getParameter('clientId');\n }", "title": "" }, { "docid": "80702b62149bd078350d44d7b5a2f325", "score": "0.49596253", "text": "public function getClientId()\n {\n return $this->getParameter('clientId');\n }", "title": "" }, { "docid": "b530ae2c4a0314d0e3d5600c1bed7934", "score": "0.4946527", "text": "public function getClientId(): string\n {\n return Craft::parseEnv($this->clientId);\n }", "title": "" }, { "docid": "1b32efbc286205b46894885a2aec2a7d", "score": "0.4940749", "text": "public function getParentId();", "title": "" }, { "docid": "1b32efbc286205b46894885a2aec2a7d", "score": "0.4940749", "text": "public function getParentId();", "title": "" }, { "docid": "4e983b6c99a1d9688fef3affc4d178fd", "score": "0.49342474", "text": "public function getIdentifier()\n {\n return sprintf('%d_%d', $this->form->getId(), $this->config('id'));\n }", "title": "" }, { "docid": "fe6d9ebd97561bd4adf8ad05045a3b7f", "score": "0.48798272", "text": "public function getPHPConfigLine(){\n\treturn $this->countyid . \"\\t=> '\" . REQUIRED_VAR($this->toMatch->id) . '\\'';\n\t}", "title": "" }, { "docid": "99225a150e9ae50500ff115b53617911", "score": "0.4871915", "text": "public function getFormId()\n {\n return 'custom_menus_banners_config';\n }", "title": "" }, { "docid": "3ea39e1b637713ef4be84ac87f99d3cd", "score": "0.48704785", "text": "public function getBaseConfig(IdSerializer $parentId = null);", "title": "" }, { "docid": "d2d95d4a85dd1b0c36f103ba1888f92d", "score": "0.48471177", "text": "public function getNewConfigGroupId(int $configId, string $flow): int\n {\n // if there is no config group for a specific flow, first one id is 0\n $configGroupId = 0;\n\n $sql = 'SELECT MAX(config_group_id) as max_config_group_id '\n . 'FROM cfg_centreonbroker_info cbi '\n . 'WHERE config_id = :config_id '\n . 'AND config_group = :config_group';\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':config_id', $configId, \\PDO::PARAM_INT);\n $stmt->bindParam(':config_group', $flow, \\PDO::PARAM_STR);\n $stmt->execute();\n\n $row = $stmt->fetch();\n if (!is_null($row['max_config_group_id'])) {\n // to get the new new config group id, we need to increment the max exsting one\n $configGroupId = $row['max_config_group_id'] + 1;\n }\n\n return $configGroupId;\n }", "title": "" }, { "docid": "4529438379048aefa84cf9e74cc6327b", "score": "0.47733593", "text": "public function setServiceConfigId($var)\n {\n GPBUtil::checkString($var, True);\n $this->service_config_id = $var;\n\n return $this;\n }", "title": "" }, { "docid": "1eed75e8c190bf8011e5de3b2f37e97d", "score": "0.4769609", "text": "function getConfig($configKey)\r\n {\r\n }", "title": "" }, { "docid": "879b7ecdc8b4f04131abfb42784e2189", "score": "0.47673476", "text": "public function getApiId($storeId = null)\r\n {\r\n return Mage::getStoreConfig('cubix_hubspot_sec/cubix_hubspot_group/cubix_hubspot_appid', $storeId);\r\n }", "title": "" }, { "docid": "0e94da9e6ca8265b982d2643b0bbbcd4", "score": "0.47589633", "text": "function getConfigurationName();", "title": "" }, { "docid": "218e523a4b6816559221e7d81cbc8bbb", "score": "0.47584778", "text": "public function getClientId()\n {\n return $this->id;\n }", "title": "" }, { "docid": "f6f7d49922e1d49679b08471c778cb3c", "score": "0.47468257", "text": "protected function getEditableConfigNames() {\n return [\n SubscriptionsGeneralSettingsForm::$configName\n ];\n }", "title": "" }, { "docid": "0894c784f1ce988cf75c37c170b2206a", "score": "0.47305068", "text": "public function afterSave(Config $config)\n {\n if (!$this->_scopeConfig->getValue('dev/c3_configsetuphelper/enabled') ||\n $this->_request->getParam('configsave', null) === null)\n {\n return;\n }\n\n // Get website and store codes and ids\n $website = $config->getWebsite() ?: null;\n $store = $config->getStore() ?: null;\n $section = $config->getSection();\n\n // Set scope based on what has been set\n if ($store !== null) {\n $scope = 'stores';\n $scopeId = $store;\n } elseif ($website !== null) {\n $scope = 'websites';\n $scopeId = $website;\n } else {\n $scope = 'default';\n }\n\n // Get fully qualified field names from form\n $paths = array();\n foreach (array_keys($this->_request->getParam('configsave',array())) as $underscoreName) {\n // Split name via underscore\n $splitName = explode('_',$underscoreName);\n $section = array_shift($splitName);\n $groupname = array_shift($splitName);\n $fieldname = implode('_',$splitName);\n // Rejoin as full path\n $fullName = \"{$section}/{$groupname}/{$fieldname}\";\n $paths[] = $fullName;\n }\n\n // Get path values with correct scope\n $pathValues = $this->_getPathValues($paths, $website, $store);\n\n // Output values in string per group\n\n $string = '<pre>' . $this->_getHeader() . '// ' . __('Config for') . ' ' .$section . \"\\n\";\n foreach ($this->_request->getParam('groups') as $groupname => $group) {\n // Check if any paths are selected in this group\n $anyOutput = false;\n foreach (array_keys($group['fields']) as $fieldname) {\n $fullName = \"{$section}/{$groupname}/{$fieldname}\";\n // Skip if name was not retrieved\n if (!isset($pathValues[$fullName])) {\n continue;\n }\n $anyOutput = true;\n break;\n }\n if (!$anyOutput)\n continue;\n $string .= \"\\n// \" . __('Settings for %s group', $groupname) . \"\\n\";\n foreach (array_keys($group['fields']) as $fieldname) {\n $fullName = \"{$section}/{$groupname}/{$fieldname}\";\n // Skip if name was not retrieved\n if (!isset($pathValues[$fullName])) {\n continue;\n }\n $showVal = \"'\" . addslashes($pathValues[$fullName]) . \"'\";\n if ($pathValues[$fullName] === null) {\n $showVal = 'null';\n }\n // If non-default scope used, add options to method call\n if ($scope == 'default') {\n $scopeArgs = \", 'default', 0\";\n } else {\n $scopeArgs = \", '{$scope}', {$scopeId}\";\n }\n $string .= \"\\$this->_resourceConfig->saveConfig('\" . addslashes($fullName) .\n \"', {$showVal}{$scopeArgs});\\n\";\n }\n }\n $string .= $this->_getFooter() . '</pre>';\n\n $this->_messageManager->addNotice(__(\"<strong>\" .\n __('Setup script segment for these settings') .\n \":</strong><br /><pre>{$string}</pre>\"));\n }", "title": "" }, { "docid": "034d83ee05eac082fd188e2ed7aa7f21", "score": "0.47267976", "text": "public function getClientId(): string\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "3a71bc5687f28a5b2d9c2ff21705121c", "score": "0.4725966", "text": "protected function getCloudinaryConfigUrl()\n {\n return $this->urlBuilder->getUrl(\n 'adminhtml/system_config/edit',\n [\n 'section' => 'cloudinary'\n ]\n );\n }", "title": "" }, { "docid": "91e9e63c2992d5cecf4d260b9213405f", "score": "0.4715358", "text": "public function getIdentifier()\n {\n if (isset($this->config['command']['search'])) {\n return $this->config['command']['search'];\n }\n if (isset($this->config['command']['main'])) {\n return $this->config['command']['main'];\n }\n\n return null;\n }", "title": "" }, { "docid": "a968773022c3d84d499b76bcf6abe9eb", "score": "0.47065714", "text": "abstract public function onConfigDelete(ConfigCrudEvent $event);", "title": "" }, { "docid": "66815cda084f4e7aeb0364577718bc47", "score": "0.47044933", "text": "public function getDomainClientId() {\n return $this->queryPath('/epp:epp/epp:response/epp:resData/domain:infData/domain:clID');\n }", "title": "" }, { "docid": "c20278cd877d8400111305b67abd89ca", "score": "0.46952665", "text": "public function key()\n {\n return key( $this->configurations );\n }", "title": "" }, { "docid": "814596f8275758978dd9111ae2d48bbd", "score": "0.46938646", "text": "protected function getEditableConfigNames() {\n return ['iq_pb_cug.settings'];\n }", "title": "" }, { "docid": "cb9135b83925bae11a4252fa95aca6eb", "score": "0.46799845", "text": "public function getConfig(string $config, $store = null) {\n if (!$store) {\n $store = $this->storeManager->getStore()->getId();\n }\n $scope = $this->getScope($store);\n $websiteId = $this->storeManager->getStore($store)->getWebsite()->getId();\n $resp = $this->scopeConfig->getValue('carriers/ingrid/' . $config, $scope, $websiteId);\n \n return $resp;\n }", "title": "" }, { "docid": "59e5e462be454199b466131e69765497", "score": "0.4671304", "text": "public function getClientId() : string {\n\t\treturn $this->client_id;\n\t}", "title": "" }, { "docid": "f15da0b1c6d1f51c22286e8a6ec6293c", "score": "0.46592698", "text": "public function get()\n {\n return $this->configkey;\n }", "title": "" }, { "docid": "8bccdd5d3c2e394f7e272bee9a227a2e", "score": "0.4658283", "text": "public function getClientId() {\n\t\treturn $this->clientId;\n\t}", "title": "" }, { "docid": "8bccdd5d3c2e394f7e272bee9a227a2e", "score": "0.4658283", "text": "public function getClientId() {\n\t\treturn $this->clientId;\n\t}", "title": "" }, { "docid": "8bccdd5d3c2e394f7e272bee9a227a2e", "score": "0.4658283", "text": "public function getClientId() {\n\t\treturn $this->clientId;\n\t}", "title": "" }, { "docid": "991bbfbbcfd9cd392ec738dc40564426", "score": "0.4654191", "text": "public function get_config($config_id){\n $query = $this->db->query(\n ' SELECT *\n FROM M_ADMIN_CONFIG\n WHERE config_id = '.$config_id\n );\n if($query->num_rows() == 1){\n return $query->result_array()[0];\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "29b1d3ca0635ae06fb681600a65a361e", "score": "0.46515206", "text": "public function getConfName()\n\t{\n\t return ($this->mainEvent ? $this->mainEvent->getLabel() : \"\");\n\t}", "title": "" }, { "docid": "94822971e014601b67323ee9e0eeabf6", "score": "0.46426395", "text": "abstract public function onConfigSave(ConfigCrudEvent $event);", "title": "" }, { "docid": "dd13b509d3cb2f83bf33400b73c4065d", "score": "0.46382213", "text": "protected function getEditableConfigNames() {\n return ['config.modal_form_example_modal_form'];\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4635816", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4635816", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4635816", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4635816", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4635816", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4635816", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "ecce7adb183b10f09e502edee9e94102", "score": "0.4628452", "text": "private function _getConfigValue($configPath)\n {\n return $this->_scopeConfig->getValue(\n $configPath,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "d386827e06ddbea1f0a58f69876ccf1b", "score": "0.46277174", "text": "public function getClientId() { return $client_id; }", "title": "" }, { "docid": "0166777a1c1216e5d367c597214dfadf", "score": "0.46181253", "text": "protected function determineCurrentPID($config = NULL) {\r\n\t\t\r\n\t\t$pid = (int) t3lib_div::_GP('id');\r\n\r\n\t\tif($pid <= 0) {\r\n\t\t\t$pid = (int) t3lib_div::_GP('PID');\t\r\n\t\t}\r\n\t\t\r\n\t\tif($pid <= 0 && is_array($config)) {\r\n\t\t\t$pid = (int) $config['row']['pid'];\t\r\n\t\t}\r\n\t\t\r\n\t\tif($pid <= 0) {\r\n\t\t\t// UUUUhh, i hope we never come so far :)\r\n\t\t\t$returnUrlArray = explode('id=', t3lib_div::_GP('returnUrl'));\r\n\t\t\t$pid = (int) array_pop($returnUrlArray);\r\n\t\t}\r\n\t\t \r\n\t\t$this->currentPid = $pid;\n\t\t\n\t\treturn $pid;\r\n\t}", "title": "" }, { "docid": "cdf7c4dd25d526134b2978ebe74745c8", "score": "0.46172088", "text": "protected function getPostIdsConfigValue()\n {\n return $this->_scopeConfig->getValue(\n 'mfblog/sidebar/'.$this->_widgetKey.'/posts_ids',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "84373019201d4893aa726329bf610b12", "score": "0.46169934", "text": "public static function getConfigRootKeyName(): string\n {\n return \\basename(static::getConfigPath(), '.php');\n }", "title": "" }, { "docid": "84373019201d4893aa726329bf610b12", "score": "0.46169934", "text": "public static function getConfigRootKeyName(): string\n {\n return \\basename(static::getConfigPath(), '.php');\n }", "title": "" }, { "docid": "5776bb89c6db283890bbbffcddb9da67", "score": "0.4613762", "text": "function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "0ad06087779604a27444d0b2c9d04d67", "score": "0.46028855", "text": "function getConferenceId() {\n\t\treturn $this->getData('conferenceId');\n\t}", "title": "" }, { "docid": "1c211a63dadd31b6a71ff61762b0ec8d", "score": "0.45966575", "text": "protected function getTemporaryIdAttributeKey(): string\n {\n return config('nestedmodelupdater.temporary-id-key');\n }", "title": "" }, { "docid": "58ec0c5eb63a0c129d984ac9637c54be", "score": "0.45937818", "text": "public function getParentAccountId(): ?string\n {\n return $this->_parent_account_id;\n }", "title": "" }, { "docid": "3a2d87aaa4de5299c9c4ee807f31a6a3", "score": "0.45935825", "text": "public function getClientId();", "title": "" }, { "docid": "3a2d87aaa4de5299c9c4ee807f31a6a3", "score": "0.45935825", "text": "public function getClientId();", "title": "" }, { "docid": "3a2d87aaa4de5299c9c4ee807f31a6a3", "score": "0.45935825", "text": "public function getClientId();", "title": "" }, { "docid": "21f02d2c2b0d0814712c9aa77d2d4395", "score": "0.4589684", "text": "public function getParentIdentifier();", "title": "" }, { "docid": "8bb7c9649a6a270be71f6228697c653b", "score": "0.45875075", "text": "public function getFormId() {\r\n return 'ice_cream_admin_settings';\r\n }", "title": "" }, { "docid": "9bb65eee8fd44ab5ce57ca6feaa3be1e", "score": "0.4578649", "text": "public function getConfig($config_path)\n {\n return $this->scopeConfig->getValue(\n $config_path,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "9bb65eee8fd44ab5ce57ca6feaa3be1e", "score": "0.4578649", "text": "public function getConfig($config_path)\n {\n return $this->scopeConfig->getValue(\n $config_path,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "6b1d0278bf8b26f35b77c85d77865eb3", "score": "0.4576006", "text": "public function get_id(){\r\n $id = $this->config->id[\"name\"];\r\n if (array_key_exists($id,$this->data))\r\n return $this->data[$id];\r\n return false;\r\n }", "title": "" }, { "docid": "8c5e53cf7f72531fb3744228cfcab14a", "score": "0.45748538", "text": "public function getSubordinateConfig()\n {\n return $this->subordinate_config;\n }", "title": "" }, { "docid": "7734c0b2c4282ce7aaa8ae72d25a75c0", "score": "0.45742837", "text": "public function key() {\n\t\treturn key($this->_config);\n\t}", "title": "" }, { "docid": "bd999bb1c08f773ccca3b86dc9f21255", "score": "0.45644584", "text": "public function getParentId()\n {\n return $this->parent_id;\n }", "title": "" }, { "docid": "95a8713ce5f919d2f3e4a33f6ffb29f8", "score": "0.45613828", "text": "public function getDomainCreateClientId() {\n return $this->queryPath('/epp:epp/epp:response/epp:resData/domain:infData/domain:crID');\n }", "title": "" }, { "docid": "ffea52f6ae60daf93153f006982e3cfe", "score": "0.45592323", "text": "public function getEnvironmentId();", "title": "" }, { "docid": "8662c635de67d496a614926480911193", "score": "0.4555328", "text": "private function getPathWithConfigs(): string\n {\n\n $pathWithConfigs = trim($this->utils->getPathWithConfigs(), '/');\n $modeSubdirectoryWithConfigs = trim($this->mode->getSubdirectory(), '/');\n\n return sprintf('%s/%s', $pathWithConfigs, $modeSubdirectoryWithConfigs);\n\n }", "title": "" }, { "docid": "26e6280e5c56e837514564688a2eda38", "score": "0.45537767", "text": "public function getConfigFileName() {\n return realpath(FileHelper::getPrivateFolderLocation()) . LdapSettings::LdapSettingsFileNameJSON;\n }", "title": "" }, { "docid": "73165af2e55afd6e3b72fbebce20041e", "score": "0.45522782", "text": "public function getZendeskId()\n {\n return $this->_scopeConfig->getValue(\n self::XML_PATH.\"id\",\n ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "f170811270c6b091a0febd8a267d962b", "score": "0.455099", "text": "public function getId() {\n return $this->projectId;\n }", "title": "" }, { "docid": "1803794491b7bd32b9c3b508a0207a42", "score": "0.45507917", "text": "public function getIdFieldName()\n {\n return Mage::getStoreConfig('factfinder/config/tracking_identifier');\n }", "title": "" }, { "docid": "9c8fc3fb67a15443b35b39f65b16e747", "score": "0.45502725", "text": "function getParentFilterId() {\n\t\treturn $this->getData('parentFilterId');\n\t}", "title": "" }, { "docid": "4459a222335a4307f801508eeaa66ccc", "score": "0.45463806", "text": "public static function idByName($name = NULL)\n\t{\n\t\tif($name)\n\t\t{\n\t\t\tif($name)\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\t$conf = Configurable::where('name', $name)->orderBy('name', 'asc')->firstOrFail();\n\t\t\t\t\treturn $conf->id;\n\t\t\t\t} \n\t\t\t\tcatch (ModelNotFoundException $e) \n\t\t\t\t{\n\t\t\t\t\tLog::error(\"The Configurable ` $name ` does not exist: \". $e->getMessage());\n\t\t\t\t\t//TODO: send email?\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "ccd7c8313f6a347b26b66adc763af850", "score": "0.45253816", "text": "protected abstract function getConfig();", "title": "" }, { "docid": "864e09daab7af6a61ba61314c6b34162", "score": "0.45204604", "text": "public function getDomainUpdateClientId() {\n return $this->queryPath('/epp:epp/epp:response/epp:resData/domain:infData/domain:upID');\n }", "title": "" }, { "docid": "6667caf15ea876de80444515fec00573", "score": "0.45182946", "text": "public function getConfiguration(): string\n {\n return $this->configuration;\n }", "title": "" }, { "docid": "3a18df8078c1a0c5db678b4b3702e23e", "score": "0.45150727", "text": "public function key()\n {\n return key($this->config);\n }", "title": "" }, { "docid": "459e9ce61b439d4f26e2621b2fcdbea1", "score": "0.45135495", "text": "public function actionConfiguration() {\n Yii::app()->clientScript->registerCssFile(THEME_URL . 'css/bootstrap.css');\n $this->setHeader('2.0');\n $isAdmin = checkPermission('admin');\n if ($isAdmin == false) {\n $this->redirect(BASE_URL);\n }\n $config = new Configuration();\n $config->type = 'config';\n $configurations = $config->get();\n $stripped = array();\n $proposalSortingBase = array();\n foreach ($configurations as $configuration) {\n $configuration['value'] = htmlspecialchars_decode($configuration['value']);\n if ($configuration['name_key'] == 'user_additional_info_question') {\n $configuration['value'] = explode(',', $configuration['value']);\n $configuration['value'] = array_map('trim', $configuration['value']);\n }\n if ($configuration['name_key'] == 'footer_html') {\n $configuration['value'] = stripslashes(htmlspecialchars($configuration['value']));\n }\n $stripped[$configuration['name_key']] = $configuration;\n }\n if (!empty($_POST)) {\n if ($_POST['key'] == 'moderators_email' && !empty($_POST['value'])) {\n $this->_saveModeratorsEmail($_POST['value']);\n }\n $value = htmlspecialchars($_POST['value']);\n if ($_POST['key'] == 'footer_html') {\n $value = trim(addslashes(htmlspecialchars(html_entity_decode($_POST['value']))));\n }\n $config->key = $_POST['key'];\n $config->type = 'config';\n $config->value = $value;\n $config->save();\n }\n $additonalInformationQuestion = array();\n if (defined('ADDITIONAL_INFORMATION')) {\n $additonalInformationQuestion = json_decode(ADDITIONAL_INFORMATION, TRUE);\n }\n if (defined('PROPOSAL_SORTING_BASE')) {\n $proposalSortingBase = json_decode(PROPOSAL_SORTING_BASE, true);\n }\n $cs = Yii::app()->getClientScript();\n $cs->registerScriptFile(THEME_URL . 'js/configuration.js', CClientScript::POS_END);\n $this->render('configuration', array('configurations' => $stripped, 'additional_info_question' => $additonalInformationQuestion,\n 'proposal_sorting' => $proposalSortingBase));\n }", "title": "" }, { "docid": "e3a7642021283a6c66c87c0c2070ef5e", "score": "0.45129213", "text": "public function getConfigKey()\n {\n return 'logger';\n }", "title": "" }, { "docid": "bff7b7559552b21d6a47ba040e37f6df", "score": "0.4501862", "text": "public function getName()\n {\n return 'field_configs';\n }", "title": "" }, { "docid": "633be9cfa5367e9ac51694f45215123f", "score": "0.44988373", "text": "public static function getConfig($config_name) {\n return Config::get('custom.'.static::getClassName().'.'.$config_name);\n }", "title": "" }, { "docid": "026b98a7d9f053a3a0eb1a80ba96eabb", "score": "0.4490857", "text": "public function credentialKey()\n {\n return data_get($this->widget(), 'config.credentials');\n }", "title": "" } ]
ce3273b0cf88257a9494f2dff27ffcf2
Returns the value of field tmmember_id
[ { "docid": "7ae9aca0ce3d649170938bfe07e46b6a", "score": "0.8558018", "text": "public function getTmmemberId()\n {\n return $this->tmmember_id;\n }", "title": "" } ]
[ { "docid": "12f808b0a2e2b68a11cd3c4007ba57e7", "score": "0.7336927", "text": "public function getMemberId()\n {\n return $this->member_id;\n }", "title": "" }, { "docid": "12f808b0a2e2b68a11cd3c4007ba57e7", "score": "0.7336927", "text": "public function getMemberId()\n {\n return $this->member_id;\n }", "title": "" }, { "docid": "12f808b0a2e2b68a11cd3c4007ba57e7", "score": "0.7336927", "text": "public function getMemberId()\n {\n return $this->member_id;\n }", "title": "" }, { "docid": "12f808b0a2e2b68a11cd3c4007ba57e7", "score": "0.7336927", "text": "public function getMemberId()\n {\n return $this->member_id;\n }", "title": "" }, { "docid": "52746d48d5bbf416f18657a90d3871ae", "score": "0.7329302", "text": "public function get_member_id()\n\t{\n\t\tif (empty($this->member))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (int)$this->member->id;\n\t}", "title": "" }, { "docid": "32a47230c51d3b2fd88dedfa09791f55", "score": "0.72713697", "text": "public function getId()\n {\n return $this->member_id;\n }", "title": "" }, { "docid": "4b020bff321df3ffe8bc392f2b81fca0", "score": "0.72639245", "text": "function getMemberId(){\n return $this->memberId; \n }", "title": "" }, { "docid": "e19d1d4288b96eb48b98e53de2044c5e", "score": "0.72351134", "text": "public function getMemberId()\n {\n return $this->_id_member;\n }", "title": "" }, { "docid": "48062d178e916a9b6118c39d4c8e3467", "score": "0.7226812", "text": "public function getMemberId()\n {\n return $this->memberId;\n }", "title": "" }, { "docid": "f9f676664cba32daf6f6fae1988d6e7e", "score": "0.7155221", "text": "public function getMemberId() {\n\t\treturn $this->memberId;\n\t}", "title": "" }, { "docid": "e2d3d6aaaa2e1c8310528efeec6ce699", "score": "0.7151232", "text": "private function getMemberId()\n\t{\n\t\t$urabe = $this->urabe->get_clone();\n\t\t$sql = \"SELECT memberId FROM chat_members cm WHERE cm.chatId = @1 AND cm.userId = @2\";\n\t\t$sql = $urabe->format_sql_place_holders($sql);\n\t\t$this->memberId = $urabe->select_one($sql, array($this->chatId, $this->userAccess->userId));\n\t}", "title": "" }, { "docid": "c94b67bb8f150602828c109d42349f3b", "score": "0.6976692", "text": "public function getMemberID(){\n \n $memberid = \"-1\"; // set invalid default value\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n \n $user = JFactory::getUser();\n \n // Get joomlaid\n $userjoomlaid = $user->id;\n \n // get memberid\n $query->select('MemberID');\n $query->from('members');\n $query->where('joomlauserid = '.$db->quote($userjoomlaid));\n \n $db->setQuery($query);\n \n $db->execute ();\n $memberid = $db->loadResult (); // now have member id\n \n return $memberid;\n }", "title": "" }, { "docid": "23480cf4f1f0b214209419771621485f", "score": "0.69734627", "text": "public final function getMemberId() {\n if (is_null($this->__member__id)) {\n $this->__member__id = uniqid();\n }\n return $this->__member__id;\n }", "title": "" }, { "docid": "dcb5b8b3596be515ed03e96794ce9b49", "score": "0.6710824", "text": "public function getMemberNumber()\n {\n return $this->memberNumber;\n }", "title": "" }, { "docid": "3cfdd962e18e65d2808293f5c255e74b", "score": "0.6657427", "text": "public function getMemberId()\n {\n return Hash::get($this->data, 'web_id');\n }", "title": "" }, { "docid": "7ee6b19f698409556909e08847427154", "score": "0.6565895", "text": "public function MemberID($setTo = null)\n\t{\n\t\tif ($setTo) $this->MemberID = $setTo;\n\t\treturn $this->MemberID;\n\t}", "title": "" }, { "docid": "d3688390a8820157729374b127b52d2d", "score": "0.6394318", "text": "public function get_user_id()\n\t{\n\t\tif (empty($this->member))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn array($this->id, (int) $this->member->id);\n\t}", "title": "" }, { "docid": "f70a451c4b1d459f5463a8ec8c047b2c", "score": "0.63647753", "text": "public function getRecipientTokenId() \n {\n return $this->_fields['RecipientTokenId']['FieldValue'];\n }", "title": "" }, { "docid": "d906dfd1fe6d69681554e986dd5e3e33", "score": "0.6337717", "text": "public function mrow_id($r)\n {\n return $r['ID_MEMBER'];\n }", "title": "" }, { "docid": "ff53968e84c70cc30e0c732bf1a75f54", "score": "0.6326474", "text": "public function getMemberId($user_id)\n\t{\n\t\t$db = Factory::getDbo();\n\t\t\n\t\t$query = $db->getQuery(true);\n\t\t$query->select($db->qn('member_id'));\n\t\t$query->from($db->qn('#__tkdclub_members'));\n\t\t$query->where($db->qn('user_id') . ' = ' . (int) $user_id);\n\t\t\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadResult();\n\t}", "title": "" }, { "docid": "54a427d3002751c8788ad2d1f4d18ef9", "score": "0.63070035", "text": "public function getMember()\n {\n return $this->member;\n }", "title": "" }, { "docid": "6b8bdf65684f8d82bbb1bed5a0e59a33", "score": "0.6297151", "text": "function get_membership_id(){\n return $this->membership_id;\n }", "title": "" }, { "docid": "8546809c67ebddf9dd9ac3af00b3fc63", "score": "0.62910235", "text": "public function getMember()\n\t{\n\t\treturn $this->member;\n\t}", "title": "" }, { "docid": "271d6c7e40a210a719bbaa872c0ffa7a", "score": "0.62758887", "text": "Public function get_id_membre ()\n\t\t\t{\n\t\t\t\treturn $this-> id_membre;\n\t\t\t}", "title": "" }, { "docid": "f7810db11cb7ea3fee516bf01420b855", "score": "0.62137735", "text": "public function getMemberType()\n {\n return $this->_member_id_type;\n }", "title": "" }, { "docid": "f60c7e8060a13f2d616a22516366302c", "score": "0.6213741", "text": "public function getPdcMemberId()\n {\n return $this->pdc_member_id;\n }", "title": "" }, { "docid": "46bb559914560a22c2dad900d73e7467", "score": "0.6211574", "text": "function mpt_get_current_member() {\n\treturn MPT_Member_Auth::get_current_member();\n}", "title": "" }, { "docid": "9eb85e029090dc46c1061d81a0e55f5c", "score": "0.61747414", "text": "function get_member_id($id_costumer)\n\t\t{\n\t\t\t$query = $this->db->get_where('tb_costumer', array('id_costumer' => $id_costumer,'kode_kantor' => $this->session->userdata('ses_kode_kantor') ));\n\t\t\tif($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\treturn $query->row();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b4bd3f7dd3c3ab396ef2ef15864a3ea5", "score": "0.6167235", "text": "public function getTargetMember()\n {\n $tempid = $this->getRequest()->requestVar( 'tempid' );\n if ( $tempid ) {\n return Member::member_from_tempid( $tempid );\n }\n \n return null;\n }", "title": "" }, { "docid": "bb8f4ae9741fd4e23ebb16e454f3ae7a", "score": "0.61025524", "text": "function get_member( $member_id ) {\r\n global $wpdb;\r\n $member = $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$this->tb_prefix}enewsletter_members WHERE member_id = %d\", $member_id ), \"ARRAY_A\" );\r\n\r\n $member['member_nicename'] = $member['member_fname'];\r\n $member['member_nicename'] .= $member['member_lname'] ? ' ' . $member['member_lname'] : '';\r\n\r\n if ( $member['member_info'] ) {\r\n $member = array_merge ( $member, unserialize( $member['member_info'] ) );\r\n unset( $member['member_info'] );\r\n }\r\n\r\n $member['count_sent'] = $this->get_count_sent_to_user( $member_id );\r\n $member['count_opened'] = $this->get_count_opened_by_user( $member_id );\r\n\r\n return $member;\r\n }", "title": "" }, { "docid": "3afe5b8ab6e22fb2e9ae74453627d5fc", "score": "0.60983366", "text": "public function setTmmemberId($tmmember_id)\n {\n $this->tmmember_id = $tmmember_id;\n\n return $this;\n }", "title": "" }, { "docid": "e1776d0047396f9ad0e3180df3301297", "score": "0.60958374", "text": "public function get_next_member($member)\n {\n $tempid = $this->connection->query_value_if_there('SELECT ID_MEMBER FROM ' . $this->connection->get_table_prefix() . 'members WHERE ID_MEMBER>' . strval($member) . ' ORDER BY ID_MEMBER');\n return $tempid;\n }", "title": "" }, { "docid": "5fcbae2ef0b4d84554d5ec6e5b925ddd", "score": "0.60747796", "text": "function getPersonID()\n {\n return $this->getValueByFieldName('person_id');\n }", "title": "" }, { "docid": "50d0b2742f1684f6106a144bbf83480d", "score": "0.606496", "text": "function get_memberdata( $member_id ) {\n\treturn get_member_by( 'id', $member_id );\n}", "title": "" }, { "docid": "097bd4cc6b491d6864f17a71205770f9", "score": "0.60567653", "text": "protected function _getUserID() {\n\t\treturn $this->_getLoggedInMemberId();\n\t}", "title": "" }, { "docid": "467407e5fa3e564b84627e6439841e84", "score": "0.60461384", "text": "public function getMemberID(){\n\t\t$items= 'COL';\n\t\t$stmt = $this->sql->Execute($this->sql->Prepare(\"SELECT MEM_GENID FROM webmin_membership ORDER BY MEM_ID DESC LIMIT 1 \"));\n\t\tprint $this->sql->ErrorMsg();\n\n\t\tif($stmt->RecordCount() > 0){\n\t\t\t$obj = $stmt->FetchNextObject();\n\t\t\t$order = substr($obj->MEM_GENID,3,10000);\n\t\t\t$order = $order + 1;\n\t\t\tif(strlen($order) == 1){\n\t\t\t\t$orderno = $items.'000'.$order;\n\t\t\t}else if(strlen($order) == 2){\n\t\t\t\t$orderno = $items.'00'.$order;\n\t\t\t}else if(strlen($order) == 3){\n\t\t\t\t$orderno = $items.'0'.$order;\n\t\t\t}else{\n\t\t\t\t$orderno = $items.$order;\n\t\t\t}\n\t\t}else{\n\t\t\t$orderno = $items.'0001';\n\t\t}\n\t}", "title": "" }, { "docid": "b50bbcf5a9a6bafa82d35dca781ffa80", "score": "0.60377526", "text": "function getMemberTel(){\n return $this->memberTel; \n }", "title": "" }, { "docid": "30027044986031ced2f2977f06dc273b", "score": "0.60171306", "text": "function plup_validate_member_id() { return TRUE; }", "title": "" }, { "docid": "4116d4b2859975ca544ba5cb3e8ea33e", "score": "0.59684575", "text": "function get_related_member_id( $pid ) {\n\t$mid = get_post_meta( $pid, '_related_members', true );\n\tif ( empty( $mid ) ) {\n\t\treturn false;\n\t}\n\n\t$member = get_post( $mid );\n\tif ( $member instanceof WP_Post && 'publish' == $member->post_status ) {\n\t\treturn intval( $mid );\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "73e9bc2fc65d45a667f46c50581af94c", "score": "0.595135", "text": "public function getTmid()\n {\n return $this->get(self::TMID);\n }", "title": "" }, { "docid": "449fa1fb8306d5b8aaecaf50e6295a77", "score": "0.5920623", "text": "public function getTokenMember()\n {\n $alias = new Alias();\n $alias->setType(Alias\\Type::DOMAIN)\n ->setValue('token.io')\n ->setRealm('token');\n\n $memberId = $this->getMemberId($alias);\n if ($memberId == null) {\n return null;\n }\n\n return $this->getMember($memberId);\n }", "title": "" }, { "docid": "a76a973cc742d9023be554e7b1054a69", "score": "0.5913885", "text": "function get_member()\n\t{\n\t\t$member = array( 'id' => 0 );\n\n\t\t$this->loginkey = $this->check_md5( $this->ipsclass->input['loginkey'] );\n\t\t$this->securekey = $this->check_md5( $this->ipsclass->input['securekey'] );\n\t\t$this->member_id = trim(intval($this->ipsclass->input['mid'] ) );\n\n\t\tif ( ! $this->loginkey or ! $this->securekey )\n\t\t{\n\t\t\treturn $member;\n\t\t}\n\n\t\t$this->ipsclass->DB->query( \"SELECT m.*, g.* FROM ibf_members m\n\t\t\t\t\t LEFT JOIN ibf_groups g ON ( m.mgroup=g.g_id )\n\t\t\t\t\t WHERE member_login_key='{$this->loginkey}' and id='{$this->member_id}'\" );\n\n\t\t$member = $this->ipsclass->DB->fetch_row();\n\n\t\treturn $member;\n\t}", "title": "" }, { "docid": "a08c22e8d6d94d0f48cc2df628373a94", "score": "0.5871106", "text": "public function getMemberStateId() {\r\n\t\t\treturn $this->_intMemberStateId;\r\n\t\t}", "title": "" }, { "docid": "b4444e706590341a198c8e7a34208e0e", "score": "0.5870065", "text": "public function getLastMemberId(){\n $sql = 'SELECT MAX(id_member) as id_member\n FROM '._DB_PREFIX_.$this->nameTable;\n\n $data=$this->dao->query($sql);\n //var_dump($data);\n\n return $data->fetchAll(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "e6fcb32e97830c22921beca0b166cdc5", "score": "0.584647", "text": "function ctxphc_get_current_member() {\n\tglobal $current_member;\n\n\tget_currentmemberinfo();\n\n\treturn $current_member;\n}", "title": "" }, { "docid": "63ad39c22e85f2a03e2a2bc1dafff6ed", "score": "0.58055645", "text": "public function match_member_password( $member_id ) {\r\n \r\n \r\n if( !empty($member_id)){\t\r\n\t\t$STM = $this->db->prepare(\"select member_password from team_members where member_user_id=?\");\r\n\t\t$STM->bindParam(1,$member_id);\t\t\r\n \r\n $STM->execute();\r\n\t\t$STM->setFetchMode(PDO::FETCH_ASSOC);\r\n\t\t$row = $STM->fetch();\t\r\n return $row;\r\n }\r\n\t \r\n \r\n \r\n }", "title": "" }, { "docid": "3bf900eec01b7b8adc4d45f89ce68955", "score": "0.57857907", "text": "function funValMemberID($int_member_id)\n{\n\t$obj_member = getMember($int_member_id);\n\t\n\tif( $obj_member->rowCount() != 1)\n\t{\n\t\treturn ' is required!';\n\t} else {\n\t\treturn 'good';\n\t}\n}", "title": "" }, { "docid": "62f5c7d8ca3317350b8baf33d643df1d", "score": "0.5763039", "text": "public function get_recipient_ID() {\n\t\treturn $this->get_data( 'user_id' );\n\t}", "title": "" }, { "docid": "477ca7442d36e9850d58ab058459317d", "score": "0.5755058", "text": "public function getPlayerStatisticTeamId() {\n\t\treturn ($this->playerStatisticTeamId);\n\t}", "title": "" }, { "docid": "6ed1796ace6f498c78b929d5a7c17307", "score": "0.57395756", "text": "function getMemberStatusId($link, $forum, $id){\r\n\t\t$query = \"SELECT member_status_id FROM {$forum}\";\r\n\t\t$query .= \" WHERE member_id={$id}\";\r\n\r\n\t\t$result = mysqli_query($link, $query);\r\n\t\thandleError($link, $result, \"Could not get the user status id\");\r\n\r\n\t\t$row = mysqli_fetch_assoc($result);\r\n\t\treturn $row[\"member_status_id\"];\r\n\t}", "title": "" }, { "docid": "a28489d13ed67e9162d8da77f3141ba4", "score": "0.57250226", "text": "function getMemberID($username)\r\n\t{\r\n\t\tif (is_numeric($username)) return $username ; \r\n\t\t$result = $this->singleLookup(\r\n\t\t\"\r\n\t\tSELECT `id` \r\n\t\tFROM `members`\r\n\t\tWHERE `Username` = '$username'\r\n\t\t\"\r\n\t\t);\r\n\t\tif (isset($result->id)) {\r\n\t\t\treturn($result->id) ;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn (-1) ;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a20348e4dbcddd92c15e0ea0935b4afa", "score": "0.56870925", "text": "function getMemberUsername(){\n return $this->memberUsername; \n }", "title": "" }, { "docid": "4866a63e98f1480e5e47f42aa0af371e", "score": "0.5684232", "text": "private function getMemberName($memberid){\n $em = $this->getDoctrine()->getManager();\n $connection = $em->getConnection();\n $statement = $connection->prepare(\"SELECT * FROM `member` WHERE id=:id\");\n $statement->bindParam(':id', $memberid);\n $statement->execute();\n $rows = $statement->fetchAll();\n if (!empty($rows)) {\n return $rows[0]['name'];\n } else {\n return \"Thành viên này không tồn tại.\";\n }\n }", "title": "" }, { "docid": "cc7e096053930890825d8c10b0490ee6", "score": "0.56777155", "text": "public function getUid()\n\t{\n\t\treturn $this->getField('uid');\n\t}", "title": "" }, { "docid": "a82d529e86546ec3aafe2a24b4b39199", "score": "0.56711954", "text": "public static function getQuestionIdOfMember($member_id)\r\n {\r\n $query = \" SELECT question_id\r\n FROM room_members\r\n WHERE room_member_id = '{$member_id}'\";\r\n $result = @mysql_query($query) or die('getQuestionIdOfMember() ' . mysql_error());\r\n return $result;\r\n }", "title": "" }, { "docid": "7c7efa44e2cdeeb496b2d4eaaff6f6cc", "score": "0.5666043", "text": "public function getMember();", "title": "" }, { "docid": "3a0281f0c9463ff844e20648cfd4db62", "score": "0.5655729", "text": "public function getUserTeamID() {\n return $this->clientHandle->get_user_team_id($this->session);\n }", "title": "" }, { "docid": "250a345f711c8c24ae1a3b9c689c4eb6", "score": "0.56545174", "text": "public function getMembre_id()\n {\n return $this->membre_id;\n }", "title": "" }, { "docid": "01220846df605c441c9abc33c69bedef", "score": "0.56236565", "text": "function uid() { return $this->userldaparray['uidNumber'];}", "title": "" }, { "docid": "72ff55b14d8f52109536dfba061dc544", "score": "0.5615286", "text": "public function get_team_id()\n {\n return $this->team_id;\n }", "title": "" }, { "docid": "74e97621ded02e2c066330ab62e9444e", "score": "0.56086063", "text": "public function getTeamID()\n {\n return $this->teamID;\n }", "title": "" }, { "docid": "0c85acaf48ddfaeaae3da10d5581a6ef", "score": "0.560723", "text": "public function getTeamId()\n {\n return $this->get('teamId', 0);\n }", "title": "" }, { "docid": "5910bce8b3694e48f6c3191b888cdf46", "score": "0.56065404", "text": "public function getMemberId($email) {\n try {\n $query = $this->cn->prepare(\"SELECT id FROM Members WHERE email = :email LIMIT 1 \");\n $query->bindColumn(':email', $email, PDO::PARAM_STR);\n $query->execute();\n return $query->fetchColumn(); \n } catch (Exception $exc) {\n echo $exc->getMessage();\n }\n }", "title": "" }, { "docid": "3c00d93943dd85280a2896eb458e1a02", "score": "0.5591056", "text": "public function getMember($member_id = NULL, $email = NULL, $token = NULL, $status = NULL) {\n\t\t$sql = \"\n\t\tSELECT id, email, password, token, status, last_login, creation_timestamp, modified_timestamp \n\t\tFROM tbl_member \n\t\tWHERE status != \".GBL_PUBLISH_STATUS_DELETE.\" \";\n\t\t$sql .= $member_id ? \"AND id = \".$member_id.\" \" : NULL;\n\t\t$sql .= $email ? \"AND email = '\".$email.\"' \" : NULL;\n\t\t$sql .= $token ? \"AND token = '\".$token.\"' \" : NULL;\n\t\t$sql .= $status ? \"AND status = '\".$status.\"' \" : NULL;\n\t\tif($result = $this->Execute($sql)) {\n\t\t\t$member = $result->FetchRow();\n\t\t\treturn $member;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4127e95dbfab4bedbbad7d02502994fd", "score": "0.5577326", "text": "public function getId() : ?string { return $this->m_id; }", "title": "" }, { "docid": "32257661721868f8f426fdb15fab24cb", "score": "0.5565496", "text": "public function getStaffMemberIds()\n {\n if (array_key_exists(\"staffMemberIds\", $this->_propDict)) {\n return $this->_propDict[\"staffMemberIds\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4683969492c1f010c7414549ffbd820a", "score": "0.55574435", "text": "public function get_previous_member($member)\n {\n $tempid = $this->connection->query_value_if_there('SELECT ID_MEMBER FROM ' . $this->connection->get_table_prefix() . 'members WHERE ID_MEMBER<' . strval($member) . ' ORDER BY ID_MEMBER DESC');\n return $tempid;\n }", "title": "" }, { "docid": "928409389dde9d9df92645758eadcaf3", "score": "0.55508757", "text": "public function getTempMember()\n {\n return $this->_tempMember[$this->getWorkingLevel()];\n }", "title": "" }, { "docid": "6a81d76ce14b7c0d4323a369202fd060", "score": "0.55465996", "text": "public function getActorId()\n {\n return $this->actor_id;\n }", "title": "" }, { "docid": "6a81d76ce14b7c0d4323a369202fd060", "score": "0.55465996", "text": "public function getActorId()\n {\n return $this->actor_id;\n }", "title": "" }, { "docid": "2495b4be6d1875b829e54b276344b7dc", "score": "0.5540969", "text": "protected function _lenauth_get_fieldid() {\n global $DB;\n return $this->_field_shortname ? $DB->get_field( 'user_info_field', 'id', array( 'shortname' => $this->_field_shortname ) ) : false;\n }", "title": "" }, { "docid": "9689fedf9bc9e535883794f53a9179ed", "score": "0.55228674", "text": "public function getTokenId(){\n\t\treturn $this->tokenId;\n\t}", "title": "" }, { "docid": "0e3fa6542c7393c1f34d4443a711df68", "score": "0.5519468", "text": "function getMemberPositon(){\n return $this->memberPositon; \n }", "title": "" }, { "docid": "bd7ae89713d12bad8f77a03638827889", "score": "0.55193377", "text": "public function getTeamId()\n {\n return $this->team_id;\n }", "title": "" }, { "docid": "adfea1d07fecbabf6a7dc255a59e46f1", "score": "0.55171293", "text": "public function GetMemberID(SimpleMemberStruct $SimpleMemberStructIn)\n {\n return $this->__soapCall('GetMemberID', array($SimpleMemberStructIn));\n }", "title": "" }, { "docid": "c521da41c1c0200e2c2e65a9f3e31a9e", "score": "0.55162823", "text": "protected function memberListField() {\n\t\treturn $this->objectField('Member');\n\t}", "title": "" }, { "docid": "c813d5485e41f3103ab1f0353c2fb33d", "score": "0.55090415", "text": "public function userInfo($member_id)\n\t{\n\t\t$queryForSelect = \"SELECT * FROM fully_regitered_members WHERE member_id = ?\";\n\t\t $sqlForSelect = $this->conn->prepare($queryForSelect);\n\t\t $sqlForSelect->execute([$member_id]);\t\t \n\t\t\t$res = $sqlForSelect->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t\tif ($res) {\n\t\t\t\t\n\t\t\t\treturn $res;\n\t\t\t}\n\t\t\t\t\n\t}", "title": "" }, { "docid": "82e6f5bcbc1da0e6095e22791e984733", "score": "0.5496552", "text": "public function getWorkSpaceMembersId()\r\n\r\n\t{\r\n\r\n\t\treturn $this->workSpaceMembersId;\r\n\r\n \t}", "title": "" }, { "docid": "e324c3a05a20df97188c6ee90cf45317", "score": "0.54958737", "text": "public function getActorID()\n {\n return $this->actorID;\n }", "title": "" }, { "docid": "6ae9174f52091da737539fd3c6cb41cc", "score": "0.54911804", "text": "function get_member ($member_id)\n {\n global $connection;\n // Expose additional parameters as they become needed.\n $selected_fields = array (\n // 'member_id', <------ don't use this (you already know it)\n 'pending',\n 'username',\n 'password',\n 'auth_type',\n 'business_name',\n 'preferred_name',\n // 'last_name',\n // 'first_name',\n // 'last_name_2',\n // 'first_name_2',\n // 'no_postal_mail',\n // 'address_line1',\n // 'address_line2',\n // 'city',\n // 'state',\n // 'zip',\n // 'county',\n // 'work_address_line1',\n // 'work_address_line2',\n // 'work_city',\n // 'work_state',\n // 'work_zip',\n // 'email_address',\n // 'email_address_2',\n // 'home_phone',\n // 'work_phone',\n // 'mobile_phone',\n // 'fax',\n // 'toll_free',\n // 'home_page',\n 'membership_type_id',\n 'membership_date',\n 'last_renewal_date',\n 'membership_discontinued',\n 'mem_taxexempt',\n 'mem_delch_discount',\n // 'how_heard_id',\n 'notes',\n // ------------------------- THE FOLLOWING ARE FROM THE membership_types TABLE\n // 'membership_type_id',\n // 'set_auth_type',\n 'order_cost',\n 'order_cost_type',\n // 'membership_class',\n // 'membership_description',\n // 'pending',\n // 'enabled_type',\n // 'may_convert_to',\n // 'renew_cost',\n // 'expire_after',\n // 'expire_type',\n // 'expire_message\n );\n $query = '\n SELECT\n '.implode (\",\\n \", $selected_fields).'\n FROM '.TABLE_MEMBER.'\n LEFT JOIN '.TABLE_MEMBERSHIP_TYPES.' USING(membership_type_id)\n WHERE\n member_id = \"'.mysql_real_escape_string ($member_id).'\"';\n $result = mysql_query($query, $connection) or die(debug_print (\"ERROR: 740293 \", array ($query,mysql_error()), basename(__FILE__).' LINE '.__LINE__));\n if ($row = mysql_fetch_array($result))\n {\n return ($row);\n }\n }", "title": "" }, { "docid": "6c9f71ac1f50cca22f650faae0c62b20", "score": "0.5490306", "text": "public function getTeamId()\n {\n return $this->teamId;\n }", "title": "" }, { "docid": "3d736fea17a34535d66ad6dea6516438", "score": "0.54868597", "text": "public function getSenderTokenId() \n {\n return $this->_fields['SenderTokenId']['FieldValue'];\n }", "title": "" }, { "docid": "bf3b65752474478505d7db9a205a01bf", "score": "0.54810953", "text": "public function getIDField()\n {\n return $this->_objField;\n }", "title": "" }, { "docid": "72f1c4c46953118764e84d4f42225547", "score": "0.54808986", "text": "public function getTokenId()\n {\n return $this->token_id;\n }", "title": "" }, { "docid": "3af3735f58f605b04c91870ec1f5ee87", "score": "0.5469917", "text": "public function login_member(){\n $query = \"select id_member from member where email = '$this->email' and password = '$this->password' and level = 1\";\n $data = $this->db->query($query);\n return $data->num_rows() > 0 ? $data->row() : null;\n }", "title": "" }, { "docid": "b9151cb4c67fc48d7714b5488a0ff23c", "score": "0.54694265", "text": "public function getSingleMemberID(string $email) {\n $sql = \"SELECT member_id FROM member \n WHERE email = ?\";\n $stmt = $this->getConnection()->prepare($sql);\n $stmt->bind_param('s', $email);\n $stmt->execute();\n $result = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n return $result['member_id'];\n }", "title": "" }, { "docid": "fdb14c4dae3f516695e16aa9881094c7", "score": "0.54613304", "text": "public function get_uid() {\n return $this->uid;\n }", "title": "" }, { "docid": "a5c2b16836d1dc44eb97b7c6af70902b", "score": "0.5454404", "text": "public function getMembershipPart()\n {\n $auth = \\XLite\\Core\\Auth::getInstance();\n\n if (!$auth->isLogged()) {\n return null;\n }\n\n $profile = $auth->getProfile();\n\n return $profile->getMembership() ? $profile->getMembership()->getMembershipId() : null;\n }", "title": "" }, { "docid": "0771e3c211594a8bc1a682c1dc44e2f6", "score": "0.5454176", "text": "function warquest_db_member_pid($username, $password) {\r\n\t\r\n\t$pid=0;\r\n\t$query = 'select pid from member where username=\"'.$username.'\" and password=\"'.md5($password).'\"';\t\r\n\t$result = warquest_db_query($query);\r\n\t\r\n\t$data=warquest_db_fetch_object($result);\r\n\tif (isset($data->pid)) {\r\n\t\t$pid = $data->pid;\r\n\t}\r\n\treturn $pid;\r\n}", "title": "" }, { "docid": "bcdaeba312eb58a2bdf1a449234ccc15", "score": "0.54491365", "text": "function get_mentor_id()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_MENTOR_ID);\r\n }", "title": "" }, { "docid": "1f75e0934dd133c3a316a8dfddad20d4", "score": "0.5445274", "text": "function getVictimID()\n {\n if(!isset($this->victimid)) $this->execQuery();\n return $this->victimid;\n }", "title": "" }, { "docid": "43c56fc51e56750a5cfc96212bd52c67", "score": "0.54332876", "text": "public function getPersonId()\n {\n return $this->person_id;\n }", "title": "" }, { "docid": "deda42286e761dc050d621bd4f5c6e1d", "score": "0.54328984", "text": "public function get_custom_profile_field_id()\n\t{\n\t\t$sql = 'SELECT field_id\n\t\t\tFROM ' . PROFILE_FIELDS_TABLE . \"\n\t\t\tWHERE field_name = '\" . $this->profilefield_name . \"'\";\n\t\t$result = $this->db->sql_query($sql);\n\t\t$field_id = (int) $this->db->sql_fetchfield('field_id');\n\t\t$this->db->sql_freeresult($result);\n\n\t\treturn $field_id;\n\t}", "title": "" }, { "docid": "feb6e9c46c795f89a70bf1f591771ae2", "score": "0.5426861", "text": "public function generateMemberRECID()\n\t{\n\t\t$queryMember = $this->api->getGeneralList('g_member');\n\n\t\tforeach ($queryMember->result() as $members) {\n\n\t\t\t$randomSalt = md5(uniqid(rand(), true));\n\t\t\t$salt = substr($randomSalt, 0, 10);\n\n\t\t\t$queryUpdate = array(\n\t\t\t\t'REC_ID' => $salt\n\t\t\t);\n\n\t\t\t$queryUpdateMember = $this->api->updateGeneralData('g_member', 'ID', $members->ID, $queryUpdate);\n\t\t}\n\n\t\techo $queryUpdateMember;\n\t}", "title": "" }, { "docid": "eb12042e36e081c2d00779f23d667a86", "score": "0.54233336", "text": "public function getID()\r\n\t{\r\n\t\treturn $this->user_id;\r\n\t}", "title": "" }, { "docid": "3ffa6dac967d95a4558df30eba95bec4", "score": "0.54199934", "text": "public function getTeamId() {\r\n return $this->teamId;\r\n }", "title": "" }, { "docid": "8e018bde593df65338aceff0c7d50362", "score": "0.541871", "text": "public function getId()\n {\n return TeamId::fromString($this->id);\n }", "title": "" }, { "docid": "800f1cd55d89e3000e7168b11b87398e", "score": "0.54183686", "text": "function getPrimaryMemberId()\n {\n return is_null($this->_iPrimaryMemberId) ? NULL : (int) $this->_iPrimaryMemberId;\n }", "title": "" }, { "docid": "a2c21bdd14dc04634a96810e121a1399", "score": "0.5413776", "text": "public function getTeamId() {\r\n\t\treturn $this->teamId;\r\n\t}", "title": "" }, { "docid": "1493b16437d80391069adbb16f2deedb", "score": "0.5403486", "text": "function getId() {\n return $this->getFieldValue('id');\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "7409771d720600607923d5e9ca5b3d22", "score": "0.0", "text": "public function index()\n {\n return view('projects.index', ['projects' => Project::latest()->paginate()]);\n }", "title": "" } ]
[ { "docid": "401f14dad055920ac5aa27d774922113", "score": "0.7704874", "text": "public function index() {\n $resource_info = $this->Resources->find('all');\n\n $this->set('resource_info', $this->paginate($resource_info));\n }", "title": "" }, { "docid": "aaad0bca56bcca6a005037e0278b1ae4", "score": "0.75253195", "text": "public function index() {\n\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\n\t}", "title": "" }, { "docid": "5d3b04082e8a634586a1ed8f8cdb546c", "score": "0.74725807", "text": "public function listAction()\n {\n $this->render('listPage');\n }", "title": "" }, { "docid": "6d93e4dca95df8ed0c7b3b8b2657ffd6", "score": "0.7455782", "text": "public function listAction()\n {\n $this->_initAction();\n $this->renderLayout();\n }", "title": "" }, { "docid": "5683700221387a4648da639ad72101ea", "score": "0.7411398", "text": "public function listAction()\n {\n Pi::service('authentication')->requireLogin();\n\n // Get info\n $module = $this->params('module');\n\n // Get Module Config\n $config = Pi::service('registry')->config->read($module);\n\n // Get record list\n $uid = Pi::user()->getId();\n $records = Pi::api('record', 'forms')->getRecordList($uid);\n\n // Set template\n $this->view()->setTemplate('archive-list');\n $this->view()->assign('config', $config);\n $this->view()->assign('records', $records);\n }", "title": "" }, { "docid": "1600316acdacf01cc93550ae2e9a85af", "score": "0.7193138", "text": "public function indexAction()\n {\n $objects = $this->getRepository()->findAll();\n\n return $this->render($this->getResource()->getTemplate('index'), array(\n 'objects' => $objects,\n 'resource' => $this->getResource()\n ));\n }", "title": "" }, { "docid": "883e2a9c193b1ec54d21d41093f06c70", "score": "0.7133651", "text": "public function listAction() {\n\t\t\n\t\t$this->init();\n\n\t\tif(!$this->id) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\t\t$fileFactory = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceFactory');\n\n\t\t$file = $fileFactory->retrieveFileOrFolderObject($this->id);\n\t\t\n\t\tif ($file instanceof \\TYPO3\\CMS\\Core\\Resource\\Folder) {\n\t\t\t$this->redirect('listFolder');\n\t\t}\n\n\t\tif (!($file instanceof \\TYPO3\\CMS\\Core\\Resource\\File)) {\n\t\t\t$this->view->assign('intro', true);\n\t\t\treturn;\n\t\t}\n\n\t\t$processedFiles = $this->getProcessedFilesForFile($file);\n \n\t\t$this->view->assign('file', $file);\n\t\t$this->view->assign('processedFiles', $processedFiles);\n\t}", "title": "" }, { "docid": "735397dbae5dd6de4a32f9ab46c8479f", "score": "0.7097046", "text": "public function index()\n\t{\n\t\t$resources = $this->resourcesRepository->paginate(100);\n\n\t\treturn view('resources.index')\n\t\t\t->with('resources', $resources);\n\t}", "title": "" }, { "docid": "fec316528723462375530f41e571b4fe", "score": "0.704424", "text": "public function listing()\n\t{\n\t\tglobal $admin, $user; // Superglobales\n\n\t\tif($admin)\n\t\t{\n\t\t\t$pageTwig = 'users/listing.html.twig'; // Chemin de la View\n\t\t\t$template = $this->twig->load($pageTwig); // chargement de la View\n\n\t\t\t$result = $this->model->getAllUsers(); // Retourne la liste de tous les utilisateurs\n\n\t\t\techo $template->render([\"url\" => $_SERVER['REQUEST_URI'], \"result\" => $result, \"admin\" => $admin, \"user\" => $user]); // Affiche la view et passe les données en paramêtres\n\t\t}\n\t}", "title": "" }, { "docid": "027627f1e20a0806fbdf50a2ba14c78c", "score": "0.70438755", "text": "public function show()\n {\n $params = $this->getProjectFilters('listing', 'show');\n $query = $this->taskFilter->search($params['filters']['search'])->filterByProject($params['project']['id'])->getQuery();\n\n $paginator = $this->paginator\n ->setUrl('listing', 'show', array('project_id' => $params['project']['id']))\n ->setMax(30)\n ->setOrder(TaskModel::TABLE.'.id')\n ->setDirection('DESC')\n ->setQuery($query)\n ->calculate();\n\n $this->response->html($this->helper->layout->app('listing/show', $params + array(\n 'paginator' => $paginator,\n 'categories_list' => $this->category->getList($params['project']['id'], false),\n 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),\n 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),\n )));\n }", "title": "" }, { "docid": "d293f3fdec60349ef0877e91df4a099b", "score": "0.70241606", "text": "public function index()\n {\n $resources = Resources::orderBy('id', 'desc')->get();\n return view('Backend/Resources/viewResource', compact('resources'));\n }", "title": "" }, { "docid": "dab649efb652b22919255920aff18021", "score": "0.69978404", "text": "public function index()\n\t{\n\t\t$data['listing'] = Listing::paginate(15);\n\n\t\treturn view('admin.listing', $data);\n\t}", "title": "" }, { "docid": "fb266928c00d205f35924b707dcdadf4", "score": "0.6995689", "text": "public function listAction() {\n // Check if the item exists\n $id = $this->getParam('id');\n $item = get_record_by_id('Item', $id);\n if (!$item) {\n throw new Omeka_Controller_Exception_404;\n }\n // Respond with JSON\n try {\n $jsonData = IiifItems_Util_Annotation::buildList($item);\n $this->__respondWithJson($jsonData);\n } catch (Exception $e) {\n $this->__respondWithJson(array(\n 'message' => $e->getMessage()\n ), 500);\n }\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "f20bd0e93af1502c691a240521847e9d", "score": "0.6946605", "text": "public function index() {\n $resources = $this->resources;\n $this->set(array('resources' => $resources, '_serialize' => 'resources'));\n }", "title": "" }, { "docid": "6803a23af3bc653e90735ffd2b2ed35f", "score": "0.6941913", "text": "public function index()\n {\n\n $resource = (new AclResource())->AclResource;\n\n return view('Admin.acl.resource.index')->withResource($resource);\n }", "title": "" }, { "docid": "924e51ba82c2eab34f48f3bbfecb5197", "score": "0.692225", "text": "public function index()\n {\n return view('resources.index', [\n 'resources' => Resource::orderBy('id', 'DESC')->get()\n ]);\n }", "title": "" }, { "docid": "f7e7cbb28c97549abd73fed7818403a4", "score": "0.6920865", "text": "public function list()\n {\n return $this->Get('list');\n }", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "f0fa2690ffaab13556ebf9f8ee023468", "score": "0.6886966", "text": "public function listing()\n {\n // solo permite mostrar listado de TODOS los productos al administrador\n // si no es admin, redireccion a la lista de productos disponibles\n if (!$this->isAdmin())\n $this->redirect(\"product\", \"available\");\n\n $products = \\models\\Product::findBy(null);\n\n // se le pasa el listado a la vista y se renderiza\n $this->view->assign(\"list\", $products);\n $this->view->render(\"product_list\");\n }", "title": "" }, { "docid": "1cacb33ba12b36b95c20025febdd4b33", "score": "0.68812966", "text": "public function index()\n {\n // atau saat membuka page lain pada pagination\n $this->list();\n }", "title": "" }, { "docid": "3a0850cc56c832a1affe3d6906e36183", "score": "0.68409985", "text": "public function listAction()\n {\n return $this->render('MesdHelpWikiBundle:Default:list.html.twig', array());\n }", "title": "" }, { "docid": "7de268658a226bfb1078da5310cd732b", "score": "0.6829061", "text": "public function index()\n {\n $showData = Input::has('showData') ? (bool) Input::get('showData') : false;\n\n if ($showData === true) {\n $this->setTransformerFilters();\n }\n\n $limit = Input::has('limit') ? Input::get('limit') : 10000;\n\n\n // handle search\n if (Input::has('q')) {\n\n $resources = $this->service->search(\n Input::get('q'),\n $limit,\n $showData\n );\n\n return $this->respondWithCollection($resources,\n $showData === true ? $this->transformer : new ListTransformer());\n } else {\n return $this->respondWithCollection($this->service->showList($limit, $showData),\n $showData === true ? $this->transformer : new ListTransformer());\n }\n }", "title": "" }, { "docid": "d46bb32faa9e8a7d477db9cdd1aa50f0", "score": "0.6800859", "text": "public function index()\n {\n // Add a record\n// $obj = Resource::create([\n// 'seq'=>1.0,\n// 'name'=>'My image',\n// 'description'=>'My special image',\n// 'type'=>'IMAGE',\n// 'url'=>'',\n// 'status'=>'ACTIVE',\n// 'image'=>'chalky.jpg',\n// 'thumb'=>'chalky.jpg',\n// 'created_at'=>'2015-10-20 21:30:13',\n// 'updated_at'=>'2015-10-20 21:30:13'\n// ]);\n// $obj->save();\n\n $resources = Resource::all();\n\n // This would return json, as if for a basic API\n// return $resources;\n\n // Here we rely on a template to format the data\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "db4daec9f8d8cd89f2cb81ded0d0e9ea", "score": "0.68007904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->memberRepository->all();\n }\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->getListView(), $this->data);\n }", "title": "" }, { "docid": "a8dcf059f191629c6258ae65433dac79", "score": "0.68005747", "text": "public function index()\n {\n //Grab all listings - with a descending sort by create timestamp.\n $listings = Listing::orderBy('created_at', 'desc')->get();\n\n //Return view with listings data.\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "01e703b1d51958083a171c504a5fbe86", "score": "0.67932504", "text": "public function list()\n {\n // ...\n }", "title": "" }, { "docid": "8f780116288779687a52681d9b84a0ef", "score": "0.6789059", "text": "public function listAction()\n {\n $all = $this->users->findAll();\n $table = $this->createTable($all);\n\n $this->theme->setTitle(\"Användare\");\n $this->views->add('users/index', ['content' => $table, 'title' => \"Användare\"], 'main-wide');\n }", "title": "" }, { "docid": "fd7b1f8fd083bf003bd937783f973341", "score": "0.6786347", "text": "public function index() {\n\t\t/// Displaying all items from the database\n\t\t$list = Item::findAll();\n\t\t$list[\"title\"] = \"All items\";\n\t\t$this->render(\"index\", $list);\n\t}", "title": "" }, { "docid": "2581dc8a87e69733d9a5051a2ba197df", "score": "0.6784052", "text": "public function view_list();", "title": "" }, { "docid": "74f1d55e2353d3983fa09829081123b9", "score": "0.67709553", "text": "public function index()\n {\n // Get articles\n $articles = Article::latest()->paginate(5);\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "a127bb62f2b51cad9508439ded53e39b", "score": "0.67696005", "text": "public function index()\n {\n $tests = Test::all();\n return TestForListResource::collection($tests);\n }", "title": "" }, { "docid": "1e182d51ef856ffdebfbd850cf50bee9", "score": "0.67537886", "text": "public function index()\n {\n $result = Information::where('active', true)->orderby('id', 'DESC')->paginate(20);\n return InformationResource::collection($result);\n }", "title": "" }, { "docid": "3dac8ae8178b5ab6ec8f744af3d4b5bb", "score": "0.67486656", "text": "public function index()\n {\n $inventories = Inventory::orderBy('created_at', 'desc')->paginate($this->inventoriesInPage);\n return $this->renderOutputAdmin(\"inventories.list\", [\n \"inventories\" => $inventories\n ]);\n }", "title": "" }, { "docid": "0753ada8c8a122f6b6886e1cc84a5965", "score": "0.67384964", "text": "public function index()\n {\n $this->authorize('view', $this->resource->getModel());\n\n $this->data['collections'] = $this->resource->getRowsData();\n $this->data['attributes'] = $this->resource->getAttributes();\n\n return view('vellum::catalog', $this->data);\n }", "title": "" }, { "docid": "92224d4b1facc85c25b765eda1c899d2", "score": "0.6737816", "text": "public function actionIndex()\n {\n $searchModel = new ResourcesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "66c285f8944542cf7713edaba3a0ad2c", "score": "0.6725589", "text": "public function index()\n {\n $this->data['url_data'] = site_url($this->class_path_name.'/list_data');\n $this->data['add_url'] = site_url($this->class_path_name.'/add');\n $this->data['record_perpage'] = SHOW_RECORDS_DEFAULT;\n }", "title": "" }, { "docid": "80d12db260f6dfe4b5aceed4625f5855", "score": "0.6721976", "text": "public function listAction()\n {\n $this->_datatable();\n return $this->render('BackendBundle:Foodies:list.html.twig');\n }", "title": "" }, { "docid": "b26e0dccffef1f4b909a7cc8c4dffc74", "score": "0.67117697", "text": "public function listAction()\n\t{\n\t\tif ($this->_getParam('json')) {\n\t\t\t$this->listJsonAction();\n\t\t} else {\n\t\t\t$project = $this->projectService->getProject((int) $this->_getParam('projectid'));\n\t\t\t$this->view->features = $this->featureService->getProjectFeatures($project);\n\t\t\t$this->view->project = $project;\n\t\t\tif ($this->_getParam('_ajax')) {\n\t\t\t\t$this->renderRawView('feature/list.php');\n\t\t\t} else {\n\t\t\t\t$this->renderView('feature/list.php');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1b9ec8f3eb9fe45d7e52c09e49cd1f9d", "score": "0.67012614", "text": "public function index()\n {\n $offers = Offer::paginate(10);\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "190c6247941c857dd2767bd08ced001b", "score": "0.66836476", "text": "public function index()\n {\n $device_logs = DeviceLog::filter()->paginate();\n // $this->authorize('index', 'App\\DeviceLog'); // TODO: Policy\n\n return Resource::collection($device_logs);\n }", "title": "" }, { "docid": "9956226ca0d6a5a308e812db7aa3c8dd", "score": "0.6680364", "text": "public function index()\n {\n return view('listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "b4b19a0a264ba05f056ca1d352c15ab3", "score": "0.6679044", "text": "public function listAction() {\n\t\t$tags = $this->getTags();\n\t\t$this->view->assign('tags', $tags);\n\t}", "title": "" }, { "docid": "5d423b3e213eb36859bc854e0ea0821c", "score": "0.66765565", "text": "public function index()\n\t{\n\t\t$this->get();\n\t}", "title": "" }, { "docid": "962ec92f5da4e239f0963901dd679303", "score": "0.667593", "text": "public function list()\n {\n $this->checkLoginStatus('list');\n return new HtmlResponse();\n }", "title": "" }, { "docid": "f11e7dc71257fc35d626a4cc0df754c5", "score": "0.6671179", "text": "public function index()\n {\n $books = Book::paginate(10);\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "67da517f1e843dce244d42bf3c00c83c", "score": "0.66616595", "text": "public function index()\n {\n $resources = Resource::getResourcesByUserServiceProvider();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "d1469f07edbbe4ff69af75d8f005780f", "score": "0.6661017", "text": "public function index()\n {\n $listings = Listing::get();\n return view('pages.backend.listing.index', compact('listings'));\n }", "title": "" }, { "docid": "4972cd57158bca324de2cdc88e1141c7", "score": "0.6659724", "text": "public function index()\n {\n $specifier = Specifier::paginate();\n return SpecifierResource::collection($specifier);\n }", "title": "" }, { "docid": "cbfc53f61a9472895d3345b43532b0f6", "score": "0.6659596", "text": "public function actionList()\n {\n $searchModel = new IgualasSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // Se buscan también los servicios\n $serviciosModel = new \\app\\models\\ServiciosSearch(['activo'=>true]);\n $serviciosProvider = $serviciosModel->search(Yii::$app->request->queryParams);\n\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'serviciosProvider' => $serviciosProvider,\n ]);\n }", "title": "" }, { "docid": "ec7aa7b9d406ecdd3cbfb90dfff07cc9", "score": "0.66576624", "text": "public function index()\n {\n // Getting all the articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(6);\n\n // Return article collection as a resource\n return aResource::collection($articles);\n }", "title": "" }, { "docid": "348728c06ffc3f7f47ab7a2486701300", "score": "0.66531324", "text": "public function list()\n {\n return view('items.list');\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "3340a40aeb9ca6134a87997b56d911be", "score": "0.6645119", "text": "public function indexAction()\n {\n $item = new Item;\n $items = $item->getAll();\n View::renderTemplate('Home/index.html', ['items_list' => $items]);\n }", "title": "" }, { "docid": "e7a070ae572c193acb7a79ecc2d34f28", "score": "0.66418844", "text": "public function index()\n {\n // Get activities\n $activities = Activity::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of activities as a resource\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "ae0412e2b98e2acf1da43d334bdc55fa", "score": "0.6638416", "text": "public function index()\n\t{\n\t\t$datas = $this->model->where('cat_status', 'open')->orderBy('sort_order')->paginate(15);\n\t\treturn View::make($this->resourceView.'.index')->with(compact('datas'));\n\t}", "title": "" }, { "docid": "81e310e3464b83f2e25e4bb5406f1a35", "score": "0.663706", "text": "public function index()\n {\n $products = Product::latest()->paginate(10);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c7124181b330eb937c62f9defe1d9274", "score": "0.66361564", "text": "public function index()\n {\n return SectionResource::collection(SectionModel::paginate(25));\n }", "title": "" }, { "docid": "5b0d18ee7af036a0126d30b01aac4670", "score": "0.6635448", "text": "public function index( )\n\t{\t\n\t\tif(!\\Sentry::getUser()->hasAccess('manage_listings')){\n\t\t\treturn redirect()->action('AdminController@properties');\n\t\t}\n\n\t\t$listings= $this->listing->get();\n\t\t$website = $this->website->get();\n\t\treturn view('admin.listings', array('listings'=>$listings, 'websites'=>$website));\n\n\t}", "title": "" }, { "docid": "2e96526efb31162a0f4ca3bb61f781c5", "score": "0.66319674", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[0]['count'], $this->_pagination);\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "9fe55a7f3832e2905b2600e03b1356d2", "score": "0.6627155", "text": "public function index()\n\t{\n\t\tif (Input::get('list'))\t\treturn Response::json($this->model->getList(), 200);\n\t\telse \t\t\t\t\t\treturn Response::json($this->model->fetch(Input::all()), 200);\n\t}", "title": "" }, { "docid": "5438ea6951e01b2b0c5f44bd2895ba5d", "score": "0.6627067", "text": "public function index()\n {\n $listing = Listing::paginate(15);\n\n return view('listing.index', compact('listing'));\n }", "title": "" }, { "docid": "28c7c5fe8eff5e4f7e67018271a3970f", "score": "0.6621494", "text": "public function index()\n {\n //\n $resources = \\App\\Resource::all();\n return $resources;\n }", "title": "" }, { "docid": "7049b0be3d5ee96fe0213da94a5eabdc", "score": "0.66211265", "text": "public function list(): Response\n {\n $repository = $this->getDoctrine()->getRepository(ShowList::class);\n return $this->render('concert/concert.html.twig', [\n 'name' => \"list\",\n 'concerts' => $repository->findAll()\n ]\n );\n }", "title": "" }, { "docid": "de6e1eefbb1c8632afb33575e2d66697", "score": "0.66209346", "text": "public function index()\n {\n return BookListResource::collection(Book::all());\n // // return $author->books;\n }", "title": "" }, { "docid": "fb7ed7947ab536b91c04edc0db5a20e5", "score": "0.6608123", "text": "public function listAction()\n {\n $title = $this->t->_('List ') . $this->t->_($this->model_name);\n $this->tag->setTitle($title);\n $this->view->title = $title;\n\n $model = $this->getModel();\n\n if (is_null($model)) {\n $this->response->redirect('/admin/dashboard');\n }\n\n $query_urls = $this->request->getQuery();\n unset($query_urls['_url']);\n unset($query_urls['submit']);\n unset($query_urls['page']);\n\n // search\n $search_opt = $this->getFieldsSearch($query_urls, $model->list_view['fields']);\n $conditions = $search_opt['conditions'];\n $parameters = $search_opt['parameters'];\n // sort\n\n $list_data = $model::find(array(\n $conditions,\n 'bind' => $parameters\n ));\n\n // pagination\n $currentPage = $this->request->getQuery('page');\n $paginator_limit = 20; // @TODO\n $paginator = new PaginatorModel(array(\n \"data\" => $list_data,\n \"limit\" => $paginator_limit,\n \"page\" => $currentPage > 0 ? $currentPage : 1\n ));\n // get page\n $page = $paginator->getPaginate();\n\n $this->view->page = $page;\n $this->view->data = $page->items;\n $this->view->list_view = $model->list_view;\n $this->view->search = $query_urls;\n\n $controller = strtolower($this->controller_name);\n $action = strtolower($this->action_name);\n\n $this->view->controller = $controller;\n $this->view->action = $action;\n $this->view->action_detail = $this->action_detail;\n $this->view->action_edit = $this->action_edit;\n $this->view->action_delete = $this->action_delete;\n $this->view->menu = $model->menu;\n\n $query_urls = empty($query_urls) ? array('nosearch' => 1) : $query_urls;\n $this->view->current_url = $this->url->get(\"/admin/$controller/$action\", $query_urls);\n\n $exists = $this->view->exists($controller . '/' . $action);\n if (!$exists) {\n $this->view->pick('view_default/list');\n }\n }", "title": "" }, { "docid": "4075f3e85858e8eac990a25721c76630", "score": "0.66057074", "text": "public function index()\n {\n return $this->sendResponse( [\n \"items\"=> BookResource::collection(Book::all()->toArray())\n ],\n \"Books Retrieved successfully!\"\n );\n\n }", "title": "" }, { "docid": "f148c3920960427ce58f996986160dfa", "score": "0.6605562", "text": "public function index()\n { \n $articles = Article::latest()->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "5bd87f0ad66d0212e0bec36ece123e1e", "score": "0.6600455", "text": "public function index()\n {\n $user = Student::latest()->get();\n return $this->showAll(StudentResource::collection($user));\n }", "title": "" }, { "docid": "4815297dfe29adcb934ed5d6b8357ceb", "score": "0.65940166", "text": "public function index()\n\t{\n\t\t// // Check for list permission\n\t\t// if (! $this->model->mayList())\n\t\t// {\n\t\t// \treturn $this->user();\n\t\t// }\n\n\t\treturn $this->display();\n\t}", "title": "" }, { "docid": "a84c8d0a92b2e2efb69455a9790926e0", "score": "0.65936685", "text": "public function index()\n {\n return AulaResource::collection(Aula::paginate());\n }", "title": "" }, { "docid": "8395c06faebc6da915e86b24ff1c40b8", "score": "0.6591476", "text": "public function index()\n {\n //Get all articles, paginate function could be improved\n // $articles = Article::paginate(15);\n\n $articles = Article::get();\n //Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "6847e76913911cac71a85fa2835bf369", "score": "0.6583209", "text": "public function listAction()\n {\n $this->View()->assign($this->getAvailableStatuses());\n }", "title": "" }, { "docid": "244698ad57c10b2cf9bea875ed11f4e2", "score": "0.6582496", "text": "public function index()\n {\n return view('listing.index')->with([\n 'listings' => app('listings')->take(7),\n 'tags' => Tag::all(),\n ]);\n }", "title": "" }, { "docid": "965ff224495731f89e5a39ec8d28c56c", "score": "0.6580476", "text": "public function indexAction()\n\t{\n\t\t$paginator = $this->_getPaginator();\n\t\t$this->_configurePagination($paginator);\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\n\t\t$this->view->assign('records',$records);\n\n\t\t$this->configureView();\n\n\t\t$this->view->render('index.phtml');\n\t}", "title": "" }, { "docid": "5ae3dc8a0646433f9c872265b7fae9bb", "score": "0.6579524", "text": "public function index()\n {\n save_resource_url();\n $items = Document::with('documentable')->get();\n\n return $this->view('resources.documents.index')->with('items', $items);\n }", "title": "" }, { "docid": "f7f0617a1c3535ff5bd60dabc6ef0b2a", "score": "0.65772367", "text": "public function index()\n {\n $resources=Resource::orderBy('created_at','desc')->get();\n return view('admin.index',compact('resources'));\n }", "title": "" }, { "docid": "93c8e2fb25d358967a7239099ffa01be", "score": "0.6576169", "text": "public function actionList()\n {\n $model = new ImageList();\n\n $path = $model->getDataRequest('path');\n $imageList = $model->loadImage($path);\n\n return $this->render('list',compact('model','imageList','path'));\n }", "title": "" }, { "docid": "caa63ad0b7f03a52984cdbcc404b742e", "score": "0.6566202", "text": "public function listingAction()\n {\n $this->_helper->content->setNoRender()->setEnabled();\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\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->getListView(), $this->data);\n }", "title": "" }, { "docid": "d085389ae4d1b9ed456fd3f7f897fb44", "score": "0.65618056", "text": "public function index()\n {\n return ProjectListResource::collection(Project::paginate());\n }", "title": "" }, { "docid": "fb5cc939df880d31486688650542e9ef", "score": "0.6560243", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = EmisiCo2Tahunan::query();\n\n $query->when(request()->filled('tahun'), function ($query) {\n return $query->where('tahun', 'ILIKE', \"%\" . request()->query('tahun') . \"%\");\n });\n\n if(request()->has('provinsi')){\n $query->when(request()->filled('provinsi'), function ($query) {\n return $query->whereHas('Provinsi',function($q){\n return $q->where('nama_provinsi', 'ILIKE', \"%\" . request()->query('provinsi') . \"%\");\n });\n });\n }\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "d9aec54688559be15dcc145297ec98e9", "score": "0.6559387", "text": "public function index()\n {\n return view('backend.item.list_item');\n }", "title": "" }, { "docid": "e9a03ea28e2df914c978aa5c0d3a5637", "score": "0.6554056", "text": "public function index()\n {\n $options = $this->getQueryHelperOptions();\n $items = $this->repo->allPaged($options);\n\n if ( ! $items)\n {\n return $this->respondNotFound('Unable to fetch the selected resources');\n }\n\n $response = [\n 'data' => [],\n 'meta' => [\n 'pagination' => []\n ]\n ];\n\n $resource = new Fractal\\Resource\\Collection($items->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($items));\n\n $response['data'] = $this->fractal->createData($resource)->toArray()['data'];\n\n $paginator = new Fractal\\Pagination\\IlluminatePaginatorAdapter($items);\n\n $response['meta']['pagination'] = [\n 'total' => $paginator->getTotal(),\n 'count' => $paginator->count(),\n 'per_page' => $paginator->getPerPage(),\n 'current_page' => $paginator->getCurrentPage(),\n 'total_pages' => $paginator->getLastPage()\n ];\n\n return $response;\n }", "title": "" }, { "docid": "64c23385ebf3abebc1a7abc1fe27b69a", "score": "0.65517366", "text": "public function index()\n {\n return EntryResource::collection(Auth::user()->entries);\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "91ef4976872522e55ce7d21232db8ce3", "score": "0.6541719", "text": "public function getlist()\n {\n \t$specieses = Species::all();\n\n \treturn view( 'species.index-species' )->withSpecieses($specieses);\n }", "title": "" }, { "docid": "13e213cc4f2553888dd031c39274477f", "score": "0.65387595", "text": "public function index()\n {\n $objects = Thing::availableForCatalog()->paginate(40)->toJson();\n\n return view('web.pages.objects.index', compact('objects'));\n }", "title": "" }, { "docid": "7e319cde9d05f34fd876660ef419e5c1", "score": "0.6535465", "text": "public function index()\n {\n return CursoResource::collection(Curso::paginate());\n }", "title": "" }, { "docid": "80349a31fc145e69c11f76d6fe21f244", "score": "0.6525081", "text": "public function listAction($page)\n {\n $list = ApiDataSource::getList(!empty($page) ? $page : 1);\n\n if (!empty($list)) {\n try {\n echo TemplateEngine::get()->render(\n 'index.html.twig',\n array(\n \"shipList\" => !empty($list['results']) ? $list['results'] : null,\n \"currentPage\" => $page,\n \"totalPages\" => !empty($list['results']) && !empty($list['count']) ? ceil($list['count'] / Config::get()->getSection('api')['perPage']) : 0\n )\n );\n } catch (\\Exception $e) {\n Logger::get()->error($e->getMessage());\n header('HTTP/1.0 500 Internal server error');\n }\n } else {\n header('HTTP/1.0 404 Not Found');\n }\n }", "title": "" }, { "docid": "8db12a9417955f7cafd859a2f084db66", "score": "0.6524149", "text": "public function index()\n {\n $articles=$this->articleRepository->paginate(10);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "b02a86792172e9aa0d15ce71523bf18a", "score": "0.6522924", "text": "public function listAction()\n {\n $postManager = new PostManager();\n $posts = $postManager->getAllPosts();\n $this->render('Post/list.html.twig', ['posts' => $posts]);\n }", "title": "" }, { "docid": "3facf87d49c58736d719a1d9ceb098c4", "score": "0.6515679", "text": "public function index()\n {\n $halls = Hall::all();\n return HallResource::collection($halls);\n }", "title": "" }, { "docid": "5e65da9a34ee6f80605137959439b41c", "score": "0.6511205", "text": "public function index()\n {\n //\n return EmployeeResource::collection(Employee::latest()->paginate(5));\n }", "title": "" }, { "docid": "3f890ba095bdb75af4cc34f24821df21", "score": "0.651028", "text": "public function index()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resourceFields = json_encode(Otter::getAvailableFields($this->resource));\n\n return view('otter::pages.index', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields'));\n }", "title": "" }, { "docid": "1fa5cdf3237bc23c42125528d9db4212", "score": "0.650871", "text": "public function listAction()\n {\n $this->view->assign('posts', $this->findPosts());\n }", "title": "" }, { "docid": "c7253bf5ee3c82a3ec81a23e84bfc054", "score": "0.6507231", "text": "public function index()\n {\n return Response::custom('list', $this->service->all(), \\Illuminate\\Http\\Response::HTTP_OK);\n }", "title": "" }, { "docid": "16cbe42e288d6db09ecb33ee711d2c85", "score": "0.650502", "text": "public function index()\n {\n $items = Item::all();\n\n return response([\n 'items' => ItemResource::collection($items),\n 'message' => 'Retrieved successfully'\n ], 200);\n }", "title": "" }, { "docid": "9b9cf4a5c0a3cf48f806a2c95874afa6", "score": "0.6503013", "text": "public function index()\n {\n //\n if (\\Gate::allows('canView')) {\n $category = Category::latest()->paginate(10);\n return CategoryResource::collection($category);\n } else {\n return ['result' => 'error', 'message' => 'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4b682e76649352c45a12edca169568ff", "score": "0.65024114", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_Book_type->get_all();\n\t\t$this->template->set('title', 'Book Type List');\n\t\t$this->template->load('template', 'contents', 'book_type/book_type_list', $data);\n\t}", "title": "" }, { "docid": "12f45a4dbd72d90586e475e387aa5ee9", "score": "0.6500511", "text": "public function list()\n {\n // récupération de tous les users grâce à la méthode statique \"findAll()\"\n $users = User::findAll();\n\n // génération d'un token aléatoire\n // pour protéger la route\n $token = $this->generateCsrfToken();\n\n // définition du tableau de données $viewVars à passer à ma vue\n $viewVars = [\n 'users' => $users,\n 'token' => $token,\n ];\n\n // j'appelle ma méthode show qui va afficher le bon template\n // à qui je passe mon tableau de données viewVars\n $this->show('user/list', $viewVars);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "a454f06f4bf85996d4e9b4354c269c9e", "score": "0.0", "text": "public function deleteBrand($id)\n { \n if (isset($id)) {\n $name = Brand::find($id)->toArray();\n if (Brand::where('id', $id)->delete()) { \n return redirect()->back()\n ->with('deleted','Delete Brand '.$name['brand'].' successfully.');\n } else {\n return back()\n ->with('error','error.');\n }\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": "" } ]
10f29a80064a259772087bd9c9760512
Instantiate disk file storage.
[ { "docid": "5efe6c6db049dca0dc247a0c32c57b05", "score": "0.0", "text": "public function __construct(string $storageDirectory, string $appUrl, string $storageUri) {\n $this->storageDirectory = $storageDirectory;\n $this->appUrl = $appUrl;\n $this->storageUri = $storageUri;\n }", "title": "" } ]
[ { "docid": "9e7e556806900dc21b4d6e9eb9cc9bcc", "score": "0.72358096", "text": "protected static function diskStorage()\n {\n return resolve(DiskStorage::class)->setDiskName(static::diskName());\n }", "title": "" }, { "docid": "24a0c1642a1b8d83411748c21c8c45d7", "score": "0.715695", "text": "public function getDisk(): Filesystem;", "title": "" }, { "docid": "db4a6cb2260d1d0182c21eb76f629487", "score": "0.69240665", "text": "private function _createStorage()\n\t{\n\t\tif(!is_dir($this->_location)) {\n\t\t\tmkdir($this->_location, 0700);\n\t\t}\n\t\t\n\t\tif(!Zend_Registry::isRegistered('Util_Auth_Storage_File')) {\n\t\t\t$storage = $this->_member . '_' . md5(rand(1000,2000));\n\t\t\tZend_Registry::set('Util_Auth_Storage_File', $storage);\n\t\t}\n\t\t\n\t\t$this->_storage = $this->_location . '/' . Zend_Registry::get('Util_Auth_Storage_File');\n\t}", "title": "" }, { "docid": "6016ce22e2b32d137e26766d0c7f89f2", "score": "0.67464966", "text": "protected function createFileStorage()\n {\n return new Storage([\n 'awsKey' => $this->getAwsKey(),\n 'awsSecretKey' => $this->getAwsSecretKey(),\n ]);\n }", "title": "" }, { "docid": "6037de4355b430b7e30cf9785ffc1480", "score": "0.65893924", "text": "function filesystem() : Filesystem\n {\n return Dan::filesystem();\n }", "title": "" }, { "docid": "4ff141914f83e2530fde30ff86600ebe", "score": "0.6432896", "text": "public function __construct()\n\t{\n\t\trequire_once ISC_BASE_PATH.'/lib/class.datastore.disk.php';\n\t\t$this->handler = new ISC_DATA_STORE_DISK;\n\t\t$this->handler->Connect();\n\t}", "title": "" }, { "docid": "84652e8a9a285a50ce6942cceeddd7f7", "score": "0.64324033", "text": "public function createStorage()\r\n\t{\r\n\t\t$chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');\r\n\t\t$cacheFolder = Settings::get('appPath').'cache/stored/';\r\n\t\t\r\n\t\tmkdir($cacheFolder);\r\n\t\t\r\n\t\tforeach ($chars as $dir)\r\n\t\t{\r\n\t\t\tmkdir($cacheFolder.$dir, 0777);\r\n\t\t\r\n\t\t\tforeach($chars as $subDir)\r\n\t\t\t{\r\n\t\t\t\tmkdir($cacheFolder.$dir.'/'.$subDir, 0777);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "4e6b014bdc61961ccd93d251904ca702", "score": "0.6362624", "text": "public function setLocalAdapter()\n {\n return new Filesystem(new Local('./'));\n }", "title": "" }, { "docid": "0b58ac6ef046ac78e3d18a47efc71ba0", "score": "0.63613695", "text": "public function __construct()\n {\n $this->storageDir = sys_get_temp_dir();\n }", "title": "" }, { "docid": "a1419bd877848a588f40f82fd39b19eb", "score": "0.63498396", "text": "function filesystem()\n {\n return dan('filesystem');\n }", "title": "" }, { "docid": "2a623f710fa9d870a97533c3577e1022", "score": "0.6268742", "text": "public function run()\n {\n $this->storage = Storage::create([\n 'name' => $this->storageName,\n 'location' => $this->fullLocation,\n 'type' => $this->type,\n 'size' => $this->size,\n 'active' => False,\n 'initialized' => False\n ]);\n return $this->storage;\n }", "title": "" }, { "docid": "5a35bfce13127de8969ff326f251caea", "score": "0.62484545", "text": "protected function initStorageObjects() {\n\t\t\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->file = new ObjectStorage();\n\t\t\n\t}", "title": "" }, { "docid": "a9b8dc176c03fa7ce09bd7f2fa210ce8", "score": "0.62437934", "text": "public function system() : DiskSystemContract;", "title": "" }, { "docid": "1828c2cbee579365917feb3ee5170b55", "score": "0.6209794", "text": "static public function newStorageManager()\n {\n return new MazelabStorage_Model_StorageManager();\n }", "title": "" }, { "docid": "e09c113d681605236eaceebfca976b14", "score": "0.6203306", "text": "function __construct() {\n $paths = (array) @glob('/sys/block/*/device', GLOB_NOSORT);\n\n $drives = array();\n foreach ($paths as $path) {\n $parts = explode('/', $path);\n array_pop($parts); // throw away last part\n $drives[end($parts)] = implode('/', $parts);\n }\n\n\n /* --------------------------------------------------------------\n * Get partitions\n * -------------------------------------------------------------- */\n $partitions = array_slice(explode(\"\\n\", read('/proc/partitions')), 2);\n foreach ($partitions as $k=>$partition) {\n $partitions[$k] = preg_split('/\\s+/', $partition);\n }\n\n\n /* --------------------------------------------------------------\n * Disk information\n * -------------------------------------------------------------- */\n foreach ($drives as $drive => $path) {\n if (preg_match('/^(\\d+)\\s+\\d+\\s+\\d+\\s+\\d+\\s+(\\d+)\\s+\\d+\\s+\\d+\\s+\\d+\\s+\\d+\\s+\\d+\\s+\\d+$/', read($path . '/stat'), $matches) !== 1) {\n $reads = 0;\n $writes = 0;\n } else {\n list(, $reads, $writes) = $matches;\n }\n \n $this->{$drive} = new stdClass;\n $this->{$drive}->name = read($path . '/device/model');\n $this->{$drive}->size = read($path . '/size', 0) * 512;\n $this->{$drive}->reads = $reads;\n $this->{$drive}->writes = $writes;\n $this->{$drive}->used = 0;\n $this->{$drive}->percentage = 0;\n\n if (!$this->{$drive}->name) {\n $type = read($path . '/device/type');\n\n if ($type)\n $this->{$drive}->name = $type . ' ' . $drive;\n else\n $this->{$drive}->name = 'Virtual ' . $drive;\n }\n \n\n /* --------------------------------------------------------------\n * Disk usage\n * -------------------------------------------------------------- */\n foreach ($partitions as $partition)\n {\n $part = $partition[4];\n\n if (strpos($part, $drive) !== FALSE)\n {\n $df = array(); exec('df /dev/' . $part, $df);\n\n if (@preg_match('#\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%\\s+(.*)#', $df[1], $matches))\n {\n $this->{$drive}->used += $matches[2] * 1024;\n $this->{$drive}->percentage = $this->{$drive}->used / $this->{$drive}->size * 100;\n\n # virtual drive fix\n if ($matches[2] == 0 && $part == 'vda')\n {\n # assume main drive\n $df = array(); exec('df /', $df);\n\n if (@preg_match('#\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)%\\s+(.*)#', $df[1], $matches))\n {\n $this->{$drive}->used += $matches[2] * 1024;\n $this->{$drive}->percentage = $this->{$drive}->used / $this->{$drive}->size * 100;\n }\n }\n }\n }\n }\n \n\n /* --------------------------------------------------------------\n * hddtemp\n * -------------------------------------------------------------- */\n $hddtemp = array(); exec('hddtemp /dev/'.$drive . ' 2> /dev/null', $hddtemp);\n \n if ($hddtemp) {\n $hddtemp = $hddtemp[0];\n @preg_match('#:\\s+([\\d]+)#', $hddtemp, $matches);\n $this->{$drive}->temp = $matches[1];\n }\n }\n }", "title": "" }, { "docid": "e9af253210dc6f97af0a3f3b24bf247e", "score": "0.6186164", "text": "public function getFileSystem();", "title": "" }, { "docid": "9c56678ed657a4de7e63e419b42d409a", "score": "0.6123108", "text": "public function getStorageDriver();", "title": "" }, { "docid": "768f4ce07c53f5f941569aec73924d01", "score": "0.60860205", "text": "public function getFilesystem()\n {\n return new \\Symfony\\Component\\Filesystem\\Filesystem();\n }", "title": "" }, { "docid": "66fd47131c2605a0dd369c06c2ce6b45", "score": "0.6045674", "text": "protected function getSession_Storage_FilesystemService()\n {\n return $this->services['session.storage.filesystem'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage((__DIR__.'/sessions'), 'MOCKSESSID', ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }", "title": "" }, { "docid": "f8ff18dccd09b23b488e6ba05694b4b0", "score": "0.60419154", "text": "protected function getSession_Storage_FilesystemService()\n {\n return $this->services['session.storage.filesystem'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage('/Users/pete.robinson/Sites/wam/image/tests/SupportFiles/app/../../../tmp/cache/sessions');\n }", "title": "" }, { "docid": "8b27582204cf4aa6be77af4ba33ec473", "score": "0.59524393", "text": "protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\Symfony\\Component\\Filesystem\\Filesystem();\n }", "title": "" }, { "docid": "8b27582204cf4aa6be77af4ba33ec473", "score": "0.59524393", "text": "protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\Symfony\\Component\\Filesystem\\Filesystem();\n }", "title": "" }, { "docid": "79a81552a96908bbc71e37f86a0969ce", "score": "0.594626", "text": "public function __construct()\n {\n $this->fs = App::make('Illuminate\\Filesystem\\Filesystem');\n }", "title": "" }, { "docid": "126ee9e38c4c7d4a1e348d35d0194c04", "score": "0.5907252", "text": "protected function getSonata_Media_Filesystem_LocalService()\n {\n return $this->privates['sonata.media.filesystem.local'] = new \\Gaufrette\\Filesystem(new \\Sonata\\MediaBundle\\Filesystem\\Local(($this->targetDirs[3].'/public/uploads/media'), false));\n }", "title": "" }, { "docid": "4f7d213764be65218ad020254deb7978", "score": "0.58909774", "text": "public function getFilesystemManager();", "title": "" }, { "docid": "999c47027a6e222dc7b75a59e0de1cdc", "score": "0.5889572", "text": "public static function factory($storage = 'default', array $config = array())\n\t{\n\t\t// Set class name\n\t\t$class = 'B8_Storage_'.ucfirst($storage);\n\n\t\treturn new $class($config);\n\t}", "title": "" }, { "docid": "d831c32c7b4bdc2868119446c510f7bd", "score": "0.5879893", "text": "protected function registerNativeFilesystem()\n {\n $this->app->singleton('files', function () {\n return new FileSystem();\n });\n }", "title": "" }, { "docid": "c43f5f74726c0e63f873dd22492f4956", "score": "0.5867032", "text": "public function __construct( Storage $storage ) {\n\t\t$this->storage = $storage;\n\t}", "title": "" }, { "docid": "5a173591d2180c8ce2096ebd939b0ba9", "score": "0.58576316", "text": "public function alloc($filePath);", "title": "" }, { "docid": "447f023acf3e37fc35c6173807db71a2", "score": "0.5850169", "text": "private function getDisk()\n {\n return Storage::disk('gcs');\n }", "title": "" }, { "docid": "4e4013cb7a845cf1f4419a696f426a82", "score": "0.58484167", "text": "protected function initStorageObjects() {\n\t\t$this->documents = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->jobOffers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->jobRequests = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "d208f78fe7d6c5ed8ef2e6eedd2ab3e5", "score": "0.579679", "text": "protected function createFilesystemDriver(array $options)\n {\n $adapter = $this->config->get('cache::flysystem', $options['flysystem']);\n\n $filesystem = new Flysystem($adapter['connection']);\n\n return new FilesystemCachePool($filesystem);\n }", "title": "" }, { "docid": "414a7cf67c4873edeb8db5390e6c7431", "score": "0.57934004", "text": "public function getStorageAdapters()\n {\n return array(new FileStorage(sys_get_temp_dir()));\n }", "title": "" }, { "docid": "95d0202046753e25450a048396bcd703", "score": "0.57870024", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t* Do not modify this method!\n\t\t* It will be rewritten on each save in the kickstarter\n\t\t* You may modify the constructor of this class instead\n\t\t*/\n\t\t$this->altLabels = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t$this->hiddenLabels = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t$this->notes = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "title": "" }, { "docid": "5d5dcec5790c91a52014683100967f51", "score": "0.57613814", "text": "protected function _getConfStorageImpl()\n\t{\n\t\t$storage = $this->_config->ftp_storageType;\n\t\t$storage = 'iMSCP_Api_Modules_Ftp_Adapter_Proftpd_Storage_' . $storage;\n\t\treturn new $storage();\n\t}", "title": "" }, { "docid": "f76e801580c711467da68cb320c9aa39", "score": "0.57600045", "text": "public static function getInstance() {\n if (self::$theInstance == NULL) {\n self::setInstance(new DefaultFileStorage());\n }\n return self::$theInstance;\n }", "title": "" }, { "docid": "4cd193cd281ee16917b30166f57bc263", "score": "0.5755785", "text": "public static function disk($name = null)\n {\n /** @var \\Illuminate\\Filesystem\\FilesystemManager $instance */\n return $instance->disk($name);\n }", "title": "" }, { "docid": "71ba54cc250c6e727bc93ad85f9a68c7", "score": "0.5748355", "text": "protected function initStorageObjects()\n {\n \n }", "title": "" }, { "docid": "2d6cfc6e53eb7773be3c9aed0285e8db", "score": "0.57415134", "text": "public function getStorage();", "title": "" }, { "docid": "2d6cfc6e53eb7773be3c9aed0285e8db", "score": "0.57415134", "text": "public function getStorage();", "title": "" }, { "docid": "35443fc7521dd650035dcda2477aad0d", "score": "0.5738472", "text": "public function disk($disk)\n {\n $this->disk = $disk;\n\n return $this;\n }", "title": "" }, { "docid": "1f37261e130fc911a7d11d6ef7b2ca18", "score": "0.5733058", "text": "protected function getSonata_Media_Filesystem_LocalService()\n {\n return $this->services['sonata.media.filesystem.local'] = new \\Gaufrette\\Filesystem(${($_ = isset($this->services['sonata.media.adapter.filesystem.local']) ? $this->services['sonata.media.adapter.filesystem.local'] : $this->get('sonata.media.adapter.filesystem.local')) && false ?: '_'});\n }", "title": "" }, { "docid": "cb280350c1e13ed7df2e63b7d76da91d", "score": "0.5728222", "text": "public function __construct($filename, $disk)\n {\n $this->filename = $filename;\n $this->disk = $disk;\n }", "title": "" }, { "docid": "5ea77b8c5184f4009857c9e085f56def", "score": "0.5727069", "text": "protected function initStorageObjects()\n {\n\n }", "title": "" }, { "docid": "5ea77b8c5184f4009857c9e085f56def", "score": "0.5727069", "text": "protected function initStorageObjects()\n {\n\n }", "title": "" }, { "docid": "f65e38b9502bc2d0390d30cd7501cb3e", "score": "0.57112205", "text": "protected function storage() {\n if (!isset($this->storage)) {\n $this->storage = PhpStorageFactory::get('service_container');\n }\n return $this->storage;\n }", "title": "" }, { "docid": "4eab9036f474287ef42611b613b3670d", "score": "0.57047045", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t* Do not modify this method!\n\t\t* It will be rewritten on each save in the extension builder\n\t\t* You may modify the constructor of this class instead\n\t\t*/\n\t\t$this->names = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t\n\t\t$this->primName = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t\n\t\t$this->categories = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t\n\t\t$this->entries = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "title": "" }, { "docid": "ec2a4f5474d36bd87def6df626b61237", "score": "0.5703187", "text": "protected function initStorageObjects()\n {\n $this->products = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->fileCategories = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "title": "" }, { "docid": "bd8ac6f014078c7e07b7813b9cd6d2f7", "score": "0.5697473", "text": "public function __construct($dir = '/tmp')\n\t{\n\t\t$this->__storage = $dir.'/webappstorage_'.md5(Conf::$site);\n\t\ttouch($this->__storage); // create if not exists or just update access time\n\t}", "title": "" }, { "docid": "fe9cd321acac3ec1ff618ba708d33ad0", "score": "0.5692915", "text": "public function __construct()\n\t{\n\t\t$this->setMaxFileSize(10485760); // 10MB\n\n\t\t$this->setStoragePath(\\WWW_DIR.'/data');\n\n\t\t// initialize daos\n\t\t$this->fileDao = $this->inject('Om\\Multimedia\\IFileDao');\n\t}", "title": "" }, { "docid": "d62ec9b8bef2f1edab541865a28497fa", "score": "0.56775093", "text": "protected function fileObj()\n\t{\n\t\t$fileObj = new Varien_Io_File();\n\t\treturn $fileObj;\n\t}", "title": "" }, { "docid": "f438a80d93b0dd40815b47ae8b66bb1e", "score": "0.5677417", "text": "public function __construct($path)\n\t{\n\t\t$this->filesystem = static::getStorage();\n\t\t$this->path = $path;\n\t}", "title": "" }, { "docid": "138bb123e017ecc44670b75111c243e5", "score": "0.5660087", "text": "protected function initStorageObjects()\n {\n $this->targetGroup = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->tags = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->holiday = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "title": "" }, { "docid": "e8272d898fadf1923aca49cc4eac7f5a", "score": "0.5655497", "text": "public function __construct(Filesystem $filesystem)\n {\n $this->filesystem = $filesystem;\n }", "title": "" }, { "docid": "d819cdc52289de412db3ac35afcbc008", "score": "0.56553733", "text": "public function store()\n {\n static::diskStorage()->store($this);\n\n return $this;\n }", "title": "" }, { "docid": "8a9edcaa9eb8f7c3c7d67c07a64cfbff", "score": "0.56545806", "text": "public function __construct(Filesystem $files, $storage)\n\t{\n\t\t$this->files = $files;\n\t\t$this->deploymentsFilepath = $storage.'/meta/deployments.json';\n\t}", "title": "" }, { "docid": "90ae1a4f197d09ca18f4c8a12a34d35b", "score": "0.56511813", "text": "protected function initStorageObjects() {\n\t}", "title": "" }, { "docid": "d1831c9d92d344c6df614edafb3f2210", "score": "0.5637942", "text": "function __construct() {\n\t\t\tglobal $cms,$admin;\n\t\t\t$ups = $cms->getSetting(\"bigtree-internal-storage\");\n\t\t\t// If for some reason the setting doesn't exist, make one.\n\t\t\tif (!is_array($ups) || !$ups[\"service\"]) {\n\t\t\t\t$this->Service = \"local\";\n\t\t\t\t$this->optipng = false;\n\t\t\t\t$this->jpegtran = false;\n\t\t\t\t$admin->createSetting(array(\n\t\t\t\t\t\"id\" => \"bigtree-internal-storage\",\n\t\t\t\t\t\"encrypted\" => \"on\",\n\t\t\t\t\t\"system\" => \"on\"\n\t\t\t\t));\n\t\t\t\t$admin->updateSettingValue(\"bigtree-internal-storage\",array(\"service\" => \"local\"));\n\t\t\t} else {\n\t\t\t\t$this->Service = $ups[\"service\"];\n\t\t\t\t$this->optipng = $ups[\"optipng\"];\n\t\t\t\t$this->jpegtran = $ups[\"jpegtran\"];\n\t\t\t\t$this->RackspaceData = $ups[\"rackspace\"];\n\t\t\t\t$this->S3Data = $ups[\"s3\"];\n\t\t\t\t$this->S3Files = array();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3cff56a0d863922cfcbf33c42733b6be", "score": "0.563551", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->bistum = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->url = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "eac2e9914bcdba9fd5cdd974da75b427", "score": "0.5627209", "text": "public function __construct(FileStorage $staging) {\n $this->staging = $staging;\n }", "title": "" }, { "docid": "9b3656c1c80d15e7f635d3586a0ef79b", "score": "0.5619241", "text": "public function storagePath()\n {\n }", "title": "" }, { "docid": "54fc850c665e5797cbcc4e5f81785339", "score": "0.561567", "text": "public function storagePath(string $path);", "title": "" }, { "docid": "fde35d5571d09f94b419d5228e3095e2", "score": "0.5614868", "text": "public function __construct($path = null) \n {\n $this->filesystem = new Filesystem;\n $this->setProperties($path);\n }", "title": "" }, { "docid": "4b9a09d41230c661b94845add63638a2", "score": "0.56138664", "text": "public function __construct(Storage $storage)\n {\n $this->storage = $storage;\n $this->load();\n\n }", "title": "" }, { "docid": "8c1b0b7bc3dae6ad4f397ac92ac9d63a", "score": "0.560193", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->childEntries = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "title": "" }, { "docid": "93b54b9fb50d2dd109f4be645b90006a", "score": "0.56015307", "text": "public function get_storage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "e27021dd35c5eb71583c701718dd2a5e", "score": "0.5580486", "text": "protected function initStorageObjects()\n {\n $this->image = new ObjectStorage();\n $this->categories = new ObjectStorage();\n }", "title": "" }, { "docid": "7e3e95741b973265666718f1712556bb", "score": "0.55776817", "text": "protected function initStorageObjects()\n\t{\n\t\t$this->markers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->styles = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "0f9da63f6cb7c8e19f1bd65d4fcebba1", "score": "0.55774623", "text": "public function getDisk(?string $diskName = null): Filesystem\n {\n $diskName ??= $this->getConfigValueForKey('diskName', config('filesystems.default'));\n\n return Storage::disk($diskName);\n }", "title": "" }, { "docid": "ac228b601f8598bc47d3df86babe9815", "score": "0.5576476", "text": "public function __construct(string $filename, string $disk)\n {\n $this->filename = $filename;\n $this->disk = $disk;\n }", "title": "" }, { "docid": "e541fa43c323a24979525f02a847268d", "score": "0.55667627", "text": "protected function __construct() \n { \n $this->configFS = ConfigFileSystem::getInstance();\n }", "title": "" }, { "docid": "5156d2619cf9427643bd15825960166b", "score": "0.55616194", "text": "protected function initStorageObjects() {\n\t\t$this->orderPositions = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->orderPartialPrices = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "8c009d4819a2689fe1c29d76350e1518", "score": "0.55600345", "text": "protected function createFileDriver()\n {\n return $this->createNativeDriver();\n }", "title": "" }, { "docid": "6b8efca8ec3edad17bd633673c7ad448", "score": "0.55563176", "text": "public function storageFactoryProvider(): array\n {\n $factories = [\n [\n \"SingleProcessStorage\",\n function() {\n return new SingleProcessStorage();\n },\n ],\n [\n \"SessionStorage\",\n function() {\n return new SessionStorage(\"test\");\n },\n ],\n [\n \"FileStorage\",\n function() {\n vfsStream::setup('fileStorage');\n return new FileStorage(vfsStream::url(\"fileStorage/data\"));\n },\n ],\n [\n \"LaminasStorage\",\n function() {\n return new LaminasStorage('zend', new Memory());\n },\n ]\n ];\n\n if (extension_loaded('pdo_sqlite')) {\n $factories[] = [\n \"sqlite\",\n function () {\n $pdo = new \\PDO(\"sqlite::memory:\");\n $pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n return new PDOStorage(\"test\", $pdo);\n },\n ];\n } else {\n $factories[] = [\"sqlite\", null];\n }\n\n if (extension_loaded('sysvsem')) {\n $factories[] = [\n \"IPCStorage\",\n function() {\n return new IPCStorage(ftok(__FILE__, \"a\"));\n },\n ];\n } else {\n $factories[] = ['IPCStorage', null];\n }\n\n if (extension_loaded('pdo_mysql') && getenv(\"MYSQL_DSN\")) {\n $factories[] = [\n \"MYSQL\",\n function() {\n $pdo = new \\PDO(getenv(\"MYSQL_DSN\"), getenv(\"MYSQL_USER\"));\n $pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n $pdo->setAttribute(\\PDO::ATTR_AUTOCOMMIT, false);\n return new PDOStorage(\"test\", $pdo);\n },\n ];\n } else {\n $factories[] = ['MYSQL', null];\n }\n\n if (extension_loaded(\"pdo_pgsql\") && getenv(\"PGSQL_DSN\")) {\n $factories[] = [\n \"PGSQL\",\n function() {\n $pdo = new \\PDO(getenv(\"PGSQL_DSN\"), getenv(\"PGSQL_USER\"));\n $pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n return new PDOStorage(\"test\", $pdo);\n },\n ];\n } else {\n $factories[] = ['PGSQL', null];\n }\n\n if (extension_loaded('memcache') && getenv(\"MEMCACHE_HOST\")) {\n $factories[] = [\n \"MemcachedStorage\",\n function() {\n $memcached = new \\Memcached();\n $memcached->addServer(getenv(\"MEMCACHE_HOST\"), 11211);\n return new MemcachedStorage(\"test\", $memcached);\n },\n ];\n } else {\n $factories[] = ['MemcachedStorage', null];\n }\n\n if (extension_loaded('redis') && getenv(\"REDIS_URI\")) {\n $factories[] = [\n \"PHPRedisStorage\",\n function() {\n $uri = parse_url(getenv(\"REDIS_URI\"));\n $redis = new \\Redis();\n $redis->connect($uri[\"host\"]);\n return new PHPRedisStorage(\"test\", $redis);\n },\n ];\n } else {\n $factories[] = [\"PHPRedisStorage\", null];\n }\n\n if (getenv(\"REDIS_URI\")) {\n $factories[] = [\n \"PredisStorage\",\n function() {\n $redis = new Client(getenv(\"REDIS_URI\"));\n return new PredisStorage(\"test\", $redis);\n },\n ];\n } else {\n $factories[] = ['PredisStorage', null];\n }\n\n return $factories;\n }", "title": "" }, { "docid": "6154c1ce0bb6f8bf897e02b208c1586f", "score": "0.55547553", "text": "protected function _initCacheFS()\r\n {\r\n $path_cache = APPLICATION_PATH_CACHE . '/cacheFS';\r\n //qto tempo de cache\r\n $appfrontend = array('lifetime' => 14400, //seconds \r\n 'automatic_serialization' => true,\r\n //'debug_header' => true,\r\n );\r\n //\r\n $appbackend = array('cache_dir' => $path_cache);\r\n $appcache = Zend_Cache::factory('Core', 'File', $appfrontend, $appbackend);\r\n \r\n Zend_Registry::set('cache_FS', $appcache); \r\n }", "title": "" }, { "docid": "19fd0030826193b0b0f9c81393ccf836", "score": "0.5546613", "text": "public function setupStorage(): void\n {\n $storagePath = '/tmp/storage';\n\n $storagePaths = [\n '/app/public',\n '/framework/cache/data',\n '/framework/sessions',\n '/framework/testing',\n '/framework/views',\n '/logs',\n ];\n\n // Only make the dirs if we have not previously made them\n if (! is_dir($storagePath . end($storagePaths))) {\n reset($storagePaths);\n foreach ($storagePaths as $path) {\n mkdir($storagePath . $path, 0777, true);\n }\n }\n\n $this->app->useStoragePath($storagePath);\n $this->app['config']['view.compiled'] = realpath(storage_path('framework/views'));\n }", "title": "" }, { "docid": "02756cf1053734ac9b2d4bbfc465b65a", "score": "0.5542658", "text": "protected function _create ()\n {\n $storage = $this->_make_storage ();\n $storage->create_object ($this);\n }", "title": "" }, { "docid": "a88c421217d0026d3160fe4e73db422e", "score": "0.55392635", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->resources = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->messages = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->subtypes = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\n\t\t$this->typenames = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->languages = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "448bf6ab8cc56acbb97cfbc34fe1130e", "score": "0.5531834", "text": "public static function storage(): string\n\t{\n\t\t// Normalize the path\n\t\t$storage = realpath(config('Files')->storagePath) ?: config('Files')->storagePath;\n\t\t$storage = rtrim($storage, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;\n\t\tif (! is_dir($storage) && ! @mkdir($storage, 0775, true))\n\t\t{\n\t\t\tthrow FilesException::forDirFail($storage);\n\t\t}\n\n\t\t// Normalize the path\n\t\t$thumbnails = $storage . 'thumbnails';\n\t\tif (! is_dir($thumbnails) && ! @mkdir($thumbnails, 0775, true))\n\t\t{\n\t\t\tthrow FilesException::forDirFail($thumbnails);\n\t\t}\n\n\t\treturn $storage;\n\t}", "title": "" }, { "docid": "55c7c83c6c67861437aefe8b9fee898a", "score": "0.5531351", "text": "protected function initStorageObjects()\n {\n $this->projects = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->jobs = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->social = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->educations = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "title": "" }, { "docid": "669e45accaad5ef186e81c7a892b3185", "score": "0.55252147", "text": "public function __construct(Concert $concert, FilesystemAdapter $storage)\n {\n $this->concert = $concert;\n $this->storage = $storage;\n }", "title": "" }, { "docid": "0cad9e76c0bf627cc06ccb9b4068c6b7", "score": "0.5513504", "text": "public static function getFilesystem()\n {\n /** @var \\Illuminate\\Cache\\FileStore $instance */\n return $instance->getFilesystem();\n }", "title": "" }, { "docid": "44222e5ce14526e00ac97666bd716018", "score": "0.55113494", "text": "protected function getDisk(File $file): \\Illuminate\\Contracts\\Filesystem\\Filesystem\n {\n $diskName = $this->splitUrlByPort($file->getUrl())[0] ?? null;\n\n // Throws an exception if the disk does not exist.\n return $this->storage->disk($diskName);\n }", "title": "" }, { "docid": "8a92c4bd0da2a777719cdb807fd0eb7e", "score": "0.5510166", "text": "protected function setUp()\n {\n parent::setUp();\n\n $this->dir = sys_get_temp_dir() . \\DIRECTORY_SEPARATOR .\n rand(100, 999) . microtime(true);\n\n $this->object = new Storage(\n '/',\n new Filesystem(new LocalDriver($this->dir))\n );\n }", "title": "" }, { "docid": "c78210a9ea0b9549b5605280e5869871", "score": "0.55098754", "text": "public static function __initialize()\n\t{\n\t\tself::$path = \\STORAGE_PATH.\\DS.'datastore'.\\DS.Datastore::key();\n\t}", "title": "" }, { "docid": "2892f40fc671de23396d80a9c636aa64", "score": "0.5508399", "text": "public function __construct()\n {\n $this->baseDir = storage_path($this->baseDir);\n }", "title": "" }, { "docid": "7c30ad713f980244b84ba408c0fc7e19", "score": "0.5492735", "text": "protected function initStorageObjects() {\n\t\t$this->termine = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "0eaad799d8324b0ac23c09a512c10711", "score": "0.54902905", "text": "protected function getSonata_Media_Adapter_Filesystem_LocalService()\n {\n return $this->services['sonata.media.adapter.filesystem.local'] = new \\Sonata\\MediaBundle\\Filesystem\\Local(($this->targetDirs[3].'\\\\app/../web/uploads/media'), true);\n }", "title": "" }, { "docid": "a6065f97e2a745d124505477e757bb2a", "score": "0.54891783", "text": "protected function initStorageObjects()\n {\n $this->configuredParts = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "title": "" }, { "docid": "2833644499780ab68df8ed2885a49f73", "score": "0.54877573", "text": "protected function initStorageObjects()\n {\n $this->areapoints = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->event = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "title": "" }, { "docid": "d69aa0b80854ebb327dd4b4c306b8380", "score": "0.5481883", "text": "public function __construct() {\n\t\t$this->initStorageObjects();\n\t}", "title": "" }, { "docid": "faf730862b0289ded1628e45c2b965e7", "score": "0.5474936", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t* Do not modify this method!\n\t\t* It will be rewritten on each save in the extension builder\n\t\t* You may modify the constructor of this class instead\n\t\t*/\n\t\t$this->apps = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "title": "" }, { "docid": "bd9562d5e0eec434a946b4928912c58b", "score": "0.5471844", "text": "public function disk()\n {\n return $this->getDisk();\n }", "title": "" }, { "docid": "343670b3fe508cfb5469307d39459aa6", "score": "0.5467691", "text": "public function __construct($data, StorageInterface $storage)\n {\n\n $file = null;\n $from_disk = false;\n\n if (is_array($data)) {\n $file = $data;\n } else {\n if (is_file($data)) {\n $this->objects[] = new FileInfo($data);\n $from_disk = true;\n } else {\n $file = $_FILES[$data];\n }\n }\n\n if ($file !== null) {\n if (is_array($file['tmp_name'])) {\n foreach ($file['tmp_name'] as $index => $tmpName) {\n if ($file['error'][$index] !== UPLOAD_ERR_OK) {\n $this->uploadErrors[] = sprintf(\n '%s: %s',\n $file['name'][$index],\n static::$errorCodes[$file['error'][$index]]\n );\n } else {\n $this->objects[] = new FileInfo($file['tmp_name'][$index], $file['name'][$index]);\n }\n }\n } else {\n if ($file['error'] !== UPLOAD_ERR_OK) {\n $this->uploadErrors[] = sprintf(\n '%s: %s',\n $file['name'],\n static::$errorCodes[$file['error']]\n );\n } else {\n $this->objects[] = new FileInfo($file['tmp_name'], $file['name']);\n }\n }\n } elseif (!$from_disk) {\n $this->uploadErrors[] = static::$errorCodes[4];\n }\n\n $this->storage = $storage;\n }", "title": "" }, { "docid": "4508eee57eb84f0f27ffbb8bc6d2eae4", "score": "0.5464736", "text": "public function createS3Driver()\n {\n $client = new S3Client([\n 'credentials' => [\n 'key' => $this->config->s3_key,\n 'secret' => $this->config->s3_secret,\n ],\n 'region' => $this->config->s3_region,\n 'version' => 'latest',\n ]);\n\n $adapter = new AwsS3Adapter($client, $this->config->s3_bucket);\n\n return new Filesystem($adapter);\n }", "title": "" }, { "docid": "8cf0dd91b1a11825bb23237abe6c4e7a", "score": "0.5463573", "text": "public function __construct(Filesystem $filesystem)\n {\n parent::__construct();\n $this->filesystem = $filesystem;\n }", "title": "" }, { "docid": "6768e6be7f4a1265c1f1926617f19605", "score": "0.54607654", "text": "public function set_storage($storage) {\n\t\t$this->_storage = $storage;\n\t}", "title": "" }, { "docid": "742616f13aed2b0c62afd3c691bceef9", "score": "0.54490095", "text": "protected function initStorageObjects(): void\n {\n $this->answer = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->hideCond = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->visibleCond = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "title": "" }, { "docid": "09f8262eb171fb4d1f0c56cbb68fc954", "score": "0.5439753", "text": "protected function createDiskDriver(): Channels\\DiskChannel\n {\n return $this->getContainerOrApp()->make(Channels\\DiskChannel::class);\n }", "title": "" }, { "docid": "e323d9b1d16abaec2963ff9df1d42de2", "score": "0.54293823", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->answers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->options = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->resultOptions = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "f03b04a18aaab3428556e328f0ce19b1", "score": "0.5429123", "text": "protected static function getStorage()\n\t{\n\t\treturn Storage::disk('attachments');\n\t}", "title": "" } ]
6bae02b047572a34908ad68818d5b459
Check if a code exists
[ { "docid": "9ff3a5bc918826283b7ef42099cd6e02", "score": "0.0", "text": "public function search($code)\n {\n return print_r($this->coupon->search($code));\n }", "title": "" } ]
[ { "docid": "d25c334a349432a49fda8a610a25cb0d", "score": "0.74470305", "text": "public function check_code($code){\n\n\t}", "title": "" }, { "docid": "e8b07296c931be44885789a2132710ca", "score": "0.71592194", "text": "function codeExists($code) {\n\t\tglobal $db;\n\t\t$result = $db->query('SELECT `secret`, `type` FROM shorts WHERE `key` = \"' . $db->escape_string($code) . '\"') or die('Database error 671948');\n\t\tif ($result->num_rows > 0) {\n\t\t\t$result = $result->fetch_row();\n\t\t\tif ($result[1] == 2) {\n\t\t\t\t$result = $db->query('SELECT `data` FROM pastes WHERE `secret` = \"' . $db->escape_string($secret) . '\"') or die('Database error 95279');\n\t\t\t\tif ($result->fetch_row()[0] == 'This link has already been downloaded.') {\n\t\t\t\t\treturn \"semi\";\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e811ba106a003c332f1a580d07685614", "score": "0.7038536", "text": "public function isCode(): bool\n {\n return 0 === strcasecmp($this->name, 'code');\n }", "title": "" }, { "docid": "e814770b8f6d54f7429351be0520e197", "score": "0.6964135", "text": "public function shortcodeExists($code){\n\t\t\t$query = \"SELECT * from \".self::$table.\" WHERE SUBSTRING_INDEX(short_code , '/',-1) =:code\";\n\t\t\t$stmt = $this->pdo->prepare($query);\n\t\t\t$param = array(\n\t\t\t\t\"code\" => $code\n\t\t\t);\n\t\t\t$stmt->execute($param);\n\t\t\t$result = $stmt->fetch();\n\t\t\treturn (empty($result)) ? false : $result['short_code'];\n\t\t}", "title": "" }, { "docid": "cfac036efbc3168efa31d721e933f5b4", "score": "0.6923686", "text": "public function codeExists($code) {\n\t\t\ttry {\n\t\t\t\t$codeExists = $this->xpath->evaluate(CURRENCY_ELEMENT_PATH . '[@' . CODE_ATTRIBUTE . '=\"'. $code . '\"]');\n\t\t\t\tif($codeExists->length > 0) { //If returns a value\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch(Exception $e) {\n\t\t\t\t//Possible in two different templates.\n\t\t\t\tif($method == 'GET') {\n\t\t\t\t\tthrow new APIException(ERROR_TITLE, ERROR_1400_MESSAGE, ERROR_1400);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new APIException(ERROR_TITLE, ERROR_2100_MESSAGE, ERROR_2100);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "dfb0adea4591bba836d22390c68e3bc5", "score": "0.689744", "text": "private function codeExists(string $code)\n {\n return Promocode::withTrashed()->where('code', $code)->first();\n }", "title": "" }, { "docid": "3e784d07381bb811a8db6a8591113455", "score": "0.6885498", "text": "function accessCodeExists(){\n\n // query to check if access_code exists\n $query = \"SELECT id\n FROM \" . $this->table_name . \"\n WHERE access_code = ?\n LIMIT 0,1\";\n\n // prepare the query\n $stmt = $this->conn->prepare( $query );\n\n // sanitize\n $this->access_code=htmlspecialchars(strip_tags($this->access_code));\n\n // bind given access_code value\n $stmt->bindParam(1, $this->access_code);\n\n // execute the query\n $stmt->execute();\n\n // get number of rows\n $num = $stmt->rowCount();\n\n // if access_code exists\n if($num>0){\n\n // return true because access_code exists in the database\n return true;\n }\n\n // return false if access_code does not exist in the database\n return false;\n\n }", "title": "" }, { "docid": "ba6f535e7cbf23fc4e51e7ccc36fe56c", "score": "0.67732966", "text": "function accessCodeExists(){\n\n // query to check if access_code exists\n $query = \"SELECT user_id\n\t\t\tFROM \" . $this->table_name . \"\n\t\t\tWHERE access_code = ?\n\t\t\tLIMIT 0,1\";\n\n // prepare the query\n $stmt = $this->conn->prepare( $query );\n\n // sanitize\n $this->access_code=htmlspecialchars(strip_tags($this->access_code));\n\n // bind given access_code value\n $stmt->bindParam(1, $this->access_code);\n\n // execute the query\n $stmt->execute();\n\n // get number of rows\n $num = $stmt->rowCount();\n\n // if access_code exists\n if($num>0){\n\n // return true because access_code exists in the database\n return true;\n }\n\n // return false if access_code does not exist in the database\n return false;\n\n }", "title": "" }, { "docid": "fa3f06945b99f7ec0d7fd7e9706c6e29", "score": "0.6756915", "text": "public function isCode(): bool\n {\n return false;\n }", "title": "" }, { "docid": "e165dcde15a43a631b80324c97398c96", "score": "0.6684551", "text": "public function has(string $code): bool\n {\n return array_key_exists($code, $this->items);\n }", "title": "" }, { "docid": "5df2e4ecd33a02ade6c8aea0fb22a480", "score": "0.66683537", "text": "public function exists($code)\n {\n $read = $this->_getReadAdapter();\n $select = $read->select();\n $select->from($this->getMainTable(), 'code');\n $select->where('code = :code');\n\n if ($read->fetchOne($select, array('code' => $code)) === false) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "b0bf33671a0be507250398c860665c51", "score": "0.66670436", "text": "private function checkLicenseCodeExists()\n {\n // don't even check if it's a console command or unit tests\n if ($this->app->runningInConsole() || $this->app->runningUnitTests()) \n {\n return;\n }\n\n // don't show notice bubble on localhost\n if (in_array($_SERVER['REMOTE_ADDR'] ?? [], ['127.0.0.1', '::1'])) {\n return;\n }\n\n // don't show notice bubble if debug is true\n if (config('app.debug') == 'true' && config('app.env') == 'local') {\n return;\n }\n\n //if (! $this->validCode(config('backpack.base.license_code'))) {\n // \\Alert::add('warning', \"<strong>You're using unlicensed software.</strong> Please ask your web developer to <a target='_blank' class='alert-link text-white' href='http://backpackforlaravel.com'>purchase a license code</a> to hide this message.\");\n //}\n }", "title": "" }, { "docid": "bd3fed93c22661f60819efa365cf92f9", "score": "0.6647746", "text": "function check_code ($user_id, $code) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT count(*) as `used` FROM `kodi` WHERE user_id = '{$user_id}' AND code = '{$code}'\")[0]['used'] > 0;\n }", "title": "" }, { "docid": "283bc810b9e9ecd5e93065ffbc3fb6e1", "score": "0.63736606", "text": "public static function isKnown($code)\n\t{\n\t\treturn !empty(self::getClass($code));\n\t}", "title": "" }, { "docid": "712958a8d51b2a61d66cd4e4a1d2e7b8", "score": "0.6299073", "text": "private function signup_code_exists($signup_code) { // Checks if the signup code exists. Deletes the code if it exists and returns true.\n $this->connect();\n $prepare_stmt = $this->connection->prepare(\"DELETE FROM code WHERE code = ?\");\n \n $prepare_stmt->bind_param('s', $signup_code);\n $prepare_stmt->execute();\n\t\tif ($prepare_stmt->affected_rows > 0) {\n\t\t\t$prepare_stmt->close();\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$prepare_stmt->close();\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "daf1c4ce2ae23cb7a85933e5d1b5514f", "score": "0.6296039", "text": "public function validateIfDataCodeExists($code)\n {\n $result = $this->data->findByCode($code);\n return empty($result) ? false : true;\n }", "title": "" }, { "docid": "3d2d86331468c898588684290c792090", "score": "0.62861013", "text": "public function supplierCodeExists($code){\n\t\t$dbOps = new DBOperations();\n\t\t$con = new mysqli($dbOps->servername, $dbOps->username, $dbOps->password, $dbOps->dbname); //create the db connection\n\t\tif($con->connect_error){\n\t\t\tdie(\"connection failed: \".$con->connect_error);\n\t\t}else{\n\t\t\t$query = \"SELECT * FROM today_supply WHERE supplier_code = {$code}\";\n\t\t\t$result = $con->query($query);\n\t\t\tif($result->num_rows > 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9921aabc05053391507503b66b57d0cd", "score": "0.62855846", "text": "function wpus_validate_code($code) {\n\tglobal $wpus, $wpdb;\n\n\t$status = WPUS_CODE_INVALID;\n\n\tif (preg_match(WPUS_CODE_REGEX, $code) || preg_match(WPUS_CODE_REGEX2, $code)) {\n\t\t$codeo = wpus_code_by_code($code);\n\n\t\tif ($codeo !== false) {\n\t\t\tif ($codeo->enabled == '0') {\n\t\t\t\t$status = WPUS_CODE_DISABLED;\n\t\t\t}\n\t\t\telseif ($codeo->remaining_uses <= 0) {\n\t\t\t\t$status = WPUS_CODE_NO_USES_REMAINING;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// valid code!\n\t\t\t\t$status = $codeo->project_id;\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\t$status = WPUS_CODE_BAD_FORMAT;\n\t}\n\n\t/*\n\t * Log the attempt\n\t */\n //$wpus->LogEvent($status, WPUS_LOG_ACTIVATE_CODE);\n\n\treturn $status;\n}", "title": "" }, { "docid": "0f49d10edb1cc9d3f5559286f0fe5758", "score": "0.6256872", "text": "public function isCodeExist(string $code) : bool\n {\n if ($code === '') {\n return false;\n }\n\n $customer = $this->findOneByField('code', $code);\n return (bool) $customer;\n }", "title": "" }, { "docid": "77d13f423d679cbd206c9ed9e432f74c", "score": "0.6221003", "text": "public function testFindByCodeWhichDoesNotExist()\n {\n // Generate a code which (likely) won't exist in the system\n $code = sha1(uniqid(\"\"));\n $objSection = $this->service->findByCode($code);\n }", "title": "" }, { "docid": "139deac1ca6f2ce346f794c4569ec8bb", "score": "0.62017685", "text": "function getCode();", "title": "" }, { "docid": "023616ffb6387a98311ab60111ea58fc", "score": "0.6195221", "text": "public function exists($code)\n {\n $read = $this->_getReadAdapter();\n $select = $read->select();\n $select->from($this->getMainTable(), $this->getIdFieldName());\n $select->where($this->getIdFieldName() . ' = :code');\n\n if ($read->fetchOne($select, array('code' => $code)) === false) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "8b7364902e8af47c7ddba17973992f39", "score": "0.6089011", "text": "public function offsetExists($code): bool\n\t{\n\t\treturn isset($this->params[$code]);\n\t}", "title": "" }, { "docid": "6bbd922497721e1226a78d63ce536642", "score": "0.60863584", "text": "public function existAccessCode()\n {\n if (Session::has('buildingShareView')) return true; else return false;\n }", "title": "" }, { "docid": "18f14b16dd576cac57b08886be52c03d", "score": "0.6086337", "text": "public function isExists($code){\n\t\t\t$dbOps = new PDFDBOperations();\n\t\t\ttry{\n\t\t\t\t$con = new mysqli($dbOps->servername, $dbOps->username, $dbOps->password, $dbOps->dbname); //create the db connection\n\t\t\t\t$query = \"SELECT * FROM monthly_bill WHERE supp_code = {$code}\";\n\t\t\t\t$result = $con->query($query);\n\t\t\t\tif($result->num_rows > 0){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}catch(mysqli_sql_exception $e){\n\t\t\t\techo \"In the isMessageValid: \".$e;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "61d1ff7d546c621c64ade4214e241b5a", "score": "0.6073913", "text": "function fn_geo_maps_check_if_state_code_exists($state_code, $country_code)\n{\n return (bool) db_get_field('SELECT code FROM ?:states WHERE code = ?s AND country_code = ?s', $state_code, $country_code);\n}", "title": "" }, { "docid": "8be49c4ae512b8355d8279dae052ff48", "score": "0.6045246", "text": "private function checkPurchaseCode()\n\t{\n\t\t// Make sure that the website is properly installed\n\t\tif (!File::exists(base_path('.env'))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Make the purchase code verification only if 'installed' file exists\n\t\tif (!File::exists(storage_path('installed'))) {\n\t\t\t// Get purchase code from DB\n\t\t\t$purchaseCode = config('settings.app.purchase_code');\n\t\t\t\n\t\t\t// Write 'installed' file\n\t\t\tFile::put(storage_path('installed'), '');\n\t\t\t\n\t\t\t// Send the purchase code checking\n\t\t\t$apiUrl = config('larapen.core.purchaseCodeCheckerUrl') . $purchaseCode . '&item_id=' . config('larapen.core.itemId');\n\t\t\t$data = \\App\\Helpers\\Curl::fetch($apiUrl);\n\t\t\t\n\t\t\t// Check & Get cURL error by checking if 'data' is a valid json\n\t\t\tif (!isValidJson($data)) {\n\t\t\t\t$data = json_encode(['valid' => false, 'message' => 'Invalid purchase code. ' . strip_tags($data)]);\n\t\t\t}\n\t\t\t\n\t\t\t// Format object data\n\t\t\t$data = json_decode($data);\n\t\t\t\n\t\t\t// Check if 'data' has the valid json attributes\n\t\t\tif (!isset($data->valid) || !isset($data->message)) {\n\t\t\t\t$data = json_encode(['valid' => false, 'message' => 'Invalid purchase code. Incorrect data format.']);\n\t\t\t\t$data = json_decode($data);\n\t\t\t}\n\t\t\t\n\t\t\t// Update 'installed' file\n\t\t\tif ($data->valid == true) {\n\t\t\t\tFile::put(storage_path('installed'), $data->license_code);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1c3696961e4d7a585023bb83544ae85d", "score": "0.6044165", "text": "public function exists($system, $sysop, $code) {\n\t\t$q = $this->queryCode($system, $sysop, $code);\n\t\treturn boolval($q->count());\n\t}", "title": "" }, { "docid": "b0fb72b8b72113a5a1f91cf83eecf339", "score": "0.5987522", "text": "public function validate_code($code)\n {\n try{\n $quiz = Quiz::where(['code' => $code, 'user_id' => Auth::user()->id])->firstOrFail();\n return \"duplicate\";\n }\n catch (\\Exception $e) {\n return \"unique\";\n }\n }", "title": "" }, { "docid": "cd63c6513f1df41af921f1e523c6aaa8", "score": "0.5975776", "text": "public function hasExtension($code)\n {\n $modules = array_keys((array) Mage::getConfig()->getNode('modules')->children());\n\n if (in_array($code, $modules)) {\n return TRUE;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "ecfa0c6d0fb1dd6331176f348ef17da3", "score": "0.59597826", "text": "function lookupUpcUpcdatabaseDotCom($code, $key) {\n\treturn false;\n}", "title": "" }, { "docid": "3441562a71c83189627f1243b44364f0", "score": "0.59535646", "text": "function checkExist()\n{\n}", "title": "" }, { "docid": "7f221bd644e51b933c71b7230c2d80a2", "score": "0.5950112", "text": "public function code();", "title": "" }, { "docid": "e67a4cc85a7034169adb97747e6cf34f", "score": "0.59373975", "text": "public function __isset($code)\n\t{\n\t\treturn isset($this->params[$code]);\n\t}", "title": "" }, { "docid": "24c281fde3963abedf91c6cc1bea0269", "score": "0.593098", "text": "public static function getCode(): string;", "title": "" }, { "docid": "dbdb828abe901ac06287543acb12ff4a", "score": "0.5923671", "text": "public function checkCodeRoute($url) {\n\t\t$url = $this->DB->sanitize($url);\n\t\treturn $this->DB->query(\"SELECT * FROM `code` WHERE `url` = '$url' LIMIT 0, 1;\");\n\t}", "title": "" }, { "docid": "c68a3a169e633ed8c7d642bfe8979283", "score": "0.591617", "text": "public function check_code( $code_to_check ) {\n\t\t$query = $this->db->get_where( 'invites', array( 'code' => $code_to_check ) );\n\t\t$code_info = $query->row();\n\n\t\tif ( !empty($code_info) ) {\n\t\t\tif ( ($code_info->uses < $code_info->allowed_uses) || ($code_info->allowed_uses == 0) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t\t// $code_info\n\t\t/* stdClass Object (\n\t\t [id] => 1\n\t\t [code] => lol\n\t\t [created_by] => 5\n\t\t [redeemed_by] => 0\n\t\t [allowed_uses] => 0\n\t\t [uses] => 0\n\t\t) */\n\t}", "title": "" }, { "docid": "6d80821a536608352cfdce5987321d95", "score": "0.59139246", "text": "final static function haveVarsThisCode($code){\n\t\t$vars = self::getVarsFromCode($code);\n\t\tif (count($vars) > 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "02983ec502a507189ca6363bcbbef1cd", "score": "0.5883816", "text": "public static function isRawCodeExists($rawCode) {\n return Helper::firstFromTable('business', 'raw_code', $rawCode, '=');\n //return !empty($ret);\n }", "title": "" }, { "docid": "94c96ad662b59be8d8bc07dc16af942e", "score": "0.58631676", "text": "function check_db_entry($visit_code){\n\n\t$query=\"SELECT `id` FROM `tbl_ls_visitor_tracker` WHERE `visit_code`=$visit_code\";\n\t$mysql_result= mysql_query($query);\n\t\n\tif(mysql_num_rows($mysql_result)==0){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n\n\t// Check Whether the visit_code is available in DAtaBase END//\n}", "title": "" }, { "docid": "0eed1277026303817cb78a06077d332a", "score": "0.5852399", "text": "public function testMissingCode()\n {\n /** @var Violation $violation */\n $violation = $this->createEmptyInstance();\n $violation->getCode();\n }", "title": "" }, { "docid": "1a478cfbeb5f654c95e4aa2236589e67", "score": "0.5842329", "text": "final public function getCode(): string {}", "title": "" }, { "docid": "9a4d3cbe6bdf6c38577d3c8dce680f8e", "score": "0.5841775", "text": "public function checkForMissedDebugCode()\n {\n $this->_exec('php checkers/misseddebugcodechecker.php ../extensions/components/com_redshopb/ ../extensions/components/com_rsbmedia/ ../extensions/libraries/ ../extensions/modules/ ../extensions/plugins/');\n }", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.58345425", "text": "public function getCode();", "title": "" }, { "docid": "5f9083c62f569ca992e9a3e2ff157786", "score": "0.5834105", "text": "private function isCod($methodCode)\n\t{\n\t\t$codPayments = explode(',' , Mage::getStoreConfig('zasilkovna_cod/configuration/cod') );\n\t\treturn in_array($methodCode, $codPayments);\n\t}", "title": "" }, { "docid": "a4c8c9f074171305fdd0a10ad31f0ad1", "score": "0.5831314", "text": "public function isBackupCode($code);", "title": "" }, { "docid": "e2a0696189f132b76b86444156161bea", "score": "0.5809267", "text": "function canParse(string $code): bool\n {\n return !empty(preg_grep(self::MAIN_VISIBILITY_SM_REGEX, explode('\\n', $code)));\n }", "title": "" }, { "docid": "7569b6743cde202dca706ca1c8a9615a", "score": "0.5808949", "text": "public static function verifycode()\n {\n return Sms::proveVerifycode('login','13333339558','$code');\n }", "title": "" }, { "docid": "464e222f118379989c313d604d12a6dd", "score": "0.5806598", "text": "public static function is(string $type, string $code): bool\n {\n $list = static::get();\n return isset($list[$type]) && in_array($code, $list[$type]);\n }", "title": "" }, { "docid": "4819958bde26651080a1865358acbec8", "score": "0.5803689", "text": "function shortcode_exists($tag) {\n global $shortcode_tags;\n return array_key_exists($tag, $shortcode_tags);\n}", "title": "" }, { "docid": "8533f4939ea7696af2912ba8d4a58902", "score": "0.5796255", "text": "abstract public function code();", "title": "" }, { "docid": "c18a44218aabe30d8f3f298ad729acda", "score": "0.5791649", "text": "function lookupUpcSearchupcDotCom($code, $key) {\n\treturn false;\n}", "title": "" }, { "docid": "602c7504ed90b51dc8f4711b225a642d", "score": "0.5784826", "text": "function w_user_code_is_duplicated($code) {\n $counter = db_result(db_query(\n \"SELECT COUNT(*) FROM {w_user_code} WHERE code LIKE '%s'\",\n $code\n ));\n\n return $counter > 0;\n}", "title": "" }, { "docid": "080f20cef7a2fbf7c89a8a631745f82d", "score": "0.57757676", "text": "protected function function_check($code) {\n\n $preg = '#(\\W|\\s)' . implode('(\\W|\\s)|(\\W|\\s)', $this->black_list) . '(\\W|\\s)#';\n\n // check if the function is in the black list (or not in white list)\n if (count($this->black_list) && preg_match($preg, $code, $match)) {\n\n // find the line of the error\n $line = 0;\n $rows = explode(\"\\n\", $this->tpl['source']);\n while (!strpos($rows[$line], $code))\n $line++;\n\n // stop the execution of the script\n $e = new Daq_Tpl_SyntaxException('Unallowed syntax in ' . $this->tpl['tpl_filename'] . ' template');\n throw $e->setTemplateFile($this->tpl['tpl_filename'])\n ->setTag($code)\n ->setTemplateLine($line);\n }\n }", "title": "" }, { "docid": "a953ab89c3399d25168f456d732cf9e4", "score": "0.5774539", "text": "protected function isReturncodeValid(int $code): bool {\n\t\ttry {\n\t\t\t$reflection = new \\ReflectionClass('\\\\' . __NAMESPACE__ . '\\\\interfaces\\\\NagiosCodes');\n\t\t\treturn in_array($code, $reflection->getConstants());\n\t\t} catch (\\ReflectionException $exception) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "578e7b0d4751ecb503300eb457dd35a8", "score": "0.576467", "text": "public static function code($token)\n {\n $code = self::where('token',$token)->select('code')->first();\n return ($code) ? $code->code : false;\n }", "title": "" }, { "docid": "e9f43f06e5d529999bbe346f69d61298", "score": "0.5755559", "text": "static function use_code($code){\n\t\n // Connecting, selecting database\n $link = mysql_connect(Configuration::db_server(), Configuration::db_username(), Configuration::db_password())\n or die('Could not connect: ' . mysql_error());\n mysql_select_db(Configuration::db_name()) or die('Could not select database');\n\t\t\n //sanitizing input running query\n $code = htmlspecialchars($code, ENT_QUOTES);\n $query = \"SELECT * FROM codes WHERE code = '$code';\";\n $result = mysql_query($query, $link) or die('Query failed: ' . mysql_error());\t\n\t\t\n //analyzing results\n $rows = mysql_num_rows($result);\n if($rows === 1){\t\t\t\n //free the result because we don't care about it\n mysql_free_result($result);\n\t\t\t\n //delete the entry\n $query = \"DELETE FROM codes WHERE code = '$code';\";\n $affected_rows = mysql_query($query, $link) or die('Query failed: ' . mysql_error());\n $success = true;\n } else {\n $success = false;\n }\n\t\t\n //close connection\n mysql_close($link);\n\t\t\n return ($success);\n }", "title": "" }, { "docid": "921ccea15b10f93b03febcf84238a080", "score": "0.57402956", "text": "public function loadByCode($code)\n {\n $id = $this->getResource()->getIdByCode($code);\n if (!$id) return false;\n return $this->load($id);\n }", "title": "" }, { "docid": "9368084e0b384bc2b05da977e309bb0b", "score": "0.5724814", "text": "function module_exist(){\n \n}", "title": "" }, { "docid": "52e52aa0b283cdab5716d7b052bef928", "score": "0.57170707", "text": "function checkCode($email, $code) {\n try {\n $db = db_connect();\n $values = [$email, $code];\n $sql = \"SELECT COUNT(*) FROM userinfo WHERE email = ? AND verificationCode = ?\";\n $stmt = $db->prepare($sql);\n $stmt->execute($values);\n $result = $stmt->fetch();\n if($result != 0) return TRUE;\n else return FALSE;\n } catch (Exception $e) {\n return FALSE;\n } finally {\n $db = NULL;\n }\n}", "title": "" }, { "docid": "5faf8ba99ce9fd1c4e9d35d0ad905a31", "score": "0.5695886", "text": "function module_exist($module_name)\n{\n return \\app\\core\\util\\MhcmsModules::module_exist($module_name);\n}", "title": "" }, { "docid": "083a28dcd10853d27218d1f5b55dccd7", "score": "0.56920844", "text": "private function isCod($methodCode)\n\t{\n $codPayments = $this->packeteryConfig->getCodMethods();\n\t\treturn in_array($methodCode, $codPayments);\n\t}", "title": "" }, { "docid": "e58fd93d2b92c3fc582c74c025191dc2", "score": "0.56771964", "text": "function __construct($code)\n\t{\n\t\t// return false if code is invalid\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5676217", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5676217", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5676217", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5676217", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5676217", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5676217", "text": "public function getCode(): string;", "title": "" }, { "docid": "f40d54a9f001654a3383d741fa05b2cd", "score": "0.5638233", "text": "public function checkCode($link) {\n $this->db->where(\"unique_code\", $link);\n return $this->db->get($this->_table)->row_array();\n }", "title": "" }, { "docid": "04b00b39be6748a029a9fedf972977bc", "score": "0.56377286", "text": "public function get_code( $code ) {\n \n $this->db->select('*');\n $this->db->from($this->table);\n $this->db->where('code', $code);\n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n return $query->result();\n \n } else {\n \n return false;\n \n }\n \n }", "title": "" }, { "docid": "5924039763632096842658d068234139", "score": "0.5633031", "text": "public function checkCouponValidity($code) {\n $db = new Database();\n $conn = $db->getConnection();\n \n $stmt = $conn->prepare(\"SELECT * FROM coupons WHERE coupons.CODE LIKE ?\");\n \n if(!$stmt) {\n $conn->close();\n return false; // problem with the database so do no allow code to be used\n }\n \n $stmt->bind_param('s', $code);\n $stmt->execute();\n \n $result = $stmt->get_result();\n if($result->num_rows < 1) { //this code was not found in the database to return true\n $conn->close();\n return false;\n }\n \n $conn->close();\n return true; //there was a matching code so return true\n }", "title": "" }, { "docid": "ad9744cdf64c1a48f200f198544e2023", "score": "0.56308806", "text": "public function code(): int;", "title": "" }, { "docid": "d8e004d2a81303b0f97e7e03bd03dfef", "score": "0.5618616", "text": "public function validateCode($code)\n {\n return $this->_engine->validateCode($code);\n }", "title": "" }, { "docid": "0cb9c346d6e87fdd8a551365fe4158f6", "score": "0.56158954", "text": "function evalSyntax($code) {\n ob_start(); // Catch potential parse error messages\n $code = eval('if(0){' . \"\\n\" . $code . \"\\n\" . '}'); // Put $code in a dead code sandbox to prevent its execution\n ob_end_clean();\n return $code !== false;\n }", "title": "" }, { "docid": "9555bc3efe58d5263699b8695facbdb6", "score": "0.5608109", "text": "function lookupUpcUpcdatabaseDotOrg($code, $key) {\n\treturn false;\n}", "title": "" }, { "docid": "412d768ab1ae8f9877f42d30b6472ea3", "score": "0.56072116", "text": "public function isSupCodeValid($code){\n\t\t$dbOps = new DBOperations();\n\t\ttry{\n\t\t\t$con = new mysqli($dbOps->servername, $dbOps->username, $dbOps->password, $dbOps->dbname); //create the db connection\n\t\t\t$query = \"SELECT * FROM suppliers WHERE supplier_code = {$code}\";\n\t\t\t$result = $con->query($query);\n\t\t\tif($result->num_rows > 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}catch(mysqli_sql_exception $e){\n\t\t\techo \"In the isMessageValid: \".$e;\n\t\t}\n\n\t}", "title": "" }, { "docid": "47a718f031e7a41f75f1ea041d37e150", "score": "0.55951166", "text": "public function getCode() : string;", "title": "" }, { "docid": "9981b071b2217b9cf71572164c98ad4d", "score": "0.5592015", "text": "public function CodeMatch($data){\r\n $check_em = getAnything('users',array('email'=>$data['email'],'code'=>$data['code']),'user_id');\r\n if(count($check_em)==0){\r\n return 0;\r\n }else{\r\n return $check_em;\r\n }\r\n }", "title": "" }, { "docid": "eb8efe2cd9d6f60393c88eb9d4128641", "score": "0.5587183", "text": "public function getCode(): ?string;", "title": "" }, { "docid": "f6103073533d18d6cecb9f1e0cd4012c", "score": "0.55827916", "text": "abstract public function getCode(): string;", "title": "" }, { "docid": "f9981ba496a1dee1d122d63e1a281e89", "score": "0.55810726", "text": "public function generateCode(){\n $code = 'HDF-'.substr(str_shuffle(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\"), 0, 60);\n $codeExist = HealthDeclaration::where('code', '=', $code)->get();\n if(sizeof($codeExist) > 0){\n $this->generateCode();\n }else{\n return $code;\n }\n }", "title": "" }, { "docid": "f6abe69966b5df078cb4ed791c34a69f", "score": "0.55768967", "text": "public function existsIso3($code) {\n\t\treturn boolval($this->getQueryClass()->filterByIso3($code)->count());\n\t}", "title": "" }, { "docid": "eabc50dddf5c78bb1e330d19b14d5dd6", "score": "0.55734277", "text": "function loadcode($code) {\n $c = null;\n }", "title": "" }, { "docid": "e3bb86352307a73a99fccd33afb57bef", "score": "0.55660164", "text": "public function contains($code)\n {\n foreach ($this->jobs as $job)\n {\n if ($job->getCode() == $code)\n {\n return (true);\n }\n }\n\n return (false);\n }", "title": "" }, { "docid": "b3f1020bfa755a045792dfa447e962a7", "score": "0.5565175", "text": "function scriptFound( $haystack, $needle ) {\n\t\n \t$pos = strpos( $haystack, $needle );\n \t\n \tif ( $pos === false ) {\n\t\treturn false;\n } else {\n return true;\n }\n\n}", "title": "" }, { "docid": "ac057ee352ad198186787f4ec10cd43c", "score": "0.5561965", "text": "public function checkIllegalCode($filePath){\n\t\t$fp = fopen($filePath, \"r\");\n\t\t$ofile = fread($fp, filesize($filePath));\n\t\tfclose($fp);\n\n\t\tif (preg_match('/<\\\\?php./i', $ofile)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "71a84aabe5edd79ce6a3f2d2c423c475", "score": "0.55493957", "text": "protected function checkCode($code) \r\n {\r\n // We'll check if there's a verification record belonging to the authenticated user\r\n // Then will compare the code from incoming request with our record \r\n // If verification code is valid and not expired, we will return null\r\n\r\n $verification = Verification::where('user_id', Auth::id())->first();\r\n \r\n if (isset($verification) && hash::check($code, $verification->code)) {\r\n\r\n // We have to check if verification code has expired\r\n if ($this->expiredCode($verification->created_at)) {\r\n return $this->response(static::EXPIRED_CODE);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n return $this->response(static::INVALID_CODE);\r\n }", "title": "" }, { "docid": "19340a2d3f64e5cce19cf84c20a64e51", "score": "0.5531242", "text": "public function testMethodExistsDoesntBreak(): void {\n\t\t$this->assertEquals(1, $this->runAnalyzerOnFile('.2.inc', ErrorConstants::TYPE_UNKNOWN_METHOD));\n\t}", "title": "" } ]
076f6c8ac75ea2251916bb6ddb586554
Get all sites for a user which are not linked to the user.
[ { "docid": "002fa9f9d321b168d25db67741a0633f", "score": "0.7672501", "text": "public static function getUnlinkedSites($userid)\n\t{\n\t\t$userid = (int) $userid;\n\t\t$regat = GDO::table('WC_Regat')->getTableName();\n\t\treturn GDO::table(__CLASS__)->selectObjects('*', \"(IF((SELECT 1 FROM $regat WHERE regat_sid=site_id AND regat_uid=$userid), 0, 1)) AND site_status='up'\", \"site_name ASC\");\n\t}", "title": "" } ]
[ { "docid": "9ea3339e8c6e7c73502053eee77dcdd5", "score": "0.62604415", "text": "function getSites($user, $type = null);", "title": "" }, { "docid": "8f0ecc49c972daece2088d3bc7d64802", "score": "0.5971713", "text": "private function fetchUserSites() {\n $user_id = Session::getValue('user_uuid');\n $response = $this->request->pagedRequest(\n 'users/' . $user_id . '/memberships/sites'\n );\n\n $memberships_data = array();\n foreach ($response['data'] as $membership) {\n $site = (array)$membership->site;\n $member_data = array(\n 'id' => $user_id,\n 'name' => 'Team',\n 'type' => 'team'\n );\n $memberships_data[] = $this->getSiteData($site, $member_data);\n }\n\n return $memberships_data;\n }", "title": "" }, { "docid": "d6e9ea3e1428cf6d5f5dd7cc829a65aa", "score": "0.58229774", "text": "function get_user_sites($user_guid, $limit = 10, $offset = 0) {\n\t$user_guid = (int)$user_guid;\n\t$limit = (int)$limit;\n\t$offset = (int)$offset;\n\n\treturn elgg_get_entities_from_relationship(array(\n\t\t'site_guids' => ELGG_ENTITIES_ANY_VALUE,\n\t\t'relationship' => 'member_of_site',\n\t\t'relationship_guid' => $user_guid,\n\t\t'inverse_relationship' => FALSE,\n\t\t'type' => 'site',\n\t\t'limit' => $limit,\n\t\t'offset' => $offset,\n\t));\n}", "title": "" }, { "docid": "ec47cfbedab54463ec4e2302fe8838ad", "score": "0.581832", "text": "public function getReachableSitesFromOwnedObjectRoles(\\User $user)\n {\n // Build the list of sites a user is allowed to add an SE to\n $sites = array();\n $roles = $user->getRoles();\n foreach ($roles as $role) {\n if ($role->getStatus() == \\RoleStatus::GRANTED) {\n if ($role->getOwnedEntity() instanceof \\Site) {\n $sites[] = $role->getOwnedEntity();\n }\n\n // If the role is over an NGI add all of the NGI's child sites to the list\n if ($role->getOwnedEntity() instanceof \\NGI) {\n $ngiSites = $role->getOwnedEntity()->getSites();\n foreach ($ngiSites as $site) {\n $sites[] = $site;\n }\n }\n }\n }\n $sites = array_unique($sites);\n\n usort($sites, function ($alpha, $beta) {\n return strcmp($alpha, $beta);\n });\n return $sites;\n }", "title": "" }, { "docid": "504900984c9301395dfdedb89d3d2d2c", "score": "0.5697696", "text": "public function getAllExceptSuperAdmins()\n {\n return User::whereHas('roles', function($q) {\n $q->where('name', '!=', 'super admin');\n })->get();\n }", "title": "" }, { "docid": "e48bd971e0d69cdd5acd7e16cfc62834", "score": "0.5684465", "text": "function get_user_sites($p_id, $user_id) {\n $q = $this->db->join(\"global_sites gs\", \"gs.id = ps.site_id\")->get(\"p{$p_id}_sites ps\");\n if ($q->num_rows())\n return $q->row;else\n return false;\n }", "title": "" }, { "docid": "5065ca2178e73081541e41a3566cd6ef", "score": "0.5666514", "text": "function get_all_wamp_sites(){\n \n $dir = $this->path_to_sites;\n $files = scandir($dir);\n \n //exclude stuff we don't want\n foreach ($files as $key => $link) {\n \n //not a directory\n if(!is_dir($dir.$link)){\n unset($files[$key]);\n }\n \n //dots\n if('.' == $link){\n unset($files[$key]);\n }\n if('..' == $link){\n unset($files[$key]);\n }\n \n //New folder\n if('New folder' == $link){\n unset($files[$key]);\n }\n \n //archive\n if('old' == $link){\n unset($files[$key]);\n }\n \n //not wordpress\n if('not_wordpress' == $link){\n unset($files[$key]);\n }\n }\n \n return($files);\n }", "title": "" }, { "docid": "97b164e415440aaf52ab63e10a12cdb0", "score": "0.55968094", "text": "public function getDisallowedWebsiteIds()\n {\n return $this->_disallowedWebsiteIds;\n }", "title": "" }, { "docid": "827cd5560635633b540b8a03fcda2c32", "score": "0.5582863", "text": "public function getSites()\n\t{\n\t\t$oSite = Core_Entity::factory('Site');\n\n\t\tif ($this->superuser == 0)\n\t\t{\n\t\t\t$oSite->queryBuilder()\n\t\t\t\t->select('sites.*')\n\t\t\t\t->join('company_department_modules', 'company_department_modules.site_id', '=', 'sites.id')\n\t\t\t\t->join('company_departments', 'company_department_modules.company_department_id', '=', 'company_departments.id')\n\t\t\t\t->join('company_department_post_users', 'company_department_post_users.company_department_id', '=', 'company_department_modules.company_department_id')\n\t\t\t\t->where('company_department_post_users.user_id', '=', $this->id)\n\t\t\t\t->where('company_departments.deleted', '=', 0)\n\t\t\t\t->groupBy('sites.id');\n\t\t}\n\n\t\treturn $oSite->findAll();\n\t}", "title": "" }, { "docid": "02fd7569785493d14f88dee6e68273c9", "score": "0.55630493", "text": "public function getNonRegisteredUsers()\n {\n $q = Doctrine_Query::create()\n ->from('sfGuardUser u')\n ->innerJoin('u.Profile p')\n ->where('p.'.$this->getEmailHashColumn().' IS NULL');\n\n return $q->execute()->getData();\n }", "title": "" }, { "docid": "d30834a77a19856ad35383666aca277d", "score": "0.55367553", "text": "public function getNonRegisteredUsers() {\n $q = Doctrine_Query::create()\n ->from('sfGuardUser u')\n ->where('u.' . $this->getEmailHashColumn() . ' IS NULL');\n\n return $q->execute()->getData();\n }", "title": "" }, { "docid": "70fca160df39a0dd3a7c326fbf611d87", "score": "0.55280656", "text": "public static function get_networks( $user_id ) {\n\t\tglobal $wpdb;\n\n\t\t$table_users = mnetwork_get_table_name();\n\n\t\t$query = \"SELECT DISTINCT(network_id) FROM {$table_users} WHERE user_id = %d\";\n\t\t$networks = $wpdb->get_col( $wpdb->prepare( $query, $user_id ) );\n\n\t\treturn $networks;\n\t}", "title": "" }, { "docid": "73a8757acb352dccd3da2afce8613057", "score": "0.54575104", "text": "public static function get_ignore_urls() {\n\t\t$extras = get_option( self::IGNORE_URLS_STORAGE );\n\t\t$ignores = empty( $extras ) || ! is_array( $extras )\n\t\t\t? array()\n\t\t\t: array_filter( array_unique( $extras ) );\n\n\t\treturn apply_filters( 'wds-sitemaps-ignore_urls', $ignores );\n\t}", "title": "" }, { "docid": "a80a4f897c2f4c93629fa04824e78e7b", "score": "0.54563683", "text": "public function getAvailableSitesForUser($nb_user)\n {\n return CNabuUser::getAvailableSitesForUser($this, $nb_user);\n }", "title": "" }, { "docid": "28673f9872419c487a23935ef673fbb7", "score": "0.540964", "text": "public static function getUserDomains($user_id)\n {\n $columns = array(\n 'WH_domain.*',\n );\n\n $results = Domain::select($columns)\n ->orderBy('WH_domain.name', 'ASC')\n ->join('WH_assigned_domain','WH_assigned_domain.domain_id', '=', 'WH_domain.id' , 'left')\n ->where('WH_assigned_domain.user_id', '=', (int)$user_id)\n ->get();\n\n return $results;\n }", "title": "" }, { "docid": "7616475451ee8ad8e13a1eb52a6ec1fb", "score": "0.5332285", "text": "public static function loadChallengesWithout(UserInterface $user) {\n $query = \\Drupal::entityTypeManager()\n ->getStorage('vchess_game')\n ->getQuery();\n $user_condition = $query->orConditionGroup()\n ->condition('white_uid', $user->id(), '<>')\n ->condition('black_uid', $user->id(), '<>');\n $ids = $query\n ->condition('status', GamePlay::STATUS_AWAITING_PLAYERS)\n ->condition($user_condition)\n ->sort('time_started', 'ASC')\n ->execute();\n return static::loadMultiple($ids);\n }", "title": "" }, { "docid": "9e71be676045c257990305ba501fce3b", "score": "0.5324986", "text": "public function getUnlinkedGateways()\n\t{\n\t\treturn $this->_em->createQuery(\"\n\t\t\tSELECT g\n\t\t\tFROM DeskPRO:EmailGateway g\n\t\t\tLEFT JOIN g.department dep\n\t\t\tWHERE dep IS NULL AND g.is_enabled = true\n\t\t\tORDER BY g.title ASC\n\t\t\")->execute();\n\t}", "title": "" }, { "docid": "301cb16e76d9e64d39afa10dbd45021a", "score": "0.5306309", "text": "public function getSites()\n {\n return $this->sites;\n }", "title": "" }, { "docid": "97fc4107cd7fc315782abc0298f57d39", "score": "0.52990377", "text": "public function findAllIsNotComplete($user)\n {\n $query = $this->getEntityManager()\n ->createQuery('\n SELECT quest FROM ItechSupQuestionnaireBundle:Questionnaire quest\n WHERE quest.id NOT IN(\n SELECT DISTINCT q.id FROM ItechSupQuestionnaireBundle:Reponse r\n JOIN r.question qt\n JOIN qt.categorie c\n JOIN c.questionnaire q\n WHERE r.user = :idUser)'\n )->setParameter('idUser', $user);\n\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n }\n }", "title": "" }, { "docid": "a293d80622b6603162d3c2ff2fbb9c20", "score": "0.5286467", "text": "public function listSiteIds() {\r\n\t\tif($this->sites == null) {\r\n\t\t\t$roles = $this->db->query('SELECT r.* FROM '.$this->tableName.'_roles ur JOIN usr_bo_roles r ON ur.roleid = r.id WHERE ur.userid='.(int) $this->id)->fetchAllRows();\r\n\r\n\t\t\t$ret = array();\r\n\t\t\tforeach ($roles as $role) $ret[$role['site_id']] = true;\r\n\t\t\t$this->sites = $ret;\r\n\t\t}\r\n\t\treturn $this->sites;\r\n\t}", "title": "" }, { "docid": "d97bd6eb02b359c88102d3f022921cfb", "score": "0.52832514", "text": "public function listNonRefereeUsers()\n {\n return $this->model->with('referee')->whereDoesntHave('referee')->pluck('username', 'id');\n }", "title": "" }, { "docid": "ec1a4e513a6266de4868f9776cab22b2", "score": "0.52815384", "text": "public function getStoreWebsites()\n {\n return $this->getStoreWebsiteRepository()->findAll();\n }", "title": "" }, { "docid": "1813d32f10bf339c83f069f49eeba59c", "score": "0.52521396", "text": "public function getSites($force = false)\n {\n if ($force) {\n $this->nb_site_list->clear();\n $this->nb_site_list->merge(CNabuSite::getAllSites($this));\n }\n\n return $this->nb_site_list->getItems();\n }", "title": "" }, { "docid": "1ee64e5890e42aaa1d029a902aaddfa7", "score": "0.5250982", "text": "public function getOnlyDeactivatedWebsites()\n {\n return cache()->tags('repository', 'website')\n ->rememberForever('only-deactivated-websites', function () {\n return $this->model->onlyDeactivated()->get();\n });\n }", "title": "" }, { "docid": "2c118c22dcce1fc0a416cdc5a1357c85", "score": "0.52120775", "text": "public function getSiteList(){\n\t\treturn $this->sitesService->getSiteList();\n\t}", "title": "" }, { "docid": "1d905627f59d09bbbc9c5f42fad56171", "score": "0.52101886", "text": "public function getSites(): array\n {\n return Craft::$app->getSites()->getSitesByGroupId($this->id);\n }", "title": "" }, { "docid": "70c74820dd904a5028e581372b4ade53", "score": "0.5178988", "text": "public static function getOfflineUsers()\n {\n return User::where('active', 0);\n }", "title": "" }, { "docid": "88296e3706ddacaf2310eddf96ec1310", "score": "0.517138", "text": "protected function getExcludedCredentials(WebAuthnAuthenticatable $user): array\n {\n return $this->unique ? $user->attestationExcludedCredentials() : [];\n }", "title": "" }, { "docid": "365ab21c1cecbe6571a4b2728ad8f4e0", "score": "0.5159484", "text": "public static function getHiddenPosts($username)\n {\n $posts = DB::Select(\"SELECT * from links as l where l.parent_id is null and l.link_id in (\n select h.link_id from hidden_posts as h where h.username = '$username'\n ) order by l.link_date DESC\");\n\n return $posts;\n }", "title": "" }, { "docid": "0c10222f0a09905deb4cc08b487ea8b2", "score": "0.51554155", "text": "public function getReachableServicesFromOwnedObjectRoles(\\User $user)\n {\n $ses = array();\n // Get all sites the user has a role over\n $sites = $this->getReachableSitesFromOwnedObjectRoles($user);\n foreach ($sites as $site) {\n foreach ($site->getServices() as $se) {\n $ses[] = $se;\n }\n }\n return array_unique($ses);\n }", "title": "" }, { "docid": "79aea6115b5982d65cd28cb405f234b4", "score": "0.51532483", "text": "public static function findNotSeenUserSuggestions($userId)\n {\n $query = new Query();\n $search = $query->from(self::INDEX, self::TYPE)\n ->query([\n 'bool' => [\n 'must' => [\n [\n 'match' => [\n 'user_id' => $userId,\n ],\n ],\n [\n 'match' => [\n 'sent_to_user' => false,\n ],\n ],\n ],\n ],\n ])\n ->createCommand()\n ->search();\n\n $suggestions = [];\n foreach ($search['hits']['hits'] as $result) {\n array_push($suggestions, $result['_source']);\n }\n\n return $suggestions;\n }", "title": "" }, { "docid": "7e7f99f9c43f33d59c994a216d12fd8a", "score": "0.5122115", "text": "public static function getSites(){\n\t\n\t\t$data = Doctrine_Query::create()\n\t\t->select('s.address, s.longitude, s.latitude, s.id')\n\t\t->from('site s')\n\t\t->where('s.deleted = 0')\n\t\t->orderBy('s.id ASC')\n\t\t->fetchArray();\n\t\t\n\t\treturn $data;\n\t\n\n\t}", "title": "" }, { "docid": "50d2bc39315f54de68a0a44d7e6aacf2", "score": "0.511151", "text": "public function notActiveUsers()\n {\n return $this->users->findNotActivePaginated();\n }", "title": "" }, { "docid": "a1ab5dbd1f03cc85e058716d523abca4", "score": "0.51026917", "text": "public function getDomains(UserInterface $user)\n {\n $q =\n $this->getRepository()\n ->createQueryBuilder('d')\n ->select('d.domain')\n ->addSelect('count(d.id) as c')\n ->where('d.user = :user')\n ->andWhere('d.deleted = false')\n ->setParameter('user', $user)\n ->groupBy('d.domain')\n ->orderBy('c', 'DESC')\n ->getQuery();\n\n $result = [];\n foreach ($q->getArrayResult() as $item) {\n $result[] = new Domain($item['domain'], $item['c']);\n }\n return $result;\n }", "title": "" }, { "docid": "bac81d7400809bd938c215070ec4dbe4", "score": "0.51018596", "text": "public function getUnseenUserNotifications($user)\n {\n return $this->repository->findBy(\n array(\n 'user' => $user,\n 'seen' => false\n ),\n array('date' => 'DESC')\n );\n }", "title": "" }, { "docid": "688ee510a90c6fe334dd26446a6b074f", "score": "0.5100605", "text": "protected function get_sites() {\n\n\t\tif ( isset( $this->sites ) && is_array( $this->sites ) ) {\n\t\t\treturn array_keys( $this->sites );\n\t\t}\n\n\t\t$args = array(\n\t\t\t'limit' => 200,\n\t\t\t'offset' => 0,\n\t\t);\n\t\t$sites = array();\n\t\tif ( ! is_multisite() ) {\n\t\t\treturn $this->sites;\n\t\t}\n\t\tdo {\n\n\t\t\t$sites_results = get_sites( $args );\n\t\t\t$sites = array_merge( $sites, $sites_results );\n\n\t\t\t$args['offset'] += $args['limit'];\n\n\t\t} while ( $sites_results );\n\n\t\t$this->sites = array();\n\t\tforeach ( $sites as $site ) {\n\t\t\t$site_slug = $this->get_site_slug( $site );\n\t\t\t$this->sites[ $site_slug ] = $site;\n\t\t}\n\t\treturn array_keys( $this->sites );\n\t}", "title": "" }, { "docid": "b4c50a674ef53d0203f2c0ab8de3d097", "score": "0.5071401", "text": "function get_excluded_friends_ids( $user_id = null ) {\n\n\t\t// Get User Friends\n\t\t$user_friends = (array) friends_get_friend_user_ids( $user_id );\n\n\t\t// Get User Friendship requests List.\n\t\t$friendship_requests = $this->get_user_friendship_requests( $user_id );\n\n\t\t// List of Refused Suggestions\n\t\t$refused_friends = (array) self::get_refused_friend_suggestions( $user_id );\n\n\t\t// make an array of users group+groups hidden by user\n\t\t$excluded_ids = array_merge( $user_friends, $friendship_requests, $refused_friends );\n\n\t\t// Remove Repeated ID's.\n\t\t$excluded_ids = array_unique( $excluded_ids );\n\n\t\treturn $excluded_ids;\n\t}", "title": "" }, { "docid": "ca0fb295b546b52782eb9487cded37c1", "score": "0.5060723", "text": "function yandex_webmaster_get_excluded_pages($host_id = 0) {\r\n $stats = yandex_webmaster_get_query('excluded', $host_id);\r\n if (isset($stats['error'])) {\r\n return $stats;\r\n }\r\n $result = $stats['result'];\r\n $xml = simplexml_load_string($result->data);\r\n // Fill excluded pages stats.\r\n $stats['url-errors'] = number_format(current($xml->{'url-errors'}->attributes()->{'count'}), 0, '', ' ');\r\n $stats['url'] = array();\r\n $links = $xml->{'url-errors'}->{'url-errors-with-code'};\r\n foreach ($links as $url) {\r\n $stats['url'][] = array(\r\n 'code' => current($url->attributes()->{'code'}),\r\n 'count' => current($url->count),\r\n 'severity' => current($url->severity),\r\n );\r\n }\r\n return $stats;\r\n}", "title": "" }, { "docid": "cce97c8044e9281266da85588481a9e0", "score": "0.5051629", "text": "public function getSites()\n {\n return self::getCollection('/sites');\n }", "title": "" }, { "docid": "a84c6c1c05b5f78fc9dd1f86cbedafce", "score": "0.5050881", "text": "public function return_sites() {\n return $this->sites;\n }", "title": "" }, { "docid": "c6ae3a5cea7024fddd9321f08834b6d4", "score": "0.50453484", "text": "function bpdev_exclude_users($qs = false, $object = false) {\n //list of users to exclude\n\n // only for logged in user\n if (!is_user_logged_in()) {\n return $qs;\n }\n\n //comma separated ids of users whom you want to exclude\n $excluded_user = bp_loggedin_user_id();\n\n //hide for members only\n if($object != 'members') {\n return $qs;\n }\n\n $args = wp_parse_args($qs);\n\n //check if we are searching or we are listing friends?, do not exclude in this case\n if(!empty($args['user_id']) || !empty($args['search_terms'])) {\n return $qs;\n }\n\n if(!empty($args['exclude'])) {\n $args['exclude'] = $args['exclude'] . ',' . $excluded_user;\n } else {\n $args['exclude'] = $excluded_user;\n }\n\n return build_query($args);\n}", "title": "" }, { "docid": "e3906892e35f0ebbf0c09396e865d107", "score": "0.50445926", "text": "public function listSites() {\r\n\t\tif(!class_exists('Site')) require_once('Site.class.php');\r\n\r\n\t\tif($this->sites_obj == null) {\r\n\t\t\t$ids = $this->listSiteIds();\r\n\r\n\t\t\tif(!empty($ids)) {\r\n\t\t\t\t$ret = new Site();\r\n\t\t\t\t$this->sites_obj = $ret->getList(null, 'WHERE id IN ('.implode(', ', $ids).')');\r\n\t\t\t} else return array();\r\n\t\t}\r\n\t\treturn $this->sites_obj;\r\n\t}", "title": "" }, { "docid": "5df240374443c1be3e33f8ef288ea99a", "score": "0.503956", "text": "public static function getAllBlocked(){\n return User::where('status', '!=', 'active')->orderBy('created_at', 'DESC')->paginate(20);\n }", "title": "" }, { "docid": "d0a587685e1a411351e1f40b1947db22", "score": "0.5032593", "text": "public function getNonFriendsForUser(User $user)\n {\n if ($user === null) {\n return null;\n }\n\n $qb2 = $this->getEntityManager()->createQueryBuilder();\n $query2 = $qb2->select('f.friend_id')\n ->distinct()\n ->from('BangnationUserBundle:Friendship', 'f')\n ->where(\"f.user_id = {$user->getId()}\")\n ->getQuery()\n ;\n $results = $query2->execute();\n $parameters = array();\n foreach ($results as $result) {\n $parameters[] = $result['friend_id'];\n }\n\n $qb = $this->getEntityManager()->createQueryBuilder();\n $qb\n ->select('u')\n ->from('BangnationUserBundle:User', 'u')\n ;\n \n if (count($parameters) > 0) {\n $qb->add('where', $qb->expr()->notIn('u.id', $parameters));\n }\n\n $query = $qb->getQuery();\n\n return $query->execute();\n }", "title": "" }, { "docid": "1efbca676b6b39a4f4767c79bf123feb", "score": "0.5021818", "text": "function get_users_without_posts(){\n $sql = \"SELECT * FROM User\n WHERE NOT EXISTS(SELECT User.user_id \n FROM Post\n WHERE User.user_id = Post.user_id)\n ORDER BY username ASC\";\n $users = DB::select($sql);\n return $users;\n}", "title": "" }, { "docid": "e43ebfa85366a34453bcdc6b0aed12fc", "score": "0.5019675", "text": "protected function getExcludedCredentials(User $user): array\n {\n return $this->repository->getRegisteredKeys($user);\n }", "title": "" }, { "docid": "5b293e07db8aade00df7dfacf2201484", "score": "0.5016606", "text": "function getAllSites() {\n require 'model/SiteModel.php';\n $model = new SiteModel();\n $result = $model->getAllSites(); \n return $result;\n }", "title": "" }, { "docid": "22f25a5c721fadd80a597bdd11ac9519", "score": "0.49908304", "text": "public function getNotAssignUsers($users, $key='') {\r\n if($users){\r\n $users = $this->_userDb->where(array('id'=>array('not in',$users),'realname'=>array('like',\"%\".$key.\"%\")))->field('id,realname,phone')->select();\r\n }else if($key){\r\n $users = $this->_userDb->where(array('realname'=>array('like',\"%\".$key.\"%\")))->field('id,realname,phone')->select();\r\n }else{\r\n $users = $this->_userDb->field('id,realname,phone')->select();\r\n }\r\n $ret = array();\r\n foreach ($users as $user) {\r\n $ret[$user['id']] = $user;\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "015dbf213bdb456108d3637061b2a181", "score": "0.49903437", "text": "public function getInternalDomains()\n {\n $internalDomains = [];\n $host = parse_url($this->siteUrl, PHP_URL_HOST) ?: 'localhost';\n $internalDomains[] = '#^' . preg_quote($host, '#') . '$#';\n\n return $internalDomains;\n }", "title": "" }, { "docid": "31302bc494f94f152224bc14abe45349", "score": "0.49897158", "text": "public function getSitesCommunes()\r\n {\r\n $req = $this->select()\r\n ->setIntegrityCheck(false) // pour pouvoir faire une jointure\r\n ->distinct()\r\n ->from(array('s'=>$this->_name), array('NOM_SITE', 'LOC_SITE','ID_SITE','STAT_SITE'))\r\n ->join(array('co'=>'T_COMMUNE'),'s.ID_COMMUNE=co.ID_COMMUNE', 'NOM_COMMUNE')\r\n ->where('s.USED_SITE = 1')\r\n ->order('NOM_COMMUNE DESC, ID_SITE ASC')\r\n ;\r\n return $this->fetchAll($req)->toArray();\r\n }", "title": "" }, { "docid": "653a7f2ff9974e704dc475db0a568b1f", "score": "0.49847677", "text": "protected function loadUsersnotinme()\n {\n $find = array('id' => $this->get('users'));\n $userids = self::getSubObjectIDs(\n 'User',\n $find,\n 'id',\n true\n );\n $types = array();\n self::$HookManager->processEvent(\n 'USER_TYPES_FILTER',\n array('types' => &$types)\n );\n $users = array();\n foreach ((array)self::getClass('UserManager')\n ->find(array('id' => $userids)) as &$User\n ) {\n if (in_array($User->get('type'), $types)) {\n continue;\n }\n $users[] = $User->get('id');\n unset($User);\n }\n unset($userids, $types);\n $this->set('usersnotinme', $users);\n }", "title": "" }, { "docid": "efce1975c1bfe2c0f048eb7d9d401f83", "score": "0.49811515", "text": "public function get_all_without_links()\r\n {\r\n return $this->queryAll('\r\n SELECT tt.*\r\n FROM transporter_targets tt\r\n LEFT JOIN transporter_target_enum_type_links metl ON metl.id_transporter_target = tt.id\r\n WHERE metl.id_enum_type_link IS NULL\r\n ORDER BY name\r\n ');\r\n }", "title": "" }, { "docid": "e5098ff821b32141b47e6ea92b913ff1", "score": "0.4960195", "text": "public function get_sites() {\n\n // Pick function depending on which version of WP is used\n if( function_exists( 'get_sites' ) ) {\n\t\t\t$this->sites = get_sites();\n\t\t} else {\n\t\t\t$this->sites = wp_get_sites();\n\t\t}\n\n // Backwards compatibility\n foreach ( $this->sites as $id => $site ) {\n if( function_exists( 'get_sites' ) ) {\n \t\t\t$this->sites[$id] = get_blog_details( $site->blog_id );\n \t\t} else {\n \t\t\t$this->sites[$id] = get_blog_details( $site['blog_id'] );\n \t\t}\n }\n\n // Filter the sites\n foreach ( $this->sites as $id => $site ) {\n // Remove primary site\n if( $this->args['include_primary'] == false && $site->blog_id == BLOG_ID_CURRENT_SITE ) {\n unset( $this->sites[$id] );\n }\n\n // Filter by search term\n if( $this->args['search'] != false ) {\n $name = strtolower( $site->blogname );\n $search = strtolower( $this->args['search'] );\n\n if( !strstr( $name, $search ) ) {\n unset( $this->sites[$id] );\n }\n }\n }\n\n // Write vars\n $this->total_sites = count( $this->sites );\n\n // Sort sites\n usort( $this->sites, array( $this, 'sorting_' . $this->args['sorting'] . '_' . $this->args['order'] ) );\n\n // Paging\n $offset = $this->args['posts_per_page'] * $this->args['page'] - $this->args['posts_per_page'];\n $this->sites = array_slice( $this->sites, $offset, $this->args['posts_per_page'] );\n\n\t\treturn $this->sites;\n\n }", "title": "" }, { "docid": "e8220c4098ca23f6b984f730c099417d", "score": "0.49580166", "text": "public function sites()\n {\n if (!class_exists(\\Modules\\Site\\Entities\\Page::class, false)) {\n throw new \\Exception('in order to use User::sites() you have to install the \\'vain-sites\\' module');\n }\n\n return $this->hasMany(\\Modules\\Site\\Entities\\Page::class);\n }", "title": "" }, { "docid": "4e246266f26a6c728add7f3fb0623f68", "score": "0.49495497", "text": "function getUserConfigsNoCluster($userconfigs) {\n\t\tif(empty($userconfigs))\n\t\t\treturn array();\n\t\t$inlist = implode(',', array_keys($userconfigs));\n\t\t$query = \"SELECT c.id, \"\n\t\t . \"c.name \"\n\t\t . \"FROM config c, \"\n\t\t . \"configtype ct \"\n\t\t . \"WHERE c.configtypeid = ct.id AND \"\n\t\t . \"ct.name != 'cluster' AND \"\n\t\t . \"c.id in ($inlist)\";\n\t\t$configs = array();\n\t\t$qh = doQuery($query);\n\t\twhile($row = mysqli_fetch_assoc($qh))\n\t\t\t$configs[$row['id']] = $row['name'];\n\t\treturn $configs;\n\t}", "title": "" }, { "docid": "7ba494710cec6f60330c6e05b5004d1f", "score": "0.49492633", "text": "public function getAllUsers()\n {\n $user = Auth::user();\n $siteUsers = [];\n\n if ($user->hasRole('super_admin', null)) {\n $siteUsers = User::with('languages', 'marriage_mate')->get();\n\n foreach($siteUsers as $key => $user) {\n $targetUser = User::find($user->id);\n $userRoles = $targetUser->getRoles();\n $siteUsers[$key]['site_roles'] = $userRoles;\n };\n\n return RB::success(['users' => $siteUsers]);\n } else {\n return RB::error(403); // Access denied\n }\n\n }", "title": "" }, { "docid": "9079f85780465cf06f664491711ec0eb", "score": "0.4942236", "text": "function get_sites($query, $data = true) {\n\t\tif(is_array($query)) {\n\t\t\t$query['server'] = $this->id;\n\t\t} else {\n\t\t\t$query = array('server'=>$this->id); // singular query passed.\n\t\t}\n\t\treturn get_sites($query, 'name', 'ASC', 10000, 1, false, true);\n\t}", "title": "" }, { "docid": "9079f85780465cf06f664491711ec0eb", "score": "0.4942236", "text": "function get_sites($query, $data = true) {\n\t\tif(is_array($query)) {\n\t\t\t$query['server'] = $this->id;\n\t\t} else {\n\t\t\t$query = array('server'=>$this->id); // singular query passed.\n\t\t}\n\t\treturn get_sites($query, 'name', 'ASC', 10000, 1, false, true);\n\t}", "title": "" }, { "docid": "547d7f47fcfb95ecd2b8182a84a8c6b7", "score": "0.49353403", "text": "public function getDislikeShop($user_id){\r\n return $this->shopDAO->getDislikeShop($user_id);\r\n\t}", "title": "" }, { "docid": "8e6d04d9be9015b05e947ad0daed8fe9", "score": "0.4927676", "text": "public function getAllWebsites() {\r\n \t$storeManager = $this -> objectManager -> get('Magento\\Store\\Model\\StoreManagerInterface');\r\n\t\t$allWebsites = $storeManager -> getWebsites();\r\n\t\tforeach ( $allWebsites as $val ) {\r\n\t\t\t$websites_mapping[] = $val -> getData();\r\n\t\t}\r\n\t\treturn ( $websites_mapping ) ? $websites_mapping : null;\r\n }", "title": "" }, { "docid": "e25591d94785aac6645914aae627a557", "score": "0.49248698", "text": "public static function exclude_existing_customers_from_query( $wp_user_query ) {\n\t\tglobal $wpdb;\n\n\t\t$wp_user_query->query_where .= \" AND NOT EXISTS (\n\t\t\tSELECT ID FROM {$wpdb->prefix}wc_customer_lookup\n\t\t\tWHERE {$wpdb->prefix}wc_customer_lookup.user_id = {$wpdb->users}.ID\n\t\t)\";\n\t}", "title": "" }, { "docid": "3b35369a470a12d6c959129ccf673032", "score": "0.4920822", "text": "public function getWebsiteIds()\n {\n if ($this->_adminRole) {\n $gwsWebsites = $this->_adminRole->getGwsWebsites();\n return is_array($gwsWebsites) ? $gwsWebsites : [];\n }\n\n return [];\n }", "title": "" }, { "docid": "7e3611f3ebdf0618644c3aa41ce21387", "score": "0.49198163", "text": "public function sites() {\n return $this->hasManyThrough(\n Site::class,\n Subscription::class,\n 'user_id', // Foreign on Sub\n 'subscription_id', // Foreign on Site\n 'id', // local on this (User)\n 'id' // local on Sub\n )->orderBy('sites.created_at', 'desc');\n }", "title": "" }, { "docid": "557eca0ea70185e0bda7549b082cc5c1", "score": "0.4913161", "text": "function loadExternal(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM external_sites E \n\t\t\t\tLEFT JOIN user_external U \n\t\t\t\tON E.id = U.siteid \n\t\t\t\tWHERE U.userid = '{$this->id}' \n\t\t\t\tAND E.active = '1'\n\t\t\t\tAND U.username != '' \n\t\t\t\tORDER BY site ASC\";\n\t\t\t\t\n\t\t$result = $this->db->exec($sql);\n\t\t\n\t\tforeach( $result as $k=>$v){\n\t\t\t$link = str_replace('%uname%', $v['username'], $v['url']) ;\n\t\t\t$link = str_replace('%uid%', $v['uid'], $link) ;\n\t\t\t\n\t\t\t$result[$k]['url'] = $link;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "280d3411c2a60faa53ecb932109a3259", "score": "0.49107403", "text": "private function collectUserFeeds() {\n if($this->_user->super) {\n $feeds = \\ORM::for_table('feeds')->find_array();\n } else {\n $feeds = \\ORM::for_table('feeds')->join('feeds_users', array('feeds.id', '=', 'feeds_users.feed_id'))->where('feeds_users.user_id', $this->_user->id)->find_array();\n }\n return $feeds;\n }", "title": "" }, { "docid": "0f008ac02069f1bd4ce3752eed6b8465", "score": "0.4906176", "text": "public function getTop10SiteDomains($user_id, $type, $date)\n {\n\t $method = 'GET';\n\t $options = array(\n\t 'server_uri' => $this->url . '/restapi/users/' . $user_id . '/stats/domains/' . $type . '/' . $date,\n\t );\n\t \n\t return $this->makeApiCall($options, $method);\n }", "title": "" }, { "docid": "012f63ef922b44b1d2c15e65cf08b19a", "score": "0.48847154", "text": "public function getAllUnPublishStaticPagesList()\n { \n $dbtable = new Zend_Db_Table('tbl_static_pages');\n $select = $dbtable->select()\n ->where('is_publish =?',0)\n ->order('id');\n $result = $dbtable->fetchAll($select);\n return $result;\n }", "title": "" }, { "docid": "ef7174e88911a388844a3b63124550ff", "score": "0.48745918", "text": "public function getAllOnlineUsers($user_id = 0) {\n $result = $this->helper->db_select(\"*\", \"tb_usertokens\", \"WHERE `status`='online' && user_id != $user_id\");\n return $result;\n }", "title": "" }, { "docid": "17222723d71490c075dd1107c6497058", "score": "0.48696497", "text": "protected function _getWebsitesMap()\n {\n $map = array();\n foreach ($this->_app->getWebsites(true) as $website) {\n if ($website->getDefaultStore()) {\n $map[$website->getId()] = $website->getDefaultStore()->getId();\n }\n }\n return $map;\n }", "title": "" }, { "docid": "1d83033c645aff75cbe4089608b65db2", "score": "0.48632762", "text": "function getFailedClientSites()\r\n\t\t{\r\n\t\t\t$ResultArray = array();\r\n\t\t\t$xml = getXML(\"&service=list_clients\");\r\n\t\t\tforeach ($xml->items->client as $client)\r\n\t\t\t{\r\n\t\t\t\t$FailedSiteFound = false;\r\n\t\t\t\t$TempClientArray['ClientId'] = (string)$client->clientid;\r\n\t\t\t\t$ClientName = explode(\" (\", (string)$client->name);\r\n\t\t\t\t$TempClientArray['ClientName'] = $ClientName[0];\r\n\t\t\t\t$TempClientArray['Sites'] = array();\r\n\t\t\t\t\r\n\t\t\t\t$xml2 = getXML(\"&service=list_sites&clientid=\" . $TempClientArray['ClientId']);\r\n\t\t\t\tforeach ($xml2->items->site as $site)\r\n\t\t\t\t{\r\n\t\t\t\t\t$TempSiteArray = array();\r\n\t\t\t\t\t$TempSiteArray['Connected'] = (string)$site->connection_ok;\r\n\t\t\t\t\t$TempSiteArray['SiteName'] = (string)$site->name;\r\n\t\t\t\t\tif($TempSiteArray['Connected'] == \"0\") {\r\n\t\t\t\t\t\t$FailedSiteFound = true;\r\n\t\t\t\t\t\tarray_push($TempClientArray['Sites'], $TempSiteArray);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($FailedSiteFound)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($ResultArray, $TempClientArray);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $ResultArray;\r\n\t\t}", "title": "" }, { "docid": "79f9c9f776dfed0e0fc2524d8bef3f01", "score": "0.48584834", "text": "static function getAllOnlineUsers($user_id){\n $res = mysql_query(\"SELECT * FROM users WHERE status='online' AND user_id!=$user_id\");\n $users = array();\n while($row = mysql_fetch_assoc($res)){\n $users[] = $row;\n }\n return $users;\n }", "title": "" }, { "docid": "b71bdf9819e7e3cf927d78d78a686b57", "score": "0.48509032", "text": "public static function retrieve_urls($user)\n {\n // Variable for main view filename\n $view = '/var/www/html/mediaflow/application/views/pages/home.php';\n\n // Load the document\n\t$doc = new DOMDocument();\t\n\t$doc->loadHTMLFile($view);\n\t$doc->formatOutput = true;\n\t\n\t//determine place to insert URLS\n\t$ul = $doc->getElementsByTagName('ul')->item(0);\n\n\t// setup DB connection - root for TESTING\n\t$con = database::setup_connection('root','crimson');\n \t\n\t// query database for distinct urls and their corresponding site names\n\t$query = database::query_database('SELECT DISTINCT w.name, w.url FROM websites w WHERE 1');\n\t\n\t// process the query\n\twhile($website_row = mysql_fetch_assoc($query))\n\t{\n\t // Create the child elements for links\n\t $li = $doc->createElement('li');\n\t $a = $doc->createElement('a', $website_row['name']);\n\t $br = $doc->createElement('br'); // added break line\n\t $a->setAttribute('href', $website_row['url']);\n\t $a->setAttribute('target','_blank'); \n\t // *** _blank opens link in new tab when pressed\n\t \n\t // Append (insert) the child to the parent node\n\t $ul->appendChild($li);\n\t $ul->appendChild($br);\n\t $li->appendChild($a);\n\t}\n\n\t// free query results\n\tmysql_free_result($query);\n\n\t// close database connection\n\tdatabase::close_connection($con);\n\n\t// Save the appeneded file\n\treturn $doc->saveHTML();\n }", "title": "" }, { "docid": "10a621d339d2244fcb616a8cfc253886", "score": "0.48489174", "text": "public function get_networks($user_id) {\n \n $this->db->select('network_name,net_id,UNIX_TIMESTAMP(expires) AS expires');\n $this->db->from($this->table);\n $this->db->where('user_id', $user_id);\n $this->db->group_by('network_name');\n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n $result = $query->result();\n \n // This array was created only to check if a network was disabled\n $new_array = [];\n \n // Load options model\n $this->load->model('Options', 'options');\n \n foreach ( $result as $data ) {\n \n if ( $this->options->check_enabled(strtolower($data->network_name)) == false ) {\n \n continue;\n \n }\n \n $new_array[] = ['network_name' => $data->network_name, 'net_id' => $data->net_id, 'expires' => $data->expires];\n \n }\n \n return $new_array;\n \n } else {\n \n return false;\n \n }\n \n }", "title": "" }, { "docid": "c50e25e0451fbfe222bff7a86c632cde", "score": "0.48381016", "text": "public function getAllDisabled() {\r\n\t\t\t\r\n\t\t\t// query for getting all the records\r\n\t\t\t$get_records = $this->db->get_where('tbl_social_links', array('status' => '1'));\r\n\t\t\t\r\n\t\t\t// execute the query and get records array\r\n\t\t\t$result_array = $get_records->result_array();\r\n\r\n\t\t\t// return the array to the view\r\n\t\t\treturn $result_array;\r\n\t\t}", "title": "" }, { "docid": "1cc7e80cdc5dd947c42438f012256ece", "score": "0.48377633", "text": "public function getAllActiveWebsites()\n {\n return cache()->tags('repository', 'website')\n ->rememberForever('all-active-websites', function () {\n return $this->model->get();\n });\n }", "title": "" }, { "docid": "11703aebaceabf59b179a6d6c52b95fe", "score": "0.4832235", "text": "function load_sites() {\n $loaded_sites = array();\n $wp_sites = get_sites();\n\n foreach ( $wp_sites as $i => $site_info ) {\n $site_id = $site_info->blog_id;\n switch_to_blog($site_id);\n $name = get_bloginfo();\n $site_info->name = $name;\n $site_info->id = $site_id;\n $site_info->posts_count = wp_count_posts()->publish;\n $loaded_sites[$name] = $site_info;\n }\n\n return $loaded_sites;\n }", "title": "" }, { "docid": "7a881c2d71c257821c3814610ad5043a", "score": "0.48293725", "text": "public function getRecentLikedUrls(UserEntity $user)\n {\n return $this->findBy(['user' => $user], ['timestamp' => 'DESC'], 10);\n }", "title": "" }, { "docid": "48747655bbcdde13553d84f1f08b6037", "score": "0.4812495", "text": "public function getAllUrlWithoutDelete()\r\n {\r\n $statementSelect = $this->db->prepare(\"SELECT * FROM \" . URLS_TABLE . \" WHERE deleted = 0\");\r\n if(!$statementSelect->execute()){\r\n $this->log->m_log('getAllUrlWithoutDelete MySql function error');\r\n }\r\n $this->resultUrls = $statementSelect->fetchAll();\r\n }", "title": "" }, { "docid": "b3555d7456aeaf239a13dac200ef1850", "score": "0.4811232", "text": "function learndash_activity_clear_mismatched_users() {\n\tglobal $wpdb;\n\t\n\t$sql_str = \"SELECT DISTINCT lua.user_id \n\tFROM \" . LDLMS_DB::get_table_name( 'user_activity' ) . \" as lua\n\tLEFT JOIN {$wpdb->usermeta} as um1 ON lua.user_id = um1.user_id AND um1.meta_key = '{$wpdb->prefix}capabilities'\n\tLEFT JOIN {$wpdb->users} as users ON lua.user_id = users.ID\n\tWHERE 1=1\n\tAND ( um1.meta_key IS NULL OR users.ID is NULL )\";\n\t\n\t$process_users = $wpdb->get_col( $sql_str );\n\tif ( !empty( $process_users ) ) {\n\t\tforeach( $process_users as $user_id ) {\n\t\t\tlearndash_report_clear_user_activity_by_types( $user_id );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f9fc42cda71b93ec9761cdaeed82cfdf", "score": "0.4804394", "text": "public function getUndefinedVariables($user_id)\n {\n $v1= array_values(array_dot($this->userVariableRepo->where('user_id', '=', $user_id)->get(['variable_id'])->toArray()));\n $v2= array_values(array_dot($this->userValueRepo->where('user_id', '=', $user_id)->get(['variable_id'])->toArray()));\n\n $v = array_where($v1, function($key, $value)use($v2){\n return !in_array($value, $v2);\n });\n return $v;\n }", "title": "" }, { "docid": "8c6db694a8c3dc5a733c22a992e3afb1", "score": "0.4791744", "text": "function returnAllDomains($userid) {\n global $conn;\n $domains = array();\n //Get all public domains\n $query = \"SELECT * FROM `Domain` WHERE StatusID='1' AND PrivacyID='1';\";\n $queryReturn = $conn->query($query);\n\n while($row = $queryReturn->fetch_assoc()){\n $id = $row['DomainID'];\n $domainData = getDomainData($id);\n array_push($domains, $domainData);\n }\n\n\n //Get all private domains that the user is part of\n $query2 = \"SELECT UserGroup_Members.UserID, UserGroup_Members.UserGroupID, Domain_Access.DomainID FROM UserGroup_Members \n INNER JOIN Domain_Access ON UserGroup_Members.UserGroupID = Domain_Access.UserGroupID \n WHERE UserGroup_Members.UserID ='\".$conn->real_escape_string($userid).\"';\";\n $queryReturn2 = $conn->query($query2);\n\n if(mysqli_num_rows($queryReturn2)>0){\n while($row2 = $queryReturn2->fetch_assoc()){\n $id = $row2['DomainID'];\n $domainData = getDomainData($id);\n if(!array_search($domains, $domainData)){\n array_push($domains, $domainData);\n }\n }\n }\n\n return $domains;\n}", "title": "" }, { "docid": "4344ffcfa62e0f161f5464a6f7d09f7b", "score": "0.47895685", "text": "public function getSite()\n {\n $user_info = $this->site->getUserinfo();\n $base_path = $this->site->getPath();\n\n $this->site->setUserinfo(false);\n $this->site->setPath('');\n\n $site = $this->site->getUrl();\n\n $this->site->setUserinfo($user_info);\n $this->site->setPath($base_path);\n\n return $site;\n }", "title": "" }, { "docid": "056573146c64af7930714c7dc1974701", "score": "0.4787249", "text": "public function disable_users( array $endpoints ): array {\n\t\tif ( isset( $endpoints['/wp/v2/users'] ) ) {\n\t\t\tunset( $endpoints['/wp/v2/users'] );\n\t\t}\n\t\tif ( isset( $endpoints['/wp/v2/users/(?P<id>[\\d]+)'] ) ) {\n\t\t\tunset( $endpoints['/wp/v2/users/(?P<id>[\\d]+)'] );\n\t\t}\n\t\treturn $endpoints;\n\t}", "title": "" }, { "docid": "8193fb2694aec0fd9062d7d9e6dd8821", "score": "0.47850198", "text": "public function getSites($sites = null)\n {\n $request = request();\n\n $this->validate($request, [\n 'order_by' => 'nullable|in:name,plots_count,plants_count,last_measured_at',\n 'order_dir' => 'nullable|in:asc,desc',\n 'search' => 'nullable|max:255',\n 'site_type' => 'nullable|in:all,shared,owned'\n ]);\n\n if ($sites === null) {\n $sites = Site::orderBy($request->order_by ?? 'created_at', $request->order_dir ?? 'desc');\n } else {\n $sites = $sites->orderBy($request->order_by ?? 'created_at', $request->order_dir ?? 'desc');\n }\n\n return $sites->with([\n 'state' => function ($query) {\n },\n 'county' => function ($query) {\n },\n 'user' => function ($query) {\n $query->select(['users.id', 'users.name']);\n },\n 'species' => function ($query) {\n },\n 'shrubs' => function ($query) {\n },\n 'userSites' => function ($query) use ($request) {\n $query->where('user_id', $request->user()->id);\n }\n ])\n ->withCount(['plants', 'plots'])\n ->when($request->search, function ($query) use ($request) {\n $term = $request->search;\n $query->where(function ($query) use ($term) {\n /** @var \\Illuminate\\Database\\Eloquent\\Builder $query */\n $query->where('name', 'like', \"%$term%\");\n $query->orWhereHas('state', function ($query) use ($term) {\n $query->where('states.name', 'like', \"%$term%\");\n $query->orWhere('states.code', $term);\n });\n $query->orWhereHas('county', function ($query) use ($term) {\n $query->where('counties.name', 'like', \"%$term%\");\n });\n $query->orWhereHas('user', function ($query) use ($term) {\n $query->where('users.name', 'like', \"%$term%\");\n });\n });\n })\n ->when($request->site_type, function ($query) use ($request) {\n switch ($request->site_type)\n {\n case 'all':\n $query->where(function($query) use ($request) {\n $query->withShared($request->user());\n $query->orWhere('user_id', $request->user()->id);\n });\n break;\n case 'shared':\n $query->withShared($request->user());\n break;\n case 'owned':\n $query->where('user_id', $request->user()->id);\n break;\n }\n });\n }", "title": "" }, { "docid": "33417924eb2af9d6450c27628a638b39", "score": "0.47800013", "text": "public function clearLnkUsersOrganisationss()\n {\n $this->collLnkUsersOrganisationss = null; // important to set this to null since that means it is uninitialized\n $this->collLnkUsersOrganisationssPartial = null;\n\n return $this;\n }", "title": "" }, { "docid": "3e7284a0cca0ce269c4903a46a46d9ed", "score": "0.47685987", "text": "public function getAllWebsites(){\r\n\t\treturn $this->select()->from($this -> _name, array('id','createdAt','filePdf'))->where('status = 1')\r\n\t\t-> order('id desc')->query()->fetchAll();\r\n\t}", "title": "" }, { "docid": "7b3cf860a2b1a9e32dc7aa88a603f175", "score": "0.4758496", "text": "function show_all_sites_for_super_admins( $blogs ) {\n\t\tif ( function_exists( 'get_current_screen' ) ) {\n\t\t\tif ( is_object( get_current_screen() ) && get_current_screen()->base == 'my-sites' && is_super_admin() ) {\n\t\t\t\t// If the lock is set then lets stop ourselves from an infinite loop\n\t\t\t\tif ( isset( $GLOBALS['my_sites_for_super_admins_lock'] ) ) {\n\t\t\t\t\t// Release the lock so that it works next time\n\t\t\t\t\tunset( $GLOBALS['my_sites_for_super_admins_lock'] );\n\n\t\t\t\t\treturn $blogs;\n\t\t\t\t} else {\n\t\t\t\t\t// This prevents an infinite loop because we are calling get_blogs_of_user() within it's own filter\n\t\t\t\t\t$GLOBALS['my_sites_for_super_admins_lock'] = 1;\n\n\t\t\t\t\treturn get_blogs_of_user( get_user_by( 'login', 'localbackupadmin' )->ID );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $blogs;\n\t}", "title": "" }, { "docid": "d8b51a9a698aba0b148f32bc99504afd", "score": "0.47576824", "text": "public function getAllUsersNotAssignedToProject($id_project)\n\t{\n\t\t$users_projects = $this->getUsersProjectsModel()->getAllUsersNotAssignedToProject($id_project);\n\t\treturn $users_projects;\n\t}", "title": "" }, { "docid": "2f222308827289cf8114f67aa6f50af9", "score": "0.47570118", "text": "function get_wpcom_site_users( string $site_id_or_url, array $params = array() ): ?array {\n\t$users = WPCOM_API_Helper::call_api( \"sites/$site_id_or_url/users?\" . \\http_build_query( $params ) );\n\tif ( empty( $users ) ) {\n\t\treturn null;\n\t}\n\n\treturn $users->users;\n}", "title": "" }, { "docid": "7aaf378b22c3db3f4661bcd312186f96", "score": "0.47515222", "text": "function bpb_extended_get_user_blog_ids( $user_id = 0 ) {\n\tglobal $wpdb;\n\t$bpb_extended = bpb_extended();\n\n\t$blogs = array();\n\n\tif ( empty( $user_id ) ) {\n\n\t\tif ( bp_displayed_user_id() ) {\n\t\t\t$user_id = bp_displayed_user_id();\n\t\t} else {\n\t\t\t$user_id = bp_loggedin_user_id();\n\t\t}\n\n\t}\n\n\tif ( empty( $user_id ) ) {\n\t\treturn $blogs;\n\t}\n\n\t// Get it once per load as used in various places\n\tif ( ! empty( $bpb_extended->user_blogs[ $user_id ] ) ) {\n\t\treturn $bpb_extended->user_blogs[ $user_id ];\n\t}\n\n\t/**\n\t * Get user blogs (get_blogs_of_user() is not returning the blogs public parameter :( )\n\t * we need it to have a correct count if current user != displayed user\n\t */\n\t$user_metas = get_user_meta( $user_id );\n\tif ( empty( $user_metas ) ) {\n\t\treturn $blogs;\n\t}\n\n\t// Get the user's blogs id\n\tforeach ( array_keys( $user_metas ) as $meta_key ) {\n\t\tif ( preg_match( '/' . $wpdb->base_prefix. '(\\d*)_capabilities/', $meta_key, $matches ) ) {\n\t\t\tif ( ! empty( $matches[1] ) ) {\n\t\t\t\t$blogs[] = intval( $matches[1] );\n\t\t\t}\n\t\t} else if ( $wpdb->base_prefix. 'capabilities' === $meta_key ) {\n\t\t\t$blogs[] = 1;\n\t\t}\n\t}\n\n\tif ( empty( $blogs ) ) {\n\t\treturn $blogs;\n\t}\n\n\t// Only super admins and loggedin user can see all their blogs (including the not public ones)\n\t$public = (int) ( ! is_super_admin() && $user_id != bp_loggedin_user_id() );\n\n\t$sql = array(\n\t\t'select' => \"SELECT * FROM $wpdb->blogs\",\n\t\t'where' => array(\n\t\t\t'in' => 'blog_id IN (' . join( ',', wp_parse_id_list( $blogs ) ) .')',\n\t\t\t'deleted' => $wpdb->prepare( 'deleted = %d', 0 ),\n\t\t\t'spam' => $wpdb->prepare( 'spam = %d', 0 ),\n\t\t\t'mature' => $wpdb->prepare( 'mature = %d', 0 ),\n\t\t\t'archived' => $wpdb->prepare( 'mature = %d', 0 ),\n\t\t),\n\t);\n\n\tif ( ! empty( $public ) ) {\n\t\t$sql['where']['public'] = $wpdb->prepare( 'public = %d', $public );\n\t}\n\n\t$sql['where'] = 'WHERE ' . join( ' AND ', $sql['where'] );\n\n\t// Get blogs that can be used (not deleted, not spam...)\n\t$blogs = $wpdb->get_results( join( ' ', $sql ) );\n\n\t// Put them in a global to avoid requesting for them more than once per load\n\t$bpb_extended->user_blogs[ $user_id ] = $blogs;\n\n\t// Return the list of blogs\n\treturn $blogs;\n}", "title": "" }, { "docid": "6c498789511d3b2cd359fba06eeacfcb", "score": "0.47513208", "text": "public static function get_global_ips() {\n\t\treturn static::where([\n\t\t\t'site_url' => 'default',\n\t\t]);\n\t}", "title": "" }, { "docid": "233a48da39f92922b9839494c2f3f6b4", "score": "0.47414434", "text": "public function getTrainingStagesNotDone($user)\n\t{\n\t\t$user_id = $user->id;\n\t\treturn $this->model->selectRaw('upl_stages.*, ifnull(done,0) done')->leftJoin('upl_stage_user',function($join) use ($user_id) {\n\t\t\t\t $join->on('upl_stage_id','=','upl_stages.id');\n\t\t\t\t $join->on('user_id','=',DB::raw($user_id));\n\t\t\t\t})->where('mode','training')->having('done','=',0)->get();\n\n\t}", "title": "" }, { "docid": "5bde110649653f25b362952e6321952f", "score": "0.47339907", "text": "public function listNonPlayerUsers()\n {\n return $this->model->with('player')->whereDoesntHave('player')->pluck('username', 'id');\n }", "title": "" }, { "docid": "cfecd630f3a628f9cb578563b929cf1c", "score": "0.47328538", "text": "public function getDomains();", "title": "" }, { "docid": "8e3018c290db7cecd424c6135df90cd8", "score": "0.47281933", "text": "public function getConfiguredSourcesExcluded(){\n return $this->xspaths;\n }", "title": "" }, { "docid": "a8bd05672cff0d5e09ecd80795137fa3", "score": "0.47240514", "text": "public function getRelevantWebsiteIds()\n {\n if ($this->_adminRole) {\n $websiteIds = $this->_adminRole->getGwsRelevantWebsites();\n return is_array($websiteIds) ? $websiteIds : [];\n }\n\n return [];\n }", "title": "" }, { "docid": "0e857eb2f5d26905451e6cfebdb1a2ae", "score": "0.4722082", "text": "public function getBlockedEmailDomains(): array;", "title": "" }, { "docid": "57f92ad3b24da8ebd7c6819e474c7e47", "score": "0.47086805", "text": "public function findByAnonymousUserAlsoDisabled(\\TYPO3\\CMS\\Extbase\\Domain\\Model\\FrontendUser $frontendUser)\n {\n\n $query = $this->createQuery();\n // setIgnoreEnableFields for hidden records\n //\t$query->getQuerySettings()->setIgnoreEnableFields(TRUE);\n $query->setOrderings(array(\"lastUpdate\" => \\TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface::ORDER_DESCENDING));\n $allWepstraProjectsOfUser = $query\n ->matching(\n $query->logicalAnd(\n $query->equals('anonymousUser', $frontendUser),\n $query->logicalOr(\n $query->equals('disabled', 0),\n $query->equals('disabled', 1)\n )\n )\n )\n ->execute();\n\n return $allWepstraProjectsOfUser;\n //===\n }", "title": "" }, { "docid": "7cc6fd3f7b2117878b81e6c72503b02d", "score": "0.4704296", "text": "function get_wpcom_sites( array $params = array() ): ?array {\n\t$query = \\http_build_query( $params );\n\t$sites = WPCOM_API_Helper::call_api( 'me/sites' . ( empty( $query ) ? '' : \"?$query\" ) );\n\tif ( ! \\is_null( $sites ) && \\property_exists( $sites, 'error' ) ) {\n\t\tconsole_writeln( $sites->message );\n\t\treturn null;\n\t}\n\n\treturn \\array_combine(\n\t\t\\array_column( $sites->sites, 'ID' ),\n\t\t$sites->sites\n\t);\n}", "title": "" }, { "docid": "fa4cd16ee24625da3aafeb7e9407017d", "score": "0.4699943", "text": "public function getSysDomains()\n {\n $sysDomains = DatabaseUtility::getRecordsByField(\n 'sys_domain',\n 'redirectTo',\n '',\n ' AND hidden=0',\n '',\n 'sorting, domainName ASC'\n );\n\n if (empty($sysDomains)) {\n $sysDomains = [];\n }\n\n $domains = [];\n foreach ($sysDomains as $domain) {\n $domains[$domain['uid']] = $domain['domainName'];\n }\n\n return $domains;\n }", "title": "" } ]
42aed8c33e0877d1152162058b05b9c5
/ TODO:use namespaces/classes to avoid nameclashes when calling more than one action
[ { "docid": "0178b099e2fb83086f2db992aba5879b", "score": "0.0", "text": "function _validate($request) {\n\t$from_time = strtotime($request['route'][0]);\n\t$till_time = strtotime($request['route'][1]);\n\tif (!$from_time) {\n\t\t$from = '1970.01.01';\n\t}\n\t$from = date('Y-m-d', $from_time);\n\n\tif (!$till_time) {\n\t\t$till_time = time();\n\t}\n\t$till = date('Y-m-d', $till_time);\n\treturn array('from' => $from, 'till' => $till);\n}", "title": "" } ]
[ { "docid": "c695551d40acd10958264e3c52ada00a", "score": "0.7451655", "text": "abstract public function action();", "title": "" }, { "docid": "dfff0e2e5fa9f2c776044bd3ff0502c0", "score": "0.74020034", "text": "abstract protected function actions(): array;", "title": "" }, { "docid": "c1b35ee443e3df4a06013ea240e5b1f9", "score": "0.7325053", "text": "protected function getAction() {}", "title": "" }, { "docid": "7e16f7bd9474e7d8527019851548ef23", "score": "0.7287816", "text": "public function\n\t\tdo_actions()\n\t{\n\t}", "title": "" }, { "docid": "2d2b35aeaeabfaac132b7b4572f2312f", "score": "0.724236", "text": "public function ExampleAction() {\n\n\t}", "title": "" }, { "docid": "235bcd9c9a24966d4f38b730def600e2", "score": "0.7174561", "text": "protected function callActionMethod() {}", "title": "" }, { "docid": "7e4278920fa40da7737cdf153f438892", "score": "0.71579766", "text": "public function getAction() {\n\t\t\n\t}", "title": "" }, { "docid": "e2d4c60a3d72ede28a9e7027c1030e01", "score": "0.7155754", "text": "public function action();", "title": "" }, { "docid": "06fe8c381127d8b829125486af7b6748", "score": "0.71265775", "text": "public function actions()\n {\n }", "title": "" }, { "docid": "b13752669d57c6c7cd70c33a0bfaaec4", "score": "0.71240103", "text": "abstract public function Action();", "title": "" }, { "docid": "d83317a1c53f86d61cd5a3097be738f1", "score": "0.70082843", "text": "function _action($action)\n\t{\n\t // Lay input\n\t $ids = $this->uri->rsegment(3);\n\t $ids = (!$ids) ? $this->input->post('id') : $ids;\n\t $ids = (!is_array($ids)) ? array($ids) : $ids;\n\t\n\t // Thuc hien action\n\t foreach ($ids as $id)\n\t {\n\t // Xu ly id\n\t $id = (!is_numeric($id)) ? 0 : $id;\n\t\n\t // Kiem tra id\n\t $info = model('topup_offline')->get_info($id);\n\t if (!$info) continue;\n\t \n\t // Chuyen den ham duoc yeu cau\n\t $this->{'_'.$action}($info);\n\t }\n\t}", "title": "" }, { "docid": "eb04f565a20b21b8ef0420734891d959", "score": "0.69757015", "text": "protected function executeAction() {}", "title": "" }, { "docid": "eb04f565a20b21b8ef0420734891d959", "score": "0.69757015", "text": "protected function executeAction() {}", "title": "" }, { "docid": "eb04f565a20b21b8ef0420734891d959", "score": "0.6973993", "text": "protected function executeAction() {}", "title": "" }, { "docid": "eb04f565a20b21b8ef0420734891d959", "score": "0.6973993", "text": "protected function executeAction() {}", "title": "" }, { "docid": "eb04f565a20b21b8ef0420734891d959", "score": "0.6973993", "text": "protected function executeAction() {}", "title": "" }, { "docid": "f9f24773784adcbbc10409964bf4ba1f", "score": "0.6971177", "text": "public function actions()\n {\n }", "title": "" }, { "docid": "f9f24773784adcbbc10409964bf4ba1f", "score": "0.6971177", "text": "public function actions()\n {\n }", "title": "" }, { "docid": "fd1ec9b1886d735ae53c062aeb45ea79", "score": "0.69366896", "text": "public function action()\n {\n }", "title": "" }, { "docid": "1dee7a505837de94a59301756a9f65fc", "score": "0.69265497", "text": "public function action()\n {\n }", "title": "" }, { "docid": "1dee7a505837de94a59301756a9f65fc", "score": "0.69265497", "text": "public function action()\n {\n }", "title": "" }, { "docid": "09b5eb5065dcda441e6dba2aabc18087", "score": "0.69136643", "text": "public function requestAction();", "title": "" }, { "docid": "d2ae5e8341fa1ca1e6205eaab07dcea2", "score": "0.6888375", "text": "abstract public function getAction();", "title": "" }, { "docid": "d2ae5e8341fa1ca1e6205eaab07dcea2", "score": "0.6888375", "text": "abstract public function getAction();", "title": "" }, { "docid": "cdccd1119fc87298ebcf8bddc3d09e0c", "score": "0.68738395", "text": "function _index_actions() {\n\t$className = PAGE_NAME . 'Class';\n\t$return = new $className();\n\treturn $return;\n}", "title": "" }, { "docid": "83d2f6542a18fe988818beb15b94d275", "score": "0.6850467", "text": "protected function getActions() {}", "title": "" }, { "docid": "0388b8463624e457d6e7e6b8c05ba6cb", "score": "0.6832162", "text": "private function dispatch(){\n\t\tcall_user_func_array(array($this->controller, $this->strAction), $this->arrArgs);\n\t}", "title": "" }, { "docid": "8f382939d45db3c15d09350d17f05a15", "score": "0.68157077", "text": "function _action($action)\n\t{\n\t\t// Lay input\n\t\t$ids = $this->uri->rsegment(3);\n\t\t$ids = ( ! $ids) ? $this->input->post('id') : $ids;\n\t\t$ids = ( ! is_array($ids)) ? array($ids) : $ids;\n\n\t\t// Thuc hien action\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t// Xu ly id\n\t\t\t$id = ( ! is_numeric($id)) ? 0 : $id;\n\n\t\t\t// Kiem tra id\n\t\t\t$info = $this->contact_model->get_info($id);\n\t\t\tif ( ! $info) continue;\n\n\t\t\t// Kiem tra co the thuc hien hanh dong nay khong\n\t\t\tif ( ! $this->_can_do($info, $action)) continue;\n\n\t\t\t// Chuyen den ham duoc yeu cau\n\t\t\t$this->{'_'.$action}($info);\n\t\t}\n\t}", "title": "" }, { "docid": "7a0f51a46999337372a981e54e42c0f2", "score": "0.67799807", "text": "public function someAction()\n {\n\n }", "title": "" }, { "docid": "56a5369aad07f4c8ddf41b2705794401", "score": "0.6772035", "text": "public function performAction() {}", "title": "" }, { "docid": "4ed7401ed8423c83b5f6feebea88ea18", "score": "0.6769576", "text": "private static function dispatch(){\n\t\t$controllerName = CONTROLLER . \"Controller\";\n\t\t$actionName = ACTION . \"Action\";\n\t\t// instantiate an object of controller\n\t\t$controller = new $controllerName();\n\t\t// call the method of the action\n\t\t$controller->$actionName();\n\t}", "title": "" }, { "docid": "5e839b2fc60d3433eaf8ccebb4d29961", "score": "0.67649263", "text": "function _action($action)\n {\n // Lay input\n $ids = $this->uri->rsegment(3);\n $ids = (!$ids) ? $this->input->post('id') : $ids;\n $ids = (!is_array($ids)) ? array($ids) : $ids;\n\n // Thuc hien action\n foreach ($ids as $id) {\n // Xu ly id\n $id = (!is_numeric($id)) ? 0 : $id;\n\n // Kiem tra id\n $info = $this->email_register_model->get_info($id);\n if (!$info) continue;\n\n // Kiem tra co the thuc hien hanh dong nay khong\n if (!$this->_can_do($info, $action)) continue;\n\n // Chuyen den ham duoc yeu cau\n $this->{'_' . $action}($info);\n }\n }", "title": "" }, { "docid": "f05dc207551b48423e79fbad402a327c", "score": "0.67609274", "text": "public function someAction()\n {\n\n }", "title": "" }, { "docid": "0d7e1cace0ad9d11c72504a51394d72b", "score": "0.6760792", "text": "function doAction($actionType)\n\t{\n\t}", "title": "" }, { "docid": "75d5c1fa436d909b8381b5d619497515", "score": "0.6754101", "text": "abstract public function doAction();", "title": "" }, { "docid": "993aeb387d70b7709217adb66f54e29a", "score": "0.6753547", "text": "abstract public function get ($action);", "title": "" }, { "docid": "1beb9752101072db3c66edc3bdacce32", "score": "0.67515814", "text": "private function Dispatch(){\n\t\t$class = __NAMESPACE__ . '\\\\Pages\\\\' . ucfirst($this->ctrl) . '\\\\' . ucfirst($this->action);\n\t\t\n\t\t$basedir = __DOCROOT__ . '/project/assets/php/pages/';\n\t\t$actionfile = $basedir . '/' . $this->ctrl . '/' . $this->action . '.class.php';\n\t\t\t\n\t\tif (is_file($actionfile)) {\n\t\t\t$class = __NAMESPACE__ . '\\\\Pages\\\\' . ucfirst($this->ctrl) . '\\\\' . ucfirst($this->action);\n\t\t}\n\t\t\n\t\treturn $class;\n }", "title": "" }, { "docid": "eeca415da83bce5b6d150554a7c351c4", "score": "0.67407185", "text": "private static function dispatch(){\n $lastSlash = strpos(APP_ACTION, \"/\", 1);\n $actionLength = strlen(APP_ACTION)-1;\n\n $action = APP_ACTION;\n $arguments = [];\n\n /**\n * Remove last slash , but you know there could be more than 1 so....yeah\n */\n if($lastSlash == $actionLength) {\n $action = substr(APP_ACTION, 0, $actionLength);\n }\n\n /**\n * Check if there is no values passed as params\n */\n if(strpos($action, \"?\") != 0) {\n\n foreach ($_GET as $k => $v) {\n $arguments[$k] = $v;\n }\n\n $action = substr($action, 0, strpos($action, \"?\"));\n }\n\n /**\n * Super Duper ugly routing stuff. To be fair it should be in different class I think.\n * But it does what it should do like charm\n */\n\n if(APP_METHOD == \"GET\") {\n\n switch ($action) {\n case \"\":\n case \"/\":\n $controllerName = \"PageController\";\n $actionName = \"index\";\n break;\n case \"/anketa\":\n $controllerName = \"PageController\";\n $actionName = \"tests\";\n break;\n case \"/questions\":\n $controllerName = \"QuestionController\";\n $actionName = \"getQuestions\";\n break;\n default:\n $controllerName = \"PageController\";\n $actionName = \"notFound\";\n break;\n }\n\n /*ugly stuff*/\n if(substr($action, 0, 6) == \"/test/\") {\n $controllerName = \"QuestionController\";\n $actionName = \"openPage\";\n\n $arguments = [\n \"test_key\" => substr($action, 6)\n ];\n }\n\n\n } else {\n\n switch ($action) {\n case \"/user\" :\n // die(\"hallo\");\n $controllerName = \"UserController\";\n $actionName = \"createUser\";\n break;\n case \"/answer\":\n $controllerName = \"UserController\";\n $actionName = \"updateUser\";\n break;\n default:\n $controllerName = \"PageController\";\n $actionName = \"notFound\";\n break;\n }\n }\n\n /**\n * Call corresponding controller for specific route\n */\n $controller = new $controllerName;\n\n /**\n * Set arguments\n */\n if(!empty($arguments)) {\n $controller->setArguments($arguments);\n }\n\n /**\n * Call specific function from rout!\n * TODO: Should add some check for cases if function doesn't exist!\n */\n $controller->$actionName();\n }", "title": "" }, { "docid": "e496242cce3324d3f679cdd4838b50eb", "score": "0.6735073", "text": "public function setup_actions() {\n\n\t}", "title": "" }, { "docid": "5c2553251de3a4f0fd1eb09524630fa8", "score": "0.6726668", "text": "public function testAction(){\n }", "title": "" }, { "docid": "4f2a6186758bcc61745332068e0f7861", "score": "0.6722619", "text": "public function allAction() {}", "title": "" }, { "docid": "9e121357bee0460696d2c480b9a61936", "score": "0.6717476", "text": "abstract public function executeAction();", "title": "" }, { "docid": "826b9bdad1c16e9b226c18edc7fb9faa", "score": "0.6711646", "text": "abstract public static function getAction(): string;", "title": "" }, { "docid": "f2ec80485a8953de340adf1b55358231", "score": "0.67094284", "text": "abstract public function getAction(): string;", "title": "" }, { "docid": "c7ece6d834af85ba579ce55dc76653c0", "score": "0.6684025", "text": "public static function get_actions()\n {\n }", "title": "" }, { "docid": "5ec7f43d5c55957362c34e3a9a84d982", "score": "0.66835815", "text": "abstract function doAction();", "title": "" }, { "docid": "e8862ce8aef7ad1f7dbbb7a2b0e71d9c", "score": "0.66797495", "text": "protected function initActions() {}", "title": "" }, { "docid": "b9c1b14401cd2a629a64939cdc5f4abe", "score": "0.6665364", "text": "public function testAction()\n {\n }", "title": "" }, { "docid": "6d95872d4d9a2ffa2f0a17972acd2c56", "score": "0.6656294", "text": "public function newAction()\r\n {\r\n\r\n\r\n }", "title": "" }, { "docid": "9981f29e688e7e949de2aa9a0ae3ffea", "score": "0.66439617", "text": "public function addAction() {\n\n\t}", "title": "" }, { "docid": "65879b481365b4f04dbf4ea89a358948", "score": "0.6634002", "text": "function actionExecuted( Action $action) ;", "title": "" }, { "docid": "0a469c92bd1fb9d78fcf0f412f9c3c5d", "score": "0.6622294", "text": "function actions() {\n\t\\do_action( 'gnist/actions' );\n}", "title": "" }, { "docid": "1cdfc3f0555f26f0e4fc03493c8d9f45", "score": "0.66159236", "text": "public function addAction() {\n\t}", "title": "" }, { "docid": "6ae523d4054bb7d8c7836a1295ee377f", "score": "0.661415", "text": "public static function actionsAndFilters() {\n\n\t}", "title": "" }, { "docid": "87e07470c8a34430f1ce5ef474b42837", "score": "0.6603947", "text": "function performAction() {\n switch ($_GET[\"action\"]) {\n case \"add\":\n actionAdd();\n break;\n case \"delete\":\n actionDelete();\n break;\n case \"deleteR\":\n actionDeleteR();\n break;\n case \"modify\":\n actionModify();\n break;\n\n case \"modifyR\": //TODO dodělat testy na políčka\n actionModifyR();\n break;\n }\n}", "title": "" }, { "docid": "67572aab054866d32a8d52dc7d15c836", "score": "0.660009", "text": "public function indexAction() \n {\n\t\n \n \t\n\t}", "title": "" }, { "docid": "d48b8e6df367ae4aba7b220e2d4b9d7e", "score": "0.6588939", "text": "protected function action()\n {\n switch($this->action)\n {\n case 'check_title':\n $this->check_title();\n break;\n case 'delete':\n $this->delete();\n break;\n case 'dismiss':\n $this->dismiss();\n break;\n case 'edit':\n $this->edit();\n break;\n case 'express':\n $this->express();\n break;\n case 'list_dismiss':\n $this->listDismiss();\n break;\n case 'load':\n $this->load();\n break;\n case 'rate':\n $this->rate();\n break;\n case 'report':\n $this->report();\n break;\n case 'save':\n $this->save();\n break;\n case 'save_pic':\n $this->save_pic();\n break;\n case 'search':\n $this->search();\n break;\n case 'translate':\n $this->translate();\n break;\n case 'validate':\n $this->validate();\n break;\n }\n }", "title": "" }, { "docid": "3fdcb3f92e3019078b17ffbb6c4b72be", "score": "0.6588748", "text": "abstract public function indexAction();", "title": "" }, { "docid": "f89d6eb4a6d6cc8bbf67772f63d0bf27", "score": "0.6586861", "text": "function action_spipbb_action() {\n\n\t$securiser_action = charger_fonction('securiser_action', 'inc');\n\t$arg = $securiser_action();\n\t$redirect = rawurldecode(_request('redirect'));\n\n\tpreg_match('/^(\\w+)\\W(.*)$/', $arg, $r);\n\t/* $r = Array \n\t\t0 -> action-id\n\t\t1 -> action\n\t\t2 -> idforum\n\t*/\n\t$var_nom = 'action_spipbb_action_' . $r[1];\n\tif (function_exists($var_nom)) {\n\t\tspipbb_log(\"action: $var_nom $r[2]\",3,\"A_a_s_a\");\n\t\t$var_nom($r[2]);\n\t}\n\telse {\n\t\tspipbb_log(\"action: $action: $arg incompris\",3,\"A_a_s_a\");\n\t}\n\n\tredirige_par_entete($redirect);\t\n}", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "e5c2284e5adb07cc48e827cc2da43649", "score": "0.6563359", "text": "public function newAction()\n {\n\n }", "title": "" }, { "docid": "3c2a76b39c51b8c01ce3a9a4d0a48073", "score": "0.65478307", "text": "public function take_action()\n {\n }", "title": "" }, { "docid": "3c2a76b39c51b8c01ce3a9a4d0a48073", "score": "0.65478307", "text": "public function take_action()\n {\n }", "title": "" }, { "docid": "7a7d6d237c1feec8671330d665628687", "score": "0.6547777", "text": "public function action_index()\n\t{\n\t\t// Our tidy subActions array\n\t\t$subActions = array(\n\t\t\t'list',\n\t\t\t'savenames',\n\t\t\t'editboards',\n\t\t\t'savesettings',\n\t\t\t'picker',\n\t\t\t'savestyles',\n\t\t\t'pickboards',\n\t\t\t'saveboards',\n\t\t);\n\n\t\tif (!isset($_REQUEST['do']) || !in_array($_REQUEST['do'], $subActions))\n\t\t\t$method = 'action_list';\n\t\telse\n\t\t\t$method = 'action_' . $_REQUEST['do'];\n\n\t\treturn $this->$method();\n\t}", "title": "" }, { "docid": "ab74f827750581cde89ef949fa7afdbc", "score": "0.6539285", "text": "public function indexAction()\n\t{\t\n\t}", "title": "" }, { "docid": "ae6346f56f93460303ac39de078326eb", "score": "0.6532158", "text": "public function actions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "a0d601ac319debd6736d0e61444b478a", "score": "0.6529392", "text": "public function get_actions();", "title": "" }, { "docid": "12df34472e9fa1df479997306f8aa318", "score": "0.65246534", "text": "public function novoAction() {\r\n \r\n }", "title": "" }, { "docid": "45eb0ef896e1ce9e22a8db4dc8027ee8", "score": "0.6522263", "text": "public function query($action)\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "0a222e39d0e0fc985b4592ed1c4d59e9", "score": "0.6519827", "text": "protected function addActions(){}", "title": "" }, { "docid": "3e40b68924c6edaec8b53ee7b4117df4", "score": "0.6504597", "text": "public function indexAction() {\n\t\n\t}", "title": "" }, { "docid": "5a7bdd8a8a1f90a2759aa2bbdff08df8", "score": "0.64962417", "text": "function action($action=null) {\t\t\n\t \n\t switch ($action) {\n\t\t\n\t case 'ccode' : if ($user = GetGlobal('UserID')) {\n\t\t $out .= $this->create_code();\n\t\t $out .= $this->show_applications();\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t $out .= GetGlobal('controller')->calldpc_method('shlogin.html_form');\n\t\t break;\t\t\n\t case 'newapp' : if ($user = GetGlobal('UserID')) {\n\t\t $out .= $this->insert_form();\n\t\t //$out .= $this->show_applications();\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t $out .= GetGlobal('controller')->calldpc_method('shlogin.html_form');\n\t\t break;\t \n\t case 'existapp' : if ($user = GetGlobal('UserID')) {\t\n\t\t $out .= $this->application_exists(); \n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t $out .= GetGlobal('controller')->calldpc_method('shlogin.html_form');\t\n\t \t\t\t\t\t break;\t \n\t case 'editapp' : if ($user = GetGlobal('UserID')) {\n\t\t $out .= $this->update_form(); \n\t\t //$out .= $this->show_applications();\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t $out .= GetGlobal('controller')->calldpc_method('shlogin.html_form');\t\n\t\t break;\n\t \t case 'installapp' : if ($user = GetGlobal('UserID')) {\n\t\t if (!$this->error) \n\t\t $out .= $this->create_code();\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t $out .= $this->error; \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ($this->post) \n\t\t\t\t\t\t\t\t\t\t $out .= $this->show_applications();\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t $out .= $this->insert_form(); \n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t $out .= GetGlobal('controller')->calldpc_method('shlogin.html_form');\n\t\t\t\t\t\t\t\t\t\t\n\t\t case 'demopage' :\n\t\t case 'demoexpired' :\n\t\t case 'demorenew' : break; //dummy actions\n\t\t \t\t\t\t\t\t\t\t\t\t\t\n\t case 'saveapp' : if (!$this->demo) {\n\t\t if ($this->post)\n\t\t $out .= $this->show_applications();\n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t $out .= $this->update_form(); \n\t\t }\n\t\t\t\t\t\t\t\t\t break; \n\t case 'delapp' : \n\t\t case 'jsdelapp' :\n\t\t case 'viewapp' : \n\t\t case 'terms' : \t\t \n\t\t case 'service' :\n\t\t default : if ($user = GetGlobal('UserID')) {\n\t\t //$out .= $this->show_apps(); \n\t\t $out .= $this->show_applications();\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t $out .= GetGlobal('controller')->calldpc_method('shlogin.html_form');\t\n\t\t \n\t\t \n }\t \n\t \n\t return ($out);\n\t}", "title": "" }, { "docid": "6e007b38119db937beaf97748cc4ddd1", "score": "0.6494722", "text": "public function monsterJobsUsAction()\n {\n }", "title": "" }, { "docid": "30550f7617b8642f17cabdf67fd137a0", "score": "0.6487319", "text": "function action_method_name() {\n \t// TODO:\tDefine your action method here\n\t}", "title": "" }, { "docid": "bd5c1526053672faf2c7c3b40f3bdc9e", "score": "0.6486318", "text": "function call($controller, $action)\r\n{\r\n require_once(\"controllers/\".$controller.\"_controller.php\");\r\n switch($controller)\r\n {\r\n case \"pages\": $controller =new PagesController();\r\n break;\r\n\r\n case \"staff\": require_once(\"models/staffModel.php\");\r\n $controller = new StaffController();\r\n break;\r\n\r\n case \"seagrass\": require_once(\"models/seagrassModel.php\");\r\n $controller = new SeagrassController();\r\n break;\r\n\r\n case \"area\": require_once(\"models/areaModel.php\");\r\n $controller = new AreaController();\r\n break;\r\n\r\n case \"seagrass_in_area\": require_once(\"models/seagrass_in_areaModel.php\");\r\n require_once(\"models/areaModel.php\");\r\n require_once(\"models/seagrassModel.php\");\r\n $controller = new Seagrass_in_areaController();\r\n break;\r\n case \"pick_seagrass\": require_once(\"models/pick_seagrassModel.php\");\r\n $controller = new Pick_seagrassController();\r\n break;\r\n \r\n\r\n }\r\n $controller->{$action}();\r\n\r\n}", "title": "" }, { "docid": "013d53db8b8101dd9d6198b49a3e1504", "score": "0.64857256", "text": "function getActions ()\n\t{\n\t}", "title": "" }, { "docid": "6f76136b199c33afa9414574ae102d9c", "score": "0.64805156", "text": "public function newAction()\n {\n\n }", "title": "" } ]
6a445e2db170890fba18b8c4388a134b
Bootstraps Strata by creating a Strata instance and saving it to the global scope.
[ { "docid": "044a0f2d31f12dc6227f7e85268c8832", "score": "0.6348632", "text": "public static function bootstrap(ClassLoader $loader)\n {\n $app = new Strata();\n $app->setClassLoader($loader);\n\n // Expose the app context to the current process.\n self::$reference = $app;\n\n return $app;\n }", "title": "" } ]
[ { "docid": "9d9818098a41f2c25dad0b29efaf48df", "score": "0.6028935", "text": "protected static function boot()\n {\n parent::boot();\n\n static::creating(function (Paste $paste) {\n $paste->slug = str_random(8);\n });\n }", "title": "" }, { "docid": "28c68bf0a1a01223e553acc1f3773f35", "score": "0.58764046", "text": "public function bootstrap();", "title": "" }, { "docid": "28c68bf0a1a01223e553acc1f3773f35", "score": "0.58764046", "text": "public function bootstrap();", "title": "" }, { "docid": "e88c945335e41e3baed71a261cdb24a9", "score": "0.5873174", "text": "abstract function bootstrap();", "title": "" }, { "docid": "c3960dadb9b78bea4502bfa827308580", "score": "0.5789659", "text": "protected function bootstrapStapler()\n {\n Stapler::boot();\n\n $config = new NativeConfig($this->app['config']->get('stapler'));\n\n Stapler::setConfigInstance($config);\n\n if (!$config->get('stapler.public_path')) {\n $config->set('stapler.public_path', realpath(public_path()));\n }\n\n if (!$config->get('stapler.base_path')) {\n $config->set('stapler.base_path', realpath(base_path()));\n }\n }", "title": "" }, { "docid": "4b5698ae08901312002dd4814dd98417", "score": "0.5763577", "text": "public function bootstrap()\n {\n }", "title": "" }, { "docid": "4b5698ae08901312002dd4814dd98417", "score": "0.5763577", "text": "public function bootstrap()\n {\n }", "title": "" }, { "docid": "6056cb9af2f671eed4ff02f2a52d9701", "score": "0.5655133", "text": "protected function _bootstrap()\n {\n }", "title": "" }, { "docid": "52fefc5a39d333059af14dc7777a8f89", "score": "0.56408274", "text": "protected function bootstrap(): void\n {\n // ...\n }", "title": "" }, { "docid": "23d105450fcb5fadbaa1ef1c43776c7e", "score": "0.56218594", "text": "public static function bootstrap() {\n return self::getInstance();\n }", "title": "" }, { "docid": "0d3f080d6d4b9d9a842e44e4b4158ad3", "score": "0.5583054", "text": "final protected function bootstrapConfig () {\n\t\t$this[\"app.config\"]\t= $this -> config_loader -> getAppConfig($this -> getBaselineConfig());\n\t}", "title": "" }, { "docid": "20d8cadc33e266e4f6f8d40885e1d352", "score": "0.55744463", "text": "private function bootstrap()\n {\n $this->bootstrapConfigs();\n\n $this->bootstrapMiddleware();\n\n $this->loadResources();\n\n $this->registerBladeDirectives();\n\n }", "title": "" }, { "docid": "ebf2c20c86cceada7af381ff60732d1c", "score": "0.5539345", "text": "public function boot()\n {\n $this->bootstrapStapler();\n }", "title": "" }, { "docid": "15f6fde6aa99d395143f259c2c373d79", "score": "0.5532358", "text": "protected function bootstrap()\n {\n $spec = $this->getSpec();\n foreach ($spec as $property) {\n $propertyName = $property['var'];\n $propertyType = $property['type'];\n $this->set($propertyName, $this->thriftModel->$propertyName, $propertyType);\n }\n }", "title": "" }, { "docid": "21f1cf6948e47f1d550750e0f95ce6ce", "score": "0.5521671", "text": "function init() {\n require_once(dirname(__file__).'/../../lib/Util/Bootstrap.php');\n new xBootstrap('script');\n}", "title": "" }, { "docid": "a4914c4820a73ca441dc4771c514c532", "score": "0.54940313", "text": "public static function boot()\n {\n parent::boot();\n\n static::saving(function ($athlete) {\n $athlete->slug = Str::slug(\n $athlete->first_name.'-'.$athlete->last_name.'-'.$athlete->grad_year\n );\n });\n }", "title": "" }, { "docid": "818669d0b99269af1ce8e05733ae7d35", "score": "0.5472495", "text": "public function bootstrap()\n {\n app()->afterResolving('lit.form', function () {\n $this->repeatables();\n });\n\n $this->app->bootstrapWith($this->bootstrappers, $this);\n }", "title": "" }, { "docid": "8b5cada2269d1c9a7799244920a2df4e", "score": "0.5457787", "text": "public function bootstrap(): void\n {\n $fileSystem = $this->app->make( Filesystem::class );\n\n $typerocketPath = $this->app->getPath( 'vendor/typerocket/typerocket' );\n $typerocketPathUrl = $this->app->getUrl( 'vendor/typerocket/typerocket' );\n $typerocketConfigDir = $this->app->getPath( 'config/typerocket' );\n\n if ( ! $fileSystem->exists( $typerocketConfigDir ) ) {\n return;\n }\n\n $typerocketPaths = $this->app->getPath( 'config/typerocket/' ) . 'paths.php';\n\n define( 'TR_URL', $typerocketPathUrl );\n define( 'TR_APP_NAMESPACE', 'App' );\n define( 'TR_PATH', $typerocketPath );\n define( 'TR_CORE_CONFIG_PATH', $typerocketConfigDir );\n\n require_once $typerocketPaths;\n\n new Config( TR_CORE_CONFIG_PATH );\n ( new Launcher() )->initCore();\n }", "title": "" }, { "docid": "fc554ec3fc5b4857ace9e6c666c468cd", "score": "0.54300547", "text": "public function bootstrap()\n\t{\n\t\tself::$bootstrap_called = TRUE;\n\t}", "title": "" }, { "docid": "a40784f60bf01804531648c138aaf34d", "score": "0.5412722", "text": "public function bootstrap()\n {\n echo 'Loading...';\n $this->startTime = microtime(true);\n $this->initErrorHandler();\n\n $app = $this->getContainer()->get('stripperclip.application');\n $app->setAutoExit(false);\n $app->prepare();\n\n echo 'Done.';\n echo \"\\r\\033[K\";\n $app->run();\n\n $this->printRuntime();\n }", "title": "" }, { "docid": "96ddc64d1a15f00238d04ea7c9dabb64", "score": "0.54087484", "text": "public function boot()\n {\n $tempThis = $this;\n $this->app->bind(Site::class, function () use ($tempThis) {\n if (Util::isCommandLine()) {\n return Site::$instance = $this->newCommandLineSite();\n }\n $entity = null;\n if ($entity === null) {\n $entity = PropertyEntity::where('fk_legacy_property_id', $tempThis->_resolveSiteId())->get()->first();\n }\n if ($entity === null) {\n $prop = new PropertyEntity;\n $legacy = LegacyProperty::where('url', 'like', '%' . Util::realServerName() . '%')->get()->first();\n if ($legacy === null) {\n $legacy = LegacyProperty::where('devurl', 'like', '%' . Util::realServerName() . '%')->get()->first();\n }\n $cbCounter = 5;\n $fileSystemId = $prop->generateFilesystemId($legacy, function () use ($cbCounter) {\n if ($cbCounter-- <= 0) {\n return null;\n } else {\n return 'retry';\n }\n });\n $entity = $prop->createNew([\n '_property_group_name' => [\n 'name' => 'Dinali'\n ],\n 'property_group_id' => 0,\n 'property_name' => $legacy->name,\n 'filesystem_id' => $fileSystemId\n ], $legacy);\n }\n return Site::$instance = new Site($entity);\n });\n }", "title": "" }, { "docid": "b647cfaf63642149509d22b657216d38", "score": "0.540079", "text": "protected static function booted()\n {\n static::creating(function ($movie) {\n $movie->slug = Str::of($movie->title)->slug('-');\n });\n }", "title": "" }, { "docid": "45d600f79c7d2d8e0f801fd9a55e5c70", "score": "0.5374305", "text": "protected static function booted()\n {\n // Create a uuid when a new Sub Serivce uuid and url is to be created\n static::creating(function ($subService) {\n $subService->uuid = (string) Str::uuid();\n });\n }", "title": "" }, { "docid": "07079f8faf548dc6c89d9f78c4cbde25", "score": "0.53640807", "text": "protected static function booted()\n {\n //static::addGlobalScope(new AvailableScope);\n }", "title": "" }, { "docid": "8eff430fc807a24a37b82eab64c7f721", "score": "0.5349316", "text": "public function booted()\n {\n Cashier::useCurrency('cad', '$');\n Spark::useStripe();\n Spark::noAdditionalTeams();\n Spark::hideTeamSwitcher();\n\n Spark::useRoles([\n 'admin' => 'Team admin',\n 'member' => 'Team member',\n ]);\n\n Spark::teamPlan('Hébergement données TPV', 'hirdl-pos-hosting')\n ->price(15);\n }", "title": "" }, { "docid": "56e14a436b3098780c4a9e4f5bcd839b", "score": "0.5336954", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n\n if (! $this->commandsLoaded) {\n $this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "title": "" }, { "docid": "fd63e87dea9342cfbe771c4aee76c852", "score": "0.5328379", "text": "protected static function boot()\n {\n parent::boot();\n\n static::addGlobalScope(new SiteScope);\n }", "title": "" }, { "docid": "c6d896b22c905e5dc1ecfba0af0c98ef", "score": "0.5287575", "text": "protected static function booted()\n {\n static::creating(function ($target) {\n $target->type = 'Target';\n });\n }", "title": "" }, { "docid": "dfc0f36f02217ae22589dfab48ba890c", "score": "0.5272287", "text": "private function bootstrapConsole()\n {\n if ($this->app->runningInConsole())\n {\n $this->loadSeedsFrom();\n $this->publishAssets();\n }\n }", "title": "" }, { "docid": "29b5cbcf08023f191b2bfb8cd171e344", "score": "0.5267406", "text": "protected static function updateBootstrapping()\n {\n copy(__DIR__.'/skeleton-stubs/resources/js/bootstrap.js', resource_path('js/bootstrap.js'));\n }", "title": "" }, { "docid": "4d7c30d38ef3b14bc5118cac31eff44d", "score": "0.52515185", "text": "public function boot()\n {\n Nova::script('bios', __DIR__.'/../dist/js/tool.js'); \n }", "title": "" }, { "docid": "c13061cc400595efcf493e6557659dfc", "score": "0.52427214", "text": "public function bootstrap() {\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a84bd2279a86713339dc14bffbaf7f37", "score": "0.5238316", "text": "protected static function boot()\n {\n parent::boot();\n\n // static::addGlobalScope(new IdScope);\n }", "title": "" }, { "docid": "2481f7a939ea401f00d519a6458ea171", "score": "0.52353823", "text": "public function bootstrap()\n {\n $this->addon->enabled()->each(function (Addon $addon) {\n $this->addon->registerExcept($addon->get('csrf', []));\n collect($addon->get('events', []))->each(function ($data, $key) {\n switch ($key) {\n case 'subscribes':\n collect($data)->each(function ($subscriber) {\n if (class_exists($subscriber)) {\n $this->events->subscribe($subscriber);\n }\n });\n break;\n }\n });\n $this->container->register($addon->provider());\n });\n $this->event->dispatch(new AddonLoaded());\n }", "title": "" }, { "docid": "d354d9c6bee7910684db2c7ca6c357d5", "score": "0.5225995", "text": "function bootstrap() {\n\tregister_cache_groups();\n\n\tif ( ! is_installed() ) {\n\t\tcreate_tables();\n\t}\n}", "title": "" }, { "docid": "b84aa8e1a061fcd0ccaec14d0c278cb5", "score": "0.5203267", "text": "protected static function boot () {\n parent::boot();\n //Mediante el evento creating se creara el slug mientras se este creando el curso, siempre y cuando no se este creando un usuario desde la consola\n static::saving(function(Course $course) {\n if( ! \\App::runningInConsole() ) {\n $course->slug = str_slug($course->nombre, \"-\");\n }\n });\n }", "title": "" }, { "docid": "2022987a5a601a01b66633cd37033d76", "score": "0.52028", "text": "public function bootstrap()\n {\n $this->loadConfig();\n\n //$this->loadRoutePaths();\n\n }", "title": "" }, { "docid": "ebfca01a4d1d6bd52a74bc1924d9531b", "score": "0.5195132", "text": "public static function boot()\n\t{\n\t\tparent::boot();\n\n\t\tstatic::addGlobalScope(new CityScope());\n\t}", "title": "" }, { "docid": "9823b077be89b2bde6f544c1ad804374", "score": "0.51938915", "text": "public function setUp()\n {\n // have an idea on how to only loads once per test pass?\n //\n // PHPUnit dislikes playing with $GLOBALS in its bootstrap file\n // that's why we had to do it on setup.\n\n if (is_null($GLOBALS)) {\n $GLOBALS = array();\n }\n\n if (!array_key_exists('_SESSION', $GLOBALS)) {\n $GLOBALS['_SESSION'] = array();\n }\n\n if (!array_key_exists('_SERVER', $GLOBALS)) {\n $GLOBALS['_SERVER'] = array();\n }\n\n $GLOBALS['_SERVER']['SERVER_PROTOCOL'] = \"http\";\n $GLOBALS['_SERVER']['REQUEST_METHOD'] = \"GET\";\n $GLOBALS['_SERVER']['REQUEST_URI'] = getenv(\"WP_HOME\");\n\n\n if (!defined('WP_USE_THEMES')) {\n define('WP_USE_THEMES', false);\n }\n\n $this->instance = Strata::bootstrap(Strata::requireVendorAutoload());\n if (!defined('ABSPATH')) {\n require_once Strata::getRootPath() . '/web/wp/wp-load.php';\n }\n\n require_wp_db();\n $GLOBALS['table_prefix'] = getenv('DB_PREFIX') ?: 'wp_';\n wp_set_wpdb_vars();\n wp_cache_init();\n\n $this->instance->run();\n }", "title": "" }, { "docid": "1b1e46c2a20d0039c5f0b29e0b3e1002", "score": "0.5182498", "text": "function setup_bootstrap() {\n require_once(__dir__.'/../../lib/Core/Bootstrap.php');\n new xBootstrap();\n }", "title": "" }, { "docid": "4f4f8833136039a62ed69ead90fc7841", "score": "0.5178874", "text": "public function boot()\n {\n //Schema::defaultStringLentgth(1991); //en caso de que no guarde en la base de datos uncomment this\n }", "title": "" }, { "docid": "df7b81a86847354ce58c33293c55a4d9", "score": "0.5176072", "text": "public function boot(){\n\n error_reporting(0);\n\n //echo Hash::make('Teste123');\n\n session_start();\n\n if ($_SERVER['SERVER_NAME'] == \"seacularis\") {\n $url_base = config('app.url');\n $admin_base = config('app.admin');\n } else {\n $url_base = config('app.url_oficial');\n $admin_base = config('app.admin_oficial');\n }\n\n $this->views(getenv(\"REMOTE_ADDR\"));\n\n $data = $this->get_data($admin_base);\n\n if (!isset($_SESSION['admin_path'])) {\n $_SESSION['admin_path'] = $admin_base;\n }\n\t\t\n view()->share(array(\n 'data' => $data,\n 'url_base' => $url_base,\n 'admin_base' => $admin_base\n ));\n }", "title": "" }, { "docid": "3e31c6b4d43844fb5bc645baabc723cd", "score": "0.5171928", "text": "protected function setUp() {\n $this->object = new IlluminateDatabaseBootstrap;\n }", "title": "" }, { "docid": "e57e3377a3a40ba1e71a5e9cf8f1caaf", "score": "0.51716644", "text": "public function bootstrap()\n {\n $dotenv = new Dotenv();\n $dotenv->load(ROOT_DIR.'/.env');\n\n Configuration::config();\n }", "title": "" }, { "docid": "a99942f45256a6c9d7ab3209e91aacf9", "score": "0.51675737", "text": "public function boot() {}", "title": "" }, { "docid": "a99942f45256a6c9d7ab3209e91aacf9", "score": "0.51675737", "text": "public function boot() {}", "title": "" }, { "docid": "7e43037fa9e61ea12d8d8a589b683861", "score": "0.5153145", "text": "protected static function boot()\n {\n parent::boot();\n static::creating(function($question){\n $question->slug = Str::slug($question->title);\n });\n }", "title": "" }, { "docid": "343cc07783ff7f5febf5765abbd9f74e", "score": "0.51513726", "text": "protected static function booted()\n {\n //\n }", "title": "" }, { "docid": "77ef33a646b6d9f01dc938520ec5a207", "score": "0.5147097", "text": "protected static function booting()\n {\n //\n }", "title": "" }, { "docid": "959ac796aac01d44defcecd656ab7553", "score": "0.51323014", "text": "function bootstrap() {\n\tadd_action( 'init', __NAMESPACE__ . '\\\\post_type' );\n\tadd_action( 'init', __NAMESPACE__ . '\\\\taxonomy' );\n\n\t// Editor assets.\n\tadd_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\\\register_editor_assets' );\n\n\t// Autoloaded class.\n\t$baz = new Baz();\n}", "title": "" }, { "docid": "4fe078283b6a2790feff689a2919b4a1", "score": "0.5126765", "text": "protected static function boot()\n {\n parent::boot();\n\n static::addGlobalScope(new AppScope());\n }", "title": "" }, { "docid": "3cd23b21c0219164870b7c3e961a5212", "score": "0.5119585", "text": "public function boot(){\n $this->addBoot();\n }", "title": "" }, { "docid": "2f40bab6e06368f75f351a038c8a29c8", "score": "0.5109264", "text": "public function boot()\n {\n /**\n * 當資源回應要轉換成 JSON 時\n * 預設的最外層資源將會被包裝在 data 鍵中\n * 如果你想要禁止包裝最外層的資源\n * 你可以在基本 Resource 類別上使用 withoutWrapping\n *\n * withoutWrapping方法只影響最外層的回應\n * 並不會移除你手動新增到自己的資源集合的 data 鍵。\n */\n Resource::withoutWrapping();\n }", "title": "" }, { "docid": "8aff0caf7c45d15dcc96cbe94d45a742", "score": "0.50962996", "text": "public function boot()\n {\n Braintree_Configuration::environment(\n getenv('BRAINTREE_ENVIRONMENT')\n );\n\n Braintree_Configuration::merchantId(\n getenv('BRAINTREE_MERCHANTID')\n );\n Braintree_Configuration::publicKey(\n getenv('BRAINTREE_PUBLICKEY')\n );\n Braintree_Configuration::privateKey(\n getenv('BRAINTREE_PRIVATEKEY')\n );\n }", "title": "" }, { "docid": "dd7f2562c30f3a71725e01350b1e49a6", "score": "0.50924", "text": "protected function _bootstrap() {\n\t\tif (!defined('ROOT')) {\n\t\t\tdefine('ROOT', $this->params['root']);\n\t\t}\n\t\tif (!defined('APP_DIR')) {\n\t\t\tdefine('APP_DIR', $this->params['app']);\n\t\t}\n\t\tif (!defined('APP')) {\n\t\t\tdefine('APP', $this->params['working'] . DS);\n\t\t}\n\t\tif (!defined('WWW_ROOT')) {\n\t\t\tdefine('WWW_ROOT', APP . $this->params['webroot'] . DS);\n\t\t}\n\t\tif (!defined('TMP') && !is_dir(APP . 'tmp')) {\n\t\t\tdefine('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'tmp' . DS);\n\t\t}\n\t\t$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php');\n\t\trequire CORE_PATH . 'Cake' . DS . 'bootstrap.php';\n\n\t\tif (!file_exists(APP . 'Config' . DS . 'core.php')) {\n\t\t\tinclude_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php';\n\t\t\tApp::build();\n\t\t}\n\n\t\t$this->setErrorHandlers();\n\n\t\tif (!defined('FULL_BASE_URL')) {\n\t\t\t$url = Configure::read('App.fullBaseUrl');\n\t\t\tdefine('FULL_BASE_URL', $url ? $url : 'http://localhost');\n\t\t\tConfigure::write('App.fullBaseUrl', FULL_BASE_URL);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "42c3219c954d24b361b27ec6eefcc4c4", "score": "0.50869966", "text": "public function booted()\n {\n// Spark::collectEuropeanVat('NL');\n\n \\Laravel\\Cashier\\Cashier::useCurrency('eur', '€');\n\n Spark::useStripe()\n ->noCardUpFront()->trialDays(10);\n\n// Spark::freePlan()\n// ->features([\n// 'First', 'Second', 'Third'\n// ]);\n\n Spark::plan('Silver Plan', 'bloggerlist-silver')\n ->price(10)\n ->features([\n 'First', 'Second', 'Third'\n ]);\n\n Spark::plan('Gold Plan', 'bloggerlist-gold')\n ->price(20)\n ->features([\n 'First', 'Second', 'Third'\n ]);\n }", "title": "" }, { "docid": "ce8b582814002a8f1a20c7ec4ebbeecf", "score": "0.5076151", "text": "public static function boot()\n {\n parent::boot();\n // self::creating(function ($model) {\n // $model->uuid = (string) Uuid::generate(4);\n // });\n }", "title": "" }, { "docid": "48141759d33cf82b28c71f03861d6af0", "score": "0.5073338", "text": "public static function bootInstanceTrait()\n {\n static::addGlobalScope(new InstancesScope);\n }", "title": "" }, { "docid": "df8c1190bf7ee00a67b1cedd4c6378f5", "score": "0.5063247", "text": "protected static function booted()\n {\n static::addGlobalScope(new IncidentsScope());\n }", "title": "" }, { "docid": "1243a9d4fd61afdd03a4ff3529b529f2", "score": "0.5061877", "text": "protected static function booting()\n {\n }", "title": "" }, { "docid": "1f05daf58e302224d1eb5376396fd9a1", "score": "0.5061448", "text": "public function boot()\n {\n Storage::extend('s3-v2', function ($app, $config) {\n $s3Config = array_only($config, ['key', 'region', 'secret', 'signature', 'base_url']);\n\n return new Flysystem(new Adapter(S3Client::factory($s3Config), $config['bucket']));\n });\n }", "title": "" }, { "docid": "77a6d65b4153b6b4003a59c0c62adfae", "score": "0.5058422", "text": "function _strap_build_production($slug)\n{\n\t$root = get_theme_root();\n\t$src = get_stylesheet_directory();\n\t$dst = $root . DIRECTORY_SEPARATOR . $slug;\n\n\t// create ./assets structure and move bootsrap around\n\t$assets_path = $dst . DIRECTORY_SEPARATOR . 'assets';\n\tmkdir($assets_path);\n\tmkdir($assets_path . DIRECTORY_SEPARATOR . 'styles');\n\tmkdir($assets_path . DIRECTORY_SEPARATOR . 'fonts');\n\tmkdir($assets_path . DIRECTORY_SEPARATOR . 'media');\n\n\trename( $dst . DIRECTORY_SEPARATOR . 'js', $assets_path . DIRECTORY_SEPARATOR . 'js' );\n\n\t$comp_path = $assets_path . DIRECTORY_SEPARATOR . 'components';\n\tmkdir($comp_path);\n\t$boot_src = $dst . DIRECTORY_SEPARATOR . 'bootstrap';\n\t$boot_dst = $comp_path . DIRECTORY_SEPARATOR . 'bootstrap';\n\trename( $boot_src, $boot_dst );\n\ttouch( $boot_dst . DIRECTORY_SEPARATOR . '_vars.less' );\n\tfile_put_contents( $boot_dst . DIRECTORY_SEPARATOR . '_vars.less', '@icon-font-path: \"./assets/components/bootstrap/fonts/\";' );\n\n\t$s_style = $dst . DIRECTORY_SEPARATOR . 'style.less';\n\t$content = file_get_contents($s_style);\n\t$content = str_replace('@import \"bootstrap/less/variables.less\"', '@import \"bootstrap/less/variables.less\";' . \"\\n\" . '@import \"bootstrap/_vars.less\"', $content);\n\t$content = str_replace('bootstrap/', 'assets/components/bootstrap/', $content);\n\tfile_put_contents($s_style, $content);\n\n\t$s_funcs = $dst . DIRECTORY_SEPARATOR . 'functions.php';\n\t$content = file_get_contents($s_funcs);\n\t$content = str_replace(\"'/bootstrap/js\", \"'/assets/components/bootstrap/js\", $content);\n\t$content = str_replace(\"'/js/\", \"'/assets/js/\", $content);\n\tfile_put_contents($s_funcs, $content);\n\n\t// cleanup\n\t$expendables = array(\n\t\t$boot_dst . DIRECTORY_SEPARATOR . 'boostrap.less',\n\t\t$boot_dst . DIRECTORY_SEPARATOR . 'theme.less',\n\t\t$dst . DIRECTORY_SEPARATOR . 'layouts',\n\t\t$dst . DIRECTORY_SEPARATOR . 'sass',\n\t\t$dst . DIRECTORY_SEPARATOR . 'CONTRIBUTING.md',\n\t\t$dst . DIRECTORY_SEPARATOR . 'codesniffer.ruleset.xml',\n\t\t$assets_path . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'navigation.js',\n\t);\n\tforeach($expendables as $expendable) {\n\t\tif( is_dir($expendable) ) _strap_rmdir_tree($expendable);\n\t\telseif(is_file($expendable)) unlink($expendable);\n\t}\n}", "title": "" }, { "docid": "f4284325ab9b8686fd203407538749cb", "score": "0.50569355", "text": "protected static function updateBootstrapping()\n {\n copy(__DIR__.'/tailwind-stubs/bootstrap.js', resource_path('js/bootstrap.js'));\n }", "title": "" }, { "docid": "3c57620c5d2318a174b72e7b68cf9b7f", "score": "0.5054236", "text": "public function run()\n {\n ServiceSite::create([\n 'name' => '青岛站',\n 'county' => '中国',\n 'province' => '山东省',\n 'province_simple' => '山东',\n 'city' => '青岛市',\n 'city_simple' => '青岛',\n ]);\n\n ServiceSite::create([\n 'name' => '济南站',\n 'county' => '中国',\n 'province' => '山东省',\n 'province_simple' => '山东',\n 'city' => '济南市',\n 'city_simple' => '济南',\n ]);\n }", "title": "" }, { "docid": "b93f0e37cc45e15c0965221830919956", "score": "0.5053215", "text": "protected static function boot() {\n parent::boot();\n\n static::saved(function($node) {\n $node->storeNewSlug();\n });\n }", "title": "" }, { "docid": "0c2cc7ce5f953363b2927cf576457b8d", "score": "0.50500226", "text": "public static function bootBootstrap()\n {\n /**\n * The Split was just created\n */\n static::created(function (Split $split) {\n Event::fire(new SplitCreated($split));\n });\n\n /**\n * The Split was just updated\n */\n static::updated(function (Split $split) {\n Event::fire(new SplitUpdated($split));\n });\n\n /**\n * The Split was just destroyed\n */\n static::deleted(function (Split $split) {\n Event::fire(new SplitDeleted($split));\n });\n }", "title": "" }, { "docid": "bc181d27d18e83eb5f54a8869f3d1a0d", "score": "0.5049074", "text": "protected static function booted()\n {\n static::creating(function ($account) {\n $account->uuid = (string) Str::uuid();\n });\n }", "title": "" }, { "docid": "4c20269fa49a86439d2a69206ceaae6f", "score": "0.5043556", "text": "protected static function booted()\n {\n static::creating(function ($model) {\n $model->id = UuidUuid::uuid4();\n });\n }", "title": "" }, { "docid": "521e4f8c28c4a3596a4d553a9632113a", "score": "0.5041267", "text": "public static function booted()\n {\n }", "title": "" }, { "docid": "670510b7887a62e16c8cc526dbcbae94", "score": "0.50396055", "text": "public function bootstrapSlim()\n {\n global $slimApp;\n\n $slimApp = new \\Slim\\App;\n }", "title": "" }, { "docid": "8c3a1f0ab609c7a4f095c4266c347c89", "score": "0.50392854", "text": "protected static function booted()\n {\n }", "title": "" }, { "docid": "8c3a1f0ab609c7a4f095c4266c347c89", "score": "0.50392854", "text": "protected static function booted()\n {\n }", "title": "" }, { "docid": "6c5ec6fbdb7929bb01c8c4198b56bf21", "score": "0.50387496", "text": "public static function bootSluggable()\n {\n static::creating(function ($instance) {\n if (empty($instance->slug)) {\n $slug = Str::slug($instance->name) ?: $instance->name;\n $instance->slug = static::where('slug', $slug)->exists()\n ? sprintf(\"%s-%s%s\", $slug, floor(microtime(true) * 1000), rand(1, 100))\n : $slug;\n }\n });\n\n static::updating(function ($instance) {\n if (empty($instance->slug)) {\n $slug = Str::slug($instance->name) ?: $instance->name;\n $instance->slug = static::where('slug', $slug)->exists()\n ? sprintf(\"%s-%s%s\", $slug, floor(microtime(true) * 1000), rand(1, 100))\n : $slug;\n }\n });\n }", "title": "" }, { "docid": "0f8b38b6451d71606e8e84de94c3c9fb", "score": "0.5038468", "text": "protected static function boot()\n {\n parent::boot();\n\n static::creating(function ($postcode) {\n $postcode->forceFill(['escaped_postcode' => $postcode->escape($postcode->postcode)]);\n });\n }", "title": "" }, { "docid": "9b29bf71c33268b0796ab6d93b12b72b", "score": "0.5035862", "text": "public function run()\n\t{\n\t\tself::seedAttributes();\n\t}", "title": "" }, { "docid": "060cb679ffecdd55387f2e671b91ee08", "score": "0.50350267", "text": "public abstract function SetUp();", "title": "" }, { "docid": "a546dae6ff2c0add4f2740a88bb6ff2b", "score": "0.50343907", "text": "protected static function boot()\n {\n parent::boot();\n\n static::addGlobalScope('SO3', function (Builder $builder) {\n $builder->where('ma_ct', '=', 'SO3');\n });\n }", "title": "" }, { "docid": "6c36312727a2040b0e81694aee59015f", "score": "0.503237", "text": "protected static function boot()\n {\n parent::boot();\n\n /**\n * Create an UUID instead of autoincrement value\n */\n static::creating(function ($instance) {\n $instance->id = Uuid::uuid4()->toString();\n });\n }", "title": "" }, { "docid": "381fcbb082102a993f0babe85e95b744", "score": "0.50093913", "text": "protected static function booted() \n {\n static::creating(function(LoteArticulo $lote){\n //ACTUALIZAR EL STOCK DEL ARTICULO\n $articulo = Articulo::findOrFail($lote->articulo_id);\n $articulo->stock = $articulo->stock + $lote->cantidad;\n $articulo->update();\n });\n }", "title": "" }, { "docid": "5af1573b46427693595ceff32bf12dd9", "score": "0.50049144", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \tAttribute::truncate();\n \t\n Attribute::insert([\n [\n 'attribute_set_id' => 1,\n 'name' => 'Documents',\n 'slug' => 'documents'\n ],\n [\n 'attribute_set_id' => 2,\n\t 'name' => 'Browser',\n\t 'slug' => 'browser'\n\t ],\n [\n 'attribute_set_id' => 2,\n 'name' => 'Messaging',\n 'slug' => 'messaging'\n ],\n [\n 'attribute_set_id' => 3,\n\t 'name' => 'Battery',\n\t 'slug' => 'battery'\n\t ],\n [\n 'attribute_set_id' => 4,\n 'name' => 'Radio',\n 'slug' => 'radio'\n ],\n [\n 'attribute_set_id' => 4,\n\t 'name' => 'GPS',\n\t 'slug' => 'gps'\n\t ],\n [\n\t 'attribute_set_id' => '4',\n\t 'name' => 'Bluetooth',\n\t 'slug' => 'bluetooth'\n\t ],\n [\n\t 'attribute_set_id' => '4',\n\t 'name' => 'WLAN',\n\t 'slug' => 'wlan'\n\t ],\n [\n 'attribute_set_id' => '5',\n 'name' => '3.5mm',\n 'slug' => '3.5mm'\n ],\n [\n 'attribute_set_id' => '5',\n 'name' => 'Loudspeaker',\n 'slug' => 'loudspeaker'\n ]\n ]);\n }", "title": "" }, { "docid": "5fcd3247b338fac763129d1eca1ad93d", "score": "0.5004416", "text": "public function bootstrapSystem()\n {\n $this->enableDisplayErrors()\n ->initializeConfiguration();\n }", "title": "" }, { "docid": "5fcd3247b338fac763129d1eca1ad93d", "score": "0.5004416", "text": "public function bootstrapSystem()\n {\n $this->enableDisplayErrors()\n ->initializeConfiguration();\n }", "title": "" }, { "docid": "a797a0513843f352f1a519a83584a6ae", "score": "0.5001676", "text": "protected function bootstrap() {\n if ($this->bootstrapped) {\n return;\n }\n\n // Validate, and prepare environment for Drupal bootstrap.\n $core = new Drupal7($this->config['drupal_root']);\n\n if (!defined('DRUPAL_ROOT')) {\n define('DRUPAL_ROOT', $this->config['drupal_root']);\n require_once DRUPAL_ROOT . '/includes/bootstrap.inc';\n }\n\n // Bootstrap Drupal.\n chdir(DRUPAL_ROOT);\n $core->validateDrupalSite();\n drupal_bootstrap(DRUPAL_BOOTSTRAP_PAGE_CACHE);\n\n // These globals should now be available.\n global $databases, $conf;\n\n // If this variable is not set, then Drupal looks for blocked IPs in the\n // Database, and the blocked_ips table may not yet exist.\n $conf['blocked_ips'] = array();\n\n // This is how Drupal knows that an installation is taking place, so that\n // it doesn't try to query the database.\n define('MAINTENANCE_MODE', 'install');\n\n drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);\n\n $this->database = $databases['default']['default'];\n\n $this->bootstrapped = TRUE;\n }", "title": "" }, { "docid": "932ad50cd784dfb92d48a466cfaa9606", "score": "0.50010043", "text": "public function boot(): void\n {\n $boots = require $this->configFile('boot');\n foreach ($boots as $boot) {\n $instance = Reflect::getInstance($boot);\n $instance->boot();\n }\n }", "title": "" }, { "docid": "1d5bb37a576c7ba25de3c6cf2c0f5a93", "score": "0.50009423", "text": "protected static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n $model->id = (string) Str::uuid();\n });\n }", "title": "" }, { "docid": "97d27a77354960242b4b7bbf4a7d3484", "score": "0.5000195", "text": "protected static function boot()\n {\n parent::boot();\n\n static::saved(function ($model) {\n /**\n * Clean up cache.\n */\n if (config('attributable.cache'))\n {\n Artisan::call('attributes:clear');\n }\n });\n }", "title": "" }, { "docid": "e9d1e2344301600a6b088e65dd248a01", "score": "0.49971348", "text": "public static function init() \n\t{\n\t\t// Run Silex App\n\t\tself::$app = Silex_App::run();\n\n\t\t// Database connection\n\t\tself::$conn = Database::connect();\n\n\t\t// Set debug\n\t\tself::set_debug();\n\n\t\t// Set DBAL\n\t\tself::set_dbal();\n\n\t\t// Set schema manager\n\t\tself::set_schema_manager();\n\n\t\t// Set query builder\n\t\tself::set_query_builder();\n\n\t\t// Return\n\t\treturn (object) array(\n\t\t\t'app' => self::$app, // New Silex application\n\t\t\t'config' => self::$config // Configuration in config/config.php\n\t\t);\n\n\t}", "title": "" }, { "docid": "0f21de0507a623712e732ce38e0a1dcc", "score": "0.499634", "text": "protected function boot() {\n\t}", "title": "" }, { "docid": "5d63b91c0ce6b5fedce9bb76dbf29d65", "score": "0.49956217", "text": "protected function boot()\n\t{\n\t\t$this->triggerEvent('booting');\n\n\t\tif(!empty($this->ID)){\n\t\t\t$this->new = FALSE;\n\t\t\t$this->_post = get_post($this->ID);\n\t\t\t$this->set('title', $this->_post->post_title);\n\t\t\t$this->set('content', $this->_post->post_content);\n\n\t\t\tforeach($this->attributes as $attribute){\n\t\t\t\t$meta = $this->getMeta($attribute);\n\t\t\t\tif(empty($meta) && isset($this->default[$attribute])){\n\t\t\t\t\t$this->set($attribute, $this->default[$attribute]);\n\t\t\t\t}else{\n\t\t\t\t\t$this->set($attribute, $meta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!empty($this->taxonomies)){\n\t\t\t\tforeach($this->taxonomies as $taxonomy){\n\t\t\t\t\t$this->tax_data[$taxonomy] = get_the_terms($this->ID, $taxonomy);\n\n\t\t\t\t\tif($this->tax_data[$taxonomy] === FALSE){\n\t\t\t\t\t\t$this->tax_data[$taxonomy] = [];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->booted = TRUE;\n\t\t$this->triggerEvent('booted');\n\t}", "title": "" }, { "docid": "95eba39338224d9ce17fa18752ae1aca", "score": "0.49936092", "text": "public static function boot()\n {\n parent::boot();\n static::creating(function ($patients) {\n $patients->user_id = Auth::id();\n });\n }", "title": "" }, { "docid": "c5e8d58f252539ba05afd0d78ebdf29b", "score": "0.49908847", "text": "protected static function updateBootstrapping()\n {\n (new Filesystem)->delete(\n resource_path('js')\n );\n (new Filesystem)->copyDirectory(__DIR__.'/vuetify-stubs/resources/js', resource_path('js'));\n\n }", "title": "" }, { "docid": "0615d0c21deefde04f1d2af52cffcbfe", "score": "0.498984", "text": "public function boot()\n {\n Schema::defaultstringlength(191);\n }", "title": "" }, { "docid": "4490f07da127ba5840542c727dd99bb5", "score": "0.4986762", "text": "public static function boot()\n {\n parent::boot();\n\n static::saving(function () {\n self::cacheKey();\n });\n\n static::deleting(function () {\n self::cacheKey();\n });\n }", "title": "" }, { "docid": "cbe9e513240a1ecb97259212b4348869", "score": "0.49848297", "text": "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->code = (string)ShortUuid::uuid4();\n });\n }", "title": "" }, { "docid": "af183c4ff3ce959e2d4402f43f98e7a9", "score": "0.49805748", "text": "protected static function boot()\n {\n parent::boot();\n static::observe(EmpresaObserver::class);\n\n\n //aqui, como o EmpresaTraint e chamado no modelo de Empresa, quando ele manipula, ja adiciona automatico\n //a clausa where desse escopoglobal\n //static::addGlobalScope(app(EmpresaScope::class)); oura opção\n static::addGlobalScope(new EmpresaScope);\n }", "title": "" }, { "docid": "8eb60435688c36f00750e49dd15c1aac", "score": "0.49802792", "text": "public function boot(): void\n {\n //\n }", "title": "" }, { "docid": "8eb60435688c36f00750e49dd15c1aac", "score": "0.49802792", "text": "public function boot(): void\n {\n //\n }", "title": "" }, { "docid": "8eb60435688c36f00750e49dd15c1aac", "score": "0.49802792", "text": "public function boot(): void\n {\n //\n }", "title": "" }, { "docid": "8eb60435688c36f00750e49dd15c1aac", "score": "0.49802792", "text": "public function boot(): void\n {\n //\n }", "title": "" }, { "docid": "8eb60435688c36f00750e49dd15c1aac", "score": "0.49802792", "text": "public function boot(): void\n {\n //\n }", "title": "" } ]
d8bb7fe72025affc2d6f6abe4c29a993
A basic feature test example.
[ { "docid": "9ceb750becd8ba6926f0ef2aa0e52498", "score": "0.0", "text": "public function testAcessarCadastroProdutos()\n {\n $usuario = User::where('id', '=', '1')\n ->first();\n $response = $this\n ->actingAs($usuario)->get('/cadastrarProduto')\n ->assertStatus(200);\n $response->assertStatus(200);\n }", "title": "" } ]
[ { "docid": "9b7ea451a8143b021a923413bdcc9d3a", "score": "0.7463382", "text": "public function testExample()\n {\n $this->visit('/')\n ->type('Test Fact', 'content')\n ->press('Add Fact')\n ->see(\"Test Fact\");\n }", "title": "" }, { "docid": "0fcd471d9ec3e9d8e3c1da9a0676bd9e", "score": "0.70232284", "text": "function test_sample() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "52ba38a8741898dab21cc7cd5367c564", "score": "0.7003509", "text": "public function testExample()\n {\n //$this->assertTrue(true);\n $this->visit('/artical/create')\n ->type('Economic problem','title')\n ->type('Artical body','body')->press('add Artical')->seePageIs('/test')->see('php unit testss');\n }", "title": "" }, { "docid": "e731d72fc917ed2d57599e0f3b71619c", "score": "0.69894797", "text": "public function testBasicExample()\n\t{\n\t\t// Having\n\t\t$user = seed('User');\n\t\t\n\t\t// When\n\t\t$this->actingAs($user)\n\t\t\t->visit('/')\n\n\t\t// Then\n\t\t\t->see('Solicitudes recientes');\n\t}", "title": "" }, { "docid": "f005dbde3688773ef09cabd1fb496c77", "score": "0.6960958", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Task app example');\n }", "title": "" }, { "docid": "18a30f98975b677a46a2eca23335a596", "score": "0.6937363", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Hello');\n }", "title": "" }, { "docid": "70520c2e2ab50607cf5b139216a835e4", "score": "0.6933389", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Lista de Tarefas');\n \n });\n }", "title": "" }, { "docid": "0c88c34c26b8da3cd6a02826c9917118", "score": "0.693089", "text": "public function testSample()\n\t{\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "0cc9d871636937e35da8c84d1ade874b", "score": "0.6871395", "text": "public function testBasicTest()\n {\n $this->get(\"/fs\")\n ->assertStatus(200)\n ->assertSee('FSearch');\n }", "title": "" }, { "docid": "cfb1c755edf1ff155fbe7fadab5088db", "score": "0.6865566", "text": "public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "cdd666acc07740433db823ed34a74dd6", "score": "0.6862796", "text": "public function testGetFeatures ()\n {\n $this->assertEquals(My_Feature::getFeatures(), $this->validFeatures);\n }", "title": "" }, { "docid": "5c328e3d6000d8a083dfabf5f12b833d", "score": "0.68537724", "text": "public function testExample()\n {\n $this->actingAs( \\App\\User::first() )\n ->visit('/vehicle')\n ->see('Vehicle Listing');\n }", "title": "" }, { "docid": "aa6efe8984560b103bd7fdbb57bde751", "score": "0.68278825", "text": "public function testExample()\n {\n\t\t$this->visit('/')\n ->see('LaraAdmin')\n\t\t\t ->see('Taylor Otwell');\n }", "title": "" }, { "docid": "5b76601dd7a5af5e6f633f5eba0f4d65", "score": "0.6823117", "text": "public function testBasicExample()\n {\n // Visit the hompage\n $this->visit('/')\n // Press the Click Me Link\n ->click('Click Me')\n // See \"You have been clicked.\"\n ->see(\"You have been clicked.\")\n // Assert that the current url is /feedback\n ->seePageIs('/feedback');\n\n }", "title": "" }, { "docid": "1e31c47758b11917aee3602daffd59ce", "score": "0.68165016", "text": "public function testExample()\n {\n $this->get('/')->assertSee('This is a test');\n }", "title": "" }, { "docid": "62fc81411484f0af435bb8574c21f3aa", "score": "0.6795448", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news')\n ->assertSee('News')\n ->press('Create news')\n ->assertSee('Title')\n ->press('Save')\n ->assertSee('The title field is required.');\n });\n }", "title": "" }, { "docid": "368d63e41533bf049adf8283ace63bda", "score": "0.67764294", "text": "public function testFeatureTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "7ab3834c59327058c7f3ddaefcec05fe", "score": "0.67526937", "text": "public function testExample()\n {\n \t$this->assertTrue(true);\n }", "title": "" }, { "docid": "8cbd5ade9c47931b52f33e5f7275236f", "score": "0.67483056", "text": "public function testExample()\n {\n $this->visit('/')\n ->see('Laracasts')\n ->hold(2);\n }", "title": "" }, { "docid": "9b874d37212a8eb8bab5b354045b442d", "score": "0.673736", "text": "function test_basic_example()\n {\n $user = factory(\\App\\User::class)->create([\n 'name'=>'Hector Munoz',\n 'email'=>'[email protected]',\n ]);\n\n $this->actingAs($user, 'api')\n ->visit('api/user')\n ->see('Hector Munoz')\n ->see('[email protected]');\n }", "title": "" }, { "docid": "2f91b34b89b1f4c1da7f129b88e36b73", "score": "0.6725454", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel')\n ->click('#clickme')\n ->assertUrlIs('https://laravel.com/docs/5.5')\n ->type('#search-input','eloquent')\n ->pause(2000)\n ->screenshot('home.jpg');\n });\n }", "title": "" }, { "docid": "b35a5cc80785409dd4b356b1c0e6ef66", "score": "0.67231524", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/contact')\n ->assertSee('Did you like what you saw');\n });\n }", "title": "" }, { "docid": "1e3993a1398ea5174eae1686d9055e46", "score": "0.6715333", "text": "public function testExample() {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('活动');\n $browser->visit('/course')\n ->assertSee('课程');\n });\n }", "title": "" }, { "docid": "af6a3c1e8754785ef8bbf70f61fd45af", "score": "0.6706834", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $random = rand();\n\n $browser->loginAs(\\App\\User::find(1745658415475687))\n ->visit('/user/163743962')\n ->type('compliment', \"This is a Dusky compliment with random data: $random\")\n ->press('Give compliment')\n ->assertPathIs('/user/163743962')\n ->assertSee(\"This is a Dusky compliment with random data: $random\")\n ->visit('/compliments/given')\n ->assertSee(\"This is a Dusky compliment with random data: $random\"); \n\n });\n\n\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.666891", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "9536508b0b91e08eeceb5777a2271f69", "score": "0.6668258", "text": "public function testBasicExample()\n {\n // 1. visit the homepage\n $this->visit('/')\n // 2. press \"click me\" link\n ->click('Click Me')\n // 3. see \"you have clicked me\"\n ->see('you have been clicked me')\n // 4. assert that the current url is /feedback\n ->seePageis('/feedback');\n\n }", "title": "" }, { "docid": "e4284dbb5ffd7ab49287d582cc66a839", "score": "0.6660473", "text": "public function testSimpleUse() {\n // Given the coffee machine is started\n $this->actionwords->theCoffeeMachineIsStarted();\n // When I take a coffee\n $this->actionwords->iTakeACoffee();\n // Then coffee should be served\n $this->actionwords->coffeeShouldBeServed();\n }", "title": "" }, { "docid": "dfedf3eeb89d7cdbc151b5e31307fe23", "score": "0.66436875", "text": "public function testExample()\r\n {\r\n $this->assertTrue(true);\r\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "3e7ea60a957c4cc7c404ed90f3d6cd18", "score": "0.66392654", "text": "public function testGetUsage()\n {\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "5206edc2a16a4a8673d371a5e2a7eb76", "score": "0.65999097", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "title": "" }, { "docid": "b356d3044228e01e35dcd591293db79c", "score": "0.65833914", "text": "public function testExample()\n {\n $this->visit('/')\n ->type('0668079578', 'rfid')\n ->check('terms')\n ->press('Submit')\n ->seePageIs('/');\n }", "title": "" }, { "docid": "138cbb50e4b3703d9e2141e4b41a84d0", "score": "0.6579514", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/kayit-ol')\n ->type('#name','Test 2')\n ->type('#surname','Kullanıcı')\n ->type('#email','[email protected]')\n ->type('#pass','123')\n ->click('button')\n ->waitForLocation('/giris-yap')\n ->assertPathIs('/giris-yap');\n });\n }", "title": "" }, { "docid": "c75304926a95b4eb9d81599f4b9c02a2", "score": "0.6572566", "text": "public function testExample()\n {\n // create beverage using factory\n\n // get name\n\n // assert\n $this.assertTrue(true);\n }", "title": "" }, { "docid": "a6a31c64fca6f164384925849089e3b0", "score": "0.6569957", "text": "function test_basic_example()\n {\n \t$name = \"Victor Planchuelo\";\n \t$email = '[email protected]';\n\n \t$user = factory(\\App\\User::class)->create([\n \t\t'name' => $name,\n\t\t\t'email' => $email,\n\t\t]);\n\n $this->actingAs($user, 'api')\n\t\t\t->visit('api/user')\n\t\t\t->see($name)\n \t->see($email);\n }", "title": "" }, { "docid": "3d50007f0877e4dc66d6be136a8cf6c1", "score": "0.65643984", "text": "public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }", "title": "" }, { "docid": "ccdc575949c6d4ea65adc857461ab805", "score": "0.6563967", "text": "public function testSomething()\n\t{\n\t}", "title": "" }, { "docid": "f846e6d113892ee1f969181b2e1862f0", "score": "0.65520924", "text": "public function testShowOne();", "title": "" }, { "docid": "1aa17bf4996b3a39f037eeee7c5788df", "score": "0.6549333", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $string = 'View All bridges';\n $browser->loginAs(User::find(1))\n \t\t->visit('/bridges')\n ->assertSee($string);\n });\n }", "title": "" }, { "docid": "1e9a7567308087c8b2462cfde01d4f05", "score": "0.6544299", "text": "public function testBasicExample()\n {\n $this->visit('/');\n $this->visit('membersadministration');\n $this->visit('me');\n $this->visit('login');\n\n $this->visit('user/municipalities');\n $this->visit('user/zones');\n $this->visit('user')\n ->press('inputSave');\n }", "title": "" }, { "docid": "c7903d0690f730bbab13143c2812655a", "score": "0.6543461", "text": "public function testBasicExample(){\n $this->browse(function (Browser $browser) {\n $browser->visit('/laravel')\n ->assertSee('Laravel');\n });\n }", "title": "" }, { "docid": "8f294df0adeeca541f432a4e6924b7b2", "score": "0.6540675", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel');\n });\n }", "title": "" }, { "docid": "36d934150bce66009774505d40e56d0d", "score": "0.65336347", "text": "public function testBasicExample()\n {\n $true = true;\n\n $this->assertTrue($true);\n }", "title": "" }, { "docid": "355c99151f633c8c1efcdf9ab8d6e429", "score": "0.6527542", "text": "public function testBasic()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "9d9462f3e6de4ff4c8e45eae9c2e2d5d", "score": "0.65199965", "text": "public function example()\n {\n return true;\n }", "title": "" } ]
29257a21908aac3f84047bb8a629063b
Manage instance usage of this class
[ { "docid": "54d333511819d9208fcb2f8bcd555723", "score": "0.0", "text": "public static function &getInstance() {\n\t\tglobal $adb;\n\t\tif (!isset($adb)) {\n\t\t\t$adb = new self();\n\t\t}\n\t\treturn $adb;\n\t}", "title": "" } ]
[ { "docid": "48ab1105260dff1fb9090734410b9c04", "score": "0.70068806", "text": "public function __construct() {\n\t\t//$this->instance = $instance;\n\t}", "title": "" }, { "docid": "1172322ac7cd097aab3cbe02d7eb40a8", "score": "0.68622494", "text": "public function __construct()\n {\n self::$instance = $this;\n }", "title": "" }, { "docid": "77e4acff4b60df331c2aa27d29036b94", "score": "0.68155754", "text": "public static function instance(){}", "title": "" }, { "docid": "77e4acff4b60df331c2aa27d29036b94", "score": "0.68155754", "text": "public static function instance(){}", "title": "" }, { "docid": "b2cb99f6e574d448011483c4ced1bfba", "score": "0.67946994", "text": "function __construct()\n {\n self::$Instance = $this;\n }", "title": "" }, { "docid": "a260d9f7e28bfc6f751f7a9d2d8a6744", "score": "0.676849", "text": "public function __construct()\n\t{\n\t\tself::$_instance = $this;\n\t}", "title": "" }, { "docid": "44a859bb630f2022dc5ac314f4d2c9b4", "score": "0.6526516", "text": "protected function __construct() {\n\t\t// Protect class from initiated multiple times.\n\t}", "title": "" }, { "docid": "1fa8920886b3edef9ad6e034d27c5a30", "score": "0.6526157", "text": "abstract protected function prepareInstance();", "title": "" }, { "docid": "331d92aaaedda49f0ed50d72ad1567bb", "score": "0.6512773", "text": "final function __construct() {\n $class_parts = explode('\\\\', get_class($this));\n $this->resource = end($class_parts);\n $this->database = database::get_instance();\n $this->cora = cora::get_instance();\n $this->setting = setting::get_instance();\n $this->api_session = api_session::get_instance();\n }", "title": "" }, { "docid": "a218ef315f3def6ed1e5960a3e129c0e", "score": "0.6500341", "text": "protected function __construct() {\r\n\t\t// Protect class from initiated multiple times.\r\n\t}", "title": "" }, { "docid": "2971a87b367a74741181094dff5b5c31", "score": "0.6487395", "text": "abstract protected static function _instance();", "title": "" }, { "docid": "6203b4c9f6179b526507a135cba02a7c", "score": "0.6442949", "text": "public static function init() {\n\t\t\tself::$instance = self::get_instance();\n\t\t}", "title": "" }, { "docid": "910b821cbe8df3cd3d387e4b35f3c801", "score": "0.6378264", "text": "protected function __construct()\r\n {\r\n parent::__construct();\r\n self::$INSTANCE = $this;\r\n $this->reset();\r\n }", "title": "" }, { "docid": "d156316a6e9661a098b8616255e6901a", "score": "0.6375206", "text": "static function initialize() {\n $instance = self::get_instance();\n }", "title": "" }, { "docid": "ec76fd27e685696eef1d0685a18ceb6f", "score": "0.6330802", "text": "public static function init() {\n\t\t$instance = self::get_instance();\n\t}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6316563", "text": "private function __construct(){}", "title": "" }, { "docid": "b7c96a7fa59c14ac3dcfb094f773c605", "score": "0.62831205", "text": "public final function onGetInstance()\r\n\t{\r\n\t\t// Processing Mode\r\n\t\t$_objSelfInstance = self::$_OBJECT_INSTANCE;\r\n\t\t$_objSelfInstance->setVariable(\r\n\t\t\tSTRIPE_PROCESSOR::STRIPE_PROCESSOR_PARAM_PROCESSING_MODE, \r\n\t\t\tSTRIPE_PROCESSOR::STRIPE_PROCESSOR_CONFIG_PROCESSING_MODE_LIVE\r\n\t\t);\r\n\t\t\r\n\t\t// Currency\r\n\t\t$_objSelfInstance->setVariable(\r\n\t\t\tSTRIPE_PROCESSOR::STRIPE_PROCESSOR_PARAM_CURRENCY, \r\n\t\t\tSTRIPE_PROCESSOR::STRIPE_PROCESSOR_CONFIG_CURRENCY_USD\r\n\t\t);\r\n\t\t\r\n\t\t$_objSelfInstance->setVariable('Errors', array());\r\n\t}", "title": "" }, { "docid": "52ff7deeb9fa6d3953b18f05eb00bdee", "score": "0.62753814", "text": "function __construct() {\n // and with what design\n }", "title": "" }, { "docid": "3c484d770d75df827c23881d2c6f855a", "score": "0.62595445", "text": "private function __construct() {\n\t\treturn;\n\t}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.6259004", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.6259004", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.6259004", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.6259004", "text": "protected function __construct(){}", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.6225409", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.6225409", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.6225409", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.6225409", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.6206531", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.6206531", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.6206531", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.6206531", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.6206531", "text": "public function getInstance();", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.6204606", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.6204606", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "3ba95ab3b56f155f407e99f9fbb1e148", "score": "0.61841726", "text": "public function __construct() {\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.61780155", "text": "final private function __construct(){}", "title": "" }, { "docid": "4526326ec7aa4ef98bb095f30cd1fb30", "score": "0.6157087", "text": "function __construct(){\n \n }", "title": "" }, { "docid": "3a7b3159dfb61732e7f0ee2c51cda7e9", "score": "0.6154418", "text": "protected function makeClassInstance(): void\n {\n $objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n $this->entryStorage = $objectManager->get(ObjectStorage::class);\n $this->pageRepository = $objectManager->get(PageRepository::class);\n $this->fieldValueService = $objectManager->get(FieldValueService::class);\n }", "title": "" }, { "docid": "28db090252ec25c0a19bb4994c8e085c", "score": "0.6146828", "text": "function __construct()\r\n\t\t{\r\n\t\t\t$this->cn = new cn($this);\r\n\t\t\t$this->session = new session($this);\r\n\t\t\t$this->utils = new utils($this);\r\n\t\t}", "title": "" }, { "docid": "1949f1f327a45b527bc83f85820d727d", "score": "0.6146681", "text": "public function getInstance(): self;", "title": "" }, { "docid": "d768e0a1b00989ae9966c358862c4f1f", "score": "0.61448926", "text": "private function __constructor(){}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6135413", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6135413", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6135413", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6135413", "text": "protected function init() {}", "title": "" }, { "docid": "740fa43055efdfd7daf997d7b7cd62fa", "score": "0.61227876", "text": "function __construct()\n\t\t\t{\n\t\t\t}", "title": "" }, { "docid": "400e5cbf62fa66a7a1b804df5cf815a8", "score": "0.6122602", "text": "public function __construct()\n {\n $this->connector = new connector();\n $this->puller = new data_puller();\n $this->putter = new data_putter();\n }", "title": "" }, { "docid": "7b7993725df5808222f606a49a33e682", "score": "0.61175036", "text": "function __construct() {\n\n\t\t\n\t}", "title": "" }, { "docid": "9f841618a081bd3b7547ced165c3c12a", "score": "0.61041546", "text": "private function __construct() { \n\t\t// \n\t\t}", "title": "" }, { "docid": "94d0db16154e88b015bc5897be9cca55", "score": "0.61000276", "text": "public function __construct() {\n parent::__construct();\n self::$instance = & $this;\n $this->view = new View();\n }", "title": "" }, { "docid": "c7e2c1b6bd8582f4da1de7e78a15e707", "score": "0.60910076", "text": "function __construct() {\r\n\t\t}", "title": "" }, { "docid": "635b0acef48ca4581a1394496c9644ff", "score": "0.6083996", "text": "public function __construct() {\n \n\t\t$this->demo_files_path = dirname(__FILE__) . '/demo-files/';\n\n self::$instance = $this;\n\t\tparent::__construct();\n\n }", "title": "" }, { "docid": "cdb7aa61325b0a6a1142a8e237a5e60e", "score": "0.6078011", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "f33f9f07e2041987027dce1c449daa8e", "score": "0.6075843", "text": "protected function __construct() {\n //Get the instance of the vehicleStore object where all the vehicles are stored \n// $this->vehicleStore = VehicleStore::getInstance();\n }", "title": "" }, { "docid": "fb5e3106f4d085a62fd71d260a630af3", "score": "0.60553664", "text": "public function __construct()\n {\n $this->session = new Session();\n $this->dbConn = new DB();\n $this->view = new View();\n }", "title": "" }, { "docid": "9a0fff014a2d24fd21fa4d21dc4aea06", "score": "0.6053018", "text": "public function __construct(){\n /**\n * \n */\n $this->db = new Database();\n $this->fm = new Format();\n }", "title": "" }, { "docid": "b4e425e88b336f2040e816b9d78c807f", "score": "0.605212", "text": "protected function __init__() { }", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6046098", "text": "protected function __construct() {}", "title": "" }, { "docid": "d76f7af5f0d2eb0ff929643c562baaaf", "score": "0.60447294", "text": "public function __construct()\n {\n parent::__construct();\n $this->utils = new Utils();\n }", "title": "" }, { "docid": "75d2140febd7ac80b7b0136cde6923c7", "score": "0.6043351", "text": "function __construct() {\n }", "title": "" }, { "docid": "c3c91931c2fbda2c469a9a141fbf3351", "score": "0.603938", "text": "function __construct() {\r\n }", "title": "" }, { "docid": "17cececfdb0da89085487d1abba0fe63", "score": "0.6036531", "text": "public function __construct()\n {\n $this->loader = Pi_loader::singleton($this);\n $this->db = Pi_db::singleton();\n $this->core = Pi_core::singleton();\n $this->log = Pi_logs::singleton();\n $this->flash = Pi_flash::singleton();\n $this->metadata = Pi_metadata::singleton();\n $this->validation = Pi_validation::singleton();\n $this->session = Pi_session::singleton();\n }", "title": "" }, { "docid": "2b022bb3bb9c7b47abc1cddc3cd1a5aa", "score": "0.6035259", "text": "public function __construct()\n {\n self::$_instance =& $this;\n\n // Assign Izy classses as controller attributes (excluding IZY_controller class)\n foreach (system_loaded('system') as $attribute => $system_class)\n {\n if ($attribute != 'controller')\n {\n $this->$attribute =& load_class($system_class, 'system');\n }\n }\n // Assign helpers as controller attributes\n foreach(system_loaded('helpers') as $attribute => $system_class)\n {\n $attribute = str_replace('/', '_', strtolower($attribute));\n $this->$attribute =& load_class($system_class, 'helpers');\n }\n\n // Assign models as model attributes\n foreach(models_loaded() as $attribute => $model)\n {\n $attribute = str_replace('/', '_', strtolower($attribute));\n $this->$attribute =& load_model($model);\n }\n }", "title": "" }, { "docid": "7535729a6bb8c56b1a4b3aa92e79c198", "score": "0.6030492", "text": "function __construct() { }", "title": "" }, { "docid": "a112d8328767b9b6a44fb51bd1623fca", "score": "0.6021938", "text": "function __construct()\n \t{\n\t $this->error = new errExceptions;\n\t $this->database = new dbAPI;\n\t \t}", "title": "" }, { "docid": "be273245907788f5281b32c60e0e46aa", "score": "0.602158", "text": "public function base()\n\t{\n\t\t$this->app->log = new Log($this->app);\n\t\t$this->app->time = new Time($this->app);\n\t\t$this->app->json = new Json($this->app);\n\t\t$this->app->random = new Random($this->app);\n\t\t$this->app->filter = new Filter($this->app);\n\t\t$this->app->escape = new Escape($this->app);\n\t\t$this->app->unescape = new Unescape($this->app);\n\t\t$this->app->format = new Format($this->app);\n\t\t$this->app->validator = new Validator($this->app);\n\t\t$this->app->file = new File($this->app);\n\t\t$this->app->dir = new Dir($this->app);\n\t\t$this->app->html = new Html($this->app);\n\t\t$this->app->ui = new Ui($this->app);\n\t\t$this->app->text = new Text($this->app);\n\t\t$this->app->debug = new Debug($this->app);\n\t}", "title": "" }, { "docid": "b921bb8f29295baa526db8d62c46e636", "score": "0.6018832", "text": "private function __construct () {\r\n }", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.60148436", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "b32278ea69e8ef74b2848d767be27fbb", "score": "0.60141474", "text": "public function __construct() {\n \n }", "title": "" }, { "docid": "15652faf24a621455e3ecc415eae96ec", "score": "0.6011333", "text": "private function __construct(){\r\n\t}", "title": "" }, { "docid": "15652faf24a621455e3ecc415eae96ec", "score": "0.6011333", "text": "private function __construct(){\r\n\t}", "title": "" }, { "docid": "763fff94eca613bb1a2de8bb8d749127", "score": "0.60112065", "text": "function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "763fff94eca613bb1a2de8bb8d749127", "score": "0.60112065", "text": "function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "763fff94eca613bb1a2de8bb8d749127", "score": "0.60112065", "text": "function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "763fff94eca613bb1a2de8bb8d749127", "score": "0.60112065", "text": "function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "caa508ef031f137baf2a6a74eaee29d6", "score": "0.6008989", "text": "public function __init(){\n \n }", "title": "" }, { "docid": "e68a82c220295261beb2790a071b0b4f", "score": "0.6008596", "text": "public static function get_instance() { return self::$instance; }", "title": "" }, { "docid": "e6f52d26c04a457e1b9156292f7c3623", "score": "0.6001641", "text": "public function __construct(){\n\t\t\t$this->setup();\n\t\t}", "title": "" }, { "docid": "88969726f4e0f63654cd06c35cf41a4a", "score": "0.59996027", "text": "protected function __construct(){\r\n\r\n\t}", "title": "" } ]
944ff8fc0159ca0305c48209ebcc0f7b
Gets the value of the first result with a matching key.
[ { "docid": "a9d9af1fe79f22c691b5b37446fb4b03", "score": "0.6676791", "text": "public function firstValue(?string $key): ?string\n {\n return ($first = $this->first($key))\n ? $first->getValue()\n : null;\n }", "title": "" } ]
[ { "docid": "d7108af2500244c4011c7d89e85f5ed2", "score": "0.77488333", "text": "public function getOne($key) {\n\t\tforeach($this->values as $oPair) {\n\t\t\tif ($oPair->getName() == $key) return $oPair->getValue();\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "efae60cdc858d851c77ef5fb4c12501b", "score": "0.6958684", "text": "public function getFirst(string $key)\n {\n return collect($this->get($key))\n ->filter()\n ->first();\n }", "title": "" }, { "docid": "8265ba04a36bd72d87dce53fe4053d20", "score": "0.6801092", "text": "public function get_value($key='')\n {\n $this->db->where($this->col_key,$key);\n $mlist = $this->get();\n if(count($mlist)>0)\n return $mlist[0][$this->col_value];\n else\n return false;\n }", "title": "" }, { "docid": "f96d2541f99290402c1fa5eae07888e9", "score": "0.6789607", "text": "public function findFirst($key, $value)\n {\n $result = $this->findItems(\n function (ClientObject $item) use ($key, $value) {\n return $item->getProperty($key) === $value;\n });\n return (is_array($result) && (count($result) > 0) ? array_values($result)[0] : null);\n }", "title": "" }, { "docid": "8820b31998992a143cc7022107b93744", "score": "0.67884475", "text": "public function get($key)\n {\n $ifNotFound = new stdClass;\n\n $result = $this->find(\n function ($k, $v) use ($key) {\n return $k == $key;\n },\n $ifNotFound\n );\n\n if ($result === $ifNotFound) {\n throw new ItemNotFound;\n }\n\n return $result;\n }", "title": "" }, { "docid": "4b657ab7ec8d5c4797cd42bc24c4a7e2", "score": "0.67797834", "text": "public static function getByKey($key)\n {\n return static::where('key', $key)->first();\n }", "title": "" }, { "docid": "8aa865bfa55bb1e9128d628b1c3b5710", "score": "0.674965", "text": "public function first(?string $key): ?DocBlockParameter\n {\n foreach ($this->results as $kv) {\n if ($kv->getKey() === $key) {\n return $kv;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "cbb613f523713bb70decea52ae520fe8", "score": "0.67379487", "text": "protected function getValue($key)\n {\n $query = new Query();\n $query->select([$this->getDataFieldName()])\n ->from($this->cacheTable)\n ->where('[[id]] = :id AND ([[expire]] = 0 OR [[expire]] >' . time() . ')', [':id' => $key]);\n if ($this->db->enableQueryCache) {\n // temporarily disable and re-enable query caching\n $this->db->enableQueryCache = false;\n $result = $query->createCommand($this->db)->queryScalar();\n $this->db->enableQueryCache = true;\n\n return $result;\n }\n\n return $query->createCommand($this->db)->queryScalar();\n }", "title": "" }, { "docid": "34ce3617ddde1100a8170176a6d5be1d", "score": "0.6712718", "text": "public function getValue(string $key);", "title": "" }, { "docid": "338acf9b14b8c68420f4ad13c1619b42", "score": "0.6707682", "text": "public function offsetGet($key)\n\t{\n\t\tif ($this->offsetExists($key))\n\t\t\treturn new YQL_Result($this->result[$key]);\n\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "605e8b63c19a7b54df84494337778e84", "score": "0.6707459", "text": "public function get($key)\n\t{\n\t\t$value = $this->engine->get($this->id($key));\n\n\t\tif ($this->engine->getResultCode() == 0)\n\t\t{\n\t\t\treturn $value;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "243886fa8606be9f0b754af67ab66b3f", "score": "0.66543704", "text": "public function getValue($key);", "title": "" }, { "docid": "243886fa8606be9f0b754af67ab66b3f", "score": "0.66543704", "text": "public function getValue($key);", "title": "" }, { "docid": "55fece52b7fba57225a54a8d006548a3", "score": "0.6640593", "text": "public function findByKey($key)\n {\n return $this->get($key);\n }", "title": "" }, { "docid": "55fece52b7fba57225a54a8d006548a3", "score": "0.6640593", "text": "public function findByKey($key)\n {\n return $this->get($key);\n }", "title": "" }, { "docid": "95be0875fd5a6940d954dc3794dc4885", "score": "0.66085833", "text": "public function getByKey($key)\n {\n return $this->model->where('key','=',$key)->first();\n }", "title": "" }, { "docid": "fbc63a72631cde5cf8a36636ac258a17", "score": "0.6570462", "text": "public function lookup($key)\n {\n if (!$this->contains($key)) {\n return null;\n }\n return $this->_data[$key];\n }", "title": "" }, { "docid": "d828f0c9e85c3226b048f5a17b348094", "score": "0.6570373", "text": "public static function getItem(string $key)\n {\n return static::where('key', $key)->first();\n }", "title": "" }, { "docid": "7ccf0caf5e4a3d6ef97bc947179f5d6d", "score": "0.6567071", "text": "public function valueForKey($key) {\n\t\tif ($this->hasValueForKey($key)) {\n\t\t\treturn $this->store[$key];\n\t\t} elseif ($key == 'primary') {\n\t\t\treturn $this->primary();\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "02b92ad0f35703d95c8b919cdaf6abe6", "score": "0.6538961", "text": "public function get($key)\n {\n $this->initialize();\n\n foreach ($this->collection as $field) {\n if ($field->getFieldname() == $key) {\n return $field->getValue();\n }\n }\n }", "title": "" }, { "docid": "0318777f4ceda830577d138a8fcd6c1f", "score": "0.6498267", "text": "public function get($key)\n {\n $address = $this->generateHash($key);\n\n if (! isset($this->table[$address]) || $this->table[$address]->count() === 0) {\n return null;\n }\n\n $current = $this->table[$address]->getHead();\n\n while ($current !== null) {\n $data = $current->getData();\n\n if ($data->getKey() === $key) {\n return $data->getValue();\n }\n\n $current = $current->getNext();\n }\n\n return null;\n }", "title": "" }, { "docid": "7c10d6f0d9b0c8a6dc5ce0b6e7d18e0a", "score": "0.64711016", "text": "public function first()\n {\n $this->limit(1);\n $results = call_user_func_array(array($this, 'get'), func_get_args());\n if($results)\n return array_shift($results);\n return false;\n }", "title": "" }, { "docid": "4205c8d4049a797da5f0aac472d73b88", "score": "0.64699656", "text": "public function __get($key)\n {\n return $this->getResult()->$key;\n }", "title": "" }, { "docid": "a8ed4ddd811e18bf5697a8dd06d8f53d", "score": "0.6455275", "text": "public function findObjectByKey($key = null)\n {\n $qb = $this->createQueryBuilder('m')\n ->select('m')\n ->where('m.key = :key')\n ->setParameter('key', $key)\n ->setMaxResults(1);\n\n return $qb->getQuery()->getOneOrNullResult();\n }", "title": "" }, { "docid": "9455ab3fb09c5706b1612144bcbe201d", "score": "0.6409967", "text": "public function get($key) {\r\n\t\t\tif ($this->contains($key))\r\n\t\t\t\treturn $this->items[$key];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}", "title": "" }, { "docid": "9945d4e1dd18a00a53fd5a772b28f878", "score": "0.64087623", "text": "public function offsetGet( $key )\n {\n $polynom = $this->getPolynom();\n return $polynom->evaluate( $key );\n }", "title": "" }, { "docid": "dd48a7ded7e59fdacb38f7f4dafcec5d", "score": "0.6396339", "text": "private function _get_key($key)\n {\n return $this->rest->db\n ->where(config_item('rest_key_column'), $key)\n ->get(config_item('rest_keys_table'))\n ->row();\n }", "title": "" }, { "docid": "e4956751b0a4f9bca972d4d93bcbe190", "score": "0.63903314", "text": "public function get($key)\n\t{\n\t\t$query = new \\Peyote\\Select($this->table);\n\t\t$query->where($this->primary_key, '=', $key);\n\n\t\t$result = $this->adapter->select($query->compile(), $query->getParams());\n\n\t\tif (empty($result))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t$collection = $this->formCollection($result);\n\t\treturn $collection->current();\n\t}", "title": "" }, { "docid": "1f94d68f161d82afced0ebe58fab1e7f", "score": "0.63863087", "text": "public function getValue($key)\r\n {\r\n $ret = null;\r\n \r\n if(!$this->dbh)\r\n $this->connect();\r\n \r\n $query = \"select key_val from system_registry where key_name='$key' AND user_id is NULL\"; \r\n $result = $this->Query($query);\r\n if ($this->GetNumberRows($result))\r\n $ret = $this->GetRowValue($result, 0, \"key_val\");\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "b5fccde3d19e355a0a85e90d5ec1b06d", "score": "0.6355237", "text": "public function first(){\n\t\treturn $this->results()[0];\n\t}", "title": "" }, { "docid": "04a921ae58286dbf0fe7e2b52adeb975", "score": "0.63508", "text": "public function get($key)\n {\n $items = $this->toArray();\n\t return isset($items[$key]) ? $items[$key] : null;\n }", "title": "" }, { "docid": "31aab92f42c5538f4b405e728b82aa25", "score": "0.634176", "text": "public function findFirstBy($key, $value, $operator = '=');", "title": "" }, { "docid": "969d5378beaa6534731172ba8100ae4e", "score": "0.6313425", "text": "public static function forKey($key) {\n $a = self::getArray();\n return (isset($a[$key]) ? $a[$key] : null);\n }", "title": "" }, { "docid": "f0937f2397aabf4ff1e0ec1bb9742856", "score": "0.6313287", "text": "protected function getFromLookup(/*# string */ $key)\n {\n // found already ? or try find\n if ($key === $this->cache_key || $this->hasInLookup($key)) {\n return $this->getFromRegistry($this->cache_reg, $key);\n }\n // not found\n return null;\n }", "title": "" }, { "docid": "6eee6c6a39a619582fd854219058fdae", "score": "0.6312395", "text": "public function first(string $key,$data) ;", "title": "" }, { "docid": "6f92a77be2c9670509bd16d319c4c907", "score": "0.629003", "text": "public function get_by_key($key)\r\n {\r\n if (count($this->list) == 0) return null;\r\n\r\n foreach ($this->list as $list)\r\n {\r\n if (isset($list[$key])) return $list[$key]->get_value();\r\n\r\n foreach ($list as $node)\r\n {\r\n if ( ($ret = $node->get_by_key($key)) !== null) return $ret;\r\n }\r\n }\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "c52443530b7894358b7f03454eb54f49", "score": "0.62798715", "text": "public static function get($key)\n {\n return self::get_all()[$key];\n }", "title": "" }, { "docid": "8cb5c771f975e5c8131bb6f38476d320", "score": "0.6279757", "text": "protected function getValue($key)\n {\n return $this->_cache->get($key);\n }", "title": "" }, { "docid": "657defd364eaba0ffce39d0b3e55357b", "score": "0.62408715", "text": "public function offsetGet($key)\n {\n return $this->lookup($key);\n }", "title": "" }, { "docid": "3cef0723f52e12d9c169e0dc34012a1e", "score": "0.62154657", "text": "public function first()\n\t{\n\t\tif (!$this->count()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->collection[$this->keys()->all()[0]];\n\t}", "title": "" }, { "docid": "1a28f4eb5de9ffaf87ff2d2f82d1cc37", "score": "0.62113434", "text": "public function first() {\n return $this->_results[0];\n }", "title": "" }, { "docid": "743dec700f5bd39a34f977d3f8a4193b", "score": "0.62015426", "text": "public function get(string $key, mixed $default = false): mixed {\n\n $stmt = $this->connection->query(\"SELECT * FROM {$this->table} WHERE `key`='{$key}' LIMIT 1;\");\n\n if (!$stmt) {\n return $default;\n }\n\n $res = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n $stmt->closeCursor();\n\n return isset($res['key']) ? json_decode($res['keyval'], true) : $default;\n }", "title": "" }, { "docid": "4bcb61a42d3a73f240e2f731306c0bf6", "score": "0.61836857", "text": "function getValue($key) {\n global $params;\n\tif (isset($params[$key])) return $params[$key];\n\telse return \"\";\n }", "title": "" }, { "docid": "4bcb61a42d3a73f240e2f731306c0bf6", "score": "0.61836857", "text": "function getValue($key) {\n global $params;\n\tif (isset($params[$key])) return $params[$key];\n\telse return \"\";\n }", "title": "" }, { "docid": "0a1884ba1e033ece4d20b8d75e64c1c8", "score": "0.6176022", "text": "public function getGetItem($key)\n {\n return isset($this->get[$key]) ? $this->get[$key] : null;\n }", "title": "" }, { "docid": "62a12ae7a55eccc649c6e6459bb6048c", "score": "0.6168592", "text": "public function getFirstResult()\n {\n return $this->firstResult;\n }", "title": "" }, { "docid": "62a12ae7a55eccc649c6e6459bb6048c", "score": "0.6168592", "text": "public function getFirstResult()\n {\n return $this->firstResult;\n }", "title": "" }, { "docid": "c0c4a685d312ebfccd4d84021f73cc2a", "score": "0.61683446", "text": "public function getFirstEntry($searchResult);", "title": "" }, { "docid": "63b0fc82c7b8b14ef9f94c0f4eaaff5c", "score": "0.61678106", "text": "private function _get_key($key)\n\t{\n return $this->CI->db\n ->where(config_item('rest_key_column'), $key)\n ->get(config_item('rest_keys_table'))\n ->row();\n\t}", "title": "" }, { "docid": "4216f336bbf9ff21c65b7bf2c05d492e", "score": "0.61621624", "text": "public function first(){\r\n return reset($this->_results);\r\n }", "title": "" }, { "docid": "99f6d59ef4238ef9c74a9b8ff4a01f2d", "score": "0.6161683", "text": "protected function findOneByKeyFromCache($key, $value) {\n\t\tif ($key === '') {\n\t\t\tthrow new InvalidArgumentException('$key must not be empty.');\n\t\t}\n\t\tif (!isset($this->cacheByKey[$key])) {\n\t\t\tthrow new InvalidArgumentException('\"' . $key . '\" is not a valid key for this mapper.', 1331319882);\n\t\t}\n\t\tif ($value === '') {\n\t\t\tthrow new InvalidArgumentException('$value must not be empty.', 1331319892);\n\t\t}\n\n\t\tif (!isset($this->cacheByKey[$key][$value])) {\n\t\t\tthrow new tx_oelib_Exception_NotFound();\n\t\t}\n\n\t\treturn $this->cacheByKey[$key][$value];\n\t}", "title": "" }, { "docid": "5992b41be2a9ebc4f3c5d3c465a55d99", "score": "0.6146152", "text": "public function findByKey($key);", "title": "" }, { "docid": "5992b41be2a9ebc4f3c5d3c465a55d99", "score": "0.6146152", "text": "public function findByKey($key);", "title": "" }, { "docid": "5992b41be2a9ebc4f3c5d3c465a55d99", "score": "0.6146152", "text": "public function findByKey($key);", "title": "" }, { "docid": "77d5381384313e9613d18adc4fd81f67", "score": "0.6132415", "text": "public function get($key)\n { \n if (isset($this->data[$key])) \n return $this->data[$key]; \n }", "title": "" }, { "docid": "f5ed19aa10a5e81e113c8a351203af15", "score": "0.61292315", "text": "public static function value(string $key)\n {\n return static::data()[$key] ?? null;\n }", "title": "" }, { "docid": "60bcd37f466dbc31e5f8a5e2ccf455a9", "score": "0.6128475", "text": "public function getValue($key)\n {\n $row = $this->get($key);\n if ($row === false) {\n return false;\n }\n return $row['paramValue'];\n }", "title": "" }, { "docid": "cc9f664d1b31dc7d35b73407fa21e35d", "score": "0.6124598", "text": "public function get($key){\n return $this->items[$key];\n }", "title": "" }, { "docid": "d91ea36e7b5ba639e7690e8dd6620cab", "score": "0.6124425", "text": "public function fetch($key) {\n\t\treturn $this->cacheInstance->get ( $this->getRealKey ( $key ) );\n\t}", "title": "" }, { "docid": "b674388c2bf6407decf2cbb425d48b97", "score": "0.61030334", "text": "public function get(string $key): mixed;", "title": "" }, { "docid": "1efcf0a67e3436c1311a633aa243af3f", "score": "0.6101074", "text": "public static function get($key)\n {\n return self::driver()->get($key);\n }", "title": "" }, { "docid": "898723edcb4ec969a00a18824486241c", "score": "0.60983884", "text": "private function offsetGet($key, $result)\n {\n return (is_array($result) && array_key_exists($key, $result)) ? $result[$key] : null;\n }", "title": "" }, { "docid": "695a0a3deeda98dbe0654abb25da311f", "score": "0.60911196", "text": "public function fetch($key)\n {\n if (null === $key) {\n return null;\n }\n\n $select = $this->getBaseSelect();\n $select->where([$this->getPrimaryKey() => $key]);\n return $this->getResultSet($select, false);\n }", "title": "" }, { "docid": "dc5080af7960b66c87bcd8b90567b5a7", "score": "0.60841584", "text": "public function first()\n {\n return $this->redis->lindex(self::REDIS_KEY, 0);\n }", "title": "" }, { "docid": "2af6e97f6649483586bd5b2c2544e937", "score": "0.60778105", "text": "public function __get($key)\n {\n foreach ($this->items as $item) {\n if ($item->meta_key == $key) {\n return $item->meta_value;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "9bfb0acdc9b8967d0052980d773abf2b", "score": "0.60759175", "text": "public function getValWithKey($key) {\n\t\t\t$this->key = $key;\n\t\t\tif ($this->getSimple($key)) return $this->value;\n\t\t\telse return null;\n\t\t}", "title": "" }, { "docid": "e4d8a4e6b4768bc2e91237caa1f1f578", "score": "0.6073736", "text": "public function get($key) {\n $key = strtolower($key);\n return isset($this->data[$key]) ? $this->data[$key] : NULL;\n }", "title": "" }, { "docid": "2b4181f9326261555a456e624b65a861", "score": "0.607287", "text": "public function getValue ()\n\t{\n\t\t$this->query .= \" LIMIT 1\";\n\t\t$this->run();\n\n\t\tif (!$this->data) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$value = $this->data->fetch_row()[0];\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "3ed202099c51e6b9874fcb3f4ea49118", "score": "0.6071554", "text": "#[\\ReturnTypeWillChange]\n\tpublic function offsetGet($key)\n\t{\n\t\treturn $this->primary()->offsetGet($key);\n\t}", "title": "" }, { "docid": "64ddd0867f313fe7cb66edceeed5ce5e", "score": "0.6068096", "text": "public function get_first_result() {\n return (!empty($this->_result)) ? $this->_result[0] : (object) ['error' => 'No results found!'];\n }", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6066155", "text": "public function get($key);", "title": "" } ]
9ec123255423e7ccb00a5303560c5618
Tags to be used, if required
[ { "docid": "fd4ba409bd7760e21d6eb7646f4dddb7", "score": "0.68043905", "text": "protected function getTags()\n {\n return [];\n }", "title": "" } ]
[ { "docid": "42d35539685a6864a92f0de933d0f3a7", "score": "0.7919781", "text": "private function _tags()\n\t{\n\t\tif (isset($this->ftags))\n\t\t{\n\t\t\t$tags = Tags::factory()\n\t\t\t\t->tagging($this->ftags, $this, $this->author, FALSE);\n\t\t}\n\t}", "title": "" }, { "docid": "a5e1187cc889a17a8c7861a07c3ab270", "score": "0.7514307", "text": "public function tags()\n {\n }", "title": "" }, { "docid": "f6e051832d33b84a73b54fbd180030c0", "score": "0.7388776", "text": "public function getTags() {}", "title": "" }, { "docid": "2ae70149e303193cd9ca796ba50086de", "score": "0.72242385", "text": "protected function getTags() {\n\t\treturn array(\n\t\t\t\"Title\",\n\t\t\t\"Body\",\n\t\t\t\"ThemeVersion\"\n\t\t);\n\t}", "title": "" }, { "docid": "37feeb51d8344b17813af85ff63f42c3", "score": "0.71829695", "text": "public function tag();", "title": "" }, { "docid": "dd10311153ad9e0c8763be8bf6a589fa", "score": "0.70654637", "text": "public function getTags() {\n\n }", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.70604736", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.70604736", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.70604736", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.70604736", "text": "public function getTags();", "title": "" }, { "docid": "41d67d83eddafaa4d80cdd9f190a75bf", "score": "0.6944934", "text": "public static function image_tags()\n {\n }", "title": "" }, { "docid": "2bb4027063e886747043465c317ff67a", "score": "0.6938116", "text": "protected function _meta_tags( ) {\n\t\t$this->_meta( 'author', $this->config->item( 'app_author' ) );\n\t\t$this->_meta( 'description', $this->config->item( 'app_description' ) );\n\t\t$this->_meta( 'robots', 'index,follow' );\n\t\t$this->_meta( 'viewport', 'initial-scale=1.0,width=device-width' );\n\t}", "title": "" }, { "docid": "f431c83cd11e57bffca97dd764a81796", "score": "0.6913246", "text": "public function generateTags() : array\n {\n return ['product'];\n }", "title": "" }, { "docid": "45a77416a63632d1f83b65c166b975e7", "score": "0.69030654", "text": "abstract function tagsToProcess();", "title": "" }, { "docid": "3e2c517cbce4e13f833d582428b7d488", "score": "0.6852789", "text": "public static function getTagList()\r\n\t\t{\r\n\t\t\treturn self::$tagUse;\r\n\t\t}", "title": "" }, { "docid": "5d523b3f16f5dad2866609e0cafa44fa", "score": "0.681345", "text": "public function tags(array $tags = []);", "title": "" }, { "docid": "acd9af2ad3a3afb3ef67dc52e5def992", "score": "0.67925376", "text": "public function Get_Tags() {\r\n $form_instance = $this->form_instance;\r\n // Retrieve the global vcff forms class\r\n $vcff_curly = vcff_get_library('vcff_curly');\r\n // Retrieve the curly tags list\r\n $context = $vcff_curly->context;\r\n // The hints list\r\n $tags = array();\r\n // Loop through each context item\r\n foreach ($context as $code => $classname) {\r\n // If no classname then continue\r\n if (!class_exists($classname)) { continue; }\r\n // Create a new instance\r\n $instance = new $classname();\r\n // Retrieve the tag data\r\n $tag_data = $instance->Get_Tag();\r\n // If this tag has additional conditions\r\n if (isset($tag_data['available_if'])) {\r\n // Store the available if rules\r\n $check_result = $this->_Check_Requirements($tag_data['available_if']);\r\n // If the check result fails\r\n if (!$check_result) { continue; }\r\n }\r\n // Populate the form instance\r\n $instance->form_instance = $form_instance; \r\n // Retrieve the hint list\r\n $context_tag = $instance->Get_Tag();\r\n // If no context tag\r\n if (!$context_tag || !is_array($context_tag)) { continue; }\r\n // Merge with the existing hints\r\n $tags[$instance->tag] = $context_tag;\r\n }\r\n // Return the list of hints\r\n return $tags;\r\n }", "title": "" }, { "docid": "0d6af05cd219e1013e87cce3e5d85cdb", "score": "0.679001", "text": "function getTags() {\n return $this->_getDescription('Tags');\n }", "title": "" }, { "docid": "4ac8e4a2562da308dc3eb67fbc35c421", "score": "0.67789763", "text": "public function getTagList();", "title": "" }, { "docid": "08075a6989150ca3fbf213455249af93", "score": "0.6775251", "text": "public function tagged(){\n }", "title": "" }, { "docid": "f4c4ae6949ebe2704e33c8b324fd242e", "score": "0.6761365", "text": "public function testAddTags()\n {\n }", "title": "" }, { "docid": "4918eca767f99a6f8a9113f6d6d5642b", "score": "0.6741421", "text": "public function toTags();", "title": "" }, { "docid": "4ab94992170b3dc5a0e8d41eab4ae00c", "score": "0.66694844", "text": "protected function processTags() {\n\t\t$childTags = $this->getTagStorage();\n\t\t$argTags = $this->arguments['tags'];\n\t\t$tags = array();\n\t\tswitch ($this->arguments['merge']) {\n\t\t\tcase 'argument': return $argTags;\n\t\t\tcase 'content': return $childTags;\n\t\t\tcase 'both': default:\n\t\t}\n\t\tif ($childTags) {\n\t\t\t$tags = $this->mergeTags($tags, $childTags);\n\t\t}\n\t\tif ($argTags) {\n\t\t\t$tags = $this->mergeTags($tags, $argTags);\n\t\t}\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "b3444f8df39a08a79e8dd0068cff664e", "score": "0.6666608", "text": "function basepress_post_tags() {\n\n\t\t$metadata = array_flip( apply_filters('basepress_enable_post_metadata', array('tag') ) );\n\n\t\t// Get tags.\n\t\t$tag_list = get_the_tag_list( '', __(', ', 'basepress') );\n\n\t\t\t\n\t\t\t// Display tags.\n\t\t\tif ( $metadata ) :\n\n\t\t\t\tif ( isset( $metadata['tag'] ) ) :\n\n\t\t\t\t?>\n\t\t\t\t\t<?php if ( $tag_list ) : ?>\n\n\t\t\t\t\t\t\t<div class=\"entry-footer\">\n\n\t\t\t\t\t\t\t\t<div class=\"entry-tags\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<?php echo __('<i class=\"fa fa-tags\" aria-hidden=\"true\"></i> ', 'basepress') . wp_kses_post($tag_list); ?>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div><!-- .entry-tags -->\n\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<?php\n\t\t\tendif;\n\n\t\telse :\n\t\t?>\n\t\t\t<?php if ( $tag_list ) : ?>\n\n\t\t\t\t<div class=\"entry-footer\">\n\n\t\t\t\t\t<div class=\"entry-tags\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php echo __('<i class=\"fa fa-tags\" aria-hidden=\"true\"></i>', 'basepress') . wp_kses_post($tag_list); ?>\n\t\t\t\t\t\t\n\t\t\t\t\t</div><!-- .entry-tags -->\n\n\t\t\t\t</div>\n\n\t\t\t<?php endif; ?>\n\n\t\t<?php\n\t\tendif;\n\t}", "title": "" }, { "docid": "a88abe9988426a8476187340546b84ed", "score": "0.6657458", "text": "function crpTag_tagsblock_info()\n{\n\treturn array (\n\t\t'text_type' => 'crpTags',\n\t\t'module' => 'crpTag',\n\t\t'text_type_long' => 'Collection of site tags',\n\t\t'allow_multiple' => true,\n\t\t'form_content' => false,\n\t\t'form_refresh' => false,\n\t\t'show_preview' => true\n\t);\n}", "title": "" }, { "docid": "dfb702371d4b76c9ce30989713b892d1", "score": "0.66558135", "text": "function admin_add_tag() {\n\t\t//\n\t}", "title": "" }, { "docid": "a096d739c836074467f6359712098fc8", "score": "0.6654706", "text": "private function _loadTags()\n {\n $tags = array();\n if (isset($this->request->data['Tag']) && !empty($this->request->data['Tag'])) {\n foreach ($this->request->data['Tag'] as $tag) {\n $tags[] = $tag['name'];\n }\n $this->request->data['Post']['tags'] = implode(', ', $tags);\n }\n }", "title": "" }, { "docid": "b91cb01218896f8d0872e7eec95e6922", "score": "0.6653527", "text": "function outputTags()\n {\n return array();\n }", "title": "" }, { "docid": "fc87e4c68f315b772ff335d368230cd7", "score": "0.6647107", "text": "public function onListDefinedTags( &$tags ) {\n\t\t$tags = array_merge( $tags, static::TAGS );\n\t}", "title": "" }, { "docid": "9677c40be90ce57ff225aceb2fc9e5c3", "score": "0.6614384", "text": "public function tags(): array\n {\n return ['mail', 'contact'];\n }", "title": "" }, { "docid": "5b0b0a340e3d2386773887c28d2f3f22", "score": "0.65816665", "text": "public function registerMarkupTags () \n {\n \n }", "title": "" }, { "docid": "a7791d5ca542775c8a9d03c4f2e643cb", "score": "0.65597636", "text": "public function getAllowedTags()\n {\n return ['h1', 'p', 'img'];\n }", "title": "" }, { "docid": "1813adffce2af25143ef345d6b1111f3", "score": "0.6556609", "text": "public function allTagsDescWithFilters();", "title": "" }, { "docid": "3eb9883cf57cf37514a2054b01ac1a45", "score": "0.65538853", "text": "public function main() {\n echo 'tags';\n print_r($this->tags);\n }", "title": "" }, { "docid": "bd4ac0872d16382f6bb6a637068363b9", "score": "0.6527593", "text": "function mtd_custom_tag( $tags ) {\n\t$tags[] = 'donation';\n\n\treturn $tags;\n}", "title": "" }, { "docid": "28104c70ec707f83bd74e09f18e7cbf9", "score": "0.6527561", "text": "function filter_tags() {\r\r\n\t\t$filter_tags = array(\r\r\n\t\t\r\r\n\t\t\t'Layout' => array (\r\r\n\t\t\t\t'fixed-layout' \t\t\t=> __( 'Fixed Layout', $this->textdomain ),\r\r\n\t\t\t\t'fluid-layout' \t\t\t=> __( 'Fluid Layout', $this->textdomain ),\r\r\n\t\t\t\t'responsive-layout' \t=> __( 'Responsive Layout', $this->textdomain ),\r\r\n\t\t\t\t'one-column' \t\t\t=> __( 'One Column', $this->textdomain ),\r\r\n\t\t\t\t'one-two-columns'\t\t=> __( 'One or Two Column', $this->textdomain ),\r\r\n\t\t\t\t'one-two-three-columns'\t=> __( 'One, Two or Three Column', $this->textdomain ),\r\r\n\t\t\t),\r\r\n\t\t\t\r\r\n\t\t\t'Features' => array (\r\r\n\t\t\t\t'fieldsets'\t\t=> __( 'Fieldsets', $this->textdomain ),\r\r\n\t\t\t\t'background'\t=> __( 'Background', $this->textdomain ),\r\r\n\t\t\t\t'gradients' \t=> __( 'Gradients', $this->textdomain ),\r\r\n\t\t\t),\r\r\n\t\t\t\r\r\n\t\t\t'Subject' => array (\r\r\n\t\t\t\t'business'\t\t=> __( 'Business', $this->textdomain ),\r\r\n\t\t\t\t'event'\t\t\t=> __( 'Event', $this->textdomain ),\r\r\n\t\t\t\t'holiday' \t\t=> __( 'Holiday', $this->textdomain ),\r\r\n\t\t\t\t'individual' \t=> __( 'Individual', $this->textdomain ),\r\r\n\t\t\t\t'seasonal' \t\t=> __( 'Seasonal', $this->textdomain ),\r\r\n\t\t\t)\r\r\n\t\t);\r\r\n\t\t\r\r\n\t\treturn apply_filters( 'template_filter_tags', $filter_tags );\r\r\n\t}", "title": "" }, { "docid": "74dd8a78af8322ef6a1af17438481640", "score": "0.6521966", "text": "public function tag($tag);", "title": "" }, { "docid": "02cf31d19a73d4f2ca70e8d14134f6a5", "score": "0.651593", "text": "public function email_tags( $tags ) {\n\t\t$tags = array(\n\t\t\t'download' => array(\n\t\t\t\t'tag' => strtolower( edd_get_label_singular() ),\n\t\t\t\t'description' => __( 'Name of the download the review was posted on', 'edd-reviews' ),\n\t\t\t\t'function' => 'download_tag'\n\t\t\t),\n\t\t\t'author' => array(\n\t\t\t\t'tag' => 'author',\n\t\t\t\t'description' => __( 'The review author', 'edd-reviews' ),\n\t\t\t\t'function' => 'author_tag'\n\t\t\t),\n\t\t\t'email' => array(\n\t\t\t\t'tag' => 'email',\n\t\t\t\t'description' => __( \"The reviewer's email\", 'edd-reviews' ),\n\t\t\t\t'function' => 'email_tag'\n\t\t\t),\n\t\t\t'url' => array(\n\t\t\t\t'tag' => 'url',\n\t\t\t\t'description' => __( \"The reviewer's URL\", 'edd-reviews' ),\n\t\t\t\t'function' => 'url_tag'\n\t\t\t),\n\t\t\t'rating' => array(\n\t\t\t\t'tag' => 'rating',\n\t\t\t\t'description' => __( 'The rating given by the reviewer', 'edd-reviews' ),\n\t\t\t\t'function' => 'rating_tag'\n\t\t\t),\n\t\t\t'item_as_described' => array(\n\t\t\t\t'tag' => 'item_as_described',\n\t\t\t\t'description' => __( 'If the item was as described or not', 'edd-reviews' ),\n\t\t\t\t'function' => 'item_as_described_tag'\n\t\t\t),\n\t\t\t'feedback' => array(\n\t\t\t\t'tag' => 'feedback',\n\t\t\t\t'description' => __( 'The content of the feedback', 'edd-reviews' ),\n\t\t\t\t'function' => 'review_tag'\n\t\t\t)\n\t\t);\n\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.6515894", "text": "public function getTag();", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.6515894", "text": "public function getTag();", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.6515894", "text": "public function getTag();", "title": "" }, { "docid": "18d1fdc3cf425259b01351e6bb8ed4e8", "score": "0.6470148", "text": "public function getTags() : array;", "title": "" }, { "docid": "18d1fdc3cf425259b01351e6bb8ed4e8", "score": "0.6470148", "text": "public function getTags() : array;", "title": "" }, { "docid": "96580479c1ac46a52b0287a8ab7e2827", "score": "0.6460678", "text": "public function tags()\n\t{\n\t\t// Fetch installed modules and plugins if needed\n\t\tif (count($this->modules) == 0)\n\t\t{\n\t\t\t$this->fetch_addons();\n\t\t}\n\n\t\t// Parse the template.\n\n\t\t$this->log_item(\" - Beginning Tag Processing - \");\n\n\t\twhile (is_int(strpos($this->template, LD.'exp:')))\n\t\t{\n\t\t\t// Initialize values between loops\n\t\t\t$this->tag_data \t= array();\n\t\t\t$this->var_single\t= array();\n\t\t\t$this->var_cond\t\t= array();\n\t\t\t$this->var_pair\t\t= array();\n\t\t\t$this->loop_count \t= 0;\n\n\t\t\t$this->log_item(\"Detecting Tags in Template\");\n\n\t\t\t// Run the template parser\n\t\t\t$this->parse_tags();\n\n\t\t\t$this->log_item(\"Running Tags\");\n\n\t\t\t// Run the class/method handler\n\t\t\t$this->process_tags();\n\n\t\t\tif ($this->cease_processing === TRUE)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$this->log_item(\" - End Tag Processing - \");\n\t}", "title": "" }, { "docid": "e63f4215a942aa0ee81bcba69736ef6c", "score": "0.6447932", "text": "public function tags() {\n\t if(!array_key_exists(\"tags\", $this->data)) {\n \tassert('file_exists($this->postpath().\"/tags.txt\")');\n\t \n \t\t$tags = file($this->postpath().\"/tags.txt\");\n \t\tfor($i = 0; $i < count($tags); $i++) {\n \t\t\t$tags[$i] = trim($tags[$i]);\n\t\t\t\tif(strlen($tags[$i]) == 0) continue;\n \n \t\t\tassert('file_exists(BLOGROOT.\"images/tags/\".$tags[$i].\".png\")');\n \t\t\tif(strpos($tags[$i], DIRECTORY_SEPARATOR) !== false) trigger_error(\"bad dog, no biscuit\", E_USER_ERROR);\n \t\t}\n \t\t$this->data[\"tags\"] = $tags;\n\t }\n\n\t\treturn $this->data[\"tags\"];\n\t}", "title": "" }, { "docid": "f5868290b2f568cc51d3b31b9aedbc81", "score": "0.64337254", "text": "function get_tags(){\n\t\t\treturn $this->tags;\n\t\t}", "title": "" }, { "docid": "220f80f4e6634ec5d5f218d40234cbeb", "score": "0.6431495", "text": "function uni_cpo_get_allowed_tags()\n{\n return array(\n 'tooltip' => array(\n 'br' => array(),\n 'em' => array(),\n 'strong' => array(),\n 'small' => array(),\n 'span' => array(),\n 'ul' => array(),\n 'li' => array(),\n 'ol' => array(),\n 'p' => array(),\n 'img' => array(\n 'alt' => true,\n 'align' => false,\n 'border' => false,\n 'height' => true,\n 'hspace' => false,\n 'longdesc' => false,\n 'vspace' => false,\n 'src' => true,\n 'usemap' => false,\n 'width' => true,\n ),\n ),\n 'text' => array(\n 'address' => array(),\n 'a' => array(\n 'class' => true,\n 'id' => true,\n 'href' => true,\n 'rel' => true,\n 'rev' => true,\n 'name' => true,\n 'target' => true,\n 'title' => true,\n ),\n 'abbr' => array(),\n 'acronym' => array(),\n 'audio' => array(\n 'autoplay' => true,\n 'controls' => true,\n 'loop' => true,\n 'muted' => true,\n 'preload' => true,\n 'src' => true,\n ),\n 'b' => array(),\n 'bdo' => array(\n 'dir' => true,\n ),\n 'big' => array(),\n 'blockquote' => array(\n 'cite' => true,\n 'lang' => true,\n 'xml:lang' => true,\n ),\n 'br' => array(),\n 'button' => array(\n 'disabled' => true,\n 'name' => true,\n 'type' => true,\n 'value' => true,\n ),\n 'caption' => array(\n 'align' => true,\n ),\n 'cite' => array(\n 'dir' => true,\n 'lang' => true,\n ),\n 'code' => array(),\n 'col' => array(\n 'align' => true,\n 'char' => true,\n 'charoff' => true,\n 'span' => true,\n 'dir' => true,\n 'valign' => true,\n 'width' => true,\n ),\n 'colgroup' => array(\n 'align' => true,\n 'char' => true,\n 'charoff' => true,\n 'span' => true,\n 'valign' => true,\n 'width' => true,\n ),\n 'del' => array(\n 'datetime' => true,\n ),\n 'dd' => array(),\n 'dfn' => array(),\n 'details' => array(\n 'align' => true,\n 'dir' => true,\n 'lang' => true,\n 'open' => true,\n 'xml:lang' => true,\n ),\n 'dl' => array(),\n 'dt' => array(),\n 'em' => array(),\n 'figure' => array(\n 'align' => true,\n 'dir' => true,\n 'lang' => true,\n 'xml:lang' => true,\n ),\n 'figcaption' => array(\n 'align' => true,\n 'dir' => true,\n 'lang' => true,\n 'xml:lang' => true,\n ),\n 'font' => array(\n 'color' => true,\n 'face' => true,\n 'size' => true,\n ),\n 'h1' => array(\n 'align' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'h2' => array(\n 'align' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'h3' => array(\n 'align' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'h4' => array(\n 'align' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'h5' => array(\n 'align' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'h6' => array(\n 'align' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'hr' => array(\n 'align' => true,\n 'noshade' => true,\n 'size' => true,\n 'width' => true,\n ),\n 'i' => array(),\n 'img' => array(\n 'alt' => true,\n 'align' => true,\n 'border' => true,\n 'height' => true,\n 'hspace' => true,\n 'longdesc' => true,\n 'vspace' => true,\n 'src' => true,\n 'usemap' => true,\n 'width' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'ins' => array(\n 'datetime' => true,\n 'cite' => true,\n ),\n 'input' => array(\n 'class' => true,\n 'id' => true,\n 'name' => true,\n 'value' => true,\n 'data-parsley-trigger' => true,\n 'data-parsley-type' => true,\n 'data-parsley-min' => true,\n 'step' => true,\n 'data-parsley-id' => true,\n 'type' => true,\n ),\n 'kbd' => array(),\n 'li' => array(\n 'align' => true,\n 'value' => true,\n ),\n 'mark' => array(),\n 'q' => array(\n 'cite' => true,\n ),\n 'p' => array(\n 'class' => array(),\n ),\n 's' => array(),\n 'samp' => array(),\n 'span' => array(\n 'dir' => true,\n 'align' => true,\n 'lang' => true,\n 'xml:lang' => true,\n ),\n 'small' => array(),\n 'strike' => array(),\n 'strong' => array(),\n 'sub' => array(),\n 'summary' => array(\n 'align' => true,\n 'dir' => true,\n 'lang' => true,\n 'xml:lang' => true,\n ),\n 'sup' => array(),\n 'table' => array(\n 'align' => true,\n 'bgcolor' => true,\n 'border' => true,\n 'cellpadding' => true,\n 'cellspacing' => true,\n 'dir' => true,\n 'rules' => true,\n 'summary' => true,\n 'width' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'tbody' => array(\n 'align' => true,\n 'char' => true,\n 'charoff' => true,\n 'valign' => true,\n ),\n 'td' => array(\n 'abbr' => true,\n 'align' => true,\n 'axis' => true,\n 'bgcolor' => true,\n 'char' => true,\n 'charoff' => true,\n 'colspan' => true,\n 'dir' => true,\n 'headers' => true,\n 'height' => true,\n 'nowrap' => true,\n 'rowspan' => true,\n 'scope' => true,\n 'valign' => true,\n 'width' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'tfoot' => array(\n 'align' => true,\n 'char' => true,\n 'charoff' => true,\n 'valign' => true,\n ),\n 'th' => array(\n 'abbr' => true,\n 'align' => true,\n 'axis' => true,\n 'bgcolor' => true,\n 'char' => true,\n 'charoff' => true,\n 'colspan' => true,\n 'headers' => true,\n 'height' => true,\n 'nowrap' => true,\n 'rowspan' => true,\n 'scope' => true,\n 'valign' => true,\n 'width' => true,\n 'class' => true,\n 'id' => true,\n ),\n 'thead' => array(\n 'align' => true,\n 'char' => true,\n 'charoff' => true,\n 'valign' => true,\n ),\n 'title' => array(),\n 'tr' => array(\n 'align' => true,\n 'bgcolor' => true,\n 'char' => true,\n 'charoff' => true,\n 'valign' => true,\n ),\n 'track' => array(\n 'default' => true,\n 'kind' => true,\n 'label' => true,\n 'src' => true,\n 'srclang' => true,\n ),\n 'tt' => array(),\n 'u' => array(),\n 'ul' => array(\n 'type' => true,\n ),\n 'ol' => array(\n 'start' => true,\n 'type' => true,\n 'reversed' => true,\n ),\n 'var' => array(),\n 'video' => array(\n 'autoplay' => true,\n 'controls' => true,\n 'height' => true,\n 'loop' => true,\n 'muted' => true,\n 'poster' => true,\n 'preload' => true,\n 'src' => true,\n 'width' => true,\n ),\n ),\n );\n}", "title": "" }, { "docid": "c4488b2124b9b61fefb3b63bba6869a1", "score": "0.642772", "text": "public function getTags(): array;", "title": "" }, { "docid": "c1db091ec9724f8dbb88d3313d6b3d19", "score": "0.6421147", "text": "public function setTag ();", "title": "" }, { "docid": "7ecd07928df05a041646549cc5ef541f", "score": "0.6419085", "text": "protected function getParsedTags()\n {\n return array('a', 'base', 'title', 'form', 'input', 'button', 'textarea', 'select',\n 'option', 'frameset', 'frame', 'label');\n }", "title": "" }, { "docid": "73ef6b1e89c3b7e9d2a1e7a0be8436f9", "score": "0.6416466", "text": "public function testAddTagsMultiple()\n {\n }", "title": "" }, { "docid": "2cee7c4d5cd9eefdf15823089f941992", "score": "0.6413985", "text": "public function getTags() {\r\n\treturn $this->tags;\r\n }", "title": "" }, { "docid": "d9de92009f7ac3766b0248c9a746eeb4", "score": "0.6392698", "text": "public function setTags($tags) {\r\n\t$this->tags = $tags;\r\n }", "title": "" }, { "docid": "c6faf81027d9fce246fcc3cda1e65fe0", "score": "0.63889956", "text": "public function getSupportedTags()\n {\n return array('a');\n }", "title": "" }, { "docid": "047d606ec367f815aa33323a94930baf", "score": "0.63819855", "text": "function bunchy_the_tags() {\n\tthe_tags();\n}", "title": "" }, { "docid": "d68f16a2d0b44b783aeacbbc92597db6", "score": "0.6380997", "text": "public function removeUnusedTags(): void;", "title": "" }, { "docid": "18f9c8b9140ece4d957b88fc605c2c1f", "score": "0.6366923", "text": "public function providerHasTag()\n {\n return array(\n \tarray('param' , true),\n array('return', true),\n array('other' , false),\n );\n }", "title": "" }, { "docid": "236fb6502a74d80d506f39e7efe2a5c0", "score": "0.6339831", "text": "public function tags() {\n return ['Eve', 'ItemPricesUpdate'];\n }", "title": "" }, { "docid": "d6747df5c8eae74de2baf498160d3687", "score": "0.6339541", "text": "public function validTagProvider(): array\n {\n return [\n ['Example']\n ];\n }", "title": "" }, { "docid": "6aeea526b102204bf7d0f8d9bb5aa353", "score": "0.6339464", "text": "protected function supportsTags() {\n if (($this->defaultCache == 'file') || ($this->defaultCache == 'database')) return false;\n return true;\n }", "title": "" }, { "docid": "a6716a5f2ca8da1cbb64a65cee39b883", "score": "0.63365144", "text": "function getTags() {\n // Disallowed characters in tag titles: \"<>?&/\\^\n return json_decode($this->request('https://www.google.com/reader/api/0/tag/list?output=json'));\n }", "title": "" }, { "docid": "3586f28e988029b29f40e1307fd5c961", "score": "0.6336415", "text": "public function getTaggable();", "title": "" }, { "docid": "1fcf3d960db5619bb01a90dc09c6ac32", "score": "0.6333883", "text": "function maker_portfolio_toolkit_tag() {\n\t$tags_list = get_the_term_list( get_the_ID(), 'portfolio-tag', '', ', ', '' );\n\tif ( $tags_list ) {\n\t\tprintf( '<div class=\"project-tags\">%s</div>', $tags_list ); // WPCS: XSS OK.\n\t}\n}", "title": "" }, { "docid": "eb76afde9c3c0933421bdbe39946d47c", "score": "0.6324222", "text": "public function templateTags() : array\n {\n return [\n 'the_pagination' => [$this, 'thePagination'],\n 'get_paginiation' => [$this, 'getPaginiation']\n ];\n }", "title": "" }, { "docid": "20edade789c91d8162af8e8b517b8b1b", "score": "0.63178533", "text": "function create_tag_terms() {\n $tag_term = create_register('socialdb_tag', 'socialdb_tag_type');\n}", "title": "" }, { "docid": "4a44939e4537efd7191fc61d81d99e5f", "score": "0.6310573", "text": "protected function actionTagList() {\n $strReturn = \"\";\n $strSystemid = $this->getSystemid();\n $strAttribute = $this->getParam(\"attribute\");\n $bitDelete = $this->getParam(\"delete\") != \"false\";\n\n $arrTags = class_module_tags_tag::getTagsForSystemid($strSystemid, $strAttribute);\n\n $strReturn .=\" <tags>\";\n foreach($arrTags as $objOneTag) {\n\n $strReturn .= $this->objToolkit->getTagEntry($objOneTag->getStrName(), $objOneTag->getSystemid(), $strSystemid, $strAttribute, $bitDelete);\n }\n\n $strReturn .= \"</tags>\";\n\n return $strReturn;\n }", "title": "" }, { "docid": "1c9cb5f2a18059c267244806267e6d23", "score": "0.6300018", "text": "public function setTags($tags)\r\n\t{\r\n\t\t$this->tags = $tags;\r\n\t}", "title": "" }, { "docid": "a5834320c36e37387ab579e2eafc182e", "score": "0.62895954", "text": "private function getTags()\n\t{\n\t\t$db = Database::instance();\n $result = $db->query(Database::SELECT, 'SELECT tagDesc FROM tags');\n\t\tforeach ($result as $row)\n\t\t{\n\t\t\techo $row['tagDesc'].'<br>';\n\t\t}\n\t}", "title": "" }, { "docid": "cba403bfc2ed9364c049cfb00a355a31", "score": "0.62775457", "text": "public function getTags() {\n\t\treturn $this->tag;\n\t}", "title": "" }, { "docid": "33ea80dd6d40ae50ba58310e3f68a413", "score": "0.6275332", "text": "function pinba_tags_get() {\n return pinba::$requestTags;\n}", "title": "" }, { "docid": "c65561d168f488f2052027c2b7b64949", "score": "0.6271264", "text": "public function getTag(): string;", "title": "" }, { "docid": "ed4a85bf5bebc7969178c28f8b887c1a", "score": "0.6268044", "text": "public function getTagNames(): array;", "title": "" }, { "docid": "81fdaf4c50fac621018e49b69d733f19", "score": "0.6264319", "text": "private function setTags() {\n $this->Tags['Title'] = $this->Data[0];\n $this->Tags['Content'] = Check::Words(html_entity_decode($this->Data[1]), 25);\n $this->Tags['Link'] = $this->Data[2];\n $this->Tags['Image'] = $this->Data[3];\n\n $this->Tags = array_map('strip_tags', $this->Tags);\n $this->Tags = array_map('trim', $this->Tags);\n\n $this->Data = null;\n\n //NORMAL PAGE\n $this->seoTags = '<title>' . $this->Tags['Title'] . '</title> ' . \"\\n\";\n $this->seoTags .= '<meta name=\"description\" content=\"' . $this->Tags['Content'] . '\"/>' . \"\\n\";\n $this->seoTags .= '<meta name=\"robots\" content=\"index, follow\" />' . \"\\n\";\n $this->seoTags .= '<link rel=\"canonical\" href=\"' . $this->Tags['Link'] . '\">' . \"\\n\";\n $this->seoTags .= \"\\n\";\n\n //FACEBOOK\n $this->seoTags .= '<meta property=\"og:site_name\" content=\"' . SITENAME . '\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:locale\" content=\"pt_BR\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:locale:alternate\" content=\"en_US\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:title\" content=\"' . $this->Tags['Title'] . '\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:description\" content=\"' . $this->Tags['Content'] . '\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:image\" content=\"' . $this->Tags['Image'] . '\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:url\" content=\"' . $this->Tags['Link'] . '\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:type\" content=\"article\" />' . \"\\n\";\n $this->seoTags .= '<meta property=\"og:site_name\" content=\"' . SITENAME . '\" />' . \"\\n\";\n $this->seoTags .= \"\\n\";\n\n //ITEM GROUP (TWITTER)\n $this->seoTags .= '<meta itemprop=\"name\" content=\"' . $this->Tags['Title'] . '\">' . \"\\n\";\n $this->seoTags .= '<meta itemprop=\"description\" content=\"' . $this->Tags['Content'] . '\">' . \"\\n\";\n $this->seoTags .= '<meta itemprop=\"url\" content=\"' . $this->Tags['Link'] . '\">' . \"\\n\";\n\n $this->Tags = null;\n }", "title": "" }, { "docid": "676313df501d8cdacf93c2c4bae5af11", "score": "0.6254553", "text": "public function testTagList()\n {\n }", "title": "" }, { "docid": "4e280d20b3ddea7681c0690ac2ab4a5a", "score": "0.62514836", "text": "function test10_tags() {\r\n $result = $this->api->tags();\r\n $tags = $result[\"tags\"];\r\n $this->assertContains(API_TEST_TAG, $tags);\r\n }", "title": "" }, { "docid": "e10d9d198820d53082917c0c507f2534", "score": "0.6251371", "text": "public function tag(string $tag);", "title": "" }, { "docid": "3585008eba6517cabb4036ab3c7590e5", "score": "0.6244053", "text": "abstract protected function _collectTags($object);", "title": "" }, { "docid": "6792ccdbae49dcf1f236de45c435823e", "score": "0.624039", "text": "function basestation_do_post_tags() {\n $post_tags = get_the_tags();\n if ( $post_tags ) {\n echo '<span class=\"tags-links\"><i class=\"meta-icon icon-tag\" title=\"Tags\"></i>' . \"\\n\";\n $num_tags = count( $post_tags );\n $tag_count = 1;\n $nofollow = ' nofollow'; // tell search engines to not index tag url\n foreach( $post_tags as $tag ) {\n $html_before = '<a href=\"' . get_tag_link($tag->term_id) . '\" rel=\"tag'.$nofollow.'\" class=\"tag-text\">';\n $html_after = '</a>';\n if ( $tag_count < $num_tags )\n $sep = \", \\n\";\n elseif ( $tag_count == $num_tags )\n $sep = \"\\n\";\n echo $html_before . $tag->name . $html_after . $sep;\n $tag_count++;\n }\n echo '</span>' . \"\\n\";\n }\n}", "title": "" }, { "docid": "2bbe5def89e86fda07feefc5a63281ef", "score": "0.6235546", "text": "protected function registerTags()\n {\n $this->getCacheContext()->registerTags(\n [\n \\Magento\\Catalog\\Model\\Category::CACHE_TAG,\n \\Magento\\Catalog\\Model\\Product::CACHE_TAG\n ]\n );\n }", "title": "" }, { "docid": "d1073bd27b7433e8b93aa22f63332cdf", "score": "0.62013316", "text": "function my_template_tags() {}", "title": "" }, { "docid": "2c38e3d57d9d995b4b38df294bc38845", "score": "0.6195356", "text": "public function getTags()\n\t{\n\t\treturn $this->tags;\n\t}", "title": "" }, { "docid": "943f6b4bb448e37e3e632984077b2a00", "score": "0.6190346", "text": "public function typoSearchTagsHandlesMultipleMarkerPairs() {}", "title": "" }, { "docid": "4bbd52b03ee12a61bd86b646d97a07e4", "score": "0.61874324", "text": "function get_meta_tags_array()\r\n{\r\n return App::getInstance()->getMetaTags();\r\n}", "title": "" }, { "docid": "998a193cd15d398b0066f20b11e14615", "score": "0.6184061", "text": "public function taggedTaggablesFor($user);", "title": "" }, { "docid": "cc3587fa994f57d894d54138005b1f80", "score": "0.6181344", "text": "function wpse_allowedtags() {\n return '<script>,<style>,<br>,<em>,<i>,<ul>,<ol>,<li>,<a>,<p>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>';\n }", "title": "" }, { "docid": "2aa0f24481cada9d4449aa349d6b7b07", "score": "0.6170453", "text": "public function tags()\n\t{\n\t\t$wpposts = $this->JDBlogPost->getAllPostsForTaxonomyByTerm('post_tag');\n\t\t$this->set('tocType', 'post_tag');\n\t\t$this->set('wpTocPosts', $wpposts);\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "31291d5b4bba3b4e72dc8623206fb60c", "score": "0.616146", "text": "public function getTagsAsString();", "title": "" }, { "docid": "d54a23729444a7a9da238d28a9260836", "score": "0.6157488", "text": "protected function shouldUseTags(): bool\n {\n return config('lighthouse.cache_directive_tags', false)\n && method_exists($this->cacheRepository->getStore(), 'tags');\n }", "title": "" }, { "docid": "3110004453a863c787480ea86ce00c55", "score": "0.61504704", "text": "protected function generate_tag($tag){}", "title": "" }, { "docid": "e89d95225b32aa5ee1bb736f5001b691", "score": "0.6148443", "text": "public function metaTags()\n\t{\n\t\t$this->setMetaTags();\n\t\treturn $this->metaTags;\n\t}", "title": "" }, { "docid": "5c503121b3b034096ba4a7c6a0c67a61", "score": "0.6143727", "text": "protected function readTags() {\n\t\t// include files\n\t\trequire_once(WBB_DIR.'lib/data/board/BoardTagCloud.class.php');\n\t\t\n\t\t// get tags\n\t\t$tagCloud = new BoardTagCloud($this->boardID, WCF::getSession()->getVisibleLanguageIDArray());\n\t\t$this->tags = $tagCloud->getTags();\n\t}", "title": "" }, { "docid": "e9ab76f9447bd3e104f3d603b321b197", "score": "0.6139159", "text": "function nucleus_kses_allowed_html($tags, $context) {\n\t\tswitch($context) {\n\t\t\tcase 'general': \n\t\t\t\t$tags = array( \n\t\t\t\t\t'a' => array('href' => array()),\n\t\t\t\t\t'b' => array(),\n\t\t\t\t\t'br' => array()\n\t\t\t\t);\n\t\t\t\treturn $tags;\n\t\t\tdefault: \n\t\t\t\treturn $tags;\n\t\t}\n\t}", "title": "" }, { "docid": "2fa2d2a6d9f804e90ceb24fab2faec09", "score": "0.61380225", "text": "public function getTags()\r\n\t{\r\n\t\treturn($this->tags);\r\n\t}", "title": "" }, { "docid": "0e44abb0ec6971373c6172f2092fc0f5", "score": "0.613698", "text": "static function getTagsHtml() {\n $api = self::getAPI();\n $tags = $api->getTopTags();\n\n $tags_li = \"<li class='tag active' data-tag=''>\".__(\"All\").\"</li>\";\n foreach ($tags as $tag) {\n $tags_li.= \"<li class='tag' data-tag='{$tag['key']}'>\".ucfirst($tag['tag']).\"</li>\";\n }\n\n return \"<ul class='plugins-tags'>{$tags_li}</ul>\";\n }", "title": "" }, { "docid": "b398e4517d23ddc75392c9cca7bb68ec", "score": "0.61357677", "text": "public function providerGetTag()\n {\n return array(\n array('param' , 2),\n array('return', 1),\n );\n }", "title": "" }, { "docid": "d705e97651beeb6e57f28d1abcb2c94a", "score": "0.6130138", "text": "public function setTags($tags) {\n\t\t$this->tags = $tags;\n\t}", "title": "" }, { "docid": "d705e97651beeb6e57f28d1abcb2c94a", "score": "0.6130138", "text": "public function setTags($tags) {\n\t\t$this->tags = $tags;\n\t}", "title": "" }, { "docid": "41fa872c6def795b906833990390e5ba", "score": "0.61223525", "text": "public function createTag();", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.6122019", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.6122019", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" } ]
86c0299fdb0a89a48a3fa352900c8d24
Adds a hidden field with the recommendation type.
[ { "docid": "7331e42f83948ee79fbe6814be42457c", "score": "0.67485243", "text": "function displayHiddenRecommendationType($PA, $fobj) {\n\t\t$name = $PA['itemFormElName'];\n\t\t$value = $PA['itemFormElValue'];\n\t\t\n\t\treturn '<input type=\"hidden\" name=\"' . $name . '\" value=\"' . $value . '\" />';\n\t}", "title": "" } ]
[ { "docid": "73fd888e1354ecff26461319fba81634", "score": "0.60813653", "text": "public function addHidden() {\n parent::createHidden(\"id\");\n }", "title": "" }, { "docid": "2061c35a71a0016507c2f80695b9a2b2", "score": "0.59922904", "text": "function addHidden($name, $value) {\n return addInputField('hidden', $name, $value);\n}", "title": "" }, { "docid": "4e5e03cd5d62ddf11ec3f41c06715cde", "score": "0.5974273", "text": "public function add_hidden($name, $value)\n\t{\n\t\t$this->mFields[$name] = array(\n\t\t\t'type'\t\t\t=> 'hidden',\n\t\t\t'name'\t\t\t=> $name,\n\t\t\t'value'\t\t\t=> $value,\n\t\t);\n\t}", "title": "" }, { "docid": "ffb17fd8601ab0ea3c74d39ef384e448", "score": "0.59113455", "text": "public function default_type()\n {\n return 'hidden';\n }", "title": "" }, { "docid": "9be2f83f217437c08b2a1d4996266c27", "score": "0.58593214", "text": "function display_view_form($input_type, $input_name, $recommendation) {\n\t\t\n $form_string = \"\";\n \n\t\t$form_string .= $this->print_action_method();\n\t\t\n\t\tforeach ($this->input_list as $input) {\n\t\t $form_string .= '<input type=\"'.$input[0].'\" ';\n\t\t\t$form_string .= 'name=\"'.$input[1].'\" ';\n\t\t\t$form_string .= 'value=\"'.$input[2].'\" ';\n\t\t\t$form_string .= '/>';\n\t\t}\n\t\t\n\t\t//dynamic value\n\t\t$form_string .= '<input type=\"' . $input_type .'\" ';\n\t\t$form_string .= 'name=\"' . $input_name .'\" ';\n $json_recommendation = htmlentities(json_encode($recommendation), ENT_QUOTES);\n\t\t$form_string .= \"value='\".$json_recommendation.\"'\";\n\t\t$form_string .= '/>';\n\t\t\t\t\n\t\t$form_string .= $this->close_form();\n return $form_string;\n\t}", "title": "" }, { "docid": "1b11d91c0b354e0f85f33dbd990d31ed", "score": "0.57453704", "text": "function hidden( $field ){\n //za plugin value plugin a name package_type\n return '<input type=\"hidden\" value=\"'.$field['value'].'\" '\n . 'name=\"'.$field['name'].'\"/>'.\"\\n\"; \n }", "title": "" }, { "docid": "78e7c313dd6fca3f103090dd5620ce71", "score": "0.56850755", "text": "public function addHiddenField($name, $value)\n {\n $this->hiddenFields[] = array('name' => $name, 'value' => $value);\n }", "title": "" }, { "docid": "35309196a2ca4c240d779ff3db522fd5", "score": "0.5641175", "text": "private function addHidden($vars)\n {\n $this->validateName($vars);\n\n $this->output .= '<input type=\"hidden\" ';\n\n $this->argumentSkeleton($vars);\n if (isset($vars['_value'])) {\n $this->output .= 'value=\"' . $vars['_value'] . '\" ';\n }\n\n $this->output .= \">\\n\";\n }", "title": "" }, { "docid": "711be3be62173c702dadbd33739fc40c", "score": "0.5618901", "text": "function addHidden(string $p_name,$p_value){\n $this->hidden[$p_name]=$p_value;\n }", "title": "" }, { "docid": "8f9b82d029cd9c8eb4ffb786dde80676", "score": "0.5603986", "text": "public function addHidden($name, $value)\n {\n return parent::addElement(new HiddenField($name, $value));\n }", "title": "" }, { "docid": "d3f3302dd1c91a6ace2afaf56ee6ce9f", "score": "0.55500823", "text": "function AddHidden( $field, $sql=\"\" ) {\n $this->HiddenColumns[] = new BrowserColumn( $field, \"\", \"\", \"\", $sql );\n $this->FieldNames[$field] = count($this->Columns) - 1;\n }", "title": "" }, { "docid": "a932cb21ebbd316c138a150d7a0bf90f", "score": "0.5542905", "text": "function hidden($name, $value)\r\n {\r\n $string = \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\" />\\n\";\r\n $this->_form_string[] = $string;\r\n }", "title": "" }, { "docid": "66c8369aefd56111e5c543b790a2472f", "score": "0.54697496", "text": "private function prepareHiddenInput(){\r\n\t\r\n\t\techo '<input type=\"hidden\" ';\r\n\t\techo 'name = \"'.$this->name.'\" ';\r\n\t\techo (isset($this->settings['id']))? 'id = \"'.$this->settings['id'].'\" ':null;\r\n\t\techo (isset($this->settings['value']))? 'value = \"'.$this->settings['value'].'\" ':null;\r\n\t\techo ' />';\r\n\t\t\t\r\n\t}", "title": "" }, { "docid": "d7c0aa1ec94be2a27da11e1e2db815fe", "score": "0.5466278", "text": "public function create_hidden_id() {\n\n\t\t$properties = array(\n\t\t 'type' => 'hidden',\n\t\t 'defaultValue' => $this->get_download_page_id(),\n\t\t 'id' => apply_filters( 'lc_gforms_dg_inserted_id_field_id', 101 ),\n\t\t);\n\n\t\t$hidden_field = \\GF_Fields::create( $properties );\n\n\t\treturn $hidden_field;\n\n\t}", "title": "" }, { "docid": "8d2f9d3470002e1c466af1fe2707c4a9", "score": "0.5441176", "text": "protected function getForm_Type_HiddenService()\n {\n return $this->services['form.type.hidden'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType();\n }", "title": "" }, { "docid": "7d3def70452f76c4eed0b516d89864a4", "score": "0.54260844", "text": "protected function getForm_Type_HiddenService()\n {\n @trigger_error('The \"form.type.hidden\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.hidden'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType();\n }", "title": "" }, { "docid": "c68918a9877198455ecc589ea3ae76d3", "score": "0.54209846", "text": "function hiddenField($name, $value = null, $attributes = array())\n\t{\n\t\treturn '<input type=\"hidden\" name=\"' . $this->escape($name) . '\" value=\"' . $this->escape($value) . '\"' . $this->__buildHtmlAttrs($attributes) . ' />';\n\t}", "title": "" }, { "docid": "233543348877a751a7e2000cf5e01ad6", "score": "0.5403929", "text": "function addHidden($name, $value) {\n $this->directive['hiddens'][$name] = $value;\n }", "title": "" }, { "docid": "a78656126942d17eeb2a08b8a523d347", "score": "0.5371945", "text": "public function setHidden($name, $value){\n $hidden = \"<div class=\\\"form-group\\\">\n <input type='hidden' name='$name' value='$value'><br>\n </div><br>\" ;\n $this->form = $this->form.$hidden ;\n }", "title": "" }, { "docid": "19cafef4a7557090050c8c86d961af53", "score": "0.5294194", "text": "function woocom_save_proddata_custom_fields($post_id) {\n // Save Text Field\n \n // Save Hidden field\n $hidden = $_POST['_hidden_field'];\n if (!empty($hidden)) {\n update_post_meta($post_id, '_hidden_field', esc_attr($hidden));\n }\n}", "title": "" }, { "docid": "1fe1f029a02a353ca0e05a04c0476279", "score": "0.52662563", "text": "function hidden($attribute) {\n return \"<input type='hidden' $attribute />\\n\";\n }", "title": "" }, { "docid": "8063a5f2a44fbbb3a0040a35e3830d1e", "score": "0.52277124", "text": "public function setHidden() {\n\t\t$this->hidden = true;\n\t}", "title": "" }, { "docid": "5b5dfc888c9961ff46b80df5a915bced", "score": "0.5221311", "text": "public function AJAXLinkHiddenField()\n {\n $name = $this->orderItem->AJAXDefinitions()->TableID().'_Quantity_SetQuantityLink';\n if ($quantitylink = $this->getQuantityLink()) {\n $attributes = array(\n 'type' => 'hidden',\n 'class' => 'ajaxQuantityField_qtylink',\n 'name' => $name,\n 'value' => $quantitylink,\n );\n $formfield = new FormField($name);\n\n return $formfield->createTag('input', $attributes);\n }\n }", "title": "" }, { "docid": "861bd7b56f3ec2a6082bd74b752b6c09", "score": "0.517215", "text": "function fiorello_mikado_meta_box_add_hidden_class( $classes = array() ) {\n\t\tif ( ! in_array( 'mkdf-meta-box-hidden', $classes ) ) {\n\t\t\t$classes[] = 'mkdf-meta-box-hidden';\n\t\t}\n\t\t\n\t\treturn $classes;\n\t}", "title": "" }, { "docid": "2da20ffd210d1b0e90fff4a758c91ce1", "score": "0.5149923", "text": "public function setTextHidden($name,$value){\r\n $text=\"<br/>\r\n <div class='form-group' >\r\n <input hidden type='text' name='$name' value='$value'> <br/> </div>\" ;\r\n array_push($this->form,$text);\r\n }", "title": "" }, { "docid": "f97daa3c4f7d823560da7925e4047a09", "score": "0.5142914", "text": "public function setFieldAttributeHidden($field,$hidden) {\r\n if (!array_key_exists($field, self::$_fieldsAttributes)) {\r\n self::$_fieldsAttributes[$field]=\"\";\r\n }\r\n if ($hidden) {\r\n if (strpos(self::$_fieldsAttributes[$field],'hidden')>0) {return;}\r\n self::$_fieldsAttributes[$field] .= (self::$_fieldsAttributes[$field]==\"\"?\"hidden\":\",hidden\");\r\n } else {\r\n self::$_fieldsAttributes[$field] = str_replace('hidden','', self::$_fieldsAttributes[$field]);\r\n self::$_fieldsAttributes[$field] = str_replace(',,',',', self::$_fieldsAttributes[$field]);\r\n }\r\n }", "title": "" }, { "docid": "81518a1585d84d62700fef2b9ae0ec9a", "score": "0.5122406", "text": "function put_hidden($string)\n{\n if (!empty($string)) {\n\t$aVuelta = split(\"\\&\",$string);\n\t$lVuelta = sizeof($aVuelta);\n\tfor ($i=0; $i<$lVuelta; $i++) {\n\t $tmpVuelta = split(\"\\=\",$aVuelta[$i]);\n\t echo \"<INPUT TYPE=HIDDEN NAME=\\\"\".$tmpVuelta[0];\n\t echo \"\\\" VALUE=\\\"\".$tmpVuelta[1].\"\\\">\\n\";\n\t}\n } else return 0;\n return 1;\n}", "title": "" }, { "docid": "8ed3e364270a8f96f56ccd4a2e6e17d2", "score": "0.51208586", "text": "public function set_hidden($hidden) {\n \t$this->hidden = (bool)$hidden;\n }", "title": "" }, { "docid": "162b32f646c1155de9a279fabe4f778c", "score": "0.51201415", "text": "protected function hideField() {\n return NULL;\n }", "title": "" }, { "docid": "23972908265ede757ef78b2910905e5f", "score": "0.5115657", "text": "public function addHidden($fieldName, $value = null, $forceValue = false) {\n if ($this->isPostBack() && $forceValue === false) {\n $value = $this->getFormValue($fieldName, $value);\n }\n\n $this->HiddenInputs[$fieldName] = $value;\n }", "title": "" }, { "docid": "ec3df4f10de6a9eb758834c2172288ad", "score": "0.51155305", "text": "function mts_hide_review_types($types) {\r\n unset($types['point'], $types['percentage']); // remove types\r\n $types['star'] = __('Enable Reviews'); // Change label\r\n return $types;\r\n}", "title": "" }, { "docid": "3688ef3191e732d4b282810caef4234c", "score": "0.5111512", "text": "public function setIsLabelHidden(bool $isLabelHidden): FieldInterface;", "title": "" }, { "docid": "08b56de4220f8bddd99ea91d59041d21", "score": "0.5091236", "text": "public function setHidden(\n $hidden\n )\n {\n }", "title": "" }, { "docid": "08b56de4220f8bddd99ea91d59041d21", "score": "0.509091", "text": "public function setHidden(\n $hidden\n )\n {\n }", "title": "" }, { "docid": "08b56de4220f8bddd99ea91d59041d21", "score": "0.509091", "text": "public function setHidden(\n $hidden\n )\n {\n }", "title": "" }, { "docid": "519de492fc610eaea0f11854ad0e9ebd", "score": "0.5079738", "text": "function iver_select_meta_box_add_hidden_class( $classes = array() ) {\n\t\tif ( ! in_array( 'qodef-meta-box-hidden', $classes ) ) {\n\t\t\t$classes[] = 'qodef-meta-box-hidden';\n\t\t}\n\n\t\treturn $classes;\n\t}", "title": "" }, { "docid": "47ac67ffc284af5e2a4c56e4b8f12f3e", "score": "0.50745004", "text": "function hiddenField(\r\n\t$name,\r\n\t$value = null,\r\n\t$validator = null,\r\n\t$extra = null)\r\n\t{\r\n\t\trequire_once(FH_INCLUDE_DIR.'fields/class.HiddenField.php');\r\n\r\n\t\t// create new hidden field\r\n\t\t$fld = new HiddenField($this, $name);\r\n\r\n\t\t// only set the hidden field value if there is not a value in the $_POST array\r\n\t\tif(!is_null($value) && !$this->isPosted() )\r\n\t\t$fld->setValue( $value );\r\n\t\tif(!empty($validator)) $fld->setValidator( $validator );\r\n\t\tif(!empty($extra)) $fld->setExtra( $extra );\r\n\r\n\t\t// register the field\r\n\t\t$this->_registerField( $name, $fld, '__HIDDEN__' );\r\n\t}", "title": "" }, { "docid": "66e8da6902f023640251f76bb0e6099b", "score": "0.50698584", "text": "public function generateHidden()\n {\n $output = '';\n $pattern = '<input type=\"hidden\" name=\"%s\" value=\"%s\" />';\n\n foreach($this->getHiddenFields() as $hidden) {\n $output .= sprintf(\n $pattern,\n $hidden['name'],\n $hidden['value']\n );\n\n $output .= \"\\n\";\n }\n\n return $output;\n }", "title": "" }, { "docid": "f42ad1f9f3b1b5f8034f77532425541d", "score": "0.5069493", "text": "protected function getFormTarget()\n {\n return 'recommendations';\n }", "title": "" }, { "docid": "37eeded236350beeaed818709738f27f", "score": "0.50364196", "text": "private function hidden($name,$value=null,$x=null){\n\t\t$value = $this->resolveValue($name,$value,$x['value']);\n\t\treturn '<input type=\"hidden\" name=\"'.$name.'\" '.($this->hasValue($value)?'value=\"'.htmlspecialchars($value).'\" ':null).$this->attributes($x,$name).'/>';\n\t}", "title": "" }, { "docid": "2b8e3349651e1b6625bb3f4cab815978", "score": "0.5036001", "text": "public function hideField($hidden) {\n if ($hidden) {\n $this->fieldGroupHtml->setAttribute('class', 'input-field col s6 hiddendiv');\n }\n\n return $this;\n }", "title": "" }, { "docid": "7538b6abd83558342549c95fe7813cd1", "score": "0.5032858", "text": "function hidden( $var, $option = '' ) {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 2.0', 'This method is deprecated, please use the <code>Yoast_Form</code> class.' );\n\n\t\tif ( $option !== '' ) {\n\t\t\tYoast_Form::get_instance()->set_option( $option );\n\t\t}\n\n\t\tYoast_Form::get_instance()->hidden( $var );\n\t}", "title": "" }, { "docid": "992181cad41950ea4e2694d810a692a8", "score": "0.50238025", "text": "protected function getHiddenFields() {\n return array();\n }", "title": "" }, { "docid": "ad4a4ffef186c8399b8fddc8628c3ef7", "score": "0.5020908", "text": "public function hidden($params = array()) {\n $o = '<input type=\"hidden\"';\n $o .= (isset($params['id'])) ? \" id='{$params['id']}'\" : '';\n $o .= (isset($params['name'])) ? \" name='{$params['name']}'\" : '';\n $o .= (isset($params['class'])) ? \" class='form-input hidden {$params['class']}'\" : \" class='form-input hidden'\";\n $o .= (isset($params['value'])) ? \" value='{$params['value']}'\" : '';\n $o .= ' />';\n return $o;\n }", "title": "" }, { "docid": "fc61419c36d7cc95872eb5b0fa4dbd9f", "score": "0.5020389", "text": "function taxonomy_add_new_meta_field() {\n ?>\n <div class=\"form-field\">\n <label for=\"poka_product_feed_xml_check\"><?php _e('Meta TitlePoka Product Feed XML', 'poka-product-feed-xml'); ?></label>\n <input type=\"text\" name=\"poka_product_feed_xml_check\" id=\"poka_product_feed_xml_check\">\n <p class=\"description\"><?php _e('Show on Product Feed XML or not, Default: Uncheck - Not show', 'poka-product-feed-xml'); ?></p>\n </div>\n <?php\n }", "title": "" }, { "docid": "a7ffa4991e05c070b9cbf06f81575b8c", "score": "0.50114036", "text": "protected function hideFieldsForAddEdit()\n {\n if ($this->isAdd() || $this->isCopy() || $this->isGridAdd()) {\n $this->id->Visible = false;\n }\n }", "title": "" }, { "docid": "5aa7c6b047b08efcff503caed0c56ba3", "score": "0.50092804", "text": "public function setHidden($hidden)\n {\n $this->hidden = $hidden;\n }", "title": "" }, { "docid": "397ba73f3561f66225bb526261757e26", "score": "0.50036615", "text": "protected function renderHiddenFieldForEmptyValue()\n {\n return sprintf(\n '<input type=\"hidden\" name=\"%s\" value=\"\" />',\n $this->arguments['name']\n );\n }", "title": "" }, { "docid": "25d7841a74924d03b320cb409b2fc338", "score": "0.4999766", "text": "public function setHidden($var)\n {\n GPBUtil::checkBool($var);\n $this->hidden = $var;\n\n return $this;\n }", "title": "" }, { "docid": "93212e29746663589b4728094cff345f", "score": "0.49911916", "text": "function HiddenField($strName, $strValue)\n\t{\n\t\techo \"<input type=hidden name='$strName' value='$strValue'>\\r\\n\";\n\t}", "title": "" }, { "docid": "b070ab6f58964f470ed4c6829ee4bff0", "score": "0.49384075", "text": "function oos_draw_hidden_field($name, $value = '') {\n $field = '<input type=\"hidden\" name=\"' . $name . '\" value=\"';\n if ($value != '') {\n $field .= trim($value);\n } else {\n $field .= trim($GLOBALS[$name]);\n }\n $field .= '\">';\n\n return $field;\n }", "title": "" }, { "docid": "0c82d0e8e6ac419b34f098428586846a", "score": "0.4928117", "text": "public function addHidden(\n $attributes\n )\n {\n }", "title": "" }, { "docid": "0c82d0e8e6ac419b34f098428586846a", "score": "0.49259385", "text": "public function addHidden(\n $attributes\n )\n {\n }", "title": "" }, { "docid": "0c82d0e8e6ac419b34f098428586846a", "score": "0.49224833", "text": "public function addHidden(\n $attributes\n )\n {\n }", "title": "" }, { "docid": "f9d4bda9dd2bdcd0d2e51bd24e131bb4", "score": "0.49169415", "text": "public function create_hidden_title() {\n\n\t\t$properties = array(\n\t\t 'type' => 'hidden',\n\t\t 'defaultValue' => $this->get_download_page_title(),\n\t\t 'id' => apply_filters( 'lc_gforms_dg_inserted_title_field_id', 102 ),\n\t\t);\n\n\t\t$hidden_field = \\GF_Fields::create( $properties );\n\n\t\treturn $hidden_field;\n\t}", "title": "" }, { "docid": "a32bc0b37d577569820be40c0bd6e1b5", "score": "0.4906924", "text": "public static function field_hidden_evenement(){\n $hidden_evenement = esc_attr(get_option('hidden_evenement'));\n ?>\n <input type=\"checkbox\"\n id=\"hidden_evenement\"\n name=\"hidden_evenement\"\n value=\"1\"\n <?php checked(1, $hidden_evenement, true) ?>\n />\n <label for=\"\">Masquer cette section de la page dédier aux cartes</label>\n <?php\n }", "title": "" }, { "docid": "b6581f02b459caf62b08581033f503f6", "score": "0.48997784", "text": "public static function hidden($name, $value)\n {\n return self::input('hidden', $name, array('value' => $value));\n }", "title": "" }, { "docid": "3fef88d192f8011a8f141219032e3f90", "score": "0.4893838", "text": "public function show(Recommendation $recommendation)\n {\n //\n }", "title": "" }, { "docid": "ec812f816f34199306a64d4a72d74fbc", "score": "0.4892904", "text": "public function setPickerFieldHidden($pickerFieldHidden)\n {\n $this->pickerFieldHidden = $pickerFieldHidden;\n }", "title": "" }, { "docid": "593de4ec9e484dd2a7b1cabe10eab606", "score": "0.48739216", "text": "public static function hidden($name, $value = '')\n {\n if (strpos($value, '\"') !== FALSE)\n {\n return '<input type=\"hidden\" name=\"' . $name . '\" id=\"' . $name . '\" value=\\'' . $value . '\\' />';\n }\n else\n {\n return '<input type=\"hidden\" name=\"' . $name . '\" id=\"' . $name . '\" value=\"' . $value . '\" />';\n }\n }", "title": "" }, { "docid": "7b21e5639cb52e9e7496c19d0073c1c2", "score": "0.48687765", "text": "public function edit(Recommendation $recommendation)\n {\n //\n }", "title": "" }, { "docid": "ca8ff552c86bf0406d1e85075cd85763", "score": "0.48533505", "text": "function er_related_content_hide_types(){\n return array('er_user_event', 'er_user_event_instance');\n}", "title": "" }, { "docid": "8180da465e1b015f765d5d4986bde59a", "score": "0.48506162", "text": "public static function field_hidden_reservation(){\n $hidden_reservation = esc_attr(get_option('hidden_reservation'));\n ?>\n <input type=\"checkbox\"\n id=\"hidden_reservation\"\n name=\"hidden_reservation\"\n value=\"1\"\n <?php checked(1, $hidden_reservation, true); ?>\n />\n <label for=\"\">Masquer cette section de la page dédier aux cartes</label>\n <?php\n }", "title": "" }, { "docid": "562ed5388e6d4d8aa8994f219530edb9", "score": "0.48487213", "text": "public function getHiddenFields()\n {\n return [\n 'createdAt',\n 'updatedAt',\n 'version'\n ];\n }", "title": "" }, { "docid": "43dedef0bfca70dc3c70ac999a06461f", "score": "0.48359767", "text": "function tep_draw_hidden_field($name, $value = '', $parameters = '') {\n $field = '<input type=\"hidden\" name=\"' . tep_output_string($name) . '\"';\n\n if (tep_not_null($value)) {\n $field .= ' value=\"' . tep_output_string($value) . '\"';\n } elseif($global_value = tep_get_global_value($name)) {\n $field .= ' value=\"' . tep_output_string(stripslashes($global_value)) . '\"';\n }\n\n if (tep_not_null($parameters)) $field .= ' ' . $parameters;\n\n $field .= '>';\n\n return $field;\n }", "title": "" }, { "docid": "f676375f6ba60c59399899e7392fd1c4", "score": "0.48340687", "text": "public function get_hidden() {\n \treturn $this->hidden;\n }", "title": "" }, { "docid": "db5812e94947eacf7c0080c943eb1673", "score": "0.482582", "text": "public function hidden($name, array $options = array())\n {\n return $this->add('hidden', 'hidden', $options);\n }", "title": "" }, { "docid": "2c9d934b67ca19c7a5467da2c26d9ef4", "score": "0.4823975", "text": "public function printHtmlFormHidden()\n {\n echo <<<HTML\n <input type=\"hidden\" name=\"post_form\" value=\"true\" />\nHTML;\n }", "title": "" }, { "docid": "22a7e502d63461501cb491641c765084", "score": "0.48031303", "text": "public function showHidden(Array $data = array())\n {\n $data['name'] = empty($data['name']) ? $this->propertyprefix . $this->id : $data['name'];\n \n // Allow overriding by specific parameters\n if (!isset($data['size'])) $data['size'] = $this->display_size;\n if (!isset($data['maxsize'])) $data['maxsize'] = $this->validation_max_file_size;\n\n // inform anyone that we're showing a file upload field, and that they need to use\n // <form ... enctype=\"multipart/form-data\" ... > in their input form\n xarVar::setCached('Hooks.dynamicdata','withupload',1);\n\n return parent::showHidden($data);\n }", "title": "" }, { "docid": "83cf277bf9a19642ed018eb520b0dce7", "score": "0.47985095", "text": "public static function hidden($name, $value = null, array $attributes = null)\n {\n $attributes['type'] = 'hidden';\n\n return Form::input($name, $value, $attributes);\n }", "title": "" }, { "docid": "894c06b02273fd8a508976db01826182", "score": "0.4789147", "text": "public function getDescriptionHideInput()\n {\n $html = '';\n\n if (!$this->getItemDescription()) {\n $html = 'display: none';\n }\n\n return $html;\n }", "title": "" }, { "docid": "4345bda13c8758fd65224b5109fe07e6", "score": "0.47862622", "text": "function tep_draw_hidden_field($name, $value = '', $parameters = '') {\n\t$field = '<input type=\"hidden\" name=\"' . tep_output_string($name) . '\"';\n\n\tif (tep_not_null($value)) {\n\t\t$field .= ' value=\"' . tep_output_string($value) . '\"';\n\t} elseif (isset($GLOBALS[$name])) {\n\t\t$field .= ' value=\"' . tep_output_string(stripslashes($GLOBALS[$name])) . '\"';\n\t}\n\n\tif (tep_not_null($parameters)) $field .= ' ' . $parameters;\n\n\t$field .= ' />';\n\n\treturn $field;\n}", "title": "" }, { "docid": "844740bd08de2d1264467550e107337e", "score": "0.47847658", "text": "public function hidden($fieldName, $attributes = []) {\n $return = '<input type=\"hidden\"';\n $return .= $this->_idAttribute($fieldName, $attributes);\n $return .= $this->_nameAttribute($fieldName, $attributes);\n $return .= $this->_valueAttribute($fieldName, $attributes);\n $return .= $this->_attributesToString($attributes);\n $return .= ' />';\n return $return;\n }", "title": "" }, { "docid": "d12344868b898d2610dfb73dde74e07c", "score": "0.47764033", "text": "public static function hidden_field($id, $name, $value, $options=array()) {\n\t\t\t$options = array_merge($options, array('name' => $name, 'id' => $id, 'value' => $value, 'type' => 'hidden'));\n\t\t\treturn self::tag('input', $options);\n\t\t}", "title": "" }, { "docid": "1ea810000cc3cc03ccdff22573aff476", "score": "0.47758278", "text": "public function render_hidden_form() { \n return $this->get_hidden_form_html(); \n }", "title": "" }, { "docid": "6fe92bb40c94f58aacafd0439fda6443", "score": "0.47647214", "text": "public function hidden($key, $value = null, $miscFields = [])\n {\n $name = (string) ($miscFields['name'] ?? $key);\n if ($name !== '') {\n $requestValue = $this->getRequestValue($name);\n if ($requestValue !== false && !is_array($requestValue)) {\n $value = $requestValue;\n }\n }\n $nameAndID = $this->buildNameAndID($key, $miscFields);\n\n return '<input type=\"hidden\"' . $nameAndID . $this->serializeMiscFields('', $miscFields) . ' value=\"' . $value . '\" />';\n }", "title": "" }, { "docid": "3f9bf5ae6aead8e549f823e123a0530f", "score": "0.476331", "text": "public function getAttributeHiddenFields()\n {\n if (Mage::registry('attribute_type_hidden_fields')) {\n return Mage::registry('attribute_type_hidden_fields');\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "0f49443720722e03bf7a49783ab22405", "score": "0.47621733", "text": "public function setHidden($value = TRUE) {\n\n $this->hidden = $value;\n\n return $this;\n }", "title": "" }, { "docid": "886b6adf29233f8508ae963220abc1e2", "score": "0.4754682", "text": "public function show()\n {\n // set the tag properties\n $this->tag->{'id'} = 'thidden_' . mt_rand(1000000000, 1999999999);\n $this->tag->{'name'} = $this->name; // tag name\n $this->tag->{'value'} = $this->value; // tag value\n $this->tag->{'type'} = 'hidden'; // input type\n $this->tag->{'widget'} = 'thidden';\n $this->tag->{'style'} = \"width:{$this->size}\";\n \n // shows the widget\n $this->tag->show();\n }", "title": "" }, { "docid": "d4abe9235d11e82c8727d3ac5b0dbe7c", "score": "0.47499713", "text": "public function addHidden($fieldName, $fieldValue) {\n\t\t$formElement = ' | '.($this->wrapPrefix($fieldName)).' = hidden |'.$fieldValue.' ||';\n\t\treturn $formElement;\n\t}", "title": "" }, { "docid": "573760e0b90c0142168f8ab53de7c216", "score": "0.4749429", "text": "public function registerHiddenField($name, $value)\n\t{\n\t\t$this->_hiddenFields[$name] = $value;\n\n\t\t$params = func_get_args();\n\t\t$this->_page->registerCachingAction('Page.ClientScript', 'registerHiddenField', $params);\n\t}", "title": "" }, { "docid": "452796320c426b65b1838dcb1299fe1e", "score": "0.4748714", "text": "public function generate_hidden_html($key, $data) {\n\t $field = $this->get_field_key ( $key );\n\t $defaults = array (\n\t 'title' => '',\n\t 'disabled' => false,\n\t 'class' => '',\n\t 'css' => 'min-width:400px;',\n\t 'placeholder' => '',\n\t 'type' => 'hidden',\n\t 'desc_tip' => false,\n\t 'description' => '',\n\t 'custom_attributes' => array ()\n\t );\n\t\n\t $data = wp_parse_args ( $data, $defaults );\n\t\n\t ob_start ();\n\t ?>\n\t <tr style=\"display:none;\">\n\t \t<td>\n\t \t\t<input class=\"input-text regular-input <?php echo esc_attr( $data['class'] ); ?>\" type=\"<?php echo esc_attr( $data['type'] ); ?>\" name=\"<?php echo esc_attr( $field ); ?>\" id=\"<?php echo esc_attr( $field ); ?>\" style=\"<?php echo esc_attr( $data['css'] ); ?>\" value=\"<?php echo $data['type']!='password'? esc_attr( $this->get_option( $key ) ):null; ?>\" placeholder=\"<?php echo esc_attr( $data['placeholder'] ); ?>\" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); ?> />\n\t \t</td>\n\t </tr>\n\t <?php\n\t\t\n\t\treturn ob_get_clean ();\n\t}", "title": "" }, { "docid": "793f8e88b6d73989e662dadfa5b74c0b", "score": "0.4747841", "text": "protected function addFieldCodeIdHidden($tab = null)\n {\n CRUD::addField([\n 'name' => 'code_id',\n 'label' => 'Code id',\n 'type' => 'hidden',\n 'value' => \\Route::current()->parameter('code'),\n 'tab' => $tab\n ]);\n }", "title": "" }, { "docid": "05bc401d7927bc8297e6a2d3178acd64", "score": "0.4741449", "text": "public function hide_ratecategory_admin_fields() {\n ?><style>.term-description-wrap,.term-slug-wrap{display:none;}</style><?php\n }", "title": "" }, { "docid": "a87804a8887055d95ca01fafe9d34dbf", "score": "0.47342712", "text": "protected function _hidden($name, $value = null, $attribs = null)\n {\n return '<input type=\"hidden\"'\n . ' name=\"' . $this->view->escape($name) . '\"'\n . ' value=\"' . $this->view->escape($value) . '\"'\n . $this->_htmlAttribs($attribs) . $this->getClosingBracket();\n }", "title": "" }, { "docid": "49c3ca9dbf1c51b171274c39445c913e", "score": "0.47338027", "text": "public function hidden()\n {\n return $this->withMeta(['hidden' => true]);\n }", "title": "" }, { "docid": "eae54f37b84db327aab3e5749e128944", "score": "0.47329056", "text": "public function inputHidden(string $name, array $parameters = []) : string\n\t{\n\t}", "title": "" }, { "docid": "9f13ba7339e445f447eb68bfbb70487e", "score": "0.47259495", "text": "public function hidden($name, $value)\n {\n $this->hiddenFields[$name] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "eb3468e45eb1c04375c2f7b2932edb22", "score": "0.472055", "text": "function brando_taxonomy_add_new_meta_field() {\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[image_url]\"><?php esc_html_e( 'Add Category Image', 'brando' ); ?></label>\n <img class=\"upload_image_screenshort\"/>\n <input type=\"hidden\" name=\"term_meta[image_url]\" id=\"image_url\" class=\"regular-text\">\n <input type=\"button\" name=\"upload-btn-cat\" id=\"upload-btn-cat\" class=\"button-secondary-cat brando_upload_image\" value=\"Upload Image\">\n <input type=\"button\" name=\"remove-btn-cat\" id=\"remove-btn-cat\" class=\"brando_remove_button button-secondary-cat\" value=\"Remove Image\">\n </div>\n <?php\n }", "title": "" }, { "docid": "3ed14d23acc02f38f3d14aede31eeaa8", "score": "0.47174108", "text": "public function registerHiddenField($name,$value)\n\t{\n\t\t$this->_hiddenFields[$name]=$value;\n\n\t\t$params=func_get_args();\n\t\t$this->_page->registerCachingAction('Page.ClientScript','registerHiddenField',$params);\n\t}", "title": "" }, { "docid": "33bf3035b72af9564419cbada4f18c6c", "score": "0.47128564", "text": "public function hidden( $name, $value = null, $attributes = array() ) {\n\t\treturn $this->input( 'hidden', $name, $value, $attributes );\n\t}", "title": "" }, { "docid": "e04a73b1440f98960c77cb34e3f0ee56", "score": "0.47107175", "text": "function addField($_type, $_name, $_label = null, $_value, $_attr = null, $_opt = null)\n\t{\n\n\t\t$_output = $this->makeField($_type, $_name, $_label, $_value, $_attr, $_opt);\n\t\t$this->output .= $_output;\n\t}", "title": "" }, { "docid": "de5d62533b1999a4150c5fbc3ae1f06e", "score": "0.47103575", "text": "public function getHidden() {\n $return = '';\n if (is_array($this->HiddenInputs)) {\n foreach ($this->HiddenInputs as $name => $value) {\n $return .= $this->hidden($name, ['value' => $value]);\n }\n // Clean out the array\n // mosullivan - removed cleanout so that entry forms can all have the same hidden inputs added once on the entry/index view.\n // TODO - WATCH FOR BUGS BECAUSE OF THIS CHANGE.\n // $this->HiddenInputs = array();\n }\n return $return;\n }", "title": "" }, { "docid": "9055a3e0202c4439c826fab95149a63c", "score": "0.47070357", "text": "public function hidden_order_itemmeta( $hidden ) {\n\n\t\t$hidden[] = '_original_order_item_id';\n\n\t\treturn $hidden;\n\t}", "title": "" }, { "docid": "547d0ed1b4d3b542752fbbd1c7a55f26", "score": "0.47019392", "text": "public function hidden($name, $value = null, $attributes = array())\n\t{\n\t\treturn $this->input('hidden', $name, $value, $attributes);\n\t}", "title": "" }, { "docid": "2281e0eaa7fd070387217ee625fbb094", "score": "0.4696419", "text": "public function getHidden()\n {\n }", "title": "" }, { "docid": "2281e0eaa7fd070387217ee625fbb094", "score": "0.46949115", "text": "public function getHidden()\n {\n }", "title": "" }, { "docid": "2281e0eaa7fd070387217ee625fbb094", "score": "0.4694368", "text": "public function getHidden()\n {\n }", "title": "" }, { "docid": "cb5f93e754c5cd2098ffe26453b701eb", "score": "0.46806732", "text": "function hidden_tag( $inputtype, $fmt, $vals, $msqid, $debug=0 ) {\n\n\t\tif($inputtype == 'jname') {\n\t\t\t$valar = explode('&&', $vals);\n\t\t\t$vals = sprintf($fmt, $valar[0],$valar[1],$valar[2],$valar[3]);\n\t\t\t$html .= '<td>'.$vals;\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'name1\" value=\"'.$valar[0].'\">';\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'name2\" value=\"'.$valar[1].'\">';\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'ruby1\" value=\"'.$valar[2].'\">';\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'ruby2\" value=\"'.$valar[3].'\">';\n\t\t\t$html .= '</td>';\n\t\t}\n\t\telse if($inputtype == 'postno') {\n\t\t\t$valar = explode('&&', $vals);\n\t\t\t$html .= '<td>';\n\t\t\t$html .= sprintf($fmt, substr($valar[0],0,3),substr($valar[0],3,4),$valar[1],$valar[2],$valar[3]);\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'\" value=\"'.$valar[0].'\">';\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'a\" value=\"'.$valar[1].'\">';\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'b\" value=\"'.$valar[2].'\">';\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'c\" value=\"'.$valar[3].'\">';\n\t\t\t$html .= '</td>';\n\t\t}\n\t\telse {\n\t\t\t$html .= '<td>';\n\t\t\tif($fmt == '%k')\n\t\t\t\t$html .= number_format($vals);\n\t\t\telse\n\t\t\t\t$html .= sprintf($fmt, $vals);\n\t\t\t$html .= '<input type=\"hidden\" name=\"Question'.$msqid.'\" value=\"'.$vals.'\">';\n\t\t\t$html .= '</td>';\n\t\t}\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "778c7fe4446e554a3dcba2a57d044219", "score": "0.46763334", "text": "function commentForm_socialFields() {\n echo <<<EOD\n<input type=\"hidden\" name=\"social[name]\" id=\"social-name-field\" value=\"\" disabled />\n<input type=\"hidden\" name=\"social[profile_link]\" id=\"social-link-field\" value=\"\" disabled />\n<input type=\"hidden\" name=\"social[profile_image]\" id=\"social-image-field\" value=\"\" disabled /> \nEOD;\n }", "title": "" } ]
3b707e7c4fc3dcbcfa45cfaf91b308d6
Existing membership plan handler
[ { "docid": "2104c638de268189b4a9bd0446797d02", "score": "0.5947915", "text": "protected function existingMembershipHandler(&$account_info)\n {\n if ($this->planType == 'account'\n && !$this->newMembership\n && $account_info['Plan_ID']\n ) {\n $plan_using = $GLOBALS['rlMembershipPlan']->getUsingPlan(\n $account_info['Plan_ID'],\n $account_info['ID']\n );\n $GLOBALS['rlSmarty']->assign('plan_using', $plan_using);\n\n if ($account_info['Payment_status'] == 'paid'\n && (\n $account_info['plan']['Listing_number'] == 0\n || ($account_info['plan']['Listing_number'] > 0\n && $plan_using['Listings_remains'] > 0)\n )\n ) {\n $GLOBALS['rlMembershipPlan']->fixAvailability($account_info);\n\n $this->singlePlan = true;\n $this->skipCheckout = true;\n $this->planID = $account_info['Plan_ID'];\n $this->plans = array(\n $account_info['Plan_ID'] => $account_info['plan'],\n );\n\n $GLOBALS['rlSmarty']->assign('plan_info', $account_info['plan']);\n\n // Reset featured status\n if (!$account_info['plan']['Featured_listing']\n || ($account_info['plan']['Advanced_mode']\n && $account_info['plan']['Featured_remains'] <= 0)\n ) {\n $_POST['ad_type'] = $this->adType = $this->postData['ad_type'] = 'standard';\n }\n\n // Unset steps\n unset($this->steps['plan'], $this->steps['checkout']);\n }\n }\n }", "title": "" } ]
[ { "docid": "55a9412fd994e4f4c9615f32b59c0aa6", "score": "0.5599924", "text": "public function membership() {\n\n return new Engine_ProxyObject($this, Engine_Api::_()->getDbtable('membership', 'sitepageevent'));\n }", "title": "" }, { "docid": "efe6b35cd9e4ae66874717e86c92dea7", "score": "0.55493474", "text": "public function createMembershipForPassholder(CultureFeed_Uitpas_Passholder_Membership $membership);", "title": "" }, { "docid": "0d589a281d48afd717ba8b05901c6e2a", "score": "0.5409303", "text": "function admin_member() {\n\n\t\t}", "title": "" }, { "docid": "7736046a3a0a6535d393b3cdcd972eb0", "score": "0.51307744", "text": "public function save_subscription_data( WC_Memberships_Membership_Plan $plan, $args ) {\n\n\t\t$product = wc_get_product( $args['product_id'] );\n\n\t\tif ( ! $product ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// handle access from Subscriptions\n\t\tif ( $product->is_type( array( 'subscription', 'subscription_variation', 'variable-subscription' ) ) && $this->has_membership_plan_subscription( $plan->get_id() ) ) {\n\n\t\t\t// note: always use the product ID (not variation ID)\n\t\t\t// when looking up a subscription, as Subscriptions requires it\n\t\t\t$subscription = $this->get_order_product_subscription( $args['order_id'], $product->id );\n\n\t\t\tif ( ! $subscription ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( $this->is_subscriptions_gte_2_0() ) {\n\n\t\t\t\t// Save related subscription ID\n\t\t\t\tupdate_post_meta( $args['user_membership_id'], '_subscription_id', $subscription->id );\n\n\t\t\t} else {\n\n\t\t\t\t// Save related subscription key\n\t\t\t\t$subscription_key = WC_Subscriptions_Manager::get_subscription_key( $args['order_id'], $product->id );\n\t\t\t\tupdate_post_meta( $args['user_membership_id'], '_subscription_key', $subscription_key );\n\t\t\t}\n\n\t\t\t$end_date = '';\n\n\t\t\t// set membership expiry date based on subscription expiry date\n\t\t\tif ( $this->plan_grants_access_while_subscription_active( $plan->get_id() ) ) {\n\n\t\t\t\t$end_date = $this->get_subscription_event_date( $subscription, 'end' );\n\t\t\t}\n\n\t\t\tupdate_post_meta( $args['user_membership_id'], '_end_date', $end_date );\n\t\t}\n\t}", "title": "" }, { "docid": "0896cc7a40ba4ad832e5c074e91e27bb", "score": "0.5113141", "text": "public function memberProvider() {\n return [\n [OgMembershipInterface::STATE_ACTIVE],\n [OgMembershipInterface::STATE_PENDING],\n ];\n }", "title": "" }, { "docid": "0aee7d37fc46dc0d4348332a8da3cd6c", "score": "0.508664", "text": "public function __construct() {\n\n\t\t// handle granting Membership access\n\t\tadd_filter( 'wc_memberships_access_granting_purchased_product_id', array( $this, 'adjust_access_granting_product_id' ), 10, 3 );\n\t\tadd_filter( 'wc_memberships_new_membership_data', array( $this, 'adjust_new_membership_data' ), 10, 2 );\n\t\tadd_filter( 'wc_memberships_renew_membership', array( $this, 'renew_membership' ), 10, 3 );\n\t\tadd_action( 'wc_memberships_grant_membership_access_from_purchase', array( $this, 'save_subscription_data' ), 10, 2 );\n\t\tadd_filter( 'wc_memberships_grant_access_from_new_purchase', array( $this, 'maybe_grant_access_from_new_subscription' ), 10, 2 );\n\t\tadd_filter( 'wc_memberships_grant_access_from_existing_purchase', array( $this, 'maybe_grant_access_from_existing_subscription' ), 10, 2 );\n\t\tadd_filter( 'wc_memberships_grant_access_from_existing_purchase_order_statuses', array( $this, 'grant_access_from_active_subscription' ) );\n\n\t\t// adjust Memberships access dates\n\t\tadd_filter( 'wc_memberships_access_from_time', array( $this, 'adjust_post_access_from_time' ), 10, 3 );\n\t\tadd_filter( 'wc_memberships_plan_expiration_date', array( $this, 'adjust_plan_expiration_date' ), 10, 3 );\n\n\t\t// handle Membership expiration by cron event\n\t\tadd_filter( 'wc_memberships_expire_user_membership', array( $this, 'handle_membership_expiry_by_scheduled_event' ), 5, 2 );\n\n\t\t// handle Subscription switches\n\t\tadd_action( 'woocommerce_subscriptions_switched_item', array( $this, 'handle_subscription_switches' ), 10, 3 );\n\n\t\t// handle Membership status changes\n\t\tadd_action( 'wc_memberships_user_membership_status_changed', array( $this, 'handle_user_membership_status_change' ), 10, 3 );\n\n\t\t// filter Renew Membership URL\n\t\tadd_filter( 'wc_memberships_get_renew_membership_url', array( $this, 'renew_membership_url' ), 10, 2 );\n\n\t\t// handle free trials for Memberships\n\t\t$this->free_trial = wc_memberships()->load_class( '/includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-free-trial.php', 'WC_Memberships_Integration_Subscriptions_Free_Trial' );\n\n\t\t// handle discounts\n\t\t$this->discounts = wc_memberships()->load_class( '/includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-discounts.php', 'WC_Memberships_Integration_Subscriptions_Discounts' );\n\n\t\tif ( is_admin() ) {\n\t\t\t// admin methods and hooks\n\t\t\t$this->admin = wc_memberships()->load_class( '/includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-admin.php', 'WC_Memberships_Integration_Subscriptions_Admin' );\n\t\t} else {\n\t\t\t// frontend methods and hooks\n\t\t\t$this->frontend = wc_memberships()->load_class( '/includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-frontend.php', 'WC_Memberships_Integration_Subscriptions_Frontend' );\n\t\t}\n\n\t\t// handle ajax interactions between the two extensions\n\t\t$this->ajax = wc_memberships()->load_class( '/includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-ajax.php', 'WC_Memberships_Integration_Subscriptions_Ajax' );\n\n\t\t// extensions lifecycle (activation, deactivation, upgrade, etc.)\n\t\t$this->lifecycle = wc_memberships()->load_class( '/includes/integrations/subscriptions/class-wc-memberships-integration-subscriptions-lifecycle.php', 'WC_Memberships_Integration_Subscriptions_Lifecycle' );\n\t}", "title": "" }, { "docid": "53d0bfccb9ac4fac59b73e3e1594cf0c", "score": "0.5051437", "text": "function onPayplansPlanAfterSelection($planid)\n\t{\n\t\t$this->_pluginHandler->setDataInSession('REGISTRATION_PLAN_ID', $planid);\n\t}", "title": "" }, { "docid": "547989eb27961af5b943ad9db51ee95d", "score": "0.504214", "text": "public function createPlan()\n {\n }", "title": "" }, { "docid": "5aaf0d39a0bd8bdbab04de32c8b11359", "score": "0.50413406", "text": "public function singlePlanHandler(&$account_info)\n {\n // Return if the data already defined\n if (!$this->steps['plan']\n || $this->singlePlan\n || !in_array($this->step, array('category', 'plan'))) {\n return;\n }\n\n if ($this->planType == 'account') {\n $plan_table = 'membership_plans';\n $match_count = \"COUNT(*) AS `match_count`,\";\n $add_where = \"AND FIND_IN_SET('1', `Services`) > 0 \";\n } else {\n if ($this->category['ID']) {\n $add_select .= \"OR FIND_IN_SET('{$this->category['ID']}', `Category_ID`) > 0 \";\n }\n\n $plan_table = 'listing_plans';\n $match_count = \"SUM(IF(`Sticky` = '1' {$add_select}, 1, 0)) AS `match_count`,\";\n $add_where = \"AND `Type` != 'featured' \";\n }\n\n $sql = \"SELECT *, COUNT(*) AS `count`, {$match_count} SUM(IF(`Price` > 0, 0, 1)) AS `free` \";\n $sql .= \"FROM `\" . RL_DBPREFIX . $plan_table . \"` \";\n $sql .= \"WHERE `Status` = 'active' \";\n $sql .= $add_where;\n $sql .= \"AND (\n FIND_IN_SET('{$account_info['Type']}', `Allow_for`) > 0\n OR `Allow_for` = ''\n )\";\n\n $plan = $GLOBALS['rlDb']->getRow($sql);\n\n if (\n $plan['count'] == '1'\n && $plan['count'] == $plan['match_count']\n && $plan['free'] == 1\n ) {\n $this->singlePlan = true;\n $this->skipCheckout = true;\n $this->planID = $plan['ID'];\n $this->plans = array($plan['ID'] => $plan);\n\n unset($this->steps['plan']);\n }\n }", "title": "" }, { "docid": "444c2dc20bab2e81053c4db52accbacc", "score": "0.5009756", "text": "function et_ajax_sync_payment_plan(){\n\t$method = $_REQUEST['method'];\n\ttry {\n\t\tswitch ($method) {\n\t\t\tcase 'add':\n\t\t\t\t$args = $_REQUEST['content'];\n\t\t\t\t// insert\n\t\t\t\t$plan = et_insert_payment_plan($args['title'],number_format($args['price'], 2, '.', ''),$args['duration'],$args['featured'], $args['quantity']);\n\n\t\t\t\tif ( is_wp_error($plan) )\n\t\t\t\t\tthrow new Exception($plan->get_error_message());\n\n\t\t\t\t$html = \"<li class='item'> \n\t\t\t\t\t\t\t<span>{$args['title']}</span> \\${$args['price']} for {$args['duration']} days \n\t\t\t\t\t\t\t<div class='actions'> \n\t\t\t\t\t\t\t\t<a href='#' title='\" . __('Edit', ET_DOMAIN) . \"' class='icon act-edit' rel='{$plan->ID}' data-icon='y'></a> \n\t\t\t\t\t\t\t\t<a href='#' title='\" . __('Delete', ET_DOMAIN) . \"' class='icon act-del' rel='{$plan->ID}' data-icon='D'></a> \n\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t</li>\";\n\n\t\t\t\t$response = array(\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'code' => 200,\n\t\t\t\t\t'msg' => __('Payment Added!', ET_DOMAIN),\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'paymentPlan' => et_create_payment_plan_response($plan)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t// return \n\t\t\t\t$plans = et_refresh_payment_plans();\n\t\t\t\tbreak;\n\n\t\t\tcase 'delete': \n\t\t\t\t$args = $_REQUEST['content'];\n\t\t\t\t$result = et_delete_payment_plan($args['id']);\n\n\t\t\t\tif ( is_wp_error($result) ) throw new Exception(__(\"Can't delete payment plan\", ET_DOMAIN));\n\n\t\t\t\t$response = array(\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'code' => 200,\n\t\t\t\t\t'msg' => __('Payment plan has been deleted', ET_DOMAIN),\n\t\t\t\t\t'data' => array()\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\t$args = $_REQUEST['content'];\n\t\t\t\t$args['ID'] = $args['id'];\n\t\t\t\tif ( isset($args['title']) ){\n\t\t\t\t\t$args['post_title'] = $args['title'];\n\t\t\t\t\tunset($args['title']);\n\t\t\t\t}\n\n\t\t\t\t// update payment plan to database\n\t\t\t\t$args['price']\t=\tnumber_format($args['price'], 2, '.', '') ;\n\t\t\t\t$plan = et_update_payment_plan( $args );\n\n\t\t\t\t// create a response\n\t\t\t\t$response = array(\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'code' => 200,\n\t\t\t\t\t'msg' => __('Payment Saved!', ET_DOMAIN),\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'paymentPlan' => et_create_payment_plan_response($plan)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\tet_refresh_payment_plans();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tthrow new Exception( __('An error has been occurred', ET_DOMAIN) );\n\t\t\t\tbreak;\n\t\t}\n\t} catch (Exception $e) {\n\t\t$response = array(\n\t\t\t'success' => false,\n\t\t\t'code' => 400,\n\t\t\t'msg' => $e->getMessage(),\n\t\t\t'data' => array()\n\t\t);\n\t}\n\n\theader( 'HTTP/1.0 200 OK' );\n\theader( \"Content-Type: application/json\" ); \n\techo json_encode( $response );\n\texit;\n}", "title": "" }, { "docid": "792c4a40147b1ed7cacfd544bf02bca0", "score": "0.5005607", "text": "public function getPlan(){\n\t\tif ($this->_plan == null) {\n\t\t\t$this->_plan = Mage::getModel('customweb_subscription/plan')->fromSubscription($this);\n\t\t}\n\t\treturn $this->_plan;\n\t}", "title": "" }, { "docid": "54f56acbc104283530fc680e37ae691d", "score": "0.50013924", "text": "public function getPlan(){\n\t\tif ($this->isSubscription()) {\n\t\t\tif ($this->_plan == null) {\n\t\t\t\t$subscriptionInfos = $this->getSubscriptionInfos();\n\t\t\t\tif (!is_array($subscriptionInfos)) {\n\t\t\t\t\t$subscriptionInfos = unserialize($subscriptionInfos);\n\t\t\t\t}\n\t\t\t\t$this->_plan = Mage::getModel('customweb_subscription/plan')->fromArray($subscriptionInfos);\n\t\t\t}\n\t\t\treturn $this->_plan;\n\t\t}\n\t}", "title": "" }, { "docid": "30014d25a79b3827e397641c5d94bdda", "score": "0.49607536", "text": "public function testUpdateScheduledPlan()\n {\n }", "title": "" }, { "docid": "0daf4eea77e81b1d24b3b04b2e3af147", "score": "0.49585044", "text": "public function isMember()\n {\n return $this->subscribed(config('app.membership_name'), config('app.membership_plan'));\n }", "title": "" }, { "docid": "64b4f74f79c928681f3d05b525f92114", "score": "0.49279648", "text": "public function authorization_member()\n\t{\n\t}", "title": "" }, { "docid": "256d59c785de68ac8a5836055e5cd4f1", "score": "0.49274492", "text": "function __addMembers()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //prevent direct access\n if (!isset($_POST['submit'])) {\n $redirect = str_replace('add', 'view', uri_string());\n redirect($redirect);\n }\n\n //PERMISSIONS CHECK - GENERAL\n //Administrator only\n if ($this->data['vars']['my_group'] != 1) {\n redirect('/admin/error/permission-denied');\n }\n\n //flow control\n $next = true;\n\n //validate post data\n if ($next) {\n if (!$this->__flmFormValidation('add_member')) {\n //show error\n $this->notices('error', $this->form_processor->error_message);\n $next = false;\n }\n }\n\n //check if member is not already in list\n if ($next) {\n $result = $this->project_members_model->isMemberAssigned($this->project_id, $this->input->post('team_profile_id'));\n $this->data['debug'][] = $this->project_members_model->debug_data;\n if ($result) {\n //show error\n $this->notices('error', $this->data['lang']['lang_this_member_is_already_assigned_to_this_project'], 'noty');\n //halt\n $next = false;\n }\n }\n\n //add member to project\n if ($next) {\n $result = $this->project_members_model->addMember($this->project_id, $this->input->post('team_profile_id'));\n $this->data['debug'][] = $this->project_members_model->debug_data;\n if ($result) {\n //show success\n $this->notices('success', $this->data['lang']['lang_request_has_been_completed'], 'noty');\n } else {\n //show error\n $this->notices('error', $this->data['lang']['lang_request_could_not_be_completed'], 'noty');\n }\n }\n\n //load members list\n $this->__viewMembers();\n\n }", "title": "" }, { "docid": "1272e1a88675c97fe0491acafe4b2395", "score": "0.4908442", "text": "private function maybe_set_installment_plan() {\n\n\t\t$plan = $this->get_plan();\n\n\t\t// sanity check\n\t\tif ( ! $plan ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$plan = new WC_Memberships_Integration_Subscriptions_Membership_Plan( $plan->post );\n\n\t\t// If this plan has a subscription and the subscription is in installment mode,\n\t\t// save this condition in a post meta which will persist also after unlinking.\n\t\tif ( $this->has_subscription() && $plan->has_installment_plan() ) {\n\n\t\t\treturn (bool) update_post_meta( $this->id, $this->installment_plan_meta, $this->get_subscription_id() );\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7f501f32dc175fe0d5a2f01dad92609d", "score": "0.4878585", "text": "public function __construct() {\n\n\t\t// determine user membership start date by plan start date\n\t\tadd_action( 'wp_ajax_wc_memberships_get_membership_plan_start_date', array( $this, 'get_membership_start_date' ) );\n\t\t// determine user membership expiration date by plan end date\n\t\tadd_action( 'wp_ajax_wc_memberships_get_membership_plan_end_date', array( $this, 'get_membership_expiration_date' ) );\n\n\t\t// user membership notes\n\t\tadd_action( 'wp_ajax_wc_memberships_add_user_membership_note', array( $this, 'add_user_membership_note' ) );\n\t\tadd_action( 'wp_ajax_wc_memberships_delete_user_membership_note', array( $this, 'delete_user_membership_note' ) );\n\n\t\t// create a user to be added as member, when adding or transferring a user membership\n\t\tadd_action( 'wp_ajax_wc_memberships_create_user_for_membership', array( $this, 'create_user_for_membership' ) );\n\t\t// transfer a membership from a user to another\n\t\tadd_action( 'wp_ajax_wc_memberships_transfer_user_membership', array( $this, 'transfer_user_membership' ) );\n\n\t\t// enhanced select\n\t\tadd_action( 'wp_ajax_wc_memberships_json_search_posts', array( $this, 'json_search_posts' ) );\n\t\tadd_action( 'wp_ajax_wc_memberships_json_search_terms', array( $this, 'json_search_terms' ) );\n\n\t\t// filter out grouped products from WC JSON search results\n\t\tadd_filter( 'woocommerce_json_search_found_products', array( $this, 'filter_json_search_found_products' ) );\n\t}", "title": "" }, { "docid": "c5fd148f065541d08a0febffb07b5526", "score": "0.48592812", "text": "public function handle($team, $plan);", "title": "" }, { "docid": "e6fd7120691167bd0353c59124af9ba5", "score": "0.48580536", "text": "public function addMembership(){\n $sql = \"INSERT INTO membership(name, price, timeQuota, openDays, openHours, closeHours, description, duration) VALUES(:n, :p, :timeq, :od, :oh, :ch, :descr, :dur)\";\n $req = $GLOBALS[\"conn\"]->prepare($sql);\n $req->execute(array(\n \"n\" => $this->name,\n \"p\" => $this->price,\n \"timeq\" => $this->time_quota,\n \"od\" => $this->open_days,\n \"oh\" => $this->open_hours,\n \"ch\" => $this->close_hours,\n \"decr\" => $this->description,\n \"dur\" => $this->duration,\n ));\n }", "title": "" }, { "docid": "d46f4ea516f178ba6ae2e033377085ac", "score": "0.48291242", "text": "abstract public function get_subscription_from_membership( $user_membership );", "title": "" }, { "docid": "9c0b6f12635d50ebf11f9a4847840dcd", "score": "0.48244038", "text": "public static function getMembershipById($id){\n $sql = \"SELECT * FROM membership WHERE id = ?\";\n $req = $GLOBALS[\"conn\"]->prepare($sql);\n $req->execute([$id]);\n\n if ($row = $req->fetch()) {\n return new Membership($row[\"id\"], $row[\"id_plan\"], $row[\"name\"], $row[\"price\"], $row[\"timeQuota\"],\n $row[\"openDays\"], $row[\"openHours\"], $row[\"closeHours\"], $row[\"description\"], $row[\"duration\"]);\n }else {\n return NULL;\n }\n }", "title": "" }, { "docid": "974ec3a94095e2f7f477acf77fc9f590", "score": "0.48090887", "text": "public function handle()\n {\n //TODO: [ML] Revoke membership and send email\n }", "title": "" }, { "docid": "baff720fcc160f7b69d3232b0bec406d", "score": "0.4807074", "text": "public function manage()\n {\n /* Create the table */\n $table = new \\IPS\\Helpers\\Table\\Db( 'core_members', \\IPS\\Http\\Url::internal( 'app=core&module=modcp&tab=members&area=chat_banned' ), 'chat_banned=1' );\n $table->rowsTemplate = array( \\IPS\\Theme::i()->getTemplate( 'modcp', 'core', 'front' ), 'memberManagementRow' );\n\n $table->langPrefix = 'members_';\n\n /* Columns we need */\n $table->include = array( 'member_id', 'name', 'email', 'joined', 'member_group_id', 'photo' );\n $table->mainColumn = 'name';\n\n /* Custom parsers */\n $table->parsers = array(\n 'joined'\t\t\t=> function( $val, $row )\n {\n return \\IPS\\DateTime::ts( $val )->localeDate();\n },\n 'member_group_id'\t=> function( $val, $row )\n {\n return \\IPS\\Member\\Group::load( $val )->formattedName;\n },\n 'photo' => function( $val, $row )\n {\n return \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->userPhoto( \\IPS\\Member::constructFromData( $row ), 'mini' );\n },\n );\n\n /* Individual member actions */\n $table->rowButtons = function( $row )\n {\n $member = \\IPS\\Member::constructFromData( $row );\n\n $return = array();\n\n $return['edit'] = array(\n 'icon'\t\t=> 'pencil',\n 'title'\t\t=> 'edit',\n 'link'\t\t=> \\IPS\\Http\\Url::internal( 'app=core&module=members&controller=profile&do=edit&id=' . $member->member_id, 'front', 'edit_profile', $member->members_seo_name )\n );\n\n $return['warn'] = array(\n 'icon'\t\t=> '',\n 'title'\t\t=> 'modcp_view_warnings',\n 'link'\t\t=> \\IPS\\Http\\Url::internal( 'app=core&module=system&controller=warnings&id=' . $member->member_id, 'front', 'warn_list', $member->members_seo_name )\n );\n\n $return['contact'] = array(\n 'icon'\t\t=> 'envelope',\n 'title'\t\t=> 'message',\n 'link'\t\t=> \\IPS\\Http\\Url::internal( 'app=core&module=messaging&controller=messenger&do=compose&to=' . $member->member_id, 'front', 'messenger_compose', $member->members_seo_name )\n );\n\n return $return;\n };\n\n /* Default sort options */\n $table->sortBy = $table->sortBy ?: 'joined';\n $table->sortDirection = $table->sortDirection ?: 'desc';\n\n return (string) $table;\n }", "title": "" }, { "docid": "bcde03c6a6dcfaf8f55624b99c8ac4b5", "score": "0.48054832", "text": "public static function authPoint2($plan)\r\n\t{\r\n\t\tif (($plan == 'premium') || ($plan == 'standard'))\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": "f42811ef50efd394290dad2082b0728e", "score": "0.47711045", "text": "public function membershipPlan()\n {\n return $this->belongsToMany('App\\MembershipPlan','businesses_plans')->withTimestamps();\n }", "title": "" }, { "docid": "cf76edade2bd0791d68bf448b85ea44a", "score": "0.47503793", "text": "public function setPlanId($plan_id) {\n\t\tif ($this->plan_id || !$plan_id) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$id = strtolower($plan_id);\n\t\t$id = preg_replace('/[^\\p{L}\\p{Nd}]+/', '_', $id);\n\n\t\t$guid = (int) $this->guid;\n\n\t\t$is_valid = elgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DISABLED_ENTITIES, function () use ($guid, $id) {\n\t\t\t$count = elgg_get_entities([\n\t\t\t\t'types' => 'object',\n\t\t\t\t'subtypes' => SubscriptionPlan::SUBTYPE,\n\t\t\t\t'count' => true,\n\t\t\t\t'wheres' => function (QueryBuilder $qb) use ($guid, $id) {\n\t\t\t\t\t$qb->joinMetadataTable('e', 'guid', 'plan_id', 'inner', 'plan_id');\n\n\t\t\t\t\treturn $qb->merge([\n\t\t\t\t\t\t$qb->compare('e.guid', '!=', $guid, ELGG_VALUE_INTEGER),\n\t\t\t\t\t\t$qb->compare('plan_id.value', '=', $id, ELGG_VALUE_STRING),\n\t\t\t\t\t]);\n\t\t\t\t},\n\t\t\t]);\n\n\t\t\treturn !$count;\n\t\t});\n\n\t\tif (!$is_valid) {\n\t\t\t$id .= '_' . rand(1000, 9999);\n\t\t\t$this->setPlanId($id);\n\t\t}\n\n\t\t$this->plan_id = $id;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "446a74a428f46c3d145a537ed1fe5319", "score": "0.47437602", "text": "function getGroupMembership($principal);", "title": "" }, { "docid": "7809ddc100b8aa75386b4ccfcd013bc2", "score": "0.47348472", "text": "function admin_manage($member_id)\n\t{\n\t\t# marketing content should be only when can still enable.\n\t\t# Marketing page to display what about, when (probably) start, etc.\n\n\t\t# ONLY FOR MODELS.\n\t\t#$member_id = $this->Session->read(\"Auth.Member.member_id\");\n\t\t$this->set(\"member_id\", $member_id);\n\n\t\t$member = $this->Member->read(null, $member_id);\n\n\t\t$member_type = $member['Member']['member_type'];\n\t\tif ($member_type != 'model')\n\t\t{\n\t\t\t$this->Session->setFlash(\"We're sorry, Featured Members is only available for 'model' members.\");\n\t\t\t$this->redirect(\"/admin/members/view/$member_id\");\n\t\t}\n\n\t\t$featured_price = $this->appconfig['featured_price'];\n\t\t$featured_days = $this->appconfig['featured_days'];\n\n\t\t$this->set(\"featured_price\", $featured_price);\n\t\t$this->set(\"featured_days\", $featured_days);\n\n\t\t# Check to see if they have an EXISTING 'feature' to manage (cancel)\n\t\t# IF ANY, provide status (Active, Pending, Expired) -- tho limit to most recent record.\n\t\t# Perhaps provide a full list of all records? but only let sign up for another if NO active/pending\n\n\t\t$has_existing = false;\n\n\t\t$existing_featured = $this->MemberFeaturedModel->findAll(\"MemberFeaturedModel.member_id = '$member_id'\");\n\n\t\t$now = time();\n\n\t\terror_log(\"EXISTING=\".print_r($existing_featured,true));\n\n\t\tif (isset($existing_featured) && count($existing_featured))\n\t\t{\n\t\t\tforeach ($existing_featured as $existing_featured_entry)\n\t\t\t{\n\t\t\t\t$start_date = $existing_featured_entry['MemberFeaturedModel']['start_date'];\n\t\t\t\t$end_date = $existing_featured_entry['MemberFeaturedModel']['end_date'];\n\t\n\t\t\t\t$start_time = strtotime($start_date);\n\t\t\t\t$end_time = strtotime($end_date);\n\t\n\t\t\t\t$start_time = strtotime($existing_featured_entry['MemberFeaturedModel']['start_date']);\n\t\t\t\t$end_time = strtotime($existing_featured_entry['MemberFeaturedModel']['end_date']);\n\t\n\t\t\t\tif ($end_time > $now) \n\t\t\t\t{ \n\t\t\t\t\t$has_existing = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set(\"existing_featured_list\", $existing_featured);\n\n\t\tif ($has_existing) # Active or pending, don't allow more signups.\n\t\t{\n\t\t\t$this->set(\"enable_signup\",false);\n\t\t} else { # No active/pending, can sign up for further ones...\n\t\t\t# Now calculate the dates where they're going to be listed.\n\t\t\tlist($start_date, $end_date) = $this->get_featured_dates();\n\t\t\t$this->set(\"start_date\", $start_date);\n\t\t\t$this->set(\"end_date\", $end_date);\n\t\t\t$this->set(\"enable_signup\",true);\n\t\t}\n\t}", "title": "" }, { "docid": "15161235c660fd5b57ac119915a36a1b", "score": "0.47345075", "text": "public function __construct(SubscriptionPlan $plan)\n {\n $this->plan = $plan;\n }", "title": "" }, { "docid": "637fc1ffaea7dc2601c47690735996c2", "score": "0.47296777", "text": "public function invite() {\n }", "title": "" }, { "docid": "dbea420dd56fe48ca9a5815bb67be3a8", "score": "0.47244868", "text": "function collectorsetmember($gp) {\n\n global $db_server;\n\n if ($gp['object'] !== \"collectorsetmember\") {\n add_error_message(\"DAFE0001: collectorsetmember: internal error - bad object - \" . $gp['object']);\n $gp['action'] = 'show'; $gp['ID'] = NULL; $gp['object'] = \"collectorsetmember\";\n }\n \n if ($gp['action'] === \"show\") {\n\n show_table(\"collectorsetmember\", \"Collector Set Members\");\n \n } else {\n \n report_bad_parms(\"collectorsetmember\");\n \n }\n \n}", "title": "" }, { "docid": "9dc585bfe8499bd12a798d9ba12e07ee", "score": "0.47083035", "text": "public function get_plan() {\n\t\treturn parent::get_plan();\n\t}", "title": "" }, { "docid": "4cbfe7db30bc4a8d1521525d9b786aaa", "score": "0.46717042", "text": "public function plan()\n {\n return $this->belongsTo(LocalBillingPlan::class, 'id');\n }", "title": "" }, { "docid": "0f96dc6370b8dafd7d9190f805b922e6", "score": "0.467137", "text": "public static function editActionListener() {\r\n\t\t\r\n\t\telgg_register_event_handler('update:after', 'group', '\\ColdTrick\\GroupTools\\Group::acceptMembershipRequests');\r\n\t}", "title": "" }, { "docid": "5bdcf40542440a4785c8cd47d4dd0358", "score": "0.466143", "text": "public function has_membership_plan_subscription( $plan_id ) {\n\n\t\tif ( ! isset( $this->_has_membership_plan_subscription[ $plan_id ] ) ) {\n\n\t\t\t$plan = wc_memberships_get_membership_plan( $plan_id );\n\n\t\t\t// sanity check\n\t\t\tif ( ! $plan ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$product_ids = $plan->get_product_ids();\n\t\t\t$product_ids = ! empty( $product_ids ) ? array_map( 'absint', $product_ids ) : null;\n\n\t\t\t$this->_has_membership_plan_subscription[ $plan_id ] = false;\n\n\t\t\tif ( ! empty( $product_ids ) ) {\n\n\t\t\t\tforeach ( $product_ids as $product_id ) {\n\n\t\t\t\t\tif ( ! is_numeric( $product_id ) || ! $product_id ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$product = wc_get_product( $product_id );\n\n\t\t\t\t\tif ( ! $product ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $product->is_type( array( 'subscription', 'subscription_variation', 'variable-subscription' ) ) ) {\n\t\t\t\t\t\t$this->_has_membership_plan_subscription[ $plan_id ] = true;\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 $this->_has_membership_plan_subscription[ $plan_id ];\n\t}", "title": "" }, { "docid": "19a1b9131a185905bea034fd4651d9fc", "score": "0.4659087", "text": "public function authorize()\n {\n return true; //change this to false the moment membership is ready\n }", "title": "" }, { "docid": "c0ad63bba8b8105da495a8a2eab9c272", "score": "0.46567896", "text": "public function remoteChangeInstancePlan($planId, $snapShotName)\n {\n // if (false === get_option('wpm2aws-lightsail-instance-details')) {\n // return array('error' => 'Invalid Request Parameters (1)', 'code' => '401');\n // }\n\n if (false === get_option('wpm2aws-iampw')) {\n return array('error' => 'Invalid Request Parameters (2)', 'code' => '401');\n }\n\n if (false === get_option('wpm2aws-iamid')) {\n return array('error' => 'Invalid Request Parameters (3)', 'code' => '401');\n }\n\n if (empty($_SERVER['SERVER_ADDR'])) {\n return array('error' => 'Invalid Request Parameters (4)', 'code' => '401');\n }\n \n if (empty($planId)) {\n return array('error' => 'Invalid Request Parameters (5)', 'code' => '401');\n }\n\n if (empty($snapShotName)) {\n return array('error' => 'Invalid Request Parameters (5)', 'code' => '401');\n }\n \n $key = get_option('wpm2aws-iamid');\n $secret = get_option('wpm2aws-iampw');\n\n if (\n false !== get_option('wpm2aws_valid_licence_type') &&\n 'TRIAL' === strtoupper(get_option('wpm2aws_valid_licence_type'))\n ) {\n $key = str_replace(get_option('wpm2aws_valid_licence_dyck'), '', base64_decode(get_option('wpm2aws-iamid')));\n $secret = str_replace(get_option('wpm2aws_valid_licence_dyck'), '', base64_decode(get_option('wpm2aws-iampw')));\n }\n\n $requestData = array(\n 'wpm2aws-key' => $key,\n 'wpm2aws-token' => $secret,\n 'wpm2aws-user-email' => get_option('wpm2aws_licence_email'),\n // 'wpm2aws-instancearn' => get_option('wpm2aws-lightsail-instance-details')['details']['arn'],\n 'wpm2aws-instancename' => get_option('wpm2aws-aws-lightsail-name'),\n 'wpm2aws-instance-region' => get_option('wpm2aws-aws-lightsail-region'),\n 'wpm2aws-serveraddress' => (!empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : ''),\n 'wpm2aws-blundleplanid' => $planId,\n 'wpm2aws-snapshotname' => $snapShotName,\n\n 'wpm2aws-licence-key' => (false !== get_option('wpm2aws_licence_key') ? get_option('wpm2aws_licence_key') : ''),\n 'wpm2aws-licence-email' => (false !== get_option('wpm2aws_licence_email') ? get_option('wpm2aws_licence_email') : ''),\n 'wpm2aws-licence-site' => (!empty(get_site_url()) ? get_site_url() : ''),\n );\n\n // wp_die(print_r($instanceDetails));\n // $response = wp_remote_post( 'http://localhost/wpm2aws-console-api/public/api/console/changePlan', array(\n $response = wp_remote_post(\n 'http://52.213.129.222/api/console/changePlan',\n array(\n\n 'method' => 'POST',\n 'timeout' => 45,\n 'redirection' => 10,\n 'httpversion' => '1.0',\n 'blocking' => true,\n 'headers' => array(\n 'Cache-Control' => 'no-cache',\n ),\n 'body' => array( 'data' => $requestData ),\n 'cookies' => array(),\n )\n );\n\n $responseCode = wp_remote_retrieve_response_code($response);\n // wp_die(print_r($response));\n if ('200' !== $responseCode && 200 !== $responseCode) {\n $errorMessage = json_decode($response['body'], true);\n if ((int)$responseCode >= 400 && (int)$responseCode < 500) {\n // wp_die(print_r($errorMessage));\n throw new Exception('Unauthorised Access<br>' . $errorMessage);\n return array('error' => 'Unauthorised Access<br>' . $errorMessage, 'code' => $responseCode);\n } else {\n // wp_die(print_r($errorMessage));\n throw new Exception('Unauthorised Access<br>' . $errorMessage);\n return array('error' => 'An Error Has Occurred<br>' . $errorMessage, 'code' => $responseCode);\n }\n }\n\n if (!isset($response['body'])) {\n return $data = array();\n }\n\n // wp_die(print_r($response));\n $remoteData = json_decode($response['body'], true);\n\n\n if (!isset($remoteData['remote-data'])) {\n return $data = array();\n }\n \n return $remoteData['remote-data'];\n }", "title": "" }, { "docid": "46d8197096a40960ed04fc469437fe28", "score": "0.4653743", "text": "public function __construct(TerritoryWarPlan $plan, $member)\n {\n $this->plan = $plan;\n $this->member = $member;\n }", "title": "" }, { "docid": "d97ccea8fbecf358b7d17255c4387ba7", "score": "0.46308905", "text": "public static function getMembershipByStripeId($id){\n $sql = \"SELECT * FROM membership WHERE id_plan = ?\";\n $req = $GLOBALS[\"conn\"]->prepare($sql);\n $req->execute([$id]);\n\n if ($row = $req->fetch()) {\n return new Membership($row[\"id\"], $row[\"id_plan\"], $row[\"name\"], $row[\"price\"], $row[\"timeQuota\"],\n $row[\"openDays\"], $row[\"openHours\"], $row[\"closeHours\"], $row[\"description\"], $row[\"duration\"]);\n }else {\n return NULL;\n }\n }", "title": "" }, { "docid": "4796ab54276195210165d03f517b8187", "score": "0.46256816", "text": "function __editMembers()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //PERMISSIONS CHECK - GENERAL\n //Administrator only\n if ($this->data['vars']['my_group'] != 1) {\n redirect('/admin/error/permission-denied');\n }\n\n //prevent direct access\n if (!isset($_POST['submit'])) {\n $redirect = str_replace('edit', 'view', uri_string());\n redirect($redirect);\n }\n\n //flow control\n $next = true;\n\n //validate post data\n if ($next) {\n if (!$this->__flmFormValidation('edit_member_hidden')) {\n //show error\n $this->notices('error', $this->data['lang']['lang_request_could_not_be_completed'], 'noty');\n\n //log this error\n log_message('error', '[FILE: ' . __file__ . '] [FUNCTION: ' . __function__ . '] [LINE: ' . __line__ . \"] [MESSAGE: Editing project leader failed: Required hidden form field missing or invalid]\");\n\n //halt\n $next = false;\n }\n }\n\n //make leader\n if ($next) {\n $result = $this->project_members_model->updateProjectLead($this->project_id, $this->input->post('project_members_team_id'));\n $this->data['debug'][] = $this->project_members_model->debug_data;\n if ($result) {\n //show success\n $this->notices('success', $this->data['lang']['lang_request_has_been_completed'], 'noty');\n } else {\n //show error\n $this->notices('error', $this->data['lang']['lang_request_could_not_be_completed'], 'noty');\n }\n }\n\n //load members list\n $this->__viewMembers();\n\n }", "title": "" }, { "docid": "a755abe4f2a2320c4b0424528170d1c6", "score": "0.461896", "text": "public function inviteMembers() {\n foreach ($this->getInvites() as $user) {\n $this->space->inviteMember($user->id, Yii::$app->user->id);\n }\n }", "title": "" }, { "docid": "f631b397cb94dbfaff265a2c5911fc6f", "score": "0.46117973", "text": "function plan_meal()\n\t\t{\n\t\t\tif (isset($this->session->userdata('user')->email_address))\n\t\t\t{\n\t\t\t\t$data['plans'] = $this->get_all_plans();\n\t\t\t\t$data['main_content'] = 'plan_meal';\n\t\t\t\t$this->load->view('templates/template', $data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['main_content'] = 'sign_in';\n\t\t\t\t$this->load->view('templates/template', $data);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9928056189cf5ab047c6d814dbaafbd7", "score": "0.45789695", "text": "public function fallbackPlan($sub)\n\t{\n\t\t$plan = JTable::getInstance('Plans', 'Table');\n\t\t$newPlan = JTable::getInstance('Plans', 'Table');\n\t\t$plan->load((int)$sub->plan);\n\t\t$this->log('fabrik.ipn. fallback', ' getting fallback sub plan : ' . (int)$sub->plan .' = ' . (int)$plan->fall_back_plan);\n\t\t$fallback = false;\n\t\tif ($plan->fall_back_plan != 0) {\n\t\t\t$fallback = true;\n\t\t\t$newPlan->load((int)$plan->fall_back_plan);\n\t\t\t$gid = (int)$newPlan->usergroup;\n\t\t\tif ($gid <18) {\n\t\t\t\t$gid = 18;\n\t\t\t}\n\t\t} else {\n\t\t\t$gid = 18;\n\t\t}\n\t\t$subUser = JFactory::getUser($sub->userid);\n\t\t$subUser->gid = $gid;\n\t\t$this->log('fabrik.ipn. fallback', $subUser->get('id') .' gid set to ' . $gid);\n\t\t$subUser->save();\n\n\t\tif ($fallback) {\n\t\t\t//create new subscription for fall back plan\n\n\t\t\t//get the expration date (length of new plan - that of previous plan)\n\t\t\t$newLength = $this->charToPeriod($newPlan->period_unit);\n\t\t\t$oldLength = $this->charToPeriod($plan->period_unit);\n\t\t\t$expDate = strtotime(\"+{$newPlan->duration} $newLength\t\");\n\n\t\t\t$minus = strtotime(\"-{$plan->duration} $oldLength\");\n\n\t\t\t$this->log('fabrik.ipn. fallback', 'expiration date = strtotime(+'.$newPlan->duration.' '.$newLength.\")\\n minus = strtotime(-\" .$plan->duration.' '.$oldLength.\") \\n =: $expDate - $minus\"\t);\n\t\t\t$expDate = JFactory::getDate()->toUnix() - ( $expDate - $minus);\n\n\t\t\t$sub = JTable::getInstance('Subscriptions', 'Table');\n\t\t\t$sub->userid = $subUser->get('id');\n\t\t\t$sub->type = 1; //paypal payment - no recurring\n\t\t\t$sub->status = 'Active';\n\t\t\t$sub->signup_date = JFactory::getDate()->toMySQL();\n\t\t\t$sub->plan = $newPlan->id;\n\t\t\t$sub->recurring = 0;\n\t\t\t$sub->lifetime = 0;\n\t\t\t$sub->expiration = JFactory::getDate($expDate)->toMySQL();\n\t\t\t$this->log('fabrik.ipn. fallback', 'new sub expiration set to ' . $sub->expiration);\n\t\t\t$sub->store();\n\t\t\t$msg = \"<h3>new sub expiration set to $sub->expiration</h3>\";\n\t\t\tforeach ($sub as $k=>$v) {\n\t\t\t\t$msg .= \"$k = $v <br>\";\n\t\t\t}\n\t\t\tJUtility::sendMail('[email protected]', 'fabrikar subs', '[email protected]', 'fabrikar sub: fall back plan created', $msg, true);\n\t\t}\n\t}", "title": "" }, { "docid": "e8916f50985ee52a631e83f7a1571b74", "score": "0.45781577", "text": "public static function unapprove_plan($planorid) {\n static::require_enabled();\n $plan = $planorid;\n if (!is_object($plan)) {\n $plan = new plan($plan);\n }\n\n // We need to be able to view the plan at least.\n if (!$plan->can_read()) {\n throw new required_capability_exception($plan->get_context(), 'moodle/competency:planview', 'nopermissions', '');\n }\n\n if ($plan->is_based_on_template()) {\n throw new coding_exception('Template plans are always approved.'); // This should never happen.\n } else if ($plan->get('status') != plan::STATUS_ACTIVE) {\n throw new coding_exception('The plan cannot be sent back to draft at this stage.');\n } else if (!$plan->can_review()) {\n throw new required_capability_exception($plan->get_context(), 'moodle/competency:planmanage', 'nopermissions', '');\n }\n\n $plan->set('status', plan::STATUS_DRAFT);\n $result = $plan->update();\n\n // Trigger unapproved event.\n \\core\\event\\competency_plan_unapproved::create_from_plan($plan)->trigger();\n\n return $result;\n }", "title": "" }, { "docid": "20be487430e2dbf8819c080300d6db02", "score": "0.45730528", "text": "function add_logans_club_member_role_on_plugin_activation() {\n add_role( 'logans_club_member', 'Logans Club Member', array( 'read' => true, 'level_0' => true ) );\n\t //Check to see if the discounts are active\n\t}", "title": "" }, { "docid": "c6954b59747efd597c5acc3ed517de7d", "score": "0.45706758", "text": "public function testCreateScheduledPlan()\n {\n }", "title": "" }, { "docid": "0eed6eef5988ba568e99f30ef0c0b648", "score": "0.45681706", "text": "function ciniki_tenants_planUpdate($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 'plan_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Plan'), \n 'name'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Name'), \n 'flags'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Flags'), \n 'sequence'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Sequence'), \n 'monthly'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Monthly Price'),\n 'yearly'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Yearly Price'),\n 'modules'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Modules'),\n 'trial_days'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Number of Trial Days'),\n 'description'=>array('required'=>'no', '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', 'tenants', 'private', 'checkAccess');\n $rc = ciniki_tenants_checkAccess($ciniki, $args['tnid'], 'ciniki.tenants.planUpdate'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n // \n // Turn off autocommit\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.tenants');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Start building the update SQL\n //\n $strsql = \"UPDATE ciniki_tenant_plans SET last_updated = UTC_TIMESTAMP()\";\n\n //\n // Add all the fields to the change log\n //\n $changelog_fields = array(\n 'name',\n 'flags',\n 'sequence',\n 'monthly',\n 'yearly',\n 'modules',\n 'trial_days',\n 'description',\n );\n foreach($changelog_fields as $field) {\n if( isset($args[$field]) ) {\n $strsql .= \", $field = '\" . ciniki_core_dbQuote($ciniki, $args[$field]) . \"' \";\n $rc = ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.tenants', 'ciniki_tenant_history', $args['tnid'], \n 2, 'ciniki_tenant_plans', $args['plan_id'], $field, $args[$field]);\n }\n }\n $strsql .= \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $args['plan_id']) . \"' \";\n $rc = ciniki_core_dbUpdate($ciniki, $strsql, 'ciniki.tenants');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.tenants');\n return $rc;\n }\n if( !isset($rc['num_affected_rows']) || $rc['num_affected_rows'] != 1 ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.tenants');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.tenants.58', 'msg'=>'Unable to update plan'));\n }\n\n //\n // Commit the database changes\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.tenants');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "07857941e42492728274bbf700e4e6f0", "score": "0.45576197", "text": "public function getPlans()\n {\n return Controllers\\PlansController::getInstance();\n }", "title": "" }, { "docid": "217c057b42273a6df25246c93247bf47", "score": "0.4555122", "text": "public function addnewplan() {\n //ensure admin is loggedin\n $admin = $this->Admins->find('all')->where(['user_id' => $this->Auth->user('id')])->first();\n if (!$admin) {\n $this->Flash->error('Please login to continue.');\n return $this->redirect(['controller' => 'Users', 'action' => 'login']);\n }\n $this->set('admin', $admin);\n $plans_table = TableRegistry::get('Plans');\n $plan = $plans_table->newEntity();\n if ($this->request->is('post')) {\n $plan = $plans_table->patchEntity($plan, $this->request->getData());\n $plan->admin_id = $admin->id;\n if ($plans_table->save($plan)) {\n $this->Flash->success(__('The plan has been created.'));\n\n return $this->redirect(['action' => 'viewplans']);\n }\n $this->Flash->error(__('The plan could not be created. Please, try again.'));\n }\n $this->set(compact('plan'));\n $this->set('_serialize', ['plan']);\n $this->viewBuilder()->layout('adminbackend');\n }", "title": "" }, { "docid": "b68a97fa616f3b7cfb96e25667ed566e", "score": "0.4551096", "text": "function wicket_is_member(){\n static $has_membership = null;\n if(is_null($has_membership)) {\n $person = wicket_current_person();\n $roles = $person->role_names;\n $has_membership = in_array('member', $roles);\n }\n return $has_membership;\n}", "title": "" }, { "docid": "940bf8d71b2553bf53caee88df5c8b2f", "score": "0.4548922", "text": "function check_membership($userid){\r\n return true;\r\n}", "title": "" }, { "docid": "b4a93e283e903896c0f08577808a409b", "score": "0.45454085", "text": "public function getPendingPlan()\n {\n return $this->respondWithSuccess(getUser()->getPendingPlan());\n }", "title": "" }, { "docid": "fbc484df60fc3395f608b8f105fdccbf", "score": "0.45276728", "text": "function activate_ssteammember() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-ssteammember-activator.php';\n\tSSTeamMemberActivator::activate();\n}", "title": "" }, { "docid": "ae364d59c443b625842fc10369d7318c", "score": "0.4527403", "text": "public function setPlan($plan)\n {\n $this->plan = $plan;\n\n return $this;\n }", "title": "" }, { "docid": "56f055a2cef9e998de8777e85d4e9fd2", "score": "0.45119604", "text": "function GetSubscriptionPlanName($plan_id) {\n global $CI;\n $plan_info = $CI->db->get_where('tb_member_plans', array(\"plan_id\" => $plan_id))->row_array();\n return ($plan_info['plan_name']) ? $plan_info['plan_name'] : 'Free Trial';\n}", "title": "" }, { "docid": "baab3cf07e1840a6f15c12f80c898b62", "score": "0.451163", "text": "public function apply_membership_on_user_registration( $user_id ) {\n $plan_ids = get_option( 'yith-wcmbs-memberships-on-user-register', false );\n\n $apply = apply_filters( 'yith_wcmbs_apply_membership_on_user_register', true );\n\n if ( $apply && $plan_ids && is_array( $plan_ids ) ) {\n $plan_ids = array_map( 'absint', $plan_ids );\n $member = YITH_WCMBS_Members()->get_member( $user_id );\n\n foreach ( $plan_ids as $plan_id ) {\n $member->create_membership( $plan_id );\n }\n }\n }", "title": "" }, { "docid": "4dcaa03ab9b45d6ff33de156dc9bf6ce", "score": "0.45083576", "text": "public function upgrade($plan)\n {\n switch($plan){\n case 3:\n $this->three_months = true;\n break;\n case 6:\n $this->six_months = true;\n break;\n case 12:\n $this->twelve_months = true;\n break;\n }\n $this->save();\n return;\n }", "title": "" }, { "docid": "70e7e9084717daa361f79591ab09c2e1", "score": "0.4501853", "text": "function set_membership_option(): void {\n\tupdate_option( 'users_can_register', 0 );\n\tupdate_option( 'default_role', 'subscriber' );\n}", "title": "" }, { "docid": "9db8db349a17b8bb2d605363c5c80f36", "score": "0.44974083", "text": "function wp_membership_menu() {\n\tadd_options_page( 'WP Membership options', 'WP Membership', 'manage_options', 'members-admin','wp_membership_options' );\n}", "title": "" }, { "docid": "ea1286885307388aae278128086ad7f8", "score": "0.44954377", "text": "public function approve( $project, $member );", "title": "" }, { "docid": "f6bfcace8078364e9137d5fdfff582bd", "score": "0.44858086", "text": "public function plan()\n {\n\t\t\treturn $this->belongsTo('Gutropolis\\Plans','plan_id');\n \n }", "title": "" }, { "docid": "511731372d8ca83421845c17054b517b", "score": "0.4484097", "text": "public function currentSubscription()\n {\n return function ($product_id = null, $plan_id = null) {\n $subscriptions = [];\n\n if (!is_null($product_id)) {\n $subscriptions = $this->getSubscriptionsByProduct($product_id);\n } elseif (!is_null($plan_id)) {\n $subscriptions = $this->getSubscriptionsByPlan($plan_id);\n }else{\n $subscriptions = $this->subscriptions;\n }\n\n foreach ($subscriptions as $subscription) {\n if ($subscription->valid()) {\n return $subscription;\n }\n }\n\n return null;\n };\n }", "title": "" }, { "docid": "4c51d773309f3133bb8bff783b915f74", "score": "0.44797295", "text": "function addPlanPromo($idplan){\n $_SESSION[\"fbconexion\"][\"idplan\"]=$idplan;\n $_SESSION[\"fbconexion\"][\"realplan\"]=$idplan;\n }", "title": "" }, { "docid": "95f3254d00acdba1538a3a6f6d287416", "score": "0.44784355", "text": "public function plan($amount);", "title": "" }, { "docid": "942731ee15c062037c3efc6c0c2b2e1f", "score": "0.4473096", "text": "public function members_online()\n {\n }", "title": "" }, { "docid": "2fc91f0e8da8352127e384bddbb9b08d", "score": "0.44727015", "text": "public function userHasRequestedToJoin()\n {\n $this->member->requestToJoin($this->team_id);\n }", "title": "" }, { "docid": "6041da54daf852059dc1f7b6868a52ca", "score": "0.44708502", "text": "function createPlanWithProductID($data = NULL) {\n\t\tif($data) {\n\t\t\t$plan = \\Stripe\\Plan::create([\n\t\t\t\t'product' => $data['product_id'],\n\t\t\t\t'nickname' => $data['plan_nickname'], // A brief description of the plan, hidden from customers.\n\t\t\t\t'interval' => $data['plan_interval'], //'month', // day, week, month, and year\n\t\t\t\t'interval_count' => $data['plan_interval_count'], //'1', // 1\n\t\t\t\t'currency' => $data['currency'], //'usd',\n\t\t\t\t'amount' => $data['amount_cent'], // 999, // 9.99 => 999 /100\n\t\t\t\t//'metadata' => ['order_id' => 6735] // key => value\n\t\t\t]);\n\t\t\treturn $plan;\n\t\t} else {\n\t\t\treturn \"[ Stripe_lib => createPlanWithProductID() ] => Please Configure Your Subscription Plan => read https://stripe.com/docs/billing/subscriptions/products-and-plans\";\n\t\t}\n\t}", "title": "" }, { "docid": "bc045efd8cdcf3c2b8da4c9ef99c5502", "score": "0.4468675", "text": "public function getAuthenticatedMember();", "title": "" }, { "docid": "b02b79913d91ac25e491d17be109b27e", "score": "0.44669878", "text": "public function housekeeper()\n {\n $all_providers=UserMembership::with('user')->where('type','<>',0)->get();\n foreach($all_providers as $provider)\n {\n $valid_days=Carbon::createFromTimeStamp(strtotime($provider['end_date']))->diffInDays();\n if($valid_days==3 || $valid_days==1)\n {\n if(UserAlerts::where('user_id','=',$provider['user_id'])->value('alert4'))//check if user wants membership expiry alert\n {\n $user_membership_email=new membershipExpiry($provider);\n Mail::to($provider['user']['email'])->queue($user_membership_email);\n }\n }\n }\n $this->close_expired_projects();\n return;\n }", "title": "" }, { "docid": "13c8684cc493f16b6c1280e7d7b30616", "score": "0.4457714", "text": "public function forPlan($plan)\n {\n $plan = SaaS::getPlans()->filter(function (Plan $record) use ($plan) {\n return $record->getName() === $plan;\n })->first();\n\n $this->plan = $plan->getStripeId();\n\n return $this;\n }", "title": "" }, { "docid": "0346a71cc1c5346ae7d5ce87d13c5dab", "score": "0.44566894", "text": "function sv_wc_memberships_my_memberships_shortcode() {\n\n // bail if Memberships isn't active or we're in the admin\n if ( ! function_exists( 'wc_memberships' ) || is_admin() ) {\n return;\n }\n\n // buffer contents\n ob_start();\n\n ?>\n <div class=\"woocommerce\">\n <h2><?php esc_html_e( 'current plan', 'textdomain' ); ?></h2>\n <?php\n wc_get_template( 'myaccount/my-memberships.php', array(\n 'customer_memberships' => wc_memberships_get_user_memberships(),\n 'user_id' => get_current_user_id(),\n ) );\n ?>\n </div>\n <?php\n\n // output buffered content\n return ob_get_clean();\n}", "title": "" }, { "docid": "2a510915d6b7f7e744fbb7ef75552e43", "score": "0.44527107", "text": "function _jr_activate_pricing_plan( $order ){\n\n\t$order_data = _jr_get_order_job_info( $order );\n\tif ( !$order_data ) {\n\t\treturn;\n\t}\n\n\textract( $order_data );\n\n\tif ( $plan->post_type != APPTHEMES_PRICE_PLAN_PTYPE ) {\n\t\treturn;\n\t}\n\n\t// skip job publishing and job addons if the plan does not contain any jobs\n\tif ( APP_POST_TYPE == $post->post_type ) {\n\n\t\tif ( _jr_needs_publish( $post ) ) {\n\t\t\tjr_update_post_status( $post_id, 'publish' );\n\t\t}\n\n\t\t_jr_set_job_duration( $post_id, $plan_data[JR_FIELD_PREFIX.'duration'][0] );\n\n\t\tdo_action( 'jr_activate_job', $post_id, $plan_data );\n\n\t\tdo_action( 'jr_activate_plan_job_addons', $order, $plan_data );\n\t}\n\n\tdo_action( 'jr_activate_plan_user_addons', $order, $plan_data );\n}", "title": "" }, { "docid": "5ce0823cf59170124779337bf0e8f626", "score": "0.4452708", "text": "public function getCurrentPlan()\n {\n $planProduct = Mage::getModel('catalog/product/');\n /* @var $currentPlan Cminds_SupplierRegistrationExtended_Model_Plan */\n $currentPlan = Mage::getModel('suppliersubscriptions/plan');\n $customer = $this->getCustomer();\n $planId = $customer->getCurrentPlan();\n\n if (!is_null($planId)) {\n $currentPlan->load((int)$planId);\n $planProduct->load((int)$currentPlan->getProductId());\n }\n $currentPlan->setProduct($planProduct);\n\n return $currentPlan;\n }", "title": "" }, { "docid": "c2274613d4daa9db55162361f544c155", "score": "0.44450366", "text": "function getPlan()\n\t\t{\n\t\t\treturn $this->plan;\n\t\t}", "title": "" }, { "docid": "4301e82cbaa7725abffeb4b245bda7b5", "score": "0.44443876", "text": "public function run()\n {\n $plan = Plan::first();\n\n $plan->tenants()->create([\n 'cnpj' => '27010044000159',\n 'name' => 'William Santos',\n 'url' => 'william-santos',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "cb000ff161d663d9e8369c6a77f37573", "score": "0.44430488", "text": "function bp_members_admin_account_activation() {\n\treturn BP_Members_Admin_Account_Activation::instance();\n}", "title": "" }, { "docid": "e9af8aec6e55a11161fd3a1549b6833e", "score": "0.44364938", "text": "public function onPlan($plan)\n {\n return ! is_null(\n $this->subscriptions->first(\n function ($value) use ($plan) {\n return $value->biller_plan === $plan && $value->valid();\n }\n )\n );\n }", "title": "" }, { "docid": "5a56ec1a489766e9d95b5ee3b1418a14", "score": "0.44314665", "text": "public function set(Plan $plan)\n {\n return $this->getSite()->getWorkflows()->create(\n 'change_site_service_level',\n ['params' => ['sku' => $plan->getSku(),],]\n );\n }", "title": "" }, { "docid": "094b7bf8b8ad629d651fd6e40015526a", "score": "0.441029", "text": "public function getPlanId()\n {\n\n return $this->plan_id;\n }", "title": "" }, { "docid": "57a048ddbbace137b12cfc0e91d1e13e", "score": "0.4406574", "text": "public function create()\n {\n return view('admin.membershipPlans.create');\n }", "title": "" }, { "docid": "2f622e121780bcdcb9604ea636377550", "score": "0.4403851", "text": "public function membership($user)\n\t{\n\n\t\t$subscription = null;\n\t\tif($user->stripe_plan == 'monthlyMembership')\n\t\t{\n\t\t\t$subscription = 'Monthly member';\n\t\t}\n\t\telseif($user->stripe_plan == '6monthlyMembership')\n\t\t{\n\t\t\t$subscription = '6-month member';\n\t\t}\n\t\telseif($user->stripe_plan == 'yearlyMembership')\n\t\t{\n\t\t\t$subscription = 'Annual member';\n\t\t}\n\t\t$membership = [\n\t\t\t'member'\t\t=> $user->stripe_active,\n\t\t\t'id'\t\t\t=> $user->stripe_id,\n\t\t\t'subscription'\t=> $user->stripe_subscription,\n\t\t\t'plan'\t\t\t=> $subscription,\n\t\t\t'card'\t\t\t=> $user->last_four,\n\t\t\t'trial'\t\t\t=> $user->trial_ends_at,\n\t\t\t'expiration'\t=> $user->subscription_ends_at,\n\t\t];\n\n\t\treturn $membership;\n\t}", "title": "" }, { "docid": "80e17558a797694368ae25db637908d2", "score": "0.43994597", "text": "public function __construct($planId)\n {\n $this->planId = $planId;\n }", "title": "" }, { "docid": "da5ee03f457fb90288e55790752777d9", "score": "0.43988082", "text": "function tenants_init(&$options, $memberInfo, &$args){\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "5f7b5e76b731c9ca650fd0e6faf25beb", "score": "0.43975297", "text": "public function run()\n {\n $plan = Plan::first();\n\n $plan->tenants()->create([\n 'cnpj' => '2388700600120',\n 'name' => 'Rango da tati',\n 'url' => 'rangodatati',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "c1df5ff0fcac39958573c45790823663", "score": "0.43964213", "text": "public function edit(Membership $membership)\n {\n //\n }", "title": "" }, { "docid": "149f9dba765f0f22301f6bcda498d616", "score": "0.439571", "text": "function prepare_members( $member_record ) {\n\t\t$this->reset_counters();\n\t\tunset( $this->address_id );\n\n\t\t$this->validate_existing_data( $member_record );\n\t\tif ( ! isset( $this->member_data[ 'relationship_id' ] ) ) {\n\t\t\t$this->member_data[ 'relationship_id' ] = 1;\n\t\t}\n\n\t\t$this->create_wp_user_account();\n\t\t$this->insert_existing_members();\n\t\t$this->clear_processed_data();\n\n\t\t$this->prev_memb_id = $member_record->memb_id;\n\t\t$this->prev_wp_user_id = $this->user_id;\n\n\t\tif ( $this->membership_id >= 2 ) {\n\t\t\t$this->fam_count = 0;\n\t\t\t$this->fam_memb_id_counter = 0;\n\t\t\t$this->get_family_data( $this->spouse_table );\n\t\t\tif ( $this->fam_process ) {\n\n\t\t\t\tforeach ( $this->family_rows as $family_row ) {\n\t\t\t\t\t$this->process_family_record( $family_row );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $this->membership_id == 4 ) {\n\t\t\t\t$this->get_family_data( $this->family_table );\n\t\t\t\tif ( $this->fam_process ) {\n\t\t\t\t\tforeach ( $this->family_rows as $family_row ) {\n\t\t\t\t\t\t$this->process_family_record( $family_row );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2676d5f3de0bf24ec1a6653faffc89fe", "score": "0.4395116", "text": "public function planAction()\n {\n\t\t return new ViewModel(array('page_icon'=>'fa fa-paper-plane','pageHeading'=>\"Investment Plans\"));\n }", "title": "" }, { "docid": "1de6419ae7a10c891fb743b3fdba8547", "score": "0.43927056", "text": "public function regigstration_ui($level) {\n $form = apply_filters('swpm_registration_form_override', '', $level); //The $level value could be empty also so the code handling the filter need to check for it.\n if (!empty($form)) {\n //An addon has overridden the registration form. So use that one.\n return $form;\n }\n\n $settings_configs = SwpmSettings::get_instance();\n $joinuspage_url = $settings_configs->get_value('join-us-page-url');\n $membership_level = '';\n global $wpdb;\n\n if (SwpmUtils::is_paid_registration()) {\n //Lets check if this is a registration for paid membership\n $member = SwpmUtils::get_paid_member_info();\n if (empty($member)) {\n SwpmUtils::e('Error! Invalid Request. Could not find a match for the given security code and the user ID.');\n } else {\n $membership_level = $member->membership_level;\n }\n } else if (!empty($level)) {\n //Membership level is specified in the shortcode (level specific registration form).\n $member = SwpmTransfer::$default_fields;\n $membership_level = absint($level);\n }\n\n //Check if free membership registration is disalbed on the site\n if (empty($membership_level)) {\n $joinuspage_link = '<a href=\"' . $joinuspage_url . '\">' . SwpmUtils::_('Join Us') . '</a>';\n $free_rego_disabled_msg = '<p>';\n $free_rego_disabled_msg .= SwpmUtils::_('Free membership is disabled on this site. Please make a payment from the ');\n $free_rego_disabled_msg .= SwpmUtils::_($joinuspage_link);\n $free_rego_disabled_msg .= SwpmUtils::_(' page to pay for a premium membership.');\n $free_rego_disabled_msg .= '</p><p>';\n $free_rego_disabled_msg .= SwpmUtils::_('You will receive a unique link via email after the payment. You will be able to use that link to complete the premium membership registration.');\n $free_rego_disabled_msg .= '</p>';\n return $free_rego_disabled_msg;\n }\n\n //Handle the registration form in core plugin\n $mebership_info = SwpmPermission::get_instance($membership_level);\n $membership_level = $mebership_info->get('id');\n if (empty($membership_level)) {\n return \"Error! Failed to retrieve membership level ID from the membership info object.\";\n }\n $level_identifier = md5($membership_level);\n $membership_level_alias = $mebership_info->get('alias');\n $swpm_registration_submit = filter_input(INPUT_POST, 'swpm_registration_submit');\n if (!empty($swpm_registration_submit)) {\n $member = array_map('sanitize_text_field', $_POST);\n }\n ob_start();\n extract((array) $member, EXTR_SKIP);\n include(SIMPLE_WP_MEMBERSHIP_PATH . 'views/add.php');\n return ob_get_clean();\n }", "title": "" }, { "docid": "b19ca75e336336e3eab1006192e044cb", "score": "0.43896964", "text": "public function onApiPostCreate(ApiProjectMembershipPostCreateEvent $event): void\n {\n $user = $event->membership->getUser();\n\n if (ProjectMembership::ROLE_APPLICANT === $event->membership->getRole()\n && $user->isValidated() && $user->isActive()\n ) {\n $this->messageBus()->dispatch(\n new NewMemberApplicationMessage(\n $user->getId(),\n $event->membership->getProject()->getId()\n )\n );\n }\n }", "title": "" }, { "docid": "6bed45ad233944690a586d6149d50b90", "score": "0.43882492", "text": "public function members_offline()\n {\n }", "title": "" }, { "docid": "aad9180e5d9caa082342e2dcbe9a4545", "score": "0.43878713", "text": "function __viewMembers()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //show table\n $this->data['visible']['wi_project_members'] = 1;\n\n //load team members first\n $this->data['reg_blocks'][] = 'members';\n $this->data['blocks']['members'] = $this->project_members_model->listProjectmembers($this->project_id);\n $this->data['debug'][] = $this->project_members_model->debug_data;\n\n //load client members first\n $this->data['reg_blocks'][] = 'clients_users';\n $this->data['blocks']['clients_users'] = $this->users_model->clientUsers($this->data['project_details']['clients_id']);\n $this->data['debug'][] = $this->users_model->debug_data;\n\n }", "title": "" }, { "docid": "bd106584210127abcfc599866ac32bbc", "score": "0.43870807", "text": "function plans_pricing() {\r\n $data['basepath'] = base_url();\r\n $data['plandetails'] = $this->DatabaseModel->access_database('ts_plans','select','',array( 'plan_status'=>1));\r\n if( $this->ts_functions->getsettings('portal','revenuemodel') != 'subscription' ) {\r\n redirect(base_url());\r\n }\r\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/home_header',$data);\r\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/menu_header',$data);\r\n\t\t$this->load->view('themes/'.$this->theme.'/home/pricing_table',$data);\r\n\t\t$this->load->view('themes/'.$this->theme.'/home/include/home_footer',$data);\r\n }", "title": "" }, { "docid": "8903a9e0cde68e564ebaafad2caa8c3d", "score": "0.437618", "text": "public function onMenuInitialize_SitecrowdfundingDashboardManagemembers($row) {\n $project_id = $this->_getProjectId();\n if (empty($project_id)) {\n return false;\n }\n\n $project = Engine_Api::_()->getItem('sitecrowdfunding_project', $project_id);\n\n // todo: Allow edit for project admins:\n $isProjectAdmin = Engine_Api::_()->getDbTable('listItems', 'sitecrowdfunding')->checkLeader($project);\n if ($isProjectAdmin != 1) {\n $viewer = Engine_Api::_()->user()->getViewer();\n $editPrivacy = $project->authorization()->isAllowed($viewer, \"edit\");\n if (empty($editPrivacy)) {\n return false;\n }\n }\n\n return array(\n 'label' => $row->label,\n 'route' => 'sitecrowdfunding_extended',\n 'controller' => 'member',\n 'action' => 'list-members',\n 'class' => 'ajax_dashboard_enabled',\n 'params' => array(\n 'project_id' => $project->getIdentity()\n ),\n );\n }", "title": "" }, { "docid": "a18d70e1345199edb3808fd98505096e", "score": "0.4370652", "text": "public function change_plan($data)\n {\n if(!isset($data['plan_id'])) {\n throw new \\Box_Exception('plan_id is missing');\n }\n\n list($order, $s) = $this->_getService($data);\n $plan = $this->di['db']->getExistingModelById('ServiceHostingHp', $data['plan_id'], 'Hosting plan not found');\n \n $service = $this->getService();\n return (bool) $service->changeAccountPlan($order, $s, $plan);\n }", "title": "" }, { "docid": "5baffca468b60032917801fae1b67818", "score": "0.43692446", "text": "public function create()\n {\n // Count number of members in team - if equal to max\n // redirect to profile with message\n $plan = Plan::find(Auth::user()->stripe_plan);\n $members = User::where(['type' => 'agent', 'team_id' => Auth::user()->id])->get();\n if($members && (count($members) == $plan->num_agents)) {\n flash()->error(\"Member Limit\", \"You have reached the maximum number of allowed members for your plan\");\n return Redirect::to('/profile');\n }\n return view('member.create');\n }", "title": "" }, { "docid": "501aa95315d199a2d193a13b5b4061d1", "score": "0.4368406", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('newsletter/contactlab/subscribers/actions/queue');\n }", "title": "" }, { "docid": "6f51bfeb2cc8cfcaef7f5a791163721d", "score": "0.43680894", "text": "public function show(InvestmentPlan $investmentPlan)\n {\n //\n }", "title": "" }, { "docid": "986e642b4083e759f0d657a186159438", "score": "0.43653247", "text": "public function newMember()\n {\n /** @var MembershipMailer $mailer */\n $mailer = $this->getMailer('Membership');\n $membership = $this->getArbitraryMembership();\n $recipientEmail = '[email protected]';\n $mailer->newMember($recipientEmail, $membership);\n\n return $mailer;\n }", "title": "" }, { "docid": "cc47cc66a2aff0234ba761d79425ce50", "score": "0.43614194", "text": "public function setPlan($plan)\n\t{\n\t\t$this->_plan = 0x0F & $plan;\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\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": "" } ]
6f38c2af3ef15d88f62eb60b83950432
Admin get all Locations
[ { "docid": "307586bea82e9830aa745fdeaeaaed66", "score": "0.0", "text": "public function adminIndexAction(Application $app)\n {\n $locations = (new LocationFinder($app['db']))->findAll();\n\n return $app['twig']->render('admin_locations.html', array('locations' => $locations));\n }", "title": "" } ]
[ { "docid": "fc6922902ea405ed572e8ee07e182a73", "score": "0.8094578", "text": "public function listLocations();", "title": "" }, { "docid": "91f38bae54ce0fd4f7d71689f9b7c1ba", "score": "0.7973332", "text": "public function getLocations();", "title": "" }, { "docid": "91f38bae54ce0fd4f7d71689f9b7c1ba", "score": "0.7973332", "text": "public function getLocations();", "title": "" }, { "docid": "53e10e87606e27fdd0c9b424638c10cb", "score": "0.78099036", "text": "public function getAll()\n\t{\n\t\treturn Location::all();\n\t}", "title": "" }, { "docid": "1012ddc32cb3b4ea105fe92eb0180a3c", "score": "0.7700533", "text": "public function getLocationsList(){\n return $this->_get(13);\n }", "title": "" }, { "docid": "25873efb2ab9a7769372085a65009af9", "score": "0.76273423", "text": "public function all()\n {\n return $this->request('GET', '/api/application/locations');\n }", "title": "" }, { "docid": "3a2feb3c2231ce5e3423f87919eebdad", "score": "0.7611341", "text": "public function index()\n {\n return Location::all();\n }", "title": "" }, { "docid": "b55bbb5d34029ad16a0f335598f5cbaa", "score": "0.75029606", "text": "public function getDesiredLocationsList(){\n return $this->_get(10);\n }", "title": "" }, { "docid": "c6dd6aad55cfeb62fc57f35170356bfd", "score": "0.74986774", "text": "public function index()\n {\n //\n $results = DB::table('Locations')->get();\n return LocationsResource::collection($results);\n }", "title": "" }, { "docid": "9d3a4a9f55cd8d2f88e3ee2148713fdf", "score": "0.74845916", "text": "public function get_all_location(){\n $response[] = $this->Location_model->get_all_location();\n \n return $response;\n }", "title": "" }, { "docid": "3764d5785ea0d8cb765265ca3d42e3e4", "score": "0.7438513", "text": "public function index()\n {\n /**\n * responce all location time in pagination\n */\n return LocationResource::collection(Location::all());\n }", "title": "" }, { "docid": "61d7808e63b01d36417c896cebaee0c7", "score": "0.7390456", "text": "public function showLocationAll()\n {\n $Location = Location::all();\n return response()->json(['LocationAll' => $Location], 200);\n }", "title": "" }, { "docid": "d5b31007dcb214c802e7a88234dbd2f6", "score": "0.7263601", "text": "public function all()\n {\n return $this->location;\n }", "title": "" }, { "docid": "f803cf56b266be121e90e10149fcb126", "score": "0.71738094", "text": "public function listAll()\n {\n return $this->location->all()->pluck('name', 'id')->all();\n }", "title": "" }, { "docid": "493a63a398fa442807aec230664754c4", "score": "0.7165159", "text": "public function getLocations() {\n $url = 'https://api-ppustg.azurewebsites.net/partner/Location/GetList';\n \n return $this->_getConnection($url);\n }", "title": "" }, { "docid": "a08ebd61fc98261ebf96e2d5748d52b9", "score": "0.7134302", "text": "public static function getAllLocations() {\n $getParams = CRM_Core_Page_AJAX::defaultSortAndPagerParams();\n $sortBy = CRM_Utils_Array::value('sortBy', $getParams);\n if ($sortBy) {\n $sortBy = 'address_id.' . $sortBy;\n $sortBy = str_replace('state_province_id', 'state_province_id.name', $sortBy);\n $sortBy = str_replace('country_id', 'country_id.name', $sortBy);\n }\n if (empty($sortBy)) {\n $sortBy = 'address_id.name ASC';\n }\n $params = [\n 'return' => [\n \"address\",\n ],\n 'address_id' => ['IS NOT NULL' => 1],\n 'options' => [\n 'sort' => $sortBy,\n 'offset' => ($getParams['page'] - 1) * $getParams['rp'],\n 'limit' => $getParams['rp'],\n ],\n ];\n $result = civicrm_api3('LocBlock', 'get', $params);\n $locations = [];\n $mask = array_sum(array_keys(self::getlinks()));\n foreach ($result['values'] as $key => $values) {\n if (empty($values['address'])) {\n continue;\n }\n $address = $values['address'];\n $replace = [\n 'id' => $address['id'],\n 'locid' => $values['id'],\n ];\n $isActive = self::isActive($values['id']);\n $class = ' crm-entity ';\n if (!$isActive) {\n $class .= ' disabled';\n }\n $locations[] = [\n 'DT_RowId' => $address['id'],\n 'DT_RowClass' => $class,\n 'DT_RowAttr' => [\n 'data-entity' => 'address',\n 'data-id' => $address['id'],\n ],\n 'name' => $address['name'],\n 'street_address' => $address['street_address'],\n 'is_active' => ($isActive == 1) ? ts('Yes') : ts('No'),\n 'supplemental_address_1' => $address['supplemental_address_1'],\n 'supplemental_address_2' => $address['supplemental_address_2'],\n 'supplemental_address_3' => $address['supplemental_address_3'],\n 'city' => $address['city'],\n 'state_province_id' => CRM_Core_PseudoConstant::getLabel(\n 'CRM_Core_DAO_Address',\n 'state_province_id',\n $address['state_province_id']\n ),\n 'country_id' => CRM_Core_PseudoConstant::getLabel(\n 'CRM_Core_DAO_Address',\n 'country_id',\n $address['country_id']\n ),\n 'links' => CRM_Core_Action::formLink(\n self::getlinks(),\n $mask,\n $replace,\n ts('more'),\n FALSE,\n 'eventlocations.selector.row',\n 'EventLocations',\n $rid\n ),\n ];\n }\n $count = civicrm_api3('LocBlock', 'getcount', ['address_id' => ['IS NOT NULL' => 1]]);\n $locationsDT = [\n 'data' => $locations,\n 'recordsTotal' => $count,\n 'recordsFiltered' => $count,\n ];\n CRM_Utils_JSON::output($locationsDT);\n }", "title": "" }, { "docid": "1beee0b9f994a9292fadc2de776bba91", "score": "0.7108074", "text": "public function getLocations()\n {\n return $this->sendRequest('GET', self::API_LOCATIONS);\n }", "title": "" }, { "docid": "16bf9ce0add576923b83ffe828a9042c", "score": "0.7094617", "text": "public function getLocations()\n {\n return Location::get($this);\n }", "title": "" }, { "docid": "e5b6cef53bc80d2782d9761995275967", "score": "0.70775527", "text": "public function getLocations()\n {\n return $this->locations;\n }", "title": "" }, { "docid": "e5b6cef53bc80d2782d9761995275967", "score": "0.70775527", "text": "public function getLocations()\n {\n return $this->locations;\n }", "title": "" }, { "docid": "e5b6cef53bc80d2782d9761995275967", "score": "0.70775527", "text": "public function getLocations()\n {\n return $this->locations;\n }", "title": "" }, { "docid": "510e67727efb0308c762341d344d4aac", "score": "0.69962656", "text": "public static function getAllLocations() {\n if ( self::$allLocations === NULL ) {\n $adodb = adodbGetConnection();\n $adodb->SetFetchMode(ADODB_FETCH_ASSOC);\n $sql = 'SELECT * FROM '.TABLE_LOCATION;\n $rs = $adodb->Execute($sql);\n self::$allLocations = Array();\n while ( !$rs->EOF ) {\n $key = $rs->fields['lid'];\n $value = $rs->fields['lname'];\n self::$allLocations[$key] = $value;\n $rs->MoveNext();\n }\n $rs->Close();\n }\n return self::$allLocations;\n }", "title": "" }, { "docid": "47bcc3a8aae67556f52c8c643a1b15c5", "score": "0.69791436", "text": "public function index()\n {\n $locations = Location::latest()\n ->with('activities')\n ->get();\n\n return $locations;\n }", "title": "" }, { "docid": "7e28f904544c43d7b9a782ff8217c6f1", "score": "0.69750327", "text": "public function getLocations() {\r\n $Locations = new Locations;\r\n \r\n return $Locations->nearby($this->lat, $this->lon, $this->radius);\r\n }", "title": "" }, { "docid": "1f3d2953197f512dce5c669e46220f4f", "score": "0.69006217", "text": "public function getLocations() {\n\t\treturn $this->_locations;\n\t}", "title": "" }, { "docid": "e4f134b5036d245aea9e4cabc43dbb4b", "score": "0.68699306", "text": "public function get_locations() {\n $this->db->select('*');\n $this->db->from('locations');\n $query = $this->db->get();\n $query_result = $query->result();\n\n return $query_result;\n }", "title": "" }, { "docid": "cb4256e4eabc67e5c74bdf37e35c1f6f", "score": "0.68444604", "text": "public function admin_index() {\n $this->Local->recursive = 0;\n $this->set('locais', $this->paginate());\n }", "title": "" }, { "docid": "fe7bbc8abcb5c7eb0f3e28a31d965566", "score": "0.68059295", "text": "public function getUserLocations() {\n $user = User::model()->findByPk(Yii::app()->user->id);\n\n /**\n * Se obtienen las parcelas asociadas al usuario\n */\n $command = Yii::app()->db->createCommand();\n $command->text = \"\n SELECT \n l.id,\n l.code\n FROM \n mip_owner o\n INNER JOIN mip_location l\n ON ( o.location_id = l.id )\n WHERE\n o.person_id = :person_id;\n \";\n $command->params = [':person_id' => $user->person_id];\n return $command->queryAll(true);\n }", "title": "" }, { "docid": "79fe058ad23b95cbaa4f9a75ac187eaa", "score": "0.6795531", "text": "public function findAllLocations()\n {\n if (($model = Location::find()->all()) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "df6f35773fe89e02fdf0caed9b66a129", "score": "0.6790157", "text": "public function getAll()\n {\n $states = $this->state->getAllWithRelations(['state', 'country'], 'state_name');\n\n $sc = array_map(function ($structure) use ($states) {\n\n $action = '<a href=\"#!\" id=\"edit_loc\" class=\"btn waves-effect white-text\" data-id=\"' . $structure['state']['id'] . '\" data-cid=\"' . $structure['state']['country_id'] . '\" data-state=\"' . $structure['state']['state_name'] . '\" onclick=\"showEditLocation(' . $structure['state']['id'] . ');\"><i class=\"material-icons\" style=\"color:#fff\">edit</i></a> ';\n\n // $action .= '<a id=\"del-table\" href=\"#delete_location_modal\" class=\"btn red white-text\" data-id=\"' . $structure['state']['id'] . '\" data-cid=\"' . $structure['state']['country_id'] . '\" data-state=\"' . $structure['state']['state_name'] . '\" onclick=\"deleteLocation(this)\" ><i class=\"material-icons\" style=\"color:#fff\">delete</i></a>';\n\n return [\n 'country' => $structure['country']['name'],\n 'state_name' => $structure['state']['state_name'],\n 'state_code' => $structure['state']['state_code'],\n 'action' => $action,\n ];\n }, $states);\n\n return ['data' => $sc];\n }", "title": "" }, { "docid": "f24f95576e6d59c97740772d73765a6a", "score": "0.677602", "text": "public function getAllLocations( array $attributes = [] );", "title": "" }, { "docid": "cc78c98851348b253bbd639aba1c5732", "score": "0.67298394", "text": "public function actionAll()\n {\n return \\Yii::$app->getModule('chocouser')->town->allTowns();\n }", "title": "" }, { "docid": "e32710fe7ab008a5ca6981ce90a9f0b6", "score": "0.67275965", "text": "public function getAllLocalities(){\r\n\t\t$this->db->select('id,name,latitude,longitude,status')->from(TABLES::$LOCALITY_TABLE)->order_by('name','asc');\r\n\t\t$query = $this->db->get();\r\n\t\t$result = $query->result_array();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "15c64b9868242cd212e8b57b28e8108b", "score": "0.67005825", "text": "public function getAllLocalities() {\n\t\t$this->db->select ( '*' )->from ( TABLES::$AREA )->order_by ( 'name', 'asc' );\n\t\t$query = $this->db->get ();\n\t\t$result = $query->result_array ();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "161d30a063c9b76814561d50c15f1483", "score": "0.66884196", "text": "public function index()\n {\n //\n $cities = City::paginate(3);\n\n return view('address.allLocation', compact('cities'));\n }", "title": "" }, { "docid": "6d5c4136196a61b8b7776f0a00842136", "score": "0.66067797", "text": "function getLocationList($request)\n {\n $columns = array(\n array('db' => 'd.id', 'dt' => 0),\n array('db' => 'd.organization', 'dt' => 1, 'is_search' => true),\n array('db' => 'd.location', 'dt' => 2, 'is_search' => true)\n );\n\n $limit = \\SSP::limit($request);\n $order = \\SSP::order($request, $columns);\n $where = \\SSP::filter($request, $columns);\n $query = \\LocationTable::getInstance()->createQuery('d');\n $query = $query->limit($limit['limit'])->offset($limit['offset']);\n foreach ($where as $key => $val) {\n $query = $query->orWhere($key . ' ILIKE ?', '%' . $val . '%');\n }\n foreach ($order as $orderBy) {\n $query = $query->addOrderBy($orderBy);\n }\n return array('result' => $query->execute(), 'count' => $query->count());\n }", "title": "" }, { "docid": "c35ecd7c189d9d7be9fb6428a5afb436", "score": "0.65943813", "text": "public function index()\n {\n //\n $locations = Location::latest()->orderBy('locationName')->get();\n return $locations;\n //return response()->json(['locations' => $locations,], 200);\n }", "title": "" }, { "docid": "b2df14f266d036f7cc889209da8d39b8", "score": "0.65794915", "text": "public function index()\n {\n $userLocations = Location::where('user_id',auth()->guard('api')->user()->id)->get();\n return response()->json($userLocations);\n }", "title": "" }, { "docid": "e6668aaf79dfa18c03f6a058e32ad695", "score": "0.65788174", "text": "public function equipementlocationListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn gestion::lister(\"EquipementLocation\");//type array\n\t}", "title": "" }, { "docid": "65c6ae3fd4aa8d1c63b7ae5708b65225", "score": "0.65689325", "text": "function _getLocations()\n {\n global $objDatabase;\n\n $query = \"\n SELECT TRIM(a.fieldvalue) as location FROM \".DBPREFIX.'module_immo_content AS a\n WHERE a.field_id = (\n SELECT field_id\n FROM '.DBPREFIX.'module_immo_fieldname\n WHERE lower( name ) = \"ort\"\n AND lang_id = 1 )\n AND a.lang_id = '.$this->frontLang.'\n GROUP BY location ';\n $objRS = $objDatabase->Execute($query);\n if ($objRS) {\n while(!$objRS->EOF) {\n $locations[] = $objRS->fields['location'];\n $objRS->MoveNext();\n }\n }\n return $locations;\n }", "title": "" }, { "docid": "0ccb5780fd75fceaded6139947cc34d2", "score": "0.6544837", "text": "function getLocationList() { //getLocationList\n\t\t\n\t\t$criteria['fields'] = array('City.id','CONCAT(City.name,\", \",Country.name) as cityname');\n\t\t$cities= $this->find('all',$criteria);\n\t\t\n\t\t$city_list=array();\n\t\tforeach($cities as $city) {\n\t\t\t$city_list[$city['City']['id']]=$city[0]['cityname'];\n\t\t}\n\t\treturn $city_list;\n\t}", "title": "" }, { "docid": "305c7895ac26bb8c1b6de71cddf2840e", "score": "0.65337366", "text": "public function getLocations()\n {\n $response = new \\Response();\n $locations = LocationDbMapper::getAllLocations();\n\n $response->setCode(200);\n $response->setData($locations);\n $response->setMessage('success');\n\n return $response->toJson();\n\n }", "title": "" }, { "docid": "d688ae1425b4e68068843e65786a51c7", "score": "0.6532224", "text": "public function actionLocations()\n {\n $settings = craft()->plugins->getPlugin('locations')->getSettings();\n\n $variables['locations'] = craft()->locations_location->getAllLocations(true);\n\n $variables['settings'] = array(\n 'notFoundText' => $settings->notFoundText,\n 'defaultZip' => $settings->defaultZip,\n 'defaultRadius' => $settings->defaultRadius,\n 'showMap' => $settings->showMap,\n 'useGeoLocation' => $settings->useGeoLocation,\n 'useYourOwnJavascriptFile' => $settings->useYourOwnJavascriptFile\n );\n\n // Get Templates Paths\n $sitePath = craft()->path->getTemplatesPath();\n $pluginPath = craft()->path->getPluginsPath() . 'locations/templates';\n\n // Temp Set Template Path to Plugin Templates\n craft()->path->setTemplatesPath($pluginPath);\n\n $this->renderTemplate('api/_locations', $variables);\n\n // Reset Template Path\n craft()->path->setTemplatesPath($sitePath);\n\n }", "title": "" }, { "docid": "85135f629833564f816e79a9abd4c1fa", "score": "0.6500389", "text": "public function getLocations($check_only = FALSE);", "title": "" }, { "docid": "d5b403820009d5489a2e887c5e88d18d", "score": "0.64778113", "text": "public function index()\n {\n $place = $this->places->getPlacesPaginated(config('geolocation.address.default_per_page'))->items();\n return $this->handler\n ->apiResponse($place);\n }", "title": "" }, { "docid": "3d7134bd0b9e4acbf242886727e55219", "score": "0.64679503", "text": "public function index()\n {\n $data['country'] = $this->country->getAll();\n $data['states'] = $this->state->getAllWithRelations(['country'], 'state_name');\n\n return view('admin.location.index', $data);\n }", "title": "" }, { "docid": "fa577e01075b9ad1979384caf84fd2ef", "score": "0.64573395", "text": "public function getall(Request $request)\n {\n try {\n return $this->warehouseLocationRepository->getlocations($request);\n } catch (\\Exception $e) {\n return ApiResponses::internalServerError($e->getMessage());\n }\n }", "title": "" }, { "docid": "dccc469950f4850848d5a2fdd735fe01", "score": "0.64514613", "text": "public function locations()\n {\n return $this->hasManyThrough(Location::class, Floor::class);\n }", "title": "" }, { "docid": "91eb9796fb0932d21a5dae4e5a6ceff1", "score": "0.64486957", "text": "public function index()\n {\n $locations = Location::all();\n return response()->json(['locations' => $locations], 200);\n }", "title": "" }, { "docid": "956ef9041f08d8cbe348fdd6c93d38d8", "score": "0.6448557", "text": "function getLocationList()\n{\n $locations = '';\n $listLocation = LocationFactory::getLocations();\n foreach ($listLocation as $i => $location) {\n $locations .= '<option value=\"' . $location->id . '\">' . $location->name . '</option>';\n }\n return $locations;\n}", "title": "" }, { "docid": "6abaceab0e9b2158a9c9bdec41b4926f", "score": "0.6429335", "text": "public function index()\n {\n $locations = Location::orderBy('city','asc')->paginate(10);\n return view('settings.locations.index')->with('locations',$locations);\n }", "title": "" }, { "docid": "1988c5327e5ccfc913fc2f25655c054d", "score": "0.641827", "text": "public function getAll() {\n\t\treturn $this->trip_repo->all(['locations', 'tags']);\n\t}", "title": "" }, { "docid": "0d80c8663da35f9a89edb255acdf8d55", "score": "0.640313", "text": "function em_locations( $args = array() ){ echo em_get_locations($args); }", "title": "" }, { "docid": "69d52c2dcee68c1bbf0a42d19b2c63c1", "score": "0.640048", "text": "public function index()\n {\n return view('locations.index')->with('locations',Location::all());\n }", "title": "" }, { "docid": "7e4857f1e469115d8b156b35fc87f57a", "score": "0.63983417", "text": "public function getLocation() {\n $query = $this->db->select('*')\n ->where('lt_deleted', 0)\n ->get('location');\n return $query;\n\t}", "title": "" }, { "docid": "a37c2125ec986b6b1da3dc5aaf10a293", "score": "0.639179", "text": "public function index()\n {\n if (parent::checkLogin())\n { \n return response()->json([\n 'locations' => Location::where('user_id', parent::getUserfromToken()->id)->get()\n ],200);\n }\n \n }", "title": "" }, { "docid": "c5a9b8dc54f2ef32435d979d9daf94d4", "score": "0.638566", "text": "public function locations()\n\t{\n\n\t\t$this->load->view('public/locations');\n\n\t}", "title": "" }, { "docid": "d66e7ea3d486374eeeb2c0b7f03eb8d9", "score": "0.63661665", "text": "public static function getLocations($id = NULL) {\n $locations = $params = [];\n $whereClause = '';\n $separator = ' :: ';\n if ($id) {\n $whereClause = ' AND lb.id = %1 ';\n $separator = ', ';\n $params = [1 => [$id, 'Integer']];\n }\n $query = \"\n SELECT CONCAT_WS(\n '{$separator}',\n ca.name,\n ca.street_address,\n ca.city,\n ca.supplemental_address_1,\n ca.supplemental_address_2,\n ca.supplemental_address_3,\n sp.name,\n country.name\n ) title,\n lb.id\n FROM civicrm_loc_block lb\n INNER JOIN civicrm_address ca ON lb.address_id = ca.id {$whereClause}\n LEFT JOIN civicrm_state_province sp ON ca.state_province_id = sp.id\n LEFT JOIN civicrm_country country ON ca.country_id = country.id\n LEFT JOIN civicrm_loc_block_entity clbe ON clbe.loc_block_id = lb.id\n WHERE clbe.is_active = 1\n ORDER BY sp.name, ca.city, ca.street_address ASC\n \";\n\n $dao = CRM_Core_DAO::executeQuery($query, $params);\n while ($dao->fetch()) {\n $locations[$dao->id] = $dao->title;\n }\n return $locations;\n }", "title": "" }, { "docid": "19f8c61b3168d6f090496911dd20d4b3", "score": "0.6349743", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM city';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "30626de7a6ec264928ad1941372df411", "score": "0.63486147", "text": "public function listTopLocations()\n {\n return $this->location->whereIn('id', $this->getSubordinate(\\Auth::user(), 1))->get()->pluck('name', 'id')->all();\n }", "title": "" }, { "docid": "b014192eb503a6ba501ead89a7fc1bd3", "score": "0.6347057", "text": "public function listCityAction() {\n\t\treturn $this->city->getAll();\n\t}", "title": "" }, { "docid": "7a10e1c70f8ee0540bfba728de9bb7f1", "score": "0.632818", "text": "public function locations()\n {\n return $this->morphToMany(\"App\\Models\\Location\", \"locatable\");\n }", "title": "" }, { "docid": "d498fc6788dfaa4677f456d3bce11c89", "score": "0.6326631", "text": "public function index()\n {\n $locations = Location::whereIn('city_id', Auth::user()->writableCities->pluck('id'))->get();\n return view('locations.index', compact('locations'));\n }", "title": "" }, { "docid": "bd2e727e6df9be71c191c6693972d768", "score": "0.63226175", "text": "public function getLocation() {\n $query = $this->db->select('*')\n ->where('lt_deleted', 0)\n ->get('location');\n return $query;\n }", "title": "" }, { "docid": "9ab9cc4bc7f6bba914c38d22ac8c3111", "score": "0.63202673", "text": "public function all()\n {\n return $this->client->get('regions');\n }", "title": "" }, { "docid": "010a5068336a01f0a1b83d7bebb4941a", "score": "0.6313872", "text": "public function index()\n {\n $location = MissingPersonLocationUpdate::latest()->paginate();\n return $location;\n }", "title": "" }, { "docid": "245f1f780cee09bf175cd77e0d057217", "score": "0.62988645", "text": "public function index()\n {\n $rooms =Room::where(\"category_id\",null)->get();\n foreach($rooms as $room){\n $room->location;\n \n }\n return $rooms;\n }", "title": "" }, { "docid": "880ea5a70f37362d0c4dd50519afe68f", "score": "0.6287809", "text": "public function getStsRegionalEndpoints();", "title": "" }, { "docid": "f35e3190e64bf403e823a94f82b7f3f1", "score": "0.62814", "text": "public function getLocatorList();", "title": "" }, { "docid": "eaa15936da783a8fd408cfe00e8d7afe", "score": "0.62632394", "text": "function getLocations()\n {\n $pm = new PersistenceHomeAudioSystem();\n $rm = $pm->loadDataFromStore();\n return $rm->getLocations();\n }", "title": "" }, { "docid": "2c95728da5e098bec1fcb84e1d45f05f", "score": "0.6253005", "text": "public function getLocationQuery();", "title": "" }, { "docid": "fba1bd120f2df66f80a7c4a99e8eb01b", "score": "0.62417203", "text": "function action_ajax_get_location_list() {\r\n // Get the media model\r\n $plugin_model = new Model_Media();\r\n\r\n // Return\r\n $this->auto_render = false;\r\n $this->response->body(json_encode($plugin_model->get_location_list()));\r\n }", "title": "" }, { "docid": "44055c53dab01cf57533c170599415ca", "score": "0.62369686", "text": "public function locationsAction(Request $request)\n {\n return $this->container->get('location.service')->getChildrenLocations($request);\n }", "title": "" }, { "docid": "d8ffa77b60ec495cd2784a03788ab50a", "score": "0.620911", "text": "public function index()\n {\n $locations = Location::all();\n return view('locations.index', compact('locations'));\n }", "title": "" }, { "docid": "00a1f24d8ce382c481674bff5cad44d5", "score": "0.62072164", "text": "function getLocationList()\n{\n if ($exists = Storage::disk('local')->exists('locations.json')) {\n $locationTree = json_decode(Storage::disk('local')->get('locations.json'), true);\n if (is_array($locationTree)) {\n return $locationTree;\n }\n }\n return [];\n}", "title": "" }, { "docid": "795aac8785140dc8e90fc16afbf4db6d", "score": "0.61905926", "text": "public function all()\n {\n return $this->queryHttpResponse(static::PROJECT_ENTRIES, 'GET');\n }", "title": "" }, { "docid": "8b95591f5822c945f14827ebab21478c", "score": "0.6178756", "text": "public function index()\n {\n return City::all();\n }", "title": "" }, { "docid": "348fc87f21df84f4abd1903421995bc9", "score": "0.6177797", "text": "public function index() {\t\t\n\t\t$head['title'] = \"Manage Locations\";\n\n\t\t$header['mode'] = 'Location';\n\t\t$header['view'] = 'templates/header.php';\n\t\t$header['user'] = $this->Admin_model->getContact($this->authorize->getNetid());\n\n\t\t$content['locations'] = $this->Manage_locations_model->getAllLocations();\n\t\t$content['view'] = 'manage_locations/index';\n\t\t$content['description'] = \"Manage Locations\";\n\t\t$js = array('views/pagination.js', 'views/manage_admins.js');\n\t\t$css = array('views/pagination.css');\n\t\t$head['pageDependencies'] = getPageDependencies($js, $css);\n\n\t\t$sidebar = $this->Admin_model->getContact('jshill');\n\n\t\t$data['head'] = $head;\n\t\t$data['header'] = $header;\n\t\t$data['content'] = $content;\n\t\t$data['sidebar'] = $sidebar;\n\n\t\t$this->security->xss_clean($data);\n\t\t$this->load->view('main', $data);\n\t}", "title": "" }, { "docid": "3768a7ee8d9888982a7fb30a770677b1", "score": "0.6176748", "text": "public function actionIndex()\n {\n $searchModel = new LocationSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "8a11fb624ff7d0065228f05b7a00f4c1", "score": "0.6176159", "text": "protected function action_locations() { \n\t\t$content = new Events_Template(DBEM_DOCROOT . $this->admin . 'pages/locations.php');\n\t\tif ($this->error )\n\t\t\t$content->error = $this->error;\n\t\t\t\n\t\t$content->locations = $this->get_locations();\n\t\t\n\t\t// Standard.\n\t\t$content->opts = $this->opts;\n\t\t$this->template->content = $content;\n\t\treturn $this;\n\n\t}", "title": "" }, { "docid": "fb48e5e8abdb551616682a8447a3d43c", "score": "0.6175679", "text": "public function index()\n\t{\n\t\treturn View::make('account.display.list-locations', ['pageTitle' => 'List of City/Provinces in the Philippines']);\n\t}", "title": "" }, { "docid": "3db40b5afdbe41ccbff47bb3be446679", "score": "0.61746687", "text": "function isymphony_modify_location_get() {\n\tglobal $db;\t\n\t$query = \"SELECT * FROM isymphony_location\";\n\t$results = $db->query($query);\n\tif((DB::IsError($results)) || (empty($results))) {\n\t\treturn null;\n\t} else {\n\t\t$results = $results->fetchRow(DB_FETCHMODE_ASSOC);\n\t\treturn $results;\n\t}\n}", "title": "" }, { "docid": "cdde8d80086d78df1bf1e02234e27971", "score": "0.6163716", "text": "public function getLocations($status)\n {\n $businessId = $this->getBusinessID();\n $locations = DB::table('LOCATION')\n ->where([\n ['businessID', $businessId],\n ['locationStatus',$status],\n ])\n ->select('locationID','address1','address2','city','state','postalCode','email','phone','locationStatus')\n ->orderby('locationID', 'asc')->get();\n return $locations;\n }", "title": "" }, { "docid": "422b32ccac0e26fab9e0865d164299a8", "score": "0.6156356", "text": "public function index()\n {\n if (isset($_GET['keyword'])) {\n $locations = $this->locationRepository->search('name', $_GET['keyword'], Config::get('paginate.default'));\n } else {\n $locations = $this->locationRepository->paginate(Config::get('paginate.default'));\n }\n $data = compact('locations');\n\n return view('admin.locations.index', $data);\n }", "title": "" }, { "docid": "8ec2c5409232fe281053f9b4c71c3c3c", "score": "0.6147633", "text": "public function getPageLocations()\n {\n return $this->pageLocations;\n }", "title": "" }, { "docid": "54585934606c6034aff7783deb670551", "score": "0.6145922", "text": "public function index()\n {\n \t$locations = Location::where('user_id', '=', Auth::user()->id)->get();\n\n \treturn view('beacons.locations',['locations' => $locations]);\n }", "title": "" }, { "docid": "fc22b0169f0af4aa6e8949f2a3c3411b", "score": "0.6135509", "text": "public function locations()\n {\n return $this->hasMany(Location::class);\n }", "title": "" }, { "docid": "fc22b0169f0af4aa6e8949f2a3c3411b", "score": "0.6135509", "text": "public function locations()\n {\n return $this->hasMany(Location::class);\n }", "title": "" }, { "docid": "ababd5f7cdaded389dd8dafcb8e94ac3", "score": "0.61292726", "text": "public function listAll( ){\n\t\t$sql = \"SELECT * FROM regiao_administrativa\";\n\t\t$result = $this->connection->base->Execute( $sql ); //Show if the result of a function was successful\n\t\t/**\n\t \t* While to alphabetically order of administrative regions\n\t \t*\n\t \t*/\n\t\twhile( $register = $result->FetchNextObject( ) )\n\t\t{\n\t\t\t$raData = new RegiaoAdministrativa( ); //Instance of RA for use the datas\n\t\t\t$raData->__constructOverload( $register->ID_REGIAO_ADMINISTRATIVA,\n\t\t\t\t\t\t\t\t\t\t $register->NOME );\n\t\t\t$raReturn[] = $raData; //Array for return all the RAs\n\t\t}\n\t\treturn $raReturn;\n\t}", "title": "" }, { "docid": "6e4677d0f16ac28136e35c12e7aece93", "score": "0.6126861", "text": "public function gelAllRooms()\n {\n return $this->hc->get_rooms();\n }", "title": "" }, { "docid": "3f1158181d9ada547c6fdfdd6e85d2dd", "score": "0.6124013", "text": "function getGripesByLocation() {\r\n}", "title": "" }, { "docid": "6c8cdce55491b80889b62bdbc6e63ed6", "score": "0.611525", "text": "protected function locations()\n {\n return $this->hasMany('App\\Locations', 'comp_id');\n }", "title": "" }, { "docid": "e3f30e1458a2edd0bf8fe89f4c4317d4", "score": "0.6112461", "text": "public function GetLocationListOptions()\r\n {\r\n $pData = $this->input->post();\r\n\r\n $key = $this->api->addapikey();\r\n $url = $this->apiurl.$this->mbase.\"GetLocationListOptions?key=\".$key.\"&cityid=\".$pData['cityid'];\r\n\r\n $res = $this->callAPI('POST',$url,$pData);\r\n\r\n echo $res;\r\n\r\n }", "title": "" }, { "docid": "40cc320c14f2d9c83a5fa2347226815c", "score": "0.6109961", "text": "public function getAdmins() ;", "title": "" }, { "docid": "875c3dfa09b05b49945b80cfd579207c", "score": "0.6101373", "text": "function locations() {\n\n\t$labels = array(\n\t\t'name' => 'Locations',\n\t\t'singular_name' => 'Location',\n\t\t'menu_name' => 'Locations',\n\t\t'name_admin_bar' => 'Location',\n\t\t'archives' => 'Location Archives',\n\t\t'attributes' => 'Location Attributes',\n\t\t'parent_item_colon' => 'Parent Item:',\n\t\t'all_items' => 'All Locations',\n\t\t'add_new_item' => 'Add New Location',\n\t\t'add_new' => 'Add New',\n\t\t'new_item' => 'New Location',\n\t\t'edit_item' => 'Edit Location',\n\t\t'update_item' => 'Update Location',\n\t\t'view_item' => 'View Location',\n\t\t'view_items' => 'View Locations',\n\t\t'search_items' => 'Search Locations',\n\t\t'uploaded_to_this_item' => 'Uploaded to this item',\n\t\t'items_list' => 'Locations list',\n\t\t'items_list_navigation' => 'Locations list navigation',\n\t\t'filter_items_list' => 'Filter Locations list',\n\t);\n\t$capabilities = array(\n\t\t'edit_post' \t\t=> \"edit_location\",\n 'read_post' \t\t=> \"read_location\",\n 'delete_post' \t=> \"delete_location\",\n 'edit_posts' \t=> \"edit_locations\",\n 'edit_others_posts' \t=> \"edit_others_locations\",\n 'publish_posts' \t=> \"publish_locations\",\n 'read_private_posts' => \"read_private_locations\",\n 'read' => \"read\",\n 'delete_posts' => \"delete_locations\",\n 'delete_private_posts' => \"delete_private_locations\",\n 'delete_published_posts' => \"delete_published_locations\",\n 'delete_others_posts' => \"delete_others_locations\",\n 'edit_private_posts' => \"edit_private_locations\",\n 'edit_published_posts' => \"edit_published_locations\",\n\t);\n\t$args = array(\n\t\t'label' => 'Location',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'author', 'thumbnail','revisions','page-attributes' ),\n\t\t'taxonomies' => array( 'treatment', 'condition' ),\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 30,\n\t\t'menu_icon' => plugin_dir_url( __FILE__ ) .'../admin/admin-icons/locations-icon.png',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capabilities' => $capabilities,\n\t\t'show_in_rest' => true,\n\t\t'rest_base' => 'location',\n\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t);\n\tregister_post_type( 'location', $args );\n\n}", "title": "" }, { "docid": "982a0ac9adf91386e48cbe646aeff0ca", "score": "0.6100229", "text": "static function getLocations($asObject=FALSE){\n $params = new JParameter();\n $locationObject = new modRseventsProLocations();\n $locations = $locationObject->getLocations($params);\n $locationNames = array();\n foreach ($locations as $location) {\n $locationNames[] = $location->name;\n }\n $locationJSOption = '[\"'.implode('\",\"', $locationNames).'\"]';\n if($asObject){\n return $locations;\n }else{\n return $locationJSOption;\n }\n }", "title": "" }, { "docid": "e209c15c9c21e7c758fbb55c767f17b9", "score": "0.6098827", "text": "public function equipementListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn gestion::lister(\"EquipementLocation\");//type array\n\t}", "title": "" }, { "docid": "4f9f9348b013c9b81a637dee895dd59a", "score": "0.6095764", "text": "public function index(Request $request)\n {\n $user = User::find(auth()->user()->id);\n\n $locations = new Location();\n\n return $locations->where('user_id', $user->id)->get();\n }", "title": "" }, { "docid": "2c10a84980e8fd4593db46d60fcb4594", "score": "0.6085325", "text": "public function actionMap()\n {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return Place::find()->where(['city_id' => Yii::$app->places->city->id])->select('name, latitude, longitude')->all();\n }", "title": "" }, { "docid": "19b8aaaeaacf8eed8ff312f0405b6c34", "score": "0.60826105", "text": "public function display_location_list(){\n\t\tif ($this->checkLogin('CA') == ''){\n\t\t\tredirect('deals_crm');\n\t\t}else {\n\t\t\t$this->data['heading'] = 'Location List';\n\t\t\t$condition = array();\n\t\t\t$this->data['locationList'] = $this->location_model->get_all_details(LOCATIONS,$condition);\n\t\t\t$this->load->view('crmadmin/country/display_location',$this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "dbe8c9b9bd4f73ea6b5b1a67f25df36d", "score": "0.60796005", "text": "public function index()\n {\n $logins = UserLogin::latest()->with('user')->get();\n return view('setting::geoLocation', compact('logins'));\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "8d8540f28b492a454cec2f193e88abdb", "score": "0.0", "text": "public function run(){\n\n \\DB::table('pets')->delete();\n\n \\DB::table('pets')->insert([\n 'name' => str_random(10),\n 'microchip_number' => str_random(10),\n 'breed_id' => 5,\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now()\n ]);\n }", "title": "" } ]
[ { "docid": "3effe352cb75bfa3e7358363ac687bc0", "score": "0.7981595", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n users::truncate();\n\n $faker = \\Faker\\Factory::create();\n $password = Hash::make('123456');\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n users::create([\n 'UserName' => $faker->firstName,\n 'password' => $password,\n 'Name' => $faker->name,\n 'email' => $faker->email,\n 'UserNumber' => $faker->phoneNumber,\n 'UserAdress' => $faker->address,\n 'Permission' => $faker->randomElement($array = array ('1','2','9')),\n 'Active' => $faker->randomElement($array = array ('0','1')),\n ]);\n }\n }", "title": "" }, { "docid": "5ccf2c7a92853ef9c8e792d67c0e3805", "score": "0.7979885", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \n Users::factory(100)->create();\n Posts::factory(100)->create();\n tags::factory(100)->create();\n categories::factory(100)->create();\n post_tags::factory(100)->create();\n images::factory(100)->create();\n }", "title": "" }, { "docid": "463d4c9c0161c195b0844e7e1e72956f", "score": "0.7963899", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n factory(App\\User::class, 5)->create();\n factory(App\\Post::class, 20)->create();\n factory(App\\Comment::class, 30)->create();\n factory(App\\Tag::class, 8)->create();\n\n\n\n // $users->each(function($users){\n // $users->posts()\n // ->saveMany(factory(App\\Post::class, 3)\n // ->make(['user_id' => mt_rand(1, 5)]));\n // });\n //mt_rand(0, 5) Each user has 0-5 comments. \n\n // for($i=0; $i<25; $i++){\n // factory(App\\Comment::class)->create([\n // 'user_id' => mt_rand(1, 5),\n // 'post_id' => mt_rand(1, 5),\n // ]);\n // };\n }", "title": "" }, { "docid": "59495b25168215ccc3c6ebec1964fbc7", "score": "0.7954716", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Pets::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 < 100; $i++) {\n Pets::create([\n 'name' => $faker->firstName($gender = null),\n ]);\n }\n }", "title": "" }, { "docid": "7e48cef15c4475b7fdf6dced93512f1e", "score": "0.7920509", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::factory(10)->create();\n Product::factory(100)->create();\n Review::factory(500)->create();\n }", "title": "" }, { "docid": "a1f1319eb4bd65c91bf95fc21b421378", "score": "0.7904644", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\"App\\User\", 15)->create();\n $organizations = [\"Aair prt\", \"ERA\", \"Adis ababa mengedoch\"]; \n foreach($organizations as $o){\n \\App\\Organization::create([\n \"name\" => $o\n ]); \n }\n\n $roles = [\"clurk\", \"department_head\", \"admin\"]; \n $i = 1; \n foreach($roles as $role){\n \\App\\Role::create([\n \"name\" => $role, \n \"id\" => $i++\n ]); \n }\n\n $departments = [\"Minister Office\", \"ICT\", \"Human resource\"];\n $users = \\App\\User::get(); \n $i = 1;\n foreach($departments as $department){\n \\App\\Department::create([\n \"name\" => $department,\n \"director_id\" => $i++\n ]);\n }\n }", "title": "" }, { "docid": "2e586ff47e703bd09163a10549e98b23", "score": "0.7900308", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Employee::truncate();\n \n $faker = \\Faker\\Factory::create(); \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Employee::create([\n 'cod_emp' => $faker->unique()->randomNumber(5),\n 'name' => $faker->unique()->name,\n 'dob' => $faker->dateTimeBetween($startDate = '-50 years', $endDate = '-20 years'),\n 'phone' => $faker->phoneNumber \n ]);\n } \n }", "title": "" }, { "docid": "0a0e6a013f027588adccb446855334e8", "score": "0.7899484", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 2)->create();\n factory(App\\Publisher::class, 5)->create();\n $books = factory(App\\Book::class, 20)->create();\n $authors = factory(App\\Author::class, 5)->create();\n\n // foreach($books as $book){\n // $book->authors()->attach(\n // $authors->random(random_int(1,3))\n // );\n // }\n\n $books->each(function(App\\Book $book) use ($authors){\n $book->authors()->attach(\n $authors->random(random_int(1,3))\n );\n });\n }", "title": "" }, { "docid": "0c4d9c27c6fa855f22780f75d97f2721", "score": "0.7890316", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Briedis',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n \n $faker = Faker::create('lt_LT');\n $authors = 10;\n $publishers = 10;\n $books = 50;\n foreach(range(1, $authors) as $_) {\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'portret' =>$faker->imageUrl(100,100),\n ]);\n }\n foreach(range(1, $publishers) as $_) {\n DB::table('publishers')->insert([\n 'title' => $faker->company(),\n ]);\n }\n foreach(range(1, $books) as $_) {\n DB::table('books')->insert([\n 'title' => str_replace(['.', \"'\", '\"', '(', ')'], '', $faker->realText(rand(10, 45))),\n 'isbn' => $faker->isbn13(),\n 'pages' => rand(22, 555),\n 'about' => $faker->realText(400, 4),\n 'author_id' => rand(1, $authors),\n 'publisher_id' => rand(1, $publishers),\n ]);\n }\n\n }", "title": "" }, { "docid": "05d0fb22d857eb1b09f369c319afe3d1", "score": "0.78862464", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i <= 20; $i++) {\n\n $cinema = App\\Cinema::create(array(\n 'name' => 'Cinema ' . $faker->lastName,\n 'address' => $faker->address,\n 'latitude' => $faker->latitude,\n 'longitude' => $faker->longitude\n ));\n\n $movie = App\\Movie::create(array(\n 'title' => $faker->sentence($nbWords = 4)\n ));\n\n // might want to make this a little more mixed up, add a couple of sessions for each movie\n $session = App\\SessionTime::create(array(\n 'movie_id' => $movie->id,\n 'cinema_id' => $cinema->id,\n 'session_time' => $faker->dateTimeThisMonth\n ));\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0e64d87115a71603278ba11368ed9805", "score": "0.787217", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \tDB::table('authors')->truncate();\n \tDB::table('books')->truncate();\n\n \tfactory(App\\Author::class, 20)->create()->each(function($author){\n \t\t$author->book()->save(factory(App\\Book::class)->make());\n \t});\n }", "title": "" }, { "docid": "353d96c1c02b984afaa0dd95caf085da", "score": "0.78630686", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('realestate_business')->insert([\n \t[\n\t 'name' => 'Locação',\n \t],\n \t[\n\t 'name' => 'Venda',\n \t],\n \t[\n\t 'name' => 'Temporada',\n \t]\n ]);\n\n DB::table('realestate_types')->insert([\n \t[\n\t 'name' => 'Apartamento',\n \t],\n \t[\n\t 'name' => 'Casa',\n \t]\n ]);\n }", "title": "" }, { "docid": "a50250407176309784dd921ae9ab5ac5", "score": "0.78588843", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('users')->insert([\n 'name' => \"Administrator\",\n 'email' =>'[email protected]',\n 'password' => Hash::make('phongvtanhkhuesaigon'),\n ]);\n\n DB::table('landing_pages')->insert([\n [\n 'id'=>1,\n 'page_name'=>'G-Shock Dream Challenge',\n ],\n [\n 'id'=>2,\n 'page_name'=>'Thông tin sự kiện G-Shock Dream Challenge',\n ],\n [\n 'id'=>3,\n 'page_name'=>'Baby BA 130',\n ]\n ]);\n\n DB::table('preorder_pages')->insert([\n [\n 'id'=>1,\n 'name_page'=>'Pre-Order'\n ]\n ]);\n\n }", "title": "" }, { "docid": "7ac015b71072fff5b48489f05c66e2d9", "score": "0.78579247", "text": "public function run()\n {\n // Usuarios\n // $roles = Role::pluck('id');\n // $users = \\App\\Models\\User::factory(20)->create();\n \n // foreach ($users as $key => $user) {\n // $user->assignRole(Arr::random($roles->toArray()));\n // }\n\n // \\App\\Models\\Category::factory(4)->create();\n // \\App\\Models\\Post::factory(50)->create();\n // \\App\\Models\\Comment::factory(80)->create();\n\n // $this->call([\n // RoleSeeder::class,\n // LikeSeeder::class\n // ]);\n }", "title": "" }, { "docid": "8a689f0585da6cfbb9f3b550ab4734a2", "score": "0.78474617", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Roles od users for ACL\n DB::table('roles')->insert(['name' => 'User','description' => 'This is default User role']);\n DB::table('roles')->insert(['name' => 'Admin','description' => 'This is Admin User role']);\n\n //Default Report for users \n DB::table('reports')->insert(['category'=>'Financial','name' => 'Balance Sheet','url' => 'balance-sheet']);\n DB::table('reports')->insert(['category'=>'Financial','name' => 'Tax Report','url' => 'tax-report']);\n DB::table('reports')->insert(['category'=>'Financial','name' => 'Cash Flow','url' => 'cash-summary']);\n DB::table('reports')->insert(['category'=>'Sales','name' => 'P & L ','url' => 'profit-loss']);\n\n \n DB::table('currencies')->insert(['name'=>'Rupee','currency_symbol'=>'₹','formal_currency_name' => 'INR','symbol_decimal_portion' => '2']);\n\n //Users dummy entry\n //factory(App\\User::class,10)->create();\n }", "title": "" }, { "docid": "e3f9ec900807bf915ace1732f5102139", "score": "0.78463626", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //dummy data for users table (1 admin, 10 trainees)\n $date = strtotime('01-11-2016');\n $new_date = date('Y-m-d',$date);\n DB::table('users')->delete();\n DB::table('users')->insert(\n ['username' => 'admin', 'name' => 'Administrator', 'role' => 'administrator', 'join_date' => $new_date, 'password'=> bcrypt('test1234') ]);\n factory(App\\User::class, 10)->create();\n\n //dummy data for topics table\n DB::table('topics')->delete();\n DB::table('topics')->insert([\n ['name' => 'Adobe Photoshop', 'description' =>'Adobe Photoshop is a raster graphics editor developed and published by Adobe Systems for macOS and Windows. Photoshop was created in 1988 by Thomas and John Knoll.'],\n ['name' => 'Adobe Illustrator', 'description' =>'Adobe Illustrator is a vector graphics editor developed and marketed by Adobe Systems. The latest version, Illustrator CC 2015.3, is the twentieth generation in the product line.']\n ]);\n }", "title": "" }, { "docid": "bc5e199834710c473d7b489d3205a10e", "score": "0.7841552", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Apartament::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 Apartament::create([\n 'address' => $faker->address,\n 'neighbor' => $faker->country,\n 'state' => $faker->city,\n 'vacancy' => $faker->boolean(),\n ]);\n }\n }", "title": "" }, { "docid": "68d01c821b54175bec241cbdc2ea6b1d", "score": "0.7839204", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n //factory(App\\User::class, 250)->create();\n\n $categories = array(\n 'Ação',\n 'Animação',\n 'Aventura',\n 'Biografia',\n 'Comédia',\n 'Crime',\n 'Documentário',\n 'Drama',\n 'Esporte',\n 'Família',\n 'Fantasia',\n 'Faroeste',\n 'Ficção',\n 'Guerra',\n 'História',\n 'Mistério',\n 'Musical',\n 'Policial',\n 'Romance',\n 'Suspense',\n 'Terror'\n );\n foreach($categories as $category){\n Category::create([\n 'name' => $category\n ]);\n }\n \n // Subtitle::create([\n // 'name' => 'Stranger things',\n // 'year' => 2019,\n // 'url' => 'https://www.google.com/',\n // 'episode' => 's03e03',\n // 'type' => 'SERIE',\n // 'image' => '',\n // 'status' => 'APROVADA',\n // 'author' => 1,\n // 'category' => $category->id\n // ]);\n\n // factory(App\\Subtitle::class, 100)->create();\n\n // SubtitleProgress::create([\n // 'name' => 'Serie em andamento',\n // 'percent' => 80,\n // 'author' => 1\n // ]);\n \n // Gallery::create([\n // 'name' => 'peaky_blinders',\n // 'tags' => 'ciganos gangue mafia peaky blinders',\n // 'image' => 'img/subtitles/1.jpg'\n // ]);\n\n // Gallery::create([\n // 'name' => 'stranger_things',\n // 'tags' => 'ficção científica terror stranger things',\n // 'image' => 'img/subtitles/2.jpg'\n // ]);\n }", "title": "" }, { "docid": "a588006023396ad869db35ab527a8de3", "score": "0.7834768", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n App\\User::create([\n 'name' => 'Edwin Berrones',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n factory(App\\User::class,7)->create();\n\n App\\Page::create([\n 'parent_id' => null,\n 'title' =>'Quienes Somos',\n 'slug' => 'quienes-somos',\n 'body' => 'Contenido de quienes somos'\n ]);\n App\\Page::create([\n 'parent_id' => 1,\n 'title' =>'Mision',\n 'slug' => 'mision',\n 'body' => 'Contenido de mision'\n ]);\n App\\Page::create([\n 'parent_id' => 1,\n 'title' =>'Visión',\n 'slug' => 'vision',\n 'body' => 'Contenido de visión'\n ]);\n }", "title": "" }, { "docid": "23fc2582c778ab121016a1dcfdd759ea", "score": "0.783114", "text": "public function run()\n {\n // factory(App\\User::class,3)->create()->each( function ($u){\n // $u->questions()\n // ->saveMany(\n // factory(App\\Question::class,rand(1,10))->make()\n // )\n // ->each( function ($q){\n // $q->answers()->saveMany(\n // factory(App\\Answer::class,rand(1,10))->make());\n // });\n // });\n $this->call([\n UsersQuestioinsAnswersTableSeeder::class,\n FavoritesTableSeeder::class,\n ]);\n\n\n }", "title": "" }, { "docid": "be996d54e9fb664edd803dd89c0dc4bd", "score": "0.7825527", "text": "public function run()\n {\n $faker = Faker::create();\n \n $usersFirstId = DB::table('users')->first()->id;\n $usersLastId = DB::table('users')->orderBy('id', 'desc')->first()->id;\n \n $bookFirstId = DB::table('books')->first()->id;\n $bookLastId = DB::table('books')->orderBy('id', 'desc')->first()->id;\n\n foreach(range(1, 1000) as $index)\n {\n $title = $faker->unique()->sentence(6, true);\n\n App\\Chapter::create([\n 'title' => $title,\n 'body' => $faker->paragraphs(10, true),\n 'user_id' => $faker->numberBetween($usersFirstId, $usersLastId),\n 'book_id' => $faker->numberBetween($bookFirstId, $bookLastId),\n 'chapter_number' => $faker->numberBetween(1, 100),\n ]);\n }\n }", "title": "" }, { "docid": "f6dc4609cca6cf6bd78a9f97198e56a4", "score": "0.7819647", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 3)->create()->each(function ($u){\n// $u->questions()\n// ->saveMany(\n// factory(\\App\\Entities\\Question::class, 10)->make()\n// )->each(function ($q){\n// $q->answers()->saveMany(\n// factory(\\App\\Entities\\Answer::class, 5)->make());\n// });\n// });\n\n $this->call([\n UsersQuestionsAnswersSeederTable::class,\n FavoritesTableSeeder::class,\n VotablesTableSeeder::class\n ]);\n }", "title": "" }, { "docid": "956f25a4c7cc9da2e0a940bb5265e60c", "score": "0.78092104", "text": "public function run()\n {\n $this->call([PostSeeder::class, TestimonialSeeder::class, FeatureSeeder::class, UserSeeder::class, SupplierSeeder::class, PelangganSeeder::class, BarangSeeder::class]);\n Post::factory(100)->create();\n Testimonial::factory(100)->create();\n Feature::factory(100)->create();\n User::factory(100)->create();\n Supplier::factory(100)->create();\n Pelanggan::factory(100)->create();\n Barang::factory(100)->create();\n }", "title": "" }, { "docid": "f8ac191c4299c4107519bcb4cdccfa6d", "score": "0.78073287", "text": "public function run()\n {\n Test::create([\n 'title' => 'Geography quiz',\n 'description' => 'Level Medium',\n 'creator_id' => 1\n ]);\n\n Test::create([\n 'title' => 'Film quiz',\n 'description' => 'Easy Level',\n 'creator_id' => 1\n ]);\n\n Test::create([\n 'title' => 'Quiz About Serbia',\n 'description' => 'Interesting quiz about Serbia',\n 'creator_id' => 1\n ]);\n }", "title": "" }, { "docid": "20041f6c95a7ad095fc34d5c8643d83b", "score": "0.7797085", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $faker = \\Faker\\Factory::create();\n \n\n for ($i = 0; $i < 5; $i++) {\n Brand::create([\n 'brand' => $faker->colorName,\n ]);\n }\n\n for ($i = 0; $i < 1000; $i++) {\n Product::create([\n 'title' => $faker->firstName,\n 'brand_id' => $faker->randomFloat(0, 1, 5),\n 'price' => $faker->randomFloat(2, 1, 200),\n 'stock' => $faker->randomDigitNotNull,\n ]);\n }\n\n }", "title": "" }, { "docid": "25e6cdb62aff5d94a16d69a5439214ae", "score": "0.779697", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n //resetea los datos en la tabla\n DB::table('users')->truncate();\n\n //generar 3 dummy data\n $faker = Factory::create();\n DB::table('users')->insert([\n [\n 'name' => 'Felipe Guzman',\n 'slug' => 'felipe-guzman',\n 'email' => '[email protected]',\n 'password' => bcrypt('abc123'),\n 'bio' => $faker->text(rand(250,300)),\n ],\n [\n 'name' => 'Zenyan Aguilar',\n 'slug' => 'zenyan-aguilar',\n 'email' => '[email protected]',\n 'password' => bcrypt('abc123'),\n 'bio' => $faker->text(rand(250,300)),\n ],\n [\n 'name' => 'Sairam Victor',\n 'slug' => 'sairam-victor',\n 'email' => '[email protected]',\n 'password' => bcrypt('abc123'),\n 'bio' => $faker->text(rand(250,300)),\n ],\n ]);\n }", "title": "" }, { "docid": "32a2232f3d1d5ea08df727a9c7a69d75", "score": "0.779003", "text": "public function run()\n {\n $this->call(DefaultSeeder::class) ;\n factory(\\App\\Models\\Plan::class , 4)->create() ;\n factory(\\App\\Models\\User::class , 4)->create() ;\n factory(\\App\\Models\\Skill::class , 5)->create() ;\n factory(\\App\\Models\\Tag::class , 5)->create() ;\n factory(\\App\\Models\\Team::class , 5)->create() ;\n factory(\\App\\Models\\Offer::class , 10 )->create() ;\n }", "title": "" }, { "docid": "f15513b08c6fda42784450f41d980b0b", "score": "0.7789292", "text": "public function run()\n {\n Eloquent::unguard();\n $faker = Faker::create();\n\n User::create(array(\n 'username' => 'admin',\n 'password' => Hash::make('1234'),\n 'email' => $faker->email,\n 'real_name' => 'Admin',\n 'bio' => $faker->paragraph(2),\n 'status' => rand(1,2),\n 'role' => rand(1,3)\n ));\n\n foreach(range(1, 5) as $index) {\n\n User::create(array(\n 'username' => $faker->username,\n 'password' => Hash::make('1234'),\n 'email' => $faker->email,\n 'real_name' => $faker->name,\n 'bio' => $faker->paragraph(2),\n 'status' => rand(1,2),\n 'role' => rand(1,3)\n ));\n }\n }", "title": "" }, { "docid": "e4c9ba7954feb9cfa0a7fefe094d8564", "score": "0.77871126", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $faker = Faker::create();\n\n foreach(range(1,10) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->firstName().\" \".$faker->lastName(),\n 'email' => $faker->email(),\n 'password' => $faker->password(8, 10)\n ]);\n }\n\n foreach(range(1,500) as $index) {\n DB::table('posts')->insert([\n 'title' => \"Test title \".$index,\n 'user_id' => rand(1, 10),\n 'created_at' => $faker->dateTime(),\n 'description' => $faker->realText(300)\n ]);\n }\n\n foreach(range(1,100) as $index) {\n DB::table('api_settings')->insert([\n 'user_id' => rand(1, 10),\n 'created_at' => $faker->dateTime(),\n 'api_url' => $faker->url(),\n 'execute_duration_min' => $faker->randomDigitNotZero(),\n 'active' => 1\n ]);\n }\n }", "title": "" }, { "docid": "0e08ab7cad8ab347ef3e18b50142ec83", "score": "0.7782642", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Companies::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 Companies::create([\n 'name' => $faker->sentence,\n 'address' => $faker->paragraph,\n 'register' => $faker->sentence,\n 'register' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "cd7e32e7e364836a454670866b3d074c", "score": "0.7780464", "text": "public function run()\n {\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n $sports = \\App\\Sport::count();\n $athletes = \\App\\Athlete::all();\n \n \\App\\AthleteSport::truncate();\n\n foreach($athletes as $athlete) {\n $faker = Faker::create();\n $num = $faker->numberBetween($min = 1, $sports);\n foreach (range(1, $num) as $index) {\n \t$athleteSport = null;\n $athleteSport = [\n \t\t'athlete_id' => $athlete->id,\n \t \t'sport_id' => $faker->unique()->numberBetween($min = 1, $sports),\n \t];\n \\App\\AthleteSport::insert($athleteSport);\n }\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "fcdf580f296bd0e60026617575d35bfb", "score": "0.7779978", "text": "public function run()\n {\n //the seeds for the database\n $faker = Faker\\Factory::create();\n \n // add 50 rows of random data \n for ($i=0; $i < 100; $i++) { \n \tDB::table('people')->insert([\n 'fullname' => $faker->name,\n 'email' => $faker->safeEmail,\n 'username' => $faker->userName,\n 'bio' => $faker->paragraphs(3, true), // 3 paragraphs\n 'dob' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'country' => $faker->country,\n 'created_at' => $faker->dateTime(),\n 'updated_at' => $faker->dateTime(),\n ]);\n }\n }", "title": "" }, { "docid": "116c4c002815026563a6ef61bdcb8adf", "score": "0.77790236", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $user = [\n [\n 'id' => 1,\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => '$2y$10$VOunUZVMv4bwC84FJngVdORh/3WOQsLYXcHOTcmsVFWTVWWg.V8/i',\n ],\n [\n 'id' => 2,\n 'name' => 'Moderator1',\n 'email' => '[email protected]',\n 'password' => '$2y$10$VOunUZVMv4bwC84FJngVdORh/3WOQsLYXcHOTcmsVFWTVWWg.V8/i',\n ]\n ];\n\n User::insert($user);\n $roles = [\n [\n 'id' => 1,\n 'slug' => 'admin',\n 'name' => 'admin',\n ],\n [\n 'id' => 2,\n 'slug' => 'moderator',\n 'name' => 'moderator',\n ]\n ];\n\n Role::insert($roles);\n DB::insert('insert into role_users (user_id , role_id ) values (?, ?)', [1, 1]);\n DB::insert('insert into role_users (user_id , role_id ) values (?, ?)', [2, 2]);\n }", "title": "" }, { "docid": "3c949d52077e0db0bf7c90f5b29eabad", "score": "0.77679646", "text": "public function run() {\n // $this->call([\n // // UsersTableSeeder::class,\n // CategoriesTableSeeder::class,\n // FeaturesTableSeeder::class,\n // CategoriesFeaturesTableSeeder::class,\n // ]);2\n $faker = Faker::create();\n \tforeach (range(1,1000) as $index) {\n // DB::table('users')->insert([\n // 'name' => $faker->name,\n // 'email' => $faker->email,\n // 'password' => '$2y$10$KVtGj.pcxfb9LULEfl.V5e9thw7uD/EltKyF.YLM5I.62p12AW.M6'\n // ]);\n }\n \n }", "title": "" }, { "docid": "c338a8143abd0aa6de80d25bcd16e5db", "score": "0.7763477", "text": "public function run()\n {\n User::create([\n 'name' => 'Mark Timbol',\n 'email' => '[email protected]',\n 'password' => bcrypt('marktimbol')\n ]);\n\n $this->call(CategoriesTableSeeder::class);\n $this->call(CountriesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(CommunitiesTableSeeder::class);\n $this->call(DeveloperProjectsTableSeeder::class);\n \n $dubaiMarina = Community::whereSlug('dubai-marina')->first();\n $dubaiMarinaProjects = factory(Project::class, 20)->create();\n $dubaiMarina->projects()->attach($dubaiMarinaProjects);\n\n $alBarsha = Community::whereSlug('al-barsha')->first();\n $alBarshaProjects = factory(Project::class, 20)->create();\n $alBarsha->projects()->attach($alBarshaProjects);\n }", "title": "" }, { "docid": "5af20842f0b240dcaf799e4568ffce6d", "score": "0.77591217", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n\n factory(User::class,10)->create();\n factory(Category::class,15)->create();\n factory(Post::class,50)->create();\n factory(Tag::class,15)->create();\n factory(Comment::class,120)->create();\n factory(Reply::class,130)->create();\n factory(PostTags::class,130)->create();\n }", "title": "" }, { "docid": "da5fffc94550003fbe56b2c441388391", "score": "0.7752597", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create('es_ES');\n factory(\\App\\User::class)->create(['name'=>'Jaime', 'email'=>'[email protected]']);\n factory(\\App\\User::class, 10)->create();\n factory(\\App\\Pedido::class,300)->create(['estado'=>'1']);\n factory(\\App\\Pedido::class,4)->create(['ciclo'=>4, 'tipo'=>1]);\n factory(\\App\\Pedido::class,2)->create(['ciclo'=>4, 'tipo'=>2]);\n factory(\\App\\Pedido::class,20)->create(['ciclo'=>4, 'tipo'=>0]);\n\n\n for ($x=1;$x<10;$x++)\n factory(\\App\\Pedido::class,30)->create(['ciclo'=>'-'.$x, 'estado'=>1]);\n }", "title": "" }, { "docid": "5ca13e4d8e9752ae47bfa4492ce893c5", "score": "0.77516305", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Storage::disk('public')->deleteDirectory('img/products');\n Storage::disk('public')->makeDirectory('img/products');\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n factory(User::class, 1000)->create();\n factory(Category::class, 35)->create();\n factory(Product::class, 1000)->create()->each(\n function($producto) {\n $categorias = Category::all()->random(mt_rand(1,5))->pluck('id');\n $producto->categories()->attach($categorias);\n }\n );\n\n // factory(Product::class, 5)->create();\n factory(Transaction::class, 1000)->create();\n }", "title": "" }, { "docid": "1aeb0f6e2c20aac4aaddb740c61f3cf4", "score": "0.7746306", "text": "public function run()\n { \n $this->call(ClubsTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n \n factory(App\\User::class, 12*16)\n ->create()\n ->each(function ($user) {\n $user->posts()->saveMany(factory(App\\Post::class,3)->make());\n });\n \n $roles = App\\Role::where('id', 1)->orWhere('id',2)->get();\n \n // Populate the pivot table\n App\\User::all()->each(function ($user) use ($roles) { \n $user->roles()->attach(\n $roles->random(rand(1, 2))->pluck('id')->toArray()\n ); \n });\n \n $this->call(AdminsTableSeeder::class);\n }", "title": "" }, { "docid": "8e478ab8956c119c1daa5a85db8f26c0", "score": "0.77443904", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(GeneroSeeder::class);\n $this->call(AutorSeeder::class);\n \\App\\Models\\Autor::factory(20)->create();\n $this->call(AlbumSeeder::class);\n \\App\\Models\\Album::factory(20)->create();\n //$this->call(MusicSeeder::class);\n \\App\\Models\\Music::factory(100)->create();\n $this->call(UserSeeder::class);\n \\App\\Models\\Playlist::factory(15)->create();\n }", "title": "" }, { "docid": "77387d5346be4ebc32ea82a84ad1c0b3", "score": "0.77421665", "text": "public function run()\n {\n\n\t\tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('answers')->truncate();\n\n $faker = Faker::create();\n \t$questions = Db::table('questions')->lists('id') ;\n\n \tforeach (range(1,200) as $key => $value ) {\n\n \t\tAnswer::create([ \t\t\n \t\t'body'=>$faker->paragraph(1),\n \t\t'question_id'=>$faker->randomElement($questions) ,\n \t\t'type'=>$faker->boolean(40) ,\n \t\t\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": "0706cff7931a6fd371675b0f69a9d51e", "score": "0.77419823", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n\t DB::table('test')->insert([\n\t 'title' => $faker->realText(100),\n\t 'description' => $faker->paragraph,\n\t ]);\n\t}\n //\n }", "title": "" }, { "docid": "63957e597c45497e1cd3421c8405524c", "score": "0.7739582", "text": "public function run()\n {\n /**\n * IMPORTANT!\n * The database seed is written to handle the task centralized\n * It should use:\n * php artisan db:seed\n * -> You can not run the seeds separately, it could cause errors!\n */\n if (App::environment() === 'production') exit();\n\n Eloquent::unguard();\n\n // Truncate all tables, except migrations\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n $tables = DB::select('SHOW TABLES');\n foreach ($tables as $table) {\n if ($table->{'Tables_in_' . env('DB_DATABASE')} !=='migrations')\n DB::table($table->{'Tables_in_' . env('DB_DATABASE')})->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n factory(User::class, 5)->create();\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n\n $this->call(CategoriesTableSeeder::class);\n factory(Category::class, 10)->create();\n\n factory(Post::class, 100)->create();\n\n factory(Tag::class, 20)->create();\n $this->call(PostTagTableSeeder::class);\n\n factory(Comment::class, 250)->create();\n }", "title": "" }, { "docid": "49b2b4ac0093486f3766a78be628cf9d", "score": "0.77362096", "text": "public function run()\n {\n // disable foreign key constraints\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Let's clear the users table first\n Post::truncate();\n $faker = \\Faker\\Factory::create();\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 20; $i++) {\n Post::create([\n 'user_id' => $faker->randomElement(User::pluck('id')->toArray()),\n 'product_id' => $faker->randomElement(Product::pluck('id')->toArray()),\n 'content' => $faker->text,\n 'rate' => $faker->numberBetween($min = 0, $max = 5),\n 'type' => random_int(1, 2),\n 'status' => 0,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n }\n\n // enable foreign key constraints\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "97a1ea8742a6ef6fb3e2139bb57564a2", "score": "0.7729526", "text": "public function run()\n {\n\n factory(User::class, 50)->create();\n factory(Post::class, 500)->create();\n factory(Category::class, 500)->create();\n factory(Tag::class, 500)->create();\n\n\n foreach(range(1, 500) as $index) {\n DB::table('post_tag')->insert([\n 'post_id' => rand(1,500),\n 'tag_id' => rand(1,500)\n ]);\n }\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "55e769395ecdcc89e6b64f247fbd3518", "score": "0.77293444", "text": "public function run()\n {\n factory(Category::class,10)->create();\n factory(User::class,10)->create();\n factory(Page::class,100)->create();\n factory(Post::class,10)->create();\n $this->call(SettingTableSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "42ea8b4b43fab2b1cead746a505bfabd", "score": "0.7729193", "text": "public function run()\n {\n // Create the user seed data first\n factory(App\\User::class, 3)->create();\n\n // For each row in user table, seed the question table using the user id\n App\\User::all()->each(function ($user) {\n $user->questions()->saveMany(\n factory(App\\Question::class, rand(1, 5))->make()\n );\n });\n\n // For each row in question table, seed the answer table using the question id\n App\\Question::all()->each(function($question) {\n $question->answers()->saveMany(\n factory(App\\Answer::class, rand(1, 5))->make()\n );\n });\n\n // Generate best answer\n// App\\Question::all()->each(function($question) {\n// $answers = $question->answers->all();\n// $random_index = rand(0, count($answers) - 1);\n// $question->best_answer_id = $answers[$random_index]->id;\n// $question->save();\n// });\n }", "title": "" }, { "docid": "2e62719468d1dda1ea398517e921623f", "score": "0.772829", "text": "public function run()\n\t{\n\t\t// DB::table('seasons')->truncate();\n\n\t\t$seasons = Seasons::create(\n\t\t\tarray(\n\t\t\t\t'year' => '2015',\n\t\t\t\t'name' => 'Test Entry',\n\t\t\t)\n\t\t);\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i = 0; $i < 100; $i++)\n\t\t{\n\t\t\t$seasons = Seasons::create(\n\t\t\t\tarray(\n\t\t\t\t\t'year' => $faker->year+1,\n\t\t\t\t\t'name' => $faker->name\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('seasons')->insert($seasons);\n\t}", "title": "" }, { "docid": "8611f202e38780592c9ef29ea2f0b791", "score": "0.77242553", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('categories')->insert(\n [\n 'category' => 'СТИЛЬ ЖИЗНИ',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]\n );\n DB::table('categories')->insert(\n [\n 'category' => 'ПРИРОДА',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'НАУКА И ТЕХНОЛОГИИ',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n DB::table('categories')->insert([\n 'category' => 'СПОРТ',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('Test'),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }", "title": "" }, { "docid": "23dbacb2bda791ceb293720ba888b3c7", "score": "0.7723611", "text": "public function run()\n {\n \n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Admin::create([\n 'Nome' => \"Peppino\".$i,\n 'Cognome' => \"Di Capri\".$i,\n 'Partita_IVA' => \"ABSNAP\".$i,\n 'Cellulare' => 3292403737\n ]);\n }\n }", "title": "" }, { "docid": "e00bfb565b59d9ca4418a2f07e3210d4", "score": "0.7722183", "text": "public function run()\n {\n //\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('eleves')->insert([\n\t 'eleveNom' => $faker->name,\n\t 'elevePrenom' => $faker->name,\n 'eleveEmail' => $faker->email,\n 'eleveMotDePasse' => bcrypt('secret'),\n\t ]);\n }\n }", "title": "" }, { "docid": "af1bb381c09ff7c49767eac3a7795980", "score": "0.7715914", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::statement('TRUNCATE roles;');\n DB::statement('TRUNCATE users;');\n DB::statement('TRUNCATE permissions;');\n DB::statement('TRUNCATE model_has_roles;');\n DB::statement('TRUNCATE model_has_permissions;');\n DB::statement('TRUNCATE role_has_permissions;');\n // $this->call(UsersTableSeeder::class);\n\t$this->call(PermissionSeed::class);\n $this->call(RoleSeed::class);\n $this->call(UserSeed::class);\n $this->call(ClientSeed::class);\n DB::statement(\"UPDATE users SET client_id=(SELECT id FROM clients WHERE email='[email protected]' LIMIT 1) WHERE id IN (4,5,6);\");\n $this->call(PaymentSeed::class);\n// \n $this->call(SettingSeed::class);\n $this->call(InvoiceSeed::class);\n $this->call(InvoiceItemSeed::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "af1beeb0278e75da32ba9d81befedab8", "score": "0.771235", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('vendings')->insert([\n [\n 'name' => '飲み物A',\n 'price' => 50,\n 'store' => 20,\n ],\n [\n 'name' => '飲み物B',\n 'price' => 100,\n 'store' => 20,\n ],\n [\n 'name' => '飲み物C',\n 'price' => 1000,\n 'store' => 20,\n ],\n ]);\n\n DB::table('money')->insert([\n [\n 'money' => 10000000,\n ],\n ]);\n }", "title": "" }, { "docid": "8f3176b2c1372354ce4d072983bd96dd", "score": "0.7711102", "text": "public function run()\n {\n $faker = Faker::create('en_EN');\n\n DB::table('users')->insert([\n 'name' => 'Udra',\n 'email' => '[email protected]',\n 'password' => Hash::make('321'),\n ]);\n\n $titles = ['Nile', 'Amazon', 'Yangtze (Chang Jiang)', 'Mississippi - Missouri', 'East China Sea', 'Bering Sea', 'Salisbury Steak', 'Lena', 'Tocantins', 'Congo', 'Mississippi', 'Baltic Sea'];\n foreach (range(1, 20) as $_) {\n DB::table('reservoirs')->insert([\n 'title' => $titles[rand(0, count($titles) - 1)],\n 'area' => rand(1, 10000),\n 'about' => $faker->realText(300, 5),\n 'photo' => rand(0, 2) ? $faker->imageUrl(200, 250) : null,\n ]);\n }\n \n foreach(range(1, 200) as $_) {\n DB::table('members')->insert([\n 'name' => $faker->firstname,\n 'surname' => $faker->lastname,\n 'live' => $faker->city,\n 'experience' => rand(1, 75),\n 'registered' => rand(1942, 2021),\n 'reservoir_id' => rand(1, 20),\n ]);\n }\n\n }", "title": "" }, { "docid": "b48e5de7a6a0d2cac77c79b391688816", "score": "0.77105963", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Admin::class, 10)->create();\n factory(Teacher::class, 5)->create();\n }", "title": "" }, { "docid": "b25778737debb82bd77f23b2efb424d1", "score": "0.77104986", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n User::truncate();\n Countrie::truncate();\n Gender::truncate();\n Language::truncate();\n Marital_status::truncate();\n Tp_doc::truncate();\n \n // $this->call(UsersTableSeeder::class);\n $this->call(GendersTableSeeder::class);\n $this->call(LanguagesTableSeeder::class);\n $this->call([\n MaritalStatusTableSeeder::class,\n TpDocTableSeeder::class\n ]);\n \n $numberOfCountries = 10;\n $numberOfGeoDiv = 6;\n $numberOfUsers = 4;\n // $numberGenders = 2;\n \n factory(Countrie::class, $numberOfCountries)->create();\n factory(Geo_div::class, $numberOfGeoDiv)->create();\n factory(User::class, $numberOfUsers)->create();\n // factory(Gender::class, $numberGenders)->create();\n \n }", "title": "" }, { "docid": "5f4d219ac831015d78b31fdb4af21b5b", "score": "0.77084506", "text": "public function run() {\n\n Model::unguard();\n\n factory(\\App\\User::class, 50)->create();\n $this->call(RoleSeeder::class);\n $this->call(RoleUserSeeder::class);\n\n// factory(\\App\\Topic::class, 100)->create();\n// factory(\\App\\Lesson::class, 800)->create();\n// factory(\\App\\Talkshow::class, 400)->create();\n\n $this->call(SubscriptionSeeder::class);\n//\n// factory(\\App\\UserSubscription::class, 400)->create();\n// factory(\\App\\LessonComment::class, 1000)->create();\n// factory(\\App\\Discussion::class, 100)->create();\n// factory(\\App\\Comment::class, 200)->create();\n//\n// $this->call(MessageSeeder::class);\n//\n $this->call(PermissionSeeder::class);\n Model::reguard();\n }", "title": "" }, { "docid": "6b2493de5fea9a371dd5078ec9616986", "score": "0.7705614", "text": "public function run() {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Article::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'category_id' => Category::all()->random()->id,\n 'user_id' => User::where('name', '!=', 'administrator')->get()->random()->id\n ]);\n }\n }", "title": "" }, { "docid": "6acb64825bfa1a3072e865ec35773568", "score": "0.7705237", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n if (env('APP_ENV') !== 'production') {\n factory('App\\Course', random_int(4, 20))->create()->each(function ($u) {\n $u->partecipants()->saveMany(factory('App\\Partecipant', random_int(0, 10))->create());\n });\n factory('App\\Newsletter', 40)->create();\n }\n }", "title": "" }, { "docid": "fe3d75f986c8ef86affd93ffcbe4f1b3", "score": "0.77030534", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Leave::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 Leave::create([\n 'start' => $faker->dateTime($max = 'now', $timezone = null) ,\n 'end' => $faker->dateTime($max = 'now', $timezone = null) ,\n 'type' => $faker->randomElement($array = array ('to-do','doing','done')),\n 'status' => $faker->tld,\n 'note' => $faker->tld,\n 'leaver_id' => $faker->randomElement(User::pluck('id')->toArray()),\n 'substitution_id' => $faker->randomElement(User::pluck('id')->toArray()),\n 'task_id' => $faker->randomElement(Task::pluck('id')->toArray()),\n ]);\n }\n }", "title": "" }, { "docid": "eaa6899b083a2e9c2048d0920bf74ee3", "score": "0.7702869", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /* Aaron\n Creating fake data using the factory we have build (check ProductFactory.php & ReviewFactory.php)\n related method can be found in https://laravel.com/docs/5.7/database-testing \n */\n factory(App\\Admin::class, 1)->create();\n factory(App\\User::class, 5)->create();\n factory(App\\Model\\Product::class, 50)->create();\n factory(App\\Model\\Review::class, 300)->create();\n\n }", "title": "" }, { "docid": "56f0117f9d53d6c4e10ca79fd5e61274", "score": "0.7702363", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // factory(App\\ProjectCategory::class, 1)->create();\n factory(App\\Project::class, 7)->create();\n factory(App\\BlogTag::class, 5)->create();\n factory(App\\Blog::class, 30)->create();\n }", "title": "" }, { "docid": "4aa546f3e906da512820e950aeb295cb", "score": "0.76948255", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 100) as $index){\n DB::table('books')->insert([\n 'title' => $faker->word(),\n 'preview' => $faker->sentence(),\n 'author_id' => \\App\\Models\\Author::orderByRaw(\"RAND()\")->first()->id,\n 'created_at' => Carbon\\Carbon::now(),\n 'updated_at' => Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "e05a69b7743ce4d86f92f88fab013a54", "score": "0.76939416", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n //clear the users table\n User::truncate();\n $password = Hash::make(1234567);\n $roles = Role::all()->pluck('id')->toArray();\n\n User::create([\n 'firstname' => 'ebuka',\n 'lastname' => 'ubah',\n 'username' => 'godofspeed',\n 'password' => $password,\n 'role_id' => 1\n ]);\n\n for($i=0; $i<12; $i++) {\n User::create([\n 'firstname' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'username' => $faker->userName,\n 'password' => $password,\n 'role_id' => $faker->randomElement($roles)\n ]);\n }\n }", "title": "" }, { "docid": "2a12625c28576dc61fcc574ba45a3bd9", "score": "0.76936173", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n\n for($i = 1; $i <= 50; $i++) {\n DB::table('users')->insert([\n 'id' => $faker->unique()->randomNumber($nbDigits = 8),\n 'name' => $faker->name,\n 'email' => $faker->unique()->email,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }\n\n //run: php artisan db:seed --class=MahasiswaSeeder\n }", "title": "" }, { "docid": "1aa4a206355178e3ccbd8fe3def1e6d4", "score": "0.7686633", "text": "public function run()\n {\n // Generate 100 users\n $faker = Faker\\Factory::create();\n foreach (range(1, 200) as $index) {\n \\App\\User::create([\n 'name' => $faker->name,\n 'email' => $faker->unique()->safeEmail,\n 'password' => bcrypt('password'),\n ]);\n }\n\n foreach (range(1, 200) as $index) {\n DB::table('role_user')->insert([\n 'user_id' => $index,\n 'role_id' => rand(1, 4),\n ]);\n }\n\n foreach (range(1, 400) as $index) {\n \\App\\Phone::create([\n 'number' => $faker->unique()->phoneNumber,\n 'phone_type_id' => rand(1, 2),\n ]);\n }\n }", "title": "" }, { "docid": "d54647e13ae329a962d5b121081cf7c9", "score": "0.7686619", "text": "public function run()\n {\n $faker = Faker::create();\n\n\n\n foreach(range(1,10) as $value){\n // DB::table('users')->insert([ //random number seed\n // 'name' => Str::random(10) ,\n // 'email' => Str::random(10).'@gmail.com' ,\n // 'password' => Hash::make(Str::random(10)),\n // ]);\n\n // DB::table('users')->insert([ //fake value seed\n // 'name' => $faker->name ,\n // 'email' => $faker->email ,\n // 'password' => $faker->password,\n // ]);\n\n $User = new User(); // use model seed\n $User->name = $faker->name;\n $User->email = $faker->email;\n $User->password =Hash::make('12345678') ;\n $User->save();\n }\n }", "title": "" }, { "docid": "0735812d2abd937154f57b22bffad28d", "score": "0.7686343", "text": "public function run()\n {\n DB::table('product_categories')->delete();\n DB::table('products')->delete();\n DB::table('categories')->delete();\n DB::table('users')->delete();\n\n $this->call(CategorySeeder::class);\n factory(Product::class, 10)->create();\n $this->call(ProductCategorySeeder::class);\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "db3d10d5a0ae96f2a0cd84b83ba93dbb", "score": "0.7684967", "text": "public function run()\n {\n $this->call([userSeeder::class]);\n $this->call([seetingSeeder::class]);\n \\App\\Models\\User::factory(10)->create();\n product::factory('10')->create();\n }", "title": "" }, { "docid": "f031b3aea564cc7e378bc6419ef36a0c", "score": "0.7684251", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin'.'@gmail.com',\n 'password' => bcrypt('secret'),\n 'remember_token' => str_random(10),\n ]);*/\n /*for($i=0;$i<10;$i++){\n DB::table('blogposts')->insert([\n 'title' => str_random(40),\n 'content' => str_random(200),\n 'pubdate' => '2017-05-12',\n ]);\n\n }*/\n /*DB::table('staff')->insert([\n 'post'=>'orghead',\n ]);\n DB::table('staff')->insert([\n 'post'=>'orgtechhead',\n ]);*/\n /*DB::table('marquees')->insert([\n 'id'=>1,\n ]);\n DB::table('marquees')->insert([\n 'id'=>2,\n ]);\n DB::table('marquees')->insert([\n 'id'=>3,\n ]);\n DB::table('marquees')->insert([\n 'id'=>4,\n ]);*/\n /*DB::table('home_contents')->insert([\n 'id'=>1,\n ]);*/\n /*DB::table('implinks')->insert([\n 'id'=>1,\n ]);\n DB::table('implinks')->insert([\n 'id'=>2,\n ]);\n DB::table('implinks')->insert([\n 'id'=>3,\n ]);\n DB::table('implinks')->insert([\n 'id'=>4,\n ]);\n DB::table('implinks')->insert([\n 'id'=>5,\n ]);*/\n /*DB::table('aboutuses')->insert([\n 'id'=>1,\n ]);*/\n }", "title": "" }, { "docid": "95db77aab3f35d8d76e9b9adbc96ba47", "score": "0.7683054", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\n ColorCode\\Category::create(array('id' => 1, 'name' => 'Red'));\n ColorCode\\Category::create(array('id' => 2, 'name' => 'Blue'));\n ColorCode\\Category::create(array('id' => 3, 'name' => 'White'));\n ColorCode\\Category::create(array('id' => 4, 'name' => 'Yellow'));\n\n $questions = self::getQuestions();\n foreach ($questions as $question) {\n ColorCode\\Question::create(array(\n 'id' => $question[0],\n 'text' => $question[1],\n ));\n }\n\n $options = self::getOptions();\n foreach ($options as $option) {\n ColorCode\\Option::create(array(\n 'question_id' => $option[0],\n 'text' => $option[1],\n 'category_id' => $option[2],\n ));\n }\n\t}", "title": "" }, { "docid": "81905cb18feac0f107d692914dfa1e04", "score": "0.7683051", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $survey = factory(Survey::class)->create(['title' => 'This is a Sample Survey']);\n $question = factory(Question::class)->create(\n [\n 'survey_id' => $survey->id,\n 'question_text' => 'What is your name',\n 'question_type' => 'input',\n 'is_required' => TRUE\n ]\n );\n\n $question2 = factory(Question::class)->create(\n [\n 'survey_id' => $survey->id,\n 'question_text' => 'Are you human',\n 'question_type' => 'radio',\n 'is_required' => TRUE\n ]\n );\n\n $choice1 = factory(Choice::class)->create(\n [\n 'choice_text' => 'Yes',\n 'question_id' => $question2->id\n ]\n );\n\n $choice2 = factory(Choice::class)->create(\n [\n 'choice_text' => 'No',\n 'question_id' => $question2->id\n ]\n );\n }", "title": "" }, { "docid": "8cea7c5afdaf1137280af89ca5acb3bb", "score": "0.76828015", "text": "public function run()\n {\n DB::table('roles')->insert([\n 'nomRol' => 'Administrador',\n ]);\n DB::table('empleados')->insert([\n 'pNom' => 'Admin',\n 'pApe' => 'sispmed.com', \n ]);\n\n \n\n DB::table('users')->insert([\n 'name' => 'Administrador',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n 'rol_id' => 1,\n 'empleado_id' => 1 \n ]);\n\n \n // $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "eea8c1ecedd37c18cfb85197a18dff4b", "score": "0.76821357", "text": "public function run()\n {\n DB::table('books')->insert([\n \t'title' => \"Eloquent JavaScript, Second Edition\",\n \t'author' => \"Marijn Haverbeke\",\n \t'published_on' => \"2014-12-14 00:00:00\",\n\t \"description\" => \"JavaScript lies at the heart of almost every modern web application, from social apps to the newest browser-based games. Though simple for beginners to pick up and play with, JavaScript is a flexible, complex language that you can use to build full-scale applications.\"\n ]);\n\n DB::table('books')->insert([\n \t'title' => \"Learning JavaScript Design Patterns\",\n \t'author' => \"Addy Osmani\",\n \t'published_on' => \"2012-07-01 00:00:00\",\n\t \"description\" => \"With Learning JavaScript Design Patterns, you'll learn how to write beautiful, structured, and maintainable JavaScript by applying classical and modern design patterns to the language. If you want to keep your code efficient, more manageable, and up-to-date with the latest best practices, this book is for you.\",\n\n ]);\n\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 30 ; $i++) {\n DB::table('books')->insert([\n 'title' => $faker->text(100),\n 'author' => $faker->name,\n 'published_on' => $faker->time(\"Y-m-d H:i:s\"),\n 'description' => $faker->realText(2000, 2)\n ]);\n }\n }", "title": "" }, { "docid": "3ed7fd127fa2e0a50a8746a98b68b2a5", "score": "0.7680004", "text": "public function run()\n {\n User::factory(100)->create();\n Customize::factory(20)->create();\n Administrador::factory(20)->create();\n Reporte::factory(20)->create();\n Ventas::factory(20)->create();\n Solicitudes::factory(30)->create();\n //Roles del sistema\n RolesUser::create(['nombre' => 'Administrador']);\n RolesUser::create(['nombre' => 'Promotor']);\n RolesUser::create(['nombre' => 'Vendedor']);\n RolesUser::create(['nombre' => 'PromotorAlfa']);\n \n //Seeder de Role\n $this->call(RoleSeeder::class);\n }", "title": "" }, { "docid": "e2e5ae1006bf16a1637e0b74c02c6fd9", "score": "0.76798826", "text": "public function run()\n {\n $this->call([AdminUserSeeder::class]);\n User::factory(10)->create();\n Artist::factory(10)->create();\n Genre::factory(10)->create();\n Subgenre::factory(10)->create();\n Album::factory(10)->create();\n Song::factory(50)->create();\n $this->call([\n AlbumArtistSeeder::class,\n ArtistSongSeeder::class,\n SongUserSeeder::class,\n ]);\n }", "title": "" }, { "docid": "574d133a47e2bbc53c8d77e069d44fe5", "score": "0.7677412", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Offer::class, 6)->create();\n\n\n // Factory para users\n factory(\\App\\User::class, 1)->create([\n 'name' => 'Juan Manuel',\n 'surname' => 'Galvis Candelo',\n 'email' => '[email protected]',\n 'identification_document' => '1144027456',\n 'phone' => '315618',\n 'address' => 'Carrera 7 67 - 12',\n 'password' => bcrypt('secret')\n ])\n ->each(function (App\\User $user){\n factory(App\\Admin::class, 1)->create(['user_id' => $user->id, 'role' => 'admin']);\n });\n\n }", "title": "" }, { "docid": "65e353a5b33cf45bd84f85808882380e", "score": "0.76770157", "text": "public function run()\n {\n //add admin\n DB::table('users')->insert([\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => app('hash')->make('bmmrhdb2021!'),\n 'role_id' => 1,\n 'status' => 3\n ]);\n\n //add kampus\n DB::table('users')->insert([\n 'username' => 'kampus',\n 'email' => '[email protected]',\n 'password' => app('hash')->make('bmmrhdb2021!'),\n 'role_id' => 2,\n 'status' => 3\n ]);\n\n //seed role\n $this->call([RoleSeeder::class]);\n\n //seed kampus\n $this->call([KampusSeeder::class]);\n }", "title": "" }, { "docid": "5c35b9ef62a74120405c41a03bfa58b6", "score": "0.76757586", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Company::class, 10)->create();\n factory(\\App\\Branch::class, 30)->create();\n factory(\\App\\Timing::class,50)->create();\n factory(\\App\\Contact::class, 15)->create();\n }", "title": "" }, { "docid": "71ce705043a7ddd3d99c95fde024e93e", "score": "0.7673105", "text": "public function run()\n {\n Author::factory(30)->create()->each(function ($author) {\n Book::factory(10)->create(['author_id' => $author->id]);\n });\n\n $users = User::factory(5)->create();\n\n $users[] = User::factory()->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('password123')\n ]);\n\n $users->each(function ($user) {\n ReadingList::factory(6)->create(['user_id' => $user->id])->each(function ($list) {\n\n // Attach random amount of books to this list\n $list->books()->attach(\n Book::all()->random()->pluck('id')\n );\n\n\n });\n });\n }", "title": "" }, { "docid": "614c798230cb6185f7b47e2b6aed83a7", "score": "0.7671022", "text": "public function run()\n {\n $faker = Faker::create();\n foreach(range(1,10) as $index){\n DB::table('books')->insert([\n 'title' => $faker->name,\n 'price' => $faker->randomNumber,\n 'review' => $faker->text,\n 'author_id' => $faker->randomNumber,\n 'category_id' => $faker->randomNumber,\n 'publisher_id' => $faker->randomNumber\n ]);\n }\n }", "title": "" }, { "docid": "511b20b064776c56da98a56ec958c4be", "score": "0.76702726", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n // inserting document types\n foreach (config('seed_data.document_types') as $value) {\n\n DB::table('document_type')->insert([\n 'name' => $value\n ]);\n }\n\n // insert task status\n foreach (config('seed_data.task_statuses') as $value) {\n\n DB::table('task_status')->insert([\n 'name' => $value\n ]);\n }\n\n // insert task types\n foreach (config('seed_data.task_types') as $value) {\n\n DB::table('task_type')->insert([\n 'name' => $value\n ]);\n }\n\n // insert contact status\n foreach (config('seed_data.contact_status') as $value) {\n\n DB::table('contact_status')->insert([\n 'name' => $value\n ]);\n }\n\n\n // insert the system main email into settings table\n foreach (config('seed_data.settings') as $key => $value) {\n DB::table('setting')->insert([\n 'setting_key' => $key,\n 'setting_value' => $value\n ]);\n }\n // insert sample user as the system admin\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt(\"123456\"),\n 'position_title' => 'Administrator',\n 'is_admin' => 1,\n 'is_active' => 1\n ]);\n\n // insert the initial permissions\n $permissions = [];\n foreach (config('seed_data.permissions') as $value) {\n $permissions[] = \\Spatie\\Permission\\Models\\Permission::create(['name' => $value]);\n }\n }", "title": "" }, { "docid": "8bcaf2d0064e5575a8a846bcd7777b3c", "score": "0.7668297", "text": "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('trips')->truncate();\n\n factory(\\App\\Trip::class, 100)->create();\n \n // ->each(function($trip){\n\n // Seed para a relação com 10 users\n // Checar!!! $trip->user()->saveMany(factory(App\\User::class, 10)->make());\n\n // Seed para a relação com 4 interests\n // $trip->interest()->saveMany(factory(App\\Interest::class, 4)->make());\n // });\n\n DB::statement('SET foreign_key_checks = 1');\n }", "title": "" }, { "docid": "417b69afa9a77f2acf823445b4e8b450", "score": "0.7666999", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,10)->create()->each(function($user){\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n });\n\n\n }", "title": "" }, { "docid": "554aae85f240df2b5550199f9a5eea4c", "score": "0.76625514", "text": "public function run() {\n\n Author::create([\n \"name\" => \"Mr Jelili\",\n \"gender\" => \"male\",\n \"country\" => \"Nigeria\",\n ]);\n\n Author::create([\n \"name\" => \"Mr gbadebo\",\n \"gender\" => \"male\",\n \"country\" => \"Nigeria\",\n ]);\n\n Author::create([\n \"name\" => \"Jesicca bello\",\n \"gender\" => \"female\",\n \"country\" => \"US\",\n ]);\n\n Author::create([\n \"name\" => \"FEI WONG\",\n \"gender\" => \"female\",\n \"country\" => \"China\",\n ]);\n }", "title": "" }, { "docid": "4d07e466e788cb82aee0aa7c0b176fa3", "score": "0.7660261", "text": "public function run()\n {\n Model::unguard();\n\n $this->call(PermissionTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Ana Pérez',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin123'),\n 'role_id' => 1,\n 'remember_token' => str_random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n DB::table('users')->insert([\n 'name' => 'Julio Mantilla',\n 'email' => '[email protected]',\n 'password' => bcrypt('editor123'),\n 'role_id' => 2,\n 'remember_token' => str_random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n factory(App\\Article::class, 2)->create();\n factory(App\\Comment::class, 3)->create();\n\n Model::reguard();\n }", "title": "" }, { "docid": "6c4887c5ce96ed4d508a25ef10232365", "score": "0.76600325", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create(\n [\n 'email' => '[email protected]', \n 'name' => 'Adam'\n ]\n ); \n factory(User::class)->create(\n [\n 'email' => '[email protected]', \n 'name' => 'Sarah'\n ]\n ); \n factory(User::class)->create(\n [\n 'email' => '[email protected]', \n 'name' => 'Kurtis'\n ]\n ); \n }", "title": "" }, { "docid": "452131988d3c35e2d35b81f7205f602b", "score": "0.76583654", "text": "public function run()\n {\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'password' => Hash::make('testroot')\n ]);\n\n factory(User::class)->create();\n\n factory(Article::class)->times(20)->create();\n factory(Comment::class)->times(10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "48e911d4fd08edbeafc2d1154cf23896", "score": "0.765741", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(\\App\\Model\\User::class, 10)->create();\n factory(\\App\\Model\\Option::class, 20)->create();\n factory(\\App\\Model\\Company::class, 10000)->create();\n factory(\\App\\Model\\Employee::class, 10000)->create();\n }", "title": "" }, { "docid": "54c8303c7b57e85ea9572b704c94d7eb", "score": "0.7652939", "text": "public function run()\n {\n $this->call(CategorySeeder::class);\n $this->call(InventorySeeder::class);\n $this->call(ProductSeeder::class);\n DB::table('users')->insert([\n [\n 'user_name' => 'admin',\n 'first_name' => 'admin',\n 'last_name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin123'),\n 'telephone' => '0393656099',\n 'role' => '1',\n 'avatar' => 'public/backend/images/chrome.png'\n ],\n [\n 'user_name' => 'thang',\n 'first_name' => 'nguyen',\n 'last_name' => 'thang',\n 'email' => '[email protected]',\n 'password' => bcrypt('thang123'),\n 'telephone' => '0393656099',\n 'role' => '2',\n 'avatar' => 'public/backend/images/logo-dark.png'\n ],\n [\n 'user_name' => 'quan',\n 'first_name' => 'luong',\n 'last_name' => 'quan',\n 'email' => '[email protected]',\n 'password' => bcrypt('quan123'),\n 'telephone' => '0393656099',\n 'role' => '3',\n 'avatar' => 'public/backend/images/logo-icon.png'\n ]\n ]);\n }", "title": "" }, { "docid": "3ae14bc4099d8ea94d19e9be9bb2e73f", "score": "0.76524484", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('grades')->delete();\n\n $grades = array(\n [\n 'id' => 1,\n 'name' => 'Pre-K',\n 'slug' => 'pre-k',\n ],\n [\n 'id' => 2,\n 'name' => 'Elementary',\n 'slug' => 'elementary',\n ],\n [\n 'id' => 3,\n 'name' => 'Junior High',\n 'slug' => 'junior-high',\n ],\n [\n 'id' => 4,\n 'name' => 'High School',\n 'slug' => 'high-school',\n ],\n\n\n );\n\n // Uncomment the below to run the seeder\n DB::table('grades')->insert($grades);\n }", "title": "" }, { "docid": "df398bdb90555f96b0c63def4893b60c", "score": "0.76507354", "text": "public function run()\n {\n //create categories\n// $this->call(CategoriesTableSeeder::class);\n\n //create address\n// $address = factory(App\\Address::class, 1)->create();\n//\n// //create warehouse\n// $warehouse = factory(App\\Warehouse::class, 1)->create();\n//\n// //create goods\n// $all_goods = factory(App\\AllGoods::class, 1)->create();\n// $vendor_goods = factory(App\\Good::class, 1)->create();\n }", "title": "" }, { "docid": "de38198f54b160720c2b9b39729d0755", "score": "0.7650568", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Region::class,10)->create();\n factory(App\\Model\\Country::class,50)->create();\n factory(App\\Model\\Level\\CategoryLevel::class,10)->create();\n factory(App\\Model\\Level\\Level::class,50)->create();\n factory(App\\Model\\Level\\CommunicationTool::class,5)->create();\n factory(App\\Model\\Level\\Evenement::class,5)->create();\n factory(App\\Model\\Level\\Programme::class,5)->create();\n factory(App\\Model\\Level\\Finance::class,5)->create();\n factory(App\\Model\\Level\\LegalFramework::class,5)->create();\n factory(App\\Model\\Level\\Population::class,5)->create();\n }", "title": "" }, { "docid": "48d2945ac013fd0d77bdc25e53d591e8", "score": "0.76497746", "text": "public function run()\n {\n //$faker = \\Faker\\Factory::create();\n DB::table('fonts')->insert(\n [\n 'name' => 'Roboto',\n 'class_name' => 'Roboto',\n 'sources' => 'Google',\n 'status' => 1,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n );\n DB::table('themes')->insert(\n [\n 'name' => 'default',\n 'status' => 1,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n );\n DB::table('models')->insert(\n [\n 'name' => 'default',\n 'file_name' => 'saly',\n 'status' => 1,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n );\n }", "title": "" }, { "docid": "0138acf004addea238d579f8124ed872", "score": "0.7649404", "text": "public function run()\n {\n //call here PostTableSeeder Class\n // $this->call([\n // PostTableSeeder::class,\n // ]);\n\n //to insert a 1000 record to our DB table users use Faker package\n $faker = Faker::create();\n foreach (range(1, 1000) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'), //for secret(enrypted) password\n\n ]);\n }\n\n }", "title": "" }, { "docid": "b01cb6e8fc0e5e7f17d18c8063ae8a14", "score": "0.76493394", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Model\\Product::class, 20)->create();\n factory(App\\Model\\ProductDetails::class, 20)->create();\n factory(App\\Model\\Branch::class, 20)->create();\n factory(App\\Model\\BranchProduct::class, 20)->create();\n factory(App\\Model\\Customer::class, 30)->create();\n factory(App\\Model\\Order::class, 30)->create();\n factory(App\\Model\\Piutang::class, 20)->create();\n }", "title": "" }, { "docid": "77cedb247f73587eed5e60afe9dc55de", "score": "0.7647074", "text": "public function run()\n {\n\t\t$this->call(RoleSeeder::class);\n\t\t$this->call(CountrySeeder::class);\n\t\t$this->call(CategorySeeder::class);\n\n\t\t// News::truncate();\n\t\t// factory(News::class, 100)->create();\n }", "title": "" }, { "docid": "2c327947c7e63ad712f816b8636d44e9", "score": "0.76454324", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n //factory(App\\User::class,10)->create();\n // factory(App\\Profile::class,10)->create();\n factory(App\\Labo::class,10)->create();\n factory(App\\Magasin::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Produit::class,50)->create();\n factory(App\\Offre::class,200)->create();\n \n }", "title": "" }, { "docid": "a4699bbf0232f24c629ef0db2a7e2e42", "score": "0.76449335", "text": "public function run()\n {\n User::create([\n 'name' => 'Carlo Miguel Dy',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('password'),\n ]);\n \\App\\Models\\User::factory(5)->create();\n \\App\\Models\\Room::factory(10)->create();\n $reservations = \\App\\Models\\Reservation::factory(25)->create();\n\n foreach ($reservations as $reservation) {\n $ratings = collect([1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0]);\n\n $reservation->review()->create([\n 'reservation_id' => $reservation->id,\n 'rating' => $ratings->random(),\n 'comment' => $this->faker->realText(64),\n ]);\n }\n\n // \\App\\Models\\Review::factory(5000)->create();\n }", "title": "" }, { "docid": "30f0aebede08c9bb56f9de3485859259", "score": "0.7643548", "text": "public function run(): void\n {\n $faker = Faker\\Factory::create();\n\n Restaurant::create([\n 'name' => 'Restaurant 1',\n 'phone' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'domain' => self::RESTAURANT_1,\n ]);\n\n Restaurant::create([\n 'name' => 'Restaurant 2',\n 'phone' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'domain' => self::RESTAURANT_2\n ]);\n }", "title": "" }, { "docid": "3d7cf3ed5341a6a3f5f3c423540f8546", "score": "0.76432055", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"WardsTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n DB::table('wards')->insert([\n \"hospital_id\" => 1,\n \"name\" => '一般病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n DB::table('wards')->insert([\n \"hospital_id\" => 1,\n \"name\" => '特殊病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n DB::table('wards')->insert([\n \"hospital_id\" => 2,\n \"name\" => '一般病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n DB::table('wards')->insert([\n \"hospital_id\" => 2,\n \"name\" => '特殊病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }", "title": "" } ]
d66de4eb7e93e7c7f434c1253c5600d3
Send contacts to Dotdigital.
[ { "docid": "c35cd22aa922a0a617eb3a48f327417f", "score": "0.54923654", "text": "private function sendContacts($data, $websiteId)\n {\n $customerAddressBookId = $this->helper->getCustomerAddressBook($websiteId);\n $guestAddressBookId = $this->helper->getGuestAddressBook($websiteId);\n $subscriberAddressBookId = $this->helper->getSubscriberAddressBook($websiteId);\n $client = $this->helper->getWebsiteApiClient($websiteId);\n $processed = [];\n\n foreach ($data as $row) {\n if (in_array($row['customer_email'], $processed)) {\n continue;\n }\n\n $addressBookId = $row['customer_id'] ? $customerAddressBookId : $guestAddressBookId;\n $contact = [\n 'Email' => $row['customer_email'],\n 'EmailType' => 'Html',\n ];\n $result = $client->postAddressBookContacts($addressBookId, $contact);\n if (isset($result->message)) {\n return false;\n }\n\n if ($row['subscriber_status'] == Subscriber::STATUS_SUBSCRIBED) {\n $result = $client->postAddressBookContacts($subscriberAddressBookId, $contact);\n if (isset($result->message)) {\n return false;\n }\n }\n\n $processed[] = $row['customer_email'];\n }\n\n $this->logger->info(sprintf(\n '%d contacts posted for website %d',\n count($processed),\n $websiteId\n ));\n\n return true;\n }", "title": "" } ]
[ { "docid": "64794baffb5564a6b08c577a84090c5c", "score": "0.72249717", "text": "public function sendToContacts() {\n foreach ($this->contactEmails[0] as $key => $value) {\n $contactargs = array(\n \"transform\"=>1,\n \"filter\"=>\"id,eq,\".$key\n );\n $contacturl = API_HOST_URL . \"/contacts?\".http_build_query($contactargs);\n $contactoptions = array(\n 'http' => array(\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n 'method' => 'GET'\n )\n );\n $contactcontext = stream_context_create($contactoptions);\n $contactresult = json_decode(file_get_contents($contacturl,false,$contactcontext),true);\n //return $contactresult;\n $to = array($contactresult['contacts'][0]['emailAddress'] => $contactresult['contacts'][0]['firstName'] . \" \" . $contactresult['contacts'][0]['lastName']);\n\n $numSent = 0;\n\n $body = \"Hello \" . $contactresult['contacts'][0]['firstName'] . \",<br /><br />\";\n $body .= $templateresult['email_templates'][0]['body'];\n if (count($templateresult) > 0) {\n try {\n $numSent = sendmail($to, $subject, $body, $from);\n } catch (Exception $mailex) {\n return $mailex;\n }\n }\n }\n }", "title": "" }, { "docid": "7ecc5a08ce550e6e335b58ca01e1f558", "score": "0.670746", "text": "function SendContact($chatid,$first_name,$phone_number,$keyboard){\n\tbot('SendContact',[\n\t'chat_id'=>$chatid,\n\t'first_name'=>$first_name,\n\t'phone_number'=>$phone_number,\n\t'reply_markup'=>$keyboard\n\t]);\n\t}", "title": "" }, { "docid": "dfc84bc677e8d4c211b02682b71c03d5", "score": "0.6419944", "text": "public abstract function sendContactEmail(array $data);", "title": "" }, { "docid": "247605d5d8fafd5c72ea320d7d2510f7", "score": "0.626256", "text": "public function sendMessage() {\n function valid_donneesBeforeSendingMailForContact($donnees){\n $donnees = trim($donnees);\n $donnees = stripslashes($donnees);\n $donnees = htmlspecialchars($donnees);\n return $donnees;\n }\n $phone_expr = '/^(0|\\+33)[1-9]([-. ]?[0-9]{2}){4}$/';\n $first_name = valid_donneesBeforeSendingMailForContact($_POST['first_name']);\n $last_name = valid_donneesBeforeSendingMailForContact($_POST['last_name']);\n $emailContact = valid_donneesBeforeSendingMailForContact($_POST['emailContact']);\n $phoneContact = valid_donneesBeforeSendingMailForContact($_POST['phoneContact']);\n $problem_type = valid_donneesBeforeSendingMailForContact($_POST['problem_type']);\n $messageContact = valid_donneesBeforeSendingMailForContact($_POST['messageContact']);\n\n if (isset($first_name) && isset($last_name) && isset($emailContact) && isset($phoneContact) && isset($problem_type) && isset($messageContact) \n && !empty($first_name) && !empty($last_name) && !empty($emailContact) && !empty($phoneContact) && !empty($problem_type) && !empty($messageContact) \n && filter_var($emailContact, FILTER_VALIDATE_EMAIL) && preg_match($phone_expr, $phoneContact)) {\n $associationDisplay = $this->model->getFullAssociation();\n $this->model->sendMailForContact($associationDisplay);\n $_SESSION['flash']['success'] = 'Votre message a bien été envoyé';\n header('location:index.php?controller=dashboard');\n } else {\n $_SESSION['flash']['danger'] = \"Les champs ne sont pas remplis correctement\";\n header('location:index.php?controller=Contact&action=start');\n }\n }", "title": "" }, { "docid": "bd3eaaf5a07d1665dca58413f7c05374", "score": "0.60951996", "text": "public function crm_contact() {\n $env = is_wpe() ? \"Prospect\" : \"Test\"; // Production vs stating env\n $info = (object) [\n \"FIRST_NAME\" => $this->post['first'],\n \"LAST_NAME\" => $this->post['last'],\n \"CUSTOMFIELDS\" => array(\n 0 => (object) [\n \"CUSTOM_FIELD_ID\" => \"CONTACT_FIELD_1\",\n \"FIELD_VALUE\" => $env\n ]\n ),\n \"CONTACTINFOS\" => array(\n 0 => (object) [\n \"TYPE\" => \"EMAIL\",\n \"LABEL\" => \"WORK\",\n \"DETAIL\" => $this->post['email']\n ],\n 1 => (object) [\n \"TYPE\" => \"PHONE\",\n \"LABEL\" => \"WORK\",\n \"DETAIL\" => $this->post['phone']\n ]\n )\n ];\n $this->crm->add_contact($info);\n }", "title": "" }, { "docid": "bf90723b1f49441a6aeec4a312f4a6f0", "score": "0.60929054", "text": "public function actionContacts() {\n $page = $this->getPageById(3);\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $site = Yii::app()->params['site_name'];\n $prefix = \" На сайте {$site} посетитель {$model->name} отправил письмо со страницы контактов.\\n\";\n Helpers::MailToAdmin($model->subject, $prefix . $model->body, $model->email);\n Yii::app()->user->setFlash('success', \"Благодарим Вас, письмо успешно отправлено. Мы свяжемся с Вами максимально быстро.\");\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model, 'page' => $page));\n }", "title": "" }, { "docid": "5c7a9d92016da5eefb2ed7676e6a644a", "score": "0.6032551", "text": "public function sendRequests() {\n\t\t$locale = $this->_getLocale();\n\t\t\n\t\tif ($locale == null) {\n\t\t\t$pipeDrive = new Pipedrive();\n\t\t} else {\n\t\t\t$pipeDrive = new Pipedrive($locale);\n\t\t\t\n\t\t}\n\t\t$pipeDrive->addPerson(\n\t\t\t['name' => $this->_name,\n\t\t\t 'email' => $this->_email,\n\t\t\t 'phone' => $this->_phone,\n\t\t\t 'company' => $this->_company,\n\t\t\t 'web' => $this->_web\n\t\t\t]\n\t\t);\n\t\t\n\t\t\n\t\t$telegram = new TelegramIntegration($this->_email, $this->_phone, ['company' => $this->_company, 'site' => $this->_web, 'name' => $this->_name]);\n\t\t$telegram->sendMessage();\n\t\t\n\t}", "title": "" }, { "docid": "d37211bae54a9a861bf42216b5b7765e", "score": "0.602815", "text": "public function sendContact()\n {\n $data = Input::all();\n Mail::send('emails.contactuser', ['data' => $data], function ($m) {\n $data2 = Input::all();\n $m->from('[email protected]', 'Información');\n\n $m->to('[email protected]', $data2['name'])->subject(\"Información\");\n });\n return redirect('/cupones');\n }", "title": "" }, { "docid": "c0b945a49098e5aba81cc41bb9f4c2b5", "score": "0.5973554", "text": "private function sendSMS($contacts, $text)\n\t{\n\t\t$username = 'ageconsulting';\n\t\t$password = '6XUIXH5M6dnH';\n\t\t$destination = $contacts; //Multiple numbers can be entered, separated by a comma\n\t\t$source = 'SmartProbe';\n\t\t$text = $text;\n\t\t$ref = 'Alerts';\n\n\t\t$content = 'username=' . rawurlencode($username) .\n\t\t\t'&password=' . rawurlencode($password) .\n\t\t\t'&to=' . rawurlencode($destination) .\n\t\t\t'&from=' . rawurlencode($source) .\n\t\t\t'&message=' . rawurlencode($text) .\n\t\t\t'&ref=' . rawurlencode($ref);\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://www.smsbroadcast.com.au/api-adv.php\");\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\n\t\t$message_data = explode(':', $output);\n\t\t\\Log::info(\"return data: \" . json_encode($message_data, JSON_PRETTY_PRINT));\n\n\t\tif ($message_data[0] == \"OK\") {\n\t\t\treturn 'Sent';\n\t\t} else {\n\t\t\treturn $message_data;\n\t\t}\n\t}", "title": "" }, { "docid": "b4f3d1905e042ca64e5b0a9f06732c6a", "score": "0.59565574", "text": "public function sendAction()\n {\n if ($this->request->isPost() != true) {\n return $this->dispatcher->forward(\n [\n \"controller\" => \"contact\",\n \"action\" => \"index\",\n ]\n );\n }\n\n $form = new PersonalloanContinueForm;\n\n // Validate the form\n $data = $this->request->getPost();\n// p($data);\n $plc = new PersonalloanContinue();\n if (!$form->isValid($data, $plc)) {\n $this->flash->error('Please fill the required Fields.');\n $this->response->redirect('personalloan_continue');\n } else {\n if ($plc->save() == false) {\n $this->flash->error('Please fill all the required Fields.');\n $this->response->redirect('personalloan_continue');\n } else {\n $this->flash->success('Thanks, we will contact you in the next few hours');\n $this->response->redirect('thankyou');\n }\n }\n\n\n\n }", "title": "" }, { "docid": "fc78fc90b17c6d315bb337a16338c329", "score": "0.59523505", "text": "public function action_do_contact() {\n\n\t\t$e = Loader::helper('validation/error');\n\t\t// this \n\t\t$str = Loader::helper('validation/strings');\n\n\n\t\tif ($str->notempty($_POST['fullname']) > 0) {\n\t\t\t$fullname = $_POST['fullname'];\n\t\t} else {\n\t\t\t$e->add(t(\"Please include your name.\"));\n\t\t}\n\n\t\tif ($str->notempty($_POST['phone']) > 0) {\n\t\t\t$phone = $_POST['phone'];\n\t\t} else {\n\t\t\t$e->add(t(\"Please include your phone number.\"));\n\t\t}\n\n\t\t// the second paramater is to check if the MX record exists\n\t\tif ($str->email($_POST['email'], true)) {\n\t\t\t$email = $_POST['email'];\n\t\t} else {\n\t\t\t$e->add(t(\"Please include a valid email address.\"));\n\t\t}\n\n\t\tif ($str->notempty($_POST['comment']) > 0) {\n\t\t\t$comment = $_POST['comment'];\n\t\t} else {\n\t\t\t$e->add(t(\"Please include a comment.\"));\n\t\t}\n\n\t\tif (!$e->has()) {\n\n\t\t\t$mh = Loader::helper('mail');\n\t\t\tif (defined('EMAIL_DEFAULT_FROM_ADDRESS')) {\n\t\t\t\t$mh->from(EMAIL_DEFAULT_FROM_ADDRESS, t('Website Contact Form Robot'));\n\t\t\t} else {\n\t\t\t\t$adminUser = UserInfo::getByID(USER_SUPER_ID);\n\t\t\t\tif (is_object($adminUser)) {\n\t\t\t\t\t$mh->from($adminUser->getUserEmail(), t('Website Contact Form Robot'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$mh->addParameter('fullname', $fullname);\n\t\t\t$mh->addParameter('phone', $phone);\n\t\t\t$mh->addParameter('email', $email);\n\t\t\t$mh->addParameter('comment', $comment);\n\t\t\t// this is not neccessary, but helps make things easier for \n\t\t\t// the site owner\n\t\t\t$mh->replyto($email, $fullname);\n\t\t\t$mh->to(\"[email protected]\");\n\t\t\t// leave out the second argument if you are loading from the\n\t\t\t// core or the outer directory\n\t\t\t$mh->load('contact_form_submission', 'c5_boilerplate');\n\t\t\t$mh->sendMail();\n\n\t\t\t// another way to do this is with bodyHTML\n\t\t\t// note that the other parameters for to, from, etc\n\t\t\t// are preserved.\n\n\t\t\t$emailText = \"<h1>\" . t(\"Thanks!\") . \"</h1>\";\n\t\t\t$mh->setBodyHTML($emailText);\n\t\t\t$mh->sendMail();\n\n\t\t\t// redirect to another page\n\t\t\t// header('Location: ' . View::url('/contact-us/thank-you'));\n\t\t\t// or set message for the view\n\t\t\t$this->set(\"message\", t(\"Thank you for contacting us!\"));\n\t\t} else {\n\t\t\t$this->set('error', $e);\n\t\t}\n\t}", "title": "" }, { "docid": "492b7a3432c2b6f769c19c613e48b8d1", "score": "0.5892342", "text": "public static function sendEmailContacts(Request $request )\n {\n // Backup your default mailer\n $backup = Mail::getSwiftMailer();\n\n $data = ['email'=>$request->email, 'name'=>$request->name, 'content'=>$request->content];\n\n Mail::send('emails.mail-contact', $data, function ($message) {\n $message->to('[email protected]');\n $message->subject(\"Mail Contact Project BDS La Partenza\");\n $message->from('[email protected]', 'FTCJSC');\n });\n \n\n // Restore your original mailer\n // Mail::setSwiftMailer($backup);\n\n // echo alert and redirect to Homepage\n echo \"<script>\";\n echo \" alert('Cảm ơn quý khách đã liên hệ với với chúng tôi! Chúng tôi sẽ liên hệ với bạn ngây khi có thông tin mới nhất'); \n window.location.href='\".url('/').\"';\n </script>\";\n }", "title": "" }, { "docid": "356c25b026f309561c1059c11f09d96c", "score": "0.58243", "text": "public function createContact($contact_data = array())\n { \n \tif(!empty($contact_data))\n \t{\n\n\t $file_url = APPPATH.\"third_party/active-campaign-api/includes/ActiveCampaign.class.php\";\n\t require_once($file_url);\n\t $ac = new ActiveCampaign(ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY);\n\t \n\t if (!(int)$ac->credentials_test()) {\n\t //echo \"<p>Access denied: Invalid credentials (URL and/or API key).</p>\";exit();\n\t }\n\t \n\t $list_id = ACTIVECAMPAIGN_LIST_ID;\n\t echo \"<p>Credentials valid & Working! Proceeding...</p>\";exit;\n\t exit;\n\t /*\n\t \tADD OR EDIT CONTACT (TO THE NEW LIST CREATED ABOVE).\n\t */\n\n\t $contact = array(\n\t \"email\" => $contact_data['email'],\n\t \"first_name\" => $contact_data['first_name'],\n\t \"last_name\" => $contact_data['last_name'],\n\t \"phone\" \t => $contact_data['phone'],\n\t \"p[{$list_id}]\" => $list_id,\n\t \"status[{$list_id}]\" => 1, // \"Active\" status\n\t );\n\n\t $contact_sync = $ac->api(\"contact/sync\", $contact);\n\n\t if (!(int)$contact_sync->success) {\n\t // request failed\n\t log_message('error', $contact_sync->error);\n\t //echo \"<p>Syncing contact failed. Error returned: \" . $contact_sync->error . \"</p>\";\n\t //exit();\n\t } \n\n\t // successful request\n\t $contact_id = (int)$contact_sync->subscriber_id;\n\t //echo \"<p>Contact synced successfully (ID {$contact_id})!</p>\";\n\t \t//exit;\n\t }\n }", "title": "" }, { "docid": "9e43b957c151187f2d2bfb4057586370", "score": "0.5751598", "text": "public function send() : void \n {\n // Switch on courier's tranport method & call function\n switch ($this->courier->getTransportMethod()) {\n case 'email' :\n $this->transportConsignmentNosEmail();\n break;\n case 'ftp' : \n $this->transportConsignmentNosFTP();\n break;\n }\n }", "title": "" }, { "docid": "9cdb771ac1df72fc9473ba5e0612e4b1", "score": "0.57488924", "text": "public static function add_contact($params = array()) {\n $params['action'] = 'addcontact';\n return self::send_request($params);\n }", "title": "" }, { "docid": "48ce051619dddd39c6c6b58abcd1b59d", "score": "0.5721105", "text": "public function sendLead(){\n\n try{\n $this->obj_lead = $this->obj_soap->LeadGeneration(array_merge($this->dados_conexao , $this->dados_lead));\n } catch (Exception $e){\n $this->erros[] = $e->getMessage();\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "e3dd3eb6b9b8861e20a68f9c60054af3", "score": "0.57155967", "text": "public function requestContacts(){\n return $this->makeGetRequest('contactsList');\n }", "title": "" }, { "docid": "a1c6b8025e12efab38cab4bc30b03c85", "score": "0.5709789", "text": "protected function _sendVisitToCX() {\n\t\tswitch ( false ) {\n\t\t\tcase empty($this->_currVisit->employee)\t: $this->_recipientType = 'employee';\tbreak;\n\t\t\tcase empty($this->_currVisit->contact)\t: $this->_recipientType = 'contact';\tbreak;\n\t\t\tdefault: throw new Exception('Unknown type of recipient of mail');\n\t\t}\n\t\t\n\t\t$this->_checkChecksum($this->_currVisit->checksum);\n\t\t\n\t\t$todoID = $this->_createToDoForVisit();\n\t\t\n\t\tif ( $this->_recipientType === 'employee' ) {\n\t\t\t$this->_linkToDo($todoID, 'Employee', $this->_currVisit->employee);\n\t\t} else if ( $this->_recipientType === 'contact' ) {\n\t\t\t$this->_linkToDo($todoID, 'User', $this->_currVisit->contact, 'Contact');\n\t\t}\n\t}", "title": "" }, { "docid": "3a866e5c5bea1cb340ccec66b5cf65dd", "score": "0.5706604", "text": "public function postContact()\n\t{\n\n\t\t\n\t\tInput::merge(array_map('trim', Input::all()));\n\n\t\t\n\t\t Mail::send('emails.contact_send_message', array('contact_message' => Input::get('contact_message'), 'email' => Input::get('email'), 'phone' => Input::get('phone'), 'full_name' => Input::get('full_name') ), function($message)\n {\n $message->from(Input::get('email'), 'Stipino.com');\n $message->subject('Nova poruka od ' . Input::get('full_name'));\n $message->to('[email protected]');\n });\n\n\t\t\n\t\treturn Redirect::back()->with('success_message', Lang::get('messages.contact_message_success'));\n\t\t\n\n\t\t\n\t}", "title": "" }, { "docid": "28539075521c506a5a2262e18fd7cdfc", "score": "0.5700236", "text": "public function sendAction()\n {\n if ($this->request->isPost() != true) {\n return $this->forward('contact/index');\n }\n\n $form = new ContactForm;\n $contact = new Contact;\n\n // Validate the form\n $data = $this->request->getPost();\n if (!$form->isValid($data, $contact)) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n return $this->forward('contact/index');\n }\n\n if ($contact->save() == false) {\n foreach ($contact->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->forward('contact/index');\n }\n\n $this->flash->success('Thanks, we will contact you in the next few hours');\n\n return $this->forward('index/index');\n }", "title": "" }, { "docid": "2cbcdacd3c16e3e68aa85877a666ad01", "score": "0.56981325", "text": "public function add_contacts(){\n\t\t$rest_json = file_get_contents(\"php://input\");\n\t\t$postData = json_decode($rest_json, true);\n\t\t$response = [];\n\t\t$res = $this->DogHeavenModel->add_contacts($postData);\n\t\tif($res == 1) {\n\t\t\t$response['success'] = \"true\";\n\t\t\t$response['message'] = \"contact added successfully\";\n\t\t}else{\n\t\t\t$response['success'] = \"false\";\n\t\t\t$response['message'] = \"contact can`t added\";\n\t\t}\n\t\techo json_encode($response);\n\t}", "title": "" }, { "docid": "59f5cddc607ac72a7b623789a281851f", "score": "0.5686481", "text": "public function send()\n {\n\n $this->addAddress($this->mailArray['toAddress'], $this->mailArray['toAddress']);\n $this->Subject = $this->mailArray['subject'];\n $this->Body = $this->mailArray['body'];\n\n parent::send();\n\n }", "title": "" }, { "docid": "5e6a6b9c8be49b1b4b1780f46740011c", "score": "0.5654383", "text": "function sendMail()\n\t{\n\t $this->buildMail();\n\t\n\t $this->strTo = implode( \", \", $this->sendTo );\n\t\n\t $res = @mail( $this->strTo, $this->xheaders['Subject'], $this->fullBody, $this->headers );\t\n\t}", "title": "" }, { "docid": "b17d95ed91335735191b1d6775b459fd", "score": "0.56442803", "text": "public function updateContacts(){\n }", "title": "" }, { "docid": "3f492c4f128e441550713da23de2727c", "score": "0.5638606", "text": "public function actionContact()\n {\n }", "title": "" }, { "docid": "efded413789e484e7d0c023b96ef13a1", "score": "0.5614331", "text": "public function post_contact($response_type = null)\n\t{\n\t\t$this->resource = 'contact';\n\t\t$this->action = 'post_contact';\n\t\treturn $this->post_data_send_mail($response_type);\n\t}", "title": "" }, { "docid": "d5f79dfe94f00efd03d60c7cd3e6a0a1", "score": "0.56104565", "text": "public function index()\n {\n $this->oneApiClient->authenticate();\n $customers = $this->oneApiClient->customers('27833884078');\n\n $this->oneApiClient->recipients($customers[0]->id);\n }", "title": "" }, { "docid": "6f0995d377bd904f7125357937d2ae7b", "score": "0.5588857", "text": "public function sendMail();", "title": "" }, { "docid": "7108031b317ff599ec2246c42cfcbabb", "score": "0.5579148", "text": "public function sendContactForm(Request $request)\n {\n \t// send the email with sendinblue\n \t$mailin = new Mailin(\"https://api.sendinblue.com/v2.0\",env('SENDINBLUE_KEY'));\n\n\t $data = array( \"to\" => array(\"[email protected]\"=>\"Lucolo General Contact\"),\n\t \"from\" => array($request->email,$request->name),\n\t \"subject\" => \"Message from www.lucolo.com\",\n\t \"html\" => \"Name: \".$request->name.\"<br>Email: \".$request->email.\"<br>Phone: \".$request->phone.\"<br><br>\".$request->message\n\t\t);\n\t \n\t $mailin->send_email($data);\n\n\t return \"true\";\n }", "title": "" }, { "docid": "f25974f009e698b875f3ca67688f280a", "score": "0.55773604", "text": "public function contact () {\n\t\t\t$this->data['title'] = 'Migration Portal | Contact';\n\t\t\t$this->template->write_view('content', 'users/contact', $this->data);\n\t\t\t$this->template->render();\n\t\t}", "title": "" }, { "docid": "50f226544ac3320263b57d0f8bd08885", "score": "0.55713373", "text": "public function actionContact()\n\t{\n\t\t$model=new Contact;\n\t\tif(isset($_POST['Contact']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Contact'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "3c819629d3167eeb790da0325b1d0f6a", "score": "0.55673057", "text": "public function actionContact()\n\t{\n\t\t$title = \"Kontakt - BORD-Festival\";\n\n\t\t$this->_params['title'] = $title;\n\n\t\tif(isset($_POST['inputContact']))\n\t\t{\n\t\t\t$firstname = $_POST['firstname'] ?? null;\n\t\t\t$lastname = $_POST['lastname'] ?? null;\n\t\t\t$mail = $_POST['mail'] ?? null;\n\n\t\t\t$inputProblem = $_POST['problem'] ?? null;\n\t\t\t$inputInformation = trim($_POST['information']) ?? null;\n\t\t\t\n\t\t\tif($firstname != null && $lastname != null && $mail != null && $inputProblem != null && $inputInformation != null)\n\t\t\t{\t\n\t\t\t\t$maildata = [\n\t\t\t\t\t'firstname'\t\t=> $firstname,\n\t\t\t\t\t'lastname'\t\t=> $lastname,\n\t\t\t\t\t'mail'\t\t\t=> $mail,\n\t\t\t\t\t'problem'\t\t=> $inputproblem,\n\t\t\t\t\t'information'\t=> $inputinformation,\n\t\t\t\t\t'createdat' \t=> date(\"Y-m-d H:i:s\")\n\t\t\t\t];\n\n\t\t\t\t$newSupportMail = new Support_mail($maildata);\n\t\t\t\t$newSupportMail->save();\n\n\t\t\t\theader('Location: index.php?c=contact&a=confirmcontact');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_params['contactError'] = 'Bitte alle fehlenden Felder ausfüllen!';\n\t\t\t\t\n\t\t\t\t// Array containing information about which inputs are missing\n\t\t\t\t$missingInformation = [];\n\n\t\t\t\t$missingInformation['firstname'] \t= $firstname != null ? false : true;\n\t\t\t\t$missingInformation['lastname'] \t= $lastname != null ? false : true;\n\t\t\t\t$missingInformation['mail']\t\t\t= $mail != null ? false : true;\n\t\t\t\t$missingInformation['problem'] \t\t= $inputProblem != null ? false : true;\n\t\t\t\t$missingInformation['information'] \t= $inputInformation != null ? false : true;\n\n\t\t\t\t$this->_params['missing'] = $missingInformation;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "749a0839344d7e1f456e9ff44c164a00", "score": "0.5553329", "text": "public function contactAction()\n {\n $contact = new ContactManager();\n $coordonnees = $contact->getContact();\n\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $errors = [];\n foreach ($_POST as $key => $value) {\n if (empty($_POST[$key])) {\n $errors[$key] = \"Veuillez renseigner le champ \" . $key;\n }\n }\n\n if (!empty($errors)) {\n return $this->twig->render('user/contact.html.twig', array(\n 'errors' => $errors\n ));\n } else {\n $nom= $_POST ['nom'];\n $prenom = $_POST ['prenom'];\n $email = $_POST ['email'];\n $message = $_POST ['message'];\n\n $this->sendEmail($nom, $prenom,$email,$message);\n } return $this->twig->render('user/success.html.twig');\n } return $this->twig->render('user/contact.html.twig', array(\n \"coordonnees\" => $coordonnees\n ));\n }", "title": "" }, { "docid": "d2c9ebc42643bf459f32f21ac5da1207", "score": "0.55523545", "text": "public function sendMailToContact(Request $request){\n\n $contact = Contact::findOrFail($request->contactId);\n\n $personName = $contact->name;\n $subject = $request->subject;\n $message = $request->message;\n\n\n //WRITE MAIL HERE ///\n\n\n\n Session::flash('message','STILL UNDER CONSTRUCTION');\n return redirect('/StaffContact');\n\n }", "title": "" }, { "docid": "1138ad8c180d1dac25af96365328a754", "score": "0.5544216", "text": "static function Send()\n {\n $client = new \\Http\\Adapter\\Guzzle6\\Client();\n $mailgun = new Mailgun(\"key-0a4f6480d98c7f8eac0b8ec76fd45c49\", $client);\n $domain = \"sandboxdab02e5233424a358e231a12d889bac7.mailgun.org\";\n\n try {\n $mailgun->sendMessage($domain, array(\n 'from' => '[email protected]',\n 'to' => '[email protected]',\n 'subject' => 'Correo Prueba',\n 'text' => 'Hola mundo!'));\n } catch (\\Exception $e) {\n error_log($e->getMessage());\n }\n\n }", "title": "" }, { "docid": "26f05ca1e11523bb211894e30c7bbb04", "score": "0.5543134", "text": "public function addVendorContacts() {\n\n $data = array(\n 'vendor_id' => $this->input->post('vendor_id'),\n 'name' => $this->input->post('vendor_contact_name'),\n 'email' => $this->input->post('vendor_contact_email'),\n 'phone' => $this->input->post('vendor_contact_number'),\n );\n// $this->db->set('creation_date', 'NOW()', FALSE);\n $insert = $this->db->insert('vendor_contacts', $data);\n $vendor_id = $this->db->insert_id();\n\n //FOR SENDING EMAIL TO KEYA\n $vendor_details = $this->getVendorContactsDataForEmail($vendor_id);\n $vendor_details = $vendor_details[0];\n $email_data = array(\n 'FIRST_NAME' => 'Keya',\n 'LAST_NAME' => 'Thomas',\n 'EMAIL' => '[email protected]',\n 'VENDOR_NAME' => $vendor_details['name'],\n 'VENDOR_EMAIL' => $vendor_details['email'],\n 'PHONE' => $vendor_details['phone'],\n 'COUNTRY' => $vendor_details['country_name'],\n 'CURRENCY' => $vendor_details['currency_name'],\n );\n \n $this->load->library('EmailLib');\n $EmailLib = new EmailLib();\n // $ret = $EmailLib->sendMail(90,'','',false,'vendor_contacts_add','',$email_data);\n if ($this->db->affected_rows() > 0) {\n return true;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "7dae4fe7ca2eb39734a79251686d2be3", "score": "0.5536081", "text": "function addContact($from, $network = 1)\r\n{\r\n global $aNotifyUser;\r\n\r\n if (is_array($aNotifyUser) && count($aNotifyUser) > 0) {\r\n $list = '';\r\n foreach ($aNotifyUser as $user) {\r\n if (trim($user) === '') continue;\r\n if ($list === '')\r\n $list = $user;\r\n else\r\n $list .= ','.$user;\r\n }\r\n if ($list === '') return;\r\n $nw_name = getNetworkName($network);\r\n $now = strftime('%D %T');\r\n $fname = dirname($_SERVER['argv'][0]).DIRECTORY_SEPARATOR.'spool'.DIRECTORY_SEPARATOR.'msn_'.getpid().'_'.md5('add'.rand(1,1000).$now).'.msn';\r\n $fp = fopen($fname, 'wt');\r\n if ($fp) {\r\n fputs($fp, \"TO: $list\\n\");\r\n fputs($fp, \"Now: $now\\n$from (network: $nw_name) add me to his contact list!\");\r\n fclose($fp);\r\n chmod($fname, 0666);\r\n }\r\n }\r\n return;\r\n}", "title": "" }, { "docid": "710df7872e92a87357d984fd84c4f83e", "score": "0.5532317", "text": "static function send($tos, $ccs, $bccs, $subject, $data){\n unset($data['birthday'], $data['token']);\n\n // Clean up\n $tos = array_filter($tos);\n $ccs = array_filter($ccs);\n $bccs = array_filter($bccs);\n\n // Build up body\n if(is_array($data)){\n\n foreach($data as $key => $value){\n if($key !== \"message\"){\n $body[] = \"<u>\".ucwords(str_replace(\"_\", \" \", $key)) . \"</u>: \" . $value;\n }\n else{\n $prepend = $value;\n }\n }\n\n // Append IP address\n $body[] = \"<u>IP Address</u>: \" . $_SERVER['REMOTE_ADDR'];\n $body = (isset($prepend) ? \"<p>\".$prepend.\"</p>\" : null) . implode(\"<br>\", $body);\n }\n else{\n throw new Excetion(\"Array expected\");\n }\n\n // App\n $app = JFactory::getApplication();\n $mailfrom = trim($data['email']);\n $fromname = (isset($data['name']) and !empty($data['name'])) ? $data['name'] : false;\n $sitename = $app->getCfg('sitename');\n\n // Mail it\n $mail = JFactory::getMailer();\n $mail->isHTML(true);\n $mail->addRecipient($tos);\n $mail->AddCC($ccs);\n $mail->AddBCC($bccs);\n $mail->setSender(array($mailfrom, $fromname));\n $mail->setSubject($sitename.': '.$subject);\n $mail->setBody(\"<h4>The following information has been submitted from the \" . $sitename . \" website</h4>\" . $body);\n\n // Send it\n if( ! $mail->Send() ){\n return false;\n }\n else{\n return true;\n }\n }", "title": "" }, { "docid": "b7348f3fab074f43293979ffee94050f", "score": "0.5520189", "text": "public function actionContact() {\n\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate()) {\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "title": "" }, { "docid": "b1f2ee15260ddea2cc9f14e7d4647888", "score": "0.5515303", "text": "public function contact()\n {\n\t\tdebugTitle('ContactController::contact()');\n\n global $config;\n\n\t\t//Captcha initialisation\n\t\t$captcha = new Captcha(ROOT.'/public/captcha', WEBROOT.'/public/captcha');\n\n\t\t$validator = new contactValidator();\n\n\t\tif ((Router::getCall($this->controller) == 'contact') && (Http::post() !== null)) {\n\t\t\t// call from form\n\n\t\t\t// Acces to DataBase\n \t\t\t$db = new contactModel();\n\n\t\t\t// check _POST according Validator (and DataBase)\n\t\t\tif ($validator->check(Http::post()) && ($captcha->check())) {\n\t\t\t\tif (($ok = $this->email())) {\n\t\t\t\t\t$this->emailsent();\n\t\t\t\t} // if\n\t\t\t} // if\n\t\t} // if\n\n\t\t// Captcha\n\t\t$validator->addFeedback('captcha', $captcha->getImg());\n\t\t$validator->addFeedback('captcha_reload', $captcha->getReload());\n\n $sections[] = $this->getView('/contact/contact.html', $validator->getFeedback());\n\n\t\t$this->htmlRender(array(\n\t\t\t 'meta_description' => \"happy{adr} is secured site based on INSEE files for adress in france, here is the contact form with captcha validation.\",\n\t\t\t\t'sections' => $sections\n\t\t\t));\n }", "title": "" }, { "docid": "d3d457149d9a2e8b1bcbc16073b3f572", "score": "0.5512772", "text": "public static function update_contact($params = array()) {\n $params['action'] = 'updatecontact';\n return self::send_request($params);\n }", "title": "" }, { "docid": "04e772d139d86028eeba7b5c80d63f97", "score": "0.5501776", "text": "function contact()\n\t{\n\t\tglobal $ibforums;\n\n\t\t$this->output .= View::make(\"msg.Address_header\");\n\n\t\t$stmt = $ibforums->db->query(\n\t\t \"SELECT *\n FROM ibf_contacts\n WHERE member_id='\" . $this->member['id'] . \"'\n ORDER BY contact_name ASC\"\n );\n\n\t\tif ($stmt->rowCount())\n\t\t{\n\t\t\t$this->output .= View::make(\"msg.Address_table_header\");\n\n\t\t\twhile ($row = $stmt->fetch())\n\t\t\t{\n\t\t\t\t$row['text'] = $row['allow_msg']\n\t\t\t\t\t? $ibforums->lang['can_contact']\n\t\t\t\t\t: $ibforums->lang['cannot_contact'];\n\t\t\t\t$row['text'] .= $row['show_online']\n\t\t\t\t\t? \") (\" . $ibforums->lang['show_online']\n\t\t\t\t\t: \"\";\n\n\t\t\t\t$this->output .= View::make(\"msg.render_address_row\", ['entry' => $row]);\n\t\t\t}\n\n\t\t\t$this->output .= View::make(\"msg.end_address_table\");\n\t\t} else\n\t\t{\n\t\t\t$this->output .= View::make(\"msg.Address_none\");\n\t\t}\n\n\t\t// Do we have a name to enter?\n\n\t\t$name_to_enter = \"\";\n\n\t\tif ($ibforums->input['MID'])\n\t\t{\n\t\t\tif (preg_match(\"/^(\\d+)$/\", $ibforums->input['MID']))\n\t\t\t{\n\t\t\t\t$stmt = $ibforums->db->query(\n\t\t\t\t \"SELECT name, id\n FROM ibf_members\n WHERE id='\" . $ibforums->input['MID'] . \"'\"\n );\n\n\t\t\t\t$memb = $stmt->fetch();\n\n\t\t\t\tif ($memb['id'])\n\t\t\t\t{\n\t\t\t\t\t$name_to_enter = $memb['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->output .= View::make(\"msg.address_add\", ['mem_to_add' => $name_to_enter]);\n\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\n\t}", "title": "" }, { "docid": "9ebe5c3e8162494f3288c67c710f42ff", "score": "0.5497639", "text": "function raiser_sprint_create_users_link_contacts(&$contacts) {\n /* @var $contact RedhenContact */\n foreach ($contacts as $contact) {\n // Create user.\n $edit = array();\n $edit['name'] = $contact->first_name . ' ' . $contact->last_name;\n $edit['mail'] = $contact->email();\n $edit['init'] = $edit['mail'];\n $edit['pass'] = $edit['name'];\n $edit['status'] = 1;\n\n $image_name = $contact->first_name . $contact->last_name . \".png\";\n $image_destination = \"public://$image_name\";\n $edit['picture'] = ts_install_helpers_generate_image(200, 200, $image_name, $image_destination);\n\n $user = user_save('', $edit);\n\n // Link user to contact.\n if ($user) {\n $contact->uid = $user->uid;\n $contact->save();\n }\n }\n}", "title": "" }, { "docid": "5c827c515b05adc32c7f633e7102ab5c", "score": "0.54805744", "text": "public function contact($sender, $subject, $content)\n\t{\n\t\t$recipient = config('mail.from.address');\n\n\t\tparent::send($recipient, $subject, 'mails.contact', compact('content'), [ 'address' => $sender ]);\n\t}", "title": "" }, { "docid": "92d69b8a0db050f6606d406fc03d6993", "score": "0.5469364", "text": "private function mailPartner()\n {\n //TODO Send email to partner about request\n }", "title": "" }, { "docid": "b855ba7bc78544281a7da952ab27302d", "score": "0.54581326", "text": "public function actionContact() {\r\n $model = new ContactForm;\r\n if (isset($_POST['ContactForm'])) {\r\n $model->attributes = $_POST['ContactForm'];\r\n if ($model->validate()) {\r\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\r\n //mail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\r\n Yii::app()->user->setFlash('contact', 'Obrigado pelo seu contato. Assim que pudermos responderemos ao seu email.');\r\n $this->refresh();\r\n }\r\n }\r\n $this->render('contact', array('model' => $model));\r\n }", "title": "" }, { "docid": "28cadb7ebad66cd1be22d8c773b7b725", "score": "0.5450436", "text": "public function sendAction()\n {\n if ($this->request->isPost() != true) {\n return $this->forward('contact/index');\n }\n\n $form = new ContactForm;\n $contact = new Contact();\n\n // Validate the form\n $data = $this->request->getPost();\n if (!$form->isValid($data, $contact)) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n return $this->forward('contact/index');\n }\n $notice = new Mailer('[email protected]', 'Feedback For Brown Bytes', serialize($data));\n\n\n $this->flash->success('Thank you for your feedback. I appreciate your help in making this application better.');\n return $this->forward('index');\n }", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.54395914", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "b5dd30fdc6a735a0da4dbec88e37e94d", "score": "0.5438327", "text": "public function sendMessage($recipients) {\n // Set up credentials\n $username = \"sandbox\";\n $apiKey = \"fe184319707e3f1e966be6f491a63d8e74848d607ab556e193337aeed3d482ed\";\n\n // Initialize the SDK\n $AT = new AfricasTalking($username, $apiKey);\n\n // Get the SMS Service\n $sms = $AT->sms();\n\n // Set your message\n $message = \"Welcome to the beginning of the start\";\n\n // Set your shortCode or senderId\n $from = \"13946\";\n try {\n // That's it, hit send and we'll take care of the rest\n $result = $sms->send([\n 'to' => $recipients,\n 'message' => $message,\n 'from' => $from\n ]);\n print_r($result);\n } catch (Exception $e) {\n echo \"Error: \".$e->getMessage();\n }\n }", "title": "" }, { "docid": "175167ca7e5c18ad1c17b366b6dd1fd1", "score": "0.54372174", "text": "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "title": "" }, { "docid": "6b72f21a466f81062440668b8bc3cfcb", "score": "0.54329723", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\t$this->redirect(array('contactoenviado'));\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "2b563376484f328fde32280afa09a5e9", "score": "0.54100144", "text": "public function sendMessage($data) {\n\t\t$messages = $this->__prepareMessage($data);\n\t\t\n\t\tforeach ($messages as $message) {\n\t\t\t$url = $this->__createUrl($message);\n\t\t\t// Set curl options\n\t\t\tcurl_setopt_array($this->client, array(\n\t\t\t\tCURLOPT_URL => $url,\n\t\t\t\tCURLOPT_FAILONERROR => true,\n\t\t\t\tCURLOPT_PORT => $this->port,\n\t\t\t\tCURLOPT_HTTPHEADER => array('Content-Type:text/html; charset=utf-8')\n\t\t\t));\n\t\t\t\n\t\t\tif (!curl_exec($this->client)) {\n\t\t\t\tCakeLog::write('ClientAndroid', 'Error durante el envío: ' . curl_error($this->client) . ' Code: ' . curl_errno($this->client));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tCakeLog::write('patients', 'phone sent to: ' . $message['phone']);\n\t\t\tcurl_close($this->client);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ff3e7547dd2f35b0f013ed8bd1f80894", "score": "0.540979", "text": "protected function smtpSend()\n {\n $account = $this->account;\n\n $this->openSocket($account);\n $this->connect($account);\n\n $this->authenticate($account);\n\n $this->sendCommand('MAIL FROM: <' . $this->from[0] . '>', '250');\n $recipients = array_merge($this->to, $this->cc, $this->bcc);\n foreach ($recipients as $recipient) {\n $this->sendCommand('RCPT TO: <' . $recipient[0] . '>', '250|251');\n }\n\n $this->sendCommand('DATA', '354');\n\n $this->sendCommand($this->content . self::CRLF . self::CRLF . self::CRLF . '.', '250');\n\n $this->sendCommand('QUIT', '221');\n\n $this->closeSocket();\n }", "title": "" }, { "docid": "60e418be5013d211bf322df8953b5f2d", "score": "0.5407033", "text": "function contact() {\r\n\r\n if (!empty($this->data)) {\r\n $this->Contact->create();\r\n\r\n $this->data['Contact']['author_ip'] = $this->Utilities->getRealIpAddr();\r\n $this->data['Contact']['user_agent'] = $_SERVER['HTTP_USER_AGENT'];\r\n\r\n $this->Contact->set( $this->data );\r\n if ($this->Contact->validates()) {\r\n $this->Session->setFlash('Thank you, Your comment has been sent.');\r\n\r\n $name = $this->data['Contact']['author'];\r\n $email = $this->data['Contact']['author_email'];\r\n $comment = $this->data['Contact']['comment'];\r\n\r\n $metaData = array(\r\n 'author_ip' => $this->data['Contact']['author_ip'],\r\n 'user_agent' => $this->data['Contact']['user_agent']\r\n );\r\n\r\n $this->Emailer->sendContact( $name, $email, $comment, $metaData );\r\n\r\n $this->redirect( $this->referer() );\r\n\r\n } else {\r\n debug($this->Contact->invalidFields() );\r\n exit;\r\n $this->Session->setFlash('The comment could not be sent. Please, try again.');\r\n $this->redirect( $this->referer() );\r\n }\r\n }\r\n\r\n // new venues 7\r\n $newVenues =\r\n ClassRegistry::init('Venue')->find('all', array(\r\n 'conditions' => array('Venue.publish_state_id' => Configure::read('Venue.published') ),\r\n 'order' => 'Venue.created DESC',\r\n //'fields' => array('Venue.name', 'Venue.slug'),\r\n 'contain' => array('VenueType.name', 'VenueSubtype.name', 'VenueField' ),\r\n 'limit' => 4\r\n ) );\r\n $this->set( compact('newVenues'));\r\n }", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.5403959", "text": "public function send();", "title": "" }, { "docid": "b0159be7dd9e32456dd3b40424f485c5", "score": "0.54023033", "text": "public function report_contact(){\r\n\t\t\t\r\n\t\t/*Funtion Hkeanginc .VN*/\t$xcrud = Xcrud::get_instance();\r\n\t\t/*Funtion Hkeanginc .VN*/\t$xcrud->table('tbl_contact');\r\n\t\t/*Funtion Hkeanginc .VN*/\t$xcrud->table_name('Báo cáo liên hệ');\r\n\t\t/*Funtion Hkeanginc .VN*/ $xcrud->unset_add()->unset_edit()->unset_csv()->unset_sortable();\r\n\t\t/*Funtion Hkeanginc .VN*/\t$xcrud->label('name','Họ Và Tên Yêu Cầu');\r\n\t\t/*Funtion Hkeanginc .VN*/\t$xcrud->order_by('date_contact','desc');\r\n\t\t/*Funtion Hkeanginc .VN*/\t$xcrud->label('message','Tin Thông Báo');\r\n\t\t/*Funtion Hkeanginc .VN*/\t$xcrud->label('date_contact','Ngày Liên Hệ');\r\n\t\t/*Funtion Hkeanginc .VN*/\t$data['data_content'] = $xcrud->render();\r\n\t\t\r\n\t\t$this->parser->parse('admin/header_admin',$data);\r\n\t\t$this->parser->parse('admin/index_admin',$data);\r\n\t\t$this->parser->parse('admin/footer_admin',$data);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5648ca2276407bc66742b3eecd776df7", "score": "0.5401684", "text": "public function sendMail()\n {\n }", "title": "" }, { "docid": "8aac225e7d671f098d3acc50758fcdd8", "score": "0.539609", "text": "public function sendMail() {\n\n if(!$_POST)\n return false;\n\n $contactInfo = get_option( 'localizacao_e_contato' );\n\n if( isset( $contactInfo['email_contato'] ) )\n $this->defaultRecipient = $contactInfo['email_contato'];\n\n $headers[] = \"From: \" . $this->customerName . \" - Página de Contato <\". $this->defaultRecipient . \">\";\n $headers[] = 'Bcc: Luís Felipe de Andrade <[email protected]>';\n $headers[] = \"Content-type: text/html\";\n\n $body = $this->formatBodyContent();\n $subject = $this->customerName . \" - Página de Contato \";\n\n if( wp_mail( $this->defaultRecipient, $subject , $body, $headers) )\n return true;\n else\n return false;\n\n }", "title": "" }, { "docid": "dff7d6a5cf572b6b5a756d148575425d", "score": "0.5393796", "text": "public function email()\n {\n\t\tglobal $config;\n\n\t\t$to = $config['contact']['to'];\n\t\t$subject = 'happyadr : '.date('Y-m-d G:i:s');\n\t\t$message = 'Message from : '.Http::post('email').\"\\n\\r\\n\\r\";\n\t\t$message .= \"Message body : \\n\\r\".Http::post('message');\n\n\t\t$return = mail($to, $subject, $message);\n\n\t\tdebug('$return : ',$return, 'contact->email');\n\n\t\treturn $return;\n }", "title": "" }, { "docid": "2e2830780a00cc5e283874676bcebf5b", "score": "0.53885996", "text": "public function actionContact() {\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n\t\t\t\t$headers = \"From: $name <{$model->email}>\\r\\n\" .\n\t\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\" .\n\t\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array(\n\t\t\t'model' => $model));\n\t}", "title": "" }, { "docid": "ca0328e83a557f5659a4b889a9ae61f8", "score": "0.5374961", "text": "public function sendMail($data, $recipient) {\n parent::sendMail($data, $recipient);\n\n $contactEntry = $this->model->createEntry($data);\n $this->model->save($contactEntry);\n }", "title": "" }, { "docid": "99c04461b8a024ffad7e1d294e06f942", "score": "0.5374216", "text": "private function createContact()\n {\n $contactsClient = new Contacts(new Client(['key' => 'demo']));\n\n $contactResponse = $contactsClient->create([\n ['property' => 'email', 'value' => 'rw_test' . uniqid() . '@hubspot.com'],\n ['property' => 'firstname', 'value' => 'joe'],\n ['property' => 'lastname', 'value' => 'user'],\n ]);\n\n sleep(1);\n\n return $contactResponse;\n }", "title": "" }, { "docid": "8f7d63bc76432ea3503c85cdc0fd6ba8", "score": "0.5366286", "text": "public function actionContact()\n {\n $model = new ContactForm();\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n if ($model->sendEmail(Yii::$app->params['adminEmail'])) {\n Yii::$app->session->setFlash(\n 'success',\n 'Thank you for contacting us. We will respond to you as soon as possible.'\n );\n } else {\n Yii::$app->session->setFlash('error', 'There was an error sending email.');\n }\n\n return $this->refresh();\n } else {\n return $this->render(\n 'contact',\n [\n 'model' => $model,\n ]\n );\n }\n }", "title": "" }, { "docid": "173109710990e953044ad5a33f19a6bf", "score": "0.5363448", "text": "public function sendData($data)\n {\n\n if($data instanceof InvalidRequestException) {\n $response = parent::handleRequestException($data, 'InvalidRequestException');\n return $this->createResponse($response);\n }\n try {\n $xero = $this->createXeroApplication();\n\n $contactGroup = new ContactGroup($xero);\n foreach ($data as $key => $value){\n if ($key !== 'Contacts') {\n $methodName = 'set'. $key;\n $contactGroup->$methodName($value);\n }\n }\n\n $response = $contactGroup->save();\n\n if ($this->data['Contacts']) {\n $responseData = $response->getElements()[0];\n if (is_array($responseData)) {\n if (array_key_exists('ContactGroupID', $response->getElements()[0])) {\n $contactGroupID = $responseData['ContactGroupID'];\n }\n } elseif (is_object($responseData)) {\n if (property_exists($response->getElements()[0],'ContactGroupID')) {\n $contactGroupID = $responseData->ContactGroupID;\n }\n }\n $contactGroup = new ContactGroup($xero);\n $contactGroup->setContactGroupID($contactGroupID);\n $this->addContactsToGroup($contactGroup, $this->data['Contacts']);\n $response = $xero->save($contactGroup);\n }\n\n } catch(Exception $exception) {\n $response = parent::handleRequestException($exception, get_class($exception));\n return $this->createResponse($response);\n }\n\n return $this->createResponse($response->getElements());\n }", "title": "" }, { "docid": "e3eaa8a56cfb5e4974353af2ae01078a", "score": "0.5355442", "text": "public function sendContactFormData($formData) {\n $contactApiRestUrl = sprintf(\n self::URL_ACORN_CONTACT_US_API_PATH,\n (isset($formData['SessionID'])) ? urlencode(sanitize_text_field($formData['SessionID'])) : '',\n (isset($formData['CookiesEnabled'])) ? urlencode(sanitize_text_field($formData['CookiesEnabled'])) : '',\n (isset($formData['Browser'])) ? urlencode(sanitize_text_field($formData['Browser'])) : '',\n (isset($formData['ScreenSize'])) ? urlencode(sanitize_text_field($formData['ScreenSize'])) : '',\n (isset($formData['ReferringURL'])) ? urlencode(sanitize_text_field($formData['ReferringURL'])) : '',\n (isset($formData['FlashPlayer'])) ? urlencode(sanitize_text_field($formData['FlashPlayer'])) : '',\n (isset($formData['Description'])) ? urlencode(urldecode($formData['Description'])) : '',\n (isset($formData['UserAgent'])) ? urlencode(sanitize_text_field($formData['UserAgent'])) : '',\n (isset($formData['Title'])) ? urlencode(sanitize_text_field($formData['Title'])) : '',\n (isset($formData['Model'])) ? urlencode(sanitize_text_field($formData['Model'])) : '',\n (isset($formData['ConnectionSpeed'])) ? urlencode(sanitize_text_field($formData['ConnectionSpeed'])) : '',\n (isset($formData['Email'])) ? urlencode(sanitize_email($formData['Email'])) : ''\n );\n\n if(strpos(CONTENT_BASE_URL, 'dev-')) {\n $contactApiRestUrl = str_replace('activity-api.rlje.net', 'dev-activity-api.rlje.net', $contactApiRestUrl);\n }\n\n return $this->doGetApi($contactApiRestUrl, 2);\n }", "title": "" }, { "docid": "44dbe24228d89a038e65bedbdcacd40b", "score": "0.5353144", "text": "public function pushContactsService($apiKeyEnvialo, $mailListID, $contact)\n {\n $params = array();\n $params['APIKey'] = $apiKeyEnvialo;\n $params['MailListID'] = $mailListID;\n\n $params['Email'] = $contact['email'];\n $params['CustomField1'] = $contact['name'];\n\n $baseURL = 'https://app.envialosimple.com';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $baseURL . '/member/edit/format/json');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));\n $jsonResponse = curl_exec($ch);\n $err = curl_error($ch);\n curl_close($ch);\n if ($err) {\n $response = false;\n } else {\n $response = true;\n }\n\n return $response;\n\n // Consulto en la base de datos el api key de Envialo\n // Envilo Simple https://app.envialosimple.com/<modulo>/<accion>?APIKey=<api key>&format=<format>\n // Clave API del usuario Env141051mpl3 = 8feb7abce2d6e753c7e545db37678baf6bb2a766b5a9883520bdd03e0b97370d01 \n }", "title": "" }, { "docid": "bd0c58a512f5b335a3216f92efc9a788", "score": "0.53439146", "text": "public function sendInvitations()\n {\n $ActaMailInvitation = new MeetMailInvitation($this);\n $ActaMailInvitation->send();\n }", "title": "" }, { "docid": "8db80ef53bacc0d78166c967e1413836", "score": "0.5343631", "text": "public static function delete_contact($params = array()) {\n $params['action'] = 'deletecontact';\n return self::send_request($params);\n }", "title": "" }, { "docid": "358276cbca5ec02d6628a9c0512eac7f", "score": "0.5339668", "text": "public function actionContact() {\n\t$model = new ContactForm;\n\tif (isset($_POST['ContactForm'])) {\n\t $model->attributes = $_POST['ContactForm'];\n\t if ($model->validate()) {\n\t\t$name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n\t\t$subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n\t\t$headers = \"From: $name <{$model->email}>\\r\\n\" .\n\t\t\t\"Reply-To: {$model->email}\\r\\n\" .\n\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\tmail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t$this->refresh();\n\t }\n\t}\n\t$this->render('contact', array('model' => $model));\n }", "title": "" }, { "docid": "c783ba7ec1ca11c8adef29267a3f028c", "score": "0.5324532", "text": "public function send() {\n\t\t$to = implode(', ', $this->to);\n\t\t// DEBUG debug($to);\n\t\t$subject = $this->headers['Subject'];\n\t\t// DEBUG debug($subject);\n\t\t$message = $this->buildBody();\n\t\t// DEBUG debug($headers);\n\t\t$headers = $this->buildHeaders();\n\t\t// DEBUG debug($message);\n\t\treturn @mail($to, $subject, $message, $headers, '-r '.$this->headers['From'].' -f '.$this->headers['From']);\n\t}", "title": "" }, { "docid": "88a9061695da06737018f09bb39c94fe", "score": "0.53201014", "text": "public function actionContact()\n {\n $model = new ContactForm;\n if (isset($_POST['ContactForm']))\n {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate())\n {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "title": "" }, { "docid": "102aeea73b50e71270983283fc4c8bd0", "score": "0.5317124", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Treima kasih telah menghubungi kami. Kami akan merespon masukkann anda secepatnya.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "29a598f8d576d5c54b9934a54b929635", "score": "0.53169245", "text": "public function contactsAdmin($user_data, $settings){\n $admin_email = self::getAdminEmail(['mail_email','contact_email']);\n\t\t$email = new Email();\n $email->to(array($admin_email->contact_email));\n $email->subject('List Offer Contact');\n $email->from(array($admin_email->mail_email => WEBSITE_NAME));\n $email->emailFormat('html'); \n $email->template('contact_admin',Null);\n $email->viewVars(array('url'=>Router::url(\"/\",true),'settings'=>$settings,'user_data'=>$user_data));\n /*if($email->send()){\n return true;\n }else{\n return false;\n }*/\n }", "title": "" }, { "docid": "196be271dca9283ac471f4a2c27b9639", "score": "0.53085756", "text": "public function actionContact()\n\t{// TODO: remove this code if not necessary, or update it to use the model sendMail() function if it is necessary\n\t\t$user = User::model()->findByPk(Yii::app()->user->id);\n\t\t$model=new Mail;\n\t\tif(isset($_POST['Mail']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Mail'];\n\t\t\t$model->name=$user->name;\n\t\t\t$model->email=$user->email;\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tif($model->sendMail()){\n\t\t\t\t\tYii::app()->user->setFlash('success','Your mail has been sent');\n\t\t\t\t} else {\n\t\t\t\t\tYii::app()->user->setFlash('error','Your mail was not sent');\n\t\t\t\t}\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "949cb95f01a43c17967194363e207171", "score": "0.53073376", "text": "public function send_contact_message($data){\n\t\t\n\t\t$CI\t=& get_instance();\n\t\t// se configura el correo\n\t\t$config['mailtype'] = 'html';\n\t\t$CI->email->initialize($config);\n\t\t$from_email = $CI->config->item('credential_general_email');\n\t\t$from_name\t= $CI->config->item('credential_general_name');\n\t\t$CI->email->from($from_email,$from_name);\n\t\t$CI->email->to($CI->config->item('credential_general_email'));\n\t\t$CI->email->subject('Contacto en Tú Evalúas');\n\t\t$data_to_message['data'] = $data;\n\t\t$html_email = $CI->load->view($CI->config->item('email_html_contact'),$data_to_message,true);\n\t\t$CI->email->message($html_email);\n\t\tif($CI->email->send()){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "96f2d562753da913a5006d8ba664ea9e", "score": "0.5304615", "text": "public function mesContactsAction()\n {\n if(!$this->session->get('userid')){\n $this->response->redirect(\"session/logout\");\n }\n $contacts = contact:: find();\n $this->view->contacts = $contacts;\n $this->view->page = \"contact\";\n }", "title": "" }, { "docid": "73416d384d7497830063c14ab921be5f", "score": "0.53009045", "text": "function contact(){\n\t\t\t$email = $_POST['email'];\n\t\t\t$name = $_POST['name'];\n\t\t\t$message = $_POST['message'];\n\t\t\tif(isset($_POST['contact']))\n\t\t\t\t$contact = $_POST['contact'];\n\t\t\n\t\t\t$this->load->library('email');\n\t\t\t\n\t\t\t$htmlContent = \" \";\n\n\t\t\t$htmlContent .= '<p>Name: '.$name.'</p>'; \n\t\t\t$htmlContent .= '<p>Email: '.$email.'</p>';\n\t\t\tif(isset($_POST['contact']))\n\t\t\t{\n\t\t\t\t$htmlContent .= '<p>Contact: '.$contact.'</p>';\t\n\t\t\t}\n\t\t\t$htmlContent .= '<p>Message: '.$message.'</p>'; \n\t\t\t \n\t\t\t$config['mailtype'] = 'html';\n\t\t\t$this->email->initialize($config);\n\t\t\t\t\n\t\t\t$this->email->reply_to($email, $name);\t\n\t\t $this->email->from(\"[email protected]\", 'Contact Form'); \n\t\t $this->email->to(\"[email protected]\");\n\t\t $this->email->subject('Contact Us Page Email'); \n\t\t $this->email->message($htmlContent); \n\t\t\n\t\t\t//Send email\n\t\t\t$result = $this->email->send();\n\t\t\tif(!$result)\n\t\t\t\techo $this->email->print_debugger();\n\t\t\telse\n\t\t\t\techo \"Thank you for getting in touch with us. Your email has been sent. We will get back to you shortly.\";\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3e187824bd9b7fcb73106b93555d2234", "score": "0.5300063", "text": "public function sendEmail(){\n if (!$this->validate())\n return false;\n\n return Yii::$app->mailer->compose(\n ['html' => 'call-me'], [\n 'nameForm' => 'Перезвоните мне',\n 'CallMeForm' => $this\n ])\n ->setTo(Yii::$app->params['adminEmail'])\n ->setSubject(\"Перезвоните мне\")\n ->send();\n }", "title": "" }, { "docid": "f58f9e106af30f55d8e1456b0c6a02e0", "score": "0.5298097", "text": "public function send(ContactForm $request)\n {\n Mail::to($this->email)->send(new ContactFormMail($request->all()));\n\n Alert::success(trans('contactus.send'))->flash();\n\n return redirect()->route('newhome');\n }", "title": "" }, { "docid": "4aba229c433889c1267cc29c580d5161", "score": "0.52917486", "text": "function setContact( $value, $params=FALSE ) {\n $this->contact['value'] = $value;\n if( is_array( $params )) {\n foreach( $params as $paramKey => $paramValue )\n $this->contact['params'][strtoupper( $paramKey )] = $paramValue;\n }\n }", "title": "" }, { "docid": "26ec304d37f2ea64cec036e4931d3a78", "score": "0.5291613", "text": "public function actionContact()\n\t{if (Yii::app()->user->checkAccess(\"action_site_contact\"))\n {\n\t\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t\t}\n\t\telse\n {\n throw new CrugeException(\"Usted no tiene los permisos para realizar esta accion\"); \n } \n\t}", "title": "" }, { "docid": "32c049301cfea7740dcecec617f411ab", "score": "0.5289254", "text": "public function actionContact()\n {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "title": "" } ]
7cda68b0a845f62a775105b4bf3ae794
Convert all cells to array of elements.
[ { "docid": "ea4b6eae446e04d4bd35c4f805de5950", "score": "0.0", "text": "public static function toArray(array $cells, array $renamedProperties = null, array $additionalProperties = null): array\n {\n return self::map($cells, function ($cell) use ($renamedProperties, $additionalProperties) {\n $item = [\n 'color' => $cell->color,\n 'player_id' => $cell->playerNumber,\n ];\n\n foreach ($renamedProperties as $oldKey => $newKey) {\n if (array_key_exists($oldKey, $item)) {\n $item[$newKey] = $item[$oldKey];\n unset($item[$oldKey]);\n }\n }\n\n if ($cell->id !== null) {\n $item['id'] = $cell->id;\n }\n\n if ($additionalProperties) {\n $item = array_merge($item, $additionalProperties);\n }\n\n return $item;\n });\n }", "title": "" } ]
[ { "docid": "5e89902ac069619c1ac2eebfa9a28a69", "score": "0.6519968", "text": "protected function parseCells()\n {\n $i = 0;\n $parsedCells = array();\n\n try {\n // Set the cell iterator\n $cellIterator = $this->row->getCellIterator();\n\n // Ignore empty cells if needed\n $cellIterator->setIterateOnlyExistingCells($this->reader->needsIgnoreEmpty());\n\n // Foreach cells\n foreach ($cellIterator as $this->cell)\n {\n // Check how we need to save the parsed array\n $index = ($this->reader->hasHeading() && isset($this->indices[$i])) ? $this->indices[$i] : $this->getIndexFromColumn();\n\n // Check if we want to select this column\n if ( $this->cellNeedsParsing($index) )\n {\n // Set the value\n $parsedCells[(string) $index] = $this->parseCell($index);\n }\n\n $i++;\n }\n\n } catch (PHPExcel_Exception $e) {\n // silently ignore the 'No cells exist within the specified range' error, but rethrow any others\n if ($e->getMessage() != 'No cells exist within the specified range') {\n throw $e;\n }\n // make sure that we return an empty CellCollection\n $parsedCells = [];\n }\n\n // Return array with parsed cells\n $cells = new CellCollection($parsedCells);\n\n if (! $this->reader->hasHeading()) {\n // Cell index starts at 0 when no heading\n return $cells->values();\n }\n\n return $cells;\n }", "title": "" }, { "docid": "b5dfeffeb6ce4f27c51d508ada65e940", "score": "0.6436973", "text": "public function to_array(){\n\t\t$array_data = array();\n\t\tforeach($this as $row){\n\t\t\t$array_data[] = $row->to_array(true);\n\t\t}\n\t\treturn $array_data;\n\t}", "title": "" }, { "docid": "8871f76827b5aa7b10f747c8f621d0d2", "score": "0.63288146", "text": "public function getCellRows() {\n\t\t$cells = array();\n\t\t$i\t = 0;\n\t\t\n\t\t// Just transpose the cells array\n\t\tforeach ($this->dates as $date) {\n\t\t\tfor ($j = 0, $jj = count($this->cells[$date]); $j < $jj; $j++)\n\t\t\t\t$cells[$j][$i] = $this->cells[$date][$j];\n\t\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $cells;\n\t}", "title": "" }, { "docid": "0ec7b353455bd6927979108a312c2e74", "score": "0.6302435", "text": "#[@generic(return= 'T[]')]\n public function toArray() { \n return array_values($this->_elements);\n }", "title": "" }, { "docid": "ba0fee59fc3c45aa31c9344f170ee00e", "score": "0.6237988", "text": "private function getArray(): array\n {\n $array = [];\n\n foreach ($this->elements as $element) {\n $array[] = $this->collect($element, $this->collector);\n }\n\n return $array;\n }", "title": "" }, { "docid": "4554868235f6e5d67afd861e07410661", "score": "0.622145", "text": "function &getElements()\n {\n $elements = array();\n foreach($this->_rows as $row) {\n foreach($row as $ek => $elm) {\n $elements[] = $elm;\n }\n }\n return $elements;\n }", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.62195253", "text": "public function asArray();", "title": "" }, { "docid": "9a55e794aeb1b24167dcf7573c996d50", "score": "0.6202028", "text": "public function getValues()\n {\n $values = [];\n foreach ($this->cells as $cell) {\n if ('' !== $cell->getValue()) {\n $values[] = $cell->getValue();\n }\n }\n\n return $values;\n }", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61976856", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.61952376", "text": "public function toArray();", "title": "" }, { "docid": "b1facad3f1b29ec68e4b57557e570dd4", "score": "0.6182692", "text": "function toArray()\n {\n foreach ($this->_rows as $i => $row) {\n $this->_data[$i] = $row->toArray();\n }\n return $this->_data;\n }", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.616965", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.616965", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.616965", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.616965", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.616965", "text": "abstract public function toArray();", "title": "" }, { "docid": "f353b36ed2f0c8069c3a07a94c67ea6a", "score": "0.61348987", "text": "public function asArray()\n {\n return [\n ['1', 'row1'],\n ['2', 'row2']\n ];\n }", "title": "" }, { "docid": "833a0c4292cf678055f9f4231022071a", "score": "0.60765535", "text": "abstract protected function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.60709566", "text": "public function toArray(): array;", "title": "" }, { "docid": "c4e120fc91e87beb58b76649bcce4346", "score": "0.6065699", "text": "public function getAllDataAsArray()\n {\n\n $dataArray = array();\n\n foreach ($this->getAllData() as $data) {\n $cellData[] = $data->name;\n $cellData[] = $data->email;\n $cellData[] = $data->address;\n $cellData[] = $data->description;\n $cellData[] = $data->amount;\n $cellData[] = $data->balance;\n $cellData[] = $data->count;\n $cellData[] = $data->log_date;\n $cellData[] = $data->log_time;\n $cellData[] = $data->status;\n\n array_push($dataArray, $cellData);\n $cellData = [];\n }\n\n return $dataArray;\n }", "title": "" }, { "docid": "6d41570a3322af137c181ba5f8653f01", "score": "0.6058519", "text": "public function toArray() {\n $array = array();\n\n $this->each(function($value) use (&$array) {\n $array[] = $value;\n });\n\n return $array;\n }", "title": "" }, { "docid": "2b7f99e32b83e3f289ae75da96f150c7", "score": "0.60508925", "text": "public function toArray()\r\n {\r\n return $this->_row->toArray();\r\n }", "title": "" }, { "docid": "de454b72926dc37885943366fbd989f6", "score": "0.6048917", "text": "function toArray();", "title": "" }, { "docid": "de454b72926dc37885943366fbd989f6", "score": "0.6048917", "text": "function toArray();", "title": "" }, { "docid": "38d9a093e430e6f0520c4be52c4f8840", "score": "0.60429645", "text": "public function toInternalArray() {\n return parent::toArray();\n }", "title": "" }, { "docid": "4d9935412e4059f41f7f7ddf7c072db5", "score": "0.6012528", "text": "public function toArray() {\n $data = array();\n\n for ($this->rewind(); $this->valid(); $this->next()) {\n $data[] = $this->current();\n }\n\n return $data;\n }", "title": "" }, { "docid": "c7db62650a4dde23f548d2cfe7bc3a2f", "score": "0.60112214", "text": "public function rangesToArray(): array\n {\n $ranges = method_exists($this, 'ranges') ? $this->ranges() : [];\n\n return array_map(function ($value, $label) {\n return compact('value', 'label');\n }, array_keys($ranges), $ranges);\n }", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.59788465", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "6f3533916530c8ff0c0698336c546bbd", "score": "0.5977811", "text": "public function toArray(){}", "title": "" }, { "docid": "f973a6dd44822b86685b99f148d8825f", "score": "0.5949785", "text": "abstract public function toArray(): array;", "title": "" }, { "docid": "f973a6dd44822b86685b99f148d8825f", "score": "0.5949785", "text": "abstract public function toArray(): array;", "title": "" }, { "docid": "f973a6dd44822b86685b99f148d8825f", "score": "0.5949785", "text": "abstract public function toArray(): array;", "title": "" }, { "docid": "f973a6dd44822b86685b99f148d8825f", "score": "0.5949785", "text": "abstract public function toArray(): array;", "title": "" }, { "docid": "36b9b237354ba7fbaf39edd8418e1072", "score": "0.59410924", "text": "abstract public function asArray(): array;", "title": "" }, { "docid": "cf9cc55002b01d67ad0c487272d18c54", "score": "0.59404445", "text": "public function getCells()\n {\n return $this->cells;\n }", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.59154314", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.59154314", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.59154314", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.59154314", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.59154314", "text": "public function toArray() : array;", "title": "" } ]
eb867ea4ebb2c2896bc5f8f90b21e0bb
Llamado a la vista admin_instructornueva
[ { "docid": "b6dc3e72368af2c359fe8554a1dfa477", "score": "0.8140231", "text": "public function estadoAdmin_instructor()\n {\n $pp = new admin_instructor();\n\n if(isset($_REQUEST['correo']))\n {\n $pp = $this->model->obteneradmin_instructor($_REQUEST['correo']);\n }\n\n //Llamado de las vistas.\n require_once '../vista/header.php';\n require_once '../vista/admin_instructor/admin_instructor-estado.php';\n require_once '../vista/footer.php';\n }", "title": "" } ]
[ { "docid": "28e33eb1cb5ce88048bde24368c2deab", "score": "0.7937453", "text": "public function nuevoAdmin_instructor()\n {\n $pp = new admin_instructor();\n\n //Llamado de las vistas.\n require_once '../vista/header.php';\n require_once '../vista/admin_instructor/admin_instructor-nuevo.php';\n require_once '../vista/footer.php';\n }", "title": "" }, { "docid": "21ab59a546490b5a62b922a6fae5759a", "score": "0.7758515", "text": "public function crudAdmin_instructor()\n {\n $pp = new admin_instructor();\n\n //Se obtienen los datos de la persona a editar.\n if(isset($_REQUEST['correo']))\n {\n $pp = $this->model->obteneradmin_instructor($_REQUEST['correo']);\n }\n\n //Llamado de las vistas.\n require_once '../vista/header.php';\n require_once '../vista/admin_instructor/admin_instructor-editar.php';\n require_once '../vista/footer.php';\n }", "title": "" }, { "docid": "d5e42ba6b4c6b162b0ec2c6f171bd6c9", "score": "0.7025919", "text": "function wplms_display_instructor($ins){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "91e989134251b91d628e96fa4accdd7e", "score": "0.6995592", "text": "public function actionCreateByInstructor()\n {\n \n \t$companyUserModel = EmpresaUsuario::getMyCompany();\n \n \n \t$model = new Instructor();\n \t \n \t$model->ID_EMPRESA = $companyUserModel->ID_EMPRESA;\n \t$model->ACTIVO = 1;\n \t \n \tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n \t\treturn $this->redirect(['view-by-instructor']);\n \t} else {\n \t\treturn $this->render('create_by_instructor', [\n \t\t\t\t'model' => $model,\n \t\t]);\n \t}\n }", "title": "" }, { "docid": "2f320a900410f79f9bb4ebb30a9959bc", "score": "0.6901696", "text": "public function edit(Instructor $instructor)\n {\n //\n }", "title": "" }, { "docid": "98ea090fe226514d9c2be6f35ee544e7", "score": "0.6900981", "text": "public function show(Instructor $instructor)\n {\n //\n }", "title": "" }, { "docid": "ddde47c243fd9b09a4d0d4caab30e9c4", "score": "0.6839001", "text": "public function edit(Instructor $instructor) {\n\t\t//\n\t}", "title": "" }, { "docid": "09d72c12e48296957ce30b8bfbb2edca", "score": "0.67438644", "text": "public function show(Instructor $instructor) {\n\t\t//\n\t}", "title": "" }, { "docid": "bfbf9272c16005850ffff1f214606303", "score": "0.67017186", "text": "function set_instructor( $instructor ) {\n\t\t$this->instructor = $instructor;\n\t}", "title": "" }, { "docid": "c5445eda16ecf0745bbef3bf9c015883", "score": "0.6639961", "text": "public function edit_instructor_form()\n\t{\n\t\t$this->loadModel('Instructor');\n\t\t$this->set('form_action', 'edit_instructor');\n\t\t$id = $this->request->data['id'];\n\t\t$sex_array = array(1 => 'Male', 0 => 'Female');\n\t\t$this->set('sex_array', $sex_array);\n\t\t$this->request->data = $this->Instructor->find('first', array('conditions' => array('Instructor.id' => $id)));\n\t\t// $this->set('schools', $this->Instructor->School->find('list'));\n\t\t// $this->set('districts', $this->Instructor->School->District->find('list'));\n\t}", "title": "" }, { "docid": "fc39be7a6c337e278d798c33e03ab836", "score": "0.6618978", "text": "public function getInstructor()\n {\n return $this->instructor;\n }", "title": "" }, { "docid": "de98fb2bcd62a42bf62b530b03ead5b2", "score": "0.65684783", "text": "public function index()\n {\n $title = \"Instructor\";\n $user = Auth::user();\n $viewpage = Instructor::all();\n return view('admin.instructor.index', compact(\"title\", \"user\",\"viewpage\"));\n \n }", "title": "" }, { "docid": "73473d02ff0a23a690a887c43dd19414", "score": "0.65305394", "text": "function create_course_setup_nav_instructor(){\n\t global $bp;\n\t\t$check =0;\n\t if(bp_is_my_profile() && current_user_can('edit_posts')){\n\t $check =1;\n\t bp_core_new_nav_item( array(\n\t 'name' => __('Create a Course', 'vibe-customtypes' ),\n\t 'slug' => 'create-course',\n\t 'position' => 100,\n\t 'screen_function' => array($this,'wplms_create_course_redirect'),\n\t 'show_for_displayed_user' => $check\n\t ) );\n\t } \n\t}", "title": "" }, { "docid": "b78fbf7b1bef20915e118c99fbdfc8f4", "score": "0.64814365", "text": "function campagnes_autoriser(){}", "title": "" }, { "docid": "d1e30a7d6072f68dbf0aab3901be12a8", "score": "0.64229465", "text": "public function actionViewByInstructor(){\n \n \t$model = Instructor::getOwnData();\n \n \treturn $this->render('view_by_instructor',['model'=>$model]);\n \n \n \n }", "title": "" }, { "docid": "0d05a1de947fd605d415f062eb3a2d02", "score": "0.64090383", "text": "public function index()\n {\n\n $user=get_auth_user();\n $instructor=$this->_instructor->where('user_id',$user->id)->first();\n// dd($instructor);\n if($instructor!=null)\n {\n $instructorTrainees=$this->_instructor->getCountOfTraineesOfInstuctor($instructor);\n }\n $programs=Program::showAll();\n $dietPrograms=DietProgram::showAll();\n $dietAllocations=DietAllocation::showall();\n return view('muscle-up-app.instructor.index' , compact('instructorTrainees','programs','dietPrograms','dietAllocations'));\n\n }", "title": "" }, { "docid": "368d180e5df5ebac52b17ae0c1f6becf", "score": "0.63793576", "text": "public function saveAction()\n {\n if ($data = $this->getRequest()->getPost('importinstructor')) {\n try {\n $curriculumId = $data['curriculum_id'];\n $curriculum = Mage::getModel('bs_traininglist/curriculum')->load($curriculumId);\n $clear = $data['clearall'];\n\n\n $vaecoIds = explode(\"\\r\\n\", $data['vaeco_ids']);\n $instructorIds = array();\n $i=1;\n\n if(!$clear){\n $currentInstructors = Mage::getModel('bs_instructor/instructor')->getCollection()->addCurriculumFilter($curriculumId);\n if($currentInstructors->count()){\n foreach ($currentInstructors as $tn) {\n $instructorIds[$tn->getId()] = array('position'=>$i);\n\n $i++;\n }\n\n }\n }\n\n foreach ($vaecoIds as $id) {\n\n $id = trim($id);\n if(strlen($id) == 5){\n $id = \"VAE\".$id;\n }elseif (strlen($id) == 4){\n $id = \"VAE0\".$id;\n }\n $id = strtoupper($id);\n\n //check if this id existed in trainee table\n $instructor = Mage::getModel('bs_instructor/instructor')->getCollection()->addAttributeToFilter('ivaecoid', $id)->getFirstItem();\n if($instructor->getId()){//if existed, just add to the course\n $instructorIds[$instructor->getId()] = array('position'=>$i);\n\n\n }else {// we will add to the trainee table then add to the course\n $instructor = Mage::getModel('bs_instructor/instructor');\n $instructor->setAttributeSetId($instructor->getDefaultAttributeSetId());\n //get info\n $customer = Mage::getModel('customer/customer')->getCollection()->addAttributeToFilter('vaeco_id', $id)->getFirstItem();\n if($customer->getId()){\n $cus = Mage::getModel('customer/customer')->load($customer->getId());\n $name = $cus->getName();\n $phone = $cus->getPhone();\n $departmentId = $cus->getGroupId();\n $dob = $cus->getDob();\n $pob = $cus->getPob();\n $pos = $cus->getPosition();\n $div = $cus->getDivision();\n $username = $cus->getUsername();\n\n\n $group = Mage::getModel('customer/group')->load($departmentId);\n $dept = $group->getCustomerGroupCodeVi();\n\n $dept = $div.' - '. $dept;\n\n $instructor->setIvaecoid($id);\n $instructor->setIname($name);\n $instructor->setIusername($username);\n $instructor->setIdivisionDepartment($dept);\n $instructor->setIphone($phone);\n $instructor->setIposition($pos);\n\n $instructor->save();\n\n $instructorIds[$instructor->getId()] = array('position'=>$i);\n }\n\n }\n\n $i++;\n }\n\n $curriculumInstructor= Mage::getResourceSingleton('bs_instructor/instructor_curriculum')->saveCurriculumRelation($curriculum, $instructorIds);\n\n $add = '';\n $url = $this->getUrl('*/traininglist_curriculum/edit', array('id'=>$curriculumId));\n if($this->getRequest()->getParam('popup')){\n $add = '<script>window.opener.window.location.href = \\''.$url.'\\';window.close()</script>';//trainee_gridJsObject.doFilter()\n }\n\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_importinstructor')->__('Import Instructor was successfully saved. %s', $add)\n );\n Mage::getSingleton('adminhtml/session')->setFormData(false);\n if ($this->getRequest()->getParam('back')) {\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n }\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n Mage::getSingleton('adminhtml/session')->setImportinstructorData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n } catch (Exception $e) {\n Mage::logException($e);\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_importinstructor')->__('There was a problem saving the import instructor.')\n );\n Mage::getSingleton('adminhtml/session')->setImportinstructorData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_importinstructor')->__('Unable to find import instructor to save.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "a427096667c1c151e1c8649ce38fdf34", "score": "0.6360715", "text": "public function setInstructor($instructor)\n {\n $this->instructor = $instructor;\n }", "title": "" }, { "docid": "ad9f4b0340075623c750f24ea7aee1a0", "score": "0.6337957", "text": "function get_instructor_permissions_check(){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "bbc82c7f2bb61e940deb4b298f0820a2", "score": "0.61814255", "text": "public function isInstructor()\n {\n return $this->role->id == 2;\n }", "title": "" }, { "docid": "963c82cb7dad27f13a0c0d962cc75ae7", "score": "0.6129243", "text": "public function show() {\n $instructors=$this->_instructor->with('user')->paginate(5);\n return view('muscle-up-app.instructor.instructor-list')->with('instructors',$instructors);\n }", "title": "" }, { "docid": "219e89de37933dfb407409b6a5ef391a", "score": "0.61220384", "text": "public function assessor()\n {\n return $this->belongsTo(Instructor::class, 'assessor_id');\n }", "title": "" }, { "docid": "30dbcd82cc173ca7cfa74aa0662c2174", "score": "0.60968477", "text": "public function testCreateInstructors() {\r\n\t\t\r\n\t\t$this->assertEquals(0, $this->pm->numberOfInstructors());\r\n\t\t\r\n\t\t$firstName = \"Diego\";\r\n\t\t$lastName = \"Costa\";\r\n\t\t$username = \"DCosta\";\r\n\t\t$password = \"passw0rd\";\r\n\t\t$CDN = array ([123]);\r\n\t\ttry {\r\n\t\t\t$this->pc->createInstructor($username, $password, $firstName, $lastName, $CDN);\r\n\t\t} catch (Exception $e) {\r\n\t\t\techo $e->getMessage();\r\n\t\t\t$this->fail();\r\n\t\t}\r\n\t\t\r\n\t\t// validate stored data\r\n\t\t$this->pm = $this->pt->loadProfileManagerFromStore();\r\n\t\t$this->assertEquals(1, $this->pm->numberOfInstructors());\r\n\t\t$this->assertCount(1, $this->pm->getInstructors());\r\n\t\t$this->assertEquals(\"Diego\", $this->pm->getInstructor_index(0)->getFirstName());\r\n\t\t$this->assertEquals(\"Costa\", $this->pm->getInstructor_index(0)->getLastName());\r\n\t\t$this->assertEquals(\"DCosta\", $this->pm->getInstructor_index(0)->getUsername());\r\n\t\t$this->assertEquals(\"passw0rd\", $this->pm->getInstructor_index(0)->getPassword());\r\n\r\n\t\t$firstName = \"Didier\";\r\n\t\t$lastName = \"Drogba\";\r\n\t\t$username = \"DDrogba\";\r\n\t\t$password = \"1234\";\r\n\t\ttry {\r\n\t\t\t$this->pc->createInstructor($username, $password, $firstName, $lastName,$CDN);\r\n\t\t} catch (Exception $e) {\r\n\t\t\techo $e->getMessage();\r\n\t\t\t$this->fail();\r\n\t\t}\r\n\t\t\r\n\t\t// validate stored data\r\n\t\t$this->pm = $this->pt->loadProfileManagerFromStore();\r\n\t\t$this->assertEquals(2, $this->pm->numberOfInstructors());\r\n\t\t$this->assertEquals(\"Didier\", $this->pm->getInstructor_index(1)->getFirstName());\r\n\t\t$this->assertEquals(\"Drogba\", $this->pm->getInstructor_index(1)->getLastName());\r\n\t\t$this->assertEquals(\"DDrogba\", $this->pm->getInstructor_index(1)->getUsername());\r\n\t\t$this->assertEquals(\"1234\", $this->pm->getInstructor_index(1)->getPassword());\r\n\t\t\r\n\t\t// validate that different IDs where given\r\n\t\t$this->assertTrue($this->pm->getInstructor_index(0)->getId() != $this->pm->getInstructor_index(1)->getId());\r\n\t}", "title": "" }, { "docid": "bb5d8cc33b918a6cffc8eed7774c9c6c", "score": "0.6096051", "text": "public function create() {\n if(!(Auth::user()->can('Exam Self') || Auth::user()->can('Exam All'))) {\n return redirect()->route('errors.perms.resource');\n }\n\n //$years = DB::table('exams')->select('school_year')->groupBy('school_year')->orderBy('school_year', 'desc')->get();\n\n /*$currentYear = date(\"Y\");\n $currentMonth = date(\"m\");\n\n if($years->isEmpty()) {\n $obj = new \\stdClass;\n $obj->school_year = $currentYear-1;\n $years->prepend($obj);\n }\n\n while($currentYear > $years[0]->school_year) {\n $obj = new \\stdClass;\n $obj->school_year = $years[0]->school_year+1;\n $years->prepend($obj);\n }\n }*/\n\n\n //get list of instructors if admin\n $instructors = collect([]);\n\n if(Auth::user()->can('Exam All')) {\n $instructors = User::permission(['Exam Self','Exam All'])->select('users.*',DB::raw(\"CONCAT_WS(' ',prefix,first_name,last_name,suffix) AS Instructor\"))->get();\n }\n\n $instructors = $instructors->sortBy(['first_name','last_name']);\n\n return view('exams.create')->with(['instructors' => $instructors]);\n }", "title": "" }, { "docid": "e4ba37bd7e187d2ec9275859fbdd415f", "score": "0.60713387", "text": "public function accueil()\n\t{\n\t \t//SECURITE\n\t\t//SEULEMENT LES ROLES ADMIN PEUVENT VOIR LA PAGE\n\t\t$this->allowTo('admin');\n\n\t\t$this->show('page/admin-accueil');\n\t}", "title": "" }, { "docid": "a602e9b01f5692faeae4a0d75a0fd88f", "score": "0.6067936", "text": "function data_enrol_instructors() {\n if (empty($this->classid) || empty($this->moodlecourseid) ||\n (!empty($this->siteconfig) && !file_exists($this->siteconfig))) {\n\n return false;\n }\n\n $ins = new instructor();\n\n global $CURMAN;\n\n if ($CURMAN->config->default_instructor_role && $instructors = $ins->get_instructors($this->classid)) {\n /// At this point we must switch over the other Moodle site's DB config, if needed\n if (!empty($this->siteconfig)) {\n $cfgbak = moodle_load_config($this->siteconfig);\n }\n\n /// This has to be put here in case we have a site config reload.\n $CFG = $GLOBALS['CFG'];\n $CURMAN = $GLOBALS['CURMAN'];\n $db = $GLOBALS['db'];\n\n if (!$context = get_context_instance(CONTEXT_COURSE, $this->moodlecourseid)) {\n return false;\n }\n\n foreach ($instructors as $instructor) {\n /// Make sure that a Moodle account exists for this user already.\n $user = new user($instructor->id);\n\n if (!$muser = $CURMAN->db->get_record('user', 'idnumber', addslashes($user->idnumber))) {\n $muser = addslashes_recursive($muser);\n /// Create a new record.\n $muser = new stdClass;\n $muser->idnumber = $user->idnumber;\n $muser->username = $user->uname;\n $muser->passwword = $user->passwd;\n $muser->firstname = $user->firstname;\n $muser->lastname = $user->lastname;\n $muser->auth = 'manual';\n $muser->timemodified = time();\n $muser->id = $CURMAN->db->insert_record('user', $muser);\n }\n\n /// If we have a vald Moodle user account, apply the role.\n if (!empty($muser->id)) {\n role_assign($CURMAN->config->default_instructor_role, $muser->id, 0, $context->id, 0, 0, 0, 'manual');\n }\n }\n\n /// Reset $CFG object.\n if (!empty($this->siteconfig)) {\n moodle_load_config($cfgbak->dirroot . '/config.php');\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "5fd76b908ecccab4297feec584bd4fa5", "score": "0.60319996", "text": "public function add_teacher_form()\n\t{\n\t\t$this->loadModel('Instructor');\n\t\t$this->set('form_action', 'add_instructor');\n\t\t$sex_array = array(1 => 'Male', 0 => 'Female');\n\t\t$this->set('sex_array', $sex_array);\n\t\t$schoolId = $this->Session->read('school_id');\n\t\t$this->set('schoolId', $schoolId);\n\t\t// $this->set('classes', $this->Classes->find('list'));\n\t\t// $this->set('schools', $this->Instructor->School->find('list'));\n\t\t// $this->set('districts', $this->Instructor->School->District->find('list'));\n\t\t// $this->render('add_class_form');\n\t}", "title": "" }, { "docid": "a20a7bf63ab6a5ccc586e4e19465bcf0", "score": "0.5980225", "text": "public function isInstructor() {\n\t\treturn $this->role === self::ADMIN || $this->role === self::INSTRUCTOR;\n\t}", "title": "" }, { "docid": "5cab351e84c1198b6b46aef4ef0f02dd", "score": "0.59760934", "text": "public function __construct(){\n if ((!isset($_SESSION[\"admin\"])) && (!isset($_SESSION[\"instructor\"]))) {\n header(\"location: \".URL.\"/admin\");\n }\n}", "title": "" }, { "docid": "7ecc80d6fe744de95e3f4fcfd124d0fe", "score": "0.5968597", "text": "public function validate_instructor_details($instructor) {\n if (!$instructor->first_name) { return 'first name is required'; }\n if (!$instructor->surname) { return 'surname is required'; }\n if (!$instructor->email) { return 'email is required'; }\n if (!$instructor->adi_license_no) { return 'adi license no is required'; }\n if (!$instructor->gender) { return 'gender is required'; }\n if (!$instructor->password) { return 'password is required'; }\n\n return false;\n }", "title": "" }, { "docid": "a79c91096479ee270b74641ab675cd48", "score": "0.596166", "text": "function get_instructors($request){\n\n\t\t\t$no=999;\n\t\t\t$args = apply_filters('wplms_allinstructors',array(\n 'role' => 'instructor', // instructor\n \t\t\t'number' => $no, \n 'orderby' => 'post_count', \n 'order' => 'DESC' \n \t\t));\n\t\t\t$user_query = new WP_User_Query( $args );\n\t\t\t$args = apply_filters('wplms_alladmins',array(\n 'role' => 'administrator', // instructor\n 'number' => $no, \n 'orderby' => 'post_count', \n 'order' => 'DESC' \n ));\n\n\t\t\t$flag = apply_filters('wplms_show_admin_in_instructors',1);\n\t\t\tif(isset($flag) && $flag)\n\t\t\t $admin_query = new WP_User_Query( $args );\n\n\t\t\t$instructors=array();\n\t\t\tif ( isset($admin_query) && !empty( $admin_query->results ) ) {\n\t\t\t foreach ( $admin_query->results as $user ) {\n\t\t\t $instructors[$user->ID]=$user->user_email;\n\t\t\t }\n\t\t\t}\n\n\t\t\tif ( !empty( $user_query->results ) ) {\n\t\t\t foreach ( $user_query->results as $user ) {\n\t\t\t $instructors[$user->ID]=$user->user_email;\n\t\t\t }\n\t\t\t}\n\n\t\t\t$sub=$bio='';\n\t\t\tif(bp_is_active('xprofile')){\n\t\t\t\t$ifield2 = vibe_get_option('instructor_about');\n\t\t\t\t$ifield = vibe_get_option('instructor_field');\n\t\t\t}\n\t\t\tif(!empty($instructors)){\n\t\t\t\tforeach($instructors as $instructor_id => $instructor_email){\n\t\t\t\t\t$avatar = bp_core_fetch_avatar( array( 'item_id' => $instructor_id,'type'=>'full', 'html' => false ) );\n\t\t\t\t\t\t\n\t\t\t\t\tif(!isset($ifield) || $ifield =='')$ifield='Speciality';\n\t $sub= bp_get_profile_field_data( 'field='.$ifield.'&user_id=' .$instructor_id ); \n\n\t \n\t\t\t\t\tif(!isset($ifield2) || $ifield2 =='')$ifield2='Bio';\n\t\t\t\t\t$bio = bp_get_profile_field_data( 'field='.$ifield2.'&user_id=' .$instructor_id ); \n\t\t\t\t\t\n\t\t\t\t\tif(empty($avatar)){\n\t\t\t\t\t\t$avatar = vibe_get_option('default_avatar');\n\t\t\t\t\t\tif(empty($avatar)){\n\t\t\t\t\t\t\t$avatar = VIBE_URL.'/assets/images/avatar.jpg';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$all_instructors[] = array(\n\t\t\t\t\t\t\t\t\t'id'=> $instructor_id,\n\t\t\t\t\t\t\t\t\t'name'=> bp_core_get_user_displayname( $instructor_id ),\n\t\t\t\t\t\t\t\t\t'sub'=> $sub,\n\t\t\t\t\t\t\t\t\t'email'=>$instructor_email,\n\t\t\t\t\t\t\t\t\t'avatar'=> $avatar,\n\t\t\t\t\t\t\t\t\t'average_rating' => wplms_plugin_get_instructor_average_rating($instructor_id),\n\t\t\t\t\t\t\t\t\t'student_count'=> wplms_plugin_get_instructor_student_count($instructor_id),\n\t\t\t\t\t\t\t\t\t'course_count'=>bp_course_get_instructor_course_count_for_user($instructor_id),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$instructors_data = apply_filters( 'bp_course_api_get_all_instructors', $all_instructors, $request );\n\n\t\t\treturn new WP_REST_Response( $instructors_data, 200 );\n\t\t}", "title": "" }, { "docid": "de957aa527111c79cf750d4a0f759972", "score": "0.5955281", "text": "public function index()\n {\n return redirect()->route('instructor.index');\n }", "title": "" }, { "docid": "9f31b58242be528e6af21af43a65ed74", "score": "0.59315664", "text": "public function actionCreate()\n {\n $model = new Instructor();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID_INSTRUCTOR]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "757c9986bbc85c72996f66821a4c5d03", "score": "0.5905489", "text": "public function instructor_admin_redirect(){\n if(!DEV_MODE){ // dev purposes\n if( is_admin() && !defined('DOING_AJAX') && current_user_can('instructor') ) {\n wp_redirect(home_url('/directory/my-account'));\n exit;\n }\n }\n }", "title": "" }, { "docid": "05f18c838236370d5dc0fefcb71ad2fc", "score": "0.5904546", "text": "function get_instructor($request){\n\n\t\t\t$instructor_id = $request['instructor_id'];\n\t\t\t$user_id =$instructor_id; \n\t\t\t$instructor = array();\n\n\t\t\t$bio = '';$social_fields=$about_fields=array();\n\t\t\tif(bp_is_active('xprofile')){\n \n $ifield = vibe_get_option('instructor_about');\n\t\t\t\tif(!isset($ifield) || $ifield =='')$ifield='Bio';\n\t\t\t\t$bio = bp_get_profile_field_data( 'field='.$ifield.'&user_id=' .$instructor_id ); \n\n\t\t\t\t$instructor_field_group = vibe_get_option('instructor_field_group');\n\t\t\t\t$social_field_group = vibe_get_option('social_field_group');\n\n\t\t\t\t$skip = 0;\n\t\t\t\tif(empty($instructor_field_group) && empty($social_field_group)){\n\t\t\t\t\t$skip = 1;\n\t\t\t\t}\n\n\t\t\t\tif(function_exists('bp_xprofile_get_groups') && !$skip){\n\t\t\t\t\t$groups = bp_xprofile_get_groups( array(\n\t\t\t\t\t\t'fetch_fields' => true,\n\t\t\t\t\t));\n\n\t\t\t\t\tif(!empty($groups)){\n\t\t\t\t\t\tforeach($groups as $group){\n\t\t\t\t\t\t\t$field_group = array();\n\t\t\t\t\t\t\t$field_group['id'] = $group->id;\n\t\t\t\t\t\t\t$field_group['name'] = $group->name;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($group->name == $instructor_field_group){\n\t\t\t\t\t\t\t\tif ( !empty( $group->fields ) ) {\n\n\t\t\t\t\t\t\t\t\tforeach($group->fields as $field){\n\n\t\t\t\t\t\t\t\t\t\t$f = array(\n\t\t\t\t\t\t\t\t\t\t\t'id' => $field->id,\n\t\t\t\t\t\t\t\t\t\t\t'type' => $field->type,\n\t\t\t\t\t\t\t\t\t\t\t'name' => $field->name,\n\t\t\t\t\t\t\t\t\t\t\t'value' => bp_get_profile_field_data(array('field'=>$field->id,'user_id'=>$user_id)),\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\tif($field->field_order){\n\t\t\t\t\t\t\t\t\t\t\t$about_fields[$field->field_order] = $f;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$about_fields[] = $f;\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}\n\n\t\t\t\t\t\t\tif($group->name == $social_field_group){\n\t\t\t\t\t\t\t\tif ( !empty( $group->fields ) ) {\n\n\t\t\t\t\t\t\t\t\tforeach($group->fields as $field){\n\t\t\t\t\t\t\t\t\t\t$url = false;\n\t\t\t\t\t\t\t\t\t\t$value = bp_get_profile_field_data(array('field'=>$field->id,'user_id'=>$user_id));\n\t\t\t\t\t\t\t\t\t\tpreg_match('/href=\"(.*?)\"/', $value, $match);\n\t\t\t\t\t\t\t\t\t\tif(!empty($match) && !empty($match[1])){\n\t\t\t\t\t\t\t\t\t\t\t$url = $match[1];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$f = array(\n\t\t\t\t\t\t\t\t\t\t\t'id' => $field->id,\n\t\t\t\t\t\t\t\t\t\t\t'type' => $field->type,\n\t\t\t\t\t\t\t\t\t\t\t'name' => $field->name,\n\t\t\t\t\t\t\t\t\t\t\t'value' => $url,\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\tif($field->field_order){\n\t\t\t\t\t\t\t\t\t\t\t$social_fields[$field->field_order] = $f;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t$social_fields[] = $f;\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}\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\n\t\t\t$courses = array();\n\t\t\t$query_args = array(\n\t\t\t\t'post_type'=>'course',\n\t\t\t\t'posts_per_page'=>5\n\t\t\t);\n\t\t\tif ( function_exists('get_coauthors')) {\n\t\t\t\t$author_names = array();\n\t\t\t\t$instructor_name = get_the_author_meta('user_login',$instructor_id);\n\t\t\t\t$author_names[] = 'cap-'.$instructor_name;\n\n\t\t\t\t$query_args['tax_query']= array(\n\t\t\t\t\t'relation' => 'AND',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'taxonomy'=>'author',\n\t\t\t\t\t\t'field'=>'name',\n\t\t\t\t\t\t'terms' => $author_names,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$query_args['author__in']=$author__in;\n\t\t\t}\n\n\t\t\tif ( bp_course_has_items( $query_args ) ):\n\t\t\t\twhile ( bp_course_has_items() ) : bp_course_the_item();\n\t\t\t\t\tglobal $post;\n\t\t\t\t\t$courses[]=$this->prepare_item_for_response($post,$request);\n\t\t\t\tendwhile;\t\n\t\t\tendif;\n\n\n\t\t\t$instructor = array(\n\t\t\t\t'bio'\t\t=> $bio,\n\t\t\t\t'social'\t=> $social_fields,\n\t\t\t\t'about'\t\t=> $about_fields,\n\t\t\t\t'courses'\t=> $courses,\n\t\t\t);\n\t\t\t$instructor_data = apply_filters( 'bp_course_api_get_all_instructors', $instructor, $request );\n\n\t\t\treturn new WP_REST_Response( $instructor_data, 200 );\n\t\t}", "title": "" }, { "docid": "aea74c2959cc210e146989cfaaea208a", "score": "0.580923", "text": "public function admin() {\r\n $RutaEmpresa = new Ruta_empresa ($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allRutemp = $RutaEmpresa->getAll();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"RutaEmpresa/admin\", array(\"allRutemp\" => $allRutemp));\r\n \r\n }", "title": "" }, { "docid": "8808471be98582abbe6e90dbf3d704e8", "score": "0.5790388", "text": "function partageur_autoriser(){}", "title": "" }, { "docid": "dd0f06dfc31c604e8ec7587a9b0e724a", "score": "0.5763905", "text": "function encheres_autoriser(){}", "title": "" }, { "docid": "10fb944a727684d37f8e33bc757b8add", "score": "0.5761719", "text": "public function getFemaleInstructor(Instructor $instructor) {\n\n }", "title": "" }, { "docid": "1b0ab8e93545aecafb55151e6684e794", "score": "0.57433474", "text": "public function actionIndex()\n {\n $searchModel = new InstructorSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "295fbfedf85ff643ccf93fff5ffa587a", "score": "0.5728154", "text": "public function update(Request $request, Instructor $instructor)\n {\n //\n }", "title": "" }, { "docid": "ac42144afbc79d22c61fdf818c08518a", "score": "0.568954", "text": "function abonnement_autoriser(){}", "title": "" }, { "docid": "247b38da218785d867b685b97b0935a3", "score": "0.566884", "text": "public function index()\n { \n $result = questions::orderBy('id','desc')->paginate(8);\n // $result2 = question2s::orderBy('id','desc')->paginate(8);\n \n return view('Instructor.instructor',compact ('result'));\n \n }", "title": "" }, { "docid": "0b9b20ae8374cbf9662d2a1ec02b9b32", "score": "0.5647591", "text": "public static function guardarInstructorUsuario($datos) {\n $tabla = 'usuario';\n $cnx = conexion::singleton_conexion();\n $cmdsql = 'INSERT INTO ' . $tabla . ' (usuario,contrasenia,id_persona) VALUE (:a,:g,:i)';\n try {\n $preparado = $cnx->preparar($cmdsql);\n $preparado->bindParam(':a', $datos['nombre_user']);\n $preparado->bindParam(':g', $datos['pass']);\n $preparado->bindParam(':i', $datos['id_instructor']);\n if ($preparado->execute()) {\n $id = $cnx->ultimoIngreso($tabla);\n $resultado = array('guardar' => TRUE, 'id' => $id);\n return $resultado;\n } else {\n #echo \"<script>alert('No se ha guardado el usuario')</script>\";\n return FALSE;\n }\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage();\n }\n $cnx->closed();\n $cnx = null;\n }", "title": "" }, { "docid": "6231939e5d7e5973dfbf7dfcfeafcc97", "score": "0.56318855", "text": "function livraison_autoriser(){}", "title": "" }, { "docid": "41a121ec66a392911607aa23819a5ba2", "score": "0.5631676", "text": "public function annonces()\n {\n if($this->isAdmin()){\n $annoncesModel = new AnnoncesModel;\n\n $annonces = $annoncesModel->findAll();\n\n $this->render('admin/annonces', compact('annonces'), 'admin');\n }\n }", "title": "" }, { "docid": "655a77490a5616f7f1657e7c2e6b11d3", "score": "0.5614758", "text": "public function update(Request $request, Instructor $instructor) {\n\t\t//\n\t}", "title": "" }, { "docid": "e5b678d5250276416a97a59a82d7a9a3", "score": "0.56038094", "text": "public function editAction()\n {\n $instructorcopyId = $this->getRequest()->getParam('id');\n $instructorcopy = $this->_initInstructorcopy();\n if ($instructorcopyId && !$instructorcopy->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_instructorcopy')->__('This instructor copy no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getInstructorcopyData(true);\n if (!empty($data)) {\n $instructorcopy->setData($data);\n }\n Mage::register('instructorcopy_data', $instructorcopy);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_instructorcopy')->__('Instructor Copy'))\n ->_title(Mage::helper('bs_instructorcopy')->__('Instructor Copies'));\n if ($instructorcopy->getId()) {\n $this->_title($instructorcopy->getCFrom());\n } else {\n $this->_title(Mage::helper('bs_instructorcopy')->__('Add instructor copy'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "title": "" }, { "docid": "a49d4f99a44f5daae15c4e47a0d4149c", "score": "0.5602888", "text": "public function instructors()\n {\n return $this->hasMany('App\\Instructor', 'company_id', 'company_id');\n }", "title": "" }, { "docid": "8b37d5478055d6dcce4b8628098d0a30", "score": "0.5587796", "text": "abstract public function displayInAdmin();", "title": "" }, { "docid": "62ec1a91ce9cef8847535734b002d91e", "score": "0.5573795", "text": "public function destroy(Instructor $instructor)\n {\n //\n }", "title": "" }, { "docid": "5ddfa9720a8241faa406b6400744bb59", "score": "0.55651677", "text": "public function destroy($id_admin){ // TRUE = DELETE FROM ENTIDAD WHERE ID = ?\n Instructor::find($id_admin)->delete();\n return redirect()->route('instructor.index')->with([\n 'message'=>'se ha eliminado correctamente',\n 'type'=>'warning'\n ]);\n }", "title": "" }, { "docid": "8cd2597c8333701090c5dd5084a626f0", "score": "0.5561114", "text": "function get_instructors_permissions_check(){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "799f5b4b9feff08d3aeae81b7a657fdf", "score": "0.5554793", "text": "public function getInstructorcopy()\n {\n return Mage::registry('current_instructorcopy');\n }", "title": "" }, { "docid": "42b5c3628183fd12b60757243c6a24dc", "score": "0.5552735", "text": "public function index(Instructor $instructor)\n {\n return view('instructor/show', [ 'instructors' => $instructor->orderByDesc('created_at')->get() ]);\n }", "title": "" }, { "docid": "3e8ec76019f0f1220a16db469994110a", "score": "0.5546591", "text": "public function showAccueilAdmin()\r\n\t\t{\r\n\t\t\t$articleDao = new ArticleDao();\r\n\t\t\t$categorieDao = new CategorieDao();\r\n\t\t\t$articles = $articleDao->getList();\r\n\t\t\t$categories = $categorieDao->getList();\r\n\t\t\r\n\t\t\trequire_once 'vue/admin/accueilAdmin.php';\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "f1b8efd3e84e9d430c3f233fb5fffbde", "score": "0.5525269", "text": "public static function isInstructor()\n {\n $blti = new BLTI();\n $isInstructor = $blti->isInstructor();\n //also include course designer role, for instructional designers/developers\n $isDesigner = $blti->isDesigner();\n $allowAccess = $isInstructor || $isDesigner ? true : false;\n return $allowAccess;\n }", "title": "" }, { "docid": "7ab1333b33a374cd1f530503d11fc2b0", "score": "0.5516848", "text": "public function insertarInstructor(array $data)\r\n {\r\n try {\r\n // Verificar hay datos en $data\r\n if (\r\n isset($data['dni']) &&\r\n isset($data['email']) &&\r\n isset($data['nombre_instructor']) &&\r\n isset($data['apellido_instructor'])\r\n ) {\r\n $dni = $data['dni'];\r\n $nombre_instructor = $data['nombre_instructor'];\r\n $apellido_instructor = $data['apellido_instructor'];\r\n $email = $data['email'];\r\n $stm = parent::conectar()->prepare(preparedSQL::INSTRUCTOR_NEW);\r\n $stm->bindParam(1, $dni, PDO::PARAM_STR);\r\n $stm->bindParam(2, $nombre_instructor, PDO::PARAM_STR);\r\n $stm->bindParam(3, $apellido_instructor, PDO::PARAM_STR);\r\n $stm->bindParam(4, $email, PDO::PARAM_STR);\r\n $stm->execute();\r\n return true;\r\n }\r\n } catch (Exception $e) {\r\n return false;\r\n die($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "7751c5ec9d0643a7049341738643fbbf", "score": "0.5512643", "text": "public function editAction()\n {\n $importinstructorId = $this->getRequest()->getParam('id');\n $importinstructor = $this->_initImportinstructor();\n if ($importinstructorId && !$importinstructor->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_importinstructor')->__('This import instructor no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getImportinstructorData(true);\n if (!empty($data)) {\n $importinstructor->setData($data);\n }\n Mage::register('importinstructor_data', $importinstructor);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_importinstructor')->__('Import Instructor'))\n ->_title(Mage::helper('bs_importinstructor')->__('Import Instructors'));\n if ($importinstructor->getId()) {\n $this->_title($importinstructor->getCurriculumId());\n } else {\n $this->_title(Mage::helper('bs_importinstructor')->__('Add import instructor'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "title": "" }, { "docid": "46a69545d80409ed7209c3a7d4976953", "score": "0.5509614", "text": "public function add($instructor) {\n // prepare sql and bind parameters\n $stmt = $this->conn->prepare('INSERT INTO meds_employes (name) VALUES (:name)');\n $stmt->bindParam(':name', $name);\n // insert a row\n $name = $instructor['name'];\n if ($stmt->execute()) {\n return $this->conn->lastInsertId();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "6fff1b263347c7b669facc2ef935bc15", "score": "0.55090255", "text": "public function testCreateInvalidInstructor() {\r\n\t\r\n\t\t$this->assertEquals(0, $this->pm->numberOfInstructors());\r\n\t\r\n\t\t$firstName = \" \";\r\n\t\t$lastName = \"Costa\";\r\n\t\t$username = \"DCosta\";\r\n\t\t$password = \"passw0rd\";\r\n\t\t$CDN_C = null;\r\n\t\t\r\n\t\t$error = \"\";\r\n\t\r\n\t\ttry {\r\n\t\t\t$this->pc->createInstructor($username, $password, $firstName, $lastName,$CDN_C);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$error = $e->getMessage();\r\n\t\t}\r\n\t\t$this->assertEquals($error, \"First name name cannot be empty!<br><br>\");\r\n\t\t\r\n\t\t$firstName = \"Diego\";\r\n\t\t$lastName = \" \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$this->pc->createInstructor($username, $password, $firstName, $lastName,$CDN_C);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$error = $e->getMessage();\r\n\t\t}\r\n\t\t$this->assertEquals($error, \"Last name name cannot be empty!<br><br>\");\r\n\t\t\r\n\t\t$lastName = \"Costa\";\r\n\t\t$username = \" \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$this->pc->createInstructor($username, $password, $firstName, $lastName,$CDN_C);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$error = $e->getMessage();\r\n\t\t}\r\n\t\t$this->assertEquals($error, \"Username name cannot be empty!<br><br>\");\r\n\t\t\r\n\t\t$username = \"DCosta\";\r\n\t\t$password = \" \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$this->pc->createInstructor($username, $password, $firstName, $lastName,$CDN_C);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$error = $e->getMessage();\r\n\t\t}\r\n\t\t$this->assertEquals($error, \"Password name cannot be empty!<br><br>\");\r\n\t}", "title": "" }, { "docid": "d4c8ed39b44178bbbb61edfef09f408e", "score": "0.55059737", "text": "function wplms_ninja_forms_sub_table_row_actions_convert_to_instructor( $row_actions, $data, $sub_id, $form_id ) {\n\t\tif ( !in_array( 'ninja-forms/ninja-forms.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) \n\t\t\treturn $row_actions;\n\n\t\tif(!isset($this->settings['instructor_signup_ninja_form_id']) || !is_numeric($this->settings['instructor_signup_ninja_form_id']))\n\t\t\treturn $row_actions;\n\t\t\n\t $ninja_instructor_form_id = $this->settings['instructor_signup_ninja_form_id'];\n\t if(isset($ninja_instructor_form_id) && $ninja_instructor_form_id == $form_id){\n\t \t$row_actions['instructor'] = apply_filters('wplms_ninja_forms_change_to_instructor_sub','<span><a href=\"?post_status=all&post_type=nf_sub&action=-1&form_id='.$form_id.'&make_instructor\" id=\"'.$sub_id.'\" class=\"wplms_ninja_forms_convert_to_instructor_sub\">'. __( 'Make Instructor', 'vibe-customtypes' ).'</a></span>',$sub_id,$form_id);\n\t }\n\t return $row_actions;\n\n\t}", "title": "" }, { "docid": "faf52fac4724ed0ee47c953514fb2400", "score": "0.55046254", "text": "function get_instructor_data() {\n $instructor_data = array();\n\n $instructor_data['name'] = get_field( 'instructor_name' );\n $instructor_data['last_name'] = get_field( 'instructor_last_name' );\n $instructor_data['profession'] = get_field( 'instructor_profession' );\n $instructor_data['phone'] = get_field( 'instructor_phone' );\n $instructor_data['mobile'] = get_field( 'instructor_mobile_phone' );\n $instructor_data['address'] = get_field( 'instructor_address' );\n $instructor_data['email1'] = get_field( 'instructor_email_1' );\n $instructor_data['email2'] = get_field( 'instructor_email_2' );\n $instructor_data['instagram'] = get_field( 'instructor_instagram' );\n $instructor_data['facebook'] = get_field( 'instructor_facebook' );\n $instructor_data['twitter'] = get_field( 'instructor_twitter' );\n $instructor_data['gmaps_url'] = get_field( 'instructor_google_maps_url' );\n $instructor_data['video'] = array(\n 'video_url' => get_field( 'instructor_video_url' ),\n 'video_preview_image' => get_field( 'instructor_video_preview_image' ),\n );\n $instructor_data['type'] = get_field( 'instructor_type' );\n $instructor_data['location'] = ( $instructor_data['type'] == 'insite' ) ? get_field( 'instructor_location' ) : 'En línea' ;\n\n return $instructor_data;\n}", "title": "" }, { "docid": "dc40cf5f69318139522c5e459e34cfc4", "score": "0.54972744", "text": "function darAltaJuradoProfesional(){\r\n\t$user = new User();\r\n\tif($user->register(array(\r\n\t\t'name' => $_POST['name'],\r\n\t\t'username' => $_POST['username'],\r\n\t\t'password' => $_POST['password'],\r\n\t\t'role' => 'profesional',\r\n\t\t'phone' => $_POST['phone'],\r\n\t\t'email' => $_POST['email']\r\n\t))){\r\n\t\taddNotificacion(\"Usuario dado de alta\",\"succcess\");\r\n\t\tredirecionarWithParams($GLOBALS['CONTROLLER_URL'].'adminController.php',array(array('action','gestionarUsuario')));\r\n\t}\r\n\telse{\r\n\t\taddNotificacion(\"Usuario no dado de alta\",\"danger\");\r\n\t\tredirecionarWithParams($GLOBALS['CONTROLLER_URL'].'adminController.php',array(array('action','gestionarUsuario')));\r\n\t}\r\n}", "title": "" }, { "docid": "c835a1165f69a3b98c8229cc201890f1", "score": "0.549597", "text": "function ver_tutoriales(){\n $data = $this->_ver_tutoriales();\n $this->load->view('admin/aprende/tutorial_lista_view', $data);\n }", "title": "" }, { "docid": "7c1e15809169fd57343ae9008c3b87d3", "score": "0.5485675", "text": "public function indexadmin(){\r\n $usuarios= $this->usuarios->getalumnos(); // Obtengo todos los alumnos activos.\r\n $mensajes = $this->cursadas->getmensajes(); // Obtengo todos los mensajes.\r\n $data['usuarios'] = $usuarios; // Los preparo para llevar a la vista.\r\n $data['mensajes'] = $mensajes; // Los preparo para llevar a la vista.\r\n $this->load->view('cursadas/viewCursadasAdmin', $data); // Voy a la vista y le paso los alumnos.\r\n }", "title": "" }, { "docid": "f70aed59464fd062b8cd83d3fc2ac3ba", "score": "0.5477974", "text": "function bannieres_autoriser(){}", "title": "" }, { "docid": "f45ef352d0b67b23e7292908ebd0d774", "score": "0.54776615", "text": "public function getAllInstructors() \n\t{\n\t\t$query = $this->db->order_by('id','DESC')->get_where('users_details',array('user_type'=>'1'));\n\n\t\t$result = $query->result_array();\n\t\t\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\treturn $result;\n\t\t}else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "title": "" }, { "docid": "8ecc504d9bc93e247716dd3b2f183d67", "score": "0.54743654", "text": "public function index(){\n\t\t$username = $this->request->params['username'];\n\t\t$sen = new Sentinel();\n\t\t$results = $sen->findUsersByName($username);\n\t\t//echo var_dump($username);\n\t\n\t\tif($results && is_array($results)){\n\t\t\t$user = $results[0];\n\t\t\t$this->em = Connections::get('default')->getEntityManager();\n\t\t\t$this->dbContext = $this->em->getRepository('app\\models\\Instructor');\n\t\t\t$query = $this->em->createQuery('SELECT s FROM app\\models\\Instructor s WHERE s.user = :usr');\n\t\t\t$query->setParameter('usr', $user);\n\t\t\t$results = $query->getResult();\n\t\t\t$this->prof = $results[0]; //temp default professor\n\t\t\t\n\t\t\t$dashVM = new DashboardVM();\n\t\t\t$dashVM->professor = $this->prof;\n\t\t\t\n\t\t\t\n\t\t\t$query = $this->em->createQuery('SELECT s FROM app\\models\\CourseSection s WHERE s.instructor = :ins');\n\t\t\t$query->setParameter('ins', $this->prof);\n\t\t\t$sections = $query->getResult();\n\t\t\t\n\t\t\tforeach( $sections as $sec){\n\t\t\t\t$dashVM->coursesections->add($sec->getCourse());\n\t\t\t}\n\t\t\t\n\t\t\t$query2 = $this->em->createQuery('SELECT pr FROM app\\models\\Profile pr WHERE pr.instructor = :ins');\n\t\t\t$query2->setParameter('ins', $this->prof);\n\t\t\t$pResults = $query2->getResult();\n\t\t\t//$dashVM->courses = $courses;\n\t\t\tif($pResults){\n\t\t\t\t$dashVM->profile = $pResults[0];\n\t\t\t}\n\t\t\t\n\t\t\t$dashVM->semester = AppUtilities::getCurrentSemester();\n\t\t\t\n\t\t\t$data['model'] = $dashVM;\n\t\t\t$this->set($data);\n\t\t\t$this->render(array('layout'=>'profiles'));\n\t\t}\n\t}", "title": "" }, { "docid": "a66edad7d55168aa6a5462e1fce4da9f", "score": "0.5465503", "text": "function cl_empnota() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empnota\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "97c498ecae85f59e9de5659e86968be2", "score": "0.5459938", "text": "public function tutorAction()\r\n {\r\n /** @var AlumnoHelper $alumnoHelper */\r\n $alumnoHelper = $this->get('app.alumnoHelper');\r\n\r\n if (!in_array('ROLE_TUTOR', $this->getUser()->getRoles())) {\r\n return $this->redirectToRoute('index');\r\n }\r\n\r\n// if (!$alumnoHelper->alumnoExists($this->getUser()))\r\n// return $this->redirectToRoute('registrarAlumno');\r\n\r\n $tutor = $alumnoHelper->getTutorByUsuario($this->getUser());\r\n $alumnos = $alumnoHelper->getAlumnosByTutor($tutor);\r\n return $this->render('convivencia/tutor/alumnoTutor.html.twig', array(\r\n 'alumnos' => $alumnos,\r\n ));\r\n }", "title": "" }, { "docid": "539c771649dc7a9a9288de8c16eae9c2", "score": "0.5455944", "text": "public function show($id)\n {\n $current_user = User::find(Auth::user()->id);\n $thesis = Thesis::find($id);\n $users_all = User::select('id', DB::raw(\"concat(first_name, ' ', last_name) as full_name\"))->get();\n //get a list of all non students\n $non_students = Helper::getNonStudents($users_all);\n \n if($thesis)\n {\n $instructor_role_id = Role::find(3)->id;\n $student_role_id = Role::find(1)->id;\n $reviewer_role_id = Role::find(8)->id;\n $hasReviewer = $thesis->user()->where('role_id', $reviewer_role_id)->exists();\n $reviewer_add_update = ($hasReviewer ? 'Uuenda' : 'Määra');\n $reviewer_grade_add_update = ($thesis->reviewer_grade === NULL ? 'Määra' : 'Uuenda');\n $isInstructor = Helper::userIsInstructorOrReviewer($thesis, $current_user->id, $instructor_role_id);\n $isReviewer = Helper::userIsInstructorOrReviewer($thesis, $current_user->id, $reviewer_role_id);\n $thesis_user_id = Helper::userOwnsThesis($thesis, $student_role_id);\n $committee_actions = $thesis->status->name != 'Kaitstud';\n \n if ($thesis_user_id === $current_user->id || $current_user->hasRole('Õpetaja') ||\n $current_user->hasRole('Administraator') || $current_user->hasRole('Komisjoni esimees') ||\n $current_user->hasRole('Komisjoni liige') || $isInstructor || $isReviewer)\n {\n $reviewer_grades_list = ReviewerGrade::all()->pluck('grade', 'id');\n $statuses = DB::table('statuses')->whereIn('id', [1,2,3])->pluck('name', 'id');\n $status_id = $thesis->status->id;\n \n return view('thesis')\n ->with('current_user', $current_user)\n ->with('usersList', $non_students)\n ->with('hasReviewer', $hasReviewer)\n ->with('isInstructor', $isInstructor)\n ->with('isReviewer', $isReviewer)\n ->with('gradesList', $reviewer_grades_list)\n ->with('committee_actions', $committee_actions)\n ->with('reviewer_add_update', $reviewer_add_update)\n ->with('reviewer_grade_add_update', $reviewer_grade_add_update)\n ->with('statusList', $statuses)\n ->with('status_id', $status_id)\n ->with('thesis', $thesis);\n }\n else\n {\n return redirect()->back()->with('error', 'Teil puudub ligipääs!');\n }\n }\n else\n {\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "9220e8e31a8d45ffd993850b52f9782f", "score": "0.54417473", "text": "public function indexLivraisonEnAttenteAdminAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $livraisons = $em->getRepository('AppBundle:Livraison')->findLivraisonsEnAttente();\n\n return $this->render('admin/admin/adminLivraisonsEnAttentes.html.twig', array(\n 'livraisons' => $livraisons,\n ));\n }", "title": "" }, { "docid": "f5c0172c1d2de55e67f6c4421c4f15f5", "score": "0.54380125", "text": "function admin()\r\n {\r\n // global variable\r\n $dataLayer = $GLOBALS['dataLayer']->getMembers();\r\n $this->_f3->set('persons', $dataLayer);\r\n $view = new Template();\r\n echo $view->render('views/admin.html');\r\n }", "title": "" }, { "docid": "d7ebdb3ff9856a1c7ad907633018cb54", "score": "0.543095", "text": "public function panelAdministrador(){\r\n $administrador=new Administrador($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n //$allusers=$usuario->getAll();\r\n // lo llevo a entidad base para que controle\r\n $administrador = $administrador->getAll();\r\n //$administrador->setId(1);\r\n if($administrador){\r\n $moderador= new Moderador($this->adapter);\r\n $moderador= $moderador->getAll();\r\n if($moderador){\r\n $this->view(\"panelAdministrador\",array(\"administrador\"=>$administrador,\"moderador\"=>$moderador));\r\n }else{\r\n $this->view(\"panelAdministrador\",array(\"administrador\"=>$administrador));\r\n }\r\n }\r\n else{\r\n echo \"no\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "05a67c9e0b8226376dc3658625c0fa33", "score": "0.5427125", "text": "public function get(){\n \n $email = $_REQUEST['inst'];\n\n $db = dbConn::getConnection();\n\n $qry = $db->prepare('SELECT Lname, Fname, DeptID FROM Instructors WHERE Email = :email');\n \n try {$qry->execute( array(':email'=>$email ) );}\n \n catch(PDOException $e){\n echo $e->getMessage();\n }\n\n $result = $qry->fetchAll(PDO::FETCH_ASSOC);\n\n //Update the instructor from Sections with TBD\n $qry = $db->prepare(\"UPDATE Sections SET InstrLname = 'TBD', InstrFname = 'TBD' WHERE InstrLname = :Lname and\n InstrFname = :Fname\");\n \n try{\n $qry->execute( array( ':Lname'=>$result[0]['Lname'],\n \t\t\t ':Fname'=>$result[0]['Fname']) );\n }\n\n catch(PDOException $e){\n echo $e->getMessage();\n }\n\n //Delete the instructor from Instructors\n $qry = $db->prepare('DELETE FROM Instructors WHERE Lname = :Lname and Fname = :Fname');\n \n try {\n $qry->execute( array(':Lname'=>$result[0]['Lname'],\n \t\t\t ':Fname'=>$result[0]['Fname']) );\n }\n\n catch( PDOException $e ) {\n echo $e->getMessage();\n }\n\n\n header('Location: index.php?controller=editInstController');\n }", "title": "" }, { "docid": "8bd6bf7597399aff1ab9c851246e7d23", "score": "0.5410197", "text": "public function validate_instructor_profile($instructor) {\n if (!$instructor->first_name) {\n return 'first name is required';\n }\n\n if (!$instructor->surname) {\n return 'surname is required';\n }\n\n if (!$instructor->email) {\n return 'email is required';\n }\n\n if (!$instructor->contact_number) { \n return 'contact number is required'; \n }\n\n if (!$instructor->hourly_rate) { \n return 'hourly rate is required'; \n }\n\n if (!is_numeric($instructor->hourly_rate)) {\n return 'hourly rate must be a number';\n }\n\n if ($instructor->hourly_rate <= 0) {\n return 'hourly rate must be greater than 0';\n }\n\n if (!is_numeric($instructor->contact_number)) {\n return 'contact number must be a number';\n }\n\n return false;\n }", "title": "" }, { "docid": "9c5b4651a8805b5959dc4c6d63935b68", "score": "0.54084027", "text": "function insertJobRole(){\n $this->_db->insertJob($_POST['schoolId'],$_POST['jobName']);\n echo '<br><div>\n <p class=\"h5\">'.$_POST['jobName'].' <i class=\"fas fa-edit\"></i></p>\n <p>Click the edit icon to change the text</p>\n </div>';\n }", "title": "" }, { "docid": "e4b01a96751fc594cd6cde9ebd67e36c", "score": "0.54083836", "text": "public function edit(Atraccion $atraccion)\n {\n //\n }", "title": "" }, { "docid": "4e41813165e594756e65bbd17cfa04fb", "score": "0.53971523", "text": "public function admin_add()\n\t{\t\n\t\tif($this->session->userdata('vuebin_user'))\n\t\t{\n\t\t\t$login_details=$this->session->userdata('vuebin_user');\n\t\t\tif($login_details['role_id']==1){\n\t\t\t\t\n\t\t\t\t$data['countries_list']=$this->Institute_model->get_countries_list();\n\t\t\t\t//echo '<pre>';print_r($data);exit;\n\t\t\t\t$this->load->view('admin/add-institute',$data);\n\t\t\t\t$this->load->view('admin/footer');\n\t\t\t}else{\n\t\t\t\t\t$this->session->set_flashdata('error',\"you don't have permission to access\");\n\t\t\t\t\tredirect('dashboard');\n\t\t\t}\n\t\t}else{\n\t\t\t$this->session->set_flashdata('error',\"you don't have permission to access\");\n\t\t\tredirect('admin');\n\t\t}\n\t}", "title": "" }, { "docid": "0761ce40111efd2e337e3dc27cc78cae", "score": "0.5396598", "text": "function formulario_agregar_tutorial_paso(){\n $data['id_tutorial'] = $this->uri->segment(4);\n $this->load->view('admin/aprende/tutorial_paso_agregar_view', $data);\n }", "title": "" }, { "docid": "62f351b39089b97ec24f7fa025a1be3c", "score": "0.53725463", "text": "public function destroy(Instructor $instructor) {\n\t\t//\n\t}", "title": "" }, { "docid": "264d5da10908c1abf202235dde1882c9", "score": "0.53685", "text": "public function addByName(Instructor $instructor, $firstName, $lastName = \" \"){\n $this->connect();\n\n $insert = \"INSERT INTO instructors (first_name, last_name) VALUES (:first_name, :last_name);\";\n try {\n $statement = $this->database->prepare($insert);\n\n $statement->bindParam(':first_name', $firstName, PDO::PARAM_STR);\n $statement->bindParam(':last_name', $lastName, PDO::PARAM_STR);\n $add = $statement->execute();\n $last_id = $this->database->lastInsertId();\n // Add to instructor object before returning\n $instructor->firstName = $firstName;\n $instructor->lastName= $lastName;\n $instructor->id = $last_id;\n return $instructor;\n\n } catch (PDOException $e) {\n echo 'PDOException : ' . $e->getMessage();\n }\n\n $this->disconnect();\n\n }", "title": "" }, { "docid": "3ea71bb924a56b0b341afffb284da775", "score": "0.5366318", "text": "public function form_is_available_to_edit_a_role()\n {\n\n }", "title": "" }, { "docid": "99b29415a982556f6c99a667e0b4da63", "score": "0.5362611", "text": "public function saveAction()\n {\n if ($data = $this->getRequest()->getPost('instructorcopy')) {\n try {\n $cuFromId = $data['c_from'];\n $cuToIds = $data['c_to'];\n $clear = $data['clearall'];\n\n $backToId = null;\n\n if(count($cuToIds)){\n foreach ($cuToIds as $cuToId) {\n if($cuToId == $cuFromId){\n continue;\n }\n $curriculum = Mage::getModel('bs_traininglist/curriculum')->load($cuToId);\n\n\n $instructorIds = array();\n $i=1;\n\n if(!$clear){\n $currentInstructors = Mage::getModel('bs_instructor/instructor')->getCollection()->addCurriculumFilter($cuToId);\n if($currentInstructors->count()){\n foreach ($currentInstructors as $tn) {\n $instructorIds[$tn->getId()] = array('position'=>$i);\n\n $i++;\n }\n\n }\n }\n\n $fromIns = Mage::getModel('bs_instructor/instructor')->getCollection()->addCurriculumFilter($cuFromId);\n if($fromIns->count()){\n foreach ($fromIns as $tn) {\n $instructorIds[$tn->getId()] = array('position'=>$i);\n\n $i++;\n }\n\n }\n\n\n $curriculumInstructor= Mage::getResourceSingleton('bs_instructor/instructor_curriculum')->saveCurriculumRelation($curriculum, $instructorIds);\n\n $backToId = $cuToId;\n }\n\n }\n\n $add = '';\n\n\n if(count($cuToIds) > 1){\n $url = $this->getUrl('*/instructorcopy_instructorcopy/new');\n }else {\n $url = $this->getUrl('*/traininglist_curriculum/edit', array('id'=>$backToId));\n }\n\n\n\n if($this->getRequest()->getParam('popup')){\n $add = '<script>window.opener.window.location.href = \\''.$url.'\\';window.close()</script>';//trainee_gridJsObject.doFilter()\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_instructorcopy')->__('The instructors were successfully copied. Now you can continue copying. %s', $add)\n );\n Mage::getSingleton('adminhtml/session')->setFormData(false);\n if ($this->getRequest()->getParam('back')) {\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n }\n $this->_redirect('*/instructorcopy_instructorcopy/new');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n Mage::getSingleton('adminhtml/session')->setInstructorcopyData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n } catch (Exception $e) {\n Mage::logException($e);\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_instructorcopy')->__('There was a problem saving the instructor copy.')\n );\n Mage::getSingleton('adminhtml/session')->setInstructorcopyData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_instructorcopy')->__('Unable to find instructor copy to save.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "bb9c83523437fd5b3fab826c48ec81c1", "score": "0.5358525", "text": "function profileEditAdviseesGenerator(){\n\tinclude('profileFunctions.php');\n\tif ($_GET['edit']=='addAdvisee')\n\t\taddAdvisee($_SESSION['CLID']);\n\tif ($_GET['edit']=='removeAdvisee')\n\t\tremoveAdvisee($_SESSION['CLID']);\n\t\n\tif($_SESSION['advisor']==true) // the user is an advisor\n\t\tdisplayProfileEditAdvisees($_SESSION['CLID']);\n\telse // the user is a student\n\t\techo \"<font color='#FF0000'>You done goofed: Not Logged in as Advisor</font>\";\n}", "title": "" }, { "docid": "2e932265d6f71a5c02da82f8acf414b8", "score": "0.53579205", "text": "public function formAlta()\n {\n $this->tipoVista = 2;\n $this->index();\n }", "title": "" }, { "docid": "2bd0056fb28dcf7c670e933a651a02c4", "score": "0.53499585", "text": "public function show($id)\n {\n //show a single instructor\n $instructor = instructor94233::find($id);\n //Return as a resource\n return $instructor;\n }", "title": "" }, { "docid": "f183525fcffbea6ea26606c23c04cad0", "score": "0.5347828", "text": "public function edit($id) {\n $exam = null;\n if(Auth::user()->can('Exam All') || Auth::user()->can('Exam Self')){\n $exam = Exam::findOrFail($id);\n if(!Auth::user()->can('Exam All') && Auth::user()->id != $exam->owner_id) {\n return redirect()->route('errors.perms.resource');\n }\n }\n else {\n return redirect()->route('errors.perms.resource');\n }\n if($exam->locked=1 && Auth::user()->cannot(\"Exam All\")) {\n return back()->with('error_message',\n 'Error: Exam is locked. Please contact the main office to modify exam.');\n }\n $instructors = collect([]);\n\n if(Auth::user()->can('Exam All')) {\n $instructors = User::permission(['Exam Self','Exam All'])->select('users.*',DB::raw(\"CONCAT_WS(' ',prefix,first_name,last_name,suffix) AS Instructor\"))->get();\n }\n\n $instructors = $instructors->sortBy(['first_name','last_name']);\n\n return view('exams.edit', compact('exam'))->with([\"instructors\" => $instructors]);\n }", "title": "" }, { "docid": "64e9225c8c0c6183e733b1ac547c4f38", "score": "0.53419834", "text": "public function getInstructors() {\n \treturn $this->session->getInstructorsForOffering($this->getId());\n }", "title": "" }, { "docid": "b4c0a5f83d69659d39f101d723face41", "score": "0.534055", "text": "private function tiep_nhan()\n {\n $this->_regular_role(__FUNCTION__);\n }", "title": "" }, { "docid": "77ee59703e018a6c7babb73706ff2e83", "score": "0.5339526", "text": "public function beforeEditNonDegreeTraining() {\n\n if(auth()->user()->role_id == 4){\n return view('facultymember.nondegreetraining');\n } elseif(auth()->user()->role_id == 3){\n return view('facultyhead.nondegreetraining');\n } elseif(auth()->user()->role_id == 2){\n return view('dean.nondegreetraining');\n }\n\n }", "title": "" }, { "docid": "4431ffb2e06e812e2063b5fc696a0d62", "score": "0.5335144", "text": "public function edit(Annonce $annonce)\n {\n $annonces=Annonce::findOrFail($annonce->id);\n $categories=Category::all();\n $cities=City::all();\n $this->authorize('update',$annonce);\n return view('annonces.edit', compact('annonces','categories','cities'));\n }", "title": "" }, { "docid": "66458bb34b8175eaa2fc7fb1386ff6b8", "score": "0.5324222", "text": "public function create()\n { \n $instructors= instructor::all();\n $sites = site::all();\n return view('admin.users.create',['sites'=>$sites,'instructors'=>$instructors]);\n }", "title": "" }, { "docid": "8e02fc42775505926c62e6521c1c2c6b", "score": "0.53206336", "text": "public function __construct($name = null) {\n parent::__construct ( 'instructor' );\n $this->add ( array (\n 'name' => 'deptCode',\n 'type' => 'Select',\n 'options' => array (\n 'label' => 'Department' \n ),\n 'attributes' => array (\n 'class' => 'form-control' \n ) \n ) );\n $this->add ( array (\n 'name' => 'insSSN',\n 'type' => 'Text',\n 'options' => array (\n 'label' => 'Instructor Social Number' \n ),\n 'attributes' => array (\n 'class' => 'form-control' \n ) \n ) );\n $this->add ( array (\n 'name' => 'insName',\n 'type' => 'Text',\n 'options' => array (\n 'label' => 'Instructor Name' \n ),\n 'attributes' => array (\n 'class' => 'form-control' \n ) \n ) );\n $this->add ( array (\n 'name' => 'insBirthdate',\n 'type' => 'Text',\n 'options' => array (\n 'label' => 'Instructor day of birth' \n ),\n 'attributes' => array (\n 'class' => 'form-control' \n ) \n ) );\n $this->add ( array (\n 'type' => 'radio',\n 'name' => 'insSex',\n 'options' => array (\n 'value_options' => array (\n 'Male' => 'Male',\n 'Female' => 'Female' \n ) \n ),\n 'attributes' => array (\n 'style' => 'margin-left:10px;'\n )\n ) );\n $this->add ( array (\n 'name' => 'submit',\n 'type' => 'Submit',\n 'attributes' => array (\n 'value' => 'Go',\n 'id' => 'submitbutton',\n 'class' => 'btn btn-default' \n ) \n ) );\n }", "title": "" }, { "docid": "aac6e3af71083bc55cb933de8455bb60", "score": "0.53153014", "text": "public function index()\n {\n //Get instructor\n $instructors = instructor94233::all();\n return $instructors;\n //InstructorResource::withoutWrapping();\n\n //return collection of instructors as a resource\n //return new InstructorResource($instructors);\n\n }", "title": "" }, { "docid": "d78279cf18283a23cdddf999d443986d", "score": "0.53140223", "text": "function parrainage_autoriser(){}", "title": "" }, { "docid": "6c094b522e7d3a25e6ea5f30870341fa", "score": "0.53139246", "text": "public function action_alumno()\n\t{\n\t\t$id=SESSION::get('id_sesion');\n\t\tif(isset($volver) && $volver === 'volver'){\n\t\t\tSESSION::delete('id_examen');\n\t\t}\n\t\tif(isset($id) && ($tipo_usuario = substr($id,0,1))=='a'){\n\t\t\t$id_curso = SESSION::get('id_curso');\n\t\t\t$curso = Model_Curso::find_one_by('id_curso',$id_curso);\n\t\t\t$hoy = date('Y-m-d H:i:s');\n\n\t\t\t$n_cuenta = substr($id, 1);\n\n\t\t\t$examenes = Model_Examen::find(function ($query) use ($id_curso, $hoy){\n\t\t\t\treturn $query->join('Evalua')\n\t\t\t\t\t\t\t ->on('Evalua.id_examen', '=', 'Examen.id_examen')\n\t\t\t\t\t\t\t ->where('Evalua.id_curso', $id_curso)\n\t\t\t\t\t\t\t ->order_by('Examen.fecha_fin');\n\t\t\t});\n\t\t\t$examenes_disponibles=[];\n\t\t\t$examenes_hechos=[];\n\t\t\t$cantidad_presentados = 0;\n\t\t\t$suma_calificacion_presentados = 0;\n\t\t\t$promedio = 0;\n\t\t\tif(isset($examenes)){\n\t\t\t\tforeach ($examenes as $examen) {\n\t\t\t\t\tif($examen->fecha_fin >= $hoy && $examen->fecha_inicio <= $hoy){\n\t\t\t\t\t\tarray_push($examenes_disponibles, $examen->id_examen);\n\t\t\t\t\t}\n\t\t\t\t\t$presenta = Model_Presenta::find(array('n_cuenta' => $n_cuenta, 'id_examen' => $examen->id_examen));\n\t\t\t\t\tif(isset($presenta) && $presenta->terminado > 0){\n\t\t\t\t\t\tarray_push($examenes_hechos, $examen->id_examen);\n\t\t\t\t\t\t$cantidad_presentados++;\n\t\t\t\t\t\t$suma_calificacion_presentados = $suma_calificacion_presentados + intval($presenta->calificacion);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($cantidad_presentados > 0){\n\t\t\t\t$promedio = $suma_calificacion_presentados / $cantidad_presentados;\n\t\t\t}\n\n\t\t\t$alumnos = Model_Alumno::find(function ($query) use ($id_curso){\n\t\t\t\treturn $query->join('Cursa')\n\t\t\t\t\t\t\t ->on('Cursa.n_cuenta', '=', 'Alumno.n_cuenta')\n\t\t\t\t\t\t\t ->where('Cursa.id_curso', $id_curso)\n\t\t\t\t\t\t\t ->order_by('Cursa.estado');\n\t\t\t});\n\n\t\t\t$hay_informacion_por_borrar = isset($alumnos) && $curso->activo === '0';\n\n\t\t\t$data = array('curso' => $curso, 'examenes' => $examenes, 'examenes_disponibles' => $examenes_disponibles, 'examenes_hechos' => $examenes_hechos, 'promedio' => $promedio, 'hoy' => $hoy, 'hay_informacion_por_borrar' => $hay_informacion_por_borrar);\n\t\t\t$this->template->content = View::forge('curso/alumno', $data);\n\t\t}else{\n\t\t\tResponse::redirect('sesion/index');\n\t\t}\n\t}", "title": "" }, { "docid": "c72892a8475a35a4bba4c08751d8722d", "score": "0.53038114", "text": "public function edit(Professor $professor)\n {\n //\n }", "title": "" }, { "docid": "48d6e9f73891639f79d9b924c11120e3", "score": "0.5303509", "text": "public function testValidInstructorLogin() {\n try {\n $loggedInstructor = UserManagementController::login($this->instructor->getJnUsername(),\n $this->instructor->getJnPassword());\n $this->assertNotNull($loggedInstructor, \"The Logged User is Null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $this->instructor->getType(),\n \"The logged user is not a Instructor\");\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful Instructor Login Failed \" . $ime);\n }\n }", "title": "" } ]
936b9b614e65b53bacbd2cadbcd401d6
Recursively finds every view that is included inside this view
[ { "docid": "b94afa886b5f2f4f6d79179c51b75fab", "score": "0.60200214", "text": "public function findAllIncludedViews($viewPath, $ignore = [])\n\t{\n\t\t$content = $this->openViewPath($viewPath);\n\n\t\t$includes = $this->includeStatements($content);\n\n\t\t$ignore[] = $viewPath;\n\n\t\tforeach ($includes as $include)\n\t\t{\n\t\t\tif (!in_array($include, $ignore))\n\t\t\t{\n\t\t\t\t$ignore[] = $include;\n\t\t\t\t$includes = array_merge($includes, $this->findAllIncludedViews($include, $ignore));\n\t\t\t}\n\t\t}\n\n\t\treturn array_unique($includes);\n\t}", "title": "" } ]
[ { "docid": "b93a77a02be1d7daccb98c779611fc2e", "score": "0.598411", "text": "public function getViews();", "title": "" }, { "docid": "b93a77a02be1d7daccb98c779611fc2e", "score": "0.598411", "text": "public function getViews();", "title": "" }, { "docid": "b02b6213b5057548910285a2316a3e9b", "score": "0.56609714", "text": "protected function lazy_get_views()\n\t{\n\t\t$options = [\n\n\t\t\t'assets' => [\n\n\t\t\t\t'css' => [ DIR . 'public/page.css' ]\n\t\t\t],\n\n\t\t\t'provider' => __NAMESPACE__ . '\\ViewProvider'\n\t\t];\n\n\t\treturn \\ICanBoogie\\array_merge_recursive(parent::lazy_get_views(), [\n\n\t\t\t'view' => $options,\n\t\t\t'list' => $options,\n\t\t\t'home' => $options\n\n\t\t]);\n\t}", "title": "" }, { "docid": "99723c3e473d17088f2bb513eb95e3c4", "score": "0.565463", "text": "function fetchViewsForControllers() {\n\n $paths = array();\n foreach ($this->get() as $controller => $methods) {\n\n $theController = str_replace('Controller', '', $controller);\n $base = ROOT . DS . APP_DIR . DS;\n $themed = $base . 'View' . DS . 'Themed' . DS; // . '' . DS . $theController;\n $standard = $base . 'View' . DS . $theController;\n $plugged = $base . 'Plugin' . DS;\n\n //Check the \"default/standard/non-themed\" paths\n if (is_dir($standard)) {\n foreach (scandir($standard) as $file):\n if (!in_array($file, array('.', '..'))) {\n $paths[$theController][$file] = $file;\n }\n endforeach;\n }\n\n //Check the \"themed\" paths\n foreach (Configure::read('Theme.themeset') as $theme) {\n $thisTheme = $themed . $theme . DS . $theController;\n if (is_dir($thisTheme)) {\n foreach (scandir($thisTheme) as $file):\n if (!in_array($file, array('.', '..'))) {\n $paths[$theController][$file] = $file;\n }\n endforeach;\n }\n }\n //debug(App::paths());\n\n foreach (scandir($plugged) as $plugin) {\n $thisPlugin = $plugged . $plugin . DS . 'View' . DS . $theController;\n if (is_dir($thisPlugin)) {\n foreach (scandir($thisPlugin) as $file):\n if (!in_array($file, array('.', '..'))) {\n $paths[$theController][$file] = $file;\n }\n endforeach;\n }\n }\n }\n return $paths;\n }", "title": "" }, { "docid": "d8213f570fb83f09d832ff890b069b79", "score": "0.5615263", "text": "function pixel_structure_views_default_views() {\n // get all views in code (hold in files ending with .view)\n $views = array();\n $files = file_scan_directory(drupal_get_path('module', 'pixel_structure') . '/views', '#\\.view$#');\n foreach ($files as $filepath => $file) {\n // import view\n require $filepath;\n\n // Add view to list of views to provide.\n if (isset($view)) {\n $views[$view->name] = $view;\n }\n }\n return $views;\n}", "title": "" }, { "docid": "a40469c9e1e15474cd9322434a0ddcb7", "score": "0.5596574", "text": "function artefact_in_view($artefact, $view) {\n if (!is_object($artefact)) {\n $artefact = artefact_instance_from_id($artefact);\n }\n\n $ancestors = $artefact->get_item_ancestors();\n\n $params = array($view, $artefact->get('id'), $artefact->get('id'));\n $extrasql = '';\n if ($ancestors) {\n $extrasql = \"SELECT a.parent\n FROM {view_artefact} top JOIN {artefact} a\n ON a.parent = top.artefact\n WHERE top.view = ? AND top.artefact IN (\" . implode(',', $ancestors) . \")\n UNION\";\n $params[] = $view;\n }\n\n $sql = \"SELECT a.id\n FROM {view_artefact} a WHERE \\\"view\\\" = ? AND artefact = ?\n UNION\n SELECT aa.artefact\n FROM {artefact} a INNER JOIN {artefact_attachment} aa\n ON a.id = aa.artefact\n WHERE aa.attachment = ?\n UNION\n $extrasql\n SELECT s.id\n FROM {view} v INNER JOIN {skin} s\n ON v.skin = s.id\n WHERE v.id = ? AND ? in (s.bodybgimg, s.viewbgimg)\n \";\n $params = array_merge($params, array($view, $artefact->get('id')));\n\n return record_exists_sql($sql, $params);\n}", "title": "" }, { "docid": "895ce6dce1edf495085881b4abd9594f", "score": "0.5588715", "text": "protected function getViews()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "f02ae22fa131c1ebe850841f875cf21f", "score": "0.55225277", "text": "protected function compileViews()\n {\n foreach ($this->laravel->make(Factory::class)->getFinder()->getPaths() as $path) {\n foreach ($this->laravel['files']->allFiles($path) as $file) {\n try {\n $this->compileView($file);\n } catch (InvalidArgumentException $e) {\n continue;\n }\n }\n }\n }", "title": "" }, { "docid": "49c4b201f21f5288a06e680e47966ab3", "score": "0.5498598", "text": "public function getAllViews()\n {\n return $this->connection->select(\n $this->grammar->compileGetAllViews()\n );\n }", "title": "" }, { "docid": "55a928c886a749212073ddfc85a959c3", "score": "0.5342625", "text": "public function getwidgettemplates(){\r\n\t\t\r\n\t\t\r\n\t\t// read through the application widget folders and list both views and impressto\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "2dcc8a8a11a930366b9b0447de811ff2", "score": "0.5316225", "text": "public function getDescendants();", "title": "" }, { "docid": "2dcc8a8a11a930366b9b0447de811ff2", "score": "0.5316225", "text": "public function getDescendants();", "title": "" }, { "docid": "51d121a76450f96140f334e9c2dbf5bf", "score": "0.5314035", "text": "function get_views( ) {\r\n\t\t/*\r\n\t\t * Find current view\r\n\t\t */\r\n\t\t$current_view = isset( $_REQUEST['mla_example_view'] ) ? $_REQUEST['mla_example_view'] : 'all';\r\n\r\n\t\t/*\r\n\t\t * Generate the list of views, retaining keyword search criterion\r\n\t\t */\r\n\t\t$s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';\r\n\t\t$example_items = self::_tabulate_example_items( $s );\r\n\t\t$view_links = array();\r\n\t\tforeach ( $example_items as $slug => $item )\r\n\t\t\t$view_links[ $slug ] = self::_get_view( $slug, $item, $current_view );\r\n\r\n\t\treturn $view_links;\r\n\t}", "title": "" }, { "docid": "46f6553c5523a935822c0cd965025a08", "score": "0.5307558", "text": "private function loadViews(): void\n {\n $this->loadViewsFrom(base_path('resources/views/vendor/rbac'), 'rbac');\n }", "title": "" }, { "docid": "afcd73fae9a7218ab3833e0f4607b8f1", "score": "0.5296624", "text": "public function get_views() {\n global $DB, $CFG;\n\n $viewlist = array('default' => get_string('linkview', 'block_page_module'));\n\n $moduleid = $DB->get_field('course_modules', 'module', array('id' => $this->config->cmid));\n $modname = $DB->get_field('modules', 'name', array('id' => $moduleid));\n\n if (file_exists($CFG->dirroot.'/course/format/page/plugins/'.$modname.'.php')) {\n $viewlist[$modname] = get_string('pluginname', $modname);\n }\n\n if ($views = glob($CFG->dirroot.'/course/format/page/plugins/'.$modname.'_*.php')) {\n foreach ($views as $view) {\n $parts = pathinfo($view);\n $filename = $parts['filename'];\n if ($filename == 'page_item_default') {\n continue;\n }\n if ($filename == $modname) {\n $viewlist[$modname] = get_string('defaultpageview', 'block_page_module');\n } else {\n $viewname = str_replace($modname.'_', '', $filename);\n $lastdbg = $CFG->debug;\n $CFG->debug = false;\n $str = get_string('view_'.$filename, 'format_page');\n if (preg_match('/\\[\\[.*\\]\\]/', $str)) {\n $str = get_string('view_'.$viewname, $modname);\n }\n $CFG->debug = $lastdbg;\n $viewlist[\"$modname/$viewname\"] = $str;\n }\n }\n } else {\n /*\n * Last try : for non standardly handled modules, check in plugin directory.\n * We seek for page_item.php file or page_item_wviewname>.php\n */\n if ($views = glob($CFG->dirroot.'/mod/'.$modname.'/pageitem*.php')) {\n foreach ($views as $view) {\n $parts = pathinfo($view);\n $filename = $parts['filename'];\n if ($filename == 'pageitem') {\n $viewlist[$modname.'/default'] = get_string('defaultpageview', 'block_page_module');\n } else {\n $viewname = str_replace('pageitem_', '', $filename);\n $lastdbg = $CFG->debug;\n $CFG->debug = false;\n $str = get_string('view_'.$filename, $modname);\n if (preg_match('/\\[\\[.*\\]\\]/', $str)) {\n $str = get_string('view_'.$viewname, $modname);\n }\n $CFG->debug = $lastdbg;\n $viewlist[\"$modname/$viewname\"] = $str;\n }\n }\n }\n }\n\n return $viewlist;\n }", "title": "" }, { "docid": "c856456e0f38cc8346c41edd47bc82f7", "score": "0.5292811", "text": "public function findViewHelpers($content) {\n\t\tpreg_match_all('!###([\\w]+):.*?\\###!is', $content, $match);\n\t\t$viewHelpers = array_unique($match[1]);\n\n\t\t\t// remove LOOP\n\t\t$loopIndex = array_search('LOOP', $viewHelpers);\n\t\tif ($loopIndex !== false) {\n\t\t\tunset($viewHelpers[$loopIndex]);\n\t\t}\n\n\t\treturn $viewHelpers;\n\t}", "title": "" }, { "docid": "3e9ef424d3df818d3efeb7a55f0dc26f", "score": "0.52308357", "text": "public function find($view);", "title": "" }, { "docid": "5229bdb5f6c6b2bf8bda5641648c9d81", "score": "0.5229578", "text": "protected function getViews()\n\t{\n\t\treturn [ ];//, return an empty array;\n\t}", "title": "" }, { "docid": "5229bdb5f6c6b2bf8bda5641648c9d81", "score": "0.5229578", "text": "protected function getViews()\n\t{\n\t\treturn [ ];//, return an empty array;\n\t}", "title": "" }, { "docid": "384cbf8fd584970023bb132a533d7e68", "score": "0.52062255", "text": "public function getViewPaths() : array\n {\n return $this->viewFinder->getPaths();\n }", "title": "" }, { "docid": "be56e0f4668ce28e45e3897916cc0258", "score": "0.518619", "text": "function buddyexpressdesk_fetch_views($layout, $params = array()){ \nglobal $VIEW;\nif(isset($VIEW->register[$layout]) && !empty($VIEW->register[$layout])){\nforeach($VIEW->register[$layout] as $file){\n\tif(!function_exists($file)){\n\t $fetch[] = buddyexpressdesk_view(str_replace('.php', '',$file), $params);\n\t} else {\n\t\t\t $fetch[] = call_user_func($file, buddyexpressdesk_get_context(), $params, alternate_get_url());\n\t}\n } \nreturn implode('', $fetch); \n}\n}", "title": "" }, { "docid": "f3fc9c21fedb4458b66aa4139fc0fbf0", "score": "0.51644415", "text": "function views( $views )\n {\n global $wp_plugin_directories;\n \n // bail if we don't have any extra dirs\n if( empty( $wp_plugin_directories ) ) return $views;\n \n // Add our directories to the action links\n foreach( $wp_plugin_directories as $key => $info )\n {\n if( ! count( $this->plugins[$key] ) ) continue;\n $class = $this->get_plugin_status() == $key ? ' class=\"current\" ' : '';\n $views[$key] = sprintf( \n '<a href=\"%s\"' . $class . '>%s <span class=\"count\">(%d)</span></a>',\n add_query_arg( 'plugin_status', $key, 'plugins.php' ),\n esc_html( $info['label'] ),\n count( $this->plugins[$key] )\n );\n }\n return $views;\n }", "title": "" }, { "docid": "5526fc9670840b467db8ffffc07c9acb", "score": "0.515132", "text": "function mentions_get_views() {\n\t$views = array('output/longtext');\n\t//, 'river/item');\n\t//,'object/thewire');\n\t$views = elgg_trigger_plugin_hook('get_views', 'mentions', null, $views);\n\tforeach ($views as $view) {\n\t\telgg_register_plugin_hook_handler('view', $view, 'mentions_rewrite');\n\t}\n}", "title": "" }, { "docid": "918fd0a20a6ddd0bb681e1be994ff830", "score": "0.5126457", "text": "public function getAllForView(View $view)\n {\n //Get all WidgetMaps ids for this View\n $widgetMapsIdsToSearch = [];\n foreach ($view->getBuiltWidgetMap() as $widgetMaps) {\n foreach ($widgetMaps as $widgetMap) {\n $widgetMapsIdsToSearch[] = $widgetMap->getId();\n }\n }\n\n return $this->createQueryBuilder('widget')\n ->join('widget.widgetMap', 'widgetMap')\n ->andWhere('widgetMap.id IN (:widgetMapsIds)')\n ->setParameter('widgetMapsIds', $widgetMapsIdsToSearch);\n }", "title": "" }, { "docid": "b5a1c632f83da4bee7a961479040c90c", "score": "0.5111637", "text": "static private function load_dependencies()\n\t{\n\t\tif ( ! self::$loaded_dependencies)\n\t\t{\n\t\t\tforeach(View::$loaded as $view)\n\t\t\t{\t\t\t\t\t\t\t\t\n\t\t\t\t$segments = explode('/', $view);\n\t\t\t\t\n\t\t\t\t$first_segment = TRUE;\n\t\t\t\tforeach ($segments as $segment)\n\t\t\t\t{\n\t\t\t\t\tif ($first_segment)\n\t\t\t\t\t{\n\t\t\t\t\t\t$required_config = $segment;\n\t\t\t\t\t\t$first_segment = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t$required_config .= '.'.$segment; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Add a preceding '.' if required_config is not empty.\n\t\t\t\t\t$required = ! empty($required_config) ? '.'.$required_config : $required_config;\n\t\t\t\t\t\n\t\t\t\t\t$required = self::config('views'.$required);\n\t\t\t\t\n\t\t\t\t\tif ($required)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (isset($required['stylesheets']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($required['stylesheets'] as $file => $media)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( ! array_key_exists($file, self::$stylesheets))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tself::$stylesheets[$file] = $media;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tif (isset($required['scripts']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($required['scripts'] as $file)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( ! in_array($file, self::$scripts))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tself::$scripts[] = $file;\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\tif (isset($required['files']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($required['files'] as $file)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( ! in_array($file, self::$files))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tself::$files[] = $file;\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}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7c33897fc30c45aabe60b53d3fcd75a4", "score": "0.51098377", "text": "public function nest($view, $key = 'content');", "title": "" }, { "docid": "f46fdc535275f6481200597c9bc99e83", "score": "0.5101088", "text": "public function compose(View $view)\n {\n $view ->withPages($this->pages->with(['activeChildrens'])\n ->where('is_active', '1')\n ->where('parent_id', '0')\n ->get());\n }", "title": "" }, { "docid": "33324d9f9cfe3e5908dab3a381ed1dae", "score": "0.508687", "text": "public function immediateDescendants();", "title": "" }, { "docid": "e5ea57482751c34d9e65a3ca15314030", "score": "0.50826496", "text": "public function getViewTemplateScopes()\n {\n return $this->view_templates_container_map->getKeys();\n }", "title": "" }, { "docid": "735bc09372be1b36c416fc66dcc886d9", "score": "0.50706255", "text": "function get_views( ) {\r\n\t\t// Find current view\r\n\t\t$current_view = isset( $_REQUEST['mla_custom_field_view'] ) ? $_REQUEST['mla_custom_field_view'] : 'all';\r\n\r\n\t\t// Generate the list of views, retaining keyword search criterion\r\n\t\t$s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';\r\n\t\t$custom_field_items = MLA_Custom_Field_Query::mla_tabulate_custom_field_items( $s );\r\n\t\t$view_links = array();\r\n\t\tforeach ( $custom_field_items as $slug => $item )\r\n\t\t\t$view_links[ $slug ] = self::_get_view( $slug, $item, $current_view );\r\n\r\n\t\treturn $view_links;\r\n\t}", "title": "" }, { "docid": "2ccce40c7608ca95328ab0c8bd59d88b", "score": "0.50515056", "text": "protected function getViews()\n\t{\n\t\treturn [ $this->createAccount_view ];\n\t}", "title": "" }, { "docid": "0ada73868e5b2b998e42d22d0d72ae2b", "score": "0.50101256", "text": "protected function loadViews()\n {\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'bloggy');\n }", "title": "" }, { "docid": "cda9e7e086afcc5c60b8bb2b77d2dd21", "score": "0.4982712", "text": "protected function loadViews(): void\n {\n $this->loadViewsFrom($this->getViewsPath(), $this->getPackageName());\n }", "title": "" }, { "docid": "2eb312d4930c67eb6081618a3f1757ec", "score": "0.49711588", "text": "public function getViewForAll() : bool\n {\n return $this->viewForAll;\n }", "title": "" }, { "docid": "6787b8a119f089cff9dd35fdbcfc051b", "score": "0.49467677", "text": "public function testCompilingNestedIncludeStatements()\n {\n $includedView1 = new View('Foo', 'foo<% include(\"Bar\") %>');\n $includedView2 = new View('Bar', 'bar');\n $this->viewFactory->expects($this->exactly(2))\n ->method('createView')\n ->willReturnOnConsecutiveCalls($includedView1, $includedView2);\n $this->view->setContents('<% include(\"Foo\") %>baz');\n $this->assertEquals(\n 'foobarbaz',\n $this->fortuneCompiler->compile($this->view)\n );\n }", "title": "" }, { "docid": "b8064864a6cbf8a86d6127898e330649", "score": "0.49446803", "text": "public function getSubviews() {\n return $this->subviews;\n }", "title": "" }, { "docid": "6ca332cdbe3b97850c3f62a99f30544d", "score": "0.4943891", "text": "public abstract function getSupportedViews();", "title": "" }, { "docid": "4efbc2a72c0f0c2e136b31e458d1fff8", "score": "0.49266645", "text": "public function loadModuleServiceViews()\n {\n foreach ($this->modules as $module => $service) {\n if (!is_array($service)) {\n if (is_dir($this->baseDirectory . '/' . $service . '/Views')) {\n $this->loadViewsFrom($this->baseDirectory . '/' . $service . '/Views', $service);\n }\n }\n }\n }", "title": "" }, { "docid": "f0cc74ea08877524c30f7d93ae04e894", "score": "0.49220613", "text": "function loadViews($filter = array('headertext', 'footertext', 'mobilepage_title', 'mobilepage_description')) {\n\t$start = microtime(true);\n\t$path = plugin_dir_path( __FILE__ );\n\t$viewpath = $path . \"views/page/tmpl\";\n\t$files = ls($viewpath);\n\t\n\t$views = array();\n\tforeach ($files as $file) {\n\t\tif (strpos($file, \".xml\") > 0) {\n\t\t $contents = file_get_contents(\"$viewpath/$file\");\n\t\t \t\t \n\t\t $xml = new SimpleXMLElement($contents);\n\t\t $xml = simplexml2array($xml);\n\t\t \n\t \n\t\t $view = array();\n\t\t $view['file'] = $file;\n\t\t $view['path'] = \"$viewpath/$file\";\n\t\t $view['title'] = $xml['layout']['message'];\n\t\t \t\t \n\t\t $params = $xml['state']['params']['param'];\n\n\t\t foreach ($params as $xparam) {\n\t\t \t$param = $xparam['@'];\n\t\t \t\n\t\t \t// Here we filter out the fields that wordpress supplies\n\t\t \t// by default;\n\t\t \tif (in_array($param['name'], $filter)) continue;\n\t\t \t\n\t\t \t// Add additional options, if available\n\t\t \tif (isset($xparam['option'])) $param['option'] = $xparam['option'];\n\n\t\t \t$view['fields'][] = $param;\n\t\t }\n\t\t \t\t \n\t\t $views[] = $view;\n\t\n\t\t}\n\t}\n\t$end = microtime(true);\t\n\treturn $views;\n}", "title": "" }, { "docid": "bea48209b02cf57447961dc10b05bc11", "score": "0.4911523", "text": "public function getViews()\n\t{\n\t\t$query = \"select relname\n\t\tfrom pg_class\n\t\twhere not relname ~ 'pg_.*'\n\t\tand not relname ~ 'sql_.*'\n\t\tand relkind = 'v'\n\t\tORDER BY relname\";\n\t\t$result = $this->perform($query);\n\t\t$return = pg_fetch_all($result);\n\t\tpg_free_result($result);\n\t\treturn ArrayPlus::create($return)->column('relname')->getData();\n\t}", "title": "" }, { "docid": "dc5ee45a75f614b2a76bc8896d674dac", "score": "0.4895823", "text": "public function getViews()\n\t{\n\t\treturn $this->views;\n\t}", "title": "" }, { "docid": "7c70628d08aa232cbaaaab6b770f114e", "score": "0.4893689", "text": "public function hasView(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "7c70628d08aa232cbaaaab6b770f114e", "score": "0.4893689", "text": "public function hasView(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "bca388a88fc977ee579ae9f5e2678e19", "score": "0.4885668", "text": "protected function _getViewDirectories()\n {\n $frontController = Zend_Controller_Front::getInstance();\n $moduleDirs = $frontController->getControllerDirectory();\n $viewDirs = array_map(function($dir) {\n return dirname($dir) . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR .\n 'scripts';\n }, $moduleDirs);\n\n // Make default module the __main__ one otherwise every include would have to be namespaced\n if (array_key_exists($frontController->getDefaultModule(), $viewDirs)) {\n $viewDirs['__main__'] = $viewDirs[$frontController->getDefaultModule()];\n unset($viewDirs[$frontController->getDefaultModule()]);\n }\n return $viewDirs;\n }", "title": "" }, { "docid": "5a78b4b8c747b330c99c523e7a6d2065", "score": "0.48775992", "text": "public function compose(View $view)\n {\n $transfer_types = TransferType::take('TransferTypeRef', 'TransferType');\n $trabsaction_types = TransactionType::take('TransactionTypeRef', 'TransactionType');\n // $banks = Bank::all();\n $banks = Bank::take('name', 'id');\n $gl_balance = number_format(\\DB::table('tblGL')->select('ClearedBalance')\n ->where('CustomerID', auth()->user()->id)\n ->where('AccountTypeID', 1)\n ->first()->ClearedBalance, 2);\n $book_balance = number_format(\\DB::table('tblGL')->select('BookBalance')\n ->where('CustomerID', auth()->user()->id)\n ->where('AccountTypeID', 1)\n ->first()->BookBalance, 2);\n $tradefi_news = News::all();\n $view->with('transfer_types', $transfer_types);\n $view->with('gl_balance', $gl_balance);\n $view->with('book_balance', $book_balance);\n $view->with('banks', $banks);\n $view->with('tradefi_news', $tradefi_news);\n\n $roles = auth()->user()->roles;\n\n if (auth()->user()->company_id == '1') {\n $parent_menus = Menu::where('parent_id', '0')->orderBy('order')->get();\n } else {\n // is parent, AND (has roles OR has children (where has roles))\n $parent_menus = Menu::where('parent_id', '0')->where(function($q1) use($roles) {\n $q1->whereHas('roles', function($q2) use($roles) {\n $q2->whereIn('id', $roles->pluck('id')->toArray());\n })->orWhereHas('children', function($q3) use($roles) {\n $q3->whereHas('roles', function($q4) use($roles) {\n $q4->whereIn('id', $roles->pluck('id')->toArray());\n });\n });\n })->orderBy('order')->get();\n }\n \n // dd(Menu::find(1)->children);\n\n $view->with(compact('parent_menus'));\n }", "title": "" }, { "docid": "1ab222750e7ef2681c69274ebe64d14b", "score": "0.48768988", "text": "public function descendants();", "title": "" }, { "docid": "64445451c604d4239a3515bfb073427d", "score": "0.48742884", "text": "public function compose(View $view)\n {\n $headerCategories = Category::select('id','name')\n ->visible()\n ->parent()\n ->with(['children'=>function($query){\n $query->select('id','name','parent_id');\n }])\n ->regular()\n ->orderBy('order_top', 'asc')\n ->get();\n\n // $footerCategoriesFirst = Category::select('id','name')\n // ->visible()\n // ->parent() \n // ->with(['children'=>function($query){\n // $query->select('id','name','parent_id');\n // }])\n // ->has('children')\n // ->orderBy('order_top', 'asc')\n // ->get(); \n // dd($footerCategoriesFirst->pluck('name'));\n $view->with('headerCategories', $headerCategories)\n // ->with('footerCategoriesFirst', $footerCategoriesFirst)\n ;\n }", "title": "" }, { "docid": "45410304971d517373c8f8b8077259ba", "score": "0.48617187", "text": "function getaddFolderView()\n{\n require_once('view/fronted/addFolderView.php');\n}", "title": "" }, { "docid": "fa338a9689c1681d6ecf5d9ef75feae4", "score": "0.48583055", "text": "public function assembliesRecursive()\n {\n return $this->assemblies()->with('assembliesRecursive');\n }", "title": "" }, { "docid": "3dd2a27c0424d29c8dbad4cb680fa9a5", "score": "0.48506078", "text": "public static function getAllViewsInfo()\n {\n return Info::getAll();\n }", "title": "" }, { "docid": "1c0343c80e191ca992b67cfa6cedfaad", "score": "0.48503357", "text": "function findRelatableModules ()\n {\n $this->relatableModules = $this->implementation->findRelatableModules () ;\n }", "title": "" }, { "docid": "fb1527a5bb2dbaa5562f448411260c0e", "score": "0.4838991", "text": "private function views()\n {\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'mage');\n }", "title": "" }, { "docid": "3102740376238111bb01d89293f7b342", "score": "0.48374772", "text": "public function getViews()\n {\n return $this->views;\n }", "title": "" }, { "docid": "3102740376238111bb01d89293f7b342", "score": "0.48374772", "text": "public function getViews()\n {\n return $this->views;\n }", "title": "" }, { "docid": "47169c342ceab2b48b27b88a87dd6966", "score": "0.48355713", "text": "public function hasDescendants();", "title": "" }, { "docid": "00cf7752d66c42093544f47e66480582", "score": "0.48315504", "text": "public function detect() {\n\n foreach ($this->folders as $path => $data) {\n\n if (isset($data['loaded'])) {\n continue;\n }\n\n $Directory = new RecursiveDirectoryIterator($path);\n $Iterator = new RecursiveIteratorIterator($Directory);\n\n foreach ($Iterator as $entry) {\n\n if ($entry->getBasename() == '.'\n && $entry->getBasename() == '..') {\n continue;\n }\n\n // Compatibility with 5.2\n if (method_exists($entry, 'getExtension')) {\n $ext = $entry->getExtension();\n }\n else {\n $ext = pathinfo($entry->getFilename(), PATHINFO_EXTENSION);\n }\n\n if ($ext == 'php') {\n $this->add($entry->getBasename(), array(\n 'prefix' => $data['prefix'],\n 'default' => $entry->getRealPath(),\n ));\n }\n }\n\n $this->folders[$path]['loaded'] = true;\n\n // Cache the scanned results\n set_transient('vtcore_template_folders_map', $this->folders, 12 * HOUR_IN_SECONDS);\n set_transient('vtcore_template_map', $this->templates, 12 * HOUR_IN_SECONDS);\n\n }\n\n return $this;\n }", "title": "" }, { "docid": "d8cea66b328bd2d30b97b1028ff34631", "score": "0.48270357", "text": "private function _find_view_folder()\n\t{\n\t\tif ( $this->_ci->load->get_var( 'template_views' ) ) {\n\n\t\t\treturn $this->_ci->load->get_var( 'template_views' );\n\t\t}\n\n\t\t// Base view folder\n\t\t$view_folder = APPPATH.'views/';\n\n\t\t// Using a theme? Put the theme path in before the view folder\n\t\tif ( !empty( $this->_theme ) ) {\n\t\t\t$view_folder = $this->_theme_path;\n\t\t}\n\n\t\t// Would they like the mobile version?\n\t\tif ( $this->_is_mobile === true && is_dir( $view_folder.'mobile/' ) ) {\n\t\t\t// Use mobile as the base location for views\n\t\t\t$view_folder .= 'mobile/';\n\t\t}\n\n\t\t// Use the web version\n\t\telse if ( is_dir( $view_folder.'web/' ) ) {\n\t\t\t$view_folder .= 'web/';\n\t\t}\n\n\t\t// If using themes store this for later, available to all views\n//\t\treturn $this->_ci->load->_ci_cached_vars['template_views'] = $view_folder;\n\t\t$this->_ci->load->vars( 'template_views', $view_folder );\n\n\t\treturn $view_folder;\n\t}", "title": "" }, { "docid": "a7fd124e04f62ad69418ef4382bcb8d1", "score": "0.4825657", "text": "private function loadView(){\n // Establish Views Namespace\n if (is_dir(base_path() . self::ESTABLISHED_VIEW_NAMESPACE)) {\n // The package views have been published - use those views.\n $this->loadViewsFrom(base_path() . self::ESTABLISHED_VIEW_NAMESPACE, 'email-exceptions-view');\n } else {\n // The package views have not been published. Use the defaults.\n $this->loadViewsFrom(__DIR__ . '/views', 'email-exceptions-view');\n }\n }", "title": "" }, { "docid": "63a7f56a7f1dab93b75644179297afee", "score": "0.4821867", "text": "public function getActionableViews() {\n\t\tstatic $views;\n\t\tif (isset($views)) {\n\t\t\treturn $views;\n\t\t}\n\n\t\t$views = [];\n\n\t\t$plugin = elgg_get_plugin_from_id('hypeInteractions');\n\t\t$settings = $plugin->getAllSettings();\n\t\tforeach ($settings as $key => $value) {\n\t\t\tif (!$value) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlist ($prefix, $view) = explode(':', $key);\n\t\t\tif ($prefix !== 'stream_object') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$views[] = $view;\n\t\t}\n\n\t\treturn $views;\n\t}", "title": "" }, { "docid": "8b0e606d797a1a69a417efdbe5b69386", "score": "0.48194477", "text": "function includes(LayoutItem $block) {\n if ($block instanceof Layout and $block->isView()) {\n return false;\n } else {\n $matches = null;\n\n foreach ((array) $this->onlyBlocks as $classes) {\n $matches = $block->matches($classes);\n if ($matches) { break; }\n }\n\n return $matches !== false;\n }\n }", "title": "" }, { "docid": "fa2db7537382b45ef802ef1a08640ba3", "score": "0.48101166", "text": "function MYMODULE_views_pre_build(\\Drupal\\views\\ViewExecutable $view) {\n if ($view->id() == 'job_families_profiles' && $view->getDisplay()->display['id'] == 'block_1') {\n $exposedInput = $view->getExposedInput();\n if($tid = $exposedInput['tid']) {\n\n // Check depth of exposed input\n $parents = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadAllParents($tid);\n $depth = count($parents);\n\n $args = [];\n if($depth === 3) {\n // If depth is 3, just return the value\n // We're at the deepest child\n $args = [$tid];\n } else {\n // If the grandparent was chosen, get the grandchildren\n // If the parent was chosen, get the child\n $vid = 'job_family_groups';\n switch ($depth) {\n case 1: // Grandparent\n $depth = 2;\n break;\n case 2: // Parent\n $depth = 1;\n break;\n }\n\n // Gather term children\n $child_tids = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadTree($vid, $tid, $depth, FALSE);\n\n // Turn children into arguments\n // <insert punny joke here about children and arguments>\n foreach ($child_tids as $child_tid) {\n $args[] = $child_tid->tid;\n }\n $args = [implode('+', $args)];\n }\n\n\n // Set exposed input (for tid, anyway) to null\n // We don't want to compound the exposed filter with the contextual args\n $view->setExposedInput(['tid' => NULL]);\n\n // Manually define the children (set contextual arg)\n $view->setArguments($args);\n }\n\n }\n}", "title": "" }, { "docid": "157d4b5f590c6d880d4350927251317e", "score": "0.47955632", "text": "function view($view , $view_data)\n{\n\tforeach($view_data as $viewVr => $val){\n\t\t$viewVr = $val;\n\n\t}\n\tinclude_once __DIR__.DS.$view['folder'].DS.$view['file'].'.php';\n}", "title": "" }, { "docid": "30b7ccf727c691363485e7ff067c31dc", "score": "0.47928476", "text": "public function ancestors();", "title": "" }, { "docid": "4dd6a5b5b3b4c490b011d1d44b87c4b7", "score": "0.47918168", "text": "public function index()\n {\n //$sections_category = Section::findOrFail(59);\n //$sections_category = $sections_category->children()->get();\n //$sections_category = $sections_category->parent()->get();\n $sections = Section::with('document','children','sentences')->orderBy('title')->get();\n\n\n return view('sections.list', compact('sections','sections_category'));\n }", "title": "" }, { "docid": "10554a54cd9e1c4087bc5b174685fb1a", "score": "0.47784036", "text": "public static function view()\n {\n $list = array();\n // Module View\n if (!empty(self::$m)) {\n $list[sprintf('%s/view/%s.php',self::$m,self::$path)] = -1;\n }\n if (self::$_a == 'index') {\n $list[] = sprintf('%s/view/%s/index.php',self::$root,self::$path);\n }\n // Theme Specific View\n $list[] = sprintf('%s/theme/%s/view/%s.php',self::$root,self::$theme_name,self::$path);\n // Standard View\n $list[] = sprintf('%s/view/%s.php',self::$root,self::$path);\n\n ob_start();\n $res = self::$view->_include($list);\n self::$view->body.= ob_get_clean();\n self::$_view_res = $res;\n return self::$_view_res;\n }", "title": "" }, { "docid": "59becc12220ef34cec1d2c785b2e95f2", "score": "0.4770813", "text": "public function everything()\n\t{\n\t\tif ( ! is_null($this->everything)) return $this->everything;\n\n\t\t$routes = array();\n\n\t\tif (file_exists($path = $this->base.'routes'.EXT))\n\t\t{\n\t\t\t$routes = array_merge($routes, require $path);\n\t\t}\n\n\t\t// Since route files can be nested deep within the route directory, we need to\n\t\t// recursively spin through each directory to find every file.\n\t\t$iterator = new Iterator(new DirectoryIterator($this->nest), Iterator::SELF_FIRST);\n\n\t\tforeach ($iterator as $file)\n\t\t{\n\t\t\t// Since some Laravel developers may place HTML files in the route directories, we will\n\t\t\t// check for the PHP extension before merging the file. Typically, the HTML files are\n\t\t\t// present in installations that are not using mod_rewrite and the public directory.\n\t\t\tif (filetype($file) === 'file' and strpos($file, EXT) !== false)\n\t\t\t{\n\t\t\t\t$routes = array_merge(require $file, $routes);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->everything = $routes;\n\t}", "title": "" }, { "docid": "4920439d15619963e9bac2e83c00984f", "score": "0.4763425", "text": "public function viewElements();", "title": "" }, { "docid": "6a36639182867595619710bc46192fd7", "score": "0.4761481", "text": "protected function loadChildren() {\n }", "title": "" }, { "docid": "0e929c6c673e920cfa4852c58f23c130", "score": "0.47599208", "text": "public function views()\n {\n $pivotTable = config('admin.database.blade_views_table');\n\n $relatedModel = config('admin.database.views_model');\n\n return $this->belongsToMany($relatedModel, $pivotTable, 'blade_id', 'view_id')->withTimestamps();\n }", "title": "" }, { "docid": "e4ae63dad13998c53cbe60c182ec340c", "score": "0.47403708", "text": "public function getViews()\r\n {\r\n return $this->getAdapter()->getViews();\r\n }", "title": "" }, { "docid": "3cb5ca3b1b56882e4640a4dd3fc90f80", "score": "0.47385368", "text": "public function getViewFinderPaths()\n {\n $paths = [];\n\n foreach ([$this->getId(), $this->getParentThemeId()] as $id) {\n if (false != ($dir = $this->checkTemplateDirExists($id))) {\n $paths[] = $dir;\n }\n }\n\n return $paths;\n }", "title": "" }, { "docid": "64b0b4680c2135dc2bbca920c7236dbb", "score": "0.47374022", "text": "public function findAllWidgetsForView(View $view)\n {\n $qb = $this->getAllForView($view);\n\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "fd2a6b9f99eb84a1cd43d93d80240d55", "score": "0.47108382", "text": "public static function getViewPaths() : array \n {\n //Get global\n global $globalBladeEngineInstanceViewPaths; \n\n //return global\n if(is_array($globalBladeEngineInstanceViewPaths)) {\n return $globalBladeEngineInstanceViewPaths; \n }\n\n //Return empty (undefined)\n return array();\n }", "title": "" }, { "docid": "1f817f969802f0678274748631b53799", "score": "0.4705367", "text": "public function views();", "title": "" }, { "docid": "e4c334022f85d31c176fe81844d8f147", "score": "0.47039765", "text": "public function renderView($view = null) {\n\t\t\n\t\t$isDone = true;\n\t\t\t\n\t\t$count = 0;\n\t\t\n\t\tif( $view != null){\n\t\t\n\t\t\textract($this->viewVars, EXTR_OVERWRITE);\n\t\t\t\n\t\t\t//load the appropriate view\n\t\t\t//include all of the files with .inc extension in view folder\n\t\t\tforeach(glob($view) as $filename){\n\t\t\t\t$count++;\n\t\t\t\tinclude $filename;\n\t\t\t}\t\n\t\t\t\n\t\t\tif($count != 1){\n\t\t\t\t$isDone = false;\n\t\t\t}\n\t\t\treturn $isDone;\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "d601071dfad77201ef97a8b3fd3ae611", "score": "0.47036436", "text": "public function getContextualSubstitutes()\n {\n $substitutesWidgetMaps = [];\n $viewWidgetMaps = $this->getContextualView()->getWidgetMapsForViewAndTemplates();\n\n foreach ($viewWidgetMaps as $viewWidgetMap) {\n if ($viewWidgetMap->getReplaced() == $this) {\n $substitutesWidgetMaps[] = $viewWidgetMap;\n }\n }\n\n return $substitutesWidgetMaps;\n }", "title": "" }, { "docid": "7d8a67792eba308ad01d22f8644f6752", "score": "0.47034603", "text": "public function render()\n {\n $rootFolder = Folder::find((int) $this->options['root_folder']);\n $subFolders = $rootFolder->subfolder();\n\n\n }", "title": "" }, { "docid": "c75db98471321ff1554316dea26face6", "score": "0.4701454", "text": "public function find($name) {\n\n\t\t// find view in application and globals\n\t\tforeach(array(\n\t\t\t// Application Resources\n\t\t\tApplicationInfo::location . ViewPath::application,\n\t\t\t// Globals\n\t\t\tViewPath::platform\n\t\t) as $path) {\n\t\t\t// check if paths exists\n\t\t\tif(is_dir($path . $name)) {\n\t\t\t\t// we got a view, register view files\n\t\t\t\treturn $this->__register($path . $name);\n\t\t\t}\n\n\t\t}\n\t\t// return error\n\t\treturn false;\t\n\t}", "title": "" }, { "docid": "60a292745390871fae310cb7d214d60f", "score": "0.46982807", "text": "public function getDescendants() {\r\n\t\t$descendants = array();\r\n\t\tforeach($this->namespace->interfaces as $interface) {\r\n\t\t\tif ($interface->extends == $this->name) {\r\n\t\t\t\t$descendants[] = $interface;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $descendants;\r\n\t}", "title": "" }, { "docid": "df178c9433bcb9e22b049930f3fba94c", "score": "0.46945083", "text": "static public function getTotalViews(){\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "62032afa59061ef629135d5c04466a77", "score": "0.46929187", "text": "public function routes()\n {\n return page('routes')->children()->filterBy('section', '==', $this->uid());\n }", "title": "" }, { "docid": "1b7801e9c40028357b4eb12b395691e7", "score": "0.4691711", "text": "public function get_view_paths()\n\t{\n\t\t// return the full array of paths\n\t\treturn $this->_ci_view_paths;\n\t}", "title": "" }, { "docid": "52491d9208da5ef37151fa39e02a908a", "score": "0.46906704", "text": "protected function parse_subviews(&$rendered)\n \t{\n\t\t// extract php control includes\n\t\t$regex = '#<[\\s]*render[\\s]*:[\\s]*view([^>]*?)[\\s]*/[\\s]*>#is';\t\t\t\t\t// extracts the tag\n\t\t\n\t\t// parse the rendered view\n \t\t$matches=array();\n \t\twhile(preg_match($regex,$rendered,$matches,PREG_OFFSET_CAPTURE)==1)\n \t\t{\n\t\t\t$parsed_attr=array();\n\t\t\tpreg_match_all(View::REGEX_ATTRIBUTE,$matches[1][0],$parsed_attr,PREG_SET_ORDER);\n\t\t\t$view=null;\n\t\t\t$target=null;\n\t\t\tforeach($parsed_attr as $attr)\n\t\t\t{\n\t\t\t\tswitch($attr[1])\n\t\t\t\t{\n\t\t\t\t\tcase 'view':\n\t\t\t\t\t\t$view=$attr[2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'target':\n\t\t\t\t\t\t$target=$attr[2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (preg_match('#{[^}]*}#is',$attr[2]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$key=trim(trim($attr[2],'{'),'}');\n\t\t\t\t\t\t\tif (isset($this->data[$key]))\n\t\t\t\t\t\t\t\t$this->data[$attr[1]]=$this->data[$key];\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tuser_error(\"Cannot bind to variable '$key'.\",E_USER_WARNING);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$this->data[$attr[1]]=$attr[2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($view!=null)\n\t\t\t{\n\t\t\t\t$v=new View(PATH_APP.'view/',$view);\n\t\t\t\t\n\t\t\t\t$result=$v->render($this->data,true);\n\t\t\t\t\n\t\t\t\tif (($this->layout!=null) && ($target!=null))\n\t\t\t\t{\n\t\t\t\t\t$this->layout->add_content($target,$result);\n\t\t\t\t\t$rendered=str_replace($matches[0][0],'',$rendered);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$rendered=str_replace($matches[0][0],$result,$rendered);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$rendered=str_replace($matches[0][0],'',$rendered);\n \t\t}\n \t}", "title": "" }, { "docid": "ceb3410921bcb767fea9973162c1d337", "score": "0.4689103", "text": "protected function _viewPaths() {\n\n $slug = $this->controller->request->params['named']['slug'];\n $type = $this->controller->request->params['named']['type'];\n $files = array(\n 'view_'.$slug.'.'.$this->ext,\n 'view_'.$type.'.'.$this->ext,\n 'view.'.$this->ext);\n \n return $files;\n }", "title": "" }, { "docid": "248d7e00db9b5020e282baf22f6cd181", "score": "0.46872094", "text": "abstract protected function findViewNames($schema = ''): array;", "title": "" }, { "docid": "7599a0b6d1c408105a99a44aa92b3420", "score": "0.4685092", "text": "public function find($name)\n\t{\n\t\t//echo '<br>find:';pr($name,false);\n\t\tif (isset($this->views[$name])) return $this->views[$name];\n\t\tif ($this->hasHintInformation($name = trim($name)))\n\t\t{\n\t\t\treturn $this->views[$name] = $this->findNamedPathView($name);\n\t\t}\n\n\t\treturn $this->views[$name] = $this->findInPaths($name, $this->paths);\n\t}", "title": "" }, { "docid": "3ab5053bd2396d79d8f7ead7106ac370", "score": "0.467667", "text": "public function findImports();", "title": "" }, { "docid": "0351d69cf7f5a191900ad66d341f844c", "score": "0.46534228", "text": "private static function searchView($view)\n {\n $config = LVC::get()->config;\n foreach ($config->viewPath as $path) {\n $viewPath = ((substr($path, 0, 1) == '/') ? '' : $config->appPath) . $path . '/' . $view;\n if (file_exists($viewPath)) {\n return $viewPath;\n }\n }\n return false;\n }", "title": "" }, { "docid": "0e2d12f57e5d71451a3db957e3a82b5e", "score": "0.46518064", "text": "function atrium_views_pre_build(&$view) {\n // When OG public nodes are in play it is (very) possible to get\n // duplicate rows because of the node_access() JOIN and WHERE\n // combination. This is a rather brute force method of making\n // sure this doesn't affect our Views without going through every\n // default view and setting the distinct flag.\n global $user;\n if ($user->uid != 0 && !user_access('administer nodes') && in_array($view->base_table, array('node', 'comments'), TRUE)) {\n $view->display_handler->set_option('distinct', 1);\n }\n}", "title": "" }, { "docid": "09d7e9bcb01cb83b716d60f12fff42fb", "score": "0.4651735", "text": "abstract protected function enqueueViewScripts();", "title": "" }, { "docid": "e57bb28c05aeee746eac1b2b18f3c83f", "score": "0.46410778", "text": "public function getViewtypes() {\n\t\treturn array_keys($this->getViewsData()['locations']);\n\t}", "title": "" }, { "docid": "a0d5fbc0ebb3a8bc03df482c946c53ae", "score": "0.46271452", "text": "private function generateUrlsByViews($paths) {\n if (module_exists('views')) {\n $all_views = views_get_all_views();\n foreach ($all_views as $view) {\n foreach ($view->display as $display) {\n if ($display->display_plugin == 'page') {\n $isDisabled = $view->disabled;\n if (!$isDisabled) {\n $paths[] = $display->display_options['path'];\n }\n }\n }\n }\n }\n return $paths;\n }", "title": "" }, { "docid": "88efa687e18bd74947cca703053d34de", "score": "0.46116516", "text": "public function getTemplateDirectories();", "title": "" }, { "docid": "8e79cf9522a95d180494a0b47358851e", "score": "0.46087158", "text": "function class_uses_recursive($class)\n\t{\n\t\t$result = array();\n\n\t\tforeach (array_merge(array($class => $class), class_parents($class)) as $class)\n\t\t{\n\t\t\t$result += trait_uses_recursive($class);\n\t\t}\n\n\t\treturn array_unique($result);\n\t}", "title": "" }, { "docid": "3d4f0f6118188f37a1dc710ed839b815", "score": "0.4595581", "text": "private function createViews()\n {\n foreach ($this->arrViewsToMigrate as $arrView) {\n $this->createView($arrView['Tables_in_' . $this->strMySqlDbName]);\n unset($arrView);\n }\n }", "title": "" }, { "docid": "509f71dbfae1722e961891e4d17737cb", "score": "0.45952284", "text": "function lookup_load_views() {\n\n $result = '';\n\n if(!empty($_REQUEST['viewId']))\n {\n $view_id = $_REQUEST['viewId'];\n $result = views_embed_view($view_id);\n }\n\n print $result;\n\n}", "title": "" }, { "docid": "cff06c6416992db20720861dfc7a39f3", "score": "0.45927835", "text": "function renderView(){\n\t\textract($this->variables);\n\t\t$widgets = $this->widgets;\n\n\t\t@include_once(ROOT . DS . 'application' . DS . 'views' . DS . $this->_header . '.php');\n\t\t@include_once(ROOT . DS . 'application' . DS . 'views' . DS . $this->_view . '.php');\n\t\t@include_once(ROOT . DS . 'application' . DS . 'views' . DS . $this->_footer . '.php');\n\t}", "title": "" }, { "docid": "cc190c09a0aca3ddd0dff75d4ede0ee7", "score": "0.45902216", "text": "public function viewAll() {\n\t\t$this->model->viewAll();\n\t}", "title": "" }, { "docid": "766acbdf08b25b890eab44e028011041", "score": "0.45792523", "text": "static function getView( )\n\t{\n\t\treturn self::getInstance()->__view;\n\t}", "title": "" }, { "docid": "c874a994833d04661b88fe4a1f06db17", "score": "0.4570448", "text": "public function getHierarchy()\n\t\t{\n\n\t\t\t$templates = [\n\t\t\t\t$this->constructPath(\n\t\t\t\t\t$this->object\n\t\t\t\t)\n\t\t\t];\n\n\t\t\treturn apply_filters( 'chef_sections_element_template_hierarchy', $templates );\n\t\t}", "title": "" } ]
ec1fae3cc548d2d91d67ec4c1daaea52
//////////////////////////////////////////////////////////////////////// = = = = = = = = = = FORMULAIRE NOUVEAU COMPTE = = = = = = = = = = = =// ////////////////////////////////////////////////////////////////////////
[ { "docid": "e6f1deca53b78a9b3525ce5825a73c9d", "score": "0.0", "text": "public function NewUser(Request $request, EntityManagerInterface $em)\n {\n $user = new User(); //Création d'un nouvel objet Utilisateur\n $form = $this->createForm(NewUserFormType::class, $user); //Création d'un nouvel objet formulaire agissant sur le nouvel utilisateur créé auparavant\n $form->handleRequest($request); //Attente d'une requête du formulaire, la fonction handleRequest()permet de reconnaitre si le formulaire est validé ou non (requête renvoyé au controller qui créer le formulaire)\n if($form->isSubmitted() && $form->isValid()) //Si les données du formulaire sont remplies et correctes On valide la création puis ajoute les derniers champs manquant, puis on insère dans la base de donnée\n {\n $user->setDatecreation(new \\DateTime()); //Ajout de la date de création du compte à la date actuelle\n $user->setPassword($this->passwordEncoder->encodePassword($user,$user->getNom())); //Le premier Mdp est le NOM de l'utilisateur, il faudrat le changer à la première connexion\n $em->persist($user); //On ajoute à la base de données\n $em->flush();\n // = = = = = A J O U T E R M E S S A G E C O N F I R M A T I O N C R E A T I O N C O M P T E = = = = =//\n $this->addFlash('success', 'Compte enregistré !');\n return $this->redirectToRoute('admin_UserControl'); //On retourne soit à l'acceuil ou soit sur la page Admin\n }\n return $this->render('admin/newUser.html.twig', [\n 'form' => $form->createView(),\n ]);\n }", "title": "" } ]
[ { "docid": "9bf4603e6bf53700da197b6569157709", "score": "0.5956663", "text": "public function getCvu() {\n\n\t}", "title": "" }, { "docid": "2927962fa0229f9102d1beafff541bfd", "score": "0.5920749", "text": "public function avec_valeur() {return (static::TYPE <> self::TYPE_COMPOSITE);}", "title": "" }, { "docid": "e258af28ef9755099701e55476a3a826", "score": "0.5912964", "text": "function InTrTr_Bitacora($pTipo='I'){\n/*\n global $gfValTotal;\n global $gfCosTotal;\n global $gfCanTotal; */\n global $InTrTr_comp;\n\n $alFecContab = $InTrTr_comp->com_FecContab->GetValue(); // Fecha en formato de arreglo\n $slTxt = \" E: \" . $InTrTr_comp->com_Emisor->GetValue() .\n \" R: \" . $InTrTr_comp->com_CodReceptor->GetValue() .\n \" F: \" . $alFecContab[1] . \"-\" . $alFecContab[2] . \"-\" . $alFecContab[3]. \" / RO:\" . $InTrTr_comp->com_RefOperat->GetValue();\n switch ($pTipo) {\n case \"I\":\n $slOperac = \"ING.\" ;\n break;\n case \"U\":\n $slOperac = \"MOD.\";\n break;\n case \"D\":\n $slOperac = \"ELIM.\";\n break;\n }\n $ilNumComp = ($InTrTr_comp->com_NumComp->GetValue())?$InTrTr_comp->com_NumComp->GetValue():$InTrTr_comp->ro_NumComp->GetValue();\n fRegistroBitacora(CCGetParam('com_TipoComp', ''), // Tipo Comprobante\n $ilNumComp,// Numero Comprobante\n// CCGetParam('com_RegNumero', -1), \n $_SESSION['g_user'], // Usuario\n $pAnot = $slOperac . $slTxt,\n 0,\n 0,\n 0,\n \" \" ,\n 0,\n 0);\n}", "title": "" }, { "docid": "d753d76660deb3708c37f5870ef30894", "score": "0.5811289", "text": "private function texto_maiusculo_minusculo_original(){\r\n\t\t//Define o se o SQL deve ser executado em maiusuculo ou minusculo\r\n $this->obj_conexao->bol_maiusculo_minusculo = $this->bol_maiusculo_minusculo;\r\n\t\t//Define o que o SQL e o conteúdo devem ser executados na sua forma original\r\n $this->obj_conexao->bol_maiusculo_minusculo_original = $this->bol_maiusculo_minusculo_original;\r\n\r\n\t}", "title": "" }, { "docid": "c1b9bc9bb9d9dc06ec210ba6e9e5c629", "score": "0.57535857", "text": "public function obtenerComponente() {\n if(!$this->componente) \n $this->componente=\\util::limpiarValor(\\foxtrot::esCli()?$this->parametros->componente:$this->parametros->__o);\n \n return $this->componente;\n }", "title": "" }, { "docid": "86ce899f4ac4509b8d768fc7074b4f04", "score": "0.5750288", "text": "public function czekaj() {}", "title": "" }, { "docid": "dd5c03818101b23a0adb8ccde3668608", "score": "0.5718226", "text": "function fix_comp_1_1_5() {\r\n }", "title": "" }, { "docid": "47e3c69954c54eb3dc3fd39a85604ccb", "score": "0.5673284", "text": "public function getCohumulone();", "title": "" }, { "docid": "784a1d05ff07e292eb27f178f5745fa4", "score": "0.55227417", "text": "abstract public function vaziuoti();", "title": "" }, { "docid": "cdae7a322b5be41eade38c73fb8e78fd", "score": "0.55099416", "text": "function Inicial() {\n extract($GLOBALS);\n Global $w_Disabled;\n $w_chave = $_REQUEST['w_chave'];\n $w_copia = $_REQUEST['w_copia'];\n $w_tipo = $_REQUEST['w_tipo'];\n $w_tipo_material = $_REQUEST['w_tipo_material'];\n \n // Configuração do nível de acesso\n $w_restricao = 'EDICAOT';\n if ($p_acesso=='I') $w_restricao = 'EDICAOP';\n\n if ($w_troca>'' && $O <> 'E') {\n $w_sqcc = $_REQUEST['w_sqcc'];\n $w_projeto = $_REQUEST['w_projeto'];\n $w_almoxarifado = $_REQUEST['w_almoxarifado'];\n $w_unidade = $_REQUEST['w_unidade'];\n $w_localizacao = $_REQUEST['w_localizacao'];\n $w_rgp = $_REQUEST['w_rgp'];\n $w_entrada = $_REQUEST['w_entrada'];\n $w_forn_garantia = $_REQUEST['w_forn_garantia'];\n $w_fim_garantia = $_REQUEST['w_fim_garantia'];\n $w_tombamento = formataDataEdicao($_REQUEST['w_tombamento']);\n $w_vida_util = $_REQUEST['w_vida_util'];\n $w_descricao = $_REQUEST['w_descricao'];\n $w_observacao = $_REQUEST['w_observacao'];\n $w_tipo_material = $_REQUEST['w_tipo_material'];\n $w_material = $_REQUEST['w_material'];\n $w_situacao = $_REQUEST['w_situacao'];\n $w_codigo_externo = $_REQUEST['w_codigo_externo'];\n $w_marca = $_REQUEST['w_marca'];\n $w_modelo = $_REQUEST['w_modelo'];\n $w_numero_serie = $_REQUEST['w_numero_serie'];\n $w_valor_brl = formatNumber($_REQUEST['w_valor_brl']);\n $w_data_brl = FormataDataEdicao($_REQUEST['w_data_brl']);\n $w_valor_usd = formatNumber($_REQUEST['w_valor_usd']);\n $w_data_usd = FormataDataEdicao($_REQUEST['w_data_usd']);\n $w_valor_eur = formatNumber($_REQUEST['w_valor_eur']);\n $w_data_eur = FormataDataEdicao($_REQUEST['w_data_eur']);\n $w_ativo = $_REQUEST['w_ativo'];\n }\n\n if ($w_tipo=='WORD') {\n HeaderWord($_REQUEST['orientacao']); \n } else {\n Cabecalho();\n head();\n Estrutura_CSS($w_cliente);\n ShowHTML('<TITLE>'.$conSgSistema.' - Materiais e Serviços</TITLE>');\n Estrutura_CSS($w_cliente);\n if (strpos('PCIAE',$O)!==false) {\n ScriptOpen('JavaScript');\n CheckBranco();\n FormataData();\n FormataValor();\n SaltaCampo();\n ValidateOpen('Validacao');\n Validate('p_rgp','RGP Atual','1','','1','18','','0123456789');\n Validate('p_material','Bem','1','','2','90','1','1');\n Validate('p_financeiro','Código interno','1','','2','30','1','1');\n Validate('p_projeto','Projeto','SELECT','','1','18','','1');\n Validate('p_descricao','Descrição complementar','','','2','2000','1','1');\n Validate('p_marca','Marca','','',1,50,'1','1');\n Validate('p_modelo','Modelo','','',1,50,'1','1');\n Validate('p_observacao','Observação','','',1,2000,'1','1');\n Validate('p_codigo_externo','Código externo','','',1,30,'1','1');\n Validate('p_inicio','Início do período', 'DATA', '', '10', '10', '', '0123456789/');\n Validate('p_fim','Fim do período', 'DATA', '', '10', '10', '', '0123456789/');\n ShowHTML(' if ((theForm.p_inicio.value != \\'\\' && theForm.p_fim.value == \\'\\') || (theForm.p_inicio.value == \\'\\' && theForm.p_fim.value != \\'\\')) {');\n ShowHTML(' alert (\\'Informe ambas as datas ou nenhuma delas!\\');');\n ShowHTML(' theForm.p_inicio.focus();');\n ShowHTML(' return false;');\n ShowHTML(' }');\n CompData('p_inicio','Início do período','<=','p_fim','Fim do período');\n ValidateClose();\n ScriptClose();\n } \n \n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\n ShowHTML('</HEAD>');\n }\n if ($w_troca>'') {\n BodyOpen('onLoad=\"document.Form.'.$w_troca.'.focus();\"');\n } elseif ($w_tipo=='WORD'){\n BodyOpenWord(null);\n } elseif ($O=='P'){\n BodyOpen('onLoad=\"document.Form.p_rgp.focus();\"');\n } elseif ($O=='L'){\n BodyOpen('onLoad=\"this.focus();\"');\n } else {\n BodyOpen('onLoad=\"document.Form.w_assinatura.focus();\"');\n } \n Estrutura_Topo_Limpo();\n Estrutura_Menu();\n Estrutura_Corpo_Abre();\n Estrutura_Texto_Abre();\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td><div align=\"justify\">Informe nos campos abaixo os valores que deseja filtrar e clique sobre o botão <i>Aplicar filtro</i>. Clicando sobre o botão <i>Remover filtro</i>, o filtro existente será apagado.</div><hr>');\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td valign=\"top\"><table border=0 width=\"90%\" cellspacing=0>');\n if ($SG=='MTRELBX') $rel = 'baixados';\n else $rel = 'detDesp';\n AbreForm('Form',$w_dir.$w_pagina.$rel,'POST','return(Validacao(this));','Baixa',$P1,'',$P3,null,$TP,$SG,$R,'L');\n ShowHTML(montaFiltro('POST',true));\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\n ShowHTML(' <tr><td colspan=2><table border=0 width=\"100%\" cellspacing=0><tr valign=\"top\">');\n ShowHTML(' <tr valign=\"top\">');\n ShowHTML(' <td><b><u>R</u>GP Atual:</b><br><input '.$p_Disabled.' accesskey=\"R\" type=\"text\" name=\"p_rgp\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"18\" VALUE=\"'.$p_rgp.'\"></td>');\n ShowHTML(' <td><b><u>B</u>em:</b><br><input '.$p_Disabled.' accesskey=\"B\" type=\"text\" name=\"p_material\" class=\"sti\" SIZE=\"40\" MAXLENGTH=\"40\" VALUE=\"'.$p_material.'\"></td>');\n ShowHTML(' <td><b><u>C</u>ódigo do lançamento financeiro:</b><br><input '.$p_Disabled.' accesskey=\"C\" type=\"text\" name=\"p_financeiro\" class=\"sti\" SIZE=\"20\" MAXLENGTH=\"30\" VALUE=\"'.$p_financeiro.'\"></td>');\n\n ShowHTML(' <tr>');\n SelecaoEndereco('En<u>d</u>ereço principal:','d',null,$p_endereco,$w_cliente,'p_endereco','FISICO', 'onChange=\"document.Form.target=\\'\\'; document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'p_endereco\\'; document.Form.submit();\"', 3);\n ShowHTML(' </tr>');\n\n ShowHTML(' <tr valign=\"top\">');\n selecaoalmoxarifado('Al<u>m</u>oxarifado:','M', 'Selecione o almoxarifado ao qual o bem pertence.', $p_almoxarifado,'p_almoxarifado',null,null);\n\n ShowHTML(' <tr valign=\"top\">');\n SelecaoUnidade('<U>U</U>nidade solicitante:','U','Selecione a unidade solicitante do pedido',$p_unidade,$p_endereco,'p_unidade','MOD_MT','onChange=\"document.Form.target=\\'\\'; document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'p_unidade\\'; document.Form.submit();\"', 3);\n\n ShowHTML(' <tr>');\n selecaoLocalizacao('Lo<U>c</U>alização:','C',null,$p_localizacao,$p_unidade,'p_localizacao',null,null,3);\n ShowHTML(' </tr>');\n\n ShowHTML(' <tr valign=\"top\">');\n selecaoTipoMatServ('T<U>i</U>po de material:','I',null,$p_tipo_material,null,'p_tipo_material','FOLHAPER',null,3);\n\n ShowHTML(' <tr>');\n $sql = new db_getLinkData; $RS1 = $sql->getInstanceOf($dbms,$w_cliente,'PJCAD');\n SelecaoSolic('Projeto:',null,null,$w_cliente,$p_projeto,$w_sq_menu_relac,f($RS1,'sq_menu'),'p_projeto',f($RS_Menu,'sigla'),null,$p_projeto,'<BR />',3);\n ShowHTML(' <tr valign=\"top\">');\n ShowHTML(' <td><b><u>M</u>arca:</b><br><input accesskey=\"M\" type=\"text\" name=\"p_marca\" class=\"sti\" SIZE=\"25\" MAXLENGTH=\"50\" VALUE=\"'.$p_marca.'\"></td>');\n ShowHTML(' <td><b><u>M</u>odelo:</b><br><input accesskey=\"M\" type=\"text\" name=\"p_modelo\" class=\"sti\" SIZE=\"25\" MAXLENGTH=\"50\" VALUE=\"'.$p_modelo.'\"></td>');\n selecaoMtSituacao('<u>S</u>ituação física:','S', null, $p_situacao,'p_situacao','BEM',null);\n ShowHTML(' <tr valign=\"top\">');\n ShowHTML(' <td><b><U>D</U>escrição complementar:<br><input accesskey=\"M\" type=\"text\" name=\"p_descricao\" class=\"sti\" SIZE=\"25\" MAXLENGTH=\"50\" VALUE=\"'.$p_descricao.'\"></td>');\n ShowHTML(' <td><b><U>O</U>bservação:<br><input accesskey=\"M\" type=\"text\" name=\"p_observacao\" class=\"sti\" SIZE=\"25\" MAXLENGTH=\"50\" VALUE=\"'.$p_observacao.'\"></td>');\n ShowHTML(' <td><b><u>C</u>ódigo externo:</b><br><input accesskey=\"C\" type=\"text\" name=\"p_codigo_externo\" class=\"sti\" SIZE=\"25\" MAXLENGTH=\"30\" VALUE=\"'.$p_codigo_externo.'\"></td>');\n ShowHTML(' <tr><td colspan=\"3\" valign=\"top\"><b><u>P</u>eríodo:</b><br><input '.$w_Disabled.' accesskey=\"P\" type=\"text\" name=\"p_inicio\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$p_inicio.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">'.ExibeCalendario('Form','p_inicio').' e <input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"p_fim\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$p_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">'.ExibeCalendario('Form','p_fim').' ');\n\n ShowHTML(' <tr valign=\"top\">');\n ShowHTML(' <td><b><U>L</U>inhas por página:<br><INPUT ACCESSKEY=\"L\" '.$w_Disabled.' class=\"sti\" type=\"text\" name=\"P4\" size=\"4\" maxlength=\"4\" value=\"'.$P4.'\"></td></tr>');\n ShowHTML(' </table>');\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\">');\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Exibir\">');\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\'' . montaURL_JS($w_dir, $w_pagina . $par . '&R=' . $R . '&P1=' . $P1 . '&P2=' . $P2 . '&P3=' . $P3 . '&P4=' . $P4 . '&TP=' . $TP . '&O=P&SG=' . $SG) . '\\';\" name=\"Botao\" value=\"Limpar campos\">');\n ShowHTML(' </td>');\n ShowHTML(' </tr>');\n ShowHTML(' </table>');\n ShowHTML(' </TD>');\n ShowHTML('</tr>');\n ShowHTML('</FORM>');\n ShowHTML(' </table>');\n ShowHTML(' </TD>');\n ShowHTML('</tr>');\n ShowHTML('</table>');\n ShowHTML('</center>');\n}", "title": "" }, { "docid": "7d0dc110c217e3ecf6d0dbb06f3fa693", "score": "0.54754114", "text": "protected function algumaCoisa() {\n\n\t}", "title": "" }, { "docid": "4362840b0366e17e4092ae6dc191e8d0", "score": "0.5421205", "text": "public function compute_convois() {\n\t\tif($_GET['mode'] == 'zzzelp') {\n\t\t\t$this->complet = true;\n\t\t\t$this->unserialize_dataConvoisZzzelp();\n\t\t\t$this->parametres_convois['duree_repartition'] = ($this->parametres_convois['duree_repartition'] == 1) ? 336 : 48;\n\t\t\t$this->get_Recoltes();\n\t\t\tif($this->parametres_convois['formule_repartition'] == 1) {\n\t\t\t\t$this->compute_ftdp();\n\t\t\t}\n\t\t}\n\t\telseif($_GET['mode'] == 'externe') {\n\t\t\t$this->unserialize_dataConvoisExterne();\n\t\t}\n\t\t$this->get_Multis();\n\t\t$this->optimisation = new OptimisationDistances($this);\n\t\t$this->optimisation->optimise_distances();\n\t\t$convoyeurs = $this->sort_Convois();\n\t\t$this->nom_duree = ($this->parametres_convois['duree_repartition'] == 336) ? 'semaine' : 'jour';\n\t\t$this->create_Message();\n\t\t$this->create_Interface();\n\t}", "title": "" }, { "docid": "5ef7f39f4471fe5ba361db9c723e43a8", "score": "0.5403544", "text": "function lancarCupom($transacaoid,$evoid,$Item_desc,$code,$evento_id) {\n\n\t\t//CHAMA O SERVIÇO DO EVO\n\n\t\t$params = array( \n\t\t\t'IdClienteW12' => 229,\n\t\t\t'IdTransacao'=> $transacaoid,\n\t\t\t'IdCliente'=> $evoid,\n\t\t\t'NomeProduto'=> $Item_desc.' '.$code ,\n\t\t\t'Descricao'=> $evento_id,\n\t\t\t'Valor'=> 0,\n\t\t\t'FreteValor'=> 0,\n\t\t);\n\n\t\ttry {\n\n\t\t\t$client = new SoapClient(\"http://177.154.134.90:8084/WCF/_BS/wcfBS.svc?wsdl\" ,array('cache_wsdl'=>WSDL_CACHE_NONE)); \n\t\t\t$webService = $client->TratarEvento($params); \n\t\t\t$result = $webService->TratarEventoResult ;\n\t\t\t\n\t\t\t\t$thefile = 'parametros_cupom_evo.log' ;\n\t\t\t\t$msg = date('Y-m-d H:i:s').\"\\n\" ;\n\t\t\t\t$msg .= print_r($params,true) ;\n\t\t\t\tfile_put_contents ($thefile, $msg, FILE_APPEND | LOCK_EX);\n\t\t\t$result = substr($result,0,1);\n\t\t\tif($result== '0'){\n\t\t\t\t$ret = array(true,'Boleto Inserido com Sucesso');\n\n\t\t\t} else {\n\t\t\t\t$ret = array(false,$result) ;\n\t\t\t\t$thefile = 'erros_envio_lista_presenca_treinamento.log' ;\n\t\t\t\t$msg = date('Y-m-d H:i:s').' ----> TRANSACAO ID:'.$transacaoid.' | ID_CLIENTE:'.$evoid.' | MENSAGEM EVO:'.$result ;\n\t\t\t\tfile_put_contents ($thefile, $msg, FILE_APPEND | LOCK_EX);\n\t\t\t}\n\n\n\t\t} catch (Exception $e) {\n\t\t\t$msg = time().' - '.$e->getMessage();\n\t\t\t$thefile = 'erros_envio_lista_presenca_treinamento.log' ;\n\t\t\t//$msg = date('Y-m-d H:i:s').' ----> TRANSACAO ID:'.$transacaoid.' | ID_CLIENTE:'.$evoid.' | MENSAGEM EVO:'.$webService ;\n\t\t\tfile_put_contents ($thefile, $msg, FILE_APPEND | LOCK_EX);\n\t\t\t$ret = array(false,$msg) ;\n\t\t} \n\t\treturn $ret ;\n\t}", "title": "" }, { "docid": "ee4be5fa036f16ef310c1f8878d34a55", "score": "0.5395342", "text": "static public function ctrEliminarCompras(){\n\n\t\tif(isset($_GET[\"idCompra\"])){\n\n\t\t\t$tabla = \"compras\";\n\t\t\t$tablaProveedores = \"proveedores\";\n\t\t\t$item = \"id\";\n\n\t\t\t$valor = $_GET[\"idCompra\"];\n\n\t\t\t$traerCompra = ModeloCompras::mdlMostrarCompras($tabla, $item,$valor);\n\n\t\t\t/*=============================\n\t\t\t\tActualizar Fecha ultima Compra\n\t\t\t==============================*/\n\n\t\t\t$itemCompras = null;\n\t\t\t$valorCompras = null;\n\n\t\t\t$traerCompras = ModeloCompras::mdlMostrarCompras($tabla, $itemCompras,$valorCompras);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\n\n\t\t\t\tif($value[\"id_proveedor\"] == $traerCompras[\"id_proveedor\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//var_dump(count($guardarFechas));\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerCompras[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item =\"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdProveedores = $traerCompras[\"id_proveedor\"];\n\n\t\t\t\t\t$comprasProveedores = ModeloProveedores::mdlActualizarProveedores($tablaProveedores, $item,$valor,$valorIdProveedores);\n\t\t\t\t}else{\n\n\t\t\t\t\t$item =\"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdProveedor = $traerCompras[\"id_proveedor\"];\n\n\t\t\t\t\t$comprasProveedor = ModeloProveedores::mdlActualizarProveedores($tablaProveedores, $item,$valor,$valorIdProveedor);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$item =\"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdProveedor = $traerCompras[\"id_proveedor\"];\n\n\t\t\t\t$comprasProveedor = ModeloProveedores::mdlActualizarProveedores($tablaProveedores, $item,$valor,$valorIdProveedor);\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerCompras[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProductos($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProductos($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaProveedores = \"proveedores\";\n\n\t\t\t$itemProveedor = \"id\";\n\t\t\t$valorProveedor = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaProveedores, $itemProveedor, $valorProveedor);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerProveedor[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasProveedores = ModeloProveedores::mdlActualizarProveedores($tablaProveedores, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n//$respuesta=\"\";\n\t\t\t$respuesta = ModeloCompras::mdlEliminarCompras($tabla, $_GET[\"idCompra\"]);\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 compra 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 closeOnConfirm: false\n\t\t\t\t\t }).then((result) => {\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"compras\";\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\n\t\t\t\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "e129fc947e1c3bc087e9ad18c7da3819", "score": "0.5385663", "text": "private function metragemCubicaCobrada() {\n\n $iConsumoCobrado = 0;\n foreach ($this->aLeiturasMensuradas as $iConsumo) {\n $iConsumoCobrado += $iConsumo;\n }\n\n $this->iMetragemCubicaCobrada = $iConsumoCobrado;\n }", "title": "" }, { "docid": "e123c69e1f5bd8d3ed85371e7a5162c3", "score": "0.53811187", "text": "public function getFornecedorComplemento()\n {\n return $this->fornecedor_complemento;\n }", "title": "" }, { "docid": "8bcfedeedcf6de0b60c51fcc07c51bbd", "score": "0.53579164", "text": "static public function ctrCalcularComprobacion(){\r\n\t\t$tabla = \"banco3450\";\r\n\r\n\t\t$respuesta = ModeloBanco3450::mdlCalcularComprobacion($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "title": "" }, { "docid": "4e4691815fb6c13f8aea3a0fc212ddf3", "score": "0.5354545", "text": "function fContabiliza2(&$db, &$rs, $pGlosa, $pPrev=false, $pGenCh=true ) {\n global $ilNumProces;\n global $ilEstadoProc;\n global $ilSemana;\n global $ilPeriodo;\n global $dlFecCierre;\n global $slUsuario;\n global $ilNumCompro;\n global $ilNumCheque;\n global $ilUltimoProd;\n global $agPla; // Plantilla de Cuentas\n\n if ($rs->RecordCount() < 1) {\n echo \" ----- NO EXISTE LIQUIDACIONES PARA PROCESAR ---</td></tr><tr><td>\";\n return false;\n }\n if ($pGenCh) $ilNumChq = fGetParam('pChq', false);\n else $ilNumChq = 0;\n $ilPxmoCom = fGetParam('pCom', false);\n $ilChqFlag = false; // Bandera indicadora d emision de cheques\n $ilComFlag = false; // Bandera indicadora d emision de comprobantes\n if ($ilNumChq && intval($ilNumChq > 0)) $ilChqFlag = true;\n if ($ilPxmoCom && intval($ilPxmoCom > 0)) $ilComFlag = true;\n $ilUltimoProd = false;\n $ilLiqNumero = false;\n $lastrec=array();\n $fSuma = 0;\n $fNum= 0;\n $lastrec['det_estlibros'] = 0;\n// rs2html($rs,'border=2 cellpadding=3');\n $ilRegnumero = 0;\n while (!$rs->EOF) {\n $rsdat = $rs->GetRowAssoc();\n $fNum+=1;\n $rsdat = array_change_key_case($rsdat, CASE_LOWER);\n $lastrec['det_feclibros'] = '2020-12-31'; // Fecha futura de proceso en el banco\n if($ilUltimoProd != $rsdat['com_productor'] ) { // Al cambio de productor:\n $lastrec['det_glosa'] = $pGlosa;\n if ($fSuma <> 0) {\n if ($ilChqFlag) {// Para regstro del nro de cheque\n $lastrec['det_numcheque'] = $ilNumChq;\n $ilNumChq += 1;\n }\n $lastrec['det_idauxiliar'] = $ilUltimoProd;\n $lastrec['det_secuencia'] = $fNum + 1;\n $lastrec['det_regnumero'] = $ilRegNumero;\n $lastrec['det_numcomp'] = $ilNumComp;\n $lastrec['det_glosa'] = $pGlosa;\n $lastrec['det_codcuenta'] = $agPla['CCI'];\n $lastrec['det_valdebito'] = -$fSuma;\n $lastrec['det_valcredito'] = 0;\n fCierraComprob($db, $fSuma, $lastrec);\n\n }\n $ilUltimoProd = $rsdat['com_productor'];\n $fSuma = 0;\n $fNum=1;\n // Inserta un nuevo comprobnate\n // fBloquea($db, \"concomprobantes\");\n $lastrec=$rsdat;\n $slProductor = fDBValor($db, 'conpersonas', \"concat(per_Apellidos, ' ' , per_Nombres)\", \"per_codAuxiliar = \" . $lastrec['det_idauxiliar'] );\n if (!$ilComFlag) // Definir si el Nro Comp es autosecuencia o viene como param\n $ilNumComp = NZ(fDBValor($db, 'concomprobantes', 'MAX(com_numcomp)', \"com_tipocomp = '\" .$lastrec['det_tipocomp']. \"'\"),0) + 1 ;\n else {\n $ilNumComp = $ilPxmoCom;\n $ilPxmoCom += 1;\n }\n $ilAux = AplicaAuxil($lastrec['cue_reqauxiliar'], $lastrec['cue_tipauxiliar'], $lastrec['det_idauxiliar'], $ilUltimoProd);\n $l = strlen($slProductor);\n $p = 60 - $l;\n// echo str_pad(' ', 40*6, '&nbsp;') . $slProductor . str_repeat('&nbsp;',$p) . $lastrec['det_tipocomp'] . \" - \" . $ilNumComp . \" Cheque: \" . ($ilNumChq ) . \"<br>\";\n echo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . $slProductor . \"</td><td>\" . $lastrec['det_tipocomp'] . \" - \" . $ilNumComp . \"</td><td> Cheque: \" . ($ilNumChq ) . \"</td></tr><tr><td>\";\n\n if (!fAgregaComprobante($db, $lastrec['det_tipocomp'], $ilNumComp, 0, $rsdat['det_feccontab'], $rsdat['det_feccontab'],\n $rsdat['det_feccontab'], $ilAux, $rsdat['det_idauxiliar'], $slProductor,\n $pGlosa . \" (liq # \" . $lastrec['det_numcomp'] . \")\",\n 0, 1, 9999, 0, $ilSemana, 5, 1, $ilNumProces,\n 593, $slUsuario, $ilPeriodo, date(\"Y-m-d\")))\n fErrorPage('',\"NO SE PUDO GRABAR EL COMPROBANTE \" . $lastrec['det_tipocomp'] . \"-\" . $ilNumComp);\n $ilRegNumero = $db->Insert_ID();\n fDesBloquea($db, \"concomprobantes\");\n $slSql = \"REPLACE INTO conenlace(enl_tipo, enl_ID, enl_opCode, enl_secuencia, enl_tipocomp, enl_numcomp, enl_usuario)\n VALUES ('LQ',\" . $lastrec['det_numcomp']. \",\" . $ilEstadoProc . \",\" . 0 . \",'\" .\n $lastrec['det_tipocomp'] . \"',\" . $ilNumComp . \",'\". $slUsuario .\"')\";\n if (!$db->Execute($slSql)) fErrorPage('',\"NO SE PUDO GRABAR EL ENLACE \" . $lastrec['det_numcomp'] . \"-\" . $ilNumComp);\n $fSuma = 0;\n//\n if (($rsdat['tmp_liqtotal'] <> 0) && $pPrev) {// Viene un acumulado previo (ej: caso Cheque Voucher)\n $lastrec=$rsdat;\n $lastrec['det_regnumero'] = $ilRegNumero;\n $fNum=+1;\n $lastrec['det_secuencia'] =$fNum;\n $fNum=+1;\n $lastrec['det_codcuenta'] = $agPla['CAP'];\n $lastrec['det_valdebito'] = $lastrec['tmp_liqtotal'];\n $lastrec['det_valcredito'] = 0;\n $lastrec['det_glosa'] = \"Total\";\n $lastrec['det_idauxiliar'] = AplicaAuxil(true, $agPla['TAP'], $agPla['AAP'], $ilUltimoProd);\n if (!fInsDetalleCont($db, $lastrec))\n fErrorPage('',\"NO SE PUDO GRABAR EL DETALLE DE COMPROBANTE: \" . $lastrec['det_tipocomp'] . \"-\" . $ilNumComp) . \"-\" . $lastrec['det_secuencia'] ;\n $fSuma +=$lastrec['tmp_liqtotal'];\n }\n }\n unset($lastrec);\n $fNum +=1;\n $rsdat['det_secuencia'] = $fNum;\n $rsdat['det_regnumero'] = $ilRegNumero;\n $rsdat['det_numcomp'] = $ilNumComp;\n $rsdat['det_glosa'] = $pGlosa;\n $lastrec=$rsdat;\n if ($rsdat['det_codcuenta'] == ''){\n $rsdat['det_codcuenta']=$agPla['CAP'];\n }\n if (!$rsdat['cue_reqauxiliar']) $rsdat['det_idauxiliar'] = 0;\n $fSuma += $rsdat['det_valdebito'] - $rsdat['det_valcredito'];\n $rsdat['det_idauxiliar'] = AplicaAuxil($rsdat['cue_reqauxiliar'], $rsdat['cue_tipauxiliar'], $rsdat['det_idauxiliar'], $lastrec['det_idauxiliar']);;\n if(!fInsDetalleCont($db, $rsdat))\n fErrorPage('',\"NO SE PUDO GRABAR EL DETALLE DE COMPROBANTE: \" . $lastrec['det_tipocomp'] . \"-\" . $ilNumComp) . \"-\" . $lastrec['det_secuencia'] ;\n $finalrec = $lastrec;\n $rs->MoveNext();\n }\n if ($fSuma <> 0) {\n $lastrec=$finalrec;\n if ($ilChqFlag) {// Para regstro del nro de cheque\n $lastrec['det_numcheque'] = $ilNumChq;\n\t\t$lastrec['det_feccheque'] = '2020-12-31';\n }\n $lastrec['det_secuencia'] = $fNum + 1;\n $lastrec['det_regnumero'] = $ilRegNumero;\n $lastrec['det_numcomp'] = $ilNumComp;\n $lastrec['det_glosa'] = $pGlosa;\n $lastrec['det_codcuenta'] = $agPla['CCI'];\n $lastrec['det_valdebito'] = -$fSuma;\n $lastrec['det_valcredito'] = 0;\n fCierraComprob($db, $fSuma, $lastrec);\n }\n return true;\n}", "title": "" }, { "docid": "80cec6f2903b629fc4ceb8cd062e94b2", "score": "0.5315597", "text": "function getResultadoAcao(){\n\t\t\tif( $this->getboleto_registrado()->gettipo() == 'mensalidade' )\n\t\t\t\treturn '1.2';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'avulso' )\n\t\t\t\treturn '9.3';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'certificado' )\n\t\t\t\treturn '10.1';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'ComplementarPremium' )\n\t\t\t\treturn '7.1';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'Gfip_GPS' )\n\t\t\t\treturn '8.2';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'Simples_DAS' )\n\t\t\t\treturn '8.3';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'Defis' )\n\t\t\t\treturn '8.4';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'Rais_negativa' )\n\t\t\t\treturn '8.5';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'Dirf' )\n\t\t\t\treturn '8.6';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'F_empresa' )\n\t\t\t\treturn '8.7';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'F_sociedade' )\n\t\t\t\treturn '8.8';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'MEI-ME' )\n\t\t\t\treturn '8.9';\t\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'CPOM' )\n\t\t\t\treturn '9.0';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'A_empresa' )\n\t\t\t\treturn '9.4';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'A_sociedade' )\n\t\t\t\treturn '9.5';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'decore' )\n\t\t\t\treturn '9.6';\t\t\t\t\t\t\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'DBE' )\n\t\t\t\treturn '9.7';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'funcionario_C_D' )\n\t\t\t\treturn '9.8';\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'regularizacao_emp' )\n\t\t\t\treturn '11.0';\t\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'servico_geral' )\n\t\t\t\treturn '11.1';\t\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'DCTF' )\n\t\t\t\treturn '11.2';\t\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'DeSTDA' )\n\t\t\t\treturn '11.3';\t\n\t\t\telse if( $this->getboleto_registrado()->gettipo() == 'IRPF' )\n\t\t\t\treturn '11.4';\t\n\t\t}", "title": "" }, { "docid": "8cca96de301587fcf487020bfd43c86a", "score": "0.53127253", "text": "function comprobarCabinaDuplicada() {\n\t\tif($this->id_componente == NULL) {\n\t\t\t$consulta = sprintf(\"select id_componente from componentes where nombre=%s and version=%s and activo=1 and id_tipo=1\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t$this->makeValue($this->version, \"float\"));\n\t\t} \n\t\telse {\n\t\t\t$consulta = sprintf(\"select id_componente from componentes where nombre=%s and version=%s and activo=1 and id_tipo=1 and id_componente<>%s\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t$this->makeValue($this->version, \"float\"),\n\t\t\t\t$this->makeValue($this->id_componente, \"int\"));\n\t\t}\n\t\t$this->setConsulta($consulta);\n\t\t$this->ejecutarConsulta();\n\t\tif($this->getNumeroFilas() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "60885d6a4df5654d8662ab862595f4a9", "score": "0.5303651", "text": "function ciag_modifier_grpauteurs_de_rubrique($grpauteurs,$id_rubrique,$ctrl_concurrent=false,$image_avant='') {\n\t$return = true;\n\t$id_rubrique = intval($id_rubrique);\n\t$grpauteurs = ciag_securise($grpauteurs,\"array_intval\");\n\t\n\t\t\n\tif ($id_rubrique>0) {\n\n\t\t// si rubrique EC, verifier droit de gerer cet EC\n\t\tif (defined('_DIR_PLUGIN_CIAR')){\n\t\t\tinclude_spip('ciar_fonctions');\n\t\t\tif (ciar_rub_ec($id_rubrique)) {\n\t\t\t\tif (!autoriser('ecmodifier','rubrique',$id_rubrique))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$insertgrpauteurs = array();\n\t\t$deletegrpauteurs = array();\n\t\t$oldgrpauteurs = array();\n\t\t\t\t\t\n\t\t// groupes de cette rubrique memorises dans la base\n\t\t$oldgrpauteurs = ciag_liste_grpauteurs_de_rubrique($id_rubrique);\n\n\t\t// Prévention des accès concurents\n\t\tif ($ctrl_concurrent)\n\t\t\t$concurrent = ciag_acces_concurrents($image_avant,$oldgrpauteurs);\n\t\telse\n\t\t\t$concurrent = false;\n\t\t\n\t\n\t\tif (!$concurrent) {\n\t\n\t\t\t$insertgrpauteurs = ciag_a_inserer($grpauteurs,$oldgrpauteurs);\n\t\t\t$deletegrpauteurs = ciag_a_supprimer($grpauteurs,$oldgrpauteurs);\n\n\t\t\tif ($insertgrpauteurs) {\n\t\t\t\tforeach ($insertgrpauteurs as $insertgrpauteur) {\n\t\t\t\t\tsql_insertq('spip_ciag_grpauteurs_rubriques', array('id_rubrique' => $id_rubrique, 'id_groupe' => $insertgrpauteur));\n\t\t\t\t}\n\t\t\t\tciag_denormaliser_ajout_grpauteurs_a_rubrique($insertgrpauteurs,$id_rubrique);\n\t\t\t}\n\t\t\t\n\t\t\tif ($deletegrpauteurs) {\n\t\t\t\t$in = sql_in('id_groupe',$deletegrpauteurs);\n\t\t\t\tsql_delete(\"spip_ciag_grpauteurs_rubriques\", $in.\" AND id_rubrique=\".$id_rubrique);\n\t\t\t\tciag_denormaliser_retrait_grpauteurs_a_rubrique($deletegrpauteurs,$id_rubrique);\n\t\t\t}\n\t\t\t\n\t\t\t// cas ou une fille de la rubrique etait affectee a un des groupes d'auteurs\n\t\t\tciag_supprimer_grpauteurs_rubriques_filles($id_rubrique,$insertgrpauteurs);\n\t\t\t\n\t\t} else {\n\t\t\t$return = false;\n\t\t}\t\t\t\n\t\t \n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "d48dab157d72d9dbf8863c429d3b6d77", "score": "0.53028935", "text": "function eliminarClaseComprobante(){\n\t\t$this->procedimiento='conta.ft_clase_comprobante_ime';\n\t\t$this->transaccion='CONTA_CCOM_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_clase_comprobante','id_clase_comprobante','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": "41646b8a4c5c0471595c7ac879a91908", "score": "0.5299224", "text": "public function getCompte()\n {\n return $this->compte;\n }", "title": "" }, { "docid": "d9f3483b2b49af31d4f8f90c9660194c", "score": "0.5295285", "text": "function Actualiza_Datos_Contrato($contrato,$cuinew,$contradpi,$contratipodpi,$contranombre,$contraapellido,$contrafecnac,$contraparentesco,$contraecivil,$contranacionalidad,$contramail,$contratelcasa,$contracelular,$contradireccion,$contradepartamento,$contramunicipio,$contratrabajo,$contrateltrabajo,$contraprofesion){\n $respuesta = new xajaxResponse();\n $ClsIns = new ClsInscripcion();\n\tif($cuinew != \"\"){\n\t\t//limpia cadena\n\t\t\t$contranombre = trim($contranombre);\n\t\t\t$contraapellido = trim($contraapellido);\n\t\t\t$contranacionalidad = trim($contranacionalidad);\n\t\t\t$contradireccion = trim($contradireccion);\n\t\t\t$contratrabajo = trim($contratrabajo);\n\t\t\t$contraprofesion = trim($contraprofesion);\n\t\t//--------\n\t\t//decodificaciones de tildes y Ñ's\n\t\t\t$contranombre = utf8_encode($contranombre);\n\t\t\t$contraapellido = utf8_encode($contraapellido);\n\t\t\t$contranacionalidad = utf8_encode($contranacionalidad);\n\t\t\t$contradireccion = utf8_encode($contradireccion);\n\t\t\t$contratrabajo = utf8_encode($contratrabajo);\n\t\t\t$contraprofesion = utf8_encode($contraprofesion);\n\t\t//--\n\t\t\t$nombre = utf8_decode($nombre);\n\t\t\t$apellido = utf8_decode($apellido);\n\t\t\t$alergico = utf8_decode($alergico);\n\t\t\t$emergencia = utf8_decode($emergencia);\n\t\t\t$contranombre = utf8_decode($contranombre);\n\t\t\t$contraapellido = utf8_decode($contraapellido);\n\t\t\t$contranacionalidad = utf8_decode($contranacionalidad);\n\t\t\t$contradireccion = utf8_decode($contradireccion);\n\t\t\t$contratrabajo = utf8_decode($contratrabajo);\n\t\t\t$contraprofesion = utf8_decode($contraprofesion);\n\t\t//--------\n\t\t\t\n $sql = $ClsIns->update_status($contrato,$cuinew,$contradpi,$contratipodpi,$contranombre,$contraapellido,$contrafecnac,$contraparentesco,$contraecivil,$contranacionalidad,$contramail,$contratelcasa,$contracelular,$contradireccion,$contradepartamento,$contramunicipio,$contratrabajo,$contrateltrabajo,$contraprofesion); /// Modificar; \n\t\t\t\n //// ejecuta SQL\n\t\t$rs = $ClsIns->exec_sql($sql);\n\t\t//$respuesta->alert(\"$sql\");\n\t\tif($rs == 1){\n\t\t\t$respuesta->script('swal(\"Excelente\", \"La informac\\u00F3n fue corregida con exito!\", \"success\").then((value)=>{ window.location.reload(); });');\n\t\t}else{\n\t\t\t$respuesta->script('swal(\"Error\", \"Error en la transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n\t\t}\n\t}\n\t\n return $respuesta;\n}", "title": "" }, { "docid": "6dc5e0e4044723b99d5e2e5f5274d6c2", "score": "0.529297", "text": "function ProcBoleto($nnum,$data_documento,$data_vencimento,$valor_cobrado,$nome,$endereco,$cpf,$i1,$i2,$i3,$i4,$i5) {\n\n\t\t$valor_cobrado = str_replace(',','.', $valor_cobrado) ;\n\n\t\t$codigobanco = '341'; // O Itau sempre será este número\n\t\t$agencia = '0350'; // 4 posições\n\t\t$conta = '19192'; // 5 posições sem dígito\n\t\t$carteira = '175'; // A sem registro é 175 para o Itaú\n\t\t$moeda = '9'; // Sempre será 9 pois deve ser em Real\n\t\t$nossonumero = $nnum; // Número de controle do Emissor (pode usar qq número de até 8 digitos);\n\t\t$data = $data_documento; //'05/03/2005'; // Data de emissão do boleto\n\t\t$vencimento = $data_vencimento; //'05/03/2006'; // Data no formato dd/mm/yyyy\n\t\t$valor = $valor_cobrado; // Colocar PONTO no formato REAIS.CENTAVOS (ex: 666.01)\n\n\t\t// NOS CAMPOS ABAIXO, PREENCHER EM MAIÚSCULAS E DESPREZAR ACENTUAÇÃO, CEDILHAS E\n\t\t// CARACTERES ESPECIAIS (REGRAS DO BANCO)\n\n\t\t$cedente = 'BODY SYSTEMS LTDA.';\n\n\t\t$sacado = $nome;\n\t\t$endereco_sacado = $endereco;\n\t\t//$cidade = 'UBERLANDIA';\n\t\t//$estado = 'MG';\n\t\t//$cep = '38400-000';\n\t\t$cpf_cnpj = $cpf;\n\t\t$instrucoes1 = $i1;\n\t\t$instrucoes2 = $i2;\n\t\t$instrucoes3 = $i3;\n\t\t$instrucoes4 = $i4;\n\t\t$instrucoes5 = $i5;\n\n\t\t// FIM DA ÁREA DE CONFIGURAÇÃO\n\n\t\tfunction Modulo11($valor) {\n\t\t\t$multiplicador = '4329876543298765432987654329876543298765432';\n\t\t\tfor ($i = 0; $i<=42; $i++ ) {\n\t\t\t\t$parcial = $valor[$i] * $multiplicador[$i];\n\t\t\t\t$total += $parcial;\n\t\t\t}\n\t\t\t$resultado = 11-($total%11);\n\t\t\tif (($resultado >= 10)||($resultado == 0)) {\n\t\t\t\t$resultado = 1;\n\t\t\t}\n\n\t\t\treturn $resultado;\n\t\t}\n\n\n\t\tfunction calculaDAC ($CalculaDAC) {\n\t\t\t$tamanho = strlen($CalculaDAC);\n\t\t\tfor ($i = $tamanho-1; $i>=0; $i--) {\n\t\t\t\tif ($multiplicador !== 2) {\n\t\t\t\t\t$multiplicador = 2;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$multiplicador = 1;\n\t\t\t\t}\n\t\t\t\t$parcial = strval($CalculaDAC[$i] * $multiplicador);\n\n\t\t\t\tif ($parcial >= 10) {\n\t\t\t\t\t$parcial = $parcial[0] + $parcial[1];\n\t\t\t\t}\n\t\t\t\t$total += $parcial;\n\t\t\t}\n\t\t\t$total = 10-($total%10);\n\t\t\tif ($total >= 10) {\n\t\t\t\t$total = 0;\n\t\t\t}\n\t\t\treturn $total;\n\t\t}\n\n\t\tfunction calculaValor ($valor) {\n\t\t\t$valor = str_replace('.','',$valor);\n\t\t\treturn str_repeat('0',(10-strlen($valor))).$valor;\n\t\t}\n\n\t\tfunction calculaNossoNumero ($valor) {\n\t\t\treturn str_repeat('0',(8-strlen($valor))).$valor;\n\t\t}\n\n\t\tfunction calculaFatorVencimento ($dia,$mes,$ano) {\n\t\t\t$vencimento = mktime(0,0,0,$mes,$dia,$ano)-mktime(0,0,0,7,3,2000);\n\t\t\treturn ceil(($vencimento/86400)+1000);\n\t\t}\n\n\t\t// CALCULO DO CODIGO DE BARRAS (SEM O DAC VERIFICADOR)\n\t\t$codigo_barras = $codigobanco.$moeda.calculaFatorVencimento(substr($vencimento,0,2),substr($vencimento,3,2),substr($vencimento,6,4));\n\t\t$codigo_barras .= calculaValor($valor).$carteira.calculaNossoNumero($nossonumero).calculaDAC($agencia.$conta.$carteira.calculaNossoNumero($nossonumero)).$agencia.$conta.calculaDAC($agencia.$conta).'000';\n\n\n\n\t\t// CALCULO DA LINHA DIGITÁVEL\n\t\t$parte1 = $codigobanco.$moeda.substr($carteira,0,1).substr($carteira,1,2).substr(calculaNossoNumero($nossonumero),0,2);\n\t\t$parte1 = substr($parte1,0,5).'.'.substr($parte1,5,4).calculaDAC($parte1);\n\n\t\t$parte2 = substr(calculaNossoNumero($nossonumero),2,5).substr(calculaNossoNumero($nossonumero),7,1).calculaDAC($agencia.$conta.$carteira.calculaNossoNumero($nossonumero)).substr($agencia,0,3);\n\t\t$parte2 = substr($parte2,0,5).'.'.substr($parte2,5,5).calculaDAC($parte2);\n\n\t\t$parte3 = substr($agencia,3,1).$conta.calculaDAC($agencia.$conta).'000';\n\t\t$parte3 = substr($parte3,0,5).'.'.substr($parte3,5,8).calculaDAC($parte3);\n\n\t\t$parte5 = calculaFatorVencimento(substr($vencimento,0,2),substr($vencimento,3,2),substr($vencimento,6,4)).calculaValor($valor);\n\n\t\t$numero_boleto = $parte1.' '.$parte2.' '.$parte3.' '.Modulo11($codigo_barras).' '.$parte5;\n\n\t\t// INSERÇÃO DO DAC NO CODIGO DE BARRAS\n\n\t\t$codigo_barras = substr($codigo_barras,0,4).Modulo11($codigo_barras).substr($codigo_barras,4,43);\n\t\t$m_codigo_barras = Modulo11($codigo_barras);\n\t\t// print Modulo11($codigo_barras);\n\t\t// exit;\n\n\t\t$ret = array($numero_boleto,$m_codigo_barras) ;\n\t\treturn $ret ;\n\n\t}", "title": "" }, { "docid": "6f27d31ad6a83cebca4591d833d71081", "score": "0.52892447", "text": "static public function ctrCalcularComprobacionImportacion(){\r\n\t\t$tabla = \"banco3450\";\r\n\r\n\t\t$respuesta = ModeloBanco3450::mdlCalcularComprobacionImportacion($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "title": "" }, { "docid": "d647d469d96b26b5d663e280303a7066", "score": "0.5286279", "text": "function generar_compra($_PARAM)\n\t{\n//\t\t$importe_total = mysql_result(mysql_query(\"SELECT SUM(precio_total) FROM clientes_factura_productos where activo = 2 \"),0);\n\t\t$factura = new Factura();\n\t\t$factura->set_idCliente($_PARAM[\"idProveedor\"]);\n\t\t$factura->set_n_remito($_PARAM[\"n_remito\"]);\n\t\t$factura->set_n_factura($_PARAM[\"n_factura\"]);\n\t\t$factura->set_importe($_PARAM[\"importe\"]);\n\t\t$factura->set_activo(1);\n\t\t$factura->set_comision_vendedor(0);\n if($_PARAM[\"n_factura\"] == \"\"):\n $factura->set_idTipo(7);\n else:\n $factura->set_idTipo(6);\n endif; \n\n \n\t\t$respuesta = $factura->save();\n\t\t\n $iva_selector = $_PARAM[\"iva_selector\"];\n \n if($_PARAM[\"bonificacion\"] != \"\" or $_PARAM[\"bonificacion\"] != 0):\n $subtotal_bonificado = $_PARAM[\"importe\"] - ($_PARAM[\"importe\"] * $_PARAM[\"bonificacion\"] / 100); \n else:\n $subtotal_bonificado = $_PARAM[\"importe\"];\n endif;\n \n \n\n\n \n if($iva_selector != \"ambos\"):\n if($iva_selector == \"21\"):\n $iva21 = $subtotal_bonificado * 21 / 100;\n $iva10 = 0; \n elseif($iva_selector == \"10.5\"):\n $iva10 = $subtotal_bonificado * 10.5 / 100;\n $iva21 = 0; \n \n endif;\n \n elseif($iva_selector == \"ambos\"):\n $iva21 = $_PARAM[\"iva21\"];\n $iva10 = $_PARAM[\"iva10\"];\t\t\n endif;\n \n \n if($_PARAM[\"ingresos_brutos\"] == 1):\n $ingresos_brutos = $subtotal_bonificado * 3.5 / 100; \n elseif($_PARAM[\"ingresos_brutos\"] == 2):\n $ingresos_brutos = 0; \n endif;\n \n\n\t\t$fecha_factura = convertir_fecha($_PARAM[\"fecha_factura\"]);\n\t\t$bonificacion = $_PARAM[\"bonificacion\"]; \n\t\t$descuento = $_PARAM[\"descuento\"]; \n $descuento_sel = $_PARAM[\"descuento_sel\"] ;\n // echo $hola = \"insert into clientes_facturas_compras values ('$respuesta', '$iva21', '$iva10', '$ingresos_brutos', '$descuento', '$bonificacion','$descuento_sel')\";\n // die();\n\t \tmysql_query(\"insert into clientes_facturas_compras values ('$respuesta', '$iva21', '$iva10', '$ingresos_brutos', '$descuento', '$bonificacion','$descuento_sel')\");\n\t\tmysql_query(\"update clientes_facturas set fecha = '$fecha_factura' where id = '$respuesta'\");\n\n\n\n\t}", "title": "" }, { "docid": "a7a76573559749f674936328aa268896", "score": "0.527476", "text": "function exec_compte_bilan() {\n\tsinon_interdire_acces(autoriser('voir_compta', 'association'));\n\tinclude_spip('association_modules');\n/// INITIALISATIONS\n\tinclude_spip('inc/association_comptabilite');\n\t$ids = association_passeparam_compta();\n/// AFFICHAGES_LATERAUX (connexes)\n\techo association_navigation_onglets('titre_onglet_comptes', 'comptes');\n/// AFFICHAGES_LATERAUX : INTRO : rappel de l'exercicee affichee\n\t$infos['exercice_entete_debut'] = association_formater_date($ids['debut_periode'], 'dtstart');\n\t$infos['exercice_entete_fin'] = association_formater_date($ids['fin_periode'], 'dtend');\n\techo association_tablinfos_intro($ids['titre_periode'], 'exercice', $ids['id_periode'], $infos);\n\t// pas de sommes de synthes puisque tous les totaux sont dans la zone centrale ;-\n/// AFFICHAGES_LATERAUX : RACCOURCIS\n\techo association_navigation_raccourcis(array(\n\t\tarray('informations_comptables', 'grille-24.png', array('comptes', \"$ids[type_periode]=$ids[id_periode]\"), array('voir_compta', 'association') ),\n\t\tarray('encaisse_titre_general', 'finances-24.png', array('encaisse', \"$ids[type_periode]=$ids[id_periode]\"), array('voir_compta', 'association') ),\n\t\tarray('cpte_resultat_titre_general', 'finances-24.png', array('compte_resultat', \"$ids[type_periode]=$ids[id_periode]\".($ids['destination']?\"&destination=$ids[destination]\":'')), array('voir_compta', 'association') ),\n#\t\tarray('annexe_titre_general', 'finances-24.png', array('compte_annexe', \"$ids[type_periode]=$ids[id_periode]\".($ids['destination']?\"&destination=$ids[destination]\":'')), array('voir_compta', 'association') ),\n\t), 16);\n\tif(autoriser('exporter_compta', 'association')) { // on peut exporter : pdf, csv, xml, ...\n\t\techo debut_cadre_enfonce('', TRUE);\n\t\techo '<h3>'. _T('asso:cpte_bilan_mode_exportation') .'</h3>';\n\t\tif (test_plugin_actif('FPDF')) { // impression en PDF : _T('asso:bouton_imprimer')\n\t\t\techo association_navigation_raccourci1('PDF', 'print-24.png', generer_action_auteur('pdf_comptesbilan', 0) );\n\t\t}\n\t\texport_compte($ids, 'bilan');\n\t\techo fin_cadre_enfonce(TRUE);\n\t}\n/// AFFICHAGES_CENTRAUX (corps)\n\tdebut_cadre_association('finances-24.png', 'cpte_bilan_titre_general');\n/// AFFICHAGES_CENTRAUX : FILTRES\n\techo association_form_filtres(array(\n\t\t'periode' => array($ids['id_periode'], 'asso_comptes', 'operation'),\n\t\t'destination' => $ids['destination'],\n\t), 'compte_bilan');\n/// AFFICHAGES_CENTRAUX : TABLEAUX\n\t// les autres classes a prendre en compte ici\n\t$classes_bilan = array();\n\t$query = sql_select(\n\t\t'classe', // select\n\t\t'spip_asso_plan', // from\n\t\tsql_in('classe', array($GLOBALS['association_metas']['classe_charges'],$GLOBALS['association_metas']['classe_produits'],$GLOBALS['association_metas']['classe_contributions_volontaires']), 'NOT'), // where https://programmer.spip.net/sql_in,642\n\t\t'classe', // group by\n\t\t'classe' // order by\n\t);\n\twhile ($data = sql_fetch($query)) {\n\t\t$classes_bilan[] = $data['classe'];\n\t}\n\t$regles = comptabilite_liste_planregles();\n\techo comptabilite_tableau_balances($classes_bilan, 'cpte_bilan', '+1', $ids['debut_periode'], $ids['fin_periode'], $ids['destination']); // liste des passifs (le patrimoine/avoir) cumulees par comptes\n\techo comptabilite_tableau_balances($classes_bilan, 'cpte_bilan', '-1', $ids['debut_periode'], $ids['fin_periode'], $ids['destination']); // liste des actifs (les dettes) cumulees par comptes\n\techo comptabilite_tableau_resultat($regles['A'], $ids['debut_periode'], $ids['fin_periode'], $ids['destination']); // resultat comptable courant : en comptabilite francaise, la somme les actifs et les passifs doivent s'egaler, ce qui se fait en incorporant le resultat comptable (perte en actif et benefice en passif)\n\t// liste des bilans (actifs et passifs) par comptes\n/// AFFICHAGES_CENTRAUX : FIN\n\tfin_page_association();\n}", "title": "" }, { "docid": "db1e09daf18f90b934b9d3d6ddef8b47", "score": "0.52641195", "text": "function dodajOcenu();", "title": "" }, { "docid": "431d0a1430b485940b754b9d29594dba", "score": "0.5262389", "text": "function getComposite()\n {\n return null;\n }", "title": "" }, { "docid": "6ec652bd90af41ddebeb38f99492220c", "score": "0.52541095", "text": "function dameUltimoIdProduccionComponente(){\n\t\treturn $this->getUltimoID();\n\t}", "title": "" }, { "docid": "d69eecafc6a2657c35cdaabf133c2434", "score": "0.52500355", "text": "function getId_compra()\n {\n return $this->id_compra;\n }", "title": "" }, { "docid": "c4067c2ed680929927ddb734b8a43033", "score": "0.5244455", "text": "function Init_Dossier_AEV_Situation_2($formx) {\n//$AEV_Type = utf8_decode($formx->getFormVar('AEV_Type'));\n//$formx->setVar('L_AEV_Situation',$situation);\n\n\n$ids = $formx->getIDS();\n$id_instance = $formx->getIdInstance();\n$idu = $formx->getVar('ids');\n\neko ($ids);\neko ($id_instance);\neko ($idu);\n\n// On va supprimer tous les fichiers Dossier_Colectomie_Periode_P1 de la table formx\n// $requete=new clRequete(BDD,TABLEFORMX,$param);\n// $sql=$requete->delRecord(\"idformx='Dossier_Colectomie_Periode_P1' and ids='\".$ids.\"'\");\n\n//$param[nomitem] = addslashes(stripslashes($this->getMedecin ( ))) ;\n//$req = new clResultQuery ;\n//$res = $req -> Execute ( \"Fichier\", \"getMatriculeMedecin\", $param, \"ResultQuery\" ) ;\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Accident_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Accident_Situation_2',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Accident_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Accident_Situation_2',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Prophylaxie_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Prophylaxie_Situation_2',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Prophylaxie_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Prophylaxie_Situation_2',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Situation_2',\"Non\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Hyeres_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Hyeres_Situation_2',\"Oui\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Accident_Travail_Etablissement_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Accident_Travail_Etablissement_Situation_2',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Nom_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Nom_Situation_2',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Prenom_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Prenom_Situation_2',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Jour_Naissance_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Jour_Naissance_Situation_2',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Mois_Naissance_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Mois_Naissance_Situation_2',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Annee_Naissance_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Annee_Naissance_Situation_2',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Complement_Situation_2'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Complement_Situation_2',\"\");\n }\n\nreturn \"O\";\n}", "title": "" }, { "docid": "f2b9b0e65218bb2572adabdb99cca068", "score": "0.52410275", "text": "static private function setCompetencia() { \n\n $sSqlCompetencia = \" select r11_anousu, \\n \";\n $sSqlCompetencia .= \" r11_mesusu \\n\";\n $sSqlCompetencia .= \" from cfpess \\n\";\n $sSqlCompetencia .= \" where r11_instit = \".db_getsession(\"DB_instit\");\n $sSqlCompetencia .= \" order by r11_anousu desc, \\n\";\n $sSqlCompetencia .= \" r11_mesusu desc \\n\"; \n $sSqlCompetencia .= \" limit 1 \\n\";\n \n $rsCompetencia = db_query($sSqlCompetencia);\n\n if ( !$rsCompetencia ) {\n throw new DBException(\"Erro ao Buscar os Dados da Competencia da Folha. \". pg_last_error() );\n }\n\n if ( pg_num_rows($rsCompetencia) == 0 ) {\n throw new BusinessException(\"Não existe nenhuma compentencia iniciada, Favor efetuar Abertura da Folha.\");\n }\n\n $oDadosCompetencia = pg_fetch_object($rsCompetencia, 0);\n DBPessoal::$iMesCompetenciaFolha = $oDadosCompetencia->r11_mesusu;\n DBPessoal::$iAnoCompetenciaFolha = $oDadosCompetencia->r11_anousu;\n return;\n }", "title": "" }, { "docid": "619e838dc5e4ecc962524f1a21966fc9", "score": "0.5238626", "text": "function detener_colecta($prefijo, $semilla, $minicow, $ruta_bin){\n\t$este_prefijo=$prefijo.\"-\".$semilla[\"id\"].\"_\";\n\t$procesos=informacion_procesos(\"$ruta_bin/$minicow\");\n\tprint_debug(\"terminando $minicow \\\"$este_prefijo\\\" (\".count($procesos).\" procesos)\");\n\tfor($i=0; $i<count($procesos); $i++){\n\t\tfor($j=0; $j<count($procesos[$i][\"ARG\"]); $j++){\n\t\t\tif($procesos[$i][\"ARG\"][$j]==\"-b\"){\n\t\t\t\t\t//echo strpos($procesos[$j][\"ARG\"][1+$k], \"$este_prefijo\").\"<br>\";\n\t\t\t\t\tif(strpos($procesos[$i][\"ARG\"][1+$j], $este_prefijo)===0){\n\t\t\t\t\t\tprint_debug(\"Terminando proceso $i (pid: \".$procesos[$i][\"PID\"].\")\");\n\t\t\t\t\t\t$comando=\"kill -9 \".$procesos[$i][\"PID\"].\"\";\n\t\t\t\t\t\t$comando.=\" 2>&1\";\n\t\t\t\t\t\texec($comando, $result);\n\t\t\t\t\t\tfor($k=0; $k<count($result); $k++)\n\t\t\t\t\t\t\techo $result[$k].\"<br>\";\n\t\t\t\t\t}//if... hay conflicto\n\t\t\t\t\tbreak;\n\t\t\t\t}//if.. argumento correcto\n\t\t}//for... cada argumento\n\t\t\n\t}//for... cada proceso\n}", "title": "" }, { "docid": "462eedbae9e54faf78109ff66c96d020", "score": "0.52351016", "text": "function controleur()\r\n{\r\n\tGlobal $NB_CHARGEMENT_PAR_MN,$DELAI,$DB_PREF ;\r\n\r\n// variables programmes\r\n\t$serveur=$_SERVER[\"SERVER_ADDR\"];\r\n\t$ip_visiteur =$_SERVER[\"REMOTE_ADDR\"] ;\r\n\r\n// Suppression des enregegistrements périmés (+5mm)\r\n\t$heure= time(); //retourne le temps en secode depui 1-01-1970 0h gmt\r\n\t$temps=time()-$DELAI ;\r\n\r\n $sql= \"DELETE FROM \".$DB_PREF.\"compteur WHERE heureCon <= $temps AND Etat='N'\"; // va supprimer tous les visiteur dont le temps a expire sans toucher ceux qui sont bloques \r\n $req=new DatabaseRequest($sql);\r\n $resultat=$req->Request();\t\r\n unset($req);\r\n// FIN Suppression des enregegistrements périmés (+5mm)\r\n\r\n\r\n// Ecriture enregistrement nouveau connecté\r\n\r\n\t$sql= \"SELECT* FROM \".$DB_PREF.\"compteur where ipCon = '$ip_visiteur' \";\r\n \t$req=new DatabaseRequest($sql);\r\n\t$res=$req->Select();\t\r\n\tunset($req);\r\n $number=count($res);\r\n\r\n\tif ($number == 0) // cest dire que c'est sa premiere fois\r\n\t{\r\n\t\t$ipCon = $ip_visiteur;\r\n\t\t$heureCon = time();\r\n\t\t$dateCon = Date (\"Ymd\");\r\n\t\t$lheure = Date (\"His\");\r\n\t\t$sql=\"INSERT INTO \".$DB_PREF.\"compteur ( ipCon ,heureCon , dateCon , lheure) VALUES ( '$ipCon','$heureCon' , '$dateCon' , '$lheure')\" ;\r\n\t\t$req=new DatabaseRequest($sql);\r\n\t\t$resultat=$req->Request();\t\r\n\t\tunset($req);\r\n\t}\r\n\telse //cest dire quil a recheregr une nouvel page donc on met son ip a jour\r\n\t{\r\n\t\t$sql = 'UPDATE '.$DB_PREF.'compteur SET heureCon = \"'.time().'\" WHERE ipCon = \"'.$ip_visiteur.'\"';\r\n\t\t$req=new DatabaseRequest($sql);\r\n\t\t$resultat=$req->Request();\t\r\n\t\tunset($req); \r\n\t\t\r\n\t\t//controle du visiteur\r\n\t\t$nb_chargement=$res[0]['Nb_charg'];\r\n\t\t$heure_conection=$res[0]['heureCon']; //represente la dernier date de rechergement de page\t\t\r\n\t\tif($nb_chargement>=$NB_CHARGEMENT_PAR_MN)\r\n\t\t{\r\n\t\t\t// on definit l'Etat du visiteur com bloque et on redirige\r\n\t\t\t$sql = 'UPDATE '.$DB_PREF.'compteur SET Etat=\"Y\" WHERE ipCon = \"'.$ip_visiteur.'\"';\r\n\t\t\t$req=new DatabaseRequest($sql);\r\n\t\t\t$resultat=$req->Request();\t\r\n\t\t\tunset($req); \r\n\t\t\theader('Location:forbiden.php'); \t//echo 'bloque';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$equart=time()-$heure_conection;\r\n\t\t\tif ($equart >=60) //on verifie si l'equart entre les deux chargement est conforme sinon on augmente le nb_charg\r\n\t\t\t{\r\n\t\t\t\t//on remet le nombre de chargement a 1: car il peut charger deux fois en 1mn et apres 3mn il cherge 3 fois \r\n\t\t\t\t//en rendant compte ke la page ne l'interesse pas alors on aurai garde ses ancien chargement\r\n\t\t\t\t$sql = 'UPDATE '.$DB_PREF.'compteur SET Nb_charg=1 WHERE ipCon = \"'.$ip_visiteur.'\"';\r\n\t\t\t\t$req=new DatabaseRequest($sql);\r\n\t\t\t\t$resultat=$req->Request();\t\r\n\t\t\t\tunset($req); \t \r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$nb_chargement=$nb_chargement+1; \r\n\t\t\t\t$sql = 'UPDATE '.$DB_PREF.'compteur SET Nb_charg=\"'.$nb_chargement.'\" WHERE ipCon = \"'.$ip_visiteur.'\"';\r\n\t\t\t\t$req=new DatabaseRequest($sql);\r\n\t\t\t\t$resultat=$req->Request();\t\r\n\t\t\t\tunset($req); \r\n\t\t\t}\t\r\n\t\t}\t\t\r\n\t}\r\n\r\n//comptage final ...\r\n $sql= \"SELECT* FROM \".$DB_PREF.\"compteur where Etat='N'\"; //on selectione tous les visiteurs qui ne sont pas bloque\r\n $req=new DatabaseRequest($sql);\r\n $resultat=$req->Select();\t\r\n unset($req);\r\n $cpt=count($resultat);\r\n return $cpt;\r\n }", "title": "" }, { "docid": "2e4efa37c56280dac16c13dd38e14067", "score": "0.52292377", "text": "function comprobar(){\n // Out of time :(\n }", "title": "" }, { "docid": "16782cd0acdbde944c4f00466672de63", "score": "0.5225709", "text": "function CENTRO_comprobar_RellenaDatos()\n{\n\tglobal $ERRORS_array_test;\n// creo array de almacen de test individual\n\t$CENTRO_array_test1 = array();\n\n\t//sexo correcto\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'comprobar_atributos_RellenaDatos';\n\t$CENTRO_array_test1['error'] = 'correcto';\n\t$CENTRO_array_test1['error_esperado'] = 'true';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de usuario\t\n\t$centro = 'miusuario';\n// creo el modelo\n\t$CENTRO = new CENTRO_Model($centro,'','','','');\n\n\t$CENTRO_array_test1['error_obtenido'] = $CENTRO->comprobar_atributos_RellenaDatos() == 1 ? 'true' : 'false';\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t//sexo vacia\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'comprobar_atributos_RellenaDatos';\n\t$CENTRO_array_test1['error'] = 'Codigo del edificio erroneos';\n\t$CENTRO_array_test1['error_esperado'] = 'CodCentro-00040-alfNumguion-';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de usuario\t\n\t$centro = 'miusuario!';\n// creo el modelo\n\t$CENTRO = new CENTRO_Model($centro,'','','','');\n\t$array = $CENTRO->comprobar_atributos_RellenaDatos();\n\t//var_dump($array);\n\tforeach ($array as $key ) {\n\t\tforeach ($key as $key2) {\n\t\t\t$result .= $key2.'-';\n\t\t}\n\t}\n\t$CENTRO_array_test1['error_obtenido'] = $result;\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n}", "title": "" }, { "docid": "d5e5e35e9154c9a747cc7ebe36c7f868", "score": "0.52229565", "text": "public function buscarUltimo();", "title": "" }, { "docid": "043d41d0f6321887d0a80e8ae6de91f0", "score": "0.5215149", "text": "function getDvCc($numeroLinha){\n\t return substr($this->getLinha($numeroLinha),70,1);\n\t}", "title": "" }, { "docid": "9f5e2bb0e8295c65f7b3f646b4f6eef5", "score": "0.5210692", "text": "private function getMetragemCubicaAberto() {\n\n $iMetragemCubicaAberto = ($this->iMetragemCubicaEfetivamenteConsumida - $this->iMetragemCubicaCobrada);\n\n return $iMetragemCubicaAberto;\n }", "title": "" }, { "docid": "7d6c680af4d2760361afe92f7ad80b87", "score": "0.5210577", "text": "function aplicaPerfis()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ebc3504e053a91b6c297b9aa22785109", "score": "0.5202298", "text": "public function bureauUitgebreid()\n {\n\n }", "title": "" }, { "docid": "d7a3c7c48564b5c5be5c85005efa1df0", "score": "0.5180769", "text": "public function oleeee() {\n\n\n\t\t}", "title": "" }, { "docid": "2ac52a505d4e4329ce1cadb84a300bdf", "score": "0.5176624", "text": "public function getO_decouvrir() {\n\t\t\treturn $this->o_decouvrir;\n\t\t}", "title": "" }, { "docid": "ea81ed9aa687711be9f761380040bd2b", "score": "0.51757634", "text": "function GB_CollCompete()\n{\n\t$GB_CollectionList = GB_GetCollectionList() ;\n\tif (!$GB_CollectionList) { AddLog2(\"collectable_info.txt not found.. \"); return false; }\n\t$GB_CollCompl = 0;\n\t$GBccount = array();\n\t$GBccount = GB_LoadCcount();\n\tif (!$GBccount) { AddLog2(\"ccount.txt not found.. \"); return false; }\n\t$res = array();\n\n\tforeach($GB_CollectionList as $value)\n\t{\n\t\t// walk all collections\n\t\t$GB_amount_Coll = count($value['collectable']);\n\t\t$i=0;\n\t\t$GB_ThisCollCompl = 0;\n\t\t$GB_ThisCollVal = array();\n\t\twhile($i < $GB_amount_Coll)\n\t\t{\n\t\t\t// each collection\n\t\t\t//$ObjD = GB_GetUnitInfo($value['collectable'][$i], \"code\", $GB_units);\n\t\t\t$Amount_in_Collection = GB_GetColInfo($value['collectable'][$i], $GBccount);\n\t\t\t$GB_ThisCollVal[] =$Amount_in_Collection;\n\t\t\t$i++;\n\t\t}\n\t\t$GB_ThisCollCompl = min($GB_ThisCollVal);\n\t\t$res[$value['code']] = $GB_ThisCollCompl;\n\t}\n\treturn $res; //return total completed array can be empty.\n}", "title": "" }, { "docid": "5700b7f3a8235281b1326b5d669460ad", "score": "0.51693594", "text": "static public function ctrCrearCompra(){\n\n\t\tif(isset($_POST[\"nuevaCompra\"])){\n\n\t\t\t\t/*=============================\n\t\t\t\t\tActializar las compras del cliente y reducir el STOCK, aumenta Ventas\n\t\t\t\t ==============================*/\n\n\t\t\t\t $listaProductos = json_decode($_POST[\"listaProductos\"], true);\n\n\n\t\t\t\t $totalProductosComprados = array();\n\n\t\t\t\t //var_dump($listaProductos);\n\t\t\t\t foreach ($listaProductos as $key => $value) {\n\n\t\t\t\t \tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t \t\n\t\t\t\t \tvar_dump($totalProductosComprados);\n\t\t\t\t \t\n\t\t\t\t \t$tablaProductos = \"productos\";\n\n\t\t\t\t \t$item = \"id\";\n\t\t\t\t \t$valor = $value[\"id\"];\n\t\t \t\t\t$orden = \"id\";\n\n\t\t\t\t \t$traerProductos = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor,$orden);\n\n\t\t\t\t \t//var_dump($traerProductos);\n\n\t\t\t\t \t$item1a = \"ventas\";\n\t\t\t\t \t$valor1a = $value[\"cantidad\"] + $traerProductos[\"ventas\"];\n\t\t\t\t \t\n\t\t\t\t \t$nuevasVentas = ModeloProductos::mdlActualizarProductos($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t \t$item1b = \"stock\";\n\t\t\t\t \t$valor1b = $value[\"stock\"];\n\n\t\t\t\t \t$nuevoStock = ModeloProductos::mdlActualizarProductos($tablaProductos, $item1b, $valor1b, $valor);\n\t\t\t\t }\n\n\n\t\t\t\t $tablaProveedores = \"proveedores\";\n\n\t\t\t\t $item = \"id\";\n\t\t\t\t $valor = $_POST[\"seleccionarProveedor\"];\n\n\t\t\t\t $traerProveedor = ModeloProveedores::mdlMostrarProveedores($tablaProveedores, $item , $valor);\n\n\t\t\t\t $item1 = \"compras\";\n\t\t\t\t $valor1 = array_sum($totalProductosComprados) + $traerProveedor[\"compras\"];\n\n\t\t\t\t $comprasProveedor = ModeloProveedores::mdlActualizarProveedores($tablaProveedores, $item1, $valor1, $valor);\n\n\t\t\t\t $item1b = \"ultima_compra\";\n\n\t\t\t\t $fecha = date('Y-m-d');\n\t\t\t\t $hora = date('H:i:s');\n\n\t\t\t\t $valor1b = $fecha.' '.$hora;\n\n\t\t\t\t $comprasProveedor = ModeloProveedores::mdlActualizarProveedores($tablaProveedores, $item1b, $valor1b, $valor);\n\n\t\t\t\t \t/*=============================\n\t\t\t\t\t\t\tGuardar la Compra\n\t\t\t\t\t==============================*/\n\n\t\t\t\t\t$tabla = \"compras\";\n\n\t\t\t\t\t$datos = array(\"id_proveedor\" => $_POST[\"seleccionarProveedor\"],\n\t\t\t\t\t\t\t\t\t\"id_vendedor\" => $_POST[\"idVendedor\"],\n\t\t\t\t\t\t\t\t\t\"codigo\" => $_POST[\"nuevaCompra\"],\n\t\t\t\t\t\t\t\t\t\"productos\" => $_POST[\"listaProductos\"],\n\t\t\t\t\t\t\t\t\t\"impuesto\" => $_POST[\"nuevoPrecioImpuesto\"],\n\t\t\t\t\t\t\t\t\t\"neto\" => $_POST[\"nuevoPrecioNeto\"],\n\t\t\t\t\t\t\t\t\t\"total\" => $_POST[\"totalCompra\"],\n\t\t\t\t\t\t\t\t\t\"metodo_pago\" => $_POST[\"listaMetodoPago\"]);\n\t\n\t//var_dump($datos);\n\n\t\t\t\t\t$respuesta = ModeloCompras::mdlIngresarCompras($tabla, $datos);\n//var_dump($respuesta);\n\t\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\ttitle: \"La compra se guardo correctamente!\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\twindow.location = \"compras\";\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\t\t\t\ttitle: \"Ocurrio un error!\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "671f9156aa55a2845c53a27a81325835", "score": "0.516128", "text": "function CENTRO_comprobar_centro_test()\n{\n\tglobal $ERRORS_array_test;\n// creo array de almacen de test individual\n\t$CENTRO_array_test1 = array();\n\n// Codcentro correcto\n//----------------------------------------------\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Codcentro';\n\t$CENTRO_array_test1['error'] = 'correcto';\n\t$CENTRO_array_test1['error_esperado'] = 'true';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\t$codCent = 'codCent';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model($codCent,'','','','');\n\n\tif ($CENTRO->comprobar_centro()) $res = 'true';\n\telse $res = 'false';\n\n\t$CENTRO_array_test1['error_obtenido'] = $res;\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\n\t//Codcentro demasiado largo\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Codcentro';\n\t$CENTRO_array_test1['error'] = 'demasiado largo';\n\t$CENTRO_array_test1['error_esperado'] = '00002';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$codCent = 'miCENTROesElMasLargoDelMundoYCabraEnLaBaseDeDatosPorqueSoyGenial';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model($codCent,'','','','');\n\n\t$result = $CENTRO->comprobar_centro();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t//Codcentro demasiado corto\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Codcentro';\n\t$CENTRO_array_test1['error'] = 'demasiado corto';\n\t$CENTRO_array_test1['error_esperado'] = '00003';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$codCent = 'm';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model($codCent,'','','','');\n\n\t$result = $CENTRO->comprobar_centro();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t//Codcentro vacio\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Codcentro';\n\t$CENTRO_array_test1['error'] = 'vacio';\n\t$CENTRO_array_test1['error_esperado'] = '00001';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$codCent = '';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model($codCent,'','','','');\n\n\t$result = $CENTRO->comprobar_centro();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\n\t//Codcentro formato erroneo\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Codcentro';\n\t$CENTRO_array_test1['error'] = 'formato erroneo';\n\t$CENTRO_array_test1['error_esperado'] = '00040';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$codCent = 'mi|pass.14';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model($codCent,'','','','');\n\n\t$result = $CENTRO->comprobar_centro();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n}", "title": "" }, { "docid": "e219ee1cd3f899c3676a1bbaaef9452d", "score": "0.5159078", "text": "public function getUCom()\n {\n return $this->uCom;\n }", "title": "" }, { "docid": "149f535ecd41dbcad1f17b5cadf27348", "score": "0.5157751", "text": "public function getUpc();", "title": "" }, { "docid": "ef868278080e2e143f69d5bbe2c43bbd", "score": "0.5155481", "text": "public function getCompras()\n {\n return $this->compras;\n }", "title": "" }, { "docid": "d40b9b54450c8438115c069adf08275b", "score": "0.51539207", "text": "function tipoComprobante() {\n\n foreach ($this->xml->xpath('//cfdi:Comprobante') as $comprobante) {\n $this->tipoComprobante = $comprobante['tipoDeComprobante'] != \"\" ? $comprobante['tipoDeComprobante'] : $comprobante['TipoDeComprobante'];\n }\n\n if (strcmp(strtolower($this->tipoComprobante), 'ingreso') == 0 || strcmp(strtolower($this->tipoComprobante), 'i') == 0) {\n $this->tipoComprobante = \"I\";\n } else {\n $this->tipoComprobante = \"E\";\n }\n\n return $this->tipoComprobante;\n }", "title": "" }, { "docid": "f74789bb075236ac2f4242896789bfca", "score": "0.5152501", "text": "function cabeceraHorizontalSupCompras()\n {\n $this->SetXY(18, 55);\n $this->SetFont('Arial','B',7.5);\n\t\t$this->SetFillColor(51, 64, 105);//Fondo verde de celda\n\t\t//$this->SetFillColor(229, 229, 229);\n $this->SetTextColor(255, 255, 255); //Letra color blanco\n\t\t$this->CellFitSpace(7,6, utf8_decode('No.'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(15,6, utf8_decode('Cantidad'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(13,6, utf8_decode('Unidad'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(66,6, utf8_decode('Descripción del material'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(50,6, utf8_decode('Detalle de lugar para usarse'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(21,6, utf8_decode('No. cuenta'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(35,6, utf8_decode('Proveedor'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(18,6, utf8_decode('Precio U.'),1, 0 , 'C',true );\n\t\t$this->CellFitSpace(18,6, utf8_decode('Importe'),1, 0 , 'C',true );\n }", "title": "" }, { "docid": "24d507d8538219ce3bcc8da45a304c5f", "score": "0.5143623", "text": "public function lanzar_bomba()\n {\n }", "title": "" }, { "docid": "030d16d5bc47b6066df759eafa420933", "score": "0.51430345", "text": "function Pega_codigo_classTrib($construtora){\n\t\n\t//sobre o item classTrib o padrão é 02, mas se for construção civil é 03\n\treturn $construtora == 1 ? '03' : '02';\n}", "title": "" }, { "docid": "d9d222933cd28ec164caba265e4adb7d", "score": "0.5135619", "text": "function formulaires_vider_petitcochon_charger_dist() {\n\t\n\t$valeurs = array();\n\treturn $valeurs;\n\t\n}", "title": "" }, { "docid": "1a3b7cc48d590c8694e292fa4e3cf1e6", "score": "0.5135434", "text": "function modificarFacturaCob(){\n\t\t$this->procedimiento='cobra.f_tcb_factura_cob_ime';\n\t\t$this->transaccion='CB_FACCOB_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_factura_cob','id_factura_cob','int4');\n\t\t$this->setParametro('importe_cred_fis','importe_cred_fis','numeric');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo_lectura','tipo_lectura','varchar');\n\t\t$this->setParametro('reconex_val','reconex_val','numeric');\n\t\t$this->setParametro('credito_pagado','credito_pagado','numeric');\n\t\t$this->setParametro('consumo_cambio','consumo_cambio','numeric');\n\t\t$this->setParametro('nombre_fac','nombre_fac','varchar');\n\t\t$this->setParametro('potencia_val','potencia_val','numeric');\n\t\t$this->setParametro('nro_factura','nro_factura','varchar');\n\t\t$this->setParametro('consumo_libre','consumo_libre','numeric');\n\t\t$this->setParametro('nro_orden','nro_orden','varchar');\n\t\t$this->setParametro('sw_deb_fis','sw_deb_fis','varchar');\n\t\t$this->setParametro('consumo_total','consumo_total','numeric');\n\t\t$this->setParametro('cod_alfanum','cod_alfanum','varchar');\n\t\t$this->setParametro('cod_control','cod_control','varchar');\n\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t$this->setParametro('fecha_act','fecha_act','date');\n\t\t$this->setParametro('conexion_val','conexion_val','numeric');\n\t\t$this->setParametro('fecha_ant','fecha_ant','date');\n\t\t$this->setParametro('nit_fact','nit_fact','varchar');\n\t\t$this->setParametro('fecha_prox_med','fecha_prox_med','date');\n\t\t$this->setParametro('estado_fac','estado_fac','varchar');\n\t\t$this->setParametro('lectura_kw','lectura_kw','numeric');\n\t\t$this->setParametro('cod_ubica','cod_ubica','varchar');\n\t\t$this->setParametro('nro_autorizacion','nro_autorizacion','varchar');\n\t\t$this->setParametro('multi_kwh','multi_kwh','numeric');\n\t\t$this->setParametro('gestion','gestion','numeric');\n\t\t$this->setParametro('id_cajero','id_cajero','int4');\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('periodo','periodo','numeric');\n\t\t$this->setParametro('consumo_val','consumo_val','numeric');\n\t\t$this->setParametro('fecha_pago','fecha_pago','timestamp');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('importe_dev','importe_dev','numeric');\n\t\t$this->setParametro('nro_medidor','nro_medidor','varchar');\n\t\t$this->setParametro('lectura_act','lectura_act','numeric');\n\t\t$this->setParametro('importe_total','importe_total','numeric');\n\t\t$this->setParametro('num_formulario','num_formulario','varchar');\n\t\t$this->setParametro('fecha_vence','fecha_vence','date');\n\t\t$this->setParametro('fecha_factura','fecha_factura','date');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('consumo_periodo','consumo_periodo','numeric');\n\t\t$this->setParametro('lectura_ant','lectura_ant','numeric');\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": "e5450d4c72223b0569b82e03e05a9d0e", "score": "0.5132602", "text": "public function comprobante()\n {\n return clone $this->comprobante;\n }", "title": "" }, { "docid": "032a763c3a1366bc196590ed67c9cec8", "score": "0.51294595", "text": "private function generarCalculoIndividual(MBeneficiario &$Bnf, KCalculoLote &$CalculoLote, $fecha, $Directivas, $v){\n $Bnf->cedula = $v->cedula;\n $Bnf->deposito_banco = \"\"; //$v->cap_banco; //Individual de la Red\n $Bnf->apellidos = $v->apellidos; //Individual del Objeto\n $Bnf->nombres = $v->nombres; //Individual del Objeto\n \n $Bnf->fecha_ingreso = $v->fecha_ingreso;\n $Bnf->numero_hijos = $v->n_hijos;\n $Bnf->tipo = $v->tipo;\n $Bnf->banco = $v->banco;\n $Bnf->numero_cuenta = $v->numero_cuenta;\n $Bnf->situacion = $v->situacion;\n $Bnf->no_ascenso = $v->st_no_ascenso;\n $Bnf->componente_id = $v->componente_id;\n $Bnf->componente_nombre = $Directivas['com'][$v->componente_id];\n $Bnf->grado_codigo = $v->codigo;\n $Bnf->grado_nombre = $v->gnombre;\n $Bnf->fecha_ultimo_ascenso = $v->f_ult_ascenso;\n $Bnf->fecha_retiro = $v->f_retiro;\n $Bnf->prima_profesionalizacion_mt = $v->st_profesion;\n $Bnf->estatus_profesion = $v->st_profesion;\n $Bnf->porcentaje = $v->porcentaje;\n \n\n $Bnf->prima_especial = $v->monto_especial;\n $Bnf->ano_reconocido = $v->anio_reconocido;\n $Bnf->mes_reconocido = $v->mes_reconocido;\n $Bnf->dia_reconocido = $v->dia_reconocido;\n $Bnf->estatus_activo = $v->status_id;\n \n $CalculoLote->Ejecutar();\n return $Bnf;\n\n }", "title": "" }, { "docid": "b11b9ffc51525c7067fc8d7807ee9132", "score": "0.51286066", "text": "function getCc($numeroLinha){\n\n $sCodigoConta = substr($this->getLinha($numeroLinha),58,12);\n\n /**\n * Validação para a CAIXA, este campo vem diferente quando é da CAIXA\n */\n if ($this->getCodbco() == \"104\") {\n\n $sAlterarConta = '000' . substr($sCodigoConta, 3, strlen($sCodigoConta));\n $sCodigoConta = $sAlterarConta;\n }\n\n\t return $sCodigoConta;\n\t}", "title": "" }, { "docid": "f99ef6cba3b56cff8d38e9f81d652546", "score": "0.51219505", "text": "function Inicial() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n if ($O=='L') {\r\n if (strpos(upper($R),'GR_')!==false || nvl($w_tipo,'HTML')!='HTML') {\r\n $w_filtro='';\r\n\r\n if (nvl($p_chave,'')!='') {\r\n $sql = new db_getSolicMT; $RS = $sql->getInstanceOf($dbms,f($RS,'sq_menu'),$w_usuario,Nvl($_REQUEST['p_agrega'],$SG),5,\r\n $p_ini_i,$p_ini_f,$p_fim_i,$p_fim_f,$p_atraso,$p_solicitante,\r\n $p_unidade,$p_prioridade,$p_ativo,$p_proponente,\r\n $p_chave, $p_assunto, $p_pais, $p_regiao, $p_uf, $p_cidade, $p_usu_resp,\r\n $p_uorg_resp, $p_palavra, $p_prazo, $p_fase, $p_sqcc, $p_projeto, $p_atividade, \r\n null, null, $p_empenho, $p_servico);\r\n $w_filtro.='<tr valign=\"top\"><td align=\"right\">Pedido <td>[<b>'.f($RS,'codigo_interno').'</b>]';\r\n } \r\n if ($p_projeto>'') {\r\n $w_linha++;\r\n $sql = new db_getSolicData; $RS = $sql->getInstanceOf($dbms,$p_projeto,'PJGERAL');\r\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Projeto <td>[<b><A class=\"HL\" HREF=\"projeto.php?par=Visual&O=L&w_chave='.$p_projeto.'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.f($RS,'sigla').'\" title=\"Exibe as informações do projeto.\">'.f($RS,'titulo').'</a></b>]';\r\n } \r\n if ($p_pais>'') {\r\n $w_linha++;\r\n $sql = new db_getTipoMatServ; $RS = $sql->getInstanceOf($dbms,$w_cliente,$p_pais,null,null,null,null,null,null,'REGISTROS');\r\n foreach($RS as $row) { $RS = $row; break; }\r\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Tipo de material/serviço<td>[<b>'.f($RS,'nome_completo').'</b>]';\r\n } \r\n if ($p_prazo>'') $w_filtro.=' <tr valign=\"top\"><td align=\"right\">Prazo para conclusão até<td>[<b>'.FormataDataEdicao(addDays(time(),$p_prazo)).'</b>]';\r\n if ($p_empenho>'') $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Código <td>[<b>'.$p_empenho.'</b>]';\r\n if ($p_proponente>'') { $w_linha++; $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Material<td>[<b>'.$p_proponente.'</b>]'; }\r\n if ($p_solicitante>'') {\r\n $sql = new db_getPersonData; $RS = $sql->getInstanceOf($dbms,$w_cliente,$p_solicitante,null,null);\r\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Solicitante <td>[<b>'.f($RS,'nome_resumido').'</b>]';\r\n } \r\n if ($p_unidade>'') {\r\n $sql = new db_getUorgData; $RS = $sql->getInstanceOf($dbms,$p_unidade);\r\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Unidade solicitante <td>[<b>'.f($RS,'nome').'</b>]';\r\n }\r\n if ($p_ini_i>'') $w_filtro.='<tr valign=\"top\"><td align=\"right\">Homologação <td>[<b>'.$p_ini_i.'-'.$p_ini_f.'</b>]';\r\n if ($p_fim_i>'') $w_filtro.='<tr valign=\"top\"><td align=\"right\">Autorização <td>[<b>'.$p_fim_i.'-'.$p_fim_f.'</b>]';\r\n if ($w_filtro>'') $w_filtro ='<table border=0><tr valign=\"top\"><td><b>Filtro:</b><td nowrap><ul>'.$w_filtro.'</ul></tr></table>';\r\n } \r\n \r\n $sql = new db_getLinkData; $RS = $sql->getInstanceOf($dbms,$w_cliente,$SG);\r\n if ($w_copia>'') {\r\n // Se for cópia, aplica o filtro sobre todas as PCDs visíveis pelo usuário\r\n $sql = new db_getSolicMT; $RS = $sql->getInstanceOf($dbms,f($RS,'sq_menu'),$w_usuario,Nvl($_REQUEST['p_agrega'],$SG),3,\r\n $p_ini_i,$p_ini_f,$p_fim_i,$p_fim_f,$p_atraso,$p_solicitante,\r\n $p_unidade,$p_prioridade,$p_ativo,$p_proponente,\r\n $p_chave, $p_assunto, $p_pais, $p_regiao, $p_uf, $p_cidade, $p_usu_resp,\r\n $p_uorg_resp, $p_palavra, $p_prazo, $p_fase, $p_sqcc, $p_projeto, $p_atividade, \r\n null, null, $p_empenho, $p_servico);\r\n } else {\r\n $sql = new db_getSolicMT; $RS = $sql->getInstanceOf($dbms,f($RS,'sq_menu'),$w_usuario,Nvl($_REQUEST['p_agrega'],$SG),$P1,\r\n $p_ini_i,$p_ini_f,$p_fim_i,$p_fim_f,$p_atraso,$p_solicitante,\r\n $p_unidade,$p_prioridade,$p_ativo,$p_proponente,\r\n $p_chave, $p_assunto, $p_pais, $p_regiao, $p_uf, $p_cidade, $p_usu_resp,\r\n $p_uorg_resp, $p_palavra, $p_prazo, $p_fase, $p_sqcc, $p_projeto, $p_atividade, \r\n null, null, $p_empenho, $p_servico);\r\n } \r\n if (nvl($p_ordena,'')>'') {\r\n $lista = explode(',',str_replace(' ',',',$p_ordena));\r\n $RS = SortArray($RS,$lista[0],$lista[1],'phpdt_inclusao','desc', 'fim', 'desc', 'prioridade', 'asc');\r\n } else {\r\n $RS = SortArray($RS,'phpdt_inclusao','desc', 'fim', 'desc', 'prioridade', 'asc');\r\n }\r\n }\r\n \r\n $w_embed = '';\r\n headerGeral('P', $w_tipo, $w_chave, 'Consulta de '.f($RS_Menu,'nome'), $w_embed, null, null, $w_linha_pag,$w_filtro);\r\n\r\n if ($w_embed!='WORD') {\r\n if ($P1==2) ShowHTML('<meta http-equiv=\"Refresh\" content=\"'.$conRefreshSec.'; URL=../'.MontaURL('MESA').'\">');\r\n ShowHTML('<TITLE>'.$conSgSistema.' - '.f($RS_Menu,'nome').'</TITLE>');\r\n ScriptOpen('Javascript');\r\n Modulo();\r\n FormataCPF();\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n ValidateOpen('Validacao');\r\n if (strpos('CP',$O)!==false) {\r\n if ($P1!=1 || $O=='C') {\r\n // Se não for cadastramento ou se for cópia \r\n Validate('p_codigo','Número do pedido','','','2','60','1','1');\r\n Validate('p_ini_i','Início','DATA','','10','10','','0123456789/');\r\n Validate('p_ini_f','Fim','DATA','','10','10','','0123456789/');\r\n ShowHTML(' if ((theForm.p_ini_i.value != \\'\\' && theForm.p_ini_f.value == \\'\\') || (theForm.p_ini_i.value == \\'\\' && theForm.p_ini_f.value != \\'\\')) {');\r\n ShowHTML(' alert (\\'Informe ambas as datas ou nenhuma delas!\\');');\r\n ShowHTML(' theForm.p_ini_i.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n CompData('p_ini_i','Início','<=','p_ini_f','Fim');\r\n } \r\n Validate('P4','Linhas por página','1','1','1','4','','0123456789');\r\n } \r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</HEAD>');\r\n if ($w_Troca>'') {\r\n // Se for recarga da página\r\n BodyOpen('onLoad=\\'document.Form.'.$w_Troca.'.focus();\\'');\r\n } elseif (strpos('CP',$O)!==false) {\r\n BodyOpen('onLoad=\\'document.Form.p_codigo.focus()\\';');\r\n } elseif ($P1==2) {\r\n BodyOpen(null);\r\n } else {\r\n BodyOpen('onLoad=this.focus();');\r\n } \r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n if($w_embed!='WORD') {\r\n if ((strpos(upper($R),'GR_'))===false) {\r\n Estrutura_Texto_Abre();\r\n } else {\r\n CabecalhoRelatorio($w_cliente,'Consulta de '.f($RS_Menu,'nome'),4);\r\n }\r\n }\r\n if ($w_filtro > '') ShowHTML($w_filtro);\r\n }\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if ($O=='L') {\r\n ShowHTML('<tr><td>');\r\n if ($P1==1 && $w_copia=='') {\r\n // Se for cadastramento e não for resultado de busca para cópia\r\n if ($w_embed!='WORD') { \r\n ShowHTML(' <a accesskey=\"I\" class=\"ss\" href=\"'.$w_dir.$w_pagina.'Geral&R='.$w_pagina.$par.'&O=I&SG='.$SG.'&w_menu='.$w_menu.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET').'\"><u>I</u>ncluir</a>&nbsp;'); \r\n ShowHTML(' <a accesskey=\"C\" class=\"ss\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=C&P1='.$P1.'&P2='.$P2.'&P3=1&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\"><u>C</u>opiar</a>');\r\n }\r\n } \r\n if ((strpos(upper($R),'GR_'))===false && $P1!=6 && $w_embed!='WORD') {\r\n ShowHTML(' <a accesskey=\"F\" class=\"SS\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O='.(($w_copia>'') ? 'C' : 'P').'&P1='.$P1.'&P2='.$P2.'&P3=1&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\">'.((strpos(str_replace('p_ordena','w_ordena',MontaFiltro('GET')),'p_')) ? '<font color=\"#BC5100\"><u>F</u>iltrar (Ativo)</font>' : '<u>F</u>iltrar (Inativo)').'</a>');\r\n }\r\n ShowHTML(' <td align=\"right\"><b>'.exportaOffice().'Registros: '.count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n $colspan = 0;\r\n if ($w_embed!='WORD') {\r\n $colspan++; ShowHTML(' <td><b>'.LinkOrdena('Código','phpdt_inclusao').'</b></td>');\r\n $colspan++; ShowHTML(' <td><b>'.LinkOrdena('Inclusão','fim').'</b></td>');\r\n $colspan++; ShowHTML(' <td><b>'.LinkOrdena('Agendamento desejado','fim').'</b></td>');\r\n $colspan++; ShowHTML(' <td><b>'.LinkOrdena('Solicitante','sg_unidade_resp').'</b></td>');\r\n $colspan++; ShowHTML(' <td><b>'.LinkOrdena('Justificativa','justificativa').'</b></td>');\r\n $colspan++; ShowHTML(' <td><b>'.LinkOrdena('Itens','qt_itens').'</b></td>');\r\n if ($P1>2) ShowHTML(' <td><b>'.LinkOrdena('Valor','valor').'</b></td>');\r\n if ($P1!=1) ShowHTML(' <td><b>'.LinkOrdena('Fase atual','nm_tramite').'</b></td>');\r\n ShowHTML(' <td class=\"remover\"><b>Operações</b></td>');\r\n ShowHTML(' </tr>');\r\n } else {\r\n $colspan++; ShowHTML(' <td><b>Código</b></td>');\r\n $colspan++; ShowHTML(' <td><b>Agendamento desejado</b></td>');\r\n $colspan++; ShowHTML(' <td><b>Solicitante</b></td>');\r\n $colspan++; ShowHTML(' <td><b>Justificativa</b></td>');\r\n $colspan++; ShowHTML(' <td><b>Itens</b></td>');\r\n if ($P1>2) ShowHTML(' <td><b>Valor</b></td>');\r\n if ($P1!=1) ShowHTML(' <td><b>Fase atual</b></td>');\r\n ShowHTML(' </tr>');\r\n }\r\n if (count($RS)==0) {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=\"'.($colspan+2).'\" align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n $w_parcial=0;\r\n $RS1 = array_slice($RS, (($P3-1)*$P4), $P4);\r\n foreach($RS1 as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td width=\"1%\" nowrap>');\r\n ShowHTML(ExibeImagemSolic(f($row,'sigla'),f($row,'inicio'),f($row,'fim'),null,null,f($row,'aviso_prox_conc'),f($row,'aviso'),f($row,'sg_tramite'), null));\r\n ShowHTML(' '.ExibeSolic($w_dir,f($row,'sq_siw_solicitacao'),f($row,'dados_solic'),'N',$w_embed).'&nbsp;');\r\n ShowHTML(' <td width=\"1%\" nowrap align=\"center\">&nbsp;'.FormataDataEdicao(f($row,'ultima_alteracao'),5).'&nbsp;</td>');\r\n ShowHTML(' <td width=\"1%\" nowrap align=\"center\">&nbsp;'.FormataDataEdicao(f($row,'fim'),5).'&nbsp;</td>');\r\n if ($w_embed!='WORD') ShowHTML(' <td width=\"1%\" nowrap>&nbsp;'.ExibeUnidade('../',$w_cliente,f($row,'sg_unidade_solic'),f($row,'sq_unidade'),$TP).'&nbsp;</td>');\r\n else ShowHTML(' <td width=\"1%\" nowrap>&nbsp;'.f($row,'sg_unidade_solic').'&nbsp;</td>');\r\n ShowHTML(' <td>'.f($row,'justificativa').'</td>');\r\n ShowHTML(' <td width=\"1%\" nowrap align=\"center\">&nbsp;'.formatNumber(f($row,'qt_itens'),0).'&nbsp;</td>');\r\n if ($P1>2) ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'valor')).'</td>');\r\n if ($P1!=1) ShowHTML(' <td>'.f($row,'nm_tramite').'</td>');\r\n if ($w_embed!='WORD') {\r\n ShowHTML(' <td class=\"remover\" width=\"1%\" nowrap>');\r\n if ($P1!=3 && $P1!=5 && $P1!=6) {\r\n // Se não for acompanhamento\r\n if ($w_copia>'') {\r\n // Se for listagem para cópia\r\n $sql = new db_getLinkSubMenu; $RS = $sql->getInstanceOf($dbms,$w_cliente,$_REQUEST['SG']);\r\n foreach($RS as $row1) { $RS = $row1; break; }\r\n } elseif ($P1==1) {\r\n // Se for cadastramento\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'Geral&R='.$w_pagina.$par.'&O=A&w_chave='.f($row,'sq_siw_solicitacao').'&w_tramite='.f($row,'sq_siw_tramite').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Altera as informações cadastrais do pedido\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'Excluir&R='.$w_pagina.$par.'&O=E&w_chave='.f($row,'sq_siw_solicitacao').'&w_tramite='.f($row,'sq_siw_tramite').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Exclusão do pedido.\">EX</A>&nbsp');\r\n ShowHTML(' <a class=\"HL\" href=\"'.$w_dir.$w_pagina.'Geral&R='.$w_pagina.$par.'&O=I&SG='.f($row,'sigla').'&w_menu='.$w_menu.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&w_copia='.f($row,'sq_siw_solicitacao').MontaFiltro('GET').'\" title=\"Gera um novo pedido a partir das informações deste.\">CO</a>&nbsp;');\r\n //ShowHTML(' <A class=\"hl\" HREF=\"javascript:this.status.value;\" onClick=\"window.open(\\''.montaURL_JS(null,$conRootSIW.$w_dir.$w_pagina.'Itens&R='.$w_pagina.$par.'&O=L&w_menu='.$w_menu.'&w_chave='.f($row,'sq_siw_solicitacao').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.' - Itens'.'&SG='.$SG).'\\',\\'Itens\\',\\'toolbar=no,width=780,height=530,top=30,left=10,scrollbars=yes\\');\" title=\"Escolhe os itens do pedido.\">Itens</A>&nbsp');\r\n //ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'Envio&R='.$w_pagina.$par.'&O=V&w_chave='.f($row,'sq_siw_solicitacao').'&w_tramite='.f($row,'sq_siw_tramite').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Encaminhamento do pedido\">EN</A>&nbsp');\r\n } elseif ($P1==2) {\r\n //ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'Anotacao&R='.$w_pagina.$par.'&O=V&w_chave='.f($row,'sq_siw_solicitacao').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Registra anotações para a solicitação, sem enviá-la.\">AN</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'envio&R='.$w_pagina.$par.'&O=V&w_chave='.f($row,'sq_siw_solicitacao').'&w_tramite='.f($row,'sq_siw_tramite').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Envia o pedido para outra fase.\">EN</A>&nbsp');\r\n if (f($row,'sg_tramite')=='EA') {\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'Atender&R='.$w_pagina.$par.'&O=T&w_chave='.f($row,'sq_siw_solicitacao').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Dados do atendimento.\">AT</A>&nbsp');\r\n } elseif (f($row,'sg_tramite')=='EE') {\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'Concluir&R='.$w_pagina.$par.'&O=V&w_chave='.f($row,'sq_siw_solicitacao').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Conclusão do pedido.\">CO</A>&nbsp');\r\n } \r\n } \r\n } else {\r\n if (RetornaGestor(f($row,'sq_siw_solicitacao'),$w_usuario)=='S') {\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'envio&R='.$w_pagina.$par.'&O=V&w_chave='.f($row,'sq_siw_solicitacao').'&w_tramite='.f($row,'sq_siw_tramite').'&w_tipo=Volta&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" title=\"Envia o pedido para outro responsável.\">EN</A>&nbsp');\r\n } else {\r\n ShowHTML(' ---&nbsp');\r\n } \r\n } \r\n ShowHTML(' </td>');\r\n }\r\n ShowHTML(' </tr>');\r\n $w_parcial += f($row,'valor');\r\n }\r\n if ($P1>2) {\r\n if (ceil(count($RS)/$P4)>1) { \r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\">');\r\n ShowHTML(' <td colspan='.$colspan.' align=\"right\"><b>Total desta página&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_parcial).'&nbsp;</td>');\r\n ShowHTML(' <td colspan=2>&nbsp;</td>');\r\n ShowHTML(' </tr>');\r\n } \r\n // Se for a última página da listagem, soma e exibe o valor total\r\n if ($P3==ceil(count($RS)/$P4)) {\r\n reset($RS);\r\n foreach($RS as $row) $w_total += f($row,'valor');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\">');\r\n ShowHTML(' <td colspan='.$colspan.' align=\"right\"><b>Total da listagem&nbsp;</td>');\r\n ShowHTML(' <td align=\"right\"><b>'.formatNumber($w_total).'&nbsp;</td>');\r\n ShowHTML(' <td colspan=2>&nbsp;</td>');\r\n ShowHTML(' </tr>');\r\n } \r\n }\r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n if ($w_embed!='WORD') {\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n if ($R>'') {\r\n MontaBarra($w_dir.$w_pagina.$par.'&R='.$R.'&O='.$O.'&P1='.$P1.'&P2='.$P2.'&TP='.$TP.'&SG='.$SG.'&w_copia='.$w_copia,ceil(count($RS)/$P4),$P3,$P4,count($RS));\r\n } else {\r\n MontaBarra($w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O='.$O.'&P1='.$P1.'&P2='.$P2.'&TP='.$TP.'&SG='.$SG.'&w_copia='.$w_copia,ceil(count($RS)/$P4),$P3,$P4,count($RS));\r\n } \r\n ShowHTML('</tr>');\r\n } \r\n } elseif (strpos('CP',$O)!==false) {\r\n if ($O=='C') {\r\n // Se for cópia\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td><div align=\"justify\">Para selecionar o pedido que deseja copiar, informe nos campos abaixo os critérios de seleção e clique sobre o botão <i>Aplicar filtro</i>. Clicando sobre o botão <i>Remover filtro</i>, o filtro existente será apagado.</div><hr>');\r\n } else {\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td><div align=\"justify\">Informe nos campos abaixo os valores que deseja filtrar e clique sobre o botão <i>Aplicar filtro</i>. Clicando sobre o botão <i>Remover filtro</i>, o filtro existente será apagado.</div><hr>');\r\n } \r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\" valign=\"top\"><table border=0 width=\"90%\" cellspacing=0>');\r\n AbreForm('Form',$w_dir.$w_pagina.$par,'POST','return(Validacao(this));',null,$P1,$P2,$P3,null,$TP,$SG,$R,'L');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n if ($O=='C') {\r\n // Se for cópia, cria parâmetro para facilitar a recuperação dos registros\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"OK\">');\r\n } \r\n ShowHTML(' <tr><td colspan=\"2\">');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n if ($P1!=1 || $O=='C') {\r\n // Se não for cadastramento ou se for cópia\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b>Número do <U>p</U>edido:<br><INPUT ACCESSKEY=\"P\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"p_codigo\" size=\"20\" maxlength=\"60\" value=\"'.$p_codigo.'\"></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoPessoa('<u>S</u>olicitante:','N','Selecione o solicitante do pedido na relação.',$p_solicitante,null,'p_solicitante','USUARIOS');\r\n SelecaoUnidade('<U>U</U>nidade solicitante:','U','Selecione a unidade solicitante do pedido',$p_unidade,null,'p_unidade','CLCP',null);\r\n ShowHTML(' <tr>');\r\n ShowHTML(' <td><b><u>D</u>ata de recebimento e limite para atendimento:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"p_ini_i\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$p_ini_i.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"> e <input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"p_ini_f\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$p_ini_f.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"></td>');\r\n if ($O!='C') {\r\n // Se não for cópia\r\n ShowHTML('<tr>');\r\n SelecaoFaseCheck('Recuperar fases:','S',null,$p_fase,$P2,'p_fase',null,null);\r\n } \r\n } \r\n ShowHTML(' <tr>');\r\n ShowHTML(' <td><b><U>L</U>inhas por página:<br><INPUT ACCESSKEY=\"L\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"P4\" size=\"4\" maxlength=\"4\" value=\"'.$P4.'\"></td></tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Aplicar filtro\">');\r\n if ($O=='C') {\r\n // Se for cópia\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&w_menu='.$w_menu.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG).'\\';\" name=\"Botao\" value=\"Abandonar cópia\">');\r\n } else {\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&w_menu='.$w_menu.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG).'\\';\" name=\"Botao\" value=\"Remover filtro\">');\r\n } \r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n if ($w_tipo=='PDF') RodapePDF();\r\n else Rodape();\r\n}", "title": "" }, { "docid": "80d008e253fd994311f91e41888624fd", "score": "0.5114984", "text": "function tipoCliente() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n $w_chave = $_REQUEST[\"w_chave\"];\r\n $w_troca = $_REQUEST[\"w_troca\"];\r\n\r\n if ($w_troca > '') { // Se for recarga da página\r\n $w_tipo = $_REQUEST[\"w_tipo\"];\r\n $w_nome = $_REQUEST[\"w_nome\"];\r\n }\r\n elseif ($O == 'L') {\r\n //Recupera todos os registros para a listagem\r\n $SQL = \"select sq_tipo_cliente as chave, ds_tipo_cliente, ds_registro, tipo, \" . $crlf .\r\n \" case tipo when '1' then 'Secretaria' \" . $crlf .\r\n \" when '2' then 'Regional' \" . $crlf .\r\n \" when '3' then 'Escola' \" . $crlf .\r\n \" end nm_tipo \" . $crlf .\r\n \" from sbpi.Tipo_Cliente \" . $crlf;\r\n $RS = db_exec :: getInstanceOf($dbms, $SQL, & $numRows);\r\n }\r\n elseif (strpos(\"AEV\", $O) !== false && $w_troca == '') {\r\n //Recupera os dados do endereço informado\r\n $SQL = \"select sq_tipo_cliente as chave, ds_tipo_cliente, ds_registro, tipo, \" . $crlf .\r\n \" case tipo when '1' then 'Secretaria' \" . $crlf .\r\n \" when '2' then 'Regional' \" . $crlf .\r\n \" when '3' then 'Escola' \" . $crlf .\r\n \" end nm_tipo \" . $crlf .\r\n \" from sbpi.Tipo_Cliente \" . $crlf .\r\n \" where sq_tipo_Cliente = \" . $w_chave;\r\n $RS = db_exec :: getInstanceOf($dbms, $SQL, & $numRows);\r\n foreach ($RS as $row) {\r\n $RS = $row;\r\n break;\r\n }\r\n $w_tipo = f($RS, \"tipo\");\r\n $w_nome = f($RS, \"ds_tipo_cliente\");\r\n }\r\n\r\n Cabecalho();\r\n ShowHTML('<HEAD>');\r\n ShowHTML('<script type=\"text/javascript\" src=\"js/modal/js/ajax.js\"></script>');\r\n ShowHTML('<script type=\"text/javascript\" src=\"js/modal/js/ajax-dynamic-content.js\"></script> ');\r\n ShowHTML('<script type=\"text/javascript\" src=\"js/modal/js/modal-message.js\"></script> ');\r\n ShowHTML('<link rel=\"stylesheet\" href=\"js/modal/css/modal-message.css\" type=\"text/css\" media=\"screen\" />');\r\n ShowHTML('<script language=\"javascript\" type=\"text/javascript\" src=\"js/jquery.js\"></script>');\r\n ShowHTML('<script language=\"javascript\" type=\"text/javascript\" src=\"js/funcoes.js\"></script>');\r\n if (strpos(\"IAEP\", $O) !== false) {\r\n ScriptOpen(\"JavaScript\");\r\n CheckBranco();\r\n FormataData();\r\n ValidateOpen(\"Validacao\");\r\n if (strpos(\"IA\", $O) !== false) {\r\n //Validate (\"w_dt_mensagem\" , \"Data\" , \"DATA\" , \"1\" , \"10\" , \"10\" , \"1\" , \"1\");\r\n Validate(\"w_nome\", \"Nome\", \"\", \"1\", \"2\", \"50\", \"1\", \"1\");\r\n }\r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n }\r\n ShowHTML('</HEAD>');\r\n if ($w_troca > \"\") {\r\n BodyOpen('onLoad=\"document.Form.' . $w_troca . '.focus()\";');\r\n }\r\n elseif ($O == \"I\" or $O == \"A\") {\r\n BodyOpen(\"onLoad='document.Form.w_nome.focus()';\");\r\n } else {\r\n BodyOpen(\"onLoad='document.focus()';\");\r\n }\r\n ShowHTML('<B><FONT COLOR=\"#000000\">Cadastro de tipos de Instituições </FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<div align=center><center>');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\">');\r\n If ($O == 'L') {\r\n //Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td><font size=\"2\"><a accesskey=\"I\" class=\"SS\" href=\"' . $dir . $w_pagina . $par . $w_ew . \"&R=\" . $w_pagina . $par . \"&O=I&CL=\" . $CL . '\"><u>I</u>ncluir</a>&nbsp;');\r\n ShowHTML(' <td align=\"right\"><b>Registros existentes: ' . count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" bgcolor=\"' . $conTableBgColor . '\" BORDER=\"' . $conTableBorder . '\" CELLSPACING=\"' . $conTableCellSpacing . '\" CELLPADDING=\"' . $conTableCellPadding . '\" BorderColorDark=\"' . $conTableBorderColorDark . '\" BorderColorLight=\"' . $conTableBorderColorLight . '\">');\r\n ShowHTML(' <tr bgcolor=\"' . $conTrBgColor . '\" align=\"center\">');\r\n ShowHTML(' <td><b>Descrição</font></td>');\r\n ShowHTML(' <td><b>Tipo</font></td>');\r\n ShowHTML(' <td><b>Operações</font></td>');\r\n ShowHTML(' </tr>');\r\n if (count($RS) <= 0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"' . $conTrBgColor . '\"><td colspan=5 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n foreach ($RS as $row) {\r\n $w_cor = ($w_cor == $conTrBgColor || $w_cor == '') ? $w_cor = $conTrAlternateBgColor : $w_cor = $conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"' . $w_cor . '\" valign=\"top\">');\r\n ShowHTML(' <td>' . f($row, \"ds_tipo_cliente\") . '</td>');\r\n switch (f($row, \"tipo\")) {\r\n case 1 :\r\n ShowHTML(' <td align=\"center\">Secretaria</font></td>');\r\n break;\r\n case 2 :\r\n ShowHTML(' <td align=\"center\">Regional</font></td>');\r\n break;\r\n case 3 :\r\n ShowHTML(' <td align=\"center\">Escola Pública</font></td>');\r\n break;\r\n case 4 :\r\n ShowHTML(' <td align=\"center\">Escola Privada</font></td>');\r\n break;\r\n default :\r\n ShowHTML(' <td>---</td>');\r\n break;\r\n }\r\n ShowHTML(' <td align=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"HL\" HREF=\"' . $w_dir . $w_pagina . $par . '&R=' . $w_pagina . $par . '&O=A&w_chave=' . f($row, 'chave') . '\">Alterar</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"' . $w_dir . $w_pagina . $par . '&R=' . $w_pagina . $par . '&O=E&w_chave=' . f($row, 'chave') . '\" onClick=\"return confirm(\\'Confirma a exclusão do registro?\\');\">Excluir</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n }\r\n }\r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n }\r\n elseif (strpos(\"IAEV\", $O) !== false) {\r\n if (strpos(\"EV\", $O) !== false) {\r\n $w_Disabled = ' DISABLED ';\r\n }\r\n AbreForm('Form', $w_dir . $w_pagina . 'Grava', 'POST', 'return(Validacao(this));', null);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"SG\" value=\"TIPOCLIENTE\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"CL\" value=\"' . $CL . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"' . $w_chave . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_cliente\" value=\"' . $_SESSION[\"CL\"] . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"O\" value=\"' . $O . '\">');\r\n\r\n ShowHTML('<tr bgcolor=\"' . '#EFEFEF' . '\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"95%\" border=\"0\">');\r\n ShowHTML(' <tr><td valign=\"\"top\"\" colspan=\"\"3\"\"><table border=0 width=\"\"100%\"\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\"><td valign=\"top\"><b>D<u>e</u>scrição:</b><br><input ' . $w_Disabled . ' accesskey=\"E\" type=\"text\" name=\"w_nome\" class=\"STI\" SIZE=\"60\" MAXLENGTH=\"60\" VALUE=\"' . $w_nome . '\" ></td></tr>');\r\n ShowHTML(' <TD><font size=\"2\" CLASS=\"BTM\"><b>Tipo:</b> ');\r\n if ($w_tipo == 1) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\" checked> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\"> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\"> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n elseif ($w_tipo == 2) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\" checked> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\"> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n elseif ($w_tipo == 3) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\"> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\" checked> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n elseif ($w_tipo == 4) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\"> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\"> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\" checked> Escola Privada ');\r\n } else {\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria de Ensino do DF ');\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"2\"> Rede de Ensino ');\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"3\" checked> Escola Pública');\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr>');\r\n ShowHTML(' <tr><td align=\"\"center\"\" colspan=4><hr>');\r\n\r\n if ($O == 'E') {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O == \"I\") {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n }\r\n }\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\'' . $dir . $w_pagina . $par . $w_ew . \"&CL=\" . $CL . '&O=L\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen(\"JavaScript\");\r\n ShowHTML(' alert(\\'Opção não disponível\\');');\r\n //ShowHTML (' history.back(1);');\r\n ScriptClose();\r\n }\r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n\r\n }", "title": "" }, { "docid": "d96ec3bc6911c0e744dcacb9d79f8797", "score": "0.5107959", "text": "function ingresarInventarioUbicacionFueraPlanta() {\n\t\t$conUltimo=\"SELECT ID_INVENTARIO_UBICACION FROM inventario_ubicacion ORDER BY ID_INVENTARIO_UBICACION DESC\";\n\t\t$cons=new consecutivo(\"EUB\",$conUltimo);\n\t\t$this->idInventarioUbicacion=$cons->retornar();\n\t\t$ubi=new ubicacion(\"\",$this->idGerencia,$this->idDivision,$this->idDepartamento,$this->idSitio);\n\t\t$this->idUbicacion=$ubi->ingresar();\n\t\t$this->statusActual='1';\n\t\tconectarMysql();\n\t\t$conInsertar=\"INSERT INTO inventario_ubicacion (ID_INVENTARIO_UBICACION,ID_INVENTARIO,ID_UBICACION,STATUS_ACTUAL,FECHA_ASOCIACION)\n\t\tVALUES ('$this->idInventarioUbicacion','$this->idInventario','$this->idUbicacion','$this->statusActual','$this->fechaAsociacion')\";\n\t\t$result=mysql_query($conInsertar);\n\t\t$affected=mysql_affected_rows();\n\t\tif($affected>0) {\n\t\t\tmysql_close();\n\t\t\treturn 0;\n\t\t} else {\n\t\t\tmysql_close();\n\t\t\treturn 1;\n\t\t}\n\t}", "title": "" }, { "docid": "96b997c375779ec422de0e1a0e57f528", "score": "0.5106127", "text": "function CENTRO_comprobar_ADD()\n{\n\tglobal $ERRORS_array_test;\n// creo array de almacen de test individual\n\t$CENTRO_array_test1 = array();\n\n\t//sexo correcto\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'comprobar_atributos_ADD';\n\t$CENTRO_array_test1['error'] = 'correcto';\n\t$CENTRO_array_test1['error_esperado'] = 'true';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de usuario\t\n\t$centro = 'miusuario';\n\t$codEdi = 'CodEdi';\n\t$nombre = 'minombre'; \n\t$direccion = 'miapellido';\n\t$responsable = 'miemail';\n// creo el modelo\n\t$CENTRO = new CENTRO_Model($centro,$codEdi,$nombre,$direccion,$responsable);\n\n\t$CENTRO_array_test1['error_obtenido'] = $CENTRO->comprobar_atributos_ADD() == 1 ? 'true' : 'false';\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t//sexo vacia\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'comprobar_atributos_ADD';\n\t$CENTRO_array_test1['error'] = 'Codigo y nombre del edificio erroneos';\n\t$CENTRO_array_test1['error_esperado'] = 'CodEdificio-00002-toolong-NomCentro-00030-textonly-';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de usuario\t\n\t$centro = 'miusuario';\n\t$codEdi = 'CodEdiasdasdasdasdasdasdasdadsd';\n\t$nombre = 'minre!!1'; \n\t$direccion = 'miapellido';\n\t$responsable = 'miemail';\n// creo el modelo\n\t$CENTRO = new CENTRO_Model($centro,$codEdi,$nombre,$direccion,$responsable);\n\n\t$array = $CENTRO->comprobar_atributos_ADD();\n\t//var_dump($array);\n\tforeach ($array as $key ) {\n\t\tforeach ($key as $key2) {\n\t\t\t$result .= $key2.'-';\n\t\t}\n\t}\n\t$CENTRO_array_test1['error_obtenido'] = $result;\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t\n}", "title": "" }, { "docid": "418471c42d69ecdde42f1a37f21b8bb9", "score": "0.5101496", "text": "function insertarClaseComprobante(){\n\t\t$this->procedimiento='conta.ft_clase_comprobante_ime';\n\t\t$this->transaccion='CONTA_CCOM_INS';\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_documento','id_documento','int4');\n\t\t$this->setParametro('tipo_comprobante','tipo_comprobante','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('momento_comprometido','momento_comprometido','varchar');\n\t\t$this->setParametro('momento_ejecutado','momento_ejecutado','varchar');\n\t\t$this->setParametro('momento_pagado','momento_pagado','varchar');\n\t\t$this->setParametro('tiene_apertura','tiene_apertura','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "87cb4e371526daee4a3cea9f74d8e050", "score": "0.51004046", "text": "function get_libelle_feuille(){\r\n\t\t$nb = $this->get_nb_niveaux();\r\n\t\treturn $this->get_libelle_niveau($nb);\r\n\t}", "title": "" }, { "docid": "d934a97e80e20de146b17ae090bdc9bc", "score": "0.5093321", "text": "function Graba_OS($cons,&$msg) {\nwriteeventws(\"Inicia Graba_OS xml entrada->\". $cons);\n$enc = array() ;\n\t$xmlObj = new SimpleXMLParser;\n\tif (($xml = $xmlObj->Parse($cons, \"req\"))==\"\"){return func_error(\"00\",\"tag REQ vacio en xml\",\"\");\t}\t\n\n\t//HEADER\n\tif (($xmlheader = $xmlObj->Parse($xml, \"encabezado\"))==\"\"){return func_error(\"01\",\"tag ENCABEZADO vacio en xml\",$xmlheader);}\n\tif (($local = $xmlObj->Parse($xmlheader, \"local\"))==\"\"){return func_error(\"02\",\"tag LOCAL vacio en xml\",$xmlheader);\t}\n\tif (($enc[0] = $xmlObj->Parse($xmlheader, \"local\"))==\"\"){return func_error(\"02\",\"tag LOCAL vacio en xml\",$xmlheader);\t}\n\tif (($rut = $xmlObj->Parse($xmlheader, \"rut\"))==\"\"){return func_error(\"03\",\"tag RUT vacio en xml\",$xmlheader);\t}\n\tif (($enc[1] = $xmlObj->Parse($xmlheader, \"rut\"))==\"\"){return func_error(\"03\",\"tag RUT vacio en xml\",$xmlheader);\t}\n\n\tif ($local && $rut) {\n\t\twriteeventws(\"Graba_OS : Existe Local y rut\");\n\t\t$encabezado=1;\n\t}\n\tif(!$local){\n\t\t$encabezado=0;\n\t\treturn func_error(\"04\",\"tag Local en el header, vacio\",$xmlheader);\n\t}\n\tif(!$rut){\n\t\t$encabezado=0;\n\t\treturn func_error(\"05\",\"tag Rut en el header, vacio\",$xmlheader);\n\t}\n\t\n\t//Revisa numero de productos\n\tif (($maxProduct = $xmlObj->MaxElements($xml, \"detalle\"))==0)\n\t\treturn func_error(\"06\",\"XML sin productos\",$xmlheader); \n \n\t$i=0;\n\t$lineadetalle=0;\n\twhile($i<$maxProduct){\n\t\tif (($xmlProduct = $xmlObj->Parse($xml, \"detalle\",$i))==\"\"){\n\t\t\treturn func_error(\"07\",\"tag PRODUCT[$i] en la detalle de producto, vacio\",$xmlheader);\n\t\t}\n\t\tif (($prd[$i]['precio'] = $xmlObj->Parse($xmlProduct, \"precio\"))==\"\"){\n\t\t\treturn func_error(\"08\",\"'precio' de producto[$i] en el data, vacio\",$xmlheader);\t\n\t\t}\n\t\tif (($prd[$i]['cantidad'] = $xmlObj->Parse($xmlProduct, \"cantidad\"))==\"\"){\n\t\t\treturn func_error(\"09\",\"'cantidad' de producto[$i] en el data, vacio\",$xmlheader);\n\t\t}\n\t\tif (($prd[$i]['ean'] = $xmlObj->Parse($xmlProduct, \"ean\"))==\"\"){\n\t\t\treturn func_error(\"10\",\"'ean' de producto[$i] en el data, vacio\",$xmlheader);\n\t\t}\n\t\tif (($prd[$i]['precio'])&&($prd[$i]['cantidad'])&&($prd[$i]['ean'])){\n\t\t\t$lineadetalle++;\n\t\t}else{\n\t\t\t$lineadetalle=0;\t\t\n\t\t\treturn func_error(\"11\",\"'precio' o 'cantidad' o 'ean' sin datos ,vacio\",$xmlheader);\n\t\t}\n\t\t$i++;\n\t}\n\n\t//GENERA ENCABEZADO COTIZACION\n\ttep_db_query(\"set autocommit=0\");\n\tif ($encabezado &&($lineadetalle==$i)){\n\t\twriteeventws('Graba_OS : cumple con 2 parametros de encabezado y con al menos un detalle');\n\t}else{\n\t\twriteeventws('Graba_OS : faltan datos no puede enviar');\n\t\treturn func_error(\"12\",\"no se puede enviar datos para creacion de OS, falta encabezado o detalle\",$xmlheader);\n\t}\n\n\t/*Validaciones Validar local existente*/\n\tif (!$enc[0]=verifica_local($local)){\n\t\twriteeventws('Graba_OS :No se verifica local');\n\t\treturn func_error(\"13\",\"No se verifica local para local $local\");\n\t}else{\n\t\twriteeventws('Graba_OS : Se verifica local ->'.$enc[0]);\n\t}\n\n\tif (!$enc[1]=verifica_rut($rut)){\n\t\twriteeventws('Graba_OS :No se verifica Rut ->'.$rut);\n\t\treturn func_error(\"14\",\"No se verifica,erroneo rut $rut\");\n\t}else{\n\t\twriteeventws('Graba_OS : Se verifica Rut, rut correcto ->'.$enc[1]);\n\t\t$rutnuevo=verifica_cliente($enc[1]);\n\t}\n\tif ($rutnuevo){\n\t\twriteeventws('Graba_OS : Se obtiene Rut Cliente ->'.$rutnuevo);\n\t\t$enc[1]=$rutnuevo;\n\t}\n\n\t//GENERA DETALLE DE COTIZACION X CADA PRODUCTO \n\t$i=0;\n\twhile($i<$maxProduct){\n\t\t$verifica=1;\n\t\t/*Verifica productos*/\n\t\tif(!$vp=verifica_precio($prd[$i]['precio'])){\n\t\t\t$verifica=0;\n\t\t\twriteeventws('Graba_OS :No se verifica precio ->'.$prd[$i]['precio']);\n\t\t\treturn func_error(\"16\",\"No se verifica precio =\".$prd[$i]['precio'],$prd[$i]['precio'],$id_os);\n\t\t}\n\t\tif(!$eanl=verifica_ean($prd[$i]['ean'])){\n\t\t\t$verifica=0;\n\t\t\twriteeventws('Graba_OS :No se verifica ean ->'.$prd[$i]['ean']);\n\t\t\treturn func_error(\"17\",\"No se verifica ean =\".$prd[$i]['ean'].\" \",$id_os);\n\t\t}\n\t\tif(!$eanv=verifica_eancp($prd[$i]['ean'])){\n\t\t\t$verifica=0;\t\t\t\n\t\t\twriteeventws('Graba_OS :No se verifica ean ->'.$prd[$i]['ean'].' en CPE ');\n\t\t\treturn func_error(\"18\",\"No se verifica ean = \".$prd[$i]['ean'].\" en CPE \",$prd[$i]['ean'],$id_os);\n\t\t}\n\t\tif(!$vcantidad=verifica_cantidad($prd[$i]['cantidad'])){\n\t\t\t$verifica=0;\n\t\t\twriteeventws('Graba_OS :No se verifica cantidad ->'.$prd[$i]['cantidad']);\n\t\t\treturn func_error(\"19\",\"No se verifica cantidad =\".$prd[$i]['cantidad'],$id_os);\n\t\t}\n\t\t$i++;\n\t}\n\tif($verifica){\n\t$id_os = inserta_os($enc,$msg);\n\t\tif (!$id_os) return func_error(\"15\",\"No es posible insertar la OS \",$xmlheader,$msg);\n\t\t$j=0;\n\t\twhile($j<$maxProduct){\t\t\t \n\t\t$origen=4;\n\t\t$id_tipodespacho=3; # retira cliente\n\t\t$arrayean = recuperadatos_eancp($prd[$j]['ean']);\n\t\t$id_producto = $arrayean[4];\n\t\t$prod_tipo = $arrayean[8];\n\t\t$prod_subtipo = $arrayean[9];\n\t\t$cod_prod1 = $arrayean[1];\n \t\t$des_larga = $arrayean[7];\n\t\t\t$id_os_detalle = inserta_os_detalle($origen,\n\t\t\t\t\t\t\t\t$id_tipodespacho,\t\t \n\t\t\t\t\t\t\t\t$id_producto,\n\t\t\t\t\t\t\t\t$id_os,\t\t \n\t\t\t\t\t\t\t\t$prod_tipo,\n\t\t\t\t\t\t\t\t$prod_subtipo,\t\t \t\t\t \n\t\t\t\t\t\t\t\t$prd[$j]['precio'],\n\t\t\t\t\t\t\t\t$prd[$j]['cantidad'], \n\t\t\t\t\t\t\t\t$cod_prod1,\n\t\t\t\t\t\t\t\t$des_larga, \n\t\t\t\t\t\t\t\t$prd[$j]['ean']);\n\n\t\t\tif (!$id_os_detalle) {\n\t\t\t\t//rollback;\n\t\t\t\ttep_db_query(\"rollback\");\n\t\t\t\treturn func_error(\"20\",\"No es posible insertar el producto =\".($prd[$j]['ean']).\" en el detalle de la OS $id_os\",$xmlheader,$id_os);\n\t\t\t}else{\n\t\t\t\t$estado=1;\n\t\t\t}\n\t\t\t$j++;\n\t\t}\n\t}\n\t//commit ok;\n\ttep_db_query(\"commit\");\n\n\t//autocommit=1;\n\ttep_db_query(\"set autocommit=1\");\n\t\n\t$xmlresp='<?xml version=\"1.0\"?>\n\t\t<resp>\n\t\t<os>'.$id_os.'</os>\n\t\t<estado>'.$estado.' </estado>\n\t\t<desc></desc>\n\t</resp>';\n\twriteeventws(\"Graba_OS : Finaliza con $xmlresp\");\n\treturn $xmlresp;\n\t}", "title": "" }, { "docid": "83e0f2cb32331c1222afca5c4e245e1a", "score": "0.5093005", "text": "function CENTRO_comprobar_nombre_test()\n{\n\tglobal $ERRORS_array_test;\n// creo array de almacen de test individual\n\t$CENTRO_array_test1 = array();\n\n// nombre correcto\n//----------------------------------------------\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Nombre';\n\t$CENTRO_array_test1['error'] = 'correcto';\n\t$CENTRO_array_test1['error_esperado'] = 'true';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\t$nombre = 'nombre';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model('','',$nombre,'','');\n\n\tif ($CENTRO->comprobar_nombre()) $res = 'true';\n\telse $res = 'false';\n\n\t$CENTRO_array_test1['error_obtenido'] = $res;\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\n\t//nombre demasiado largo\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Nombre';\n\t$CENTRO_array_test1['error'] = 'demasiado largo';\n\t$CENTRO_array_test1['error_esperado'] = '00002';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$nombre = 'miCENTROesElMasLargoDelMundoYCabraEnLaBaseDeDatosPorqueSoyGenial';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model('','',$nombre,'','');\n\n\t$result = $CENTRO->comprobar_nombre();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t//nombre demasiado corto\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Nombre';\n\t$CENTRO_array_test1['error'] = 'demasiado corto';\n\t$CENTRO_array_test1['error_esperado'] = '00003';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$nombre = 'm';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model('','',$nombre,'','');\n\n\t$result = $CENTRO->comprobar_nombre();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t//nombre vacio\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Nombre';\n\t$CENTRO_array_test1['error'] = 'vacio';\n\t$CENTRO_array_test1['error_esperado'] = '00001';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$nombre = '';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model('','',$nombre,'','');\n\n\t$result = $CENTRO->comprobar_nombre();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\n\t//nombre formato erroneo\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'Nombre';\n\t$CENTRO_array_test1['error'] = 'formato erroneo';\n\t$CENTRO_array_test1['error_esperado'] = '00030';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de CENTRO\t\n\t$nombre = 'mi|pass.14';\n\t// creo el modelo\n\t$CENTRO = new CENTRO_Model('','',$nombre,'','');\n\n\t$result = $CENTRO->comprobar_nombre();\n\t$CENTRO_array_test1['error_obtenido'] = $result[1];\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n}", "title": "" }, { "docid": "4bc0e1bb9f56e8be867c442e1c000871", "score": "0.50926673", "text": "function toracommu_calss() {\r\n\r\n\t\t}", "title": "" }, { "docid": "fe48f0c25ccf6390d22b19459257ffe1", "score": "0.50922877", "text": "function omnisoftProcesarAlumnosNotas($serial_hrr) \n{\n global $dblink;\n $actualizacion=false;\n $contmatricula=\"SELECT\n mmat.SERIAL_MMAT,CONCAT_WS(' ',apellidopaterno_alu,apellidomaterno_alu,nombre1_alu,nombre2_alu) AS ALUMNO\nFROM\n ALUMNO ALU,\n materiamatriculada mmat,\n detallemateriamatriculada dmat,\n horario hrr\n\nWHERE\n alu.serial_alu=mmat.SERIAL_ALU \n AND mmat.SERIAL_MMAT=dmat.serial_mmat \n AND dmat.serial_hrr =hrr.SERIAL_HRR \n AND hrr.SERIAL_HRR=\".$serial_hrr.\" group by serial_mmat\";\n\t\n$rsmatricula= $dblink->GetAll($contmatricula);\n$totAll = count($rsmatricula);\n//echo \"jffhjj\".$contmatricula;\n // $rsmatricula=$dblink->Execute($contmatricula);\t\n \n$concabeceracxt=\"SELECT\n distinct(dcpt.serial_mmat)\nFROM\n detallecreditoportomar dcpt,\n cabeceracreditosportomar ccpt \nWHERE\n dcpt.serial_cpt=ccpt.serial_cpt \n AND dcpt.serial_mmat IN ( SELECT\n mmat.SERIAL_MMAT \n FROM\n ALUMNO ALU,\n materiamatriculada mmat,\n detallemateriamatriculada dmat,\n horario hrr \n WHERE\n alu.serial_alu=mmat.SERIAL_ALU \n AND mmat.SERIAL_MMAT=dmat.serial_mmat \n AND dmat.serial_hrr =hrr.SERIAL_HRR \n AND hrr.SERIAL_HRR=\".$serial_hrr.\"\n )\";\n\t\n\n//echo $concabeceracxt;\t\n$rscontcreditoxt= $dblink->GetAll($concabeceracxt);\n\n$totAll1 = count($rscontcreditoxt);\n//echo \"1:\".$totAll1.\"2.. \".$totAll1;\nif($totAll==$totAll1){\n\t\n\t//echo \"Ingreso\";\t\n\t$Estudiantes=\"SELECT\n dmat.serial_dmat, numerocreditos_dmat,\n dmat.serial_mmat ,dmat.retiromateria_dmat\nFROM\n horario hrr,\n detallemateriamatriculada dmat \nWHERE\n hrr.serial_hrr=dmat.serial_hrr \n AND dmat.serial_hrr=\".$serial_hrr;\n\t\n \t//echo $Estudiantes;\n\t$rsestudiatesRetiro=$dblink->Execute($Estudiantes);\t\n\t\t//$i=0;\n\twhile(!$rsestudiatesRetiro->EOF)\n\t{\n\t\t$sqldetallecreditosxtomar=\"SELECT\n dcxtomar.serial_mmat, dcxtomar.serial_cpt,\n ccxtomar.* \nFROM\n detallecreditoportomar dcxtomar,\n cabeceracreditosportomar ccxtomar \nWHERE ccxtomar.serial_cpt=dcxtomar.serial_cpt AND serial_mmat=\".$rsestudiatesRetiro->fields['serial_mmat'];\n\t//echo \"<br>\".$sqldetallecreditosxtomar;\n\t$rscreditoportomar=$dblink->Execute($sqldetallecreditosxtomar);\n\t\t\n\t\t\t\t\tif($rsestudiatesRetiro->fields['creditosequivalentes_dmat']==0){\n\t\t\t\t\t\t$auxcreditos=$rsestudiatesRetiro->fields['numerocreditos_dmat'];\n\t\t\t\t\t\t}\n\t\t\t\t\telse {$auxcreditos=$rsestudiatesRetiro->fields['creditosequivalentes_dmat'];}\n\t\t\t\n\t\t\tif($rscreditoportomar->fields['observaciones_cpt']==''){\n\t\t\t$retirosRealizados=\" No.\".$rscreditoportomar->fields['serial_mmat'].' con '.$auxcreditos.\" creditos \";\n\t\t\t}else{\n\t\t\t\t$retirosRealizados=$rscreditoportomar->fields['observaciones_cpt'].\"|\".\" No.\".$rscreditoportomar->fields['serial_mmat'].' con '.$auxcreditos.\" creditos\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($rsestudiatesRetiro->fields['retiromateria_dmat']==''){\n\t\t\t\t\t\n\t\t\t\t\t$creditopendiente=\"update cabeceracreditosportomar ,detallemateriamatriculada dmat set afavor_cpt = afavor_cpt+\".$auxcreditos.\", estado_cpt='ABIERTA',observaciones_cpt='\".$retirosRealizados.\"', dmat.retiromateria_dmat='SIN COSTO',dmat.fecharetiro_dmat=(select curdate()) WHERE serial_cpt=\" .$rscreditoportomar->fields['serial_cpt'].\" and dmat.serial_dmat=\".$rsestudiatesRetiro->fields['serial_dmat'];\n\t\t\t\t\t//echo \"<br>\".$creditopendiente;\n\t\t\t\t\t$rseditarCreditos=$dblink->Execute($creditopendiente);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t$rsestudiatesRetiro->MoveNext();\n\t\t}\n\t}\t\n\nelse {\n\t\t$aux=\"\";\t\n\tfor($i=0;$i<$totAll;$i++)\n\t{\n\t//echo \"fdsfss\".$rsmatricula[$i]['SERIAL_MMAT'];\n\t$num=0;\n\tfor($j=0;$j<$totAll;$j++){\n\t\tif($rsmatricula[$i]['SERIAL_MMAT']==$rscontcreditoxt[$j]['serial_mmat']){\n\t\t$num=1;\n\t\t}\n\t\t\n\t\t}\t\n\t\t\n\t\tif($num==0)$aux=$aux.$rsmatricula[$i]['SERIAL_MMAT'].\" \".$rsmatricula[$i]['ALUMNO'].\" | \";\t\n\t}\n\techo $aux;\n\treturn $aux;\n}\n\n \n\n\t\n \n}", "title": "" }, { "docid": "f160addf45d670cfdf4678b066686ed0", "score": "0.5091236", "text": "function modif_o_nuevo(&$Sesion,&$aDatos){\n global $id_noticia;\n if($id_noticia==-1)\n return 0;\n else\n return 1;\n}", "title": "" }, { "docid": "162eee54f9d6554b5b632b25378f9fb2", "score": "0.50878733", "text": "public function getOrgaoCodom()\n {\n return $this->getValueByKey($this->values, 'INF_MIL_BASICO.OM_CODOM');\n }", "title": "" }, { "docid": "6e16fd35a513db7556a4eb61f07f9613", "score": "0.50854635", "text": "function modificarClaseComprobante(){\n\t\t$this->procedimiento='conta.ft_clase_comprobante_ime';\n\t\t$this->transaccion='CONTA_CCOM_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_clase_comprobante','id_clase_comprobante','int4');\n\t\t$this->setParametro('id_documento','id_documento','int4');\n\t\t$this->setParametro('tipo_comprobante','tipo_comprobante','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('momento_comprometido','momento_comprometido','varchar');\n\t\t$this->setParametro('momento_ejecutado','momento_ejecutado','varchar');\n\t\t$this->setParametro('momento_pagado','momento_pagado','varchar');\n\t\t$this->setParametro('tiene_apertura','tiene_apertura','varchar');\n\t\t\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": "379fa3f8dc18b612f1c761bffd8560f5", "score": "0.5074486", "text": "public function twoU()\n\t{\n\t\t\t\t\n\t}", "title": "" }, { "docid": "e795f4bef83dab0f7a1d9676069317b0", "score": "0.50710493", "text": "function autoriser_voirextra_dist($faire, $type, $id, $qui, $opt){\n\treturn true;\n}", "title": "" }, { "docid": "9056e241f0f327150134c76ea13d7919", "score": "0.5066522", "text": "static public function ctrImprimirCombrobante(){\n\n\t\tif (isset($_POST[\"TipoComprobante\"])) {\n\n\t\t\t$idVenta = $_POST[\"idVentaC\"];\n\n\t\t\t$comprobante = $_POST[\"TipoComprobante\"];\n\n\t\t\tswitch ($comprobante) {\n\n\t\t\t\tcase 'C':\n\t\t\t\t\techo '<script>\n\t\t\t\t\t \t\t\twindow.open(\"extensiones/tcpdf/pdf/factura.php?venta='.$idVenta.'\", \"_blank\");\n\t\t\t\t\t \t\t\twindow.location = \"ventas\";\n\t\t\t\t\t \t\t</script>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'X':\n\t\t\t\t\techo '<script>\n\t\t\t\t\t \t\t\twindow.open(\"extensiones/tcpdf/pdf/recibo.php?venta='.$idVenta.'\", \"_blank\");\n\t\t\t\t\t \t\t\twindow.location = \"ventas\";\n\t\t\t\t\t \t\t</script>';\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t# code...\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "48662adf44639be966e547f61d40b872", "score": "0.5065761", "text": "function afficheroffre2()\n\t{\n\t\t $tableau=array();\n\t\t$tabeaui=array(\n\t\t'Nomduproduit'=>'',\n\t\t'Prix'=>'',\n\t\t'Reduction'=>'',\n\t\t'Ladescription'=>'',\n\t );\n\t\t$sql=\"select * From offre \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\t$liste->execute();\n\t\t$i=0;\n\t\twhile($data=$liste->fetch()){\n\t\t\t\n\t\t\t$tabeaui['Nomduproduit']=$data['Nomduproduit'];\n\t\t\t$tabeaui['Prix']=$data['Prix'];\n\t\t\t$tabeaui['Reduction']=$data['Reduction'];\n\t\t\t$tabeaui['Ladescription']=$data['Ladescription'];\n\t\t\tarray_push($tableau,$tabeaui);\n\t\t}\n\t\treturn $tableau;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n return $tableau;\n\t\n\t}", "title": "" }, { "docid": "06d18aa86203d7a984ba7ef8b2b6eece", "score": "0.5064991", "text": "function aprovadorDeChamados($FUNCOES_USUARIO){\r\n\t\trequire_once '../gestaoti/include/PHP/class/class.parametro.php';\r\n\t\t$parametro = new parametro();\r\n\t\t$FUNCOES_ADM_TRANSPORTE_ESPECIAL = $parametro->GetValorParametro(\"FUNCOES_ADM_TRANSPORTE_ESPECIAL\");\t\t\r\n\t\t$FUNCOES = split(\",\",$FUNCOES_ADM_TRANSPORTE_ESPECIAL);\r\n\t\t\r\n\t\tfor ($x=0;$x < sizeof($FUNCOES_USUARIO); $x++){\r\n\t\t\tfor ($i=0;$i < sizeof($FUNCOES); $i++){\r\n\t\t\t\tif($FUNCOES_USUARIO[$x]==$FUNCOES[$i]){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false; \r\n\t}", "title": "" }, { "docid": "3beecaa0cf093a58056a1d9af28ceff2", "score": "0.50590336", "text": "static public function ctrCancelarAbono(){\n\t\tif(isset($_POST[\"editarCuenta\"])){\n\n\t\t\t$tabla=\"cuenta_ctejf\";\n\t\t\t$tabla2=\"abonosjf\";\n\t\t\t$datos = array(\"id\" => $_POST[\"idCuenta4\"],\n\t\t\t \t\t\t \"tipo_doc\"=>\"05\",\n\t\t\t\t\t\t \"num_cta\"=>$_POST[\"editarCuenta\"],\n\t\t\t\t\t\t \"cliente\"=>$_POST[\"editarCliente\"],\n\t\t\t\t\t\t \"vendedor\"=>$_POST[\"editarVendedor\"],\n\t\t\t\t\t\t \"monto\"=>$_POST[\"editarMonto\"],\n\t\t\t\t\t\t \"usuario\"=>$_POST[\"editarUsuario\"],\n\t\t\t\t\t\t \"fecha\"=>$_POST[\"editarFecha\"]);\n\n\t\t\t$respuesta=ModeloCuentas::mdlIngresarCuenta($tabla,$datos);\n\t\t\t$saldoNuevo=$_POST[\"editarSaldo\"]-$_POST[\"editarAbono\"];\n\t\t\tif($saldoNuevo<0){\n\t\t\t\t$vuelto=$saldoNuevo * -1;\n\t\t\t\t$abono=ModeloCuentas::mdlActualizarUnDato($tabla2,\"monto\",$vuelto,$_POST[\"idAbono\"]);\n\t\t\t\t$cuenta=ModeloCuentas::mdlActualizarUnDato($tabla,\"saldo\",0,$_POST[\"idCuenta4\"]);\n\t\t\t\t$cuenta=ModeloCuentas::mdlActualizarUnDato($tabla,\"estado\",\"CANCELADO\",$_POST[\"idCuenta4\"]);\n\t\t\t}else if($saldoNuevo == 0){\n\t\t\t\t$cuenta=ModeloCuentas::mdlActualizarUnDato($tabla,\"saldo\",0,$_POST[\"idCuenta4\"]);\n\t\t\t\t$cuenta=ModeloCuentas::mdlActualizarUnDato($tabla,\"estado\",\"CANCELADO\",$_POST[\"idCuenta4\"]);\n\t\t\t\t$abono=ModeloAbonos::mdlEliminarAbono($tabla2,$_POST[\"idAbono\"]);\n\t\t\t}else{\n\t\t\t\t$cuenta=ModeloCuentas::mdlActualizarUnDato($tabla,\"saldo\",$saldoNuevo,$_POST[\"idCuenta4\"]);\n\t\t\t\t$cuenta=ModeloCuentas::mdlActualizarUnDato($tabla,\"estado\",\"PENDIENTE\",$_POST[\"idCuenta4\"]);\n\t\t\t\t$abono=ModeloAbonos::mdlEliminarAbono($tabla2,$_POST[\"idAbono\"]);\n\t\t\t}\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\techo'<script>\n\n\t\t\tswal({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\ttitle: \"El abono ha sido cancelado correctamente\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\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 = \"cancelar-abonos\";\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t</script>';\n\n\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "149c552ace097430d6f199f26a145191", "score": "0.50548446", "text": "function aggiungi()\n\t\t{\n\t\t$this->valoriCrudi[] =\n\t\t\t$this->valori[] =\n\t\t\t$this->valoriOriginali[] = array_fill(0, $this->nrCampi(), $niente);\n\t\t$this->statiRecord[] = WADB_RECORD_NUOVO;\n\t\treturn ($this->righe[] = new waRecord($this, count($this->righe)));\n\t\t}", "title": "" }, { "docid": "e35f30b465c262f0d5e36a20eedcc1ee", "score": "0.505067", "text": "public function comboComposicao() {\n echo \"<label id=\\\"composicao\\\" style=\\\"display:none;width: auto\\\">Composi&ccedil;&atilde;o :\n <select name=\\\"composicao\\\" class=\\\"textfield\\\" id=\\\"comp\\\"disabled>\n <option value=\\\"-1\\\">Selecione</option>\n <option value=\\\"1\\\">I</option>\n <option value=\\\"2\\\">II</option>\n <option value=\\\"3\\\">III</option>\n <option value=\\\"4\\\">IV</option>\n </select>\n </label>\n <br/><br/>\n \";\n }", "title": "" }, { "docid": "1ca99a3ac6eae8f1094b38e858aea388", "score": "0.50506395", "text": "static public function ctrAnularVenta(){\n\n\t\tif (isset($_POST[\"motivoAnula\"])) {\n\n\t\t\t$tabla = \"Venta\";\n\t\t\t$tablaVentaDetalle = \"VentaDetalle\";\n\t\t\t$item = \"VentaID\";\n\t\t\t$valor = $_POST[\"idVentaA\"];\n\t\t\t$venta = $_POST[\"idVentaA\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\t//ACTUALIZAR FECHA ULTIMA COMPRA DEL CLIENTE\n\n\t\t\t$tablaClientes = \"Cliente\";\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlMostrarVentas($tabla, $itemVentas, $valorVentas);\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\n\t\t\t\tif ($value[\"ClienteID\"] == $traerVenta[\"ClienteID\"]) {\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"FechaVenta\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (count($guardarFechas) > 1) {\n\n\t\t\t\tif ($traerVenta[\"FechaVenta\"] > $guardarFechas[count($guardarFechas)-2]) {\n\n\t\t\t\t\t$item = \"UltimaCompra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorCliente = $traerVenta[\"ClienteID\"];\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorCliente);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$item = \"UltimaCompra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorCliente = $traerVenta[\"ClienteID\"];\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorCliente);\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t$item = \"UltimaCompra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorCliente = $traerVenta[\"ClienteID\"];\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorCliente);\n\n\t\t\t}\n\n\t\t\t//FORMATEAMOS LAS TABLAS DE PRODUCTOS Y DE CLIENTES\n\n\t\t\t$tablavd = \"VentaDetalle\";\n\n\t\t\t$tablap = \"Producto\";\n\n\t\t\t$clienteActual = $traerVenta[\"ClienteID\"];\n\n\t\t\t$traerProductosVenta = ModeloVentas::mdlListadoProductos($tabla, $tablavd, $tablap, $venta);\n\n\t\t\tforeach ($traerProductosVenta as $key => $value) {\n\n\t\t\t\t$tablaProductos = \"Producto\";\n\t\t\t\t$tabla2 = \"Rubro\";\n\n\t\t\t\t$item = \"ProductoID\";\n\t\t\t\t$valorX = $value[\"ProductoID\"];\n\t\t\t\t$orden = \"ProductoID\";\n\n\t\t\t\t$item1b = \"Stock\";\n\t\t\t\t$cantidadProducto = $value[\"Cantidad\"];\n\n\t\t\t\t//TRAEMOS EL LISTADO DE PRODUCTOS DE LA VENTA\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $tabla2, $item, $valorX, $orden);\n\n\t\t\t\t//REGRESAMOS LA CANTIDAD ANTERIOR DE VENTAS DEL PRODUCTO\n\t\t\t\t$item1a = \"Ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"Ventas\"] - $cantidadProducto;\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valorX);\n\n\t\t\t\t//REGRESAMOS EL STOCK ANTERIOR DE LOS PRODUCTOS\n\n\t\t\t\tif ($traerProducto[\"RestaStock\"] == \"S\") {\n\n\t\t\t\t\tif ($traerProducto[\"Tipo\"] ==\"Entero\") {\n\n\t\t\t\t\t\t//CALCULAMOS EL NUEVO STOCK, AL NO TENER RECETA NO SE RESTA RECETA\n\t\t\t\t\t\t$valor1b = $traerProducto[\"Stock\"] + $cantidadProducto;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//CALCULAMOS EL NUEVO STOCK\n\t\t\t\t\t\t$valor1b = $traerProducto[\"Stock\"] + $cantidadProducto;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//ACTUALIZAMOS STOCK DEL PRODUCTO\n\t\t\t\t\t$nuevoStockProducto = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valorX);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t//RESTAMOS DE LA RECETA\n\n\t\t\t\t\t$tablaReceta = \"Receta\";\n\t\t\t\t\t$tablaRecetaDetalle = \"RecetaDetalle\";\n\n\t\t\t\t\t$traigoReceta = ModeloProductos::mdlMostrarRecetaProducto($tablaReceta, $tablaProductos, $tablaRecetaDetalle, $valorX);\n\n\t\t\t\t\t//RESTAMOS LOS INSUMOS DE LA RECETA\n\n\t\t\t\t\tforeach ($traigoReceta as $key => $valoraso) {\n\n\t\t\t\t\t\t$tablaInsumos = \"Insumos\";\n\t\t\t\t\t\t$tabla2 = \"Rubro\";\n\n\t\t\t\t\t\t$item = \"InsumosID\";\n\t\t\t\t\t\t$idInsumo = $valoraso[\"InsumosID\"];\n\n\t\t\t\t\t\t$item1a = \"Stock\";\n\n\t\t\t\t\t\t//TRAIGO EL INSUMO\n\t\t\t\t\t\t$traerInsumos = ModeloInsumos::mdlMostrarInsumos($tablaInsumos, $tabla2, $item, $idInsumo);\n\t\t\t\t\t\t//CALCULAMOS EL NUEVO STOCK DE LOS INSUMOS DE LA RECETA\n\t\t\t\t\t\t$nuevoValorInsumo = $traerInsumos[\"Stock\"] + ($cantidadProducto * $valoraso[\"Cantidad\"]);\n\t\t\t\t\t\t//ACTUALIZAMOS EL STOCK\n\t\t\t\t\t\t$nuevoStockInsumo = ModeloInsumos::mdlActualizarInsumo($tablaInsumos, $item1a, $nuevoValorInsumo, $idInsumo);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\t$tablaClientes = \"Cliente\";\n\n\t\t\t\t$tablac2 = \"Persona\";\n\n\t\t\t\t$tablac3 = \"Domicilio\";\n\n\t\t\t\t$tablac4 = \"Localidad\";\n\n\t\t\t\t$tablac5 = \"Barrio\";\n\n\t\t\t\t$tablac6 = \"Telefono\";\n\n\t\t\t\t$itemCliente = \"ClienteID\";\n\n\t\t\t\t$valorCliente = $clienteActual;\n\n\t\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $tablac2, $tablac3, $tablac4, $tablac5, $tablac6, $itemCliente, $valorCliente);\n\n\t\t\t\t$item1 = \"Compras\";\n\n\t\t\t\t$valor1 = $traerCliente[\"Compras\"] - 1;\n\n\t\t\t\t$compraCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1, $valor1, $valorCliente);\n\n\t\t\t\t//ANULAMOS LA VENTA\n\n\t\t\t\t$datos = array(\"UsuarioAnulaID\" => $_POST[\"idUsuarioAnula\"],\n\t\t\t\t\t\t \t\t\"ventaID\" => $_POST[\"idVentaA\"],\n\t\t\t\t\t\t \t\t\"motivo\" => $_POST[\"motivoAnula\"]);\n\n\t\t\t\t$respuesta = ModeloVentas::mdlAnularVenta($tabla, $datos);\n\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo'<script>\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttitle:\"¡Anulación Exitosa!\",\n\t\t\t\t\t\t\t\ttext:\"¡La venta se anuló correctamente!\",\n\t\t\t\t\t\t\t\ttype:\"success\",\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\twindow.location=\"ventas\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo'<script>\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttitle:\"¡Registro Fallido!\",\n\t\t\t\t\t\t\t\ttext:\"¡Ocurrio un error, revise los datos!'.$respuesta.'\",\n\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t\tconfirmButtonText:\"Cerrar\",\n\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\n\n\n\t\t} // FIN IF\n\n\t}", "title": "" }, { "docid": "eb4f67c9d9f0aa89b7dd50ab4661930d", "score": "0.5050587", "text": "function Geral() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_readonly = '';\r\n $w_erro = '';\r\n \r\n if ($w_ano==substr(FormataDataEdicao(time()),6,4)) $w_sugestao = FormataDataEdicao(time());\r\n else $w_sugestao = '';\r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_proponente = $_REQUEST['w_proponente'];\r\n $w_sq_unidade_resp = $_REQUEST['w_sq_unidade_resp'];\r\n $w_titulo = $_REQUEST['w_titulo'];\r\n $w_assunto = $_REQUEST['w_assunto'];\r\n $w_prioridade = $_REQUEST['w_prioridade'];\r\n $w_aviso = $_REQUEST['w_aviso'];\r\n $w_dias = $_REQUEST['w_dias'];\r\n $w_ordem = $_REQUEST['w_ordem'];\r\n $w_inicio_real = $_REQUEST['w_inicio_real'];\r\n $w_fim_real = $_REQUEST['w_fim_real'];\r\n $w_concluida = $_REQUEST['w_concluida'];\r\n $w_data_conclusao = $_REQUEST['w_data_conclusao'];\r\n $w_nota_conclusao = $_REQUEST['w_nota_conclusao'];\r\n $w_custo_real = $_REQUEST['w_custo_real'];\r\n $w_projeto = $_REQUEST['w_projeto'];\r\n $w_atividade = $_REQUEST['w_atividade'];\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_pai = $_REQUEST['w_chave_pai'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_sq_menu = $_REQUEST['w_sq_menu'];\r\n $w_sq_unidade = $_REQUEST['w_sq_unidade'];\r\n $w_sq_tramite = $_REQUEST['w_sq_tramite'];\r\n $w_solicitante = $_REQUEST['w_solicitante'];\r\n $w_cadastrador = $_REQUEST['w_cadastrador'];\r\n $w_executor = $_REQUEST['w_executor'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_justificativa = $_REQUEST['w_justificativa'];\r\n $w_inicio = $_REQUEST['w_inicio'];\r\n $w_fim = $_REQUEST['w_fim'];\r\n $w_inclusao = $_REQUEST['w_inclusao'];\r\n $w_ultima_alteracao = $_REQUEST['w_ultima_alteracao'];\r\n $w_conclusao = $_REQUEST['w_conclusao'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_opiniao = $_REQUEST['w_opiniao'];\r\n $w_data_hora = $_REQUEST['w_data_hora'];\r\n $w_pais = $_REQUEST['w_pais'];\r\n $w_uf = $_REQUEST['w_uf'];\r\n $w_cidade = $_REQUEST['w_cidade'];\r\n $w_palavra_chave = $_REQUEST['w_palavra_chave'];\r\n $w_sqcc = $_REQUEST['w_sqcc'];\r\n } else {\r\n if (!(strpos('AEV',$O)===false) || $w_copia>'') {\r\n // Recupera os dados da tarefa\r\n if ($w_copia>'') {\r\n $sql = new db_getSolicData_IS; $RS = $sql->getInstanceof($dbms,$w_copia,$SG);\r\n } else {\r\n $sql = new db_getSolicData_IS; $RS = $sql->getInstanceof($dbms,$w_chave,$SG);\r\n } \r\n foreach($RS as $row){$RS=$row; break;}\r\n if (count($RS)>0) {\r\n $w_proponente = f($RS,'proponente');\r\n $w_sq_unidade_resp = f($RS,'sq_unidade_resp');\r\n $w_titulo = f($RS,'titulo');\r\n $w_assunto = f($RS,'assunto');\r\n $w_prioridade = f($RS,'prioridade');\r\n $w_aviso = f($RS,'aviso_prox_conc');\r\n $w_dias = f($RS,'dias_aviso');\r\n $w_ordem = Nvl(f($RS,'ordem'),0);\r\n $w_inicio_real = f($RS,'inicio_real');\r\n $w_fim_real = f($RS,'fim_real');\r\n $w_concluida = f($RS,'concluida');\r\n $w_data_conclusao = f($RS,'data_conclusao');\r\n $w_nota_conclusao = f($RS,'nota_conclusao');\r\n $w_custo_real = f($RS,'custo_real');\r\n $w_projeto = f($RS,'sq_solic_pai');\r\n $w_projeto_ant = f($RS,'sq_solic_pai');\r\n $w_chave_pai = f($RS,'sq_solic_pai');\r\n $w_chave_aux = null;\r\n $w_sq_menu = f($RS,'sq_menu');\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_sq_tramite = f($RS,'sq_siw_tramite');\r\n $w_solicitante = f($RS,'solicitante');\r\n $w_cadastrador = f($RS,'cadastrador');\r\n $w_executor = f($RS,'executor');\r\n $w_descricao = f($RS,'descricao');\r\n $w_justificativa = f($RS,'justificativa');\r\n $w_inicio = FormataDataEdicao(f($RS,'inicio'));\r\n $w_fim = FormataDataEdicao(f($RS,'fim'));\r\n $w_inclusao = f($RS,'inclusao');\r\n $w_ultima_alteracao = f($RS,'ultima_alteracao');\r\n $w_conclusao = f($RS,'conclusao');\r\n $w_valor = number_format(f($RS,'valor'),2,',','.');\r\n $w_opiniao = f($RS,'opiniao');\r\n $w_data_hora = f($RS,'data_hora');\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = f($RS,'sq_cidade_origem');\r\n $w_palavra_chave = f($RS,'palavra_chave');\r\n } \r\n } \r\n } \r\n Cabecalho();\r\n head();\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor();\r\n ValidateOpen('Validacao');\r\n if ($O=='I' || $O=='A') {\r\n ShowHTML(' if (theForm.Botao.value == \"Troca\") { return true; }');\r\n Validate('w_projeto','Ação','SELECT',1,1,18,'','0123456789');\r\n Validate('w_titulo','Tarefa','1',1,3,100,'1','1');\r\n Validate('w_assunto','Descrição','1',1,5,2000,'1','1');\r\n Validate('w_solicitante','Responsável SISPLAM','SELECT',1,1,18,'','0123456789');\r\n Validate('w_sq_unidade_resp','Área de planejamento','SELECT',1,1,18,'','0123456789');\r\n switch (f($RS_Menu,'data_hora')) {\r\n case 1: Validate('w_fim','Limite para conclusão','DATA',1,10,10,'','0123456789/'); break;\r\n case 2: Validate('w_fim','Limite para conclusão','DATAHORA',1,17,17,'','0123456789/'); break;\r\n case 3:\r\n Validate('w_inicio','Início previsto','DATA',1,10,10,'','0123456789/');\r\n Validate('w_fim','Fim previsto','DATA',1,10,10,'','0123456789/');\r\n CompData('w_inicio','Início previsto','<=','w_fim','Fim previsto');\r\n break;\r\n case 4:\r\n Validate('w_inicio','Data de recebimento','DATAHORA',1,17,17,'','0123456789/,: ');\r\n Validate('w_fim','Limite para conclusão','DATAHORA',1,17,17,'','0123456789/,: ');\r\n CompData('w_inicio','Data de recebimento','<=','w_fim','Limite para conclusão');\r\n break;\r\n } \r\n Validate('w_valor','Recurso programado','VALOR','1',4,18,'','0123456789.,');\r\n Validate('w_prioridade','Prioridade','SELECT',1,1,1,'','0123456789');\r\n Validate('w_proponente','Parcerias externas','','',2,90,'1','1');\r\n if (f($RS_Menu,'descricao')=='S') Validate('w_descricao','Resultados esperados','1',1,5,2000,'1','1');\r\n if (f($RS_Menu,'justificativa')=='S') Validate('w_justificativa','Observações','1','',5,2000,'1','1');\r\n } \r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.w_projeto.focus()\\';');\r\n } elseif (!(strpos('EV',$O)===false)) {\r\n BodyOpen(null);\r\n } else {\r\n BodyOpen('onLoad=\\'document.Form.w_projeto.focus()\\';');\r\n } \r\n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (!(strpos('IAEV',$O)===false)) {\r\n if ($w_pais=='') {\r\n // Carrega os valores padrão para país, estado e cidade\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = f($RS,'sq_cidade_padrao');\r\n } \r\n if (!(strpos('EV',$O)===false)) {\r\n $w_Disabled=' DISABLED ';\r\n if ($O=='V') $w_Erro=Validacao($w_sq_solicitacao,$SG);\r\n } \r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.f($RS_Menu,'data_hora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_projeto_ant\" value=\"'.$w_projeto_ant.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_atividade_ant\" value=\"'.$w_atividade_ant.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_aviso\" value=\"S\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_ordem\" value=\"0\">');\r\n //Passagem da cidade padrão como brasília, pelo retidara do impacto geográfico da tela\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cidade\" value=\"'.f($RS,'sq_cidade_padrao').'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td valign=\"top\" align=\"center\" bgcolor=\"#D0D0D0\"><font size=\"1\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td><font size=1>Os dados deste bloco serão utilizados para identificação da tarefa, bem como para o controle de sua execução.</font></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n // Recupera dados da opção Ações\r\n ShowHTML(' <tr>');\r\n SelecaoAcao('Açã<u>o</u>:','O','Selecione a ação a qual a tarefa está vinculada.',$w_cliente,$w_ano,null,null,null,null,'w_projeto','ACAO',null,$w_projeto);\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr><td valign=\"top\"><font size=\"1\"><b><u>T</u>arefa:<br><INPUT ACCESSKEY=\"T\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_titulo\" size=\"90\" maxlength=\"100\" value=\"'.$w_titulo.'\" title=\"Informe o nome da tarefa.\"></td>');\r\n ShowHTML(' <tr><td valign=\"top\"><font size=\"1\"><b>Des<u>c</u>rição:</b><br><textarea '.$w_Disabled.' accesskey=\"c\" name=\"w_assunto\" class=\"STI\" ROWS=5 cols=75 title=\"Descreva, de forma detalhada, o que é realizado na tarefa.\">'.$w_assunto.'</TEXTAREA></td>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n SelecaoPessoa('Respo<u>n</u>sável SISPLAM:','N','Selecione o nome da pessoa responsável pelas informações no SISPLAM.',$w_solicitante,null,'w_solicitante','USUARIOS');\r\n SelecaoUnidade_IS('<U>Á</U>rea planejamento:','A','Selecione a área da secretaria ou órgão responsável pela tarefa',$w_sq_unidade_resp,null,'w_sq_unidade_resp',null,'PLANEJAMENTO');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <td valign=\"top\"><font size=\"1\"><b>Iní<u>c</u>io previsto:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_inicio\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.Nvl($w_inicio,$w_sugestao).'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"></td>');\r\n ShowHTML(' <td valign=\"top\"><font size=\"1\"><b>Fim previs<u>t</u>o:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"></td>');\r\n ShowHTML(' <td valign=\"top\"><font size=\"1\"><b><u>R</u>ecurso programado:</b><br><input '.$w_Disabled.' accesskey=\"O\" type=\"text\" name=\"w_valor\" class=\"STI\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o recurso programado para a execução da tarefa.\"></td>');\r\n SelecaoPrioridade('<u>P</u>rioridade:','P','Informe a prioridade desta tarefa.',$w_prioridade,null,'w_prioridade',null,null);\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td valign=\"top\"><font size=\"1\"><b>Parc<u>e</u>rias externas:<br><INPUT ACCESSKEY=\"E\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_proponente\" size=\"90\" maxlength=\"90\" value=\"'.$w_proponente.'\" title=\"Informar quais são os parceiros externos na execução da tarefa (campo opcional).\"></td>');\r\n if (f($RS_Menu,'descricao')=='S' || f($RS_Menu,'justificativa')=='S') {\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td valign=\"top\" align=\"center\" bgcolor=\"#D0D0D0\"><font size=\"1\"><b>Informações adicionais</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td><font size=1>Os dados deste bloco visam orientar os executores da tarefa.</font></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n if (f($RS_Menu,'descricao')=='S') ShowHTML(' <tr><td valign=\"top\"><font size=\"1\"><b>Res<u>u</u>ltados esperados:</b><br><textarea '.$w_Disabled.' accesskey=\"U\" name=\"w_descricao\" class=\"STI\" ROWS=5 cols=75 title=\"Descreva os resultados físicos esperados com a execução da tarefa.\">'.$w_descricao.'</TEXTAREA></td>');\r\n if (f($RS_Menu,'justificativa')=='S') ShowHTML(' <tr><td valign=\"top\"><font size=\"1\"><b>Obse<u>r</u>vações:</b><br><textarea '.$w_Disabled.' accesskey=\"R\" name=\"w_justificativa\" class=\"STI\" ROWS=5 cols=75 title=\"Informe as observações pertinentes (campo não obrigatório)\">'.$w_justificativa.'</TEXTAREA></td>');\r\n } \r\n // Verifica se poderá ser feito o envio da solicitação, a partir do resultado da validação\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n if ($O=='I') {\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceof($dbms,$w_menu);\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&w_copia='.$w_copia.'&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n } \r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n}", "title": "" }, { "docid": "470038a665bbef69bdd4bc6eb62a4f30", "score": "0.5050232", "text": "public function getStCtrObservacao()\n {\n return $this->stCtrObservacao;\n }", "title": "" }, { "docid": "4dde16cb6185e727cc87bfdfdf971143", "score": "0.50499326", "text": "public function getContaDac();", "title": "" }, { "docid": "bcf84b674e0e4d15d30e0ab5f53a834d", "score": "0.50471926", "text": "function Geral() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_tramite = $_REQUEST['w_tramite'];\r\n $w_readonly = '';\r\n $w_erro = '';\r\n \r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'' && $SG=='MTCONSUMO') {\r\n // Se for recarga da página\r\n $w_codigo = $_REQUEST['w_codigo'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_sq_menu = $_REQUEST['w_sq_menu'];\r\n $w_sq_unidade = $_REQUEST['w_sq_unidade'];\r\n $w_sq_tramite = $_REQUEST['w_sq_tramite'];\r\n $w_solicitante = $_REQUEST['w_solicitante'];\r\n $w_cadastrador = $_REQUEST['w_cadastrador'];\r\n $w_fim = $_REQUEST['w_fim'];\r\n $w_inclusao = $_REQUEST['w_inclusao'];\r\n $w_ultima_alteracao = $_REQUEST['w_ultima_alteracao'];\r\n $w_justificativa = $_REQUEST['w_justificativa'];\r\n $w_observacao = $_REQUEST['w_observacao'];\r\n } else {\r\n if (strpos('AEV',$O)!==false || $w_copia>'') {\r\n // Recupera os dados do pedido\r\n if ($w_copia>'') {\r\n $sql = new db_getSolicMT; $RS = $sql->getInstanceOf($dbms,$w_menu,$w_usuario,$SG,3,\r\n null,null,null,null,null,null,null,null,null,null,$w_copia,null,null,null,null,null,null,\r\n null,null,null,null,null,null,null,null,null,null,null);\r\n } else {\r\n $sql = new db_getSolicMT; $RS = $sql->getInstanceOf($dbms,$w_menu,$w_usuario,$SG,3,\r\n null,null,null,null,null,null,null,null,null,null,$w_chave,null,null,null,null,null,null,\r\n null,null,null,null,null,null,null,null,null,null,null);\r\n }\r\n if (count($RS)>0) {\r\n foreach($RS as $row){$RS=$row; break;}\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_codigo = f($RS,'codigo_interno');\r\n $w_qt_itens = f($RS,'qt_itens');\r\n $w_solicitante = f($RS,'solicitante');\r\n $w_cadastrador = f($RS,'cadastrador');\r\n $w_justificativa = f($RS,'justificativa');\r\n $w_observacao = f($RS,'observacao');\r\n $w_tramite = f($RS,'sq_siw_tramite');\r\n if (nvl($w_copia,'')=='') $w_fim = FormataDataEdicao(f($RS,'fim'));\r\n } \r\n } \r\n } \r\n\r\n // Se não puder cadastrar para outros, carrega os dados do usuário logado\r\n if ($w_cadgeral=='N') {\r\n $w_sq_unidade = $_SESSION['LOTACAO'];\r\n $w_solicitante = $_SESSION['SQ_PESSOA'];\r\n } \r\n\r\n if ($O!='I') {\r\n // Validação\r\n $w_erro = ValidaConsumo($w_cliente,$w_chave,$SG,null,null,null,null);\r\n }\r\n\r\n Cabecalho();\r\n head();\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataValor();\r\n FormataData();\r\n SaltaCampo();\r\n openBox('reload');\r\n ShowHTML('function botoes() {');\r\n if ($O=='I') {\r\n ShowHTML(' document.Form.Botao[0].disabled = true;');\r\n ShowHTML(' document.Form.Botao[1].disabled = true;');\r\n } else {\r\n ShowHTML(' document.Form.Botao.disabled = true;');\r\n } \r\n ShowHTML('}');\r\n ValidateOpen('Validacao');\r\n if ($O=='I' || $O=='A') {\r\n ShowHTML(' if (theForm.Botao.value == \"Troca\") { return true; }');\r\n if(nvl(f($RS_Menu,'numeracao_automatica'),0)==0) {\r\n Validate('w_codigo','Código interno','','1',1,60,'1','1');\r\n }\r\n if($w_cadgeral=='S') {\r\n Validate('w_solicitante','Solicitante','HIDDEN',1,1,18,'','0123456789');\r\n Validate('w_sq_unidade','Unidade solicitante','HIDDEN',1,1,18,'','0123456789');\r\n }\r\n Validate('w_fim','Agendamento para entrega','DATA',1,10,10,'','0123456789/');\r\n CompData('w_fim','Agendamento para entrega','>=',formataDataEdicao(time()),'data atual');\r\n Validate('w_justificativa','Justificativa','','1',3,2000,'1','1');\r\n Validate('w_observacao','Observação','','',3,2000,'1','1');\r\n } \r\n ValidateClose();\r\n ValidateOpen('Validacao1');\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</HEAD>');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } elseif (strpos('EV',$O)!==false) {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } \r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n if ($O!='I') {\r\n // Exibe os dados da solicitação\r\n ShowHTML('<table border=1 width=\"100%\" bgcolor=\"#FAEBD7\"><tr><td>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr><td><table border=0 width=\"100%\">');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td>Pedido:<br><b>'.$w_codigo.'</b></td>');\r\n ShowHTML(' <td>Itens:<br><b>'.$w_qt_itens.'</b></td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TABLE>');\r\n ShowHTML('</table>');\r\n }\r\n\r\n if (strpos('IAEV',$O)!==false) {\r\n ShowHTML('<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,f($RS_Menu,'sigla'),$R,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 valign=\"top\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3>Os dados deste bloco serão utilizados para identificação do pedido, bem como para o controle do seu atendimento.</td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n if(nvl(f($RS_Menu,'numeracao_automatica'),0)==0) {\r\n ShowHTML(' <tr><td><b><U>C</U>ódigo interno:<br><INPUT ACCESSKEY=\"C\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_codigo\" size=\"18\" maxlength=\"60\" value=\"'.$w_codigo.'\"></td>');\r\n }\r\n if ($w_cadgeral=='N') {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_unidade\" value=\"'.$w_sq_unidade.'\">');\r\n } else {\r\n // Recupera todos os registros para a listagem\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoUnidade('<U>U</U>nidade solicitante:','U','Selecione a unidade solicitante do pedido',nvl($w_sq_unidade,$_SESSION['LOTACAO']),null,'w_sq_unidade','ATIVO',null);\r\n }\r\n if ($w_cadgeral=='N') {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_solicitante\" value=\"'.$w_solicitante.'\">');\r\n } else {\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoPessoa('<u>S</u>olicitante:','S','Selecione o solicitante do pedido na relação.',nvl($w_solicitante,$_SESSION['SQ_PESSOA']),null,'w_solicitante','USUARIOS');\r\n }\r\n ShowHTML(' <tr><td colspan=3><b><u>A</u>gendamento desejado para a entrega:</b><br><input '.$w_Disabled.' accesskey=\"L\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Data limite para quem o atendimento do pedido seja atendido.\">'.ExibeCalendario('Form','w_fim').'</td>'); \r\n ShowHTML(' <tr><td colspan=3><b><u>J</u>ustificativa:</b><br><textarea '.$w_Disabled.' accesskey=\"J\" name=\"w_justificativa\" class=\"STI\" ROWS=5 cols=75 title=\"É obrigatório justificar.\">'.$w_justificativa.'</TEXTAREA></td>');\r\n ShowHTML(' <tr><td colspan=3><b><u>O</u>bservações a respeito da entrega:</b> (local, horário, pessoas para recebimento etc.)<br><textarea '.$w_Disabled.' accesskey=\"O\" name=\"w_observacao\" class=\"STI\" ROWS=5 cols=75>'.$w_observacao.'</TEXTAREA></td>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceOf($dbms,$w_menu);\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.'inicial&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n ShowHTML('<tr><td colspan=2><font size=2><HR>');\r\n\r\n if ($O!='I') {\r\n if ($w_erro>'') {\r\n if (substr($w_erro,0,1)=='0') {\r\n ShowHTML(' <font color=\"#BC3131\"><b>ATENÇÃO:</b></font> Foram identificadas as pendências listadas abaixo, não sendo possível seu encaminhamento para fases posteriores à atual.');\r\n } elseif (substr($w_erro,0,1)=='1') {\r\n ShowHTML(' <font color=\"#BC3131\"><b>ATENÇÃO:</b></font> Foram identificadas as pendências listadas abaixo. Seu encaminhamento para fases posteriores à atual só pode ser feito por um gestor do sistema ou deste módulo.');\r\n } else {\r\n ShowHTML(' <font color=\"#BC3131\"><b>ATENÇÃO:</b></font> Foram identificados os alertas listados abaixo. Eles não impedem o encaminhamento para fases posteriores à atual, mas convém sua verificação.');\r\n } \r\n ShowHTML(' <ul>'.substr($w_erro,1,1000));\r\n ShowHTML('<tr><td colspan=2><HR>');\r\n } \r\n \r\n // Itens\r\n $sql = new db_getCLSolicItem; $RS = $sql->getInstanceOf($dbms,null,$w_chave,null,null,null,null,null,null,null,null,null,null,'PEDMAT');\r\n $RS = SortArray($RS,'nome','asc'); \r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3><b>Itens</b>&nbsp;&nbsp;[<A class=\"box HL\" HREF=\"'.montaURL_JS(null,$conRootSIW.$w_dir.$w_pagina.'Itens&R='.$w_pagina.$par.'&O=L&w_menu='.$w_menu.'&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.removeTP($TP).' - Itens'.'&SG=MTPMITEM').'\" title=\"Informa os itens do pedido.\">'.((count($RS)>0) ? 'Ajustar' : 'Incluir').'</A>]</td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\"><table width=\"100%\" border=\"0\">');\r\n if (count($RS)==0) {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=2 align=center><b>Itens não informados</b></td></tr>');\r\n ShowHTML(' <tr><td colspan=2 align=center><hr /></td></tr>');\r\n } else {\r\n unset($w_classes);\r\n foreach($RS as $row) $w_classes[f($row,'classe')] = 1;\r\n reset($RS);\r\n $colspan = 0;\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\">');\r\n ShowHTML(' <table class=\"tudo\" width=\"100%\" BORDER=1 bordercolor=\"#666666\">');\r\n ShowHTML(' <tr align=\"center\">');\r\n ShowHTML(' <td><b>Nome</b></td>');\r\n ShowHTML(' <td><b>Qtd</b></td>');\r\n ShowHTML(' <td><b>U.M.</b></td>');\r\n ShowHTML(' <td><b>Fator<br>Embal.</b></td>');\r\n ShowHTML(' </tr>');\r\n // Lista os registros selecionados para listagem\r\n $w_total = 0;\r\n foreach($RS as $row){ \r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td>'.ExibeMaterial($w_dir_volta,$w_cliente,f($row,'nome'),f($row,'sq_material'),$TP,null).'</td>');\r\n ShowHTML(' <td align=\"right\">'.formatNumber(f($row,'quantidade_pedida'),0).'</td>');\r\n ShowHTML(' <td align=\"center\" title=\"'.f($row,'nm_unidade_medida').'\">'.f($row,'sg_unidade_medida').'</td>');\r\n ShowHTML(' <td align=\"center\">'.formatNumber(f($row,'fator_embalagem'),0).'</td>');\r\n ShowHTML(' </tr>');\r\n }\r\n ShowHTML(' </table>');\r\n }\r\n ShowHTML(' </table>');\r\n\r\n if ($O!='I' && nvl($w_erro,'')=='') {\r\n // Envio\r\n ShowHTML(' <tr><td colspan=3><br><b>Envio (<font color=\"#BC3131\"><b>ATENÇÃO: execute esta ação somente após informar e conferir os dados do pedido.</b></font>)</b></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"3\"><table width=\"100%\" border=\"0\" bgcolor=\"'.$conTrBgColor.'\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n AbreForm('Form1',$w_dir.$w_pagina.'Grava','POST','return(Validacao1(this));',null,$P1,$P2,$P3,$P4,$TP,'MTPCENVIO',$w_pagina.$par,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tramite\" value=\"'.$w_tramite.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_envio\" value=\"N\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML(' <tr><td colspan=3><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"STI\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=3 height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Enviar para fase seguinte\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML('</form>');\r\n ShowHTML(' </table>');\r\n }\r\n }\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n Rodape();\r\n}", "title": "" }, { "docid": "f792b74c298d4227fb033e951a1d7471", "score": "0.5036342", "text": "static public function ctrNuevoServicio($datos){\n\n if (!empty($datos)) { //controlo si viene cargado con datos\n \n //valido la entrada\n $item = \"nombre\";\n $valor = \"CARACTERES_ESPECIALES\";\n // CONSULTO LOS CARACTERES ESPECIALES EN LA BD\n $caracteresESPECIALES = ModeloServicios::mdlMostrarCaracteresEspeciales(\"parametros\", $item, $valor);\n // CONSULTO LOS CARACTERES ESPECIALES EN LA BD\n $CARACTERES = $caracteresESPECIALES[\"valor\"];\n\n if (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ' . $CARACTERES . ']+$/', $datos[\"cliente\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ' . $CARACTERES . ']+$/', $datos[\"producto\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ' . $CARACTERES . ']+$/', $datos[\"producto_info\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ' . $CARACTERES . ']+$/', $datos[\"problema\"])\n ) {\n\n $tabla = \"servicios\";\n\n $respuesta = ModeloServicios::mdlNuevoServicio($tabla, $datos);\n\n //doy la respuesta ok/error\n return $respuesta;\n\n } else {\n\n $cliente = $datos[\"cliente\"];\n $producto = $datos[\"producto\"];\n $producto_info = $datos[\"producto_info\"];\n $problema = $datos[\"problema\"];\n\n for ($i = 0; $i < strlen($cliente); $i++) {\n # code...\n if (!preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ' . $CARACTERES . ']+$/', $cliente[$i])) {\n\n //error de validacion preg_match\n return \"charset CLIENTE: \" . $cliente[$i];\n }\n }\n\n for ($i = 0; $i < strlen($producto); $i++) {\n # code...\n if (!preg_match('/^[#\\.\\-a-zA-Z0-9 ' . $CARACTERES . ']+$/', $producto[$i])) {\n\n //error de validacion preg_match\n return \"charset PRODUCTO: \" . $producto[$i];\n }\n }\n\n for ($i = 0; $i < strlen($producto_info); $i++) {\n # code...\n if (!preg_match('/^[#\\.\\-a-zA-Z0-9 ' . $CARACTERES . ']+$/', $producto_info[$i])) {\n\n //error de validacion preg_match\n return \"charset OBS del Producto: \" . $producto_info[$i];\n }\n }\n\n for ($i = 0; $i < strlen($problema); $i++) {\n # code...\n if (!preg_match('/^[#\\.\\-a-zA-Z0-9 ' . $CARACTERES . ']+$/', $problema[$i])) {\n\n //error de validacion preg_match\n return \"charset PROBLE;A: \" . $problema[$i];\n }\n }\n }\n }\n }", "title": "" }, { "docid": "2ad17ea7363bcb84eba82655db5321b2", "score": "0.5036023", "text": "function Coche(){\n $this->ruedas=4;\n $this->color=\"\";\n $this->motor=1600;\n }", "title": "" }, { "docid": "dcd6f52c46cf1feff2cba9ef23d93266", "score": "0.5035056", "text": "public function movelFull(){\n\t\treturn \"(\".$this->getDDD2().\") \".$this->getCel();\n }", "title": "" }, { "docid": "a24a6cbceb24c12500ef8800cfae2fd2", "score": "0.50327927", "text": "function CENTRO_comprobar_DELETE()\n{\n\tglobal $ERRORS_array_test;\n// creo array de almacen de test individual\n\t$CENTRO_array_test1 = array();\n\n\t//sexo correcto\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'comprobar_atributos_DELETE';\n\t$CENTRO_array_test1['error'] = 'correcto';\n\t$CENTRO_array_test1['error_esperado'] = 'true';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de usuario\t\n\t$centro = 'miusuario';\n// creo el modelo\n\t$CENTRO = new CENTRO_Model($centro,'','','','');\n\n\t$CENTRO_array_test1['error_obtenido'] = $CENTRO->comprobar_atributos_DELETE() == 1 ? 'true' : 'false';\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n\n\t//sexo vacia\n\t$CENTRO_array_test1['tipo'] = 'VALIDACION';\n\t$CENTRO_array_test1['entidad'] = 'CENTRO';\t\n\t$CENTRO_array_test1['metodo'] = 'comprobar_atributos_DELETE';\n\t$CENTRO_array_test1['error'] = 'Codigo del centro erroneo';\n\t$CENTRO_array_test1['error_esperado'] = 'CodCentro-00040-alfNumguion-';\n\t$CENTRO_array_test1['error_obtenido'] = '';\n\t$CENTRO_array_test1['resultado'] = '';\n\n\t// Relleno los datos de usuario\t\n\t$centro = 'miusuario!';\n// creo el modelo\n\t$CENTRO = new CENTRO_Model($centro,'','','','');\n\t$array = $CENTRO->comprobar_atributos_DELETE();\n\t//var_dump($array);\n\tforeach ($array as $key ) {\n\t\tforeach ($key as $key2) {\n\t\t\t$result .= $key2.'-';\n\t\t}\n\t}\n\t$CENTRO_array_test1['error_obtenido'] = $result;\n\tif ($CENTRO_array_test1['error_obtenido'] === $CENTRO_array_test1['error_esperado'])\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'OK';\n\t}\n\telse\n\t{\n\t\t$CENTRO_array_test1['resultado'] = 'FALSE';\n\t}\n\n\tarray_push($ERRORS_array_test, $CENTRO_array_test1);\n}", "title": "" }, { "docid": "24ab16b7f140951d414c1f5a83046303", "score": "0.5029256", "text": "function forta_dragonului(){\r\n return $this->putere *= 2;\r\n }", "title": "" }, { "docid": "de92837c6f27dd7ddb214904236101c0", "score": "0.5027444", "text": "private function _getMCNoSmontaggio()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n $tmp = $arredo->getMC();\n if ($arredo->getParametroB() == Arredo::MONTATO_PIENO)\n {\n $tmp = $tmp * $arredo->getCampo(Arredo::MONTATO_PIENO);\n $mc+= $tmp;\n\n }\n\n if ($arredo->getParametroB() == Arredo::MONTATO_VUOTO)\n {\n $tmp = $tmp * $arredo->getCampo(Arredo::MONTATO_VUOTO);\n $mc+= $tmp;\n\n }\n\n\n\n }\n\n return $mc;\n }", "title": "" }, { "docid": "857bcf4e05ec647c793f2b400f4ef1dc", "score": "0.5025457", "text": "function mostrar_protocolizado_nacional(){ \n// echo $this->printQryFile('../../class/sql/mostrar/mostrar_oficinas_estado__.sql', $id);die();\n return $this->exeQryFile('../../class/sql/mostrar/mostrar_protocolizado_nacional__.sql', null); \n }", "title": "" }, { "docid": "94343301d4a9cde8e44243182690ee74", "score": "0.5024736", "text": "function formulaires_choix_secteur_charger_dist(){\r\n\t$valeurs = array();\r\n\t$valeurs['editable'] = true; \r\n\t$valeurs['secteur'] = _request('secteur');\r\n\treturn $valeurs;\r\n}", "title": "" }, { "docid": "147211e6ff861219e191ffe0858144d4", "score": "0.5023557", "text": "function incluirCentro($valores,$archivoInventario,$tabla,$conexion)\n {\n\n $cod_pres = $valores[ 'form_cod_pres'];\n $institucion = utf8_decode($valores[ 'form_institucion']); \n\t\t$sql=\"SELECT * FROM $tabla WHERE cod_pres='$cod_pres' AND institucion='$institucion'\";\n\n\t\t$res=mysqli_query($conexion,$sql);\n\n\t\tif(mysqli_num_rows($res)>=1)\n\n\t\t{\n\n\t\t\techo \"El Centro Educativo ya se encuentra Registrado')\";\n\n\t\t}\n\n\t\telse\n\n\t\t{ \n $regional = utf8_decode($valores[ 'form_direccion_regional']);\n $circuito = $valores[ 'form_circuito']; \n $correo = utf8_decode($valores[ 'form_correo']);\n $provincia = utf8_decode($valores[ 'form_provincia']);\n $canton = utf8_decode($valores[ 'form_canton']);\n $distrito = utf8_decode($valores[ 'form_distrito']); \n $poblado = utf8_decode($valores[ 'form_poblado']);\n $coordenada_x = $valores[ 'form_coordenada_x'];\n $coordenada_y = $valores[ 'form_coordenada_y']; \n $telefono = $valores[ 'form_telefono']; \n $fax = $valores[ 'form_fax'];\n $modalidad_educativa = utf8_decode($valores['form_id_modalidad_educativa']);\n $centro_indigena = utf8_decode($valores[ 'form_centro_indigena']);\n $bachillerato_internacional = utf8_decode($valores[ 'form_bachillerato_internacional']);\n $edificio_compartido = utf8_decode($valores['form_edificio_compartido']);\n $internet = utf8_decode($valores[ 'form_internet']);\n $velocidad = $valores[ 'form_velocidad'];\n $estado_conexion = $valores[ 'form_estado_conexion'];\n $matricula_h = $valores[ 'form_matricula_h'];\n $matricula_m = $valores[ 'form_matricula_m'];\n $cantidad_grupos = $valores['form_cantidad_grupos']; \n $cantidad_docentes = $valores[ 'form_cantidad_docentes'];\n $total_pabellones = $valores[ 'form_total_pabellones']; \n $total_aulas = $valores[ 'form_total_aulas'];\n $enlace_nombre = utf8_decode($valores[ 'form_enlace_nombre']);\n $enlace_cedula = $valores[ 'form_enlace_cedula'];\n $enlace_telefono = $valores[ 'form_enlace_telefono'];\n $enlace_correo = $valores[ 'form_enlace_correo'];\n $enlace_especialidad = utf8_decode($valores[ 'form_enlace_especialidad']);\n $enlace_condicion = utf8_decode($valores[ 'form_enlace_condicion']);\n $id_asesor_enlace = $valores[ 'form_id_asesor_enlace'];\n $equipamiento = utf8_decode($valores['equipamiento']);\n $actualizado_por = utf8_decode($valores[ 'form_actualizado_por']);\n $inventario = $archivoInventario;\n mysqli_query($conexion,\"INSERT INTO $tabla (cod_pres,institucion,id_modalidad_educativa,centro_indigena,bachillerato_internacional,provincia,canton,distrito,poblado,coordenada_x,coordenada_y,internet,velocidad,matricula_h,matricula_m,cantidad_grupos,cantidad_docentes,direccion_regional,circuito,telefono,fax,correo,total_pabellones,edificio_compartido,total_aulas,estado_conexion,url_inventario, ultima_actualizacion_por,enlace_nombre,enlace_cedula,enlace_telefono,enlace_correo,enlace_especialidad,enlace_condicion,id_asesor_enlace, equipamiento)\n VALUES ('$cod_pres', '$institucion','$modalidad_educativa','$centro_indigena','$bachillerato_internacional','$provincia','$canton','$distrito','$poblado','$coordenada_x','$coordenada_y','$internet','$velocidad','$matricula_h', '$matricula_m','$cantidad_grupos','$cantidad_docentes','$regional', '$circuito','$telefono','$fax','$correo','$total_pabellones','$edificio_compartido','$total_aulas','$estado_conexion','$inventario','$actualizado_por','$enlace_nombre','$enlace_cedula','$enlace_telefono','$enlace_correo','$enlace_especialidad','$enlace_condicion','$id_asesor_enlace','$equipamiento' )\") or die (\"Problemas al añadir elementos a la BD\".mysqli_error($conexion));\n printf($conexion->insert_id); \n\n // `enlace_nombre` = '$enlace_nombre',`enlace_cedula` = '$enlace_cedula',`enlace_telefono` = '$enlace_telefono',`enlace_correo` = '$enlace_correo',`enlace_especialidad` = '$enlace_especialidad',`enlace_condicion` = '$enlace_condicion', `id_asesor_enlace` = '$id_asesor_enlace'\n }\n }", "title": "" }, { "docid": "6dbef2737dce744013dc2989b1b060ca", "score": "0.5022529", "text": "private function _copieStandardFichier() {\n\t\t$this->onInfo ( \"On copie les donnees.\" );\n\t\t\n\t\tif ($this->fichier_a_traiter->renvoi_parametre_fichier ( \"nom\" ) == \"\") {\n\t\t\t$nom_fichier_final = $this->fichier_a_traiter->renvoi_parametre_fichier ( \"dossier\" ) . \"/\" . $this->fichier_a_traiter->renvoi_parametre_machine ( \"nom\" );\n\t\t\t$this->fichier_a_traiter->modifie_donnees_structure_fichier ( \"nom\", $this->fichier_a_traiter->renvoi_parametre_machine ( \"nom\" ) );\n\t\t} else {\n\t\t\t$nom_fichier_final = $this->fichier_a_traiter->renvoi_parametre_fichier ( \"dossier\" ) . \"/\" . $this->fichier_a_traiter->renvoi_parametre_fichier ( \"nom\" );\n\t\t}\n\t\t\n\t\t$type_copie = $this->renvoieTypeCopie ();\n\t\t\n\t\t$nom_fichier_standard = $this->fichier_a_traiter->renvoi_parametre_machine ( \"dossier\" ) . \"/\" . $this->fichier_a_traiter->renvoi_parametre_machine ( \"nom\" );\n\t\t\n\t\t//Si le fichier est en local, on dit renvoi OK\n\t\tif ($type_copie == \"get\" && fichier::tester_fichier_existe ( $nom_fichier_final ) === true) {\n\t\t\t$this->onInfo ( \"On utilise la copie local du fichier.\" );\n\t\t\t$resultat = true;\n\t\t} else {\n\t\t\t//Sinon on copie\n\t\t\t$resultat = $this->_choisiTypeCopie ( $nom_fichier_standard, $nom_fichier_final, $type_copie, false );\n\t\t}\n\t\t\n\t\t$this->fichier_a_traiter->modifie_donnees_structure_fichier ( \"telecharger\", $resultat );\n\t\t\n\t\tif ($this->fichier_a_traiter->renvoi_parametre_fichier ( \"telecharger\" ) === false && $this->fichier_a_traiter->renvoi_parametre_fichier ( \"mandatory\" ) === true)\n\t\t\treturn $this->onError ( \"Probleme avec la copie du fichier : \" . $nom_fichier_standard . \" vers \" . $nom_fichier_final . \" en mode \" . $type_copie );\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "dff8059748d52911aef7f27587747fd2", "score": "0.5021781", "text": "function fSelDatosConDeb(&$db, $pProc = -1, $pID = -1, $pTip=\"LQ\", $pSig=1) {\n global $ilEstadoProc;\n global $gCtaTrans;\n global $gAuxApert;\n global $ilNumProces;\n global $ilNumCompro;\n global $ilNumCheque;\n global $ilNumProduc;\n global $gProdQry;\n\n// Rubros a incluir\n// sum(if(rub_Inddbcr=1,liq_valtotal, 0)) AS det_valdebito,\n// sum(if(rub_Inddbcr=1, 0,liq_valtotal)) AS det_valcredito\n/*\n $slSql[] = \"INSERT INTO tmp_liquidado\n SELECT liq_Numliquida AS tmp_NumLiquida,\n sum(liq_valtotal * rub_Inddbcr * \" . $pSig . \") AS tmp_Liqtotal\n FROM liqprocesos\n JOIN liqliquidaciones ON pro_ID = \" . $pProc . \" AND liq_numproceso = pro_ID\n JOIN liqreportes ON rep_ReporteID = \" . $pID . \" AND rep_codrubro = liq_codrubro\n JOIN liqrubros ON rub_codrubro = liq_codrubro\n GROUP BY 1 HAVING tmp_liqtotal > 0\";\n*/\n $slSql[] =\"SELECT\n com_regnumero AS det_regnumero, '\".\n $pTip . \"' AS det_tipocomp,\n com_numcomp AS det_numcomp,\n com_feccontab AS det_feccontab,\n 1 AS det_secuencia,\n 1 AS det_clasregistro,\n com_codreceptor AS com_productor,\n com_codreceptor AS det_idauxiliar,\n (liq_valtotal * rub_Inddbcr * \" . $pSig . \") AS det_valdebito,\n 0000000000.00 AS det_valcredito,\n ' ' AS det_glosa,\n 0 AS det_estejecucion,\n com_feccontab AS det_fecejecucion,\n 0 AS det_estLibros,\n '2020-12-31' AS det_feclibros,\n 0 AS det_refoperativa,\n 0 AS det_numcheque ,\n com_feccontab AS det_feccheque,\n '' AS det_codcuenta,\n 0 AS pro_semana,\n 0000000000.00 AS tmp_liqtotal,\n 1 AS cue_reqauxiliar,\n -1 AS cue_tipauxiliar\n FROM tmp_liquidado\n JOIN concomprobantes ON com_tipocomp = 'LQ' AND com_numcomp = tmp_numliquida\n JOIN liqliquidaciones ON liq_numliquida = tmp_numliquida\n JOIN liqprocesos ON pro_ID = \" . $pProc . \" AND liq_numproceso = pro_ID\n JOIN liqreportes ON rep_ReporteID = \" . $pID . \" AND rep_codrubro = liq_codrubro\n JOIN liqrubros ON rub_codrubro = liq_codrubro\n ORDER BY 3,4\" ;\n return fSQL($db, $slSql);\n}", "title": "" }, { "docid": "f955ffd68d0aa7c463103ea0331a4a6b", "score": "0.5020528", "text": "public function getBAO();", "title": "" }, { "docid": "847f70b0dd152f25519f310a1066a48e", "score": "0.50204146", "text": "function datosNuevoCabina($id_componente = NULL,$nombre,$referencia,$descripcion,$version,$referencias,$piezas,$id_tipo = 1,$nombre_archivo,$interfaces = NULL,$estado,$prototipo,$kits) {\n\t\t$this->id_componente = $id_componente;\n\t\t$this->nombre = $nombre;\n\t\t$this->referencia = $referencia;\n\t\t$this->descripcion = $descripcion;\n\t\t$this->version = $version;\n\t\t$this->referencias = $referencias;\n\t\t$this->piezas = $piezas;\n\t\t$this->id_tipo = $id_tipo;\n\t\t$this->nombre_archivo = $nombre_archivo;\n\t\t$this->estado = $estado;\n\t\t$this->prototipo = $prototipo;\n\t\t$this->kits = $kits;\n\t}", "title": "" }, { "docid": "81d36fbbeb05d2ef8cb397830ec4d842", "score": "0.50199145", "text": "public function getNumeroCompte()\n {\n return $this->NumeroCompte;\n }", "title": "" }, { "docid": "5cab9d4aa463442798a8f7164618211c", "score": "0.50185543", "text": "function uf_crear_vista_04()\r\n\t{\r\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n //Creación de la vista numero 04\r\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\t $lb_valido = true;\r\n\t \t $ls_sql= \"CREATE OR REPLACE VIEW cierre_contableaportes_contable_proy_intcom AS \r\n SELECT scg_cuentas.sc_cuenta AS cuenta, 'D' AS operacion, sum(abs(sno_salida.valsal)) AS total,\r\n\t\t\t\t\t\t sno_concepto.codprov, sno_concepto.cedben, sno_concepto.codconc, sno_salida.codemp, \r\n\t\t\t\t\t\t\t\tsno_salida.codnom, sno_salida.codperi\r\n FROM sno_personalnomina, sno_unidadadmin, sno_salida, sno_concepto, spg_cuentas, \r\n\t\t\t\t\t\t scg_cuentas, spg_ep1\r\n WHERE sno_salida.valsal <> 0\r\n\t\t\t\t\t\t AND (sno_salida.tipsal = 'P2' OR sno_salida.tipsal = 'V4' OR sno_salida.tipsal = 'W4') \r\n\t\t\t\t\t\t\tAND sno_concepto.intprocon = '1'\r\n\t\t\t\t\t\t AND sno_concepto.conprocon = '0'\r\n\t\t\t\t\t\t AND spg_cuentas.status = 'C'\r\n\t\t\t\t\t\t\tAND spg_ep1.estint = 1 \r\n\t\t\t\t\t\t\tAND substr(sno_concepto.codpro, 1, 25) = spg_ep1.codestpro1\r\n\t\t\t\t\t\t\tAND spg_ep1.estcla = sno_concepto.estcla\r\n\t\t\t\t\t\t\tAND spg_ep1.sc_cuenta = spg_cuentas.scgctaint\r\n\t\t\t\t\t\t\tAND spg_cuentas.scgctaint = scg_cuentas.sc_cuenta \r\n\t\t\t\t\t\t\tAND sno_personalnomina.codemp = sno_salida.codemp\r\n\t\t\t\t\t\t\tAND sno_personalnomina.codnom = sno_salida.codnom\r\n\t\t\t\t\t\t\tAND sno_personalnomina.codper = sno_salida.codper \r\n\t\t\t\t\t\t\tAND sno_salida.codemp = sno_concepto.codemp \r\n\t\t\t\t\t\t\tAND sno_salida.codnom = sno_concepto.codnom \r\n\t\t\t\t\t\t\tAND sno_salida.codconc = sno_concepto.codconc \r\n\t\t\t\t\t\t\tAND sno_personalnomina.codemp = sno_unidadadmin.codemp\r\n\t\t\t\t\t\t\tAND sno_personalnomina.minorguniadm = sno_unidadadmin.minorguniadm\r\n\t\t\t\t\t\t\tAND sno_personalnomina.ofiuniadm = sno_unidadadmin.ofiuniadm \r\n\t\t\t\t\t\t\tAND sno_personalnomina.uniuniadm = sno_unidadadmin.uniuniadm \r\n\t\t\t\t\t\t\tAND sno_personalnomina.depuniadm = sno_unidadadmin.depuniadm \r\n\t\t\t\t\t\t\tAND sno_personalnomina.prouniadm = sno_unidadadmin.prouniadm \r\n\t\t\t\t\t\t\tAND spg_cuentas.codemp = sno_concepto.codemp \r\n\t\t\t\t\t\t\tAND spg_cuentas.spg_cuenta = sno_concepto.cueprepatcon\r\n\t\t\t\t\t\t\tAND substr(sno_concepto.codpro, 1, 25) = spg_cuentas.codestpro1\r\n\t\t\t\t\t\t\tAND substr(sno_concepto.codpro, 26, 25) = spg_cuentas.codestpro2\r\n\t\t\t\t\t\t\tAND substr(sno_concepto.codpro, 51, 25) = spg_cuentas.codestpro3\r\n\t\t\t\t\t\t\tAND substr(sno_concepto.codpro, 76, 25) = spg_cuentas.codestpro4\r\n\t\t\t\t\t\t\tAND substr(sno_concepto.codpro, 101, 25) = spg_cuentas.codestpro5\r\n GROUP BY sno_concepto.codconc, scg_cuentas.sc_cuenta, sno_concepto.codprov, \r\n\t\t\t\t\t\t sno_concepto.cedben, sno_salida.codemp, sno_salida.codnom, sno_salida.codperi\r\n UNION \r\n SELECT scg_cuentas.sc_cuenta AS cuenta, 'D' AS operacion, sum(abs(sno_salida.valsal)) AS total, \r\n\t\t\t\t\t sno_concepto.codprov, sno_concepto.cedben, sno_concepto.codconc,\r\n\t\t\t\t\t\t sno_salida.codemp, sno_salida.codnom, sno_salida.codperi\r\n FROM sno_personalnomina, sno_unidadadmin, sno_salida, sno_concepto, \r\n\t\t\t\t\t spg_cuentas, scg_cuentas, spg_ep1\r\n WHERE sno_salida.valsal <> 0\r\n\t\t\t\t\t AND (sno_salida.tipsal = 'P2' OR sno_salida.tipsal = 'V4' OR sno_salida.tipsal = 'W4') \r\n\t\t\t\t\t\tAND sno_concepto.intprocon = '0'\r\n\t\t\t\t\t AND sno_concepto.conprocon = '0'\r\n\t\t\t\t\t\tAND spg_cuentas.status = 'C'\r\n\t\t\t\t\t\tAND spg_ep1.estint = 1 \r\n\t\t\t\t\t\tAND spg_ep1.codestpro1 = substr(sno_unidadadmin.codprouniadm, 1, 25) \r\n\t\t\t\t\t\tAND spg_ep1.estcla = sno_unidadadmin.estcla\r\n\t\t\t\t\t\tAND spg_ep1.sc_cuenta = spg_cuentas.scgctaint\r\n\t\t\t\t\t\tAND spg_cuentas.scgctaint = scg_cuentas.sc_cuenta \r\n\t\t\t\t\t\tAND sno_personalnomina.codemp = sno_salida.codemp\r\n\t\t\t\t\t\tAND sno_personalnomina.codnom = sno_salida.codnom \r\n\t\t\t\t\t\tAND sno_personalnomina.codper = sno_salida.codper \r\n\t\t\t\t\t\tAND sno_salida.codemp = sno_concepto.codemp \r\n\t\t\t\t\t\tAND sno_salida.codnom = sno_concepto.codnom \r\n\t\t\t\t\t\tAND sno_salida.codconc = sno_concepto.codconc \r\n\t\t\t\t\t\tAND sno_personalnomina.codemp = sno_unidadadmin.codemp \r\n\t\t\t\t\t\tAND sno_personalnomina.minorguniadm = sno_unidadadmin.minorguniadm \r\n\t\t\t\t\t\tAND sno_personalnomina.ofiuniadm = sno_unidadadmin.ofiuniadm \r\n\t\t\t\t\t\tAND sno_personalnomina.uniuniadm = sno_unidadadmin.uniuniadm\r\n\t\t\t\t\t\tAND sno_personalnomina.depuniadm = sno_unidadadmin.depuniadm \r\n\t\t\t\t\t\tAND sno_personalnomina.prouniadm = sno_unidadadmin.prouniadm \r\n\t\t\t\t\t\tAND spg_cuentas.codemp = sno_concepto.codemp \r\n\t\t\t\t\t\tAND spg_cuentas.spg_cuenta = sno_concepto.cueprepatcon\r\n\t\t\t\t\t\tAND substr(sno_unidadadmin.codprouniadm, 1, 25) = spg_cuentas.codestpro1\r\n\t\t\t\t\t\tAND substr(sno_unidadadmin.codprouniadm, 26, 25) = spg_cuentas.codestpro2\r\n\t\t\t\t\t\tAND substr(sno_unidadadmin.codprouniadm, 51, 25) = spg_cuentas.codestpro3\r\n\t\t\t\t\t\tAND substr(sno_unidadadmin.codprouniadm, 76, 25) = spg_cuentas.codestpro4\r\n\t\t\t\t\t\tAND substr(sno_unidadadmin.codprouniadm, 101, 25) = spg_cuentas.codestpro5\r\n GROUP BY sno_concepto.codconc, scg_cuentas.sc_cuenta, sno_concepto.codprov,\r\n\t\t\t\t\t sno_concepto.cedben, sno_salida.codemp, sno_salida.codnom, sno_salida.codperi; \";\t \r\n\t\t\t \r\n\t if (!empty($ls_sql))\r\n\t\t{\t\r\n\t\t \t$li_row=$this->io_sql->execute($ls_sql);\r\n\t\t \tif($li_row===false)\r\n\t\t \t{ \r\n\t\t\t \t$this->io_msg->message(\"Problemas al ejecutar uf_crear_vista_04\");\r\n\t\t\t \t$lb_valido=false;\r\n\t\t \t}\r\n\t\t} \r\n\t return $lb_valido;\r\n\t}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "82273e5e3f07771656b88c20a0938fa2", "score": "0.0", "text": "public function create()\n {\n return view('experts.create');\n }", "title": "" } ]
[ { "docid": "cd749a934c696538b3e099b4d2ba0015", "score": "0.7627033", "text": "public function create()\n {\n $fields = $this->getModelAttributes();\n return view('admin::resource.create', [\n 'fields' => $fields,\n 'model_name' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "f1aa5d7e46cf00cbf41bf58f5ceda0c2", "score": "0.7585289", "text": "public function create()\n {\n //Show form\n return view(\"crud.create\");\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": "847f31131a446a7e6b918b68e4c25931", "score": "0.75209117", "text": "public function create()\n {\n $this->authorize('create'.static::property('permissionsKey'), $this->property('model'));\n abort_unless($this->property('creatable'), 404);\n $this->initCrud('create');\n\n return view(\n 'sanjab::crud.form',\n [\n 'widgets' => $this->widgets,\n 'properties' => $this->properties(),\n ]\n );\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "22c85d143923c7286b034ce76c3999f2", "score": "0.74470264", "text": "public function create()\n {\n return view('client_resources/create');\n }", "title": "" }, { "docid": "4eaea77a3f9e9b50f3e0414af79bf7a7", "score": "0.7437758", "text": "public function create()\n {\n return view('Management.form');\n }", "title": "" }, { "docid": "e9c275016c949096478e7c1212af850f", "score": "0.74231863", "text": "public function create()\n {\n return view('dashboard.resources.create');\n }", "title": "" }, { "docid": "39eb14c98184bf87cb7b9b926cd342cb", "score": "0.73501885", "text": "public function create()\n {\n return view('admin.' . $this->resource . '.edit')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "88695e4b149d95720c5ac55533797c54", "score": "0.73035413", "text": "public function create()\n {\n return view('libro.form');\n }", "title": "" }, { "docid": "6e94861dae8254ceeb5bf383628ede0a", "score": "0.7296088", "text": "public function create()\n {\n return view('his.form');\n }", "title": "" }, { "docid": "6cf06b4ee844ead00717499172b83025", "score": "0.72864044", "text": "public function create()\n\t{\n\n\t\treturn $this->view('form');\n\t}", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "f10c72d1d374d3db79ac1e8a9b8873a7", "score": "0.72265655", "text": "public function newAction() {\n #BreadCrumbs\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Dashboard\", $this->get(\"router\")->generate(\"admin_dashboard\"));\n $breadcrumbs->addItem(\"Pessoa\", $this->get(\"router\")->generate(\"admin_pessoa\"));\n $breadcrumbs->addItem(\"Novo\");\n\n $entity = new Pessoa();\n $form = $this->createCreateForm($entity);\n\n return $this->render('NutrirBoxBundle:Pessoa:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6b9b7e6e4f2dbc9ec96ee045c814e5a9", "score": "0.72259897", "text": "public function create()\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n\n $hasWysiwyg = false;\n\n foreach($resource->fields as $field)\n {\n if($field->type == 'wysiwyg') $hasWysiwyg = true;\n\n if($field->type == 'relational')\n {\n $model = $field->data('model');\n $options[$field->slug] = $model::all()->lists($field->data('title'), $field->data('key'));\n }\n }\n\n return view('laramanager::resource.create', compact('resource', 'hasWysiwyg', 'options'));\n }", "title": "" }, { "docid": "615e1e405829434ac8a2641e8cda70cd", "score": "0.7208444", "text": "public function create()\n {\n \n return $this->view('form');\n }", "title": "" }, { "docid": "24f9cccb94c863a3597c726aa6fbf63a", "score": "0.72051704", "text": "public function newAction()\n {\n $entity = $this->getEntity();\n $form = $this->createForm($this->getForm(), $entity);\n\n return $this->render('AdminBundle:'. $this->getEntityName() .':new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "f3c9f12e975dc77a01826c005093d6b2", "score": "0.72042", "text": "public function create()\n {\n return view('backend.school.addform');\n }", "title": "" }, { "docid": "7a3ec01c72669a385174d3ad261d470c", "score": "0.7201331", "text": "public function create()\n {\n return view('fishing.form_create');\n }", "title": "" }, { "docid": "0c04a47c6f7506359f9abcc642a0f02d", "score": "0.71757704", "text": "public function create()\n {\n $data['model'] = $this->model;\n $data['routeResource'] = $this->routeResource;\n\n return view('rasrobin\\crud::create', $data);\n }", "title": "" }, { "docid": "cf99d23ef746497f004a96ecca3a9044", "score": "0.71649086", "text": "public function create()\n {\n return view('Admin.Form.add');\n }", "title": "" }, { "docid": "32f51dcef719e9b15d121d0b155470d8", "score": "0.7145399", "text": "public function create()\n {\n return view('admin.target.forms.create');\n }", "title": "" }, { "docid": "3df2368951f0ac654c89e5a1194b65cf", "score": "0.71295273", "text": "public function create()\n {\n return view ('admin.resto.create');\n }", "title": "" }, { "docid": "e979c69b68c637bd06301921bbe0ddee", "score": "0.7129174", "text": "public function create()\n\t{\n\t\treturn view('forms.supplier');\n\t}", "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": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "495c845ffaf7a74f790c1a203f1edc12", "score": "0.71016014", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/Obs/create');\n\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "f2ff56c20f7b7b43ea1adc235d66e0b2", "score": "0.7075744", "text": "public function create()\n {\n return view('create_new');\n }", "title": "" }, { "docid": "a55bf151cf36ab4ee4f398e16d69496e", "score": "0.70715034", "text": "public function create()\n {\n return view(\"aktuelno.create\");\n }", "title": "" }, { "docid": "bd4f863612d48ed4663bd0cdfa80052a", "score": "0.706284", "text": "public function create() {\n return view( 'allergen.create' );\n }", "title": "" }, { "docid": "25f912097858426291657ade2c3dec4d", "score": "0.70607466", "text": "public function create()\n {\n return view('clients.createForm');\n }", "title": "" }, { "docid": "6f5d674aa27746b092c1ffe7dd20d184", "score": "0.704823", "text": "public function create()\n {\n return view('form.newkamar');\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "128da9f8aa4b206632b5b3b35bf28ca1", "score": "0.70254", "text": "public function create()\n {\n\t\treturn view('form',array('inserido'=>false, 'insercao'=>false, 'erro'=>null));\n }", "title": "" }, { "docid": "c636af9277b006e5ea5ea872cb0d452e", "score": "0.7024831", "text": "public function create()\n\t{\n\t\treturn view('task._form');\n\t}", "title": "" }, { "docid": "9a454ee3306cfd8e58a75119a371cbdd", "score": "0.7022644", "text": "public function create()\n\t\t{\n\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "85517e569b653de2cbd7e2bb2b997d5f", "score": "0.7020551", "text": "public function create()\n {\n if (isset($_GET['question_id'])) {\n $question_id = $_GET['question_id'];\n $question = Question::find($question_id);\n if( $question != null){\n return view('questions/form', compact('question'));\n }\n }\n return view(\"options/form\", [\"questions\" => Question::all()]);\n }", "title": "" }, { "docid": "cbc1937258b10014f8109c79e1f724d8", "score": "0.70177096", "text": "public function create()\n {\n return view(\"reg_form\");\n }", "title": "" }, { "docid": "5d83eb8632311d18a8232b40d1af5f20", "score": "0.70038116", "text": "public function create()\n {\n //form ya ku create\n return view('create');\n }", "title": "" }, { "docid": "10d593cbbc8de65afac98fa2dd12bd96", "score": "0.69993895", "text": "public function create()\n {\n return view('.product.form');\n }", "title": "" }, { "docid": "81c896c9678449c75c1ed4277a8b80a4", "score": "0.6995233", "text": "public function create()\n\t{\n return view('settingInformation.form');\n\t}", "title": "" }, { "docid": "45d37bd0114d869b9ab659945e9c8cd8", "score": "0.69933426", "text": "public function create()\n {\n //\n return view(\"lampirans.create\");\n }", "title": "" }, { "docid": "bf554a06aa60840a36e31daa0fe31054", "score": "0.6987092", "text": "public function newAction()\n {\n $entity = new Tutor();\n $form = $this->createForm(new TutorType(), $entity);\n\n return $this->render('BdxTutoratBundle:Tutor:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "cab3875b40e1926cadf5d240d5755c33", "score": "0.69831926", "text": "public function create()\n\t{\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "6a99dd7c2b96f96c80b3b926b607b9b7", "score": "0.69826627", "text": "public function create()\n {\n // Show the page\n return view('admin.credit.create_edit');\n }", "title": "" }, { "docid": "daf28f960dad10d136b88bf0cb698afe", "score": "0.69729453", "text": "public function create()\n\t{\n\t\treturn view('siswa.add');\n\t}", "title": "" }, { "docid": "2b881c0727ec10fe41bf178ec98febc8", "score": "0.6967141", "text": "function createForm(){\n return view('user/createform');\n }", "title": "" }, { "docid": "8f4f925d144fcbd561a74f4eb50da53b", "score": "0.6965259", "text": "public function create()\n {\n $categories = $this->platFormCatRepository->all();\n return view('plat_forms.create')\n ->with('categories', $categories)\n ->with('model_required',\\Zcjy::modelRequiredParam($this->platFormRepository->model()));\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "a3fe703c4575f7714a79c1834083fd33", "score": "0.6960253", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n // dd($data);\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "568ea885a4e92c3f3dcc0a424d5f6c59", "score": "0.69571805", "text": "public function create()\n {\n $this->authorize('create', [Answer::class]);\n\n return view('resourceRoute.create');\n }", "title": "" }, { "docid": "1307ba3f5634143845f4c2ffe7014fc5", "score": "0.6954906", "text": "public function newAction()\n {\n //Get the form\n $form = $this->getSignupForm();\n\n //Add the form to the view\n $this->view->form = $form;\n\n }", "title": "" }, { "docid": "41eb11154e57dff75498fcf25564c134", "score": "0.6952435", "text": "public function create()\n {\n return view('admin.book.add');\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "5ff33c7acc97152a663cdf3160a26831", "score": "0.6947272", "text": "public function create()\n {\n return view('admin.spravochniki.request.form', [\n 'block' => false,\n 'request' => new ModelRequest(),\n ]);\n }", "title": "" }, { "docid": "e0279682128d83f057dec763451b31bc", "score": "0.6944094", "text": "public function create()\n {\n return view('product/form');\n }", "title": "" }, { "docid": "ad623548153e56c22245e48fee70a80f", "score": "0.69390464", "text": "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add').' '. __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "title": "" }, { "docid": "7b154d4b3724cc827c62a643103ec2ef", "score": "0.69361335", "text": "public function create()\n {\n return view('fourier.formCreate');\n }", "title": "" }, { "docid": "dee653019202200b40a5bbd41642b9bf", "score": "0.6931119", "text": "public function newAction()\n {\n $this->view->form = new PeliculasForm(null, ['edit' => true]);\n }", "title": "" }, { "docid": "db32a9e40570f5e3b6f29ec12cf7bf6d", "score": "0.692986", "text": "public function create()\n {\n return view('company/form_create');\n }", "title": "" }, { "docid": "027afc753c513ccea0aa26c4efe7e954", "score": "0.69293797", "text": "public function create()\n {\n return view('admin/form');\n }", "title": "" }, { "docid": "f1bdc650376e8cc0232d73fad221368f", "score": "0.6929196", "text": "public function create()\n {\n return view('control.create');\n }", "title": "" }, { "docid": "f9dc8bac23c393a94f519f7b2fdb6be0", "score": "0.6926257", "text": "public function create()\n {\n // form goes here\n }", "title": "" }, { "docid": "c1e9c0bcb40a8fbd086627d56c99360c", "score": "0.69253355", "text": "public function create()\n {\n return view('components.etc.write_form');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.6914903", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "5a0f5a391b52ddb780aabb623298e0f5", "score": "0.6909269", "text": "public function create(){\n return view('restful.add');\n }", "title": "" }, { "docid": "4a1cd8958cd01307d0ecead6ac1bcc80", "score": "0.6902085", "text": "public function create()\n {\n $model = new Employee();\n $status = 0;\n\n return $this->view('employee.form', compact('model', 'status'));\n }", "title": "" }, { "docid": "0970488c3db9a5f8c034af420d11d820", "score": "0.69016725", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "b710ac6db291a730b45046211e6cb702", "score": "0.69012576", "text": "public function create()\n\t{\n return View::make('admin/formateurs/create');\n\t}", "title": "" }, { "docid": "9bb74ea3a8eb11d7ad6b3bebfc39fbf1", "score": "0.6898137", "text": "public function create()\n {\n return view('Admin.Article.article-creation-form');\n }", "title": "" }, { "docid": "eb61327aac5a1264dae808299a9ae828", "score": "0.6894682", "text": "public function create()\n\t{\n\t\treturn View::make('registrasi.create' );\n\t}", "title": "" }, { "docid": "2984acd37c1bc542eca26984c45d8465", "score": "0.6892525", "text": "public function create()\n {\n return view('admin.karlcrud.create');\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "e9341a1375b53713ef8760a5689b525f", "score": "0.68912005", "text": "public function create()\n {\n return view('bookself.create');\n }", "title": "" }, { "docid": "b58ff924b3a3f9910b1eeae648a9a2fa", "score": "0.6889643", "text": "public function create()\n {\n return view('devoirs.create');\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "7311ea20d7522de0066ea36a19e7cd20", "score": "0.6884048", "text": "public function create()\n {\n //\n return view('atg-form');\n }", "title": "" }, { "docid": "a6e6c7bffb5d673576a15ca1abf51092", "score": "0.6879282", "text": "public function create()\n {\n return view('collections.form');\n }", "title": "" }, { "docid": "ffbbc91eecacd009ec1b4248cab90dff", "score": "0.6879207", "text": "public function create() // atsakinga uz formos atvaizdavima, kuri leidzia sukurti irasus\n {\n return view (\"author.create\");\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.6879102", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "71d70dee3fbb8a46b70d495d78e89449", "score": "0.68789995", "text": "public function create() {\n\t\treturn view( 'product.create' );\n\t}", "title": "" }, { "docid": "207e541fffe4606f7ae315a88e21fc10", "score": "0.68782616", "text": "public function create()\n\t{\n\t\treturn View::make('backend.referrers.create');\n\t}", "title": "" }, { "docid": "b4525945bdcd19e970b4d9b86a6193ce", "score": "0.68777317", "text": "public function createAction() {\n $post_request = (array) $this->postZingRequest();\n\n /** Handle the request */\n $errors = $this->_handleRequest($post_request);\n\n return $this->renderAdmin('ZingCorePageBundle:Default:form.html.twig', array_merge(\n array(\n 'zing_form_action' => 'Create',\n 'zing_form_errors' => $errors,\n 'post_request' => $post_request\n ),\n $post_request\n ));\n }", "title": "" }, { "docid": "7c346379a95657009b35746ed2305722", "score": "0.6877182", "text": "public function create()\n\t{\n\t\treturn View::make('catalogue.create');\n\t}", "title": "" }, { "docid": "f7304e6dc56cce3d9947b5ce6729aa85", "score": "0.6873777", "text": "public function create()\n\t{\n\t\treturn View::make('licenza.create');\n\t}", "title": "" }, { "docid": "ebdce886eb2fdbea3a87d3f3b92db918", "score": "0.6873244", "text": "public function create()\n {\n return view(\"nomina.create\");\n }", "title": "" }, { "docid": "42c131d9eade9523c90b6cdedaacbe70", "score": "0.6871986", "text": "public function create()\n {\n return view('auditors.form');\n }", "title": "" }, { "docid": "56017529546e8304e804a9b51074a4d9", "score": "0.6871903", "text": "public function create()\n {\n $title = 'Author';\n $custom_cat = 'authors';\n return view('admin.backend.authors.authorForm',compact('title','custom_cat'));\n }", "title": "" }, { "docid": "dbb47aeadc4da817ea8f9487995cf297", "score": "0.6867221", "text": "public function create()\n {\n return view('backend.information.create');\n }", "title": "" }, { "docid": "f3629c028fcfa177b464594dc370290b", "score": "0.6863994", "text": "public function create()\n {\n return view('admin.marcas.form');\n }", "title": "" }, { "docid": "93c1d848ae6ff8f424b0a9a3772d1840", "score": "0.68612427", "text": "public function create()\n {\n return view('Article.form');\n }", "title": "" }, { "docid": "5076aaebcae577af1526cd70d2c2b11a", "score": "0.68612194", "text": "public function create()\n {\n //\n return view('supir.create');\n }", "title": "" }, { "docid": "5ca8f4f60f43f710ad0b3d2ef4278141", "score": "0.68609405", "text": "public function create()\n {\n return view(\"students/add\");\n }", "title": "" }, { "docid": "7b28f26445b6881c693a90b24ca99ad8", "score": "0.6859603", "text": "public function create()\n {\n return view('manage.create');\n }", "title": "" }, { "docid": "45ce62ff3c2da4026a5253e3e69dc4cb", "score": "0.68594766", "text": "public function create()\n {\n Gate::authorize('admin-carreras');\n return view('carrera.carrera-form');\n }", "title": "" }, { "docid": "6a2d5b23c14939fb07f566dfcff1ba71", "score": "0.68588877", "text": "public function create()\n {\n return view('student.student.create');\n }", "title": "" } ]
ab1d98bc0e1ddfaa7b1fe8c14ce876a6
/ Echo success label
[ { "docid": "07183957bb76bbc1076fcc55ef8e092c", "score": "0.66119623", "text": "function EchoDOMSuccess($innerTEXT)\n{\n echo (\"<div class=\\\"alert alert-success\\\">$innerTEXT</div>\");\n}", "title": "" } ]
[ { "docid": "0cd98355461d3dabfe86b7879aa6270c", "score": "0.77361566", "text": "function formSuccess() {\n\n // Template\n $this->r->text['back_url'] = suxFunct::getPreviousURL();\n $this->r->title .= \" | {$this->r->gtext['success']}\";\n\n $this->tpl->display('success.tpl');\n\n }", "title": "" }, { "docid": "322e1f91c2d3cf69d77d164ae671f643", "score": "0.7410698", "text": "public function printSuccessMessage()\n {\n printf('Successfully checked %d lines in %d files :)'. PHP_EOL, $this->lines, $this->files);\n }", "title": "" }, { "docid": "8fd09ee4c29c6966a919604fbeb20a8c", "score": "0.7297279", "text": "public function license_success_message() {\n\t\t$message = __( 'Your Block Lab license was successfully activated!', 'block-lab' );\n\t\treturn sprintf( '<div class=\"notice notice-success\"><p>%s</p></div>', esc_html( $message ) );\n\t}", "title": "" }, { "docid": "dbb48c7342cd279893f74d1b9dc2620d", "score": "0.7250981", "text": "public function actionSuccess()\n {\n return $this->render('success');\n }", "title": "" }, { "docid": "d1036b51f44ed3ec093c5a72545616c2", "score": "0.7214866", "text": "public function get_success_message() {\r\n\t\treturn '';\r\n\t}", "title": "" }, { "docid": "9e5be17e29b1634712f87571bd2fdbd2", "score": "0.7196452", "text": "function success($msg) {\n if ($msg) {\n echo \" <div class=\\\"success\\\">\" . $msg . \"</div>\\n\";\n } else {\n echo \" <div class=\\\"success\\\">\" . _('Something has been successfully performed. What exactly, however, will remain a mystery.') . \"</div>\\n\";\n }\n}", "title": "" }, { "docid": "2d368af03762c416147f99501e4012ed", "score": "0.71426445", "text": "public function show_success_message() {\n\t\tif ( $this->have_settings_been_saved() ) {\n\t\t\techo '<p class=\"wpseo-message\"><span class=\"dashicons dashicons-yes\"></span>',\n\t\t\t\tesc_html__( 'Settings saved.', 'wordpress-seo' ),\n\t\t\t\t'</p>';\n\t\t}\n\t}", "title": "" }, { "docid": "deea7b58be0f49755ab8a385186f4b06", "score": "0.7126383", "text": "function displaySuccessMessage($index,$params = array()) {\n\t\tglobal $lang;\n\t\n\t\treturn '<div class=\"alert alert-success\">'.getLang('form_success_'.$index,$params).'</div>';\n\t}", "title": "" }, { "docid": "d53c4a25c6f0c788e9f2b0357674fce2", "score": "0.70692325", "text": "function success() {\n echo \"<br />\";\n \n echo \"Thank you for contacting us. We will be in touch with you very soon.\";\n \n echo \"<br />\";\n \n \n \n }", "title": "" }, { "docid": "51eabacb8f9d40b263072c9d60b0e07a", "score": "0.70634055", "text": "private static function success(string $message): void\n {\n echo \"\\033[42m\\033[30m\" . $message . \"\\033[0m\" . PHP_EOL;\n }", "title": "" }, { "docid": "c24ef2f3e66c7aa2962a765e92edaf0d", "score": "0.6989831", "text": "public function callbackSuccess()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the callback method returned true.</i></p>\"); \n $this->redirectTo();\n }", "title": "" }, { "docid": "4b8dcf4c5518f4dda295e38cc789d895", "score": "0.69560206", "text": "public function callbackSuccess()\n {\n $this->AddOutput(\"<p><i>Välkommen till Allt Om Landskapsfotografering! Ditt användare id är: \" . $this->acronym . \" </i></p>\");\n $this->redirectTo();\n }", "title": "" }, { "docid": "14fba6ef816602425a3c23ed4ae90994", "score": "0.69483227", "text": "function feedbackAvaliador() {\n echo '<p class=\"feedback success\"><b>Revisor adicionado com sucesso.</b></p>';\n }", "title": "" }, { "docid": "7213c5ffaa8a7caf101b4d01c7c4cdfa", "score": "0.6928151", "text": "function ufclas_matlab_admin_notice_success(){\n\t$message = ufclas_matlab_get_success();\n\t?>\n <div class=\"notice notice-success\">\n <p><?php echo __( 'Import successful. View the imported page: ', 'ufclas-matlab' ) . $message; ?> </p>\n </div>\n <?php\n\t\n}", "title": "" }, { "docid": "71e34e29c582290d5a88ad4de81422e3", "score": "0.68463403", "text": "public static function success($message = '') {\n self::writeLine($message, SELF::CLI_COLOR_GREEN, self::CLI_TYPE_SUCCESS);\n }", "title": "" }, { "docid": "9763c71609830a6afabaf325e5bbf927", "score": "0.6843064", "text": "public static function alertSuccess($msg) {\n\t\t\techo \"<div class=\\\"alert success\\\">\n\t\t\t\t<p>\n\t\t\t\t\t<strong>\".$msg.\"</strong>\n\t\t\t\t</p>\n\t\t\t</div>\";\n\t\t}", "title": "" }, { "docid": "45ed3243860072a8297fce9564da566e", "score": "0.683457", "text": "protected function success()\n {\n return $this->info(\"The custom commands runs properly !\");\n }", "title": "" }, { "docid": "9fe930a108f4370043b5738e7a02469c", "score": "0.68313557", "text": "function custom_success( $msg, $success ) {\n\n\t\tif ( $success == 'mycred_transfer_done' ) {\n\t\t\t$msg = __( 'Points transferred successfully', 'twodayssss' );\n\t\t}\n\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "7b50ef94181971294842087b808d9a4d", "score": "0.68257505", "text": "protected function success(string $message)\n {\n if (FLOW_SAPITYPE === 'CLI') {\n echo \"\\033[32m\" . $message . \"\\033[0m\" . PHP_EOL;\n }\n }", "title": "" }, { "docid": "65f29c5c39750830ce29bc6706a74523", "score": "0.6811609", "text": "public function successMsg(){\n if(defined('PLUGIN_OPTIONS'))\n return $this->moduleSuccessMsg();\n return browser\\msg::pageNotFound();\n }", "title": "" }, { "docid": "eeff91d1c112be501b0a2c43d8c08a02", "score": "0.6807318", "text": "public function successAction()\r\n {\r\n View::renderTemplate('Signup/success.html');\r\n }", "title": "" }, { "docid": "e5f65b15a79962aa3fcc3ff95ea51c05", "score": "0.6800738", "text": "public function success()\n {\n return $this->type('success');\n }", "title": "" }, { "docid": "d2d03ab3821f8e3d7169563f3d863577", "score": "0.6797616", "text": "public function successMessage() { return $this->successMessage; }", "title": "" }, { "docid": "b2052bc2bc98703e67bd33154edd238f", "score": "0.6794824", "text": "protected function confirm_add()\n\t{\n\t\t$msg = 'Successfully added project ' . $this->fields['Title'] . '.';\n\t\treturn '<font color=\"green\">' . $msg . '</font><br>';\n\n\t}", "title": "" }, { "docid": "bb1cbce983524668b10a0f97b4ac998b", "score": "0.67915833", "text": "public static function success( $str, $prefix = 'success' )\n\t{\n\t\tstatic::line( static::color( $prefix, 'green' ).' '.$str );\n\t}", "title": "" }, { "docid": "7934c467bd407b2bb023af09f3913156", "score": "0.6743732", "text": "function put_success(string $message)\n{\n echo \"<aside class=\\\"notice success\\\">${message}</aside>\";\n}", "title": "" }, { "docid": "616868cfec7067732ab87ca04a3c6f3d", "score": "0.67397916", "text": "public function successAction()\n {\n View::renderTemplate('Signup/success.html');\n }", "title": "" }, { "docid": "e8aa33357e3ad7a5241674f8b46161c6", "score": "0.6732692", "text": "public function actionSuccess()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\t\t\n\t\t$email = Yii::app()->request->getParam('email');\n\t\t$this->render('success', array('email'=>$email,'is_found'=>true));\n\t}", "title": "" }, { "docid": "2ef9c55b3cfbb4d7dd7f6980948364dd", "score": "0.6715189", "text": "function form_success() {\n\t\t$this->sci->da('template');\n\t}", "title": "" }, { "docid": "9c6550f6e16e4b1c7bf98bcad8c0650e", "score": "0.6709131", "text": "public function notice_success( $itens = '' ) {\n\t\t$class = 'notice notice-success is-dismissible';\n\t\t$message = __( 'Sync completed successfully.', 'elemarjr' );\n\t\treturn sprintf( '<div class=\"%1$s\"><p>%2$s</p>%3$s</div>', esc_attr( $class ), esc_html( $message ), wp_kses_post( $itens ) );\n\t}", "title": "" }, { "docid": "3bf565b880e0cbb354b2061075152d0b", "score": "0.6707187", "text": "public function generateSuccess($message) {\n\t\t\techo \"\n\t\t\t\t<div class='alert alert-success' role='alert'>\n\t\t\t\t\t{$message}\n\t\t\t\t</div>\n\t\t\t\";\n\t\t}", "title": "" }, { "docid": "c05d750d1e847e7760f93a37e0b1cd3e", "score": "0.66954684", "text": "function res_rabon($value, $success_text = 'Successful.'){\n\tif($value == \"Success\"){\n\t\treturn '<div class=\"callout callout-info\">'.$success_text.'</div>';\n\t}else{\n\t\treturn '<div class=\"callout callout-warning\">'.$value.'</div>';\n\t}\n\t\n\t\n\t}", "title": "" }, { "docid": "4e7bdea4b17e0e52605edb377111cf1e", "score": "0.66938806", "text": "function printSessionSuccessMessage(){\n\t\tif (!empty($_SESSION[\"successMessage\"])) {\n\t\t\techo(\"<div class=\\\"alert alert-success alert-dismissible fade show text-center\\\" role=\\\"alert\\\">\" \n\t\t\t\t. $_SESSION[\"successMessage\"] \n\t\t\t\t. \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\">&times;</span></button></div>\");\n\t\t}\n\t}", "title": "" }, { "docid": "8bf5a941cfc4951442083bb1b5f58eb0", "score": "0.66927624", "text": "public function toString()\n {\n return 'Template success create message is present.';\n }", "title": "" }, { "docid": "132efe3eedda3339d2f13ed642dfc20f", "score": "0.6673979", "text": "protected function outOK()\n\t{\n\t\treturn $this->out('<ok>ok</ok>');\n\t}", "title": "" }, { "docid": "de230958045c41054a2c5c81213913ae", "score": "0.66623896", "text": "public function fuPrimaryPuccessAsText()\n {\n return ($this->fu_primary_success == 0) ? \"No\" : \"Yes\";\n }", "title": "" }, { "docid": "9b2f8843d70e7462b1c16e757baf6616", "score": "0.6660069", "text": "public function toString()\n {\n return 'Assert that success message is displayed';\n }", "title": "" }, { "docid": "b957d811274c65a75e295158a2cf33d0", "score": "0.6647882", "text": "protected function printOkBoxMessage($message){\n ?>\n <div class=\"alert alert-success\">\n <strong>OK! </strong> <?php echo $message ?>\n </div>\n <?php \n }", "title": "" }, { "docid": "1034084cca0175577480b757e8bcbb94", "score": "0.6646765", "text": "public function success() {\n return array(\n '#type' => 'markup',\n '#markup' => '<h1>Congratulations</h1><p>You just completed a purchase.</p>',\n );\n }", "title": "" }, { "docid": "b1db8d9c4931ab69be3aaf14a658353e", "score": "0.6645958", "text": "protected function outputSuccessMessage(string $message)\n {\n $this->outputLine(\"<fg=green>$message</>\");\n }", "title": "" }, { "docid": "17367ddd87d24165913d2c3befdc6a7a", "score": "0.6642058", "text": "public function success() {\n\t}", "title": "" }, { "docid": "9cb9a8680673ae5c7745628350406c62", "score": "0.6641276", "text": "protected function saySuccess($message)\n {\n $this->say(\"<notice> $message </notice>\");\n }", "title": "" }, { "docid": "e126fea9b04514f664fd3e752eeba837", "score": "0.663241", "text": "public static function success(string $msg): string\n {\n $msg = 'Success: ' . $msg;\n $space = self::tabSpaces($msg);\n $out = static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_GREEN) . PHP_EOL;\n $out .= static::colorize(' ' . $msg . ' ', Color::FG_WHITE, Color::AT_BOLD, Color::BG_GREEN) . PHP_EOL;\n $out .= static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_GREEN) . PHP_EOL;\n\n return $out;\n }", "title": "" }, { "docid": "641b7392c0e2c19df097f30d370638e5", "score": "0.6617074", "text": "function try_success($s, $e = \"\") {\n print \"> \". $s .\"success<br />\";\n if ($e != \"\")\n print \"> Message: \". $e .\"<br />\";\n }", "title": "" }, { "docid": "d63626ae9b29d4670b0a3aad74c7df86", "score": "0.6580287", "text": "function displaySuccessMsg() {\n\tif(isset($_SESSION['success'])) {\n\t\t// Set up row in accordance with Bootstrap grid\n\t\t/*echo '<div class=\"container\"><div class=\"row\"><div class=\"col-md-12\">';*/\n\t\techo '<div class=\"row\"><div class=\"col-md-12\">';\n\t\tforeach ($_SESSION['success'] as $success) {\n\t\t\techo '<p class=\"success\">',$success,'</p>';\n\t\t}\n\t\t/*echo '</div></div></div>';*/\n\t\techo '</div></div>';\n\t\t// Unset errors for page refresh\n\t\tunset ($_SESSION['success']);\n\t}\n}", "title": "" }, { "docid": "18aec17f211b1423f10b45da0df650fc", "score": "0.65747654", "text": "public static function success()\n {\n static::returnCode(static::CODE_SUCCESS);\n }", "title": "" }, { "docid": "b300e49ab49a9dbc77f1e1dca74ee4cb", "score": "0.65732604", "text": "public function getSuccessMessageText()\r\n {\r\n return $this->scopeConfig->getValue(\r\n self::XML_PATH_SUCCESS_MESSAGE_TEXT,\r\n ScopeInterface::SCOPE_STORE\r\n );\r\n }", "title": "" }, { "docid": "039f4253d509f9f6cfd915a35dac452f", "score": "0.65687203", "text": "function outputStatusMessage($message, $status) {\n\t\techo '<div class=\"alert alert-'.$status.'\">'.$message.'</div>';\n\t}", "title": "" }, { "docid": "4fb7b29e2e8874b500d9b7bada6efcd0", "score": "0.6541417", "text": "protected function setSuccessfulEditMessage()\n\t{\n\t\t$message = str_replace( array(\"%succeed%\", \"%total%\"), array( \"<strong>\".$this->nUpdated.\"</strong>\", \"<strong>\".$this->nSelected.\"</strong>\" ), \"%succeed% out of %total% records updated successfully.\");\n\t\t$this->setMessage( $message );\n\t\t\n\t\tif( $this->nUpdated != $this->nSelected ) {\n\t\t\t$message = str_replace( \"%failed%\", \"<strong>\".($this->nSelected - $this->nUpdated).\"</strong>\" , \"%failed% records failed.\");\n\t\t\t$this->setMessage( $message );\n\t\t}\n\t}", "title": "" }, { "docid": "d073a00777faf35a6a1018fc8cb8a2b7", "score": "0.6528145", "text": "public static function success($message)\n {\n return '<div class=\"alert alert-success\">' . $message . '</div>';\n }", "title": "" }, { "docid": "4b8d5c9082260b761175a116c6b13bfa", "score": "0.65252525", "text": "protected function markAsSuccess()\n {\n $this->view->success = true;\n }", "title": "" }, { "docid": "f3aff563f3c3d89bc0b3ff698b6ea97d", "score": "0.65075064", "text": "function successMsg($msg)\n{\n\treturn \"<div class=\\\"successMsg\\\">$msg</div>\";\n}", "title": "" }, { "docid": "f3aff563f3c3d89bc0b3ff698b6ea97d", "score": "0.65075064", "text": "function successMsg($msg)\n{\n\treturn \"<div class=\\\"successMsg\\\">$msg</div>\";\n}", "title": "" }, { "docid": "630887379631908dc89d451547941efb", "score": "0.6503571", "text": "public function success();", "title": "" }, { "docid": "c78fae4544eaac09a755dd9d70cf5860", "score": "0.65022004", "text": "function _showStatus() {\r\n $okMessage = implode('<br />', $this->_okMessage);\r\n $errMessage = implode('<br />', $this->_errMessage);\r\n\r\n if (!empty($errMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_ERROR_MESSAGE', $errMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('errormsg');\r\n }\r\n\r\n if (!empty($okMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_OK_MESSAGE', $okMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('okmsg');\r\n }\r\n }", "title": "" }, { "docid": "a4b4f586ad579a184c23e12c073f8628", "score": "0.64937836", "text": "public static function OnSuccess($attr,$content)\n {\n return '<?php if(!MyForms::hasErrors()) { ?>'.$content.'<?php } ?>';\n }", "title": "" }, { "docid": "081e5a6c590605f5849fed5a5a9a1faf", "score": "0.64838886", "text": "public static function success($text = null)\n {\n self::message($text, 'success');\n }", "title": "" }, { "docid": "b4964dc3c861796f685fe946c079eb69", "score": "0.64808345", "text": "public function callbackSuccess()\n {\n $this->AddOutput(\"<p><i>\" . $this->logoutMessage . \"</i></p>\");\n $this->redirectTo();\n }", "title": "" }, { "docid": "b5df73d8667101ef0a54595bd2c15329", "score": "0.6479644", "text": "function showSuccess($feedback)\n{\n showFeedback(new AlertMessage(AlertMessage::STYLE_SUCCESS, $feedback));\n}", "title": "" }, { "docid": "1b5d7be894fb6dbb0d639078b52d98d3", "score": "0.6479301", "text": "protected function add_comment_success_message(){\r\n\t\treturn 'Thank you for <a href=\"#comments\" class=\"scroll\">commenting</a>.';\r\n\t}", "title": "" }, { "docid": "1d358900b4066c98f3bc0179c1f15297", "score": "0.6477268", "text": "function makeLabel($response) {\n\t\t\n\t\t$hostName = $this->pingedHostName;\n\t\t\n\t\t//echo $response->getReceived() . \" : \" . $response->getTransmitted();\n\t\t\n\t\tswitch (true) {\n\t\t\t\n\t\t\tcase $response->getReceived() == 0:\n\t\t\t\n\t\t\t\t$state = \"red\";\n\t\t\t\t$message = \"<b>$hostName is not responding</b>\";\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase $response->getTransmitted() == $response->getReceived():\n\t\t\t\n\t\t\t\t$state = \"green\";\n\t\t\t\t$message = \"<b>$hostName</b> is available for use\";\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\tcase $response->getTransmitted() > $response->getReceived():\n\t\t\t\n\t\t\t\t$state = \"yellow\";\n\t\t\t\t$message = \"<b>$hostName</b> is available, yet busy\";\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\techo '<div id=\"\" class=\"'. $state .'\">'. $message .'</div>';\n\t}", "title": "" }, { "docid": "85065d0cf2cc944c026139bd391bd004", "score": "0.646831", "text": "public function success($message = null, $newlines = 1, $level = Shell::NORMAL) {\n\t\t$this->out('<success>' . $message . '</success>', $newlines, $level);\n\t}", "title": "" }, { "docid": "b6925acc4cb0d4e9da2122edce90fdbb", "score": "0.64640313", "text": "private function handle_success($succ) {\n $this->success .= $succ . \"rn\";\n }", "title": "" }, { "docid": "7f9705468c984e0055d3299d8f5f1b2e", "score": "0.64541245", "text": "public function success() {\n }", "title": "" }, { "docid": "73171fe1cc2f1394f4934aa176fd55f2", "score": "0.6450109", "text": "function active_success()\n {\n $message = null;\n $message = \"Email của bạn là hợp lệ. Cảm ơn bạn !<br />\";\n $message .= \"Bây giờ bạn có thể đăng nhập.\";\n $this->view->load('frontend/user/active_success', [\n 'message' => $message\n ]);\n }", "title": "" }, { "docid": "e121934f8fa07df66ec277b5492f0499", "score": "0.64271116", "text": "public function success( $message ) {\n\n \\WP_CLI::success( $message );\n }", "title": "" }, { "docid": "8eab685e1295cd8842dfa704dea582d5", "score": "0.6419983", "text": "public function success($message)\n {\n }", "title": "" }, { "docid": "71267c7002205b836e943be70f75c5b5", "score": "0.64154947", "text": "public function okAction ()\n {\n return $this->render( 'maileguak/ok.html.twig' );\n }", "title": "" }, { "docid": "d452995801e8ff057039eb100aebaa37", "score": "0.6415445", "text": "function successAlert($msgText)\n\t{\n\t\t$msgSuccess = \"<div class='alert alert-success alert-dismissible fade show'>\n\t\t\t\t\t\t<button type='button' class='close' data-dismiss='alert'>&times;</button>\n\t\t\t\t\t\t\" . $msgText . \"\n\t\t\t\t\t\t</div>\";\n\t\treturn $msgSuccess;\n\t}", "title": "" }, { "docid": "f9e25cb4d805f3ffe3d06168576f506f", "score": "0.64064664", "text": "public function runStatusSuccess(string $message): void\n {\n $this->runStatus('<fg=green>' . $message . '</>');\n }", "title": "" }, { "docid": "a2b61361b5f27c95161d19a522607178", "score": "0.6399393", "text": "public function addSuccessMessage($message) {\n\t\t$message = '<i class=\"fa fa-check\"></i> ' . $message;\n\t\t$this->addMessage($message, 'success');\n\t}", "title": "" }, { "docid": "c2aba1989585f176f5734d0eb42964cd", "score": "0.6392347", "text": "function render_success_message( $form, $args ) {\n $success_message = $form['display']['success_message'];\n $success_message = apply_filters( 'af/form/success_message', $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/id=' . $form['post_id'], $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/key=' . $form['key'], $success_message, $form, $args );\n\n $success_message = af_resolve_merge_tags( $success_message );\n \n echo '<div class=\"af-success\" aria-live=\"assertive\" role=\"alert\">';\n \n echo $success_message;\n \n echo '</div>';\n }", "title": "" }, { "docid": "ec3a02f5bb0270f214cd80201a95399e", "score": "0.6376941", "text": "public function status()\n {\n $this->response->text('OK');\n }", "title": "" }, { "docid": "0c343ce51ed4d97fd3e0a980600b7d00", "score": "0.63703996", "text": "public function success()\n {\n return Session::getFlash('raven:success');\n }", "title": "" }, { "docid": "30255dd4f57a74efb1ba5a7b046a4e8f", "score": "0.63699114", "text": "public function SuccessContent()\n {\n if ($object = $this->NewObject()) {\n $message = $this->Data()->SuccessMessage;\n return $this->editingMessageWithKeywords($object, $message);\n }\n }", "title": "" }, { "docid": "f845f5c7ac3200c958b470e70c87fa68", "score": "0.6335128", "text": "function success()\n {\n $message = null;\n $message = \"Một email đã được gửi tới hòm thư của bạn. <br />\";\n $message .= \"Vui lòng kiểm tra hộp thư đến và kích hoạt tài khoản.\";\n $this->view->load('frontend/user/register_success', [\n 'message' => $message\n ]);\n }", "title": "" }, { "docid": "7af126df4d76851d981dc3e6643bfc19", "score": "0.63319016", "text": "public function successMsg($str_message,$jump_url=\"\"){\r\n\t\t$this->success($str_message,$jump_url);\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "a26dd3dc46e2067178a2b7fa7c6581b2", "score": "0.6289101", "text": "public function adminBSBButtonSuccessFunction(array $args = []): string {\n return $this->adminBSBButton(ButtonFactory::parseSuccessButton($args), ArrayHelper::get($args, \"icon\"), ArrayHelper::get($args, \"circle\", false));\n }", "title": "" }, { "docid": "0fc87b2a12486229d15a30441401bc52", "score": "0.628058", "text": "function displaySuccess( $type )\n\t{\n\t\t$displaySuccess = '<div class=\"row\">';\n\t\t$displaySuccess .= '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100\" height=\"100\" fill=\"currentColor\" class=\"bi bi-check-circle my-5 text-muted\" viewBox=\"0 0 16 16\">';\n\t\t$displaySuccess .= '<path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\"/>';\n\t\t$displaySuccess .= '<path d=\"M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z\"/>';\n\t\t$displaySuccess .= '</svg>';\n\t\t$displaySuccess .= '';\n\t\t$displaySuccess .= '</div>';\n\t\t$displaySuccess .= '<div class=\"row\">';\n\t\t$displaySuccess .= '<h1 class=\"text-center text-muted mt-3 mb-5\">' . $type . '</h1></div>';\n\n\t\treturn $displaySuccess;\n\t}", "title": "" }, { "docid": "91dfb816fb9500c4fb3aec85431175ad", "score": "0.62768036", "text": "function getSuccessReason() {\n\t\treturn __( \"You don't have a user account sporting the admin username, great.\", \"defender-security\" );\n\t}", "title": "" }, { "docid": "37ceb042b01c71ba475cc8b685c45b39", "score": "0.6275623", "text": "protected function confirm_add()\n\t{\n\t\t$msg = 'Successfully added Booth ' . $this->fields['BoothNum'];\n\t\treturn '<font color = green>' . $msg . '</font><br>';\n\n\t}", "title": "" }, { "docid": "e717bf69d02f872de8cd59d158138408", "score": "0.62377036", "text": "public static function label()\n {\n return __('Confirmations');\n }", "title": "" }, { "docid": "f135852c8b7f95e578017d6c5b26ad5a", "score": "0.62352276", "text": "protected function _getAddSuccessMessage($record)\n {\n return __('The mapping set \"%s\" was successfully added!', $record->name);\n }", "title": "" }, { "docid": "04ce48b5669a5fcf15c01c539bce589d", "score": "0.6233059", "text": "public function testSuccess()\n {\n $this->_package->success(\"Successful test\");\n $this->assertTrue($this->_result->wasSuccessful());\n }", "title": "" }, { "docid": "3d25b71181f1b98999a986a8dd31f35d", "score": "0.62255776", "text": "public function runSuccess();", "title": "" }, { "docid": "375e177c5f988d3805bff77bb6428b4a", "score": "0.62217885", "text": "protected function report_comment_success_message(){\r\n\t\treturn 'The comment has been reported.';\r\n\t}", "title": "" }, { "docid": "04874632ca444bf4c82a966cb8b3797b", "score": "0.6221024", "text": "public function toString()\n {\n return 'Rating success save message is present.';\n }", "title": "" }, { "docid": "343d15ac41dd0bb633341f3ce9d7b53e", "score": "0.62125283", "text": "protected function confirm_edit()\n\t{\n\t\t$msg = 'Successfully modified project ' . $this->fields['Title'] . '.';\n\t\treturn '<font color=\"green\">' . $msg . '</font><br>';\n\n\t}", "title": "" }, { "docid": "072c06978bfab6d401f05bef8fe9e369", "score": "0.6209628", "text": "public function toString()\n {\n return 'Success customer info save message on customer account index page is correct.';\n }", "title": "" }, { "docid": "ce94efe1c042d5d2b81e93ae90633956", "score": "0.6202831", "text": "public function EditingSuccessContent()\n {\n if ($object = $this->editObject) {\n $message = $this->Data()->EditingSuccessMessage;\n return $this->editingMessageWithKeywords($object, $message);\n }\n }", "title": "" }, { "docid": "cce2146ac616fab8ea9ef95e1520811b", "score": "0.6202685", "text": "public static function success($text)\n {\n \\Yii::$app->getSession()->addFlash('alerts', new Alert($text, 'success'));\n }", "title": "" }, { "docid": "91d354ef06ff0d2399aa66546b65442a", "score": "0.6202157", "text": "function message(){\n\t\t\treturn \"New Admin has been successfully created!\";\n\t\t}", "title": "" }, { "docid": "716e88ba0e960b0ecd5a099081531ffd", "score": "0.6201106", "text": "public function toString()\n {\n return 'Mapping Locations - Success message is displayed.';\n }", "title": "" }, { "docid": "a92c75fca72f9e4f4e1de47d3394c797", "score": "0.6196255", "text": "function outputResultMessage()\n {\n global $application;\n\n if (!is_array($this -> _Errors) && $this -> _Errors != 'Success')\n return '';\n\n $template_contents = array(\n 'ResultMessage' => (($this -> _Errors == 'Success')\n ? getMsg('CTL', 'CTL_PGE_MSG_SUCCESS')\n : getMsg('CTL', 'CTL_PGE_MSG_ERROR')),\n 'ResultMessageColor' => (($this -> _Errors == 'Success')\n ? 'green'\n : 'red')\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n return $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'result-message.tpl.html',\n array()\n );\n }", "title": "" }, { "docid": "d717fa6bff7bf597580cf2c8dd4a1540", "score": "0.6193631", "text": "function success($output)\n{\n output(\"<fg=green;options=bold>$output</>\");\n}", "title": "" }, { "docid": "c8593ad9872b4d684ce0c05f6c214669", "score": "0.61927766", "text": "function ffd_cf7_registeration_success_message( $message, $status ){\r\n\r\n global $ffd_cf7_register_success;\r\n\r\n if( !empty($ffd_cf7_register_success) ){\r\n return $ffd_cf7_register_success; \r\n }\r\n\r\n\r\n return $message;\r\n}", "title": "" }, { "docid": "d387dbffe110453de07a593c1bbaec58", "score": "0.61810017", "text": "function statusMessage()\n {\n }", "title": "" }, { "docid": "ed8acc7fcaf9a1ae8ca2eec76855dea3", "score": "0.618082", "text": "public function toString()\n {\n return 'Success delete message on users page is correct.';\n }", "title": "" }, { "docid": "c6a343744346297367ccf2b83f985ad2", "score": "0.6173156", "text": "function sendSuccess($successText){\n echo json_encode(array(\n 'status' => '201',\n 'infotext' => $successText\n ));\n}", "title": "" }, { "docid": "ed9e84d47ba65a725d8341c0a3585bb8", "score": "0.6172411", "text": "public static function updatedSuccess(string $message = null): string\n {\n if ($message) {\n return __($message);\n }\n return __('Record updated successfully!');\n }", "title": "" } ]
93863dadb9b7e5a002b28563d7ecd818
Network info about previously specified repo
[ { "docid": "cb63256ff6af48449e44c39096ccef3d", "score": "0.75295275", "text": "public function repo_network()\n\t{\n\t\t$this->url = GH_REPO_API.'/show/'.$this->repo_user.'/'.$this->repo_proj.'/network';\n\n\t\treturn $this->connect(TRUE);\n\t}", "title": "" } ]
[ { "docid": "8132783186dcfa7016d4ae38e9eda40f", "score": "0.69144326", "text": "abstract protected function getRepoInfo($repo);", "title": "" }, { "docid": "383ab2895445ce27da976aab90c71c23", "score": "0.66967", "text": "public function getRepositoryInfo();", "title": "" }, { "docid": "72be4c7f0b7ac8996c88139792899ed1", "score": "0.65897954", "text": "public function getRepoNetwork($username, $repo)\n {\n $response = $this->get('repos/show/'.urlencode($username).'/'.urlencode($repo).'/network');\n\n return $response['network'];\n }", "title": "" }, { "docid": "d47e9bebdb3452b963ffe6b8e64d4720", "score": "0.6351254", "text": "public function network_meta()\n\t{\n\t\t$this->url = GH_NETWORK_API.'/'.$this->repo_user.'/'.$this->repo_proj.'/network_meta';\n\n\t\treturn $this->connect();\n\t}", "title": "" }, { "docid": "00c9775b12a648377a34ef5849be34b0", "score": "0.61534435", "text": "function get_info(){\n $info_raw = @file_get_contents(TEMP.INFO_NAME);\n if($info_raw === FALSE){\n $info_data = new stdClass();\n $info_data->co = array();\n } else {\n $info_data = @unserialize($info_raw);\n }\n if(is_object($info_data)){\n return $info_data;\n } else {\n die(\"Error: Repository (\".INFO_NAME.\") could not be deciphered.\\nIf this is a new repository, use incogrepo <serverinit|si>.\\n\");\n }\n}", "title": "" }, { "docid": "11962d17815b971994ef0fcd43b615c0", "score": "0.61099064", "text": "public function accessDetails()\n {\n $info = [];\n\n if (preg_match('#^(.+)@(.+):([0-9]*)\\/?(.+)\\.git$#', $this->repository, $matches)) {\n $info['user'] = $matches[1];\n $info['domain'] = $matches[2];\n $info['port'] = $matches[3];\n $info['reference'] = $matches[4];\n } elseif (preg_match('#^https?#', $this->repository)) {\n $data = parse_url($this->repository);\n\n $info['user'] = isset($data['user']) ? $data['user'] : '';\n $info['domain'] = $data['host'];\n $info['port'] = isset($data['port']) ? $data['port'] : '';\n $info['reference'] = substr($data['path'], 1, -4);\n }\n\n return $info;\n }", "title": "" }, { "docid": "b6db39b3d87211726cce15b4a5990a3e", "score": "0.6075364", "text": "function getRepo() {\n\t\treturn get_gedcom_value('REPO', 1, $this->gedrec, '', false);\n\t}", "title": "" }, { "docid": "3bfa9f1849e12e04e160e1d15291859a", "score": "0.59933776", "text": "public function repo_info($user, $repo)\n\t{\n\t\t$this->url = GH_REPO_API.'/show/'.$user.'/'.$repo;\n\n\t\treturn $this->connect();\n\t}", "title": "" }, { "docid": "318b73f69c7dbdfc2f2b3361499e9568", "score": "0.59001786", "text": "private function getRepoReleaseInfo() {\n // Check if we already have fetched releases\n if (!empty($this->githubAPIResult)) {\n return;\n }\n\n // Set the url to use the GitHub API\n $url = \"https://api.github.com/repos/{$this->username}/{$this->repo}/releases\";\n \n // If we have an access token, let's add it to the request url\n if (!empty($this->accessToken)) {\n $url = add_query_arg(array(\"access_token\" => $this->accessToken), $url);\n }\n \n // Fetch the result of the API call\n $this->githubAPIResult = wp_remote_retrieve_body(wp_remote_get($url));\n if (!empty($this->githubAPIResult)) {\n $this->githubAPIResult = @json_decode($this->githubAPIResult);\n }\n\n // Use only the latest release\n if (is_array($this->githubAPIResult)) {\n $this->githubAPIResult = $this->githubAPIResult[0];\n }\n }", "title": "" }, { "docid": "873acbc47f3b922e53085cd68acfce41", "score": "0.5768296", "text": "public function getNetworkInformation(): Linode\\NetworkInformation;", "title": "" }, { "docid": "1296fd1f715d28979b83795be743d2ac", "score": "0.57184374", "text": "abstract public function getNetwork();", "title": "" }, { "docid": "af990dab9da32d0343261f23df375530", "score": "0.5581201", "text": "public function repoInfo($key)\n {\n if ($this->releases === []) {\n try {\n $ch = curl_init('https://status.ezxss.com/?v=' . version);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['User-Agent: ezXSS']);\n curl_setopt($ch, CURLOPT_TIMEOUT, 2);\n $this->releases = json_decode(curl_exec($ch), true);\n } catch (Exception $e) {\n $this->releases = ['timeout'];\n }\n }\n return htmlspecialchars($this->releases[0][$key]);\n }", "title": "" }, { "docid": "e0339f3939354dcbd472f45dfb8e0140", "score": "0.55636966", "text": "public function getRepoName()\n {\n return $this->repo_name;\n }", "title": "" }, { "docid": "45e37f6dd7a3945e212a039cc2e835cd", "score": "0.55615807", "text": "private function populateNetworkConnectionDetails()\n {\n $command = $this->commandExecutor->execute('/sbin/iwconfig '.$this->name);\n\n if ($command->isValid()) {\n $iwconfig = implode(' ', $command->getOutput());\n $iwconfig = preg_replace('/\\s\\s+/', ' ', $iwconfig);\n\n $configurationReader = new ConfigurationReader($iwconfig);\n\n $this->networkSsid = $configurationReader->read('/ESSID:\\\"([a-zA-Z0-9\\s]+)\\\"/i');\n $this->networkBssid = $configurationReader->read('/Access Point: ([0-9a-f:]+)/i');\n $this->networkBitrate = $configurationReader->read('/Bit Rate=([0-9.]+ Mb\\/s)/i');\n $this->networkTxPower = $configurationReader->read('/Tx-Power=([0-9]+ dBm)/i');\n $this->networkLinkQuality = $configurationReader->read('/Link Quality=([0-9]+)\\/([0-9]+)/i');\n $this->networkSignalLevel = $configurationReader->read('/Signal level=([\\-0-9]+)/i');\n $this->networkFrequency = $configurationReader->read('/Frequency:(\\d+.\\d+ GHz)/i');\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "bf425600f8df84df6b1a1f45ac94f978", "score": "0.55472374", "text": "public function get_networks() {}", "title": "" }, { "docid": "41ec559178c27f6060ff681db24a9073", "score": "0.5470077", "text": "function get_project_info($name)\n{\n\tglobal $conf;\n\n\t$info = $conf['projects'][$name];\n\t$info['name'] = $name;\n\n\t// If description is not set, read it from the repository's description\n\tif (!isset($info['description'])) {\n\t\t$info['description'] = @file_get_contents($info['repo'] .'/description');\n\t}\n\n\t$headinfo = git_get_commit_info($name, 'HEAD');\n $info = array_merge($info, $headinfo);\n\t$info['head_stamp'] = $headinfo['author_utcstamp'];\n\t$info['head_datetime'] = strftime($conf['datetime'], $headinfo['author_utcstamp']);\n\t$info['head_hash'] = $headinfo['h'];\n\t$info['head_tree'] = $headinfo['tree'];\n\n\treturn $info;\n}", "title": "" }, { "docid": "353bc939764a0fd5b565b3c8878f62ab", "score": "0.538228", "text": "public function getRepo() {\n \tif(isset($_GET['uri'])) {\n $result = array();\n // next line recursively gets every reportUnit from the repository\n $repo = $this->client->getRepository($_GET['uri'], null, 'reportUnit', '1');\n foreach($repo as $r) {\n $result[] = array('name' => $r->getLabel(), 'uri' => $r->getUriString(), 'type' => $r->getWsType());\n }\n sort($result);\n echo json_encode($result);\n }\n }", "title": "" }, { "docid": "494c83cea0ab1aea8c8757c16783f2c3", "score": "0.535518", "text": "public function getGitRepository(): string\n {\n return 'https://github.com/shopsys/shopsys.git';\n }", "title": "" }, { "docid": "edc649da83b859ceadcb8e1d05e2f394", "score": "0.53142726", "text": "public function get_networks()\n {\n }", "title": "" }, { "docid": "f481c20ebbb51476451070757a61b866", "score": "0.5278754", "text": "public function getRepoName()\n {\n return $this->getParameter(self::REPO_NAME);\n }", "title": "" }, { "docid": "bf263b2c194ba324541b2611341a7a15", "score": "0.52660835", "text": "public function info(){\r\n try{\r\n go(\"svn info\");\r\n }catch(Exception $e){\r\n echo $e->getMessage().NEW_LINE;\r\n }\r\n }", "title": "" }, { "docid": "710549c6a0647ce008bc9768d8f72c79", "score": "0.525598", "text": "private static function getRepoName($link){\n $part = explode(\"/\", $link);\n $reponame = $part[4];\n\n return $reponame;\n }", "title": "" }, { "docid": "e9fd6d7d08824c45c9597764b712f5b5", "score": "0.52447003", "text": "public function getGit()\n {\n }", "title": "" }, { "docid": "cbec45e40696ca78d843a63480c22bad", "score": "0.5234432", "text": "public function getRemoteOrigin()\n {\n $remote = $this->extractFromCommand(\n 'git config --get remote.origin.url',\n 'trim'\n );\n\n //$remote[0] = \"https://github.com/WOSPM/checker-github-action\";\n\n if (substr($remote[0], 0, 3) == \"git\") {\n $remote[0] = str_replace('.git', '', $remote[0]);\n $output = explode('@', str_replace(':', '@', $remote[0]));\n\n return array(\n \"vendor\" => $output[1],\n \"repo\" => $output[2]\n );\n }\n\n if (substr($remote[0], 0, 4) == \"http\") {\n $parsed = parse_url($remote[0]);\n \n return array(\n \"vendor\" => $parsed[\"host\"],\n \"repo\" => trim($parsed[\"path\"], '/')\n );\n }\n \n return array(\n \"vendor\" => \"\",\n \"repo\" => \"\"\n );\n }", "title": "" }, { "docid": "0b065362d3a306c1012be5d3435f2705", "score": "0.5231166", "text": "function gitRemoteOriginUrl() {\n\t// Or 'git remote show origin' may also work\n\t$remote = runGit('config --get remote.origin.url');\n\tif (count($remote))\n\t\treturn $remote[0];\n}", "title": "" }, { "docid": "e7a6f31296fdc352381aa1ad96918ee5", "score": "0.5227796", "text": "public function repo() {\n\t\techo 'https://github.com/topdown/cli-builder/';\n\t}", "title": "" }, { "docid": "027f07f2d40bb74397f78917ac90efd3", "score": "0.5227184", "text": "function getRepoName($url)\n{\n // telegram doesn't like for example the character \"-\" so it won't display name of repo like zanzara-skeleton\n $splitUrl = explode(\"/\", $url);\n $name = $splitUrl[count($splitUrl) - 2];\n return $name;\n}", "title": "" }, { "docid": "84e42786097147413f382b280f9acca3", "score": "0.5199397", "text": "private function set_found_networks() {}", "title": "" }, { "docid": "f60d31637dcebddacb22615b0d3badd5", "score": "0.51973206", "text": "public function getWorkspaceInfo(){\n\t\t$cmd = \"svn info --xml {$this->directoryPath} {$this->cmdAppend}\";\n\t\t$success = $this->commandClient->execute($cmd);\n\t\tif($success){\n\t\t\t$response = $this->commandClient->getLastResponse();\n\t\t\t$string = '';\n\t\t\tforeach($response as $line){\n\t\t\t\t$string .= $line . \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\treturn $string;\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "cd87c6831d31e4063a0a27752aa1cb25", "score": "0.5193537", "text": "function checkRepos() {\n global $initialEndpoint;\n\n // make the api call to the initial endpoint to get 'public_repos' value\n $initialResponse = callAPI($initialEndpoint);\n $initialBody = $initialResponse[0];\n $initialReadable = json_decode($initialBody);\n\n // make the call to the repos url and adding 'per_page=100' to get more than 30 objects\n $urlResponse = callAPI(\"https://api.github.com/orgs/BoomTownROI/repos?per_page=100\");\n $urlBody = $urlResponse[0];\n $urlReadable = json_decode($urlBody);\n\n // checks to see if the values are the same\n if($initialReadable->public_repos == sizeof($urlReadable)) {\n print \"<strong>Verify 'public_repos' count vs amount of repositories under 'repos_url</strong><br>\";\n print \"Public repos value is \".$initialReadable->public_repos.\"<br>\";\n print \"Amount of urls in array is \".sizeof($urlReadable).\"<br>\";\n print \"The 'public_repos' count and the amount of repositories are the same<br>\";\n }\n else {\n print \"<strong>'public_repos' count vs amount of repositories under 'repos_url</strong><br>\";\n print \"Public repos value is \".$initialReadable->public_repos.\"<br>\";\n print \"Amount of urls in array is \".sizeof($urlReadable).\"<br>\";\n print \"The 'public_repos' count and the amount of repositories are NOT the same<br>\";\n }\n }", "title": "" }, { "docid": "a05435180befde4a5573705ddc222bd6", "score": "0.5190991", "text": "public static function get_repository_data() {\n if( self::authorize() === false ) {\n return false;\n }\n $update = false;\n // 1.1: Build request URI\n $request_uri = sprintf( 'https://api.github.com/repos/%s/%s/releases', self::USERNAME, self::REPOSITORY );\n // 1.2: Append access token to URI\n $request_uri = add_query_arg( 'access_token', self::authorize(), $request_uri );\n // 1.3: Get json response from github and parse it\n $response = json_decode( wp_remote_retrieve_body( wp_remote_get( $request_uri ) ), true );\n // 1.4: If we didn't get a good response, we can bail\n if( !is_array( $response ) || !isset( $response[0]['id'] ) ) {\n return false;\n }\n // Try to get response for current major release\n foreach( $response as $release ) {\n \tif( intval( $release['tag_name'] ) === intval( parent::$theme_version ) ) {\n \t\t$update = $release;\n \t\t$update['zipball_url'] = add_query_arg( 'access_token', self::authorize(), $release['zipball_url'] );\n \t}\n \tbreak;\n }\n \t// Give response back...\n return $update;\n }", "title": "" }, { "docid": "ddbbb0021c49eca8aca6f4b4ef5afd95", "score": "0.51802605", "text": "protected static function getRepoNode($url)\n\t{\n\t\treturn json_decode(file_get_contents($url));\n\t}", "title": "" }, { "docid": "1dc50c9e9588d13b1311b902d883a867", "score": "0.517554", "text": "function getDeployRepository(){\n\t\t$ar = $this->toArray();\n\t\tif(strlen($ar[\"deploy_repository\"]) && strpos($ar[\"deploy_repository\"],\":\")===false && strlen($ar[\"server\"])){\n\t\t\t$ar[\"deploy_repository\"] = (strlen($ar[\"user\"]) ? \"$ar[user]@\" : \"\").\"$ar[server]:$ar[deploy_repository]\"; // \"/home/user/repos/myapp.git\" -> \"user@server:/home/user/repos/myapp.git\"\n\t\t}\n\t\treturn $ar[\"deploy_repository\"];\n\t}", "title": "" }, { "docid": "27f302529ae3f03193070ee3993d4f27", "score": "0.5145496", "text": "abstract protected function getRepos();", "title": "" }, { "docid": "86bbd324c4d865b46097ca6af06c1041", "score": "0.5145076", "text": "public function getRepositoryUrlAttribute()\n {\n $info = $this->accessDetails();\n\n if (isset($info['domain']) && isset($info['reference'])) {\n return 'http://' . $info['domain'] . '/' . $info['reference'];\n }\n\n return false;\n }", "title": "" }, { "docid": "b3220bcca03a9b449e9637d9f329421a", "score": "0.5141916", "text": "private function getRemoteMinerUrl(){\n return @$this->params['server'];\n }", "title": "" }, { "docid": "d8ce1a5b08c035264ff4fe4f7219e09c", "score": "0.513246", "text": "public function showEndpoint()\n\t{\n\t\treturn $this->client->api('repo')->show($this->package->vendor, $this->package->package);\n\t}", "title": "" }, { "docid": "bc97c50de535fde6e087073c4d64200a", "score": "0.5124634", "text": "public function getCurrentRemote()\n {\n /** @var $result CallResult */\n $result = $this->getGit()->{'remote'}($this->getRepositoryPath(), array(\n '-v'\n ));\n $result->assertSuccess(sprintf('Cannot remote \"%s\"', $this->getRepositoryPath()));\n\n $tmp = $result->getStdOut();\n\n preg_match_all('/([a-z]*)\\h(.*)\\h\\((.*)\\)/', $tmp, $matches);\n\n $retVar = array();\n foreach($matches[0] as $key => $value)\n $retVar[$matches[1][$key]][$matches[3][$key]] = $matches[2][$key];\n\n return $retVar;\n }", "title": "" }, { "docid": "425ff40f7a9180936955161239e6c6eb", "score": "0.5118709", "text": "public function getNetwork()\n {\n return $this->network;\n }", "title": "" }, { "docid": "425ff40f7a9180936955161239e6c6eb", "score": "0.5118709", "text": "public function getNetwork()\n {\n return $this->network;\n }", "title": "" }, { "docid": "d7444f1307e5f0b120c20254b437e112", "score": "0.5117295", "text": "public function network() { return $this->_m_network; }", "title": "" }, { "docid": "6afdbb35861b03609714bbce13c35ee3", "score": "0.51025206", "text": "protected function getCloneUrl()\n {\n return $this->getProject()->getReference() . '.git';\n }", "title": "" }, { "docid": "aca917902ca01ce9d9a387b01909b26c", "score": "0.51014495", "text": "function get_repo_list()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n header('Cache-Control: no-cache, must-revalidate');\n header('Content-type: application/json');\n try {\n\n $this->lang->load('software_repository');\n $this->load->library('base/Yum');\n\n // This is an AJAX call anyway...let Marketplace stuff run first\n sleep(2);\n $counter = 0;\n if ($this->yum->is_busy()) {\n sleep(3);\n $counter++;\n if ($counter > 3)\n throw new Yum_Busy_Exception();\n }\n\n echo json_encode(Array('code' => 0, 'list' => $this->yum->get_live_repo_list()));\n\n } catch (Yum_Busy_Exception $e) {\n echo json_encode(Array('code' => clearos_exception_code($e), 'errmsg' => lang('software_repository_busy')));\n } catch (\\Exception $e) {\n echo json_encode(Array('code' => clearos_exception_code($e), 'errmsg' => clearos_exception_message($e)));\n }\n }", "title": "" }, { "docid": "c6fcdb1067d72092989f7292aefef432", "score": "0.50507796", "text": "abstract public function getRepoPath() :string;", "title": "" }, { "docid": "52f760bc49a6e270783e9a53163e3c71", "score": "0.5050275", "text": "function gitHub ($repository){\n}", "title": "" }, { "docid": "d18b37a8c309de33a039ccea58290eae", "score": "0.5044764", "text": "function fetch_remote_icon_url() {\n $info = $this->fetch_module_info();\n\n return ( $this->is_api_result_object( $info, 'icon' ) && is_string( $info->icon ) ) ?\n $info->icon :\n '';\n }", "title": "" }, { "docid": "0938c99757d4f1a192cae0bc2cab7184", "score": "0.50402397", "text": "public function getSocialNetworkInfo() {\n $retVal = array();\n// $retVal[] = \"Điện thoại: \" . $this->getPhone();\n if (isset($this->rSocialNetwork)) {\n foreach ($this->rSocialNetwork as $value) {\n $retVal[] = SocialNetworks::TYPE_NETWORKS[$value->type_network] . \": $value->value\";\n }\n }\n return implode('<br>', $retVal);\n }", "title": "" }, { "docid": "c392ccd89fefd10a9ec398a05a680234", "score": "0.5019493", "text": "public function getRepositoryEndpoint() {\n return $this->url;\n }", "title": "" }, { "docid": "963b45105dcb98f92980280f637a0743", "score": "0.50131553", "text": "function getConnInfo(){\r\n\t\r\n\treturn \"Host:\".$this->dbHost.\r\n\t \"\\nPort:\".$this->dbPort.\r\n\t\t \"\\nDatabase Username:\".$this->DbUser.\r\n\t\t \"\\nDatabase Password:\".$this->DbPass.\r\n\t\t \"\\nDatabase Name:\".$this->dbName;\r\n\t\t \r\n}", "title": "" }, { "docid": "5185291e6c2973276f32fa07617111f5", "score": "0.5011883", "text": "public function gitFetch(){\n\t\treturn $this->run('fetch')->getStdOut();\n\t}", "title": "" }, { "docid": "0100a2f0f6870446e0e8d224cece2c42", "score": "0.49921933", "text": "public function getRepositoryPathAttribute()\n {\n $info = $this->accessDetails();\n\n if (isset($info['reference'])) {\n return $info['reference'];\n } else {\n //Support local repository\n return $this->repository;\n }\n }", "title": "" }, { "docid": "afcc19cfa7b1aad2de30f925322e58fd", "score": "0.49910074", "text": "public function getInfo() {\n return HAProxy::format(\n $this->socketCommand(\"show info\")\n );\n }", "title": "" }, { "docid": "48a26f7d4b486e647ead84d42b0df713", "score": "0.49886504", "text": "private function get_server_info()\n {\n }", "title": "" }, { "docid": "ecc0ca8948a6e25521ca758047749ed9", "score": "0.49749792", "text": "public function getDefaultRepo();", "title": "" }, { "docid": "6e5cdede199ffe7fd84a05bb049775c2", "score": "0.497371", "text": "public function get_live_repo_list()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $shell = new Shell();\n $repo_list = array();\n\n // Check cache\n if ($this->_check_cache_repo_list(TRUE))\n return $this->cache_repo_list;\n\n // Get repos\n //----------\n $options['env'] = 'LANG=en_US';\n $options['proxy'] = TRUE;\n $exitcode = $shell->execute(self::COMMAND_YUM, '-v repolist all', TRUE, $options);\n\n if ($exitcode != 0) {\n // Run a 'clean all'...this can fix issues so next time this function is called it may work.\n $this->clean(TRUE);\n throw new Engine_Exception(lang('base_unable_to_get_software_list'), CLEAROS_WARNING);\n }\n $rows = $shell->get_output();\n foreach ($rows as $row) {\n if (preg_match(\"/(Repo-id\\s+:\\s)(.*)/\", $row, $match)) { \n $parts = explode('/', $match[2]);\n $id = trim($parts[0]);\n $repo_list[$id] = array ('packages' => 0);\n } else if (preg_match(\"/(Repo-name\\s+:\\s)(.*)/\", $row, $match)) { \n $repo_list[$id]['name'] = trim($match[2]);\n } else if (preg_match(\"/(Repo-status\\s+:\\s)(.*)/\", $row, $match)) { \n $repo_list[$id]['enabled'] = preg_match('/enabled/', $match[2]) ? TRUE : FALSE;\n } else if (preg_match(\"/(Repo-pkgs\\s+:\\s)(.*)/\", $row, $match)) { \n $repo_list[$id]['packages'] = preg_replace('/,/', '', $match[2]);\n }\n }\n \n $this->_cache_repo_list($repo_list);\n\n return $repo_list;\n }", "title": "" }, { "docid": "d79c42c9c239198f5f6aaaf5a6e7835c", "score": "0.4960616", "text": "function get_info()\n {\n $project = $this->target->get_project();\n return $project->get_name() . '/' . $this->target->get_name() . '/' . $this->get_name();\n }", "title": "" }, { "docid": "957733beb8293b010d47d6e2c6144821", "score": "0.49114394", "text": "private function getNetworkInfo(InputInterface $input, OutputInterface $output, array $config): array\n {\n $helper = $this->getHelper('question');\n\n $networkName = new Question('Network name: ');\n $config['networkName'] = $helper->ask($input, $output, $networkName);\n\n return $config;\n }", "title": "" }, { "docid": "cfae90463af56822923f4ec051c3e5da", "score": "0.49045998", "text": "function git_pull_request($repository, $relative_path) {\n if ( !is_dir(\"$relative_path/model/master\") ) {\n //If git repository doesn't exist\n // Print the exec output inside of a pre element\n print(\"<pre>\" . exec_print(\"cd $relative_path/model/\\ngit clone $repository master\", $relative_path) . \"</pre>\");\n } else {\n //if git repository exists\n // Print the exec output inside of a pre element\n print(\"<pre>\" . exec_print(\"cd $relative_path/model/master\\ngit pull origin master\", $relative_path) . \"</pre>\");\n }\n }", "title": "" }, { "docid": "8cfe50167df646e5fd7fb9b60411b28d", "score": "0.48975", "text": "public function setRepoInfo($username, $repo, $values)\n {\n $response = $this->post('repos/show/'.urlencode($username).'/'.urlencode($repo), array('values' => $values));\n\n return $response['repository'];\n }", "title": "" }, { "docid": "8a7177b0a729615638d987b37e036723", "score": "0.48912612", "text": "public function listOwn() {\n\t\treturn $this->request('/user/repos');\n\t}", "title": "" }, { "docid": "b8523e0561271f27f19f23538b738a2a", "score": "0.48830056", "text": "public function show($username, $repo)\n {\n $response = $this->api->get('repos/show/'.urlencode($username).'/'.urlencode($repo));\n\n return $response['repository'];\n }", "title": "" }, { "docid": "cf3f1525437bc367f3e651f8902e33c8", "score": "0.48759392", "text": "public function getInfo()\n {\n return array(\n 'label' => $this->getLabel(),\n 'version' => $this->getVersion(),\n 'link' => 'http://www.shopware.de/'\n );\n }", "title": "" }, { "docid": "1ac1a50a8100c9680d21375011455c60", "score": "0.48674265", "text": "function getAllNetworks()\n{\n global $lv;\n $myJson = null;\n try {\n $tmp = $lv->get_networks(VIR_NETWORKS_ALL);\n if ($tmp) {\n $myJson = getNetworkInformations($tmp);\n } else {\n verbose(2, \"Your machine doesn\\'t have any network devices\");\n }\n } catch (Exception $e) {\n verbose(0, $lv->get_last_error());\n }\n header('Content-Type: application/json');\n echo json_encode($myJson, JSON_PRETTY_PRINT);\n}", "title": "" }, { "docid": "6dd3900d19ca8cc1a81e5541635a86f9", "score": "0.4864819", "text": "function rdf_admin_repositories() {\n $header = array(t('Name'), t('Statements'), t('Mutable'), t('Module'), array('data' => t('Operations'), 'colspan' => '2'));\n\n $rows = array();\n foreach (rdf_get_repositories() as $name => $info) {\n $mutable = !empty($info['mutable']) && $name != 'default'; // FIXME\n $rows[] = array(\n l($info['title'], 'admin/settings/rdf/repositories/'. $info['module'] .'/edit/'. $name,\n array('attributes' => array('title' => @$info['dc:description']))),\n $name == 'system' ? t('n/a') : (empty($info['statements']) ? '-' : number_format($info['statements'])),\n !empty($info['mutable']) ? t('Yes') : t('No'),\n $info['module'],\n !$mutable ? '' : l(t('edit'), 'admin/settings/rdf/repositories/'. $info['module'] .'/edit/'. $name),\n !$mutable ? '' : l(t('delete'), 'admin/settings/rdf/repositories/'. $info['module'] .'/delete/'. $name),\n );\n }\n\n return theme('table', $header, $rows);\n}", "title": "" }, { "docid": "ef861b60d169372986b5c2d37dc4e357", "score": "0.48509285", "text": "public function getSocialNetwork();", "title": "" }, { "docid": "1b6e5d9f7552379e7d3be46cac1b72e4", "score": "0.4850704", "text": "public function __toString()\n {\n return $this->repository . '/' . $this->version;\n }", "title": "" }, { "docid": "128e7887ba329ece947af6b986479f89", "score": "0.48490605", "text": "public function getInfo()\n {\n return [\n 'version' => $this->getVersion(),\n 'label' => $this->getLabel(),\n 'link' => 'http://www.shopware.de/',\n ];\n }", "title": "" }, { "docid": "5f201508173243c7155d2d89d9689016", "score": "0.48243228", "text": "public function fetch() {\n return $this->gitCmd(\"git fetch $this->remote_name -q\");\n }", "title": "" }, { "docid": "f76f26d4fed9090c699db23faa83193d", "score": "0.4811353", "text": "public function getAllRepositories()\n {\n //TODO: implement github api logic\n return [];\n }", "title": "" }, { "docid": "3e07cd0fd2131604111893de5de9ed1d", "score": "0.4809662", "text": "function processGitInfoFiles() {\n // Bail out if this isn't hosted on Drupal.org.\n if (isset($this->download['url']) && strpos($this->download['url'], 'drupal.org') === FALSE) {\n return;\n }\n\n // Figure out the proper version string to use based on the .make file.\n // Best case is the .make file author told us directly.\n if (!empty($this->download['full_version'])) {\n $full_version = $this->download['full_version'];\n }\n // Next best is if we have a tag, since those are identical to versions.\n elseif (!empty($this->download['tag'])) {\n $full_version = $this->download['tag'];\n }\n // If we have a branch, append '-dev'.\n elseif (!empty($this->download['branch'])) {\n $full_version = $this->download['branch'] . '-dev';\n }\n // Ugh. Not sure what else we can do in this case.\n elseif (!empty($this->download['revision'])) {\n $full_version = $this->download['revision'];\n }\n // Probably can never reach this case.\n else {\n $full_version = 'unknown';\n }\n\n // If the version string ends in '.x-dev' do the Git magic to figure out\n // the appropriate 'rebuild version' string, e.g. '7.x-1.2+7-dev'.\n $matches = array();\n if (preg_match('/^(.+).x-dev$/', $full_version, $matches)) {\n require_once dirname(__FILE__) . '/../pm/package_handler/git_drupalorg.inc';\n $rebuild_version = drush_pm_git_drupalorg_compute_rebuild_version($this->download_location, $matches[1]);\n if ($rebuild_version) {\n $full_version = $rebuild_version;\n }\n }\n require_once dirname(__FILE__) . '/../pm/pm.drush.inc';\n drush_pm_inject_info_file_metadata($this->download_location, $this->name, $full_version);\n }", "title": "" }, { "docid": "15fb23a4ef76005f6ff571b9e7ffbc1a", "score": "0.47948772", "text": "private function getRepository()\n {\n return 'repository';\n }", "title": "" }, { "docid": "fa03b0d80857923c176dd7f91af192f0", "score": "0.479165", "text": "public function getNetwork()\n {\n if (array_key_exists(\"network\", $this->_propDict)) {\n return $this->_propDict[\"network\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "a0ad92a391db54d6bfa6862fc219a5a5", "score": "0.47734332", "text": "function get_main_network_id() {}", "title": "" }, { "docid": "472fcd1182e635eda6abe93628554f8a", "score": "0.47526032", "text": "public function getPackageRepositoryUrl(): string\n {\n return 'https://github.com/cryocaustik/seat-hr';\n }", "title": "" }, { "docid": "ffff41ff5c45097fdfdaf6b8b15f61ff", "score": "0.47501788", "text": "function upgrade_network() {}", "title": "" }, { "docid": "fae60faf8b1cfd28ad7bb650c8f37c81", "score": "0.47499117", "text": "public function show($username, $repo)\n {\n $response = $this->get('repos/show/'.urlencode($username).'/'.urlencode($repo));\n\n return $response['repository'];\n }", "title": "" }, { "docid": "83dcfdd3790b0364b7127612aa416fc7", "score": "0.47466347", "text": "public function get_info();", "title": "" }, { "docid": "83dcfdd3790b0364b7127612aa416fc7", "score": "0.47466347", "text": "public function get_info();", "title": "" }, { "docid": "23902493cb53f982bb23a9b4e953015a", "score": "0.47453442", "text": "public function getTotalNet();", "title": "" }, { "docid": "45c75b7836520247706d54c9ca1f015c", "score": "0.47282693", "text": "public function getRepositories();", "title": "" }, { "docid": "23309956427a07a9fec54906a7fdf49a", "score": "0.4727822", "text": "public function getNetworking()\n {\n return $this->networking;\n }", "title": "" }, { "docid": "d160f03027f7b4c9e1fe9397fc7cf3d2", "score": "0.47160506", "text": "public function getInfo () {}", "title": "" }, { "docid": "af500b32d8b901e0781869a483630bc3", "score": "0.47143206", "text": "abstract protected function loadRepoExists();", "title": "" }, { "docid": "1aacb3e00ea028857f0e2f5c90a2d957", "score": "0.47102308", "text": "public function parse(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'repo' => 'required'\n ]);\n if ($validator->fails()) {\n return redirect()->route('repo.scan')\n ->withErrors($validator)\n ->withInput();\n }\n // $repo = urlencode($request->get('repo'));\n $repo = $request->get('repo');\n $repo = chop($repo, '.git');\n\n // return $repo;\n $query = 'http://bubbles-questifier.gpii.eu:3008/repository?url='.$repo;\n // $query = urlencode($query);\n\n // return $query;\n $ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)\n AppleWebKit/537.36 (KHTML, like Gecko)\n Chrome/53.0.2785.89 Safari/537.36';\n $ua = 'Bubbles';\n\n $curl_handle = curl_init();\n curl_setopt($curl_handle, CURLOPT_URL, $query);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 300);\n curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl_handle, CURLOPT_USERAGENT, $ua);\n $query = curl_exec($curl_handle);\n curl_close($curl_handle);\n\n $json = json_decode((string)$query);\n\n if (property_exists($json, 'status')) {\n if ((int)$json->status === 404) {\n return redirect()\n ->route('repo.scan')\n ->withInput();\n }\n } elseif (property_exists($json, 'repository')) {\n if (property_exists($json, 'files') && count($json->files)) {\n $files = $json->files;\n $data = array();\n foreach ($files as $fileKey => $file) {\n $path = (string)$file->path;\n if (property_exists($file, 'quests') && count($file->quests)) {\n $quests = $file->quests;\n foreach ($quests as $questKey => $quest) {\n $text = $quest->text;\n $line = explode(\"#L\", $quest->line);\n // Get the last element:\n $line = $line[count($line) - 1];\n $data[$path][] = array(\n 'text' => $text,\n 'line' => $line\n );\n }\n }\n }\n return view('repo.selection', [\n 'repo' => $repo,\n 'data' => $data]);\n }\n } else {\n return redirect()\n ->route('repo.scan')\n ->withInput();\n }\n }", "title": "" }, { "docid": "1b2b6044c8593371cfcb8e4de0238a9d", "score": "0.47096592", "text": "function disp_client_tools(){\n global $settings;\n $disp_body = '<div class=\"box tools\">';\n $ret_arr = array();\n\n $if_LAN = $settings['IF_EXT'];\n $if_VLAN = $settings['IF_INT'];\n\n $ret = array();\n if( $settings['OS_TYPE'] === 'Linux' ){\n exec('/sbin/ip addr show '.$if_LAN.' | '.$settings['CMD_GREP'].' -w \"inet\" | '.$settings['CMD_GAWK'].' -F\" \" \\'{print $2}\\' | '.$settings['CMD_CUT'].' -d/ -f1', $ret);\n }else{\n exec('/sbin/ifconfig '.$if_LAN.' | '.$settings['CMD_GREP'].' -w \"inet\" | '.$settings['CMD_GAWK'].' -F\" \" \\'{print $2}\\' | '.$settings['CMD_CUT'].' -d/ -f1', $ret);\n }\n $ret_arr['lan_ip'] = $ret[0];\n unset($ret);\n\n $ret = array();\n if( $settings['OS_TYPE'] === 'Linux' ){\n exec('/sbin/ip addr show '.$if_VLAN.' | '.$settings['CMD_GREP'].' -w \"inet\" | '.$settings['CMD_GAWK'].' -F\" \" \\'{print $2}\\' | '.$settings['CMD_CUT'].' -d/ -f1', $ret);\n }else{\n exec('/sbin/ifconfig '.$if_VLAN.' | '.$settings['CMD_GREP'].' -w \"inet\" | '.$settings['CMD_GAWK'].' -F\" \" \\'{print $2}\\' | '.$settings['CMD_CUT'].' -d/ -f1', $ret);\n }\n $ret_arr['vlan_ip'] = (array_key_exists(0, $ret)) ? $ret[0] : '';\n unset($ret);\n\n //offer download links to client tools\n $disp_body .= '<h2>Torrent Port Monitor</h2>';\n $disp_body .= 'Windows script to reconfigure your torrent client\\'s config file on VPN port changes.'\n .' Supports <a href=\"http://deluge-torrent.org/\" target=\"_blank\">Deluge</a> and <a href=\"http://www.qbittorrent.org/\" target=\"_blank\">qBittorrent</a>. Please check <a href=\"/pia-tunnel_documentation.pdf\" target=\"_blank\">the documentation for instructions.</a>';\n $disp_body .= '<p><a href=\"http://'.$ret_arr['lan_ip'].'/monitor-windows.zip\">Download from LAN</a>';\n $disp_body .= ' &nbsp; <a href=\"http://'.$ret_arr['vlan_ip'].'/monitor-windows.zip\">Download from VM LAN</a></p>';\n\n $disp_body .= '</div>';\n return $disp_body;\n}", "title": "" }, { "docid": "03923a7fa807bc13bde11eb60a045788", "score": "0.47035384", "text": "public function getNetworks()\n {\n return $this->networks;\n }", "title": "" }, { "docid": "03923a7fa807bc13bde11eb60a045788", "score": "0.47035384", "text": "public function getNetworks()\n {\n return $this->networks;\n }", "title": "" }, { "docid": "f1e0d66388fcd14bc6b6e0d1b87af2b8", "score": "0.46963763", "text": "function get_current_network_id() {}", "title": "" }, { "docid": "b297e07d8fcf7ff776e8b62b51ce757d", "score": "0.46910402", "text": "public function fake_and_true_github_repo_urls() {\n $return = array();\n $return['true'] = ['https://api.github.com/repos/YOURLS/YOURLS/zipball/1.2.3', true];\n $return['not github'] = ['https://api.g1thub.com/repos/YOURLS/YOURLS/zipball/1.2.3', false];\n $return['not YOURLS'] = ['https://api.github.com/repos/Y0URL5/YOURLS/zipball/1.2.3', false];\n $return['not URL'] = ['nope', false];\n\n return $return;\n }", "title": "" }, { "docid": "7abd7f1138f8371a0b931d8166195b82", "score": "0.46903947", "text": "public function network_config_page()\n {\n }", "title": "" }, { "docid": "13b05f157fd93f9db00f50c88f06f5b9", "score": "0.46821228", "text": "public function connectionInfo($args, $assoc_args) {\n $site = $this->sites->get(\n Input::siteName(array('args' => $assoc_args))\n );\n $env_id = Input::env(array('args' => $assoc_args, 'site' => $site));\n $environment = $site->environments->get($env_id);\n $info = $environment->connectionInfo();\n\n if (isset($assoc_args['field'])) {\n $field = $assoc_args['field'];\n $this->output()->outputValue($info[$field]);\n } else {\n $this->output()->outputRecord($info);\n }\n }", "title": "" }, { "docid": "e5c06524119b738b00c2b735b6eec837", "score": "0.467635", "text": "public function connection_info ()\n\t\t{\n\t\treturn array (\n\t\t\t'hostname'\t=> $this->db_hostname,\n\t\t\t'username'\t=> $this->db_username,\n\t\t\t'password'\t=> $this->db_password,\n\t\t\t'status'\t=> $this->status\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "7f92079b83f637e8972c8833a32e0083", "score": "0.4671843", "text": "public function get_server_info()\r\n {\r\n return array_merge($this->get_teamstatus(), $this->get_real_server_info());\r\n }", "title": "" }, { "docid": "240d9ae7d9f96c383187b7b5396da430", "score": "0.46712884", "text": "public function dumpNetwork()\n\t{\n\t\t$r = array();\n\n\t\t$r[] = \"WordPress Multisite environment\";\n\t\t$r[] = self::LINE_SEPARATOR;\n\n\t\t$version = $this->importService->getPreviousNetworkVersion();\n\n\t\tif (NextADInt_Adi_Configuration_ImportService::isPreviousVersion($version)) {\n\t\t\t$r[] = \"Version: $version (global network installation)\\r\\n\";\n\t\t\t$r[] = self::LINE_SEPARATOR;\n\n\t\t\treturn array_merge($r, $this->dumpConfiguration($this->importService->getPreviousConfiguration(0, $version)));\n\t\t}\n\n\t\t// iterate over each of the installed sites of this network\n\t\t$sites = NextADInt_Core_Util_Internal_WordPress::getSites();\n\n\t\tforeach ($sites as $site) {\n\t\t\t$blogId = $site['blog_id'];\n\t\t\t$r[] = \"Blog ID \" . $blogId . \" (\" . $site['domain'] . \" - \" . $site['path'] . \")\\r\\n\";\n\t\t\t$r[] = self::LINE_SEPARATOR;\n\n\t\t\t$version = $this->importService->getPreviousSiteVersion($blogId);\n\n\t\t\tif (!$version) {\n\t\t\t\t$r[] = \" No NADI installed.\";\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$r = array_merge($r, $this->dumpConfiguration($blogId));\n\n\t\t}\n\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "f47cdcbc7e987f1bd92d76395a7a963d", "score": "0.4668637", "text": "public function fork()\n\t{\n\t\t$this->url = GH_REPO_API.'/fork/'.$this->repo_user.'/'.$this->repo_proj;\n\n\t\treturn $this->connect(TRUE);\n\t}", "title": "" }, { "docid": "7d8f1a7480b0d81a1bab5b3b34debc12", "score": "0.46681413", "text": "private function gitinfo_git_output(string $cmd): string\n {\n // directory...\n //\n $git_output = `git $cmd`;\n\n $html = '<h3>git ' . $cmd . '</h3>';\n $html .= '<pre>';\n $html .= htmlentities($git_output);\n $html .= '</pre>';\n $html .= '<br/>';\n\n return $html;\n }", "title": "" }, { "docid": "616d2363601474cf57a093df667a5444", "score": "0.4667997", "text": "public function getNetworkLinks() {\n $ret = [];\n $allNetworks = \\Drupal::config('ethereum.ethereum_networks')->get();\n $currentNetwork = array_filter($allNetworks, function($net) {\n return isset($net['id']) && $net['id'] === $this->network_id;\n });\n foreach (array_pop($currentNetwork) as $key => $val) {\n if (substr($key, 0, 7) === 'link_to') {\n $ret[substr($key, 8)] = $val;\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "2de754907e6272f74254e9f4ee747f2c", "score": "0.46606344", "text": "public function getGitRepository()\n {\n return $this->config->get('git.repository');\n }", "title": "" }, { "docid": "b686b1cc393f0c187a0fb5aca14c042d", "score": "0.4655202", "text": "function get_index(){\n $index_raw = @file_get_contents(TEMP.INDEX_NAME);\n if($index_raw === FALSE){\n $index_data = array();\n } else {\n $index_data = @unserialize($index_raw);\n }\n if(is_array($index_data)){\n return $index_data;\n } else {\n die(\"Error: Repository (\".INDEX_NAME.\") could not be deciphered.\\nIf this is a new repository, use incogrepo <serverinit|si>.\\n\");\n }\n}", "title": "" }, { "docid": "26196a9b675bc4256d7360f97119b07f", "score": "0.4654892", "text": "private function updateRepo()\n\t{\n\t\techo \"\\tUpdate repo...\";\n\t\t// Check repo\n\t\t$sqlRepoCheck = 'SELECT * FROM bw_repo WHERE name LIKE :repoName';\n\t\t$queryRepoCheck = $this->dbHandle->prepare($sqlRepoCheck);\n\t\t$queryRepoCheck->bindParam(':repoName', $this->repoName, PDO::PARAM_STR);\n\t\t$queryRepoCheck->execute();\n\n\t\t$queryRepoResult = $queryRepoCheck->fetch(PDO::FETCH_ASSOC);\n\t\tif ($queryRepoCheck->rowCount() === 0)\n\t\t{\n\t\t\t// Create the repo\n\t\t\t$sqlNewRepo = 'INSERT INTO bw_repo (name) VALUES (:repoName)';\n\t\t\t$queryNewRepo = $this->dbHandle->prepare($sqlNewRepo);\n\t\t\t$queryNewRepo->bindParam(':repoName', $this->repoName, PDO::PARAM_STR);\n\t\t\t$queryNewRepo->execute();\n\n\t\t\t$repoId = $this->dbHandle->lastInsertId();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$repoId = $queryRepoResult['id'];\n\t\t}\n\t\techo \"Done\\n\";\n\t\treturn $repoId;\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "b992215fdbd5e069215532ce90905509", "score": "0.0", "text": "public function destroy($id)\n {\n $typepallet = TypePallet::destroy($id);\n echo $typepallet;\n }", "title": "" } ]
[ { "docid": "9e3888bdb250b09daf6881b2c953ce96", "score": "0.7387755", "text": "protected function removeImageFromStorage (HCResources $resource)\n {\n $path = $this->uploadPath . $resource->id;\n\n if (Storage::has ($path)) {\n Storage::delete ($path);\n }\n }", "title": "" }, { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.7333458", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "3f1322e69a1884d9745c5ef5f1590e48", "score": "0.7141337", "text": "public function removeResource($resourceName);", "title": "" }, { "docid": "e8f55d4cc56465e75499a86915b35d9b", "score": "0.70428175", "text": "public function delete($resource);", "title": "" }, { "docid": "e390bf434f5cce46402b827d582cdcbe", "score": "0.7039089", "text": "public function removeResource(Resource $resource): void\n {\n if (!isset($this->resources[$resource->getUri()])) {\n return;\n }\n unset($this->resources[$resource->getUri()]);\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.6885214", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6839906", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.6735704", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "9d416bb966c467169e3ae97e3c181868", "score": "0.63677", "text": "abstract function deleteResource(int $id);", "title": "" }, { "docid": "b9f567113f04c7ad2db0fe760a0a6fdc", "score": "0.63184243", "text": "public function unregisterResource()\n {\n Zend_Registry::get('acl')->remove($this);\n }", "title": "" }, { "docid": "13034525cd05a6a81ce72172a28a6888", "score": "0.6213014", "text": "public function delete()\n {\n $request = new StorageDeleteRequest();\n $request->setBucketName($this->bucket->getName());\n $request->setKey($this->key);\n\n [$response, $status] = $this->storage->_baseStorageClient->Delete($request)->wait();\n Utils::okOrThrow($status);\n }", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.61720115", "text": "public function unsetStorageId();", "title": "" }, { "docid": "251c69886b6b7be9441be8fe7c79bf9f", "score": "0.6166032", "text": "public function destroy($id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6125602", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "ac2ff7081643a335753979289127eb7f", "score": "0.6098791", "text": "function destroy( $resource ){\n\n\n\n\n\n \n\n}", "title": "" }, { "docid": "7f77f3b95410a985ed02a0994980a5dd", "score": "0.6076961", "text": "public function deleteResource(AbstractNode $resource) : void;", "title": "" }, { "docid": "c1246d964fe6c011b7e9a2e92e2bce69", "score": "0.60498166", "text": "public function destroy($id)\n\t{\n\t\t//\n\t\t$file = \\App\\Resource::find($id)->image;\n\t\tunlink('pictures/' . $file);\n\t\t\\App\\Resource::destroy($id);\n\t\treturn Redirect::to('/');\n\t}", "title": "" }, { "docid": "e9a19d00feed0894857d58eb3e4aea34", "score": "0.6019356", "text": "protected function dropResource()\n {\n $this->dropFile('Resource', $this->getResourcePath());\n }", "title": "" }, { "docid": "6633698916692181c267e327ea427da6", "score": "0.5991417", "text": "public function rm( $path );", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5974692", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "4f634fd6a5cf444037bf2efc93dadfeb", "score": "0.5945026", "text": "public function clear()\n {\n \tunlink($this->_storage);\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "15a853ed70c99f4514a71c5e2d0b94aa", "score": "0.59332573", "text": "public function remove($resource)\n {\n try {\n $resourceId = $this->get($resource)->getResourceId();\n } catch (Zend_Acl_Exception $e) {\n require_once 'Zend/Acl/Exception.php';\n throw new Zend_Acl_Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n $resourcesRemoved = [$resourceId];\n if (null !== ($resourceParent = $this->_resources[$resourceId]['parent'])) {\n unset($this->_resources[$resourceParent->getResourceId()]['children'][$resourceId]);\n }\n foreach ($this->_resources[$resourceId]['children'] as $childId => $child) {\n $this->remove($childId);\n $resourcesRemoved[] = $childId;\n }\n\n foreach ($resourcesRemoved as $resourceIdRemoved) {\n foreach ($this->_rules['byResourceId'] as $resourceIdCurrent => $rules) {\n if ($resourceIdRemoved === $resourceIdCurrent) {\n unset($this->_rules['byResourceId'][$resourceIdCurrent]);\n }\n }\n }\n\n unset($this->_resources[$resourceId]);\n\n return $this;\n }", "title": "" }, { "docid": "b8b5d5ca606833c889a1285814fba6f4", "score": "0.5917159", "text": "public function unlinkResource() {\n\t\t$this->resource=null;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1f9a1be4bb584e042a8ad8d688ac9917", "score": "0.59067374", "text": "public function delete() {\n if (file_exists($this->src)) unlink($this->src);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58893216", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "4b22b7ee3a57517ec9e3b86bea1578c9", "score": "0.5856808", "text": "public function clearStorage();", "title": "" }, { "docid": "84e424b359d9d6f2b49045a0bf4df9de", "score": "0.58229584", "text": "public function destroy($id)\n {\n $productImage = ProductImage::find($id);\n $productImage->delete();\n $fullPath = str_replace(\"storage\",\"/public\",$productImage->path);\n Storage::delete($fullPath);\n return $productImage;\n }", "title": "" }, { "docid": "2d75567656921f9588d0f6a09e30ea8c", "score": "0.5816774", "text": "public function testItShouldRemoveSpecifiedResource()\n {\n $this->json['data'] = [];\n $this->json('DELETE', $this->base_url . $this->getId(), [], $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "e53013c127607b9b9763311d1d78cf4b", "score": "0.58067673", "text": "public function detach()\n {\n if (!isset($this->resource)) {\n return null;\n }\n $resource = $this->resource;\n unset($this->resource);\n $this->size = null;\n $this->uri = null;\n $this->readable = false;\n $this->seekable = false;\n $this->writable = false;\n return $resource;\n }", "title": "" }, { "docid": "567e641bf24d438f1c69a4a617fddcb1", "score": "0.57947505", "text": "function delete($resource, $headers = array())\n {\n $result = $this->client->delete($this->build_url($resource), [\n 'headers' => array_merge([\n 'Authorization' => $this->getBearer()\n ], $headers)\n ]);\n return $result;\n }", "title": "" }, { "docid": "1dee477f6e099b050eb54e8469548631", "score": "0.57649726", "text": "public function destroy($id)\n {\n $slider=Slider::find($id);\n if($slider->image)\n {\n if(Storage::exists('public/slider/' . $slider->image)){\n $delete= Storage::delete('/public/slider/' . $slider->image); \n }\n }\n $slider->delete();\n alert::success('slider Deleted Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57371354", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "aa96241e32a2910707191042a72208b3", "score": "0.5733017", "text": "public function destroy(Resource $resource): JsonResponse\n {\n Storage::disk('article')->delete($resource->url);\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5731129", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "30d12407d208c7245c67fe3e3c0e6844", "score": "0.5715374", "text": "public function remove (object $entity);", "title": "" }, { "docid": "148f851e6e394ade1c2f9c6b118d123d", "score": "0.5697347", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['status' => 'ok']);\n }", "title": "" }, { "docid": "dfafd8026a650244c991d50f54215453", "score": "0.569202", "text": "public function free():void { unlink($this->getfilename()); }", "title": "" }, { "docid": "5b249643a990832f9ecd53f247c87bb4", "score": "0.5689915", "text": "public function destroy($id)\n {\n $find = DB::table('suppliers')->where('id',$id)->first();\n $photo = $find->photo;\n\n if($photo){\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }else{\n DB::table('suppliers')->where('id',$id)->delete();\n }\n }", "title": "" }, { "docid": "c0f1056876f778bb47bd815edbae240a", "score": "0.5686687", "text": "public function destroy($id)\n {\n //\n\n $query = Picture::find($id);\n $collections = collect($query);\n $filename = $collections->get('title');\n // default is config/filesystems.php\n $contents = Storage::get($filename);\n Storage::delete($filename);\n Picture::destroy($id);\n \n return redirect('picture');\n //return $contents;\n \n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680265", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "3b5ab38f0f5c2e97d3b02bce08803b25", "score": "0.56787795", "text": "public function destroy($id)\n {\n \n $imageUpload = Image::findOrfail($id);\n\n File::delete([\n public_path(('/images/').$imageUpload->imageName),\n ]);\n $imageUpload->delete();\n }", "title": "" }, { "docid": "63bd4ba9d20687d38d658987b149d5fb", "score": "0.5676478", "text": "public function deleteResource(\n $uri = \"\",\n $headers = []\n );", "title": "" }, { "docid": "9821f26046d4f47083ca51bd2deff710", "score": "0.5674362", "text": "public function destroy($id)\n {\n //\n $item = post::find($id);\n \n$item->tags()->detach();\n $image_path = $item->file; // the value is : localhost/project/image/filename.format\n \n //Image::destroy($image_path);\n \n $item->delete();\n return redirect('post');\n }", "title": "" }, { "docid": "3d074a3589196f3e2c63d1b79c3a54f2", "score": "0.5669239", "text": "public function destroy()\n {\n $file = pathinfo(request()->getContent());\n $storagePath = $this->baseStoragePath();\n $path = \"{$storagePath}/{$file['basename']}\";\n\n $fileDeleted = Storage::disk(config('canvas.storage_disk'))->delete($path);\n\n if ($fileDeleted) {\n return response()->json([], 204);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.56674856", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.5663417", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.5662905", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "84ffd5d41241886a42efaaa6c4cb6c45", "score": "0.5658867", "text": "public function delete()\n {\n self::remove($this->key);\n $this->key = null;\n $this->value = null;\n }", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648853", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "e24a8da2185cf275580016315ac8c0fe", "score": "0.5646982", "text": "public abstract function remove();", "title": "" }, { "docid": "7257252b8ba3d014ab6c945b9b1f8774", "score": "0.5646248", "text": "public function destroy($id)\n {\n\n $slider = Slider::whereId($id)->first();\n $image = $slider->slider_image;\n $path = 'public/slider_images/'; \n Storage::delete( $path . $image); \n \n $data = Slider::findOrFail($id);\n $data->delete();\n\n Session::flash('success', 'Slider deleted successfully..');\n return redirect()->route('all.slider');\n }", "title": "" }, { "docid": "884fba4384b6fac636fcb5fd3a0b8119", "score": "0.56440735", "text": "public function deletePhoto($resource, $id)\n {\n if (($resource === 'user') || ($resource === 'group') || ($resource === 'memo')) {\n\n //Validate Model is valid and return valid response\n list($param, $model) = $this->validateModelIsValid($resource, $id);\n //Get Image Name\n $image = $model->img_url;\n\n //Delete Avatar and Thumbnail\n if ($image != null) {\n Storage::delete(\"/$param/avatars/thumbnails/$image\");\n Storage::delete(\"/$param/avatars/$image\");\n }\n //Update Profile Photo Field To Null\n $model->img_url = null;\n //Save in Database\n $model->save();\n //Return Response\n return response()->json($model, 202);\n }\n\n return response('Invalid request', 400);\n\n }", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5643097", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "684caecb3cebeb517274f1dbe758544f", "score": "0.5639566", "text": "abstract public function remove($scope = null, $pref = null);", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636697", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "3cfb84429aef8127ecc19fa5934511fe", "score": "0.56167203", "text": "public function deleteTagging($resource)\n {\n $taggingList = $this->getEm()->createQueryBuilder()\n ->select('t')\n ->from('UnifikDoctrineBehaviorsBundle:Tagging', 't')\n ->where('t.resourceType = :type')\n ->setParameter('type', $resource->getResourceType())\n ->andWhere('t.resourceId = :id')\n ->setParameter('id', $resource->getId())\n ->getQuery()\n ->getResult();\n\n foreach ($taggingList as $tagging) {\n $this->getEm()->remove($tagging);\n }\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56098014", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "8bd2c06eeb1572fe4c48014cc912a6d6", "score": "0.5607892", "text": "public function delete() {\n @unlink($this->path());\n return parent::delete();\n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.56033164", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.5598614", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "14eedb590aed3088ebca2d6e88f88b70", "score": "0.55937696", "text": "public function destroy($id)\n {\n if ($id) {\n $storagek = Storagek::find($id);\n unlink(public_path('storage/images/').$storagek->file);\n $storagek->delete();\n return response()->json([\n \"success\" => true,\n \"message\" => \"File successfully delete\",\n ]);\n } else {\n return response()->json(['Err' => 'id no found']);\n }\n\n\n\n //\n }", "title": "" }, { "docid": "1b06eb968537fe78419acb4959d62e6d", "score": "0.55909395", "text": "public function destroy(Request $request, $id)\n\t{\n\t\t$storage = Storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\n\t\tif ($storage) {\n\t\t\t$storage->delete();\n\t\t\tSession::flash('success', 'Склад была успешно удален из справочника!');\n\t\t} else {\n\t\t\tSession::flash('error', 'Склад не найден в справочнике!');\n\t\t}\n\n\t\treturn redirect()->route('storage.index');\n\t}", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "b3f61ce5e85b70bb0bf7f3a5ad6064ba", "score": "0.55771476", "text": "function remove(){\n shm_remove($this->id);\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5570882", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "1f9a85d3b28293dfe2336fc2953ad59f", "score": "0.55613", "text": "public function destroy($id)\n {\n // get divide\n $divide = Divide::findOrFail($id);\n \n File::delete(public_path('image/') . $divide->img);\n \n if($divide->delete()) {\n return new DivideResource($divide);\n }\n }", "title": "" }, { "docid": "3a507f65a1de28bc6b0f34c5d713d3a2", "score": "0.5560665", "text": "public function removeUpload()\n {\n \tif ($file = $this->getAbsolutePath()) {\n \t\tunlink($file);\n \t}\n }", "title": "" }, { "docid": "82eeede68c38b70a29849c8d452c2f6a", "score": "0.5556357", "text": "public function destroy($id)\n { \n $product = Item::find($id);\n $image = $product->image;\n\n $basename ='img/products/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n if($basename != 'img/products/img_place_holder_product.png'){\n unlink($basename);\n }\n }\n $product->delete();\n\n Session::flash('success','Product Deleted');\n return redirect()->back();\n }", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5555877", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5555602", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "7cdf7f14d455dbb5d9ed3ea3b44142b0", "score": "0.55545616", "text": "protected static function removeComponent()\n {\n (new Filesystem)->delete(\n resource_path('assets/js/components/ExampleComponent.vue')\n );\n }", "title": "" }, { "docid": "7488846bbe831c2c5afdad208317b7bd", "score": "0.5543239", "text": "public function destroy(File $file)\n {\n //\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', $file);\n }", "title": "" }, { "docid": "9d72fe7c299d9bc6b0d19ba6bb397fa3", "score": "0.55405164", "text": "public function destroy($id)\n {\n $product = Product::where('id', $id)->first();\n if ($product->image) {\n unlink($product->image);\n }\n Product::where('id', $id)->delete();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "66928b15fb30f2f5cf746449308643ba", "score": "0.5534244", "text": "public function remove()\n {\n $this->_context->builder->waveletRemove($this->waveId, $this->waveletId);\n }", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.5533963", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "a3bbd69ef2b058074f49c04b76cdbd14", "score": "0.55301565", "text": "public function delete() {\n if ($this->_filepath and is_writable($this->_filepath)) {\n unlink($this->_filepath);\n }\n }", "title": "" }, { "docid": "98e71b5db6e284bbc48862c743eb819b", "score": "0.552751", "text": "public function destroy($id)\n {\n //\n $makale_resim = Article::find($id)->img->name;\n @unlink(public_path(\"uploads/\".$makale_resim));\n @unlink(public_path(\"uploads/thumb_\".$makale_resim));\n Img::where(\"imageable_id\",$id)->where(\"imageable_type\",\"App\\Article\")->delete();\n Article::destroy($id);\n Session::flash(\"durum\",1);\n return redirect(\"/admin/haber\");\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
0f3cfc653e14313ce96cfe92a69da693
Sets the value of deleted.
[ { "docid": "ebcccc68013a8989b7bf525f41379851", "score": "0.63893473", "text": "public function setDeleted($deleted)\n {\n $this->deleted = $deleted;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "b92ecbb994460662c7bac630294dc2ac", "score": "0.82006085", "text": "public function setDeleted() {}", "title": "" }, { "docid": "b7d39e97f380cf17d7aa178bb81ee1cb", "score": "0.80366457", "text": "final public function set_to_delete(): void\n {\n $this->state_deleted = true;\n }", "title": "" }, { "docid": "33aa94a7683b3c08b3dbed98db1d2192", "score": "0.77956647", "text": "public function setDeleted()\n {\n $this->status_id = Status::STATUS_DELETED;\n }", "title": "" }, { "docid": "c9defbf9a32bfba0380e6229cc3e03d5", "score": "0.7646074", "text": "public function setDeleted($deleted) {\n\t\t$this->deleted = $deleted;\n\t}", "title": "" }, { "docid": "cf6469ddc98b2d0e13f926c1c5fb352c", "score": "0.76382524", "text": "public function setIsDeletedRecord($value)\n {\n $this->_deleted = $value;\n }", "title": "" }, { "docid": "2ae655d43dbeb4991f8ba04dfb1838aa", "score": "0.7627414", "text": "public function setDeleted($value)\n {\n return $this->set(self::DELETED, $value);\n }", "title": "" }, { "docid": "2ae655d43dbeb4991f8ba04dfb1838aa", "score": "0.7627414", "text": "public function setDeleted($value)\n {\n return $this->set(self::DELETED, $value);\n }", "title": "" }, { "docid": "cef55ecda0f26d551f12f3191656446c", "score": "0.741538", "text": "public function setDeleted(?bool $deleted): void\n {\n $this->deleted = $deleted;\n }", "title": "" }, { "docid": "0ac4d5f427d2661729884cf23fd1cc48", "score": "0.7328759", "text": "public function delete()\n {\n $this->is_deleted = true;\n }", "title": "" }, { "docid": "19a8cbda80275697a55768075f92e79a", "score": "0.7182518", "text": "public function setNotDeleted(): void;", "title": "" }, { "docid": "812cf9cf70f88a403f3176c00cffe2bc", "score": "0.7141806", "text": "public function setDeleted() {\n $this->_setField('status', self::TICKET_STATUS_DELETED);\n $this->commitChanges();\n }", "title": "" }, { "docid": "4d1f8955bcc2604de7022d3e7090abb5", "score": "0.7114376", "text": "public function testSetDeleted()\n {\n $this->status->setDeleted();\n $this->assertEquals($this->status->getStatus(), Status::STATUS_DELETED);\n }", "title": "" }, { "docid": "00a92b43ed089e0a7e16cc76191c680d", "score": "0.7095987", "text": "public function delete()\n {\n $this->deleted = true;\n }", "title": "" }, { "docid": "2830dc6e7e58f2b631a87cbc0248f009", "score": "0.70478064", "text": "final protected function _setDeleted($value = true)\n {\n $this->_isDeleted = (bool) $value;\n\n return $this;\n }", "title": "" }, { "docid": "e7eaf92aa2680e1c61977f2e07c88343", "score": "0.69693005", "text": "public function set_is_deleted($is_deleted)\n {\n }", "title": "" }, { "docid": "030ae05b358e0414105aa9a5d8aa30be", "score": "0.69644886", "text": "public function setDeleted($d)\n {\n $this->_deleted = $d;\n return $this;\n }", "title": "" }, { "docid": "b645871ba1af442ad229a9d320d93fc2", "score": "0.6906418", "text": "public function setDeleted($deleted){\n $this->deleted = $deleted;\n return $this;\n }", "title": "" }, { "docid": "ea69e4dde39c1a7b88a58f79a9343541", "score": "0.6891097", "text": "public function setIsDeleted(?bool $value): void {\n $this->getBackingStore()->set('isDeleted', $value);\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "9d5a0063be7dba46377c5ac30f3db5ab", "score": "0.6867589", "text": "public function setDeleted($b)\n {\n $this->deleted = (boolean) $b;\n }", "title": "" }, { "docid": "148dab1697949d496bb103eff8a3a23c", "score": "0.6819784", "text": "public function Delete()\n {\n $this->IsDeleted = 1;\n }", "title": "" }, { "docid": "a48f459f6a09db8abc926b4fd4fcd1d2", "score": "0.6760387", "text": "public function setDeleted($data)\n {\n $this->_Deleted=$data;\n return $this;\n }", "title": "" }, { "docid": "ac9914147221d8cf2c651fdd70237a9a", "score": "0.67129123", "text": "public function setDeleted(\\DateTime $deleted = null);", "title": "" }, { "docid": "2b54b79672f75305eab9034258b3a30f", "score": "0.6695849", "text": "public function setDeletedDate(?Date $value): void {\n $this->getBackingStore()->set('deletedDate', $value);\n }", "title": "" }, { "docid": "561ea8e34d365276811cd64434748ced", "score": "0.66907555", "text": "public function setDeletedAtAttribute($value)\n {\n $this->attributes['deleted_at'] = $value;\n }", "title": "" }, { "docid": "4ed1c99ff74a073294680d5fc32b8ac8", "score": "0.66200596", "text": "public function setDeleted($delete)\n {\n // updating deleted status will require sync to appnexus\n if ($this->isDeleted() != $delete) {\n $flags = $this->row->flags;\n\n // update flags\n Flags::setFlag($flags, self::FLAG_SYNC);\n if ($delete) {\n Flags::setFlag($flags, self::FLAG_DELETED);\n } else {\n Flags::unsetFlag($flags, self::FLAG_DELETED);\n }\n\n // save to db\n $this->row->flags = $flags;\n $this->row->save();\n }\n\n return $this;\n }", "title": "" }, { "docid": "14eb46d4fe147a32cad812d90b12ec31", "score": "0.6556056", "text": "function get_deleted(){\n return $this->deleted;\n }", "title": "" }, { "docid": "8d21e10631faa47a2c56287e3d897bb2", "score": "0.6545179", "text": "public function setAllowDelete(bool $value = true)\t{ $this->deleteAllowed = $value;\t\treturn $this; }", "title": "" }, { "docid": "34ce3028227d199f5a4d4eaaabc10a0c", "score": "0.653056", "text": "public function deleted()\n {\n }", "title": "" }, { "docid": "5b68e59fb4b01ebc1b0556197109486f", "score": "0.651543", "text": "public function setHardDelete($value)\n {\n return $this->set(self::HARD_DELETE, $value);\n }", "title": "" }, { "docid": "7069fcd9a56805d6eecdd536068e28c4", "score": "0.64876336", "text": "public function undelete()\n {\n $this->is_deleted = false;\n }", "title": "" }, { "docid": "2f4d05277dd01d871fd57274e8838ac3", "score": "0.6457526", "text": "public function delete()\n {\n $this->deletedAt = new \\DateTime();\n }", "title": "" }, { "docid": "2f4d05277dd01d871fd57274e8838ac3", "score": "0.6457526", "text": "public function delete()\n {\n $this->deletedAt = new \\DateTime();\n }", "title": "" }, { "docid": "14e2aced27fd411d8de58a97ebc4c458", "score": "0.6446595", "text": "public function getDeleted() {\n return $this->deleted;\n }", "title": "" }, { "docid": "a5e89b995ca96999fa7bd659fe97cfe7", "score": "0.64207995", "text": "function set_documentDateDeleted(?int $value ) : bool\n\t{\n\t\treturn( $this->setValue( \"documentDateDeleted\", $value ));\n\t}", "title": "" }, { "docid": "25b511bc91b50c979d85e07f2ac19910", "score": "0.63708997", "text": "public function testSetGetDeletedTrue()\n {\n $deleted = true;\n $message = (new Message())->setDeleted($deleted);\n $this->assertTrue($deleted, $message->isDeleted());\n }", "title": "" }, { "docid": "5d8b7d96c468f97b4940a6ae362b96cb", "score": "0.6337611", "text": "protected function setDelete(): self\n\t{\n\t\t$this->delete = true;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2351625056a576af6352c20c39db79e3", "score": "0.6302342", "text": "public function setConfirmDelete(bool $value = true) \t{ $this->confirmDelete = $value;\treturn $this; }", "title": "" }, { "docid": "77cb0348adc7daebef356acc06d91de4", "score": "0.6286242", "text": "public function testSetGetDeletedFalse()\n {\n $deleted = false;\n $message = (new Message())->setDeleted($deleted);\n $this->assertFalse($deleted, $message->isDeleted());\n }", "title": "" }, { "docid": "3a2fa374d4fa144b0fe47c3f8a00641d", "score": "0.6285117", "text": "public function delete()\n {\n $this->deleted_at = date('Y-m-d H:i:s');\n $this->save();\n }", "title": "" }, { "docid": "f45093a06b0d872826c5067fde5c25ff", "score": "0.62754405", "text": "public function getDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "f45093a06b0d872826c5067fde5c25ff", "score": "0.62754405", "text": "public function getDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "f45093a06b0d872826c5067fde5c25ff", "score": "0.62754405", "text": "public function getDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "f45093a06b0d872826c5067fde5c25ff", "score": "0.62754405", "text": "public function getDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "f45093a06b0d872826c5067fde5c25ff", "score": "0.62754405", "text": "public function getDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "f45093a06b0d872826c5067fde5c25ff", "score": "0.62754405", "text": "public function getDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "a13cb379f3438b7914bbd466b44ac6a5", "score": "0.6269973", "text": "public function getDeleted() {\n return $this->deleted;\n }", "title": "" }, { "docid": "a45e6b34784eff890274900e23637df7", "score": "0.62543124", "text": "public function getDeleted() {\n\t\treturn $this->deleted;\n\t}", "title": "" }, { "docid": "9d64f9218147beabd6870e8a5c4eddcc", "score": "0.6226217", "text": "public function MarkForDeletion()\n {\n $this->blForDeletion = true;\n }", "title": "" }, { "docid": "555dfdfcf104ad4d2ffcfeb4d1f83876", "score": "0.6219204", "text": "final public function delete() {\n $this->_beforeDelete();\n $this->_deleted = TRUE;\n $this->_registerToFlusherOnce();\n }", "title": "" }, { "docid": "58da41623637b510c6e184f04c94a8f9", "score": "0.6191441", "text": "public final function undelete() {\n $this->_deleted = FALSE;\n }", "title": "" }, { "docid": "a52e22f8aeb1b3aa7ad52502b39a4c54", "score": "0.6187573", "text": "public function setDeletedAt(DateTimeInterface $deleted): void;", "title": "" }, { "docid": "29a9b7d699a49adf76d943014381e685", "score": "0.6166558", "text": "public function deletedAt(?string $value): self\n {\n $this->instance->setDeletedAt($value);\n return $this;\n }", "title": "" }, { "docid": "2d8ea2a50dcfe6ee7587c38bcf306d81", "score": "0.61489373", "text": "public function softDeletes()\n {\n $this->boolean('deleted');\n $this->timestamp('deleted_at');\n }", "title": "" }, { "docid": "63336865774724d2176443b6a5f8ea76", "score": "0.613765", "text": "public function setDeletedDateTime($val)\n {\n $this->_propDict[\"deletedDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "63336865774724d2176443b6a5f8ea76", "score": "0.613765", "text": "public function setDeletedDateTime($val)\n {\n $this->_propDict[\"deletedDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "27f2f56d9ff7023b95508fa27169f15b", "score": "0.6112858", "text": "public function getDeleted();", "title": "" }, { "docid": "27f2f56d9ff7023b95508fa27169f15b", "score": "0.6112858", "text": "public function getDeleted();", "title": "" }, { "docid": "842ed3c9cd99a4a347dca6aa9f5b6b31", "score": "0.60998845", "text": "public function setDeletedAt(DateTime | string | null $deletedAt): void\n {\n\t\tif ($deletedAt instanceof DateTime) {\n\t\t\t$this->deleted_at = $deletedAt->format('Y-m-d H:i:s');\n\t\t} else {\n\t\t\t$this->deleted_at = $deletedAt;\n\t\t}\n }", "title": "" }, { "docid": "cd16c030e97dbafa4954ec27203d8c78", "score": "0.60984373", "text": "private function setPropSoftDelete(): void\n {\n if ($this->isSoftDelete()) {\n $this->createPropertyArray(ModelsInterface::PROPERTY_DATES, PhpInterface::PHP_MODIFIER_PROTECTED, [ModelsInterface::COLUMN_DEL_AT]);\n }\n }", "title": "" }, { "docid": "124d7a1a7698aec971067c7354b68b48", "score": "0.6098221", "text": "public function setTypeDelete()\n\t{\n\t\t$this->type = 'delete';\n\t}", "title": "" }, { "docid": "a20bb2794a5e667408c4882cd5eb8b94", "score": "0.6089638", "text": "public function delete(){\n echo $this->del(set_value('id'));\n }", "title": "" }, { "docid": "36bd820a68b7bd332c9fd0508001e874", "score": "0.6086973", "text": "public function setDeleteNotImported($value = false)\n {\n $this->deleteNotImported = (bool) $value;\n }", "title": "" }, { "docid": "b699066a00035c9117899e150c579562", "score": "0.6079534", "text": "protected function didDelete() {}", "title": "" }, { "docid": "3d31d573fb85417723f06e304c120aee", "score": "0.6066457", "text": "public function beforeDelete() : void\n {\n $selfClass = get_called_class();\n\n if (property_exists($selfClass, 'deleted_at')) {\n $this->deleted_at = self::getTime();\n }\n if (property_exists($selfClass, 'deleted_ip')) {\n $this->deleted_ip = $this->client_ip;\n }\n }", "title": "" }, { "docid": "65e8f093e8e87c4343f314b9fe853fed", "score": "0.60565794", "text": "public function getDeleted()\n {\n return $this->_Deleted;\n }", "title": "" }, { "docid": "4fb46756094ea5543b2116f645f4841d", "score": "0.60522103", "text": "public function delete($value = '')\n {\n return delete_metadata($this->type, $this->object_id, $this->key, $value);\n }", "title": "" }, { "docid": "8b0832c6ff90922736e17d3a09266bbc", "score": "0.60323006", "text": "public function clearDeleted(){\n $this->rowsDeleted = [];\n }", "title": "" }, { "docid": "40cf99df87d5427de6aa8f628ffc9232", "score": "0.60171795", "text": "protected function runSoftDelete()\n {\n $query = $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey());\n\n $this->{$this->getDeletedAtColumn()} = $this->getDeletedSign();\n\n $query->update([$this->getDeletedAtColumn() => $this->getDeletedSign()]);\n }", "title": "" }, { "docid": "c1fd41e9c1d76c449340fadc3930d083", "score": "0.60144573", "text": "public function isDeleted() {}", "title": "" }, { "docid": "c1fd41e9c1d76c449340fadc3930d083", "score": "0.6013262", "text": "public function isDeleted() {}", "title": "" }, { "docid": "37ac1fd54176b42b23964e93de605dcf", "score": "0.59981287", "text": "public function _postDelete()\r\n {\r\n }", "title": "" }, { "docid": "bdbbedff76f9574aa2bb9966622eba06", "score": "0.59929717", "text": "public function forceDelete()\n {\n }", "title": "" }, { "docid": "737c484daa3b4f9d8d9a99bee8471f4b", "score": "0.59850574", "text": "public function setIsDeleteable($value)\n {\n $this->_isDeleteable = (bool)$value;\n return $this;\n }", "title": "" }, { "docid": "e629604a0e64a29bcf0fcfd7ace06774", "score": "0.59830374", "text": "protected function before_delete()\r\n\t{\r\n\t}", "title": "" }, { "docid": "9c1a6d82537a3848a8bcddf91f1669b4", "score": "0.59711844", "text": "public function forceDeleted(Fondo $fondo)\n {\n //\n }", "title": "" } ]
a7b7d991b698f6a57fcdcb5b68da603f
salah satu jenis property yang dibuat membuat method yang nantinya akan ditampilkan
[ { "docid": "54be43f281c27b40c57a9357e123ce92", "score": "0.0", "text": "public function detailMamalia()\n \t{\n /*\n fungsi dari strtoupper ialah menjadikan semua hurufnya menjadi kapital. ex = contoh => CONTOH\n fungsi dari ucwords ialah menjadikan huruf didepan perkata menjadi kapital. ex = contoh ku => Contoh Ku\n */\n\n \t\treturn 'Jenis Mamalia yang anda inputkan ialah : '.strtoupper($this->jenisMamalia).', '.\n \t\t ' dengan Ras dari golongan : '.ucwords($this->rasMamalia).PHP_EOL.'<br>';\n \t}", "title": "" } ]
[ { "docid": "96f1f1db559b6ecdfc4c422f74ab4f20", "score": "0.62122035", "text": "function __set($prop_name, $prop_value) \r\n\t{\r\n\t\tif (method_exists ($this, \"set_\".$prop_name)) \r\n\t\t\t// llamar a la funcion de acceso\r\n\t\t\treturn call_user_method(\"set_\".$prop_name, $this, $prop_value);\r\n\t\t// es un atributo privado (empieza con '_' )??\r\n\t\telse if (substr($prop_name, 0, 1) == \"_\")\r\n\t\t\treturn false;\r\n\t\t// es un atributo sin funcion de acceso ?\t\r\n\t\telse if (array_key_exists($prop_name, get_object_vars($this))) \r\n\t\t{\r\n\t\t\t$this->{$prop_name}=$prop_value;\r\n\t\t\treturn true;\r\n\t\t}// se puede crear un nuevo atributo ??\r\n\t\telse if ($this->_allowNewProperties) \r\n\t\t{\r\n\t\t\t$this->_new_properties[$prop_name] = $prop_value ;\r\n\t\t\treturn true;\r\n\t\t}//error de acceso, la propiedad no se puede establecer\r\n\t\telse\r\n\t\t\ttrigger_error(get_class($this).\"::__set(\\$prop_name=$prop_name,\\$prop_value=$prop_value) : No se permite añadir nuevas propiedades \", E_USER_ERROR);\r\n\t}", "title": "" }, { "docid": "b09b36b59ff91f9e6617fe50a01ed9c0", "score": "0.61493427", "text": "public function __construct() {\n\t\t\t$this->propertyMap = array();\n\t\t}", "title": "" }, { "docid": "e007c26073dcf7e0160ea1e2db8b01b6", "score": "0.61269563", "text": "public function setNama(string $b) {\n//non-static member of a class\n return $this->nama = $b;\n }", "title": "" }, { "docid": "ab0f4e745ec49c139c75cc1f95dc90de", "score": "0.6075165", "text": "public function __construct()\n\t\t{\n\t\t\t//set parameter for properties\n\t\t}", "title": "" }, { "docid": "ee5efb30b787c8db211126e4c04726cb", "score": "0.6008013", "text": "public function __construct()\n {\n $this->dynamicProperty = 'bad';\n }", "title": "" }, { "docid": "accba265f24f587cc80fb58bf557b4fd", "score": "0.59872276", "text": "abstract protected function setProperties();", "title": "" }, { "docid": "18da704c992a3c3a2e05e99b04211134", "score": "0.5962995", "text": "public function getNama() {\n//non-static member of a class\n return $this->nama;\n }", "title": "" }, { "docid": "1f0e9c3280e6f6805b4d3e6a8152350e", "score": "0.59377044", "text": "public function testSetProperties()\n {\n\n }", "title": "" }, { "docid": "80b5584bdb0af3daac4a93fbfd18255a", "score": "0.5873201", "text": "function set_property($properties=''){\n // set inherited from Object\n $this->_set(array('text'=>'testing',\n 'test'=>'Testing'));\n $vars = get_object_vars($this);\n //echo_array($vars);break;\n }", "title": "" }, { "docid": "486c55dd75db285b02aa58be108e8092", "score": "0.58425206", "text": "public function get_nume(){\n $this->set_nume($this->var);\n}", "title": "" }, { "docid": "6f68ffaf3d7336c3ec3e4ac014b152d3", "score": "0.5831137", "text": "public function setNomberjour($nomberjour)\n{\n$this->nomberjour = $nomberjour;\n}", "title": "" }, { "docid": "f3b465b0e2c4992db322be19f88b32f8", "score": "0.5827387", "text": "public function __construct()\n {\n\t//$this->modification = $this->creation;\n }", "title": "" }, { "docid": "972b8f359e90c3c334768f8af42d71d7", "score": "0.5789314", "text": "protected function properties()\n {\n return [];\n }", "title": "" }, { "docid": "cbef349d89caaedf3e199106fcf67ea8", "score": "0.57889295", "text": "public function set() {\n\t\t}", "title": "" }, { "docid": "b2d959576b99266b40e4ef01f27b7878", "score": "0.57814634", "text": "public function setNom($nom)\n{\n$this->nom = $nom;\n\nreturn $this;\n}", "title": "" }, { "docid": "7f0d94c9e12db9ed68fd82525f9b7bf3", "score": "0.5760603", "text": "public function __construct(){\n\t\t$this->properties = array(\n\t\t\t\"id\" => \"\",\n\t\t\t\"length\" => 0,\n\t\t\t\"data\" => array()\n\t\t);\n\t}", "title": "" }, { "docid": "9469cedd5a1014525de150f71ca88d26", "score": "0.5747822", "text": "public function setData($data) {\n $properties = get_object_vars($this);\n // echo \"data\";\n // print_r($data);\n \n foreach ($properties as $proprety => $value) {\n \n //echo \"$proprety \".$data[$proprety].\"\\n\";\n //var_dump(boolval($data[$proprety])) ;\n // echo \"-----------------------------------------\\n\";\t\n\t\t\t\n if (isset($data[$proprety])) {\n\t\t\t\t\n $method = \"set\" . ucfirst($proprety);\n $this->$method($data[$proprety]);\n\t\t\t\t\n } else {\n //throw new Exception(\"$proprety non e definito\");\n };\n \n }\n }", "title": "" }, { "docid": "ebb24081fd23f641b78e65287f492540", "score": "0.57427925", "text": "function test_getters_setters()\n\t{\n\t\t/* Initialisation du joueur à tester */\n\t\t$offre = new OffreEntrainement(null, null, null, null, null);\n\t\t$offre->setIdOffre(\"OTEST001\");\n\t\t$offre->setAttaqueOffre(2);\n\t\t$offre->setDefenseOffre(1);\n\t\t$offre->setVieOffre(0);\n\t\t$offre->setLevelUp(1);\n\t\t\n\t\t/* Asserts */\n\t\t$this->assertNotNull($offre);\n\t\t$this->assertEqual($offre->getIdOffre(), \"OTEST001\"); \n\t\t$this->assertEqual($offre->getAttaqueOffre(), 2);\n\t\t$this->assertEqual($offre->getDefenseOffre(), 1); \n\t\t$this->assertEqual($offre->getVieOffre(), 0); \n\t\t$this->assertEqual($offre->getLevelUp(), 1); \n\t\t$this->assertEqual($offre->getSommePoints(), 4);\n\t}", "title": "" }, { "docid": "24701821a60a568cf40200ee2560938d", "score": "0.5728845", "text": "function setHolaMundo($saludo){\n $this->$saludoPrivate = $saludo;\n }", "title": "" }, { "docid": "8f3505d81af2bb31c727e6c2b9993263", "score": "0.5727911", "text": "public function ChangedProperties() : array;", "title": "" }, { "docid": "c086708826de396ae440e12a1bad4fec", "score": "0.570239", "text": "public function serializeProperties()\n {\n }", "title": "" }, { "docid": "b37a7293b7e187f65e962ce0d7f75a6f", "score": "0.5697319", "text": "function __get($atributo) { return $this->$atributo; }", "title": "" }, { "docid": "000e088eac782f8a7e82c2c1c77cb19b", "score": "0.5684042", "text": "public function testUnsetProperty()\n {\n\n }", "title": "" }, { "docid": "a69981b744a1bd6edda72ab376db5db8", "score": "0.56835866", "text": "public function setNama($data) //set untuk mengatur nila\n {\n $this->nama = $data; //this mengakses properti yang ada di dalem objek class person\n }", "title": "" }, { "docid": "04d2326f1864a7764e6be347c1dddacb", "score": "0.563115", "text": "public function set() {\n $args = func_num_args() == 1 ? func_get_arg(0) : func_get_args();\n $properties_keys = array_keys($this->_properties);\n $class_methods = get_class_methods(get_class($this));\n\n foreach ($args as $key => $arg) {\n if (is_numeric($key)) {\n $key = array_search($key, $properties_keys);\n }\n\n // Treat the case of PHP's reserved word 'new'\n if ($key == \"new\") {\n $key = \"is_new\";\n }\n // Treat the case of PHP's reserved word 'return'\n if ($key == \"return\") {\n $key = \"return_leg\";\n }\n\n // Check if a method named $key exists\n if (in_array($key, $class_methods)\n or in_array($key, $properties_keys)) {\n $this->$key($arg);\n }\n }\n }", "title": "" }, { "docid": "4566eb25c02350d04567ac3efeec43c6", "score": "0.5623736", "text": "public function setNombre($nombre){\n $this->nombre=$nombre;\n}", "title": "" }, { "docid": "14cf5c976e7084c18f23ad23b70a46ce", "score": "0.56232685", "text": "protected function custom_accessors()\n\t{\n\t\tif ($this->accesor_attributes)\n\t\t\tforeach ($this->accesor_attributes as $att)\n\t\t\t\t$this->properties[$att] = \"\";\t\n\t}", "title": "" }, { "docid": "7e553fd5f2d0dcff4ab1bdfb90db640d", "score": "0.562186", "text": "public function getPrenom()\n{\nreturn $this->prenom;\n}", "title": "" }, { "docid": "340b920261acf221f32dfea83fc640d9", "score": "0.5613974", "text": "public function getNomberjour()\n{\nreturn $this->nomberjour;\n}", "title": "" }, { "docid": "0c78af8f176cdd30df733f87d3894022", "score": "0.5611502", "text": "public function testSetPropertiesOnce()\n {\n\n }", "title": "" }, { "docid": "ee4817fcffbad7c944f9a460becb6a28", "score": "0.5610257", "text": "public function testPropertiesManipulation()\n {\n $model = new ModelStub();\n $model->name = 'foo';\n $this->assertEquals('foo', $model->name);\n $this->assertTrue(isset($model::getProperties()['name']));\n }", "title": "" }, { "docid": "3250aa6ac9ccdcfab1378c692f7847f3", "score": "0.5608897", "text": "function __SET($prop, $value)\n {\n if(property_exists($this,$prop))\n $this->$prop = $value;\n }", "title": "" }, { "docid": "974c27012d453ecb9873fe5fef05c535", "score": "0.5605679", "text": "private function getProperti()\n\t{\n\t\t# code...\n\t}", "title": "" }, { "docid": "439e3f4915252486d0576dfa8158c365", "score": "0.5574419", "text": "public function __construct($daten = array())\n{\n if ($daten) {\n foreach ($daten as $k => $v) {\n $setterName = 'set' . ucfirst($k);\n // wenn ein ungültiges Attribut übergeben wurde\n // (ohne Setter), ignoriere es\n if (method_exists($this, $setterName)) {\n $this->$setterName($v);\n }\n }\n }\n}", "title": "" }, { "docid": "31909ad8e0f7f9d795f65a20ca3b93dd", "score": "0.5574024", "text": "function __construct(){\n //y no necesita valores\n }", "title": "" }, { "docid": "ba57cd71112c300b8743555e160e23ff", "score": "0.55732495", "text": "protected function properties(){\n\n $properties = [];\n\n foreach (static::$db_table_fields as $db_field ){\n //check exist other wise we can assign\n if (property_exists($this, $db_field)){\n //assign on array on property\n $properties[$db_field] = $this->$db_field ;\n }\n }\n //Return all array\n return $properties;\n //return get_object_vars($this);\n }", "title": "" }, { "docid": "e4759055c3af707e767bb295ae0c4c26", "score": "0.5562956", "text": "private function limpa() {\n\t\t$this->salvo = false;\n\t\t$this->id = false;\n\t\t$this->idRef = false;\n\t\t$this->idUsuario = false;\n\t\t$this->mensagem = '';\n\t\t$this->data = 0;\n\t\t$this->usuario = null;\n\t\t$this->salvo = false;\n\t\t//$this->consultaRef = false;\n\t}", "title": "" }, { "docid": "c302d39da37e316060375ca72352c632", "score": "0.5561409", "text": "public function getNom()\n{\nreturn $this->nom;\n}", "title": "" }, { "docid": "8d0c2f6d955b840e4d3620b1d4aaa735", "score": "0.5557952", "text": "abstract public function resultObjectPropertyProvider();", "title": "" }, { "docid": "5b71f956602643cde5f12f03ae4dc0cc", "score": "0.55547833", "text": "public function set() {}", "title": "" }, { "docid": "5e1b934d7bdf31d923e234be24f2006a", "score": "0.55402774", "text": "public static function DaftObjectPublicSetters() : array;", "title": "" }, { "docid": "b86ebaf1afc853e260cad57c8a24c359", "score": "0.55273604", "text": "public function __get($property){\n// check if what we are tryig to access exist in our container\n if ($this->container->{$property})\n {\n return $this->container->{$property};\n }\n\n }", "title": "" }, { "docid": "6b79e0b9cb75875d528f325bf14c0c25", "score": "0.5526537", "text": "function showProperty(){\n\n\t\t \t\techo $this->hood;\n\n\t\t \t}", "title": "" }, { "docid": "92dd5724300bc876020c071472a2d276", "score": "0.5524282", "text": "protected function _setUpProperties()\n {\n\n $db = $this->_bourbon_orm_object_dependencies->db;\n $properties = $db->getFields($this->_bourbon_orm_object_table);\n $properties = array_map('strtolower', $properties);\n\n $this->_bourbon_orm_object_properties = $properties;\n\n }", "title": "" }, { "docid": "7966d0ea2420a7a71ac7827a1a1ee566", "score": "0.5518441", "text": "public function setProperty($property)\n {\n $this->_property = $property;\n\n }", "title": "" }, { "docid": "aba5f350840af3d465df1f1ef29523b7", "score": "0.55039525", "text": "public function __contsruct()\n {\n //\n }", "title": "" }, { "docid": "dd77eb2a3f867de8207cbafd5763a200", "score": "0.54934245", "text": "function __get($prop_name) \r\n\t{\r\n\t\tif (method_exists ($this, \"get_\".$prop_name))\r\n\t\t\treturn call_user_method(\"get_\".$prop_name, $this);\r\n\t\t// es un atributo privado (empieza con '_' ) ??\r\n\t\telse if (substr($prop_name, 0, 1) == \"_\")\r\n\t\t\ttrigger_error(get_class($this).\"::__get(\\$prop_name=$prop_name) : es privada de la clase\", E_USER_ERROR);\r\n\t\t// es un atributo sin funcion de acceso ??\r\n\t\telse if (array_key_exists($prop_name, get_object_vars($this))) \r\n\t\t\treturn $this->{$prop_name};\r\n\t\t// es un atributo nuevo creado ?? \r\n\t\telse if ($this->_allowNewProperties && isset($this->_new_properties[$prop_name])) \r\n\t\t\treturn $this->_new_properties[$prop_name];\r\n\t\t//error de acceso, la propiedad no se puede establecer\r\n\t\telse\r\n\t\t\ttrigger_error(get_class($this).\"::__get(\\$prop_name=$prop_name,\\$prop_value=$prop_value) : la propiedad no existe \", E_USER_ERROR);\r\n\t}", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.54899085", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.54899085", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.54899085", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.54899085", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.54899085", "text": "public static function setters();", "title": "" }, { "docid": "760cac4c40cdd44f1c5f47ab94320401", "score": "0.54874897", "text": "public function setMetas()\n {\n\n }", "title": "" }, { "docid": "ba8910f2205d4c2c2cf4a208663ef904", "score": "0.5486204", "text": "public function setPrenom($prenom)\n{\n$this->prenom = $prenom;\n\nreturn $this;\n}", "title": "" }, { "docid": "02b6afbce72599a7bf2c4984d09fa714", "score": "0.54730433", "text": "public function testInvalidSetter() {\n $a = new TestBO();\n\n $a->setSomeBogusProperty();\n }", "title": "" }, { "docid": "a0841734ee928a4489bc4f1a396716b5", "score": "0.54725856", "text": "public function testAddProperty()\n {\n $obj = $this->obj;\n $this->assertEquals([], $obj->properties());\n\n $ret = $obj->addProperty('foo');\n $this->assertSame($ret, $obj);\n $this->assertEquals([ 'foo' ], $obj->properties());\n $obj->addProperty('bar');\n $this->assertEquals([ 'foo', 'bar' ], $obj->properties());\n }", "title": "" }, { "docid": "5ebfb7adacc8951cebc2f00ef9661a29", "score": "0.5471925", "text": "public function getAn_aparitie()\n{\nreturn $this->an_aparitie;\n}", "title": "" }, { "docid": "404b15401ca22cadf407dd17a1d87b01", "score": "0.5468881", "text": "function setter($atributo,$valor){\n $this->$atributo=$valor;\n }", "title": "" }, { "docid": "7e76848067f0c0d33e3d8af9649d1514", "score": "0.54684156", "text": "function _set($properties = array()) {\n //echo_array($properties);\n if (is_array($properties) && !empty($properties)) {\n $vars = get_object_vars($this);\n \n foreach ($properties as $key => $val) {\n if (array_key_exists($key, $vars)) {\n $this->{$key} = $val;\n }\n \n }\n }\n //echo_array($vars);\n }", "title": "" }, { "docid": "c261214629065911392b78cb5033ebf2", "score": "0.5463151", "text": "public function getNombre(){\n return $this->nombre;\n}", "title": "" }, { "docid": "976ee98d259daddd5243ef98fa5c7911", "score": "0.546274", "text": "function __construct(){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "717830a18024c9fbd2b176a150867260", "score": "0.5458054", "text": "public function asDoctrineProperty();", "title": "" }, { "docid": "988723ed131a289d247cadb3a27e8a79", "score": "0.5457227", "text": "public function __construct() {\n\t\t// $this->set('key', 'value'); \n\t}", "title": "" }, { "docid": "f97abd486beb09fef4d67cc57450c48d", "score": "0.5445784", "text": "public function testProperty()\n {\n \t$class=new AttributeTestClass();\n \t\n \t$meta=AttributeReader::PropertyAttributes($class,'property');\n \t\n \t$this->assertTrue($meta->name=='property');\n \t\n \t// test object arrays\n \t$this->assertTrue($meta->validators[0]->type=='date');\n \t$this->assertTrue(count($meta->validators)==2);\n\n \t// test iteration\n foreach($meta->validators as $validator)\n \t$this->assertTrue(strpos($validator->name,'valid')!==false);\n }", "title": "" }, { "docid": "b0e2577bb2553d0b452faff206c1285b", "score": "0.54408395", "text": "public function testHasProperties()\n {\n $obj = $this->obj;\n\n /** 1. Default state */\n $this->assertFalse($obj->hasProperties());\n\n /** 2. Mutated state */\n $obj->setProperties([ 'foo' ]);\n $this->assertTrue($obj->hasProperties());\n }", "title": "" }, { "docid": "476904441f117ee6af7746c79caf6059", "score": "0.54406697", "text": "public function __set($name, $value)\r\n {\r\n switch ($name) {\r\n \tcase \"id\" :\r\n \t\t$this->_id = $value;\r\n \t\tbreak;\r\n \tcase \"usuario\" :\r\n \t\t$this->_usuario = $value;\r\n \t\tbreak;\r\n \tcase \"id_usuario\" :\r\n \t\t$this->_id_usuario = $value;\r\n \t\tbreak;\r\n \tcase \"marca\" :\r\n \t\t$this->_marca = $value;\r\n \t\tbreak;\r\n \tcase \"modelo\" :\r\n \t\t$this->_modelo = $value;\r\n \t\tbreak;\r\n \tcase \"combustible\" :\r\n \t\t$this->_combustible = $value;\r\n \t\tbreak;\r\n \tcase \"traccion\" :\r\n \t\t$this->_traccion = $value;\r\n \t\tbreak;\r\n \tcase \"alias\" :\r\n \t\t$this->_alias = $value;\r\n \t\tbreak;\r\n \tcase \"patente\" :\r\n \t\t$this->_patente = $value;\r\n \t\tbreak;\r\n \tcase \"anio\" :\r\n \t\t$this->_anio = $value;\r\n \t\tbreak;\r\n \tcase \"km\" :\r\n \t\t$this->_km = $value;\r\n \t\tbreak;\r\n \tcase \"aire_acondicionado\" :\r\n \t\t$this->_aire_acondicionado = $value;\r\n \t\tbreak;\r\n \tcase \"alza_vidrios\" :\r\n \t\t$this->_alza_vidrios = $value;\r\n \t\tbreak;\r\n \tcase \"fecha_modificacion\" :\r\n \t\t$this->_fecha_modificacion = $value;\r\n \t\tbreak;\r\n \tcase \"borrado\" :\r\n \t\t$this->_borrado = $value;\r\n \t\tbreak;\r\n \tdefault:\r\n\t\t $trace = debug_backtrace();\r\n\t\t trigger_error(\r\n\t\t 'Undefined property via __set(): ' . $name .\r\n\t\t ' in ' . $trace[0]['file'] .\r\n\t\t ' on line ' . $trace[0]['line'],\r\n\t\t E_USER_NOTICE);\r\n }\r\n }", "title": "" }, { "docid": "ec4ad1e8f82496fe602aee9d9544e294", "score": "0.543393", "text": "public static function __set_state($properties=null){ }", "title": "" }, { "docid": "ec4ad1e8f82496fe602aee9d9544e294", "score": "0.543393", "text": "public static function __set_state($properties=null){ }", "title": "" }, { "docid": "96654de38665b75132383188326b4d18", "score": "0.5428441", "text": "abstract protected function set();", "title": "" }, { "docid": "5c89e580c7703fc23f767a9b60180ac7", "score": "0.5428436", "text": "public function getMetier()\n{\nreturn $this->metier;\n}", "title": "" }, { "docid": "e8f863c1d2bf0ac76f0b202c6bc6a59f", "score": "0.54227114", "text": "function subtraiChuteiraPrata(){\n\t\t$this->chuteirasPrata=0;\n\t}", "title": "" }, { "docid": "d5ce918e15046ed9797a7996fb063bb7", "score": "0.5417032", "text": "function properties() {\n\t\t$this->menus = array(\t\t// Set menus arguments\n\t\t\t'top_title' => 'SiteMAP选项',\n\t\t\t'type' => 'menu',\n\t\t\t'page_title' => '网站地图',\n\t\t\t'menu_title' => '网站地图',\n\t\t\t'capability' => 'manage_options',\n\t\t\t'menu_slug' => 'baidu_sitemap_china',\n\t\t\t'parent_slug' => 'themes.php'\n\t\t);\n\t\t$this->option_name = 'dxseo_sitemap_generate';\t\t// Set option name\t\n\t\t$this->option_val = get_option( $this->option_name );\n\t}", "title": "" }, { "docid": "5b0b2f54e4d1cac9911ce8ee5863e56f", "score": "0.54154", "text": "public function hasProperties(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "1e16858c52ad6028cdf22706addff89a", "score": "0.5413305", "text": "public function getVille()\n{\nreturn $this->ville;\n}", "title": "" }, { "docid": "531e351770b2ac6478539997b789ebc8", "score": "0.5409707", "text": "public function __get ($member)\n {\n $member = strtolower($member);\n if (! array_key_exists($member, $this->data) & isset($this->$member)) {\n CobWeb::o('Console')->warning('CobWeb_OrmObject## Undefined property ' . $member);\n return;\n }\n //Check wheter our child-class has a validation method for this property:\n if (method_exists(self::$instance, '_' . $member . 'Get')) {\n //Delegate to Class Setter Function\n return call_user_func_array(array(self::$instance , '_' . $member . 'Get'),array());\n } else {\n return $this->data[$member];\n }\n }", "title": "" }, { "docid": "29461bc42564a596f0ad8206eeaf29d9", "score": "0.5396508", "text": "private function setPropertiesFromDB(){\n if(isset($this->dbColumns)){\n foreach($this->dbColumns as $column){\n $this->{$column} = isset($this->{$column}) ? $this->{$column} : NULL;\n }\n }\n }", "title": "" }, { "docid": "7a8ed1bf5d77c94f406bb29945c8de22", "score": "0.5385632", "text": "function getHolaMundo(){ \n return $this->$saludoPrivate;\n }", "title": "" }, { "docid": "4b3355843353fd90290eae5bfa53d7d3", "score": "0.5375177", "text": "public function setCodigo($codigo){\n $this->codigo=$codigo;\n}", "title": "" }, { "docid": "eb5300e0892164537d42e7f4d834ca1b", "score": "0.53713065", "text": "public function testGetterAndSetter()\n {\n\n $this->checkAttribute('Name', 'name1');\n $this->checkAttribute('Since', 2001);\n $this->checkAttribute('Capacity', 30101);\n $this->checkAttribute('Address', 'Somewhere over the rainbow');\n $this->checkOneToMany('City');\n $this->checkManyToOne('Game');\n }", "title": "" }, { "docid": "e464a76c4aab33ae9bad4c6aeb0a7e94", "score": "0.5369793", "text": "public function testGetIssetSetUnsetProtectedViaMethod(): void\n {\n $this->initializeStateProxy(MockState1::class, true);\n self::assertEquals('value1', $this->proxy->getProProperty());\n self::assertTrue($this->proxy->issetProProperty());\n self::assertFalse($this->proxy->issetMissingProProperty());\n $this->proxy->setProProperty('value2');\n self::assertEquals('value2', $this->proxy->getProProperty());\n $this->proxy->unsetProProperty();\n self::assertFalse($this->proxy->issetProProperty());\n }", "title": "" }, { "docid": "03cd6998cd12f5119e0b08fe0ece6d4d", "score": "0.5366311", "text": "public static function setProperty(){\r\n $device = self::$pr_device;\r\n\r\n $d_status = isset( $device['status'] ) && $device['status'] == 'on' ? true : false;\r\n $d_columns = isset( $device['columns'] ) ? $device['columns'] : false;\r\n\r\n if( $d_status && is_array( $d_columns ) && count( $d_columns ) > 0 ){\r\n self::$detect = self::$pr_detect;\r\n self::$device = self::$datas['device'][self::$pr_detect];\r\n self::$columns = self::getActiveColumns( $d_columns );\r\n self::$head = self::getActiveColumns( $d_columns, 'head' );\r\n return true;\r\n }\r\n $desktop_clumns = isset( self::$datas['device']['desktop']['columns'] ) ? self::$datas['device']['desktop']['columns'] : false;\r\n\r\n\r\n if( is_array( $desktop_clumns ) && count( $desktop_clumns ) > 0 ){\r\n self::$detect = 'desktop';\r\n self::$device = self::$datas['device'][self::$detect];\r\n self::$columns = self::getActiveColumns( $desktop_clumns );\r\n self::$head = self::getActiveColumns( $desktop_clumns, 'head' );\r\n return true;\r\n }\r\n return;\r\n }", "title": "" }, { "docid": "01d32183a8c98e2ca0e5688e23d35555", "score": "0.53647256", "text": "public function testIssetPrivateIsset(): void\n {\n self::assertFalse(isset($this->proxy->privateProperty));\n self::assertFalse(isset($this->proxy->missingPrivateProperty));\n }", "title": "" }, { "docid": "57955938263321283967b235aa30d4db", "score": "0.5359308", "text": "public function testIvalidPropertiesAreNotAdded() {\n $a = new TestBO(array(\n 'someBogusProperty' => 'does not matter',\n ));\n\n $a->getSomeBogusProperty();\n }", "title": "" }, { "docid": "f505c8e909463d72be5dfd26ce918ad9", "score": "0.53587556", "text": "public function getNama () //get untuk mendapatkan nilai\n {\n return $this ->nama;\n\n }", "title": "" }, { "docid": "b2f0aa4995fe96b3305b34319d3b3ef3", "score": "0.5355265", "text": "public function shouldFetchFromMagicProperty(): bool;", "title": "" }, { "docid": "d4e440e2a92a24dd75a2f02fcd644ec0", "score": "0.5351448", "text": "public function testPropertiesCanBeManipulated()\n {\n $model = new ModelStub();\n $model->name = \"bar\";\n $this->assertEquals('bar', $model->name);\n $this->assertNotEquals('foo', $model->name);\n $this->assertNotNull($model->name);\n $model = new ModelStub();\n $model->email = '[email protected]';\n $model->password = 'bar';\n $model->name = 'FooBar';\n $this->assertArrayHasKey('email', $model->getProperties());\n $this->assertNotEquals('foobar', $model->name);\n $this->assertNotContains('foobar', $model->getProperties());\n $this->assertArrayHasKey('name', $model->getProperties());\n $this->assertTrue(isset($model->getProperties()['name']));\n unset($model->email);\n $this->assertFalse(isset($model->email));\n }", "title": "" }, { "docid": "e23d380829c6190b9e5fef29a5e3128b", "score": "0.5350848", "text": "public function testAllowMembersWithInexistantProperties() {\n $a = new TestBO(array(\n 'someBogusProperty' => 'does not matter',\n 'name' => 'newName'\n ));\n\n $this->assertEquals($a->getName(), 'newName');\n }", "title": "" }, { "docid": "93a7afd23c3f5bbb194f0e9235e856d9", "score": "0.5350536", "text": "public function __construct(){\n\t\t$this->properties = array(\n\t\t\t\"title\" => \"\",\n\t\t\t\"author\" => \"\",\n \"year\" => \"\"\n\t\t);\n\t}", "title": "" }, { "docid": "ce699df3a9018d0827f10d8211479c12", "score": "0.5347195", "text": "public function testEnsureNewPropertyCannotBeSetOrRetrieved()\n {\n $this->droplet->testProperty = 'test';\n $this->assertNull($this->droplet->testProperty);\n $array = get_object_vars($this->droplet);\n $this->assertFalse(isset($array['testProperty']));\n }", "title": "" }, { "docid": "e3f87347c85b8c7b8a1e56334ed69ff4", "score": "0.53459793", "text": "public function testSetInstanceField()\n {\n }", "title": "" }, { "docid": "4bc457e3d7a36c8122a25103947460df", "score": "0.5343925", "text": "protected function _isMutable(){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5084fb069fc6aac31af0b2a8b0c7c239", "score": "0.5337592", "text": "public function setUpdated()\n {\n /* override */\n }", "title": "" }, { "docid": "75c28c574e7775e8ae96b57b628b1471", "score": "0.533563", "text": "function __construct() {\r\n parent::__construct();\r\n $this->data = (object)array(); \r\n }", "title": "" }, { "docid": "08dc4ba34b04efe1610b686629c546ba", "score": "0.53340393", "text": "public function get()\r {\r \r }", "title": "" }, { "docid": "19af0b9e2dbb69ad37183effc414d734", "score": "0.5331325", "text": "public function properties() {\r\n\t\treturn array(\r\n\t\t\t'id' => 0,\r\n\t\t\t'name' => ''\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "9aa9a98c4aa3dde1d271bbf819375a11", "score": "0.5325222", "text": "public function testSetData()\n {\n $obj = $this->obj;\n $ret = $obj->setData([\n 'properties' => [ 'foo' ],\n 'filters' => [],\n 'orders' => [],\n 'pagination' => [],\n 'foobar' => true\n ]);\n $this->assertSame($ret, $obj);\n\n $this->assertEquals([ 'foo' ], $obj->properties());\n $this->assertTrue($obj->foobar);\n }", "title": "" }, { "docid": "99069b1843b1e4ad160f05e44104ac47", "score": "0.53203344", "text": "public function getMetier2()\n{\nreturn $this->metier2;\n}", "title": "" }, { "docid": "afb4e28a4ca831d75d4da8cda7d39864", "score": "0.53175396", "text": "function __construct()\n {\n $this->behaviors[] = new Parameter\\Object\\Property\\Method( null, $this );\n }", "title": "" }, { "docid": "06d14320c38f6661fffd1f694661573c", "score": "0.53143126", "text": "public function getProperty();", "title": "" }, { "docid": "06d14320c38f6661fffd1f694661573c", "score": "0.53143126", "text": "public function getProperty();", "title": "" }, { "docid": "06d14320c38f6661fffd1f694661573c", "score": "0.53143126", "text": "public function getProperty();", "title": "" } ]